Skip to content

windows: single-config/single-output directory#2211

Merged
BareosBot merged 12 commits intomasterfrom
windows-single-config-build
Mar 17, 2025
Merged

windows: single-config/single-output directory#2211
BareosBot merged 12 commits intomasterfrom
windows-single-config-build

Conversation

@arogge
Copy link
Member

@arogge arogge commented Mar 13, 2025

This updates the windows native build to instead of using a multi-configuration build just use a single-configuration build.
It also outputs all the binaries, libraries and plugins into a common directory structure, so maintaining DLL paths is easier (and can be handled by vcpkg itself).
As a result, the custom DLL copy mechanism, that failed ocassionally, can be removed and parallel build will not fail randomly anymore.

This also adds a check for MSVC Runtime in the installer.

Please check

  • Short description and the purpose of this PR is present above this paragraph
  • Your name is present in the AUTHORS file (optional)

If you have any questions or problems, please give a comment in the PR.

Helpful documentation and best practices

Checklist for the reviewer of the PR (will be processed by the Bareos team)

Make sure you check/merge the PR using devtools/pr-tool to have some simple automated checks run and a proper changelog record added.

General
  • Is the PR title usable as CHANGELOG entry?
  • Purpose of the PR is understood
  • Commit descriptions are understandable and well formatted
  • Required backport PRs have been created
  • Correct milestone is set
Source code quality
  • Source code changes are understandable
  • Variable and function names are meaningful
  • Code comments are correct (logically and spelling)
  • Required documentation changes are present and part of the PR
Tests
  • Decision taken that a test is required (if not, then remove this paragraph)
  • The choice of the type of test (unit test or systemtest) is reasonable
  • Testname matches exactly what is being tested
  • On a fail, output of the test leads quickly to the origin of the fault

arogge added 3 commits March 13, 2025 12:24
by enabling DEBUG_TARGET_DEPENDENCIES cmake will iterate all targets
defined within core/ and write their dependency list (including
transitives) and a summary of imported targets' properties into to
core/debug-deps within the binary directory.
as we do not yet use this, it will only add unnecessary steps to the
build that we can avoid.
Add a switch to emit all binary artifacts (i.e. programs, libraries and
plugins) into a common set of directories.
This simplifies testing on Windows as it works around the
non-availability of rpath.

This will require a few changes on the tests to work correctly, too.
arogge added 4 commits March 13, 2025 14:07
As it might be helpful to be able to output binaries to a single
directory (for Windows at least), the tests should be able to handle
the situation when the artifacts don't land in BINARY_DIR.
This patch makes use of RUNTIME_OUTPUT_DIRECTORY and
LIBRARY_OUTPUT_DIRECTORY so tests work when these are different from
BINARY_DIR.
previously builds for windows used a multi-configuration build. As this
is a lot more complex than what we do on other platforms, we allow to do
single-configuration builds, too.
This will probably break multi-configuration builds (now or later), but
we don't need those right now and can always fix them later.
as this fails occasionally when building parallel and we can achieve the
same thing a lot more reliably by using vcpkg's dll magic, we remove
this.
tune warnings flags for MSVC to be a bit more in line with what we use
on GCC/Clang. Especially, ignoring conversion warnings.
This should leave us with a set of warnings that we shoud actually work
on.
@arogge arogge force-pushed the windows-single-config-build branch 2 times, most recently from c8e677d to c1247b1 Compare March 13, 2025 13:31
arogge added 4 commits March 14, 2025 17:54
this is now called COMMON_OUTPUT_DIRECTORIES, which is hopefully easier
to understand.
this adds an extra page that will check if the Microsoft Visual C++
Redistributable is installed and will stop the installation otherwise.
@arogge arogge force-pushed the windows-single-config-build branch from c1247b1 to 854048b Compare March 17, 2025 09:02
@pstorz pstorz self-requested a review March 17, 2025 09:12
Copy link
Member

@pstorz pstorz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@pstorz pstorz changed the title Windows single-config/single-output directory windows: single-config/single-output directory Mar 17, 2025
@pstorz pstorz added this to the 25.0.0 milestone Mar 17, 2025
@arogge arogge linked an issue Mar 17, 2025 that may be closed by this pull request
@BareosBot BareosBot merged commit 5448bbb into master Mar 17, 2025
1 check was pending
@BareosBot BareosBot deleted the windows-single-config-build branch March 17, 2025 11:14
@arogge arogge mentioned this pull request Mar 25, 2025
10 tasks
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.

Bareos Windows Native build missing dependency with runtime vcc

3 participants