[cmake-commits] hoffman committed cmCPackNSISGenerator.cxx 1.25 1.26 cmCPackRPMGenerator.cxx 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 30 23:02:46 EDT 2007


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv25327/Source/CPack

Modified Files:
	cmCPackNSISGenerator.cxx cmCPackRPMGenerator.cxx 
Log Message:
ENH: cpack changes, remove the escape variable stuff as it is not needed if you provide a config file for cpack


Index: cmCPackRPMGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackRPMGenerator.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- cmCPackRPMGenerator.cxx	17 Aug 2007 13:33:29 -0000	1.4
+++ cmCPackRPMGenerator.cxx	31 Oct 2007 03:02:43 -0000	1.5
@@ -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 @@
   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;
 }
 

Index: cmCPackNSISGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackNSISGenerator.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- cmCPackNSISGenerator.cxx	29 Oct 2007 12:11:44 -0000	1.25
+++ cmCPackNSISGenerator.cxx	31 Oct 2007 03:02:43 -0000	1.26
@@ -108,6 +108,26 @@
 
   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());



More information about the Cmake-commits mailing list