Skip to content

Commit

Permalink
Experimental CPack packaging
Browse files Browse the repository at this point in the history
Use OUTPUT_NAME to control executable name with install(TARGETS).

Install NSIS on AppVeyor.
  • Loading branch information
qris committed Mar 27, 2017
1 parent 6c334b5 commit 890b039
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
10 changes: 9 additions & 1 deletion appveyor.yml
Expand Up @@ -34,7 +34,7 @@ build:

install:
# test_bbackupd needs 7zip (or cmake -E tar) to extract tar archives on Windows:
- cinst -y --limit-output 7zip.commandline
- cinst -y --limit-output 7zip.commandline nsis.portable
- dir "c:\Program Files"
- dir "c:\Program Files (x86)"
# We don't need strawberryperl on AppVeyor because there is already a Perl in c:\Perl.
Expand Down Expand Up @@ -66,3 +66,11 @@ test_script:
on_failure:
- type %APPVEYOR_BUILD_FOLDER%\test-*.log

build_success:
- cmake --build . --config Release --target package

artifacts:
- path: "%APPVEYOR_BUILD_FOLDER%\..\cmake\Build\boxbackup\BoxBackup-*.zip"
- name: Windows Client ZIP
- type: Zip

21 changes: 21 additions & 0 deletions infrastructure/cmake/CMakeLists.txt
Expand Up @@ -235,6 +235,11 @@ foreach(module_dep ${module_deps})
install(PROGRAMS "$<TARGET_FILE:${module_name}>"
CONFIGURATIONS Release;RelWithDebInfo
DESTINATION "${base_dir}/release/${module_dir}")

# This target is just for use by CPack:
install(TARGETS ${module_name} RUNTIME
CONFIGURATIONS Release
DESTINATION ".")
elseif(module_name MATCHES "^test_")
string(REGEX MATCH "^test_(.*)" valid_test ${module_name})
set(test_name ${CMAKE_MATCH_1})
Expand Down Expand Up @@ -733,3 +738,19 @@ set_tests_properties(backupdiff PROPERTIES TIMEOUT 32)
set_tests_properties(bbackupd PROPERTIES TIMEOUT 1200)
set_tests_properties(s3store PROPERTIES TIMEOUT 20)
set_tests_properties(httpserver PROPERTIES TIMEOUT 40)

set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Box Backup is an open source, completely automatic, on-line backup system")
set(CPACK_PACKAGE_VENDOR "www.BoxBackup.org")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${base_dir}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${base_dir}/LICENSE.txt")
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "12")
string(TIMESTAMP date "%Y%m%d" UTC)
set(CPACK_PACKAGE_VERSION_PATCH "0_appveyor_ci")
set(CPACK_NSIS_DISPLAY_NAME "Box Backup")
set(CPACK_NSIS_HELP_LINK "http://www.boxbackup.org/")
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.boxbackup.org/")
set(CPACK_NSIS_CONTACT "boxbackup@boxbackup.org")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_GENERATOR "ZIP")
include(CPack)

0 comments on commit 890b039

Please sign in to comment.