diff options
Diffstat (limited to 'Source/CPack/cmCPackNSISGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index a3b59ca..f151ff1 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -85,7 +85,7 @@ int cmCPackNSISGenerator::PackageFiles() } cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Files: " << str.str() << std::endl); - this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str().c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_FILES", str.str()); std::vector<std::string> dirs; this->GetListOfSubdirectories(this->toplevel.c_str(), dirs); std::ostringstream dstr; @@ -121,7 +121,7 @@ int cmCPackNSISGenerator::PackageFiles() } cmCPackLogger(cmCPackLog::LOG_DEBUG, "Uninstall Dirs: " << dstr.str() << std::endl); - this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str().c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_DIRECTORIES", dstr.str()); cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Configure file: " << nsisInFileName << " to " << nsisFileName @@ -151,7 +151,7 @@ int cmCPackNSISGenerator::PackageFiles() std::string installerIconCode = cmStrCat( "!define MUI_HEADERIMAGE_BITMAP \"", installerHeaderImage, "\"\n"); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_ICON_CODE", - installerIconCode.c_str()); + installerIconCode); } if (this->IsSet("CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP")) { @@ -159,7 +159,7 @@ int cmCPackNSISGenerator::PackageFiles() "!define MUI_WELCOMEFINISHPAGE_BITMAP \"", this->GetOption("CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP"), "\"\n"); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_WELCOMEFINISH_CODE", - installerBitmapCode.c_str()); + installerBitmapCode); } if (this->IsSet("CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP")) { @@ -167,7 +167,7 @@ int cmCPackNSISGenerator::PackageFiles() "!define MUI_UNWELCOMEFINISHPAGE_BITMAP \"", this->GetOption("CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP"), "\"\n"); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_UNWELCOMEFINISH_CODE", - installerBitmapCode.c_str()); + installerBitmapCode); } if (this->IsSet("CPACK_NSIS_MUI_FINISHPAGE_RUN")) { @@ -176,7 +176,7 @@ int cmCPackNSISGenerator::PackageFiles() this->GetOption("CPACK_NSIS_EXECUTABLES_DIRECTORY"), '\\', this->GetOption("CPACK_NSIS_MUI_FINISHPAGE_RUN"), "\"\n"); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_FINISHPAGE_RUN_CODE", - installerRunCode.c_str()); + installerRunCode); } if (this->IsSet("CPACK_NSIS_WELCOME_TITLE")) { @@ -184,7 +184,7 @@ int cmCPackNSISGenerator::PackageFiles() cmStrCat("!define MUI_WELCOMEPAGE_TITLE \"", this->GetOption("CPACK_NSIS_WELCOME_TITLE"), "\""); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_WELCOME_TITLE_CODE", - welcomeTitleCode.c_str()); + welcomeTitleCode); } if (this->IsSet("CPACK_NSIS_WELCOME_TITLE_3LINES")) { @@ -197,7 +197,7 @@ int cmCPackNSISGenerator::PackageFiles() cmStrCat("!define MUI_FINISHPAGE_TITLE \"", this->GetOption("CPACK_NSIS_FINISH_TITLE"), "\""); this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_FINISH_TITLE_CODE", - finishTitleCode.c_str()); + finishTitleCode); } if (this->IsSet("CPACK_NSIS_FINISH_TITLE_3LINES")) { @@ -232,15 +232,14 @@ int cmCPackNSISGenerator::PackageFiles() std::string brandingTextCode = cmStrCat("BrandingText /TRIM", brandingTextPosition, " \"", this->GetOption("CPACK_NSIS_BRANDING_TEXT"), "\"\n"); - this->SetOptionIfNotSet("CPACK_NSIS_BRANDING_TEXT_CODE", - brandingTextCode.c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_BRANDING_TEXT_CODE", brandingTextCode); } if (!this->IsSet("CPACK_NSIS_IGNORE_LICENSE_PAGE")) { std::string licenceCode = cmStrCat("!insertmacro MUI_PAGE_LICENSE \"", this->GetOption("CPACK_RESOURCE_FILE_LICENSE"), "\"\n"); - this->SetOptionIfNotSet("CPACK_NSIS_LICENSE_PAGE", licenceCode.c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_LICENSE_PAGE", licenceCode); } // Setup all of the component sections @@ -335,7 +334,7 @@ int cmCPackNSISGenerator::PackageFiles() componentDescriptions + groupDescriptions + "!insertmacro MUI_FUNCTION_DESCRIPTION_END\n"; this->SetOptionIfNotSet("CPACK_NSIS_INSTALLER_MUI_COMPONENTS_DESC", - componentDescriptions.c_str()); + componentDescriptions); } if (anyDownloadedComponents) { @@ -345,18 +344,15 @@ int cmCPackNSISGenerator::PackageFiles() } } - this->SetOptionIfNotSet("CPACK_NSIS_INSTALLATION_TYPES", - installTypesCode.c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_INSTALLATION_TYPES", installTypesCode); this->SetOptionIfNotSet("CPACK_NSIS_PAGE_COMPONENTS", "!insertmacro MUI_PAGE_COMPONENTS"); this->SetOptionIfNotSet("CPACK_NSIS_FULL_INSTALL", ""); - this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTIONS", - componentCode.c_str()); - this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTION_LIST", - sectionList.c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTIONS", componentCode); + this->SetOptionIfNotSet("CPACK_NSIS_COMPONENT_SECTION_LIST", sectionList); this->SetOptionIfNotSet("CPACK_NSIS_SECTION_SELECTED_VARS", - selectedVarsList.c_str()); - this->SetOption("CPACK_NSIS_DEFINES", defines.c_str()); + selectedVarsList); + this->SetOption("CPACK_NSIS_DEFINES", defines); } this->ConfigureFile(nsisInInstallOptions, nsisInstallOptions); @@ -511,7 +507,7 @@ int cmCPackNSISGenerator::InitializeInternal() cmCPackLogger(cmCPackLog::LOG_DEBUG, "NSIS Version: CVS " << versionRexCVS.match(1) << std::endl); } - this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath.c_str()); + this->SetOptionIfNotSet("CPACK_INSTALLER_PROGRAM", nsisPath); this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLES_DIRECTORY", "bin"); cmProp cpackPackageExecutables = this->GetOption("CPACK_PACKAGE_EXECUTABLES"); @@ -579,8 +575,8 @@ int cmCPackNSISGenerator::InitializeInternal() } this->CreateMenuLinks(str, deleteStr); - this->SetOptionIfNotSet("CPACK_NSIS_CREATE_ICONS", str.str().c_str()); - this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", deleteStr.str().c_str()); + this->SetOptionIfNotSet("CPACK_NSIS_CREATE_ICONS", str.str()); + this->SetOptionIfNotSet("CPACK_NSIS_DELETE_ICONS", deleteStr.str()); this->SetOptionIfNotSet("CPACK_NSIS_COMPRESSOR", "lzma"); |