Skip to content

VS 2019: v142 libs in of menu, link fixes, safer library switching - #8667

Merged
danoli3 merged 1 commit into
openframeworks:masterfrom
danoli3:vs2019-libs-of-menu
Nov 9, 2026
Merged

danoli3 merged 1 commit into
openframeworks:masterfrom
danoli3:vs2019-libs-of-menu

Conversation

@danoli3

@danoli3 danoli3 commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

The apothecary VS 2019 packages are current again (apothecary #723), but of couldn't select them and the vs2019 project couldn't link them.

Changes

Area Change
vs2019 linking Add iphlpapi.lib for current libcurl's if_nametoindex, matching vs and vs2026.
vs2019 template Add the dll/ directories so direct template builds do not fail with post-build xcopy exit 4.
of update libs Pick VS 2026 / 2022 / 2019 after the release tag, list only available packages, and remember the selection. OF_VS_LIBS selects without the menu.
of vsconfig Add a picker and 2019.vsconfig for VS 2019 16.11 and its v142 libraries.
Library switching --vs-switch clears replaced libraries and the old core lib/vs / obj/ only after new packages verify; failed downloads preserve installed libraries.
Error handling Handle multiple cached packages correctly, preserve cached downloads on failure, and report signals as interruptions.

Verified

Reported local validation used real VS 2019's MSBuild 16.11 and linker 14.29, running under x64 emulation on ARM64 Windows, with the PR branch and current vs_2019_64 libraries.

Test Debug Release
Template: clean rebuild of core and emptyExample Passed, 0 errors Passed, 0 errors
projectGeneratorCmd -pvs2019: generated project built unchanged Passed, 0 errors Passed, 0 errors
Launch all four executables Running and responding after 10 seconds Running and responding after 10 seconds

No __std_ or if_nametoindex link errors occurred.

Other check Result
Library metadata Default libraries stamped 19.29.30159; FreeImage metadata reports 3.19.31 and C++17.
Real VS Installer Fresh 2019.vsconfig installation completed in 7.4 minutes; --check reported every component present.
Generated project settings v142, vs2019 props, and generated dll/ directory confirmed.
test-download-vs-switch.sh Passed on Windows; included in the library download validation workflow.
Earlier v142 builds through VS 2022 MSBuild Core and emptyExample passed in Debug and Release.

Still untested

  • Native x64 PC hardware; these real VS 2019 tests ran on ARM64 Windows under x64 emulation.
  • ARM64 / ARM64EC build targets and allAddonsExample.
  • Visual rendering: processes responded, but no window title was reported and drawing was not visually checked.
  • Updating an older VS 2019 16.x installation; the tested install was fresh 16.11.
  • A real install through the script's new bootstrapper code path.
  • The new shell test on Linux has not been reported locally; CI provides that coverage.

Merge order

Merge this PR first. #8659 is stacked on stack/vs2019-libs-of-menu (matching this PR's head) and adds the dedicated v142 CI workflow. After this merges, rebase #8659 onto updated master and retarget it to master.

The generated-project iphlpapi.lib workaround in apothecary #723's CI can be removed after this merges.

The apothecary VS 2019 packages are current again (apothecary openframeworks#723), but
of had no way to choose them and the vs2019 project could not link them.

vs2019 project:
- Link iphlpapi.lib from the props, as vs and vs2026 do. The current
  libcurl.lib needs if_nametoindex.
- Add the dll/ folders the vs and vs2026 templates already have. Without
  them the post-build xcopy exits 4 and fails the build.

of menu:
- update libs asks which Visual Studio after the tag: 2026, 2022 or 2019,
  listing only packages on that release and marking what is installed.
  OF_VS_LIBS sets it without the menu.
- The choice is recorded, so setup and update keep that VS's libs.
- vsconfig gets a picker and scripts/vs/2019.vsconfig, which takes VS 2019
  to its final 16.11 toolset. MSVC 14.29 cannot link the 2022/2026 libs, so
  it points to the v142 libs. VS 2019 is only auto-selected when it is the
  only VS installed.

download_libs.sh:
- All VS flavours install to lib/vs. --vs-switch clears what the new
  packages replace plus the core lib/vs and obj/ built with the old
  toolset, after the packages verify, so a failed download keeps the
  installed libs. Libs not in the packages keep their headers.
- Fix the trap: `[ -e openFrameworksLibs* ]` errored with several cached
  packages. Stop deleting cached packages on failure, and report signals
  as interruptions instead of a blank line number.

Add test-download-vs-switch.sh to the library download validation workflow.
@danoli3
danoli3 merged commit d4a549b into openframeworks:master Nov 9, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant