summaryrefslogtreecommitdiff
path: root/scripts/build_win.sh
AgeCommit message (Collapse)Author
13 hoursfix(build): Resolve Windows cross-compilation failuresskal
This commit fixes several issues that caused the Windows cross-compilation build (`scripts/build_win.sh`) to fail. The root causes were platform-specific API differences in the wgpu-native library and incorrect dependency tracking in the CMake build system for generated code. Changes: - **`tools/seq_compiler.py`**: The timeline generator now wraps `depthSlice` assignments in `#if !defined(DEMO_CROSS_COMPILE_WIN32)` directives to handle API differences in `WGPURenderPassColorAttachment`. - **`src/gpu/gpu.h`**: The `gpu_init_color_attachment` helper is now platform-aware, using a preprocessor guard for the `depthSlice` member. - **`src/effects/*.cc`**: All effects are updated to use the new platform-aware helper or have explicit guards for `depthSlice`. Also, replaced `WGPUTexelCopyTextureInfo` with the cross-platform alias `GpuTextureCopyInfo` in `rotating_cube_effect.cc`. - **`cmake`**: Added `tools/seq_compiler.py` as an explicit dependency to the `generate_timeline` and `generate_test_demo_timeline` custom commands. This ensures that changes to the generator script correctly trigger a rebuild of the generated C++ files. - **`scripts/build_win.sh`**: Removed the erroneous attempt to build the `seq_compiler.py` script as a native executable. With these changes, the Windows cross-compilation build now completes successfully.
2026-02-03refactor: Task #20 - Platform & Code Hygieneskal
- Consolidated all WebGPU shims and platform-specific logic into src/platform.h. - Refactored platform_init to return PlatformState by value and platform_poll to automatically refresh time and aspect_ratio. - Removed STL dependencies (std::map, std::vector, std::string) from AssetManager and Procedural subsystems. - Fixed Windows cross-compilation by adjusting include paths and linker flags in CMakeLists.txt and updating build_win.sh. - Removed redundant direct inclusions of GLFW/glfw3.h and WebGPU headers across the project. - Applied clang-format and updated documentation. handoff(Gemini): Completed Task #20 and 20.1. Platform abstraction is now unified, and core paths are STL-free. Windows build is stable.
2026-02-03build: Enable parallel compilation in build scriptsskal
Add -j8 flag to all cmake --build commands to use 8 threads for faster parallel compilation across gen_assets.sh, crunch_demo.sh, and build_win.sh scripts. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02fix(shader): Correct WGSL loop syntax in calc_shadowskal
- Replaced invalid 'i++' with 'i = i + 1' in the shader's calc_shadow function loop. - This resolves the shader parsing error and allows the 3D renderer test to run successfully on all platforms.
2026-01-31fix: Cross-compilation and style complianceskal
Fixes seq_compiler build for Windows cross-compilation. Moves common WebGPU compatibility shims to gpu.h. Applies project-wide coding style via clang-format. Verified on both macOS (native) and Windows (cross-compile).
2026-01-31update state in .md filesskal
2026-01-31Add Windows cross-compilation support (MinGW) and emulation (Wine)skal