Windows linux mac build execs#1123
Open
bruniss wants to merge 31 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds native Windows build and packaging support for Volume Cartographer (VC3D) while refactoring a few POSIX-only code paths into portable helpers.
Changes:
- Introduces cross-platform memory-mapping and AF_UNIX socket helpers, and migrates existing call sites to use them.
- Adds a Windows (MSYS2/UCRT64) CMake preset plus NSIS/ZIP packaging via CPack, and a GitHub Actions workflow to build and attach installers to releases.
- Updates build flags/options to better accommodate Windows toolchain constraints (PIC/PIE, LTO, flatboi default-off, big-obj, libbacktrace gating).
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| volume-cartographer/README.md | Documents Windows installer availability and native build steps/preset. |
| volume-cartographer/core/src/VolumePkg.cpp | Adds Windows autosave-root discovery (USERPROFILE) and guards POSIX headers. |
| volume-cartographer/core/src/UnixSocket.cpp | Implements AF_UNIX connect/close/timeout with a Windows WSAStartup path. |
| volume-cartographer/core/include/vc/core/util/UnixSocket.hpp | Declares AF_UNIX compatibility API for POSIX + Windows afunix.h. |
| volume-cartographer/core/src/MemMap.cpp | Adds portable mmap/file-mapping + anon allocation implementation. |
| volume-cartographer/core/include/vc/core/util/MemMap.hpp | Declares portable memory-mapping/anon allocation helpers and pid(). |
| volume-cartographer/core/src/SurfacePatchIndex.cpp | Replaces POSIX mmap implementation with vc::memmap wrapper. |
| volume-cartographer/core/src/QuadSurface.cpp | Makes save temp naming portable via vc::memmap::pid() and Linux-only includes. |
| volume-cartographer/core/src/NeuralTracerConnection.cpp | Switches UNIX socket connect/close to the new compat layer. |
| volume-cartographer/core/src/GridStore.cpp | Replaces mmap/htonl usage with portable memmap + endian helpers. |
| volume-cartographer/core/include/vc/core/types/ChunkedTensor.hpp | Uses memmap RW mapping helpers, safer cleanup on Windows, std::filesystem rename/remove. |
| volume-cartographer/apps/VC3D/VCAppMain.cpp | Adds vcSetEnv() to handle setenv on Windows via _putenv_s. |
| volume-cartographer/apps/VC3D/segmentation/growth/SegmentationGrower.cpp | Switches neural socket I/O to compat layer + portable timeout setting. |
| volume-cartographer/apps/VC3D/CMakeLists.txt | Marks VC3D as a GUI subsystem executable on Windows. |
| volume-cartographer/apps/src/vc_tifxyz_trim.cpp | Uses portable pid helper (removes unistd dependency). |
| volume-cartographer/apps/src/vc_lasagna_maxflow_graph.cpp | Makes /dev/null redirection portable (NUL on Windows). |
| volume-cartographer/apps/src/vc_gen_normalgrids.cpp | Uses portable anon mapping and endian helpers. |
| volume-cartographer/core/CMakeLists.txt | Adds MemMap/UnixSocket sources and links ws2_32 publicly on Windows. |
| volume-cartographer/CMakePresets.json | Adds a Windows MSYS2/UCRT64 configure/build preset. |
| volume-cartographer/CMakeLists.txt | Adjusts flags/options/deps for Windows and wires in runtime dependency packaging. |
| volume-cartographer/cmake/WindowsPackaging.cmake | Adds Windows dependency closure bundling + Qt deployment + NSIS/ZIP CPack config. |
| .github/workflows/vc3d-windows.yml | New Windows CI workflow to build/package and upload installer artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+282
to
+288
| #if defined(_WIN32) | ||
| // MSYS2's libcurl is OpenSSL-backed and its default CA bundle path | ||
| // (/ucrt64/...) doesn't exist on end-user machines, so every HTTPS | ||
| // request fails verification with an empty response. Use the Windows | ||
| // native certificate store instead (curl >= 7.71). | ||
| curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); | ||
| #endif |
Comment on lines
+463
to
+467
| #if defined(_WIN32) | ||
| // See perform(): use the Windows native cert store — the MSYS2 | ||
| // OpenSSL CA bundle path doesn't exist on end-user machines. | ||
| curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); | ||
| #endif |
Comment on lines
+27
to
+36
| if(APPLE) | ||
| # Packaged layout (cmake/MacPackaging.cmake): executables live in | ||
| # VC3D.app/Contents/MacOS, every dylib in ../Frameworks. Mach-O has no | ||
| # $ORIGIN; @loader_path is its equivalent and covers both the executables | ||
| # and dylib->dylib references (Frameworks/../Frameworks resolves to | ||
| # itself). | ||
| set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks") | ||
| else() | ||
| set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib") | ||
| endif() |
| @@ -30,16 +48,16 @@ struct AlignedBuf { | |||
| explicit AlignedBuf(std::size_t n) | |||
| // aligned_alloc requires size to be a multiple of alignment — | |||
| // c3d's C3D_ALIGN is 32 and n is always 256^3, so divisible. | |||
Comment on lines
905
to
909
| const char* ptr = requestPayload.c_str(); | ||
| size_t remaining = requestPayload.size(); | ||
| while (remaining > 0) { | ||
| ssize_t sent = ::send(sock, ptr, remaining, 0); | ||
| auto sent = ::send(sock, ptr, remaining, 0); | ||
| if (sent < 0) { |
Comment on lines
+282
to
+288
| #if defined(_WIN32) | ||
| // MSYS2's libcurl is OpenSSL-backed and its default CA bundle path | ||
| // (/ucrt64/...) doesn't exist on end-user machines, so every HTTPS | ||
| // request fails verification with an empty response. Use the Windows | ||
| // native certificate store instead (curl >= 7.71). | ||
| curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); | ||
| #endif |
Comment on lines
+463
to
+467
| #if defined(_WIN32) | ||
| // See perform(): use the Windows native cert store — the MSYS2 | ||
| // OpenSSL CA bundle path doesn't exist on end-user machines. | ||
| curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); | ||
| #endif |
Comment on lines
+282
to
+288
| #if defined(_WIN32) | ||
| // MSYS2's libcurl is OpenSSL-backed and its default CA bundle path | ||
| // (/ucrt64/...) doesn't exist on end-user machines, so every HTTPS | ||
| // request fails verification with an empty response. Use the Windows | ||
| // native certificate store instead (curl >= 7.71). | ||
| curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); | ||
| #endif |
Comment on lines
+463
to
+467
| #if defined(_WIN32) | ||
| // See perform(): use the Windows native cert store — the MSYS2 | ||
| // OpenSSL CA bundle path doesn't exist on end-user machines. | ||
| curl_easy_setopt(curl, CURLOPT_SSL_OPTIONS, CURLSSLOPT_NATIVE_CA); | ||
| #endif |
Comment on lines
+158
to
+161
| if (( use_ccache )); then | ||
| extra_cmake_args+=("-DVC_USE_CCACHE=ON") | ||
| ccache --zero-stats | ||
| fi |
Comment on lines
+86
to
88
| # macOS compile is a hard gate (parity with the Ubuntu Release cells). | ||
| # Smoke + toolchain-verifier run in a separate job that is non-blocking for | ||
| # now; promote that to a gate once it's been stable for a while. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.