mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-07-04 12:03:41 +02:00
Merge pull request #31 from pnx/cmake_nsis
Cmake: Support for NSIS installer in CPack
This commit is contained in:
commit
a46a13db4d
2 changed files with 16 additions and 6 deletions
12
.github/workflows/package.yml
vendored
12
.github/workflows/package.yml
vendored
|
|
@ -33,7 +33,7 @@ jobs:
|
||||||
asset_path: ${{ steps.package.outputs.filename }}
|
asset_path: ${{ steps.package.outputs.filename }}
|
||||||
asset_content_type: application/x-deb
|
asset_content_type: application/x-deb
|
||||||
|
|
||||||
# Windows zip file
|
# Windows installer
|
||||||
windows:
|
windows:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -50,7 +50,7 @@ jobs:
|
||||||
} else {
|
} else {
|
||||||
$PLATFORM="${{matrix.arch}}"
|
$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
|
- name: Build
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
|
|
@ -58,10 +58,10 @@ jobs:
|
||||||
- name: Package
|
- name: Package
|
||||||
id: package
|
id: package
|
||||||
run: |
|
run: |
|
||||||
cmake --build build --config Release --target package
|
cmake --build build --target package
|
||||||
$FILE=(ls build/eosio-keygen*.zip)
|
$FILE=(ls build/*.exe)
|
||||||
echo "::set-output name=filename::$FILE"
|
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
|
- name: Upload
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
|
@ -71,4 +71,4 @@ jobs:
|
||||||
upload_url: ${{ github.event.release.upload_url }}
|
upload_url: ${{ github.event.release.upload_url }}
|
||||||
asset_name: ${{ steps.package.outputs.name }}
|
asset_name: ${{ steps.package.outputs.name }}
|
||||||
asset_path: ${{ steps.package.outputs.filename }}
|
asset_path: ${{ steps.package.outputs.filename }}
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/vnd.microsoft.portable-executable
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,16 @@ endif (UNIX)
|
||||||
# Package
|
# 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_PRIORITY "optional" )
|
||||||
set( CPACK_DEBIAN_PACKAGE_SECTION "misc" )
|
set( CPACK_DEBIAN_PACKAGE_SECTION "misc" )
|
||||||
set( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
|
set( CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue