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 for use in creating installers.

Deploy built artifacts to GitHub Releases.
  • Loading branch information
qris committed Mar 27, 2017
1 parent 6c334b5 commit f78ace1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
20 changes: 19 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,21 @@ test_script:
on_failure:
- type %APPVEYOR_BUILD_FOLDER%\test-*.log

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

artifacts:
- path: '..\cmake\Build\boxbackup\BoxBackup-*.zip'
name: Windows Client ZIP
type: Zip
- path: '..\cmake\Build\boxbackup\BoxBackup-*.exe'
name: Windows Client Installer
type: File

deploy:
- provider: GitHub
draft: false
prerelease: true
on:
branch: master

26 changes: 26 additions & 0 deletions infrastructure/cmake/CMakeLists.txt
Expand Up @@ -235,6 +235,14 @@ 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 on Windows:
if(WIN32)
install(TARGETS ${module_name} RUNTIME
CONFIGURATIONS Release
DESTINATION "."
COMPONENT Applications)
endif()
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 +741,21 @@ 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_PACKAGE_INSTALL_DIRECTORY "Box Backup")
set(CPACK_COMPONENTS_ALL Applications)
set(CPACK_GENERATOR "ZIP;NSIS")
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)
include(CPack)

0 comments on commit f78ace1

Please sign in to comment.