diff options
author | Brad King <brad.king@kitware.com> | 2014-07-31 13:17:37 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-07-31 13:17:37 (GMT) |
commit | 2ba18f62846735a8c466f0ddfa602a18cea583f8 (patch) | |
tree | 93c8447c455dc0b0b701ad09c7cc19b8935a3565 /Source/CPack | |
parent | 9f575a26fd7019114687104c719b20ef6d26b1fe (diff) | |
parent | e7511b7fbe09a4007269992edcde2dc98144da47 (diff) | |
download | CMake-2ba18f62846735a8c466f0ddfa602a18cea583f8.zip CMake-2ba18f62846735a8c466f0ddfa602a18cea583f8.tar.gz CMake-2ba18f62846735a8c466f0ddfa602a18cea583f8.tar.bz2 |
Merge topic 'cpack-ifw-generator'
e7511b7f CPackIFW: Add package configuration variables
b2340001 CPackIFW: Document cpack_ifw_configure_component DEPENDS option
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackIFWGenerator.cxx | 70 |
1 files changed, 65 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackIFWGenerator.cxx b/Source/CPack/cmCPackIFWGenerator.cxx index 51c0f2e..3a7f539 100644 --- a/Source/CPack/cmCPackIFWGenerator.cxx +++ b/Source/CPack/cmCPackIFWGenerator.cxx @@ -680,14 +680,19 @@ int cmCPackIFWGenerator::IfwCreateConfigFile() ifwPkgName = "Your package"; } - std::string ifwPkgDescription; - if (const char *name = this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) + std::string pkgTitle; + if (const char *title = this->GetOption("CPACK_IFW_PACKAGE_TITLE")) { - ifwPkgDescription = name; + pkgTitle = title; + } + else if (const char *description = + this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) + { + pkgTitle = description; } else { - ifwPkgDescription = "Your package description"; + pkgTitle = "Your package description"; } std::string ifwPkgVersion; @@ -711,9 +716,64 @@ int cmCPackIFWGenerator::IfwCreateConfigFile() cfg << "<Installer>" << std::endl; cfg << " <Name>" << cmXMLSafe(ifwPkgName).str() << "</Name>" << std::endl; cfg << " <Version>" << ifwPkgVersion << "</Version>" << std::endl; - cfg << " <Title>" << cmXMLSafe(ifwPkgDescription).str() << "</Title>" + cfg << " <Title>" << cmXMLSafe(pkgTitle).str() << "</Title>" << std::endl; + // Publisher + std::string ifwPublisher; + if(const char *publisher = GetOption("CPACK_IFW_PACKAGE_PUBLISHER")) + { + ifwPublisher = publisher; + } + else if(const char *vendor = GetOption("CPACK_PACKAGE_VENDOR")) + { + ifwPublisher = vendor; + } + if(!ifwPublisher.empty()) + { + cfg << " <Publisher>" << cmXMLSafe(ifwPublisher).str() + << "</Publisher>" << std::endl; + } + + // ProductUrl + if(const char *url = GetOption("CPACK_IFW_PRODUCT_URL")) + { + cfg << " <ProductUrl>" << url << "</ProductUrl>" << std::endl; + } + + // ApplicationIcon + const char *pkgApplicationIcon = GetOption("CPACK_IFW_PACKAGE_ICON"); + if(pkgApplicationIcon && cmSystemTools::FileExists(pkgApplicationIcon)) + { + std::string name = cmSystemTools::GetFilenameName(pkgApplicationIcon); + std::string path = this->toplevel + "/config/" + name; + name = cmSystemTools::GetFilenameWithoutExtension(name); + cmsys::SystemTools::CopyFileIfDifferent(pkgApplicationIcon, path.data()); + cfg << " <InstallerApplicationIcon>" << name + << "</InstallerApplicationIcon>" << std::endl; + } + + // WindowIcon + const char *pkgWindowIcon = GetOption("CPACK_IFW_PACKAGE_WINDOW_ICON"); + if(pkgWindowIcon && cmSystemTools::FileExists(pkgWindowIcon)) + { + std::string name = cmSystemTools::GetFilenameName(pkgWindowIcon); + std::string path = this->toplevel + "/config/" + name; + cmsys::SystemTools::CopyFileIfDifferent(pkgWindowIcon, path.data()); + cfg << " <InstallerWindowIcon>" << name + << "</InstallerWindowIcon>" << std::endl; + } + + // Logo + const char *pkgLogo = GetOption("CPACK_IFW_PACKAGE_LOGO"); + if(pkgLogo && cmSystemTools::FileExists(pkgLogo)) + { + std::string name = cmSystemTools::GetFilenameName(pkgLogo); + std::string path = this->toplevel + "/config/" + name; + cmsys::SystemTools::CopyFileIfDifferent(pkgLogo, path.data()); + cfg << " <Logo>" << name << "</Logo>" << std::endl; + } + // Default target directory for installation if (ifwTargetDir) { |