From bfa2e299ae9a8687c6f13e701c87e68b9e4a5054 Mon Sep 17 00:00:00 2001 From: Richard Ulrich Date: Mon, 6 May 2013 17:21:42 +0200 Subject: CPackWIX: Add option to specify the language(s) of the installer Add option "CPACK_WIX_CULTURES". --- Modules/CPackWIX.cmake | 11 +++++++++++ Source/CPack/WiX/cmCPackWIXGenerator.cxx | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 69a181e..4f57efa 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -81,6 +81,17 @@ # CPACK_WIX_PROGRAM_MENU_FOLDER - Start menu folder name for launcher. # # If this variable is not set, it will be initialized with CPACK_PACKAGE_NAME +# +##end +##variable +# CPACK_WIX_CULTURES - Language(s) of the installer +# +# Languages are compiled into the WixUI extension library. To use them, +# simply provide the name of the culture. If you specify more than one +# culture identifier in a comma or semicolon delimited list, the first one +# that is found will be used. You can find a list of supported languages at: +# http://wix.sourceforge.net/manual-wix3/WixUI_localization.htm +# ##end #============================================================================= diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index cfb655b..373a14d 100644 --- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx +++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx @@ -100,6 +100,11 @@ bool cmCPackWIXGenerator::RunLightCommand(const std::string& objectFiles) command << " -nologo"; command << " -out " << QuotePath(packageFileNames.at(0)); command << " -ext WixUIExtension"; + const char* const cultures = GetOption("CPACK_WIX_CULTURES"); + if(cultures) + { + command << " -cultures:" << cultures; + } command << " " << objectFiles; return RunWiXCommand(command.str()); -- cgit v0.12