Merge topic 'wix-fix-comp-install-prop'
ecdc77f1 CPackWIX: Fix installed file property lookups when using components
This commit is contained in:
commit
c634b5d4c5
@ -911,8 +911,9 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
|
|||||||
relativeDirectoryPath = ".";
|
relativeDirectoryPath = ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
cmInstalledFile const* directoryInstalledFile =
|
cmInstalledFile const* directoryInstalledFile = this->GetInstalledFile(
|
||||||
this->GetInstalledFile(relativeDirectoryPath);
|
this->RelativePathWithoutComponentPrefix(relativeDirectoryPath)
|
||||||
|
);
|
||||||
|
|
||||||
bool emptyDirectory = dir.GetNumberOfFiles() == 2;
|
bool emptyDirectory = dir.GetNumberOfFiles() == 2;
|
||||||
bool createDirectory = false;
|
bool createDirectory = false;
|
||||||
@ -980,8 +981,9 @@ void cmCPackWIXGenerator::AddDirectoryAndFileDefinitons(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cmInstalledFile const* installedFile =
|
cmInstalledFile const* installedFile = this->GetInstalledFile(
|
||||||
this->GetInstalledFile(relativePath);
|
this->RelativePathWithoutComponentPrefix(relativePath)
|
||||||
|
);
|
||||||
|
|
||||||
if(installedFile)
|
if(installedFile)
|
||||||
{
|
{
|
||||||
@ -1230,3 +1232,16 @@ void cmCPackWIXGenerator::AddCustomFlags(
|
|||||||
stream << " " << QuotePath(*i);
|
stream << " " << QuotePath(*i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string cmCPackWIXGenerator::RelativePathWithoutComponentPrefix(
|
||||||
|
std::string const& path)
|
||||||
|
{
|
||||||
|
if(this->Components.empty())
|
||||||
|
{
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string::size_type pos = path.find('/');
|
||||||
|
|
||||||
|
return path.substr(pos + 1);
|
||||||
|
}
|
||||||
|
@ -168,6 +168,9 @@ private:
|
|||||||
void AddCustomFlags(
|
void AddCustomFlags(
|
||||||
std::string const& variableName, std::ostream& stream);
|
std::string const& variableName, std::ostream& stream);
|
||||||
|
|
||||||
|
std::string RelativePathWithoutComponentPrefix(
|
||||||
|
std::string const& path);
|
||||||
|
|
||||||
std::vector<std::string> WixSources;
|
std::vector<std::string> WixSources;
|
||||||
id_map_t PathToIdMap;
|
id_map_t PathToIdMap;
|
||||||
ambiguity_map_t IdAmbiguityCounter;
|
ambiguity_map_t IdAmbiguityCounter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user