From: Pierre Ossman Date: Thu, 16 Jul 2020 11:35:43 +0000 (+0200) Subject: Test packaging on Travis X-Git-Tag: v1.10.90~7^2~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0b1d57be3764319041cb2d9349c827e5e7db4120;p=tigervnc.git Test packaging on Travis Don't just build things, also test the various packaging. --- diff --git a/.travis.yml b/.travis.yml index b245d5ed..39174364 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ matrix: - sudo apt-get install -y libgnutls-dev libfltk1.3-dev fluid - sudo apt-get install -y libxtst-dev libxdamage-dev libxfixes-dev libxrandr-dev script: - - cmake -DCMAKE_BUILD_TYPE=Debug . && make + - cmake -DCMAKE_BUILD_TYPE=Debug . && make && make tarball - language: cpp os: windows @@ -22,6 +22,7 @@ matrix: # From https://docs.travis-ci.com/user/reference/windows/ before_install: - |- + choco install --no-progress -y innosetup [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64 choco uninstall -y mingw choco upgrade --no-progress -y msys2 @@ -36,7 +37,7 @@ matrix: export PATH=/C/tools/msys64/mingw64/bin:$PATH export MAKE=mingw32-make # so that Autotools can find it script: - - cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_C_COMPILER=gcc -DCMAKE=CXX_COMPILER=g++ . && mingw32-make + - cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MAKE_PROGRAM=mingw32-make -DCMAKE_C_COMPILER=gcc -DCMAKE=CXX_COMPILER=g++ . && mingw32-make && mingw32-make installer before_cache: - |- # https://unix.stackexchange.com/a/137322/107554 @@ -58,7 +59,7 @@ matrix: - fltk before_install: script: - - cmake -DCMAKE_BUILD_TYPE=Debug . && make + - cmake -DCMAKE_BUILD_TYPE=Debug . && make && make dmg - language: java # compile with java 8 for backwards compatibility diff --git a/cmake/BuildPackages.cmake b/cmake/BuildPackages.cmake deleted file mode 100644 index 1f251929..00000000 --- a/cmake/BuildPackages.cmake +++ /dev/null @@ -1,90 +0,0 @@ -# This file is included from the top-level CMakeLists.txt. We just store it -# here to avoid cluttering up that file. - - -# -# Windows installer (Inno Setup) -# - -if(WIN32) - -if(CMAKE_SIZEOF_VOID_P MATCHES 8) - set(INST_NAME ${CMAKE_PROJECT_NAME}64-${VERSION}) - set(INST_DEFS -DWIN64) -else() - set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}) -endif() - -set(INST_DEPS vncviewer) - -if(BUILD_WINVNC) - set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC) - if(BUILD_JAVA) - set(INST_DEPS ${INST_DEPS} java) - endif() - set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig) -endif() - -configure_file(release/tigervnc.iss.in release/tigervnc.iss) - -add_custom_target(installer - iscc -o. ${INST_DEFS} -F${INST_NAME} release/tigervnc.iss - DEPENDS ${INST_DEPS} - SOURCES release/tigervnc.iss) - -endif() # WIN32 - - -# -# Mac DMG -# - -if(APPLE) - -set(DEFAULT_OSX_X86_BUILD ${CMAKE_SOURCE_DIR}/osxx86) -set(OSX_X86_BUILD ${DEFAULT_OSX_X86_BUILD} CACHE PATH - "Directory containing 32-bit OS X build to include in universal binaries (default: ${DEFAULT_OSX_X86_BUILD})") - -configure_file(release/makemacapp.in release/makemacapp) -configure_file(release/Info.plist.in release/Info.plist) - -add_custom_target(dmg sh release/makemacapp - DEPENDS vncviewer - SOURCES release/makemacapp) - -add_custom_target(udmg sh release/makemacapp universal - DEPENDS vncviewer - SOURCES release/makemacapp) - -endif() # APPLE - - -# -# Binary tarball -# - -if(UNIX) - -configure_file(release/maketarball.in release/maketarball) - -set(TARBALL_DEPENDS vncviewer vncpasswd vncconfig) -if(BUILD_JAVA) - set(TARBALL_DEPENDS ${TARBALL_DEPENDS} java) -endif() - -add_custom_target(tarball sh release/maketarball - DEPENDS ${TARBALL_DEPENDS} - SOURCES release/maketarball) - -add_custom_target(servertarball sh release/maketarball server - DEPENDS ${TARBALL_DEPENDS} - SOURCES release/maketarball) - -endif() #UNIX - -# -# Common -# - -install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR}) -install(FILES ${CMAKE_SOURCE_DIR}/README.rst DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR}) diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt new file mode 100644 index 00000000..1f251929 --- /dev/null +++ b/release/CMakeLists.txt @@ -0,0 +1,90 @@ +# This file is included from the top-level CMakeLists.txt. We just store it +# here to avoid cluttering up that file. + + +# +# Windows installer (Inno Setup) +# + +if(WIN32) + +if(CMAKE_SIZEOF_VOID_P MATCHES 8) + set(INST_NAME ${CMAKE_PROJECT_NAME}64-${VERSION}) + set(INST_DEFS -DWIN64) +else() + set(INST_NAME ${CMAKE_PROJECT_NAME}-${VERSION}) +endif() + +set(INST_DEPS vncviewer) + +if(BUILD_WINVNC) + set(INST_DEFS ${INST_DEFS} -DBUILD_WINVNC) + if(BUILD_JAVA) + set(INST_DEPS ${INST_DEPS} java) + endif() + set(INST_DEPS ${INST_DEPS} winvnc4 wm_hooks vncconfig) +endif() + +configure_file(release/tigervnc.iss.in release/tigervnc.iss) + +add_custom_target(installer + iscc -o. ${INST_DEFS} -F${INST_NAME} release/tigervnc.iss + DEPENDS ${INST_DEPS} + SOURCES release/tigervnc.iss) + +endif() # WIN32 + + +# +# Mac DMG +# + +if(APPLE) + +set(DEFAULT_OSX_X86_BUILD ${CMAKE_SOURCE_DIR}/osxx86) +set(OSX_X86_BUILD ${DEFAULT_OSX_X86_BUILD} CACHE PATH + "Directory containing 32-bit OS X build to include in universal binaries (default: ${DEFAULT_OSX_X86_BUILD})") + +configure_file(release/makemacapp.in release/makemacapp) +configure_file(release/Info.plist.in release/Info.plist) + +add_custom_target(dmg sh release/makemacapp + DEPENDS vncviewer + SOURCES release/makemacapp) + +add_custom_target(udmg sh release/makemacapp universal + DEPENDS vncviewer + SOURCES release/makemacapp) + +endif() # APPLE + + +# +# Binary tarball +# + +if(UNIX) + +configure_file(release/maketarball.in release/maketarball) + +set(TARBALL_DEPENDS vncviewer vncpasswd vncconfig) +if(BUILD_JAVA) + set(TARBALL_DEPENDS ${TARBALL_DEPENDS} java) +endif() + +add_custom_target(tarball sh release/maketarball + DEPENDS ${TARBALL_DEPENDS} + SOURCES release/maketarball) + +add_custom_target(servertarball sh release/maketarball server + DEPENDS ${TARBALL_DEPENDS} + SOURCES release/maketarball) + +endif() #UNIX + +# +# Common +# + +install(FILES ${CMAKE_SOURCE_DIR}/LICENCE.TXT DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR}) +install(FILES ${CMAKE_SOURCE_DIR}/README.rst DESTINATION ${CMAKE_INSTALL_FULL_DOCDIR})