freepdfeditor/cmake/packaging/Windows.cmake

24 lines
1.3 KiB
CMake

# SPDX-License-Identifier: GPL-3.0-or-later
# SPDX-FileCopyrightText: 2025 ai-ad4 and the FreePDFEditor contributors
# Windows packaging: .msi (WiX v4) and .exe (Inno Setup), plus portable .zip (§12.2).
# This scaffold configures CPack's ZIP and WIX generators; the Inno Setup .exe
# is built by packaging/windows/build-exe.iss invoked from the release pipeline.
set(CPACK_GENERATOR "ZIP;WIX")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "FreePDFEditor")
# --- .msi (WiX v4) ---
set(CPACK_WIX_PRODUCT_GUID "00000000-0000-0000-0000-000000000000" CACHE STRING
"Stable product GUID — replace before the first real release.")
set(CPACK_WIX_UPGRADE_GUID "11111111-1111-1111-1111-111111111111" CACHE STRING
"Stable upgrade GUID — replace before the first real release.")
set(CPACK_WIX_LICENSE_RTF "${CMAKE_SOURCE_DIR}/packaging/windows/license.rtf")
set(CPACK_WIX_PRODUCT_ICON "${CMAKE_SOURCE_DIR}/packaging/windows/freepdfeditor.ico")
set(CPACK_WIX_UI_DIALOG "${CMAKE_SOURCE_DIR}/packaging/windows/dialog.bmp")
set(CPACK_WIX_SKIP_WIX_UI_OFF "1")
# --- portable .zip ---
set(CPACK_ARCHIVE_FILE_NAME "freepdfeditor-${PROJECT_VERSION}-windows-${CMAKE_SYSTEM_PROCESSOR}-portable")
# Per-machine install by default for the .msi; the consumer .exe does per-user.
set(CPACK_WIX_INSTALL_SCOPE "perMachine")