Add NSIS config for Windows

This commit is contained in:
Paweł Kotiuk
2021-10-22 11:05:25 +02:00
parent 251858fd97
commit 229c362261
2 changed files with 36 additions and 0 deletions

View File

@@ -690,10 +690,35 @@ It is a new fork of discontinued AntiMicro.")
COMMAND strip --strip-unneeded --remove-section=.comment --remove-section=.note "${CMAKE_CURRENT_BINARY_DIR}/bin/antimicrox" VERBATIM)
endif()
if(WIN32 AND NOT UNIX)
# We set NSIS as generator for Windows
set(CPACK_GENERATOR NSIS)
# There is a bug in NSI that does not handle full UNIX paths properly.
# Make sure there is at least one set of four backlashes.
set(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/src/icons\\\\antimicrox.ico")
set(CPACK_NSIS_MUI_ICON "${CPACK_PACKAGE_ICON}")
set(CPACK_NSIS_MUI_UNIICON "${CPACK_PACKAGE_ICON}")
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\antimicrox.exe")
set(CPACK_NSIS_DISPLAY_NAME "AntiMicroX")
set(CPACK_NSIS_PACKAGE_NAME "AntiMicroX")
set(CPACK_NSIS_HELP_LINK "http:\\\\\\\\github.com/AntiMicroX/antimicrox/wiki")
set(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\github.com/AntiMicroX/antimicrox")
set(CPACK_NSIS_MODIFY_PATH ON)
endif()
set(CPACK_PACKAGE_EXECUTABLES "antimicrox;AntiMicroX")
set(CPACK_CREATE_DESKTOP_LINKS "antimicrox")
include(CPack)
if(WIN32 AND NOT UNIX)
configure_file(
${PROJECT_SOURCE_DIR}/cmake/modules/NSIS.definitions.nsh.in
${CMAKE_CURRENT_BINARY_DIR}/assets/nsis/NSIS.definitions.nsh
)
endif()
###############################
# DOCS

View File

@@ -0,0 +1,11 @@
!define VERSION "@APP_VERSION@"
!define APP_VERSION "@APP_VERSION@"
!define APP_NAME "@APP_NAME@"
!define EXE_NAME "@EXE_NAME@"
!define README_FILE "README"
!define LICENSE_FILE "@PROJECT_SOURCE_DIR@resourcestextLICENSE"
!define MUI_ICON "@PROJECT_SOURCE_DIR@resourcesgraphics@APP_LOW_NAME@.ico"
!define MUI_UNICON "@PROJECT_SOURCE_DIR@resourcesgraphics@APP_LOW_NAME@.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "@PROJECT_SOURCE_DIR@resourcesgraphics@APP_LOW_NAME@-banner.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "@PROJECT_SOURCE_DIR@resourcesgraphics@APP_LOW_NAME@-banner.bmp"
!define PATCH "0"