MCPcopy Create free account
hub / github.com/Kitware/CMake / CustomComponentInstallDirectory

Method CustomComponentInstallDirectory

Source/CPack/cmCPackInnoSetupGenerator.cxx:1007–1036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1005}
1006
1007std::string cmCPackInnoSetupGenerator::CustomComponentInstallDirectory(
1008 cmCPackComponent const* component)
1009{
1010 cmValue outputDir = GetOption(
1011 cmStrCat("CPACK_INNOSETUP_", component->Name, "_INSTALL_DIRECTORY"));
1012 if (outputDir) {
1013 std::string destDir = cmSystemTools::ConvertToWindowsOutputPath(outputDir);
1014 cmStripSuffixIfExists(destDir, '\\');
1015
1016 /*
1017 * Add a dir instruction for the custom directory
1018 * (only once and not for Inno Setup constants ending with '}')
1019 */
1020 static std::vector<std::string> customDirectories;
1021 if (!cmHasSuffix(destDir, '}') &&
1022 std::find(customDirectories.begin(), customDirectories.end(),
1023 component->Name) == customDirectories.end()) {
1024 cmCPackInnoSetupKeyValuePairs params;
1025 params["Name"] = QuotePath(destDir);
1026 params["Components"] =
1027 CreateRecursiveComponentPath(component->Group, component->Name);
1028
1029 dirInstructions.push_back(ISKeyValueLine(params));
1030 customDirectories.push_back(component->Name);
1031 }
1032 return destDir;
1033 }
1034
1035 return "{app}";
1036}
1037
1038std::string cmCPackInnoSetupGenerator::TranslateBool(std::string const& value)
1039{

Callers

nothing calls this directly

Calls 7

cmStripSuffixIfExistsFunction · 0.85
cmHasSuffixFunction · 0.85
push_backMethod · 0.80
cmStrCatFunction · 0.50
findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected