summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-07-02 15:24:15 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-07-03 10:08:10 +0000
commit49d4981d5e7902489db2d4be8d4ad388fbd616bd (patch)
treed04f81ba6abb526f8fd8c6d783e5a1711c60aa72
parent184f62792ae80c68a06f8b36c750c39c830251ee (diff)
downloadmana-49d4981d5e7902489db2d4be8d4ad388fbd616bd.tar.gz
mana-49d4981d5e7902489db2d4be8d4ad388fbd616bd.tar.bz2
mana-49d4981d5e7902489db2d4be8d4ad388fbd616bd.tar.xz
mana-49d4981d5e7902489db2d4be8d4ad388fbd616bd.zip
Add Translations and Portable components to NSIS installer
As used to be available in the old manual NSIS file.
-rw-r--r--CMakeLists.txt20
-rw-r--r--po/CMakeLists.txt3
2 files changed, 22 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 115c2914..c80a5abd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
# where to look for cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/CMake/Modules)
+set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME ${PROJECT_NAME})
+
find_package(Gettext)
option(WITH_OPENGL "Enable OpenGL support" ON)
@@ -167,5 +169,23 @@ if(WIN32)
$ENV{MINGW_PREFIX}/bin/libpcre2-8-0.dll
$ENV{MINGW_PREFIX}/bin/libxmp.dll
DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ # Install portable.xml as part of an optional Portable component
+ set(CPACK_COMPONENT_PORTABLE_DISPLAY_NAME "Portable")
+ set(CPACK_COMPONENT_PORTABLE_DESCRIPTION "Portable mode. Settings and updates are stored in the installation folder.")
+ set(CPACK_COMPONENT_PORTABLE_DISABLED TRUE)
+ install(
+ FILES "${CMAKE_SOURCE_DIR}/packaging/windows/portable.xml"
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT Portable
+ )
endif()
+
+set(CPACK_COMPONENT_MANA_DISPLAY_NAME "${PROJECT_NAME}")
+set(CPACK_COMPONENT_MANA_DESCRIPTION "${PROJECT_DESCRIPTION}.")
+set(CPACK_COMPONENT_MANA_REQUIRED TRUE)
+
+set(CPACK_COMPONENT_TRANSLATIONS_DISPLAY_NAME "Translations")
+set(CPACK_COMPONENT_TRANSLATIONS_DESCRIPTION "Translations for the user interface. Without these only English will be available.")
+
include(CPack)
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
index e0cfc325..6ae6e9e0 100644
--- a/po/CMakeLists.txt
+++ b/po/CMakeLists.txt
@@ -31,7 +31,8 @@ macro(MANA_GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFileArg)
install(
FILES ${_gmoFile}
DESTINATION ${CMAKE_INSTALL_LOCALEDIR}/${_lang}/LC_MESSAGES
- RENAME ${_potBasename}.mo)
+ RENAME ${_potBasename}.mo
+ COMPONENT Translations)
set(_gmoFiles ${_gmoFiles} ${_gmoFile})
endforeach(_currentPoFile)