[cmake-developers] [PATCH 0/3] Support for multilingual SLAs for the CPack DMG generator

Levermann, Simon Simon.Levermann at governikus.de
Tue Nov 3 06:09:05 EST 2015


From: Simon Levermann <Simon.Levermann at governikus.de>

Hello,

This adds support for multilingual SLAs which are displayed when the user is trying to mount the DMG.
Multiple languages can be added via the new variables CPACK_DMG_SLA_DIR and CPACK_DMG_SLA_LANGUAGES.
For each language defined, CPack will search for a language.menu.txt and language.license.txt file in CPACK_SLA_DIR.

This patch adds a library to the deprecated Carbon Framework to CPackLib, since the functions/types required
to acquire the region code for the internal LPic data structure are only available in this old API. Apple does
not seem to be offering a replacement API for the old ScriptManager region codes.

Additional thought: One could add the language.menu.txt files for some common languages to the repository. Currently,
english is hard-coded as a string in the source code, and is still used if CPACK_RESOURCE_FILE_LICENSE is used, rather than
the new CPACK_DMG_SLA_DIR and CPACK_DMG_SLA_LANGUAGES behaviour. Is this out of scope for CMake (everything else seems to
be english-only)?

Best regards,
Simon Levermann

Simon Levermann (3):
  Add support for multilingual SLAs
  Pass string by const& instead of copying
  Remove superfluous assignment

 Source/CMakeLists.txt                      |   4 +
 Source/CPack/cmCPackDragNDropGenerator.cxx | 332 +++++++++++++++++++++++++----
 Source/CPack/cmCPackDragNDropGenerator.h   |   8 +
 3 files changed, 307 insertions(+), 37 deletions(-)

-- 
2.1.4


More information about the cmake-developers mailing list