Browse Source

Generate .zip installer archive via CPack on Windows

Ivan Savenko 3 months ago
parent
commit
f9a44be214
2 changed files with 8 additions and 7 deletions
  1. 7 7
      .github/workflows/github.yml
  2. 1 0
      CMakeLists.txt

+ 7 - 7
.github/workflows/github.yml

@@ -82,10 +82,10 @@ jobs:
             arch: x64
             os: windows-latest
             test: 0
-            pack: 0
+            pack: 1
             upload: 1
             pack_type: RelWithDebInfo
-            extension: exe
+            extension: zip
             before_install: msvc.sh
             preset: windows-msvc-release
             artifact_platform: x64
@@ -94,10 +94,10 @@ jobs:
             arch: x86
             os: windows-latest
             test: 0
-            pack: 0
+            pack: 1
             upload: 1
             pack_type: RelWithDebInfo
-            extension: exe
+            extension: zip
             before_install: msvc.sh
             preset: windows-msvc-release-x86
             artifact_platform: x86
@@ -106,10 +106,10 @@ jobs:
             arch: arm64
             os: windows-11-arm
             test: 0
-            pack: 0
+            pack: 1
             upload: 1
             pack_type: RelWithDebInfo
-            extension: exe
+            extension: zip
             before_install: msvc.sh
             preset: windows-msvc-release-arm64
             artifact_platform: arm64
@@ -338,7 +338,7 @@ jobs:
       if: ${{ startsWith(matrix.platform, 'msvc') }}
       uses: actions/upload-artifact@v4
       with:
-        name: ${{ env.VCMI_PACKAGE_FILE_NAME }} - ${{ matrix.platform }}
+        name: ${{ env.VCMI_PACKAGE_FILE_NAME }} - ${{ matrix.platform }} - installer
         path: |
           ${{ github.workspace }}/CI/wininstaller/Output/*.exe
 

+ 1 - 0
CMakeLists.txt

@@ -835,6 +835,7 @@ set(CPACK_PACKAGE_VENDOR "VCMI team")
 
 if(WIN32)
 	# Note: due to NSI script generation process all of the backward slashes here are useful
+	set(CPACK_GENERATOR ZIP)
 	set(CPACK_MONOLITHIC_INSTALL 1)
 	set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt")
 	set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")