diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 1a46740b8f..c45312a493 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -26,7 +26,7 @@ on: - 'version.inc' - ".github/workflows/build_*.yml" - 'build_linux.sh' - - 'build_release_vs2022.bat' + - 'build_release_vs202X.bat' - 'build_release_macos.sh' - 'scripts/flatpak/**' diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index e4a985b77a..1e0e6ddb10 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -69,8 +69,8 @@ jobs: working-directory: ${{ github.workspace }} run: | choco install strawberryperl - .\build_release_vs2022.bat deps - .\build_release_vs2022.bat pack + .\build_release_vs202X.bat deps + .\build_release_vs202X.bat pack cd ${{ github.workspace }}/deps/build - name: Build on Mac ${{ inputs.arch }} diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 9da7295565..4ac060c0ba 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -233,7 +233,7 @@ jobs: env: WindowsSdkDir: 'C:\Program Files (x86)\Windows Kits\10\' WindowsSDKVersion: '10.0.26100.0\' - run: .\build_release_vs2022.bat slicer + run: .\build_release_vs202X.bat slicer - name: Create installer Win if: inputs.os == 'windows-latest' diff --git a/AGENTS.md b/AGENTS.md index 5446ab270e..0aefdbb99c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,7 +8,7 @@ Use out-of-source builds: - `cmake -S . -B build -DCMAKE_BUILD_TYPE=Release` configures dependencies and generates build files. - `cmake --build build --target OrcaSlicer --config Release` compiles the app; add `--parallel` to speed up. - `cmake --build build --target tests` then `ctest --test-dir build --output-on-failure` runs automated suites. -Platform helpers such as `build_linux.sh`, `build_release_macos.sh`, and `build_release_vs2022.bat` wrap the same flow with toolchain flags. Use `build_release_macos.sh -sx` when reproducing macOS build issues, and `scripts/DockerBuild.sh` for reproducible container builds. +Platform helpers such as `build_linux.sh`, `build_release_macos.sh`, and `build_release_vs202X.bat` wrap the same flow with toolchain flags. Use `build_release_macos.sh -sx` when reproducing macOS build issues, and `scripts/DockerBuild.sh` for reproducible container builds. ## Coding Style & Naming Conventions `.clang-format` enforces 4-space indents, a 140-column limit, aligned initializers, and brace wrapping for classes and functions. Run `clang-format -i ` before committing; the CMake `clang-format` target is available when LLVM tools are on your PATH. Prefer `CamelCase` for classes, `snake_case` for functions and locals, and `SCREAMING_CASE` for constants, matching conventions in `src/`. Keep headers self-contained and align include order with the IWYU pragmas. diff --git a/CLAUDE.md b/CLAUDE.md index eb35833082..0b640d9699 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,16 +11,16 @@ OrcaSlicer is an open-source 3D slicer application forked from Bambu Studio, bui ### Building on Windows ```bash # Build everything -build_release_vs2022.bat +build_release_vs202X.bat # Build with debug symbols -build_release_vs2022.bat debug +build_release_vs202X.bat debug # Build only dependencies -build_release_vs2022.bat deps +build_release_vs202X.bat deps # Build only slicer (after deps are built) -build_release_vs2022.bat slicer +build_release_vs202X.bat slicer ``` diff --git a/build_release.bat b/build_release_vs2019.bat similarity index 100% rename from build_release.bat rename to build_release_vs2019.bat diff --git a/build_release_vs2022.bat b/build_release_vs202X.bat similarity index 100% rename from build_release_vs2022.bat rename to build_release_vs202X.bat diff --git a/doc/developer-reference/How-to-build.md b/doc/developer-reference/How-to-build.md index 249da3edff..493ca40e96 100644 --- a/doc/developer-reference/How-to-build.md +++ b/doc/developer-reference/How-to-build.md @@ -28,15 +28,15 @@ Whether you're a contributor or just want a custom build, this guide will help y ## Windows 64-bit -How to building with Visual Studio 2022 on Windows 64-bit. +How to building with Visual Studio on Windows 64-bit. ### Windows Tools Required -- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/) or Visual Studio 2019 +- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/), 2026 or 2019 ```shell winget install --id=Microsoft.VisualStudio.2022.Professional -e ``` -- [CMake](https://cmake.org/) — **⚠️ version 3.31.x is mandatory** +- [CMake](https://cmake.org/) ```shell winget install --id=Kitware.CMake -e ``` @@ -81,14 +81,18 @@ How to building with Visual Studio 2022 on Windows 64-bit. git lfs pull ``` 2. Open the appropriate command prompt: - - Visual Studio 2019: + - Visual Studio 2026: ```MD - x64 Native Tools Command Prompt for VS 2019 + x64 Native Tools Command Prompt for VS ``` - Visual Studio 2022: ```MD x64 Native Tools Command Prompt for VS 2022 ``` + - Visual Studio 2019: + ```MD + x64 Native Tools Command Prompt for VS 2019 + ``` 1. Navigate to correct drive (if needed), e.g.: ```shell N: @@ -98,16 +102,16 @@ How to building with Visual Studio 2022 on Windows 64-bit. cd N:\Repos\OrcaSlicer ``` 3. Run the build script: - - Visual Studio 2019: + - Visual Studio 2026 or 2022: ```shell - build_release.bat + build_release_vs202X.bat ``` - - Visual Studio 2022: + - Visual Studio 2019: ```shell - build_release_vs2022.bat + build_release_vs2019.bat ``` -![vs2022cmd](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/develop/vs2022cmd.png?raw=true) +![vs202Xcmd](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/develop/vs202Xcmd.png?raw=true) > [!NOTE] > The build process will take a long time depending on your system but even with high-end hardware it can take up to 40 minutes. @@ -115,13 +119,13 @@ How to building with Visual Studio 2022 on Windows 64-bit. > [!TIP] > If you encounter issues, you can try to uninstall ZLIB from your Vcpkg library. -3. If successful, you will find the Visual Studio solution file in: +1. If successful, you will find the Visual Studio solution file in: ```shell build\OrcaSlicer.sln ``` -4. Open the solution in Visual Studio, set the build configuration to `Release` and run the `Local Windows Debugger`. - ![compile_vs2022_local_debugger](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/develop/compile_vs2022_local_debugger.png?raw=true) -5. Your resulting executable will be located in: +2. Open the solution in Visual Studio, set the build configuration to `Release` and run the `Local Windows Debugger`. + ![compile_vs202X_local_debugger](https://github.com/SoftFever/OrcaSlicer/blob/main/doc/images/develop/compile_vs202X_local_debugger.png?raw=true) +3. Your resulting executable will be located in: ```shell \build\src\Release\orca-slicer.exe ``` diff --git a/doc/images/develop/compile_vs2022_local_debugger.png b/doc/images/develop/compile_vs2022_local_debugger.png deleted file mode 100644 index ea5aaee19e..0000000000 Binary files a/doc/images/develop/compile_vs2022_local_debugger.png and /dev/null differ diff --git a/doc/images/develop/compile_vs202X_local_debugger.png b/doc/images/develop/compile_vs202X_local_debugger.png new file mode 100644 index 0000000000..405b4e1ae9 Binary files /dev/null and b/doc/images/develop/compile_vs202X_local_debugger.png differ diff --git a/doc/images/develop/vs2022cmd.png b/doc/images/develop/vs2022cmd.png deleted file mode 100644 index 29b5de5152..0000000000 Binary files a/doc/images/develop/vs2022cmd.png and /dev/null differ diff --git a/doc/images/develop/vs202Xcmd.png b/doc/images/develop/vs202Xcmd.png new file mode 100644 index 0000000000..7557c5ddf3 Binary files /dev/null and b/doc/images/develop/vs202Xcmd.png differ