ENH: Use specified output file name, also detect errors during install
This commit is contained in:
parent
f219d3c263
commit
25f6a108ea
|
@ -52,7 +52,7 @@ FunctionEnd
|
||||||
|
|
||||||
;Name and file
|
;Name and file
|
||||||
Name "@CPACK_PACKAGE_NAME@ ${VERSION}"
|
Name "@CPACK_PACKAGE_NAME@ ${VERSION}"
|
||||||
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_PACKAGE_NAME@-${VERSION}-${PATCH}-win32.exe"
|
OutFile "@CPACK_TOPLEVEL_DIRECTORY@/@CPACK_OUTPUT_FILE_NAME@"
|
||||||
|
|
||||||
;--------------------------------
|
;--------------------------------
|
||||||
;Interface Settings
|
;Interface Settings
|
||||||
|
|
|
@ -50,6 +50,7 @@ int cmCPackGenericGenerator::PrepareNames()
|
||||||
tempDirectory += this->GetOption("CPACK_GENERATOR");
|
tempDirectory += this->GetOption("CPACK_GENERATOR");
|
||||||
std::string topDirectory = tempDirectory;
|
std::string topDirectory = tempDirectory;
|
||||||
|
|
||||||
|
/*
|
||||||
std::string outName = this->GetOption("CPACK_PACKAGE_NAME");
|
std::string outName = this->GetOption("CPACK_PACKAGE_NAME");
|
||||||
outName += "-";
|
outName += "-";
|
||||||
outName += this->GetOption("CPACK_PACKAGE_VERSION");
|
outName += this->GetOption("CPACK_PACKAGE_VERSION");
|
||||||
|
@ -66,11 +67,12 @@ int cmCPackGenericGenerator::PrepareNames()
|
||||||
outName += postfix;
|
outName += postfix;
|
||||||
}
|
}
|
||||||
tempDirectory += "/" + outName;
|
tempDirectory += "/" + outName;
|
||||||
|
*/
|
||||||
|
|
||||||
|
std::string outName = this->GetOption("CPACK_PACKAGE_FILE_NAME");
|
||||||
outName += ".";
|
outName += ".";
|
||||||
outName += this->GetOutputExtension();
|
outName += this->GetOutputExtension();
|
||||||
|
|
||||||
|
|
||||||
std::string installFile = this->GetOption("CPACK_PACKAGE_DIRECTORY");
|
std::string installFile = this->GetOption("CPACK_PACKAGE_DIRECTORY");
|
||||||
installFile += "/cmake_install.cmake";
|
installFile += "/cmake_install.cmake";
|
||||||
|
|
||||||
|
@ -84,7 +86,7 @@ int cmCPackGenericGenerator::PrepareNames()
|
||||||
this->SetOption("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str());
|
this->SetOption("CPACK_TEMPORARY_DIRECTORY", tempDirectory.c_str());
|
||||||
this->SetOption("CPACK_INSTALL_FILE_NAME", installFile.c_str());
|
this->SetOption("CPACK_INSTALL_FILE_NAME", installFile.c_str());
|
||||||
this->SetOption("CPACK_OUTPUT_FILE_NAME", outName.c_str());
|
this->SetOption("CPACK_OUTPUT_FILE_NAME", outName.c_str());
|
||||||
this->SetOption("CPACK_PACKAGE_FILE_NAME", destFile.c_str());
|
this->SetOption("CPACK_OUTPUT_FILE_PATH", destFile.c_str());
|
||||||
this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", outFile.c_str());
|
this->SetOption("CPACK_TEMPORARY_PACKAGE_FILE_NAME", outFile.c_str());
|
||||||
this->SetOption("CPACK_INSTALL_DIRECTORY", this->GetInstallPath());
|
this->SetOption("CPACK_INSTALL_DIRECTORY", this->GetInstallPath());
|
||||||
this->SetOption("CPACK_NATIVE_INSTALL_DIRECTORY",
|
this->SetOption("CPACK_NATIVE_INSTALL_DIRECTORY",
|
||||||
|
@ -168,6 +170,10 @@ int cmCPackGenericGenerator::InstallProject()
|
||||||
cmSystemTools::PutEnv(destDir.c_str());
|
cmSystemTools::PutEnv(destDir.c_str());
|
||||||
}
|
}
|
||||||
int res = mf->ReadListFile(0, installFile);
|
int res = mf->ReadListFile(0, installFile);
|
||||||
|
if ( cmSystemTools::GetErrorOccuredFlag() )
|
||||||
|
{
|
||||||
|
res = 0;
|
||||||
|
}
|
||||||
if ( !movable )
|
if ( !movable )
|
||||||
{
|
{
|
||||||
cmSystemTools::PutEnv("DESTDIR=");
|
cmSystemTools::PutEnv("DESTDIR=");
|
||||||
|
@ -205,7 +211,7 @@ int cmCPackGenericGenerator::ProcessGenerator()
|
||||||
|
|
||||||
const char* tempPackageFileName = this->GetOption(
|
const char* tempPackageFileName = this->GetOption(
|
||||||
"CPACK_TEMPORARY_PACKAGE_FILE_NAME");
|
"CPACK_TEMPORARY_PACKAGE_FILE_NAME");
|
||||||
const char* packageFileName = this->GetOption("CPACK_PACKAGE_FILE_NAME");
|
const char* packageFileName = this->GetOption("CPACK_OUTPUT_FILE_PATH");
|
||||||
const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
|
const char* tempDirectory = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue