mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
Add build of MSI packages (#1148)
This commit is contained in:
parent
e100ba8362
commit
3e9067fe8e
BIN
share/windows/wix-banner.bmp
Normal file
BIN
share/windows/wix-banner.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
BIN
share/windows/wix-dialog.bmp
Normal file
BIN
share/windows/wix-dialog.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 451 KiB |
8
share/windows/wix-patch.xml
Normal file
8
share/windows/wix-patch.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<CPackWiXPatch>
|
||||||
|
<CPackWiXFragment Id="CM_FP_KeePassXC.exe">
|
||||||
|
<Shortcut Id="CM_SP_KeePassXC.exe" Directory="ProgramMenuFolder"
|
||||||
|
Name="KeePassXC" Icon="ProductIcon.ico"
|
||||||
|
WorkingDirectory="INSTALL_ROOT" Advertise="yes" />
|
||||||
|
</CPackWiXFragment>
|
||||||
|
</CPackWiXPatch>
|
51
share/windows/wix-template.xml
Normal file
51
share/windows/wix-template.xml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?include "cpack_variables.wxi"?>
|
||||||
|
|
||||||
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||||
|
RequiredVersion="3.6.3303.0">
|
||||||
|
|
||||||
|
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
|
||||||
|
Name="$(var.CPACK_PACKAGE_NAME)"
|
||||||
|
Language="1033"
|
||||||
|
Version="$(var.CPACK_PACKAGE_VERSION)"
|
||||||
|
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
|
||||||
|
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
|
||||||
|
|
||||||
|
<Package InstallScope="perMachine" InstallerVersion="301" Compressed="yes"/>
|
||||||
|
|
||||||
|
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
|
||||||
|
|
||||||
|
<MajorUpgrade
|
||||||
|
Schedule="afterInstallInitialize"
|
||||||
|
AllowSameVersionUpgrades="yes"
|
||||||
|
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
|
||||||
|
|
||||||
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
|
||||||
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
|
||||||
|
|
||||||
|
<?ifdef CPACK_WIX_PRODUCT_ICON?>
|
||||||
|
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
|
||||||
|
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<?ifdef CPACK_WIX_UI_BANNER?>
|
||||||
|
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<?ifdef CPACK_WIX_UI_DIALOG?>
|
||||||
|
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
|
||||||
|
<?endif?>
|
||||||
|
|
||||||
|
<FeatureRef Id="ProductFeature"/>
|
||||||
|
|
||||||
|
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
|
||||||
|
|
||||||
|
<?include "properties.wxi"?>
|
||||||
|
<?include "product_fragment.wxi"?>
|
||||||
|
|
||||||
|
<DirectoryRef Id="TARGETDIR">
|
||||||
|
<Directory Id="ProgramMenuFolder" />
|
||||||
|
</DirectoryRef>
|
||||||
|
</Product>
|
||||||
|
</Wix>
|
@ -299,14 +299,21 @@ if(MINGW)
|
|||||||
set(OUTPUT_FILE_POSTFIX "Win32")
|
set(OUTPUT_FILE_POSTFIX "Win32")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_GENERATOR "ZIP;NSIS")
|
# We have to copy the license file in the configuration phase.
|
||||||
|
# CMake checks that CPACK_RESOURCE_FILE_LICENSE actually exists and
|
||||||
|
# we have to copy it because WiX needs it to have a .txt extension.
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
"${CMAKE_SOURCE_DIR}/LICENSE.GPL-2"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/INSTALLER_LICENSE.txt")
|
||||||
|
|
||||||
|
set(CPACK_GENERATOR "ZIP;NSIS;WIX")
|
||||||
set(CPACK_STRIP_FILES ON)
|
set(CPACK_STRIP_FILES ON)
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
set(CPACK_PACKAGE_FILE_NAME "${PROGNAME}-${KEEPASSXC_VERSION}-${OUTPUT_FILE_POSTFIX}")
|
||||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROGNAME})
|
||||||
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION})
|
set(CPACK_PACKAGE_VERSION ${KEEPASSXC_VERSION})
|
||||||
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
set(CPACK_PACKAGE_VENDOR "${PROGNAME} Team")
|
||||||
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
|
string(REGEX REPLACE "/" "\\\\\\\\" CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/share/windows/installer-header.bmp")
|
||||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.GPL-2")
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_BINARY_DIR}/INSTALLER_LICENSE.txt")
|
||||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||||
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
|
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
|
||||||
set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")
|
set(CPACK_NSIS_MUI_UNIICON "${CPACK_NSIS_MUI_ICON}")
|
||||||
@ -319,6 +326,13 @@ if(MINGW)
|
|||||||
set(CPACK_NSIS_DISPLAY_NAME ${PROGNAME})
|
set(CPACK_NSIS_DISPLAY_NAME ${PROGNAME})
|
||||||
set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}")
|
set(CPACK_NSIS_PACKAGE_NAME "${PROGNAME} v${KEEPASSXC_VERSION}")
|
||||||
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe")
|
set(CPACK_NSIS_MUI_FINISHPAGE_RUN "../${PROGNAME}.exe")
|
||||||
|
set(CPACK_WIX_UPGRADE_GUID 88785A72-3EAE-4F29-89E3-BC6B19BA9A5B)
|
||||||
|
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/share/windows/keepassxc.ico")
|
||||||
|
set(CPACK_WIX_UI_BANNER "${CMAKE_SOURCE_DIR}/share/windows/wix-banner.bmp")
|
||||||
|
set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/share/windows/wix-dialog.bmp")
|
||||||
|
set(CPACK_WIX_TEMPLATE "${CMAKE_SOURCE_DIR}/share/windows/wix-template.xml")
|
||||||
|
set(CPACK_WIX_PATCH_FILE "${CMAKE_SOURCE_DIR}/share/windows/wix-patch.xml")
|
||||||
|
set(CPACK_WIX_PROPERTY_ARPURLINFOABOUT "https://keepassxc.org")
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
|
||||||
install(CODE "
|
install(CODE "
|
||||||
|
Loading…
Reference in New Issue
Block a user