diff options
author | Jannik Alber <alber.jannik@gmail.com> | 2023-07-14 19:10:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-07-17 14:30:25 (GMT) |
commit | c80190c6abc177149bfca31242a1d2eb4ca79b8f (patch) | |
tree | e377705595f728b4f47dc0d13f442a0494e6e506 /Source/CPack | |
parent | 8bcba75b1c12d69f0649e23173e3b19672b068e2 (diff) | |
download | CMake-c80190c6abc177149bfca31242a1d2eb4ca79b8f.zip CMake-c80190c6abc177149bfca31242a1d2eb4ca79b8f.tar.gz CMake-c80190c6abc177149bfca31242a1d2eb4ca79b8f.tar.bz2 |
InnoSetup: Always specify at least one component installation type
Inno Setup implicitly creates three installation types if none is
specified in the script. This causes some component features (e.g.
`REQUIRED`) to lose their functionality. Teach the generator to always
specify a "custom" installation type when using components.
Fixes: #25083
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackInnoSetupGenerator.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Source/CPack/cmCPackInnoSetupGenerator.cxx b/Source/CPack/cmCPackInnoSetupGenerator.cxx index 5d2c208..ada9a5b 100644 --- a/Source/CPack/cmCPackInnoSetupGenerator.cxx +++ b/Source/CPack/cmCPackInnoSetupGenerator.cxx @@ -583,10 +583,8 @@ bool cmCPackInnoSetupGenerator::ProcessComponents() "this script uses components }"); // Installation types - bool noTypes = true; std::vector<cmCPackInstallationType*> types(InstallationTypes.size()); for (auto& i : InstallationTypes) { - noTypes = false; types[i.second.Index - 1] = &i.second; } @@ -601,17 +599,16 @@ bool cmCPackInnoSetupGenerator::ProcessComponents() typeInstructions.push_back(ISKeyValueLine(params)); } - if (!noTypes) { - // Inno Setup requires the "custom" type - cmCPackInnoSetupKeyValuePairs params; + // Inno Setup requires the additional "custom" type + cmCPackInnoSetupKeyValuePairs customTypeParams; - params["Name"] = "\"custom\""; - params["Description"] = "\"{code:CPackGetCustomInstallationMessage}\""; - params["Flags"] = "iscustom"; + customTypeParams["Name"] = "\"custom\""; + customTypeParams["Description"] = + "\"{code:CPackGetCustomInstallationMessage}\""; + customTypeParams["Flags"] = "iscustom"; - allTypes.push_back("custom"); - typeInstructions.push_back(ISKeyValueLine(params)); - } + allTypes.push_back("custom"); + typeInstructions.push_back(ISKeyValueLine(customTypeParams)); // Components std::vector<cmCPackComponent*> downloadedComponents; |