ENH: Handle unusual path for packagemaker
This commit is contained in:
parent
a980fdc96a
commit
fbfbe4717f
@ -146,14 +146,20 @@ int cmCPackPackageMakerGenerator::Initialize(const char* name, cmMakefile* mf)
|
|||||||
std::string pkgPath
|
std::string pkgPath
|
||||||
= "/Developer/Applications/Utilities/PackageMaker.app/Contents";
|
= "/Developer/Applications/Utilities/PackageMaker.app/Contents";
|
||||||
std::string versionFile = pkgPath + "/version.plist";
|
std::string versionFile = pkgPath + "/version.plist";
|
||||||
pkgPath += "/MacOS";
|
|
||||||
if ( !cmSystemTools::FileExists(versionFile.c_str()) )
|
if ( !cmSystemTools::FileExists(versionFile.c_str()) )
|
||||||
|
{
|
||||||
|
pkgPath = "/Developer/Applications/PackageMaker.app/Contents";
|
||||||
|
std::string newVersionFile = pkgPath + "/version.plist";
|
||||||
|
if ( !cmSystemTools::FileExists(newVersionFile.c_str()) )
|
||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
cmCPackLogger(cmCPackLog::LOG_ERROR,
|
||||||
"Cannot find PackageMaker compiler version file: "
|
"Cannot find PackageMaker compiler version file: "
|
||||||
<< versionFile.c_str() << std::endl);
|
<< versionFile.c_str() << " or " << newVersionFile.c_str()
|
||||||
|
<< std::endl);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
versionFile = newVersionFile;
|
||||||
|
}
|
||||||
std::ifstream ifs(versionFile.c_str());
|
std::ifstream ifs(versionFile.c_str());
|
||||||
if ( !ifs )
|
if ( !ifs )
|
||||||
{
|
{
|
||||||
@ -199,6 +205,7 @@ int cmCPackPackageMakerGenerator::Initialize(const char* name, cmMakefile* mf)
|
|||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "PackageMaker version is: "
|
||||||
<< this->PackageMakerVersion << std::endl);
|
<< this->PackageMakerVersion << std::endl);
|
||||||
|
|
||||||
|
pkgPath += "/MacOS";
|
||||||
path.push_back(pkgPath);
|
path.push_back(pkgPath);
|
||||||
pkgPath = cmSystemTools::FindProgram("PackageMaker", path, false);
|
pkgPath = cmSystemTools::FindProgram("PackageMaker", path, false);
|
||||||
if ( pkgPath.empty() )
|
if ( pkgPath.empty() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user