-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cpack packaging * Enable packaging in linux * Try to pack on Windows * As well as FreeBSD * Disable packaging for FreeBSD * Add error output in Windows packaging * Disable icons for NSIS * Use the right output for NSIS build
- Loading branch information
Showing
3 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ jobs: | |
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
run: cmake -B ${{github.workspace}}\build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_PACKAGING=ON | ||
env: | ||
QT_VERSION: ${{ matrix.qtvers }} | ||
|
||
|
@@ -71,3 +71,20 @@ jobs: | |
${{github.workspace}}\build\${{env.BUILD_TYPE}}\platforms | ||
${{github.workspace}}\build\${{env.BUILD_TYPE}}\imageformats | ||
${{github.workspace}}\build\${{env.BUILD_TYPE}}\iconengines | ||
- name: Installing NSIS | ||
uses: repolevedavaj/[email protected] | ||
with: | ||
nsis-version: '3.10' | ||
|
||
- name: Packaging using NSIS | ||
run: | | ||
cd ${{github.workspace}}\build | ||
cpack -G NSIS || type ${{github.workspace}}\build\_CPack_Packages\win64\NSIS\NSISOutput.log | ||
- name: Upload a NSIS Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
# Artifact name | ||
name: QEFI Entry Manager NSIS installer for Windows Qt${{ matrix.qtvers }} | ||
path: ${{github.workspace}}\build\*.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,3 +120,57 @@ install(PROGRAMS qefientrymanager.desktop | |
install(FILES cc.inoki.qefientrymanager.png | ||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/96x96/apps | ||
) | ||
|
||
# Use CPack to generate the package(s) | ||
if(ENABLE_PACKAGING) | ||
set(CPACK_PACKAGE_NAME "qefientrymanager") | ||
set(CPACK_PACKAGE_VERSION "${QEFI_ENTRY_MANAGER_VERSION}") | ||
set(CPACK_PACKAGE_DISPLAY_NAME "EFI Entry Manager") | ||
set(CPACK_PACKAGE_CONTACT "Inoki <[email protected]>") | ||
set(CPACK_PACKAGE_HOMEPAGE_URL "https://github.com/Inokinoki/QEFIEntryManager") | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A userspace cross-platform EFI boot entry management GUI App based on Qt.") | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md") | ||
set(CPACK_PACKAGE_VENDOR "Inoki") | ||
set(CPACK_PACKAGE_LICENSE "GPL-3.0") | ||
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr") | ||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}") | ||
# For DEB | ||
set(CPACK_DEBIAN_PACKAGE_SECTION "utils") | ||
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional") | ||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "qt6-base") | ||
else() | ||
set(CPACK_DEBIAN_PACKAGE_DEPENDS "qt5-default") | ||
endif() | ||
# End DEB | ||
# For RPM | ||
set(CPACK_RPM_PACKAGE_LICENSE "GPL-3.0") | ||
set(CPACK_RPM_PACKAGE_GROUP "Applications/System") | ||
set(CPACK_RPM_PACKAGE_REQUIRES "qt5-qtbase") | ||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) | ||
set(CPACK_RPM_PACKAGE_DEPENDS "qt6-qtbase") | ||
else() | ||
set(CPACK_RPM_PACKAGE_DEPENDS "qt5-qtbase") | ||
endif() | ||
# End RPM | ||
# For NSIS | ||
set(CPACK_NSIS_PACKAGE_NAME ${CPACK_PACKAGE_NAME}) | ||
set(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_DISPLAY_NAME} ${CPACK_PACKAGE_VERSION}") | ||
set(CPACK_NSIS_PACKAGE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") | ||
set(CPACK_NSIS_CONTACT ${CPACK_PACKAGE_CONTACT}) | ||
set(CPACK_NSIS_URL ${CPACK_PACKAGE_HOMEPAGE_URL}) | ||
# NSIS is not happy with the my "icon" | ||
# set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cc.inoki.qefientrymanager.png") | ||
# set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cc.inoki.qefientrymanager.png") | ||
# End NSIS | ||
# For FreeBSD | ||
set(CPACK_FREEBSD_PACKAGE_CATEGORIES "sysutils") | ||
set(CPACK_FREEBSD_PACKAGE_ORIGIN "sysutils/qefientrymanager") | ||
if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) | ||
set(CPACK_FREEBSD_PACKAGE_DEPS "qt6") | ||
else() | ||
set(CPACK_FREEBSD_PACKAGE_DEPS "qt5") | ||
endif() | ||
# End FreeBSD | ||
include(CPack) | ||
endif() |