diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 633b70729..6de8c3cf0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,11 +3,10 @@ name: Descent 3 Build on: workflow_dispatch: push: - branches: [ "main" ] + branches: [ "*" ] paths-ignore: - '**/README.md' - '**/LICENSE' - - '**/.github/**' pull_request: branches: [ "main" ] paths-ignore: @@ -88,12 +87,15 @@ jobs: run: cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --verbose - name: Run ${{ matrix.build_type }} Unittests - run: ctest --preset ${{ matrix.os.preset }} -C ${{ matrix.build_type }} + run: ctest --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} - name: Local install # There no cmake install presets so install in traditional way run: cmake --install builds/${{ matrix.os.preset }}/ --config ${{ matrix.build_type }} + - name: Package + run: cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --target package + - name: Upload Artifacts uses: actions/upload-artifact@v4 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 0961bd45d..bb603d4b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,3 +237,19 @@ add_subdirectory(tools) add_subdirectory(netcon) add_subdirectory(netgames) add_subdirectory(scripts) + +# Game packaging +set(CPACK_PACKAGE_NAME "Descent 3 Open Source") +set(CPACK_PACKAGE_VENDOR "Descent Developpers") +set(CPACK_PACKAGE_DESCRIPTION "WARNING: This distribution does not include game data, which need to be obtained from official sources to run the game.") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Descent 3 Open Source community port") +set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/DescentDevelopers/Descent3/") +set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE) +set(CPACK_PACKAGE_FILE_NAME Descent3Installer) + +# Windows-specific installer +set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/Descent3/Descent3.ico) +set(CPACK_NSIS_WELCOME_TITLE_3LINES ON) +set(CPACK_NSIS_WELCOME_TITLE "Descent 3 Community port\\\\nWarning: This distribution does not include game data") + +include(CPack)