Reconcile volrover2→libcvc migration into master + dual-series (v2/v3) releases - #18
Open
transfix wants to merge 39 commits into
Open
Reconcile volrover2→libcvc migration into master + dual-series (v2/v3) releases#18transfix wants to merge 39 commits into
transfix wants to merge 39 commits into
Conversation
- Add src/volutils/ with unified CLI for volume/geometry operations powered by libcvc (volume_ops, geometry_file_io, algorithm) - Add FetchContent dependency on libcvc from GitHub - Add libcvc build option overrides (disable tests, CUDA, coverage, volrover3 when building as part of volrover) - Include <cvc/algorithm.h> for cvc::sdf support
Port 12 new commands to the unified volutils tool, bringing total from 19 to 31 commands. New commands: extract, clamp-min, difference, average, sum, interpolate, compare, bbox-shift, bbox-scale, bbox-set, fill, edge. Remove the legacy src/VolUtils/ directory containing ~75 separate executables. All useful functionality is now consolidated in the single volutils binary with subcommands.
Remove the volrover CVC static library (App.cpp, State.cpp, HDF5_Utilities.cpp) entirely. All functionality is now provided by libcvc (cvc::cvc target). Changes: - Delete src/CVC/ directory (App.cpp, State.cpp, HDF5_Utilities.cpp, CMakeLists.txt) - Remove add_subdirectory(CVC) from src/CMakeLists.txt - Convert inc/CVC/App.h to forwarding header (cvc/app.h + typedef aliases) - Convert inc/CVC/State.h to forwarding header (cvc/state.h) - Convert inc/CVC/StateObject.h to forwarding header (cvc/state_object.h) - Convert inc/CVC/config.h to forwarding header (cvc/config.h) - Remove inc/CVC/config.h.cmake (libcvc generates its own) - Replace CVC link target with cvc::cvc in VolMagick, VolumeRenderer, GeometryRenderer, and VolumeRover2 CMakeLists.txt - Update GeometryRenderer.cpp: state() -> getState(), fix _1 scope All 62 tests pass.
- VolMagick.h: Volume/Voxels default constructors use app::instance(); added Volume(Dimension, type) and Volume(Dimension, type, BoundingBox) convenience constructors - volutils/main.cpp: All cvc::volume constructions use app::instance() - volmagick_compat_test.cpp: Fixed cvc::volume construction in test
Script-driven migration (tmp/migrate_vm_calls.py): prepend cvcapp as the first argument to every call of VolMagick::readVolumeFile, writeVolumeFile, createVolumeFile, readBoundingBox, writeBoundingBox, calcGradient, volconvert across volrover's 20 source files. These now bind to the ctx-aware cvc:: overloads rather than the legacy singleton-using ones. Also added a ctx-aware std::vector<VolMagick::Volume> overload in the VolMagick.h compat header so the downstream writeVolumeFile(cvcapp, vols, filename) pattern resolves correctly.
Hand-migrated 17 sites across 6 files (VolumeFileInfo(filename) ctor and _vfi.read(filename)/volinfo.read(filename) calls) to pass cvcapp explicitly. These now bind to the ctx-aware overload rather than constructing a singleton-fallback volume_file_info.
The build/ directory was accidentally committed on the use-libcvc-volutils branch and contained files exceeding GitHub's 100MB per-file limit, silently stalling pushes. The original commits have been rewritten to drop build/; this stops future build trees from being accidentally added again.
- Rewrite 20 consumer files: <XmlRPC/X.h> -> <xmlrpc/X.h> - Replace XmlRPC CMake link target with cvc::xmlrpc in 4 CMakeLists - Drop add_subdirectory(XmlRPC) from src/CMakeLists.txt - Delete vendored src/XmlRPC/ and inc/XmlRPC/ - Enable CVC_USING_XMLRPC when configuring libcvc via FetchContent - Pin libcvc to SHA 8460b82 (includes xmlrpc install export fix)
…tion libs - Rename local file-scope 'upToPowerOfTwo' helpers to 'upToPowerOfTwoLocal' in 5 files (VolumeViewer.cpp, VolumeViewer2.cpp, VolumeGridRover.cpp, SignDistanceFunction/main.cpp, LBIE_Mesher.cpp) to avoid collision with cvc::upToPowerOfTwo now visible via libcvc/inc/cvc/utility.h. - Add cvc::xmlrpc as a link dependency to the six Segmentation libraries that include <xmlrpc/XmlRpc.h> but were not previously updated: SegMonomer, GenSeg, SegMed, SecStruct, SegCapsid, SegSubunit.
…Magick::volconvert alias, state() -> cvcstate() - CI: add libhdf5-dev/libcgal-dev/nvidia-cg-toolkit (Linux), hdf5/cgal (macOS/Windows) - Bump libcvc pin to 187ebad (hdf5_utils make_tuple qualification fix) - Replace duplicate CVC/HDF5_Utilities.h (1676 lines) with compat shim forwarding to cvc::hdf5_utils - Add VolMagick::volconvert using-declaration - Convert ~130 state() call sites in VolumeViewer2.cpp to cvcstate() macro
… BEFORE for macOS case-insensitive FS; simplify HDF5_Utilities compat shim
Pulls in: config.h generated to PROJECT_BINARY_DIR (fixes FetchContent include resolution) and CVC namespace alias in cvc/namespace.h (fixes LBIE_Mesher.cpp CVC::UInt on macOS case-insensitive FS).
- CMakeLists.txt: pin libcvc at d6e39e3 (gets PascalCase compat aliases that cvc_compat_test.cpp expects, plus MSVC _snprintf fix). - tests/volutils_cli_test.cpp: map popen/pclose to _popen/_pclose on _WIN32 and provide a WEXITSTATUS shim (since _pclose already returns the raw exit code).
'namespace CVC = cvc;' conflicted with libcvc's real nested
'namespace CVC { using namespace cvc; }'. Switch volrover's shim to
the same real-nested-namespace form so reopening CVC for typedefs
is allowed in both source trees.
Adds paired-guard sentinels to inc/CVC/{Exception,Types}.h so that libcvc's
new namespace CVC additions don't collide with this shim's definitions on
case-sensitive filesystems (Linux).
The previous paired-guard approach gated the entire Exception.h shim body,
which left 'namespace cvc' without 'typedef exception Exception' when
libcvc's inc/cvc/exception.h was processed first. Sources nested inside
'namespace cvc { ... }' that reference unqualified 'Exception' then failed
to compile.
Typedefs to the same underlying type are always safe to declare twice, so
only the CVC_DEF_EXCEPTION block (which creates distinct classes that
would be ambiguous with libcvc's identically-named CVC:: classes when
surfaced via using-directives) is gated.
The compat shim at inc/CVC/Exception.h provides 'typedef cvc::exception Exception' but is bypassed on case-insensitive filesystems (macOS APFS, Windows NTFS) because libcvc's inc/cvc/ and our inc/CVC/ collapse to the same directory — the compiler resolves <CVC/Exception.h> to libcvc's <cvc/exception.h>, never seeing our typedef. VolumeViewer2.cpp is the only TU that references unqualified Exception inside namespace cvc (5 catch sites). Add a local alias inside the namespace block so it compiles on all filesystems.
libcvc 3.1.0 removed the process-wide app::instance() singleton and
made thread_info / thread_feedback / scoped_lock / state::instance /
state_object / writeVolumeFile take an app& argument. Rather than
maintain a forest of one-typedef-per-file compat headers, fold all
of inc/CVC/{App,State,StateObject,HDF5_Utilities,BoundingBox,Dimension,
Exception,Types,Namespace,config,upToPowerOfTwo}.h into a single
volrover-side shim at inc/cvc_compat.h.
The shim:
- Re-exports libcvc names (BoundingBox, Dimension, Exception, App)
inside namespace cvc for legacy code that lives there.
- Wraps app::thread_info / thread_feedback / scoped_lock as subclasses
whose default ctors auto-supply the volrover-owned cvc::app via
volrover_app_instance() (defined in src/volrover_app_instance.cpp).
- Re-exports cvc::hdf5_utils as CVC::HDF5_Utilities with the
filename+objectpath overloads (getChildObjects/objectExists/
get|setAttribute) volrover historically relied on.
- Defines the cvcapp / cvcstate macros to route through the
volrover-owned app context.
Also:
- inc/CVC/StateObject.h dropped: GeometryRenderer and VolumeViewer2
inherit cvc::state_object<> directly with explicit
volrover_app_instance() initialisation.
- inc/CVC/CVCEvent.h moved to inc/CVCEvent.h (Qt event subclass,
not a libcvc compat layer).
- inc/CVC/log4cplus_compat.h moved to inc/log4cplus_compat.h.
- src/CVC/AppInstance.cpp moved to src/volrover_app_instance.cpp.
- All <CVC/*.h> includes across 55 files rewritten to the new paths.
Mirror libcvc 3.x release naming so consumers can pin matching pairs:
- Linux: volrover-<ver>-linux-<arch>.tar.gz (portable)
volrover-<ver>-linux-<arch>.deb (Debian/Ubuntu)
VolumeRover-<ver>-<arch>.AppImage (universal Linux)
- macOS: VolumeRover-<ver>-<arch>.dmg
VolumeRover-<ver>-macos-<arch>.zip
- Windows: VolumeRover-<ver>-windows-<arch>.zip
VolumeRover-<ver>-windows-<arch>-setup.exe
Adds an AppImage build step using linuxdeploy + linuxdeploy-plugin-qt
that produces a single-file Linux artifact. ZIP-on-macOS is now built
with ditto from the deployed .app bundle (mirrors libcvc).
generate_release_notes is set to false so re-running on an existing
tag does not clobber a hand-written release body.
cvc::app no longer has a static instance() in libcvc 3.1.0.
- src/volutils/main.cpp: replace cvc::app::instance() with a TU-local
function-static volutils_app() helper (33 call sites). Also add
the required app& argument to the volume_file_info ctor.
- tests/volmagick_compat_test.cpp: use a local cvc::app rather than
cvc::app::instance().
- inc/cvc_compat.h: make volrover_app_instance() inline so unit tests
that include the shim don't need to link a dedicated object file.
- drop src/volrover_app_instance.cpp (now redundant with the inline
definition) and remove it from src/VolumeRover2/CMakeLists.txt.
- bump libcvc FetchContent pin to v3.1.1 (4af186a) for the Windows
DLL bundling and CUDA static runtime fixes.
- tests/cvc_compat_test.cpp: include the consolidated <cvc_compat.h>
instead of the long-removed per-type CVC/*.h shims.
- inc/cvc_compat.h: add CVC::GenericBoundingBox<T> alias template
exercised by the compat test.
- inc/Contour/ipqueue.h: replace POSIX sleep(5) with an
IPQUEUE_SLEEP_SECONDS macro that maps to Sleep() on _WIN32.
- .github/workflows/{ci,release}.yml: pull vcpkg hdf5[cpp] so
H5Cpp.h is available when libcvc's HDF5 backend compiles on
Windows; bump release vcpkg cache key accordingly.
Same fix as cvc_compat_test.cpp — the per-type CVC/*.h shims were removed by the consolidation commit; switch to the single header.
Replace the bare FetchContent_Declare(libcvc GIT_REPOSITORY) call with a three-step resolver:
1. find_package(cvc CONFIG) against any pre-installed libcvc on CMAKE_PREFIX_PATH.
2. Download the libcvc-<ver>-<platform>-<config>.{tar.gz,zip} release asset, extract, then find_package against the extracted tree.
3. Fall back to FetchContent(GIT_REPOSITORY) and build from source.
volrover links cvc::xmlrpc in many subdirectories (Seg*, VolumeGridRover, CompServ, VolumeRover2, SecStruct, GenSeg). libcvc release archives <= 3.1.1 do not ship cvc::xmlrpc, so the resolver verifies the target exists before accepting a prebuilt package and falls through to the source build otherwise. The case-insensitive-FS include_directories(BEFORE) workaround is now scoped to the source-build path only.
… 3-strategy libcvc resolver
…base)" This reverts commit b2eedc2.
Prefer prebuilt libcvc release archives over source build
fix(ci): disable dpkg-shlibdeps for bundled libs; fix MSVC M_PI and WinSock
…ration with volrover3 import)
Reconciles the volrover2->libcvc migration line (restored release
generators: TGZ tarball + DEB + AppImage + DMG + macOS/Windows ZIP +
NSIS, with libcvc-matching VolumeRover-<ver> naming) with the master
additions that landed after this branch diverged:
- the VolumeRover3 application import from libcvc (volrover3/)
- cvcpkg recipes for volrover2 and volrover3 + publish workflow
- volrover2 deps provisioned from cvcpkg.org
Conflicts resolved:
- CMakeLists.txt: keep both additive post-src blocks — the unit-test
harness (VOLROVER_BUILD_TESTS) and the volrover3 gate (BUILD_VOLROVER3,
OFF by default).
- src/VolUtils/CMakeLists.txt: keep deleted — the migration replaced the
bundled src/VolUtils (uppercase) with the libcvc-backed src/volutils
(lowercase) CLI; master's Boost static/shared tweak is thus moot.
Splits the release pipeline by series so both can be published in parallel until the legacy VolumeRover 2.x line is retired (once its libs finish migrating to libcvc): - release.yml → narrowed to v2.* tags (legacy VolumeRover2) - release-volrover3.yml → new; v3.* tags (VolumeRover3) The VolumeRover3 job builds the volrover3 app (BUILD_VOLROVER3=ON) with libcvc + VTK pulled from cvcpkg.org (cvcpkg install libcvc vtk; Qt6 and the top-level tree's own deps come from the system toolchain), then packages the volrover3 CPack component into tarball/.deb/AppImage (Linux), .dmg/.zip (macOS), .zip/NSIS (Windows) — mirroring the v2 generators with matching VolumeRover3-<ver> naming. Verified locally on Linux: cvcpkg install resolves libcvc 3.2.4 + vtk 9.5.0 (+ transitive qt6) and volrover3 configures, compiles, and links against that prefix. macOS/Windows are continue-on-error until libcvc is published on cvcpkg.org for those platforms (vtk already is). A workflow_dispatch (dry_run, default true) entry allows exercising the build without cutting a release; the Release job is gated to v3.* tag pushes, so a manual run never publishes.
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.
Summary
Two coupled release-pipeline changes, converging on
release.yml:1. Reconcile the
chore/libcvc-3.2.0migration line intomaster.That branch (the volrover2 → libcvc migration) had diverged from
master(37 ahead / 9 behind) and pre-dated the
volrover3/import (#13) and thecvcpkg recipes (#15) that later landed on
master. This merges the two somastergains the migration and keeps the newer additions. It alsorestores the release-artifact generators that had regressed on
master'srelease.yml(portable.tar.gz, AppImage, macOS alt.zip) withlibcvc-matching
VolumeRover-<ver>naming.Merge conflicts resolved:
CMakeLists.txt— keep both additive post-srcblocks: the unit-testharness (
VOLROVER_BUILD_TESTS) and thevolrover3gate(
BUILD_VOLROVER3, OFF by default).src/VolUtils/CMakeLists.txt— keep deleted; the migration replaced thebundled
src/VolUtils(uppercase) with the libcvc-backedsrc/volutils(lowercase) CLI.
master's Boost static/shared tweak is thus moot.2. Split release by series (v2 / v3 tag routing) + add a VolumeRover3 release workflow.
release.yml→ narrowed tov2.*tags (legacy VolumeRover2). Retiringthe 2.x line later is just deleting this file.
release-volrover3.yml→ new;v3.*tags. Buildsvolrover3(
BUILD_VOLROVER3=ON) with libcvc + VTK pulled from cvcpkg.org(
cvcpkg install libcvc vtk; Qt6 and the top-level tree's own deps comefrom the system toolchain), then packages the
volrover3CPack componentinto tarball/
.deb/AppImage (Linux),.dmg/.zip(macOS),.zip/NSIS (Windows).Both series can now publish in parallel until 2.x is retired.
Verification
cvcpkg install libcvc vtkresolves libcvc 3.2.4 + vtk 9.5.0 (+ transitive qt6 6.8.2); volrover3
then configures, compiles, and links against that prefix
(
find_package(cvc CONFIG)→cvc::cvc, Qt6, VTK all resolve).ci.ymlon this PR exercises the reconciled VolumeRover2 build + theCMakeLists.txtmerge.Notes / follow-ups
v3.*tag is pushed — this only lands the plumbing. Aworkflow_dispatch(dry-run, default true) lets the volrover3 build beexercised without cutting a release; the Release job is gated to
v3.*tag pushes. (A brand-new
workflow_dispatchworkflow only becomesdispatchable once it's on the default branch — so the manual dry-run can
be run after this merges.)
continue-on-erroruntil libcvc ispublished on cvcpkg.org for those platforms (only linux/x86_64 is on
the catalog today; vtk is already published for linux/macos/windows).
v3.*releases are published asGitHub pre-releases.