Skip to content

Commit

Permalink
Merge pull request #945 from stephengtuggy/yet-more-0.9.x-cpack
Browse files Browse the repository at this point in the history
Yet More On Packaging - 0.9.x
  • Loading branch information
stephengtuggy authored Dec 29, 2024
2 parents f8db25b + 6924f2c commit 6b1336c
Show file tree
Hide file tree
Showing 7 changed files with 709 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Windows-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ jobs:
path: ${{github.workspace}}/build/test-results/**/*.xml

- name: Package the installer(s)
working-directory: ${{github.workspace}}/build
run: cpack -V
working-directory: ${{ github.workspace }}
run: .\script\package.ps1 -Generator ${{ matrix.cmake-generator }} -EnablePIE ${{ matrix.enable-pie }} -BuildType ${{ matrix.build-type }} -GitTag ${{ env.TAG_NAME }} -GitSha ${{ env.SHORT_SHA }}

- name: Upload the artifacts
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- macos-13
# - macos-14
compiler:
- clang
# - clang
- gcc
homebrew-gl:
- true
# - false
homebrew-al:
- true
- false
# - false

steps:

Expand Down
18 changes: 9 additions & 9 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1286,8 +1286,8 @@ INSTALL(TARGETS vegastrike-engine DESTINATION bin)
# CMake doesn't support doing symlinks directly; however,
# it's easy enough to mimic such behavior via CMake by installing
# the executable a second time using a different name.
IF (WIN32)
INSTALL(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/vegastrike-engine" RENAME vegastrike.exe DESTINATION bin)
IF (CMAKE_SYSTEM_NAME STREQUAL Windows)
INSTALL(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/vegastrike-engine.exe" RENAME vegastrike.exe DESTINATION bin)
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Darwin)
ELSE()
INSTALL(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/vegastrike-engine" RENAME vegastrike DESTINATION bin)
Expand Down Expand Up @@ -1315,22 +1315,22 @@ SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${VEGASTRIKE_PKG_VERS
SET(CPACK_SOURCE_GENERATOR "TBZ2" "TXZ")

# See https://gitlab.kitware.com/cmake/community/-/wikis/doc/cpack/PackageGenerators for generator lists
IF (WIN32 AND NOT UNIX)
MESSAGE(STATUS "Configuring Packaging for Windows (not fully implemented)")
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??
SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}\\\\icon4.ico")
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\VegaStrike.exe")
SET(CPACK_NSIS_DISPLAY_NAME "Vega Strike")
SET(CPACK_NSIS_HELP_LINK "https:\\\\vega-strike.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "https:\\\\vega-strike.org/about")
SET(CPACK_NSIS_CONTACT "TBD@vega-strike.org")
SET(CPACK_NSIS_CONTACT "maintainers@vega-strike.org")
SET(CPACK_NSIS_MODIFY_PATH ON)

# NSIS, Wix, and compressed archives (7z, Zip)
SET(CPACK_GENERATOR "NSIS")
SET(CPACK_PACKAGE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../packages")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${VEGASTRIKE_PKG_VERSION_STR}_${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${VEGASTRIKE_PKG_VERSION_STR}_Windows_${CMAKE_SYSTEM_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_EXECUTABLES "vegastrike.exe" "vegastrike-engine.exe")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Darwin)
MESSAGE(STATUS "Configuring Packaging for macOS")
Expand All @@ -1341,7 +1341,7 @@ 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${VEGASTRIKE_PKG_VERSION_STR}_${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}_v${VEGASTRIKE_PKG_VERSION_STR}_macOS_${CMAKE_SYSTEM_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
SET(CPACK_PACKAGE_EXECUTABLES "vegastrike-engine.app/Contents/MacOS/vegastrike-engine")
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL Linux)
MESSAGE(STATUS "Configuring Packaging for Linux")
Expand Down Expand Up @@ -1660,7 +1660,7 @@ ELSE ()
MESSAGE(STATUS "Configuring Packaging for Unknown Platform - \"${CMAKE_SYSTEM_NAME}\"")
# Unknown Platform --> Just do the various compressed tarballs
SET(CPACK_GENERATOR "TBZ2" "TGZ" "TXZ")
ENDIF (WIN32 AND NOT UNIX)
ENDIF ()

INCLUDE(CPack)

Expand All @@ -1673,7 +1673,7 @@ IF (INSTALL_GTEST)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.11.0
GIT_TAG v1.15.2
)

FetchContent_GetProperties(googletest)
Expand Down
Loading

0 comments on commit 6b1336c

Please sign in to comment.