Skip to content

Commit

Permalink
Merge pull request #146 from stephengtuggy/chore/more_cpack_0.9.x
Browse files Browse the repository at this point in the history
More On Packaging -- 0.9.x
  • Loading branch information
stephengtuggy authored Jan 22, 2025
2 parents c6a0bc3 + e9cd2d4 commit 7c4061f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Windows-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: cpack -V

- name: Upload the artifacts
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gh-actions-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
ARTIFACT_EXT: 'rpm'
- FROM: 'fedora:40'
ARTIFACT_EXT: 'rpm'
- FROM: 'rockylinux:9.5'
- FROM: 'rockylinux_rockylinux:9.5'
ARTIFACT_EXT: 'rpm'

steps:
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
run: script/cibuild $FLAGS

- name: Upload the artifacts
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
continue-on-error: true

defaults:
run:
Expand Down Expand Up @@ -45,18 +44,14 @@ jobs:
echo "${TAG_NAME}"
echo "${SHORT_SHA}"
- name: Build it
- name: Build it and package it
env:
MY_OS_NAME: macos
IS_RELEASE: 1
run: script/cibuild $FLAGS

- name: Package it
working-directory: ${{github.workspace}}/build
run: cpack -V

- name: Upload the artifacts
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
18 changes: 9 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ ENDIF (DEFINED ENV{TAG_NAME})
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_${vsUTCS_PACKAGE_VERSION_STR}-Source")
SET(CPACK_SOURCE_GENERATOR "TXZ")

IF (WIN32 AND NOT UNIX)
IF (CMAKE_SYSTEM_NAME STREQUAL Windows)
MESSAGE(STATUS "Configuring Packaging for Windows")
# NSIS - See https://cmake.org/cmake/help/v3.3/module/CPackNSIS.html
# NSI bug requires at least 1 set of 4 forwards slashes??
Expand All @@ -206,7 +206,7 @@ IF (WIN32 AND NOT UNIX)

SET(CPACK_GENERATOR "NSIS")
SET(CPACK_PACKAGE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/packages")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${vsUTCS_PKG_VERSION_STR}_Windows_${CMAKE_SYSTEM_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${vsUTCS_PACKAGE_VERSION_STR}_Windows_${CMAKE_SYSTEM_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Darwin)
MESSAGE(STATUS "Configuring Packaging for macOS")
# There's a few options for MacOSX; not sure what we want to use
Expand All @@ -216,14 +216,14 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Darwin)
# PackageMaker - see https://cmake.org/cmake/help/v3.3/module/CPackPackageMaker.html
SET(CPACK_GENERATOR "DragNDrop")
SET(CPACK_PACKAGE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/packages")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${vsUTCS_PKG_VERSION_STR}_macOS_${CMAKE_SYSTEM_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${vsUTCS_PACKAGE_VERSION_STR}_macOS_${CMAKE_SYSTEM_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux)
MESSAGE("-- Configuring Packaging for Linux")
MESSAGE(STATUS "Configuring Packaging for Linux")
SET(CPACK_GENERATOR "TXZ")

# "DEB"
IF (VS_CAN_BUILD_DEB)
MESSAGE("-- Configuring Debian Packaging")
MESSAGE(STATUS "Configuring Debian Packaging")
# See https://cmake.org/cmake/help/v3.3/module/CPackDeb.html
SET(CPACK_DEBIAN_PACKAGE_NAME "vsUTCS")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "[email protected]")
Expand All @@ -239,7 +239,7 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux)

# "RPM"
IF (VS_CAN_BUILD_RPM)
MESSAGE("-- Configuring RPM Packaging")
MESSAGE(STATUS "Configuring RPM Packaging")
# See https://cmake.org/cmake/help/v3.3/module/CPackRPM.html
SET(CPACK_RPM_PACKAGE_LICENSE "GPLv3") # See ../LICENSE
SET(CPACK_RPM_PACKAGE_URL "https://www.vega-strike.org")
Expand All @@ -256,10 +256,10 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux)
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}_${vsUTCS_PACKAGE_VERSION_STR}-${LINUX_ID}-${vsUTCS_LINUX_VERSION_STR}")
SET(CPACK_GENERATOR "RPM")
ENDIF ()
ELSE (WIN32 AND NOT UNIX)
MESSAGE("-- Configuring Packaging for Unknown Platforms - \"${CMAKE_SYSTEM_NAME}\"")
ELSE ()
MESSAGE(STATUS "Configuring Packaging for Unknown Platforms - \"${CMAKE_SYSTEM_NAME}\"")
# Unknown Platform --> Just do compressed tarball
SET(CPACK_GENERATOR "TXZ")
ENDIF (WIN32 AND NOT UNIX)
ENDIF ()

INCLUDE(CPack)

0 comments on commit 7c4061f

Please sign in to comment.