summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackOSXX11Generator.cxx
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2009-01-21 16:54:30 (GMT)
committerDavid Cole <david.cole@kitware.com>2009-01-21 16:54:30 (GMT)
commitc647ed54d9c071393e95b204aac2bb975ec95fe9 (patch)
treede2b8f9c339804962fdf912d9837410cec5e3e60 /Source/CPack/cmCPackOSXX11Generator.cxx
parentd2f27558dfe6ab7c3a36b631249c9e3b89e9eb28 (diff)
downloadCMake-c647ed54d9c071393e95b204aac2bb975ec95fe9.zip
CMake-c647ed54d9c071393e95b204aac2bb975ec95fe9.tar.gz
CMake-c647ed54d9c071393e95b204aac2bb975ec95fe9.tar.bz2
BUG: Fix issue #7833: Add file extension handling to CPack generated installers for OSXX11 applications. Also modify the X11 test to build such an installer on Mac builds that test CPack and have X11 available. Thanks to Wes Turner for the patch.
Diffstat (limited to 'Source/CPack/cmCPackOSXX11Generator.cxx')
-rw-r--r--Source/CPack/cmCPackOSXX11Generator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackOSXX11Generator.cxx b/Source/CPack/cmCPackOSXX11Generator.cxx
index 6d04b6e..ba4ad22 100644
--- a/Source/CPack/cmCPackOSXX11Generator.cxx
+++ b/Source/CPack/cmCPackOSXX11Generator.cxx
@@ -89,10 +89,15 @@ int cmCPackOSXX11Generator::CompressFiles(const char* outFileName,
std::string contentsDirectory = packageDirFileName + "/Contents";
std::string resourcesDirectory = contentsDirectory + "/Resources";
std::string appDirectory = contentsDirectory + "/MacOS";
+ std::string scriptDirectory = resourcesDirectory + "/Scripts";
+ std::string resourceFileName = this->GetOption("CPACK_PACKAGE_FILE_NAME");
+ resourceFileName += ".rsrc";
const char* dir = resourcesDirectory.c_str();
const char* appdir = appDirectory.c_str();
+ const char* scrDir = scriptDirectory.c_str();
const char* contDir = contentsDirectory.c_str();
+ const char* rsrcFile = resourceFileName.c_str();
const char* iconFile = this->GetOption("CPACK_PACKAGE_ICON");
if ( iconFile )
{
@@ -124,6 +129,10 @@ int cmCPackOSXX11Generator::CompressFiles(const char* outFileName,
!this->CopyResourcePlistFile("RuntimeScript", dir) ||
!this->CopyResourcePlistFile("OSXX11.Info.plist", contDir,
"Info.plist" ) ||
+ !this->CopyResourcePlistFile("OSXX11.main.scpt", scrDir,
+ "main.scpt", true ) ||
+ !this->CopyResourcePlistFile("OSXScriptLauncher.rsrc", dir,
+ rsrcFile, true) ||
!this->CopyResourcePlistFile("OSXScriptLauncher", appdir,
this->GetOption("CPACK_PACKAGE_FILE_NAME"), true)
)