Skip to content

Commit

Permalink
Enable CPack to make NSIS installer for windows
Browse files Browse the repository at this point in the history
Signed-off-by: ToKiNoBug <[email protected]>
  • Loading branch information
ToKiNoBug committed Oct 30, 2023
1 parent 1927618 commit 032c64f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions cmake/cpack-configs/nsis.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is for generating .exe installer (NSIS) for Windows

# Here are all variables for NSIS generators.
# Commented variables are not used, or their default values are ok.
# Also see https://cmake.org/cmake/help/v3.20/cpack_gen/nsis.html

# The compressing method. Supported values: ZLIB, BZIP2 and LZMA
set(CPACK_NSIS_COMPRESSOR "LZMA")

# The name appears in Windows Apps & features in Control Panel
set(CPACK_NSIS_DISPLAY_NAME "Kompute")

# Ask the user whether to uninstall the previous versions
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)

# The icon of exe installer
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/docs/images/kompute.ico")

# The icon of exe uninstaller
set(CPACK_NSIS_MUI_UNIICON ${CPACK_NSIS_MUI_ICON})

set(CPACK_NSIS_URL_INFO_ABOUT "https://kompute.cc")
set(CPACK_NSIS_HELP_LINK "https://kompute.cc/overview/community.html")

#set(CPACK_NSNS_CONTACT)
#set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP)
#set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP)
8 changes: 8 additions & 0 deletions cmake/set_package_info.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ set(CPACK_PACKAGE_DESCRIPTION "General purpose GPU compute framework built on Vu
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GPGPU framework built on Vulkan.")
set(CPACK_PACKAGE_HOMEPAGE_URL "https://kompute.cc/")

# The license file used by GUI installers
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
# The readme file used by GUI installers
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")

set(CPACK_PACKAGE_INSTALL_DIRECTORY "${PROJECT_NAME}\\\\${PROJECT_VERSION}")
# set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/docs/images/kompute.jpg")

# Other common variables, in most cases they are not used,
# otherwise their default values are ok.
# Also see https://cmake.org/cmake/help/v3.20/module/CPack.html
Expand Down
Binary file added docs/images/kompute.ico
Binary file not shown.

0 comments on commit 032c64f

Please sign in to comment.