Skip to content

Commit

Permalink
Build release builds properly with NMake on AppVeyor
Browse files Browse the repository at this point in the history
Add build signature to application banner text.
  • Loading branch information
qris committed Oct 3, 2018
1 parent de42b74 commit 4a85af2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions appveyor.yml
Expand Up @@ -49,6 +49,8 @@ install:
# The only way to switch between 32-bit and 64-bit compilers appears to be to append " Win64"
# to the generator name if you want a 64-bit build (x64 platform):
- ps: $env:generator_name="$($env:Generator_Base)$(if ($env:PLATFORM.equals('x64')) {' Win64'})"
# generator_args can be overridden for NMake builds, below:
- ps: $env:generator_args=""

# Remove Xamarin to remove 500 lines of junk from build logs
# http://help.appveyor.com/discussions/problems/4569-the-target-_convertpdbfiles-listed-in-a-beforetargets-attribute-at-c-does-not-exist-in-the-project-and-will-be-ignored
Expand Down Expand Up @@ -93,11 +95,13 @@ before_build:
# from defaulting to v140 (etc) which AppVeyor says causes problems on some images
# (and indeed the build often fails with errors about nonexistent toolsets).
- echo cmake -G "%generator_name%" %cmake_toolset_args% %cmake_toolset_args_2%
%generator_args%
-DBOXBACKUP_VERSION=%compiled_version%
-DSUB_CMAKE_EXTRA_ARGS="-- /verbosity:minimal"
-DPLATFORM=%sane_platform%
%APPVEYOR_BUILD_FOLDER%\infrastructure\cmake\windows
- cmake -G "%generator_name%" %cmake_toolset_args%
- cmake -G "%generator_name%" %cmake_toolset_args% %cmake_toolset_args_2%
%generator_args%
-DBOXBACKUP_VERSION=%compiled_version%
-DSUB_CMAKE_EXTRA_ARGS="-- /verbosity:minimal"
-DPLATFORM=%sane_platform%
Expand All @@ -123,9 +127,10 @@ for:

install:
- ps: $env:generator_name="NMake Makefiles"
- ps: $env:generator_args="-DCMAKE_BUILD_TYPE=$env:CONFIGURATION"

build_script:
- cmd: nmake
- cmd: nmake -DCMAKE_BUILD_TYPE=%CONFIGURATION%

on_failure:
- dir %CMAKE_UNIBUILD_DIR%\install\openssl
Expand Down
2 changes: 1 addition & 1 deletion lib/common/BannerText.h
Expand Up @@ -49,7 +49,7 @@
#define BOX_BUILD_SIGNATURE STRINGIFY2(BOX_COMPILER " " STRINGIFY2(BOX_BUILD_BITS) "bit " BOX_BUILD_TYPE)

#define BANNER_TEXT(UtilityName) \
"Box Backup " UtilityName " v" BOX_VERSION "\n" \
"Box Backup " UtilityName " v" BOX_VERSION " (" BOX_BUILD_SIGNATURE ")\n" \
"(c) Ben Summers and contributors 2003-2018"

#endif // BANNERTEXT__H
Expand Down

0 comments on commit 4a85af2

Please sign in to comment.