diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b64c618..65abc72a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,9 @@ project ("Xournal++" CXX C) ## Also update changelog in debian folder! set (PROJECT_VERSION "1.0.13") +set (CPACK_PACKAGE_VERSION_MAJOR "1") +set (CPACK_PACKAGE_VERSION_MINOR "0") +set (CPACK_PACKAGE_VERSION_PATCH "13") set (PROJECT_PACKAGE "xournalpp") set (PROJECT_STRING "${PROJECT_NAME} ${PROJECT_VERSION}") set (PROJECT_URL "https://github.com/xournalpp/xournalpp") @@ -225,8 +228,6 @@ install (DIRECTORY plugins # Install desktop shortcuts for Linux if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") message ("Installing desktop files") - # Install desktop entry - #install(FILES data/albert.desktop DESTINATION /share/applications ) # Install icons install(FILES ui/pixmaps/xournalpp.svg @@ -259,7 +260,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") install(FILES desktop/xournalpp.thumbnailer DESTINATION ${CMAKE_INSTALL_PREFIX}/share/thumbnailers) - install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/cmake/postinst configure)") + # TODO: Only package post install scripts with distro-specific packages + # Also update manual install instructions + + # install(CODE "execute_process(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/cmake/postinst configure)") endif () @@ -288,3 +292,12 @@ if (CMAKE_DEBUG_INCLUDES_LDFLAGS) message ("Include directories: ${xournalpp_INCLUDE_DIRS}") message ("LDFLAGS/LIBRARIES: ${xournalpp_LDFLAGS}") endif (CMAKE_DEBUG_INCLUDES_LDFLAGS) + + +# Packaging options +set (CPACK_OUTPUT_FILE_PREFIX packages) +set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Xournal++ - Open source hand note-taking program") +set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE") +set (CPACK_GENERATOR "TGZ") +set (CPACK_PACKAGE_INSTALL_DIRECTORY "Xournal++") +include (CPack) diff --git a/azure-pipelines/release.yml b/azure-pipelines/release.yml index 273dc660..289c3cac 100644 --- a/azure-pipelines/release.yml +++ b/azure-pipelines/release.yml @@ -5,10 +5,30 @@ pr: none stages: - stage: Release jobs: + - job: 'Linux' + pool: + vmImage: 'ubuntu-16.04' + displayName: 'Build for Linux' + condition: always() + steps: + - template: steps/build_linux.yml + parameters: + cmake_flags: '-DCMAKE_DEBUG_INCLUDES_LDFLAGS=ON -DENABLE_CPPUNIT=ON -DDEBUG_COMPILE=ON' + - bash: | + cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/staging + cmake --build . --target package + workingDirectory: ./build + displayName: 'Generate packages' + - task: PublishPipelineArtifact@1 + inputs: + artifactName: 'linux-packages' + targetPath: '$(System.DefaultWorkingDirectory)/build/packages' + displayName: 'Publish packages' - job: Windows pool: vmImage: 'vs2017-win2016' displayName: 'Build Release for Windows' + condition: always() steps: - template: steps/build_windows.yml parameters: diff --git a/azure-pipelines/steps/build_linux.yml b/azure-pipelines/steps/build_linux.yml index 87898a53..a2156263 100644 --- a/azure-pipelines/steps/build_linux.yml +++ b/azure-pipelines/steps/build_linux.yml @@ -1,4 +1,5 @@ -# Template for building Xournal++ on Linux +# Template for setting up the Ubuntu build environment and building Xournal++ on +# Ubuntu parameters: build_type: 'Debug' @@ -16,4 +17,4 @@ steps: cmake -GNinja .. -DCMAKE_BUILD_TYPE=${{ parameters.build_type}} ${{ parameters.cmake_flags }} cmake --build . workingDirectory: ./build - displayName: 'Build Xournal++' \ No newline at end of file + displayName: 'Build Xournal++' diff --git a/azure-pipelines/steps/build_windows.yml b/azure-pipelines/steps/build_windows.yml index 9c1afded..60a5b3fe 100644 --- a/azure-pipelines/steps/build_windows.yml +++ b/azure-pipelines/steps/build_windows.yml @@ -1,3 +1,5 @@ +# Template for setting up an MSYS2 environment and building Xournal++ on Windows + parameters: build_type: '' cmake_flags: '' @@ -54,4 +56,4 @@ steps: MSYS2_ARCH: x86_64 MSYSTEM: MINGW64 CHERE_INVOKING: yes - displayName: 'Build Xournal++' \ No newline at end of file + displayName: 'Build Xournal++'