diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-10-31 03:02:43 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-10-31 03:02:43 (GMT) |
commit | eb14543939343f66b236f26a5a2c892d6093c635 (patch) | |
tree | ea87cf50f22dfea34bcb37536f45c1f711ee68ed /Source/CPack | |
parent | 9bd0d0f1ed74ffbeffb2dd8bd6af6f2bd8271893 (diff) | |
download | CMake-eb14543939343f66b236f26a5a2c892d6093c635.zip CMake-eb14543939343f66b236f26a5a2c892d6093c635.tar.gz CMake-eb14543939343f66b236f26a5a2c892d6093c635.tar.bz2 |
ENH: cpack changes, remove the escape variable stuff as it is not needed if you provide a config file for cpack
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 20 | ||||
-rw-r--r-- | Source/CPack/cmCPackRPMGenerator.cxx | 26 |
2 files changed, 20 insertions, 26 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index 99618e1..3a0fd96 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -108,6 +108,26 @@ int cmCPackNSISGenerator::CompressFiles(const char* outFileName, cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << nsisInFileName << " to " << nsisFileName << std::endl); + if(this->IsSet("CPACK_NSIS_MUI_ICON") + && this->IsSet("CPACK_NSIS_MUI_UNIICON")) + { + std::string installerIconCode="!define MUI_ICON \""; + installerIconCode += this->GetOption("CPACK_NSIS_MUI_ICON"); + installerIconCode += "\"\n"; + installerIconCode += "!define MUI_UNICON \""; + installerIconCode += this->GetOption("CPACK_NSIS_MUI_ICON"); + installerIconCode += "\"\n"; + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_ICON_CODE", + installerIconCode.c_str()); + } + if(this->IsSet("CPACK_PACKAGE_ICON")) + { + std::string installerIconCode = "!define MUI_HEADERIMAGE_BITMAP \""; + installerIconCode += this->GetOption("CPACK_PACKAGE_ICON"); + installerIconCode += "\"\n"; + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_ICON_CODE", + installerIconCode.c_str()); + } this->ConfigureFile(nsisInInstallOptions.c_str(), nsisInstallOptions.c_str()); this->ConfigureFile(nsisInFileName.c_str(), nsisFileName.c_str()); diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx index 3ccb934..4816570 100644 --- a/Source/CPack/cmCPackRPMGenerator.cxx +++ b/Source/CPack/cmCPackRPMGenerator.cxx @@ -15,15 +15,8 @@ =========================================================================*/ #include "cmCPackRPMGenerator.h" - -#include "cmSystemTools.h" -#include "cmMakefile.h" -#include "cmGeneratedFileStream.h" #include "cmCPackLog.h" -#include <cmsys/SystemTools.hxx> -#include <cmsys/Glob.hxx> - //---------------------------------------------------------------------- cmCPackRPMGenerator::cmCPackRPMGenerator() { @@ -40,30 +33,11 @@ int cmCPackRPMGenerator::CompressFiles(const char* /*outFileName*/, const std::vector<std::string>& /*files*/) { this->ReadListFile("CPackRPM.cmake"); -// const char* cmakeExecutable = this->GetOption("CMAKE_COMMAND"); - if (!this->IsSet("RPMBUILD_EXECUTABLE")) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Cannot find rpmbuild" << std::endl); return 0; } - - /* FIXME we should be able to stick with RPM naming scheme - * and not following CMake naming scheme? - const char* rpmFileName = this->GetOption("RPM_FILE_NAME"); - const char* rpmDirectory = this->GetOption("RPM_DIRECTORY"); - this->SetOption("CPACK_OUTPUT_FILE_NAME",rpmFileName); - std::string rpmFilePath; - rpmFilePath += rpmDirectory; - rpmFilePath += "/"; - rpmFilePath += rpmFileName; - this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME",rpmFilePath.c_str()); - */ - // this->SetOption("CPACK_OUTPUT_FILE_PATH",rpmFilePath); - - //FIXME I think we should split CPackRPM.cmake into (at least) - // 2 differents files - return 1; } |