Skip to content

Commit

Permalink
Create a CPack installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Lgt2x committed Jul 20, 2024
1 parent 3e17cae commit e06de47
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e06de47

Please sign in to comment.