1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-17 03:50:03 +02:00

Merge pull request #31 from pnx/cmake_nsis

Cmake: Support for NSIS installer in CPack
This commit is contained in:
Henrik Hautakoski 2020-03-30 14:12:44 +02:00 committed by GitHub
commit a46a13db4d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 6 deletions

View file

@ -33,7 +33,7 @@ jobs:
asset_path: ${{ steps.package.outputs.filename }}
asset_content_type: application/x-deb
# Windows zip file
# Windows installer
windows:
strategy:
matrix:
@ -50,7 +50,7 @@ jobs:
} else {
$PLATFORM="${{matrix.arch}}"
}
cmake -A $PLATFORM -D OPENSSL_ROOT_DIR="$pwd/build/openssl-1.1/${{matrix.arch}}" -S . -B build
cmake -A $PLATFORM -D CPACK_GENERATOR=NSIS -S . -B build
- name: Build
run: cmake --build build --config Release
@ -58,10 +58,10 @@ jobs:
- name: Package
id: package
run: |
cmake --build build --config Release --target package
$FILE=(ls build/eosio-keygen*.zip)
cmake --build build --target package
$FILE=(ls build/*.exe)
echo "::set-output name=filename::$FILE"
echo "::set-output name=name::$(([io.fileinfo]"$FILE").basename).zip"
echo "::set-output name=name::$(([io.fileinfo]"$FILE").basename).exe"
- name: Upload
uses: actions/upload-release-asset@v1
@ -71,4 +71,4 @@ jobs:
upload_url: ${{ github.event.release.upload_url }}
asset_name: ${{ steps.package.outputs.name }}
asset_path: ${{ steps.package.outputs.filename }}
asset_content_type: application/zip
asset_content_type: application/vnd.microsoft.portable-executable

View file

@ -92,6 +92,16 @@ endif (UNIX)
# Package
# --------------------------------
if (CPACK_GENERATOR MATCHES "^[Nn][Ss][Ii][Ss]$")
set( NSIS_LICENSE_FILE ${PROJECT_BINARY_DIR}/NSIS_LICENSE )
file(WRITE ${NSIS_LICENSE_FILE} "")
foreach(file IN ITEMS LICENSE LICENSE.bitcoin)
file(READ ${CMAKE_CURRENT_LIST_DIR}/${file} content)
file(APPEND ${NSIS_LICENSE_FILE} "--- ${file}\n\n${content}\n")
endforeach()
set( CPACK_RESOURCE_FILE_LICENSE ${NSIS_LICENSE_FILE} )
endif()
set( CPACK_DEBIAN_PACKAGE_PRIORITY "optional" )
set( CPACK_DEBIAN_PACKAGE_SECTION "misc" )
set( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )