cmCPackIFWInstaller.cxx 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #include "cmCPackIFWInstaller.h"
  4. #include <cstddef>
  5. #include <sstream>
  6. #include <utility>
  7. #include "cmCPackIFWCommon.h"
  8. #include "cmCPackIFWGenerator.h"
  9. #include "cmCPackIFWPackage.h"
  10. #include "cmCPackIFWRepository.h"
  11. #include "cmCPackLog.h" // IWYU pragma: keep
  12. #include "cmGeneratedFileStream.h"
  13. #include "cmStringAlgorithms.h"
  14. #include "cmSystemTools.h"
  15. #include "cmValue.h"
  16. #include "cmXMLParser.h"
  17. #include "cmXMLWriter.h"
  18. cmCPackIFWInstaller::cmCPackIFWInstaller() = default;
  19. void cmCPackIFWInstaller::printSkippedOptionWarning(
  20. const std::string& optionName, const std::string& optionValue)
  21. {
  22. cmCPackIFWLogger(
  23. WARNING,
  24. "Option "
  25. << optionName << " is set to \"" << optionValue
  26. << "\" but will be skipped because the specified file does not exist."
  27. << std::endl);
  28. }
  29. void cmCPackIFWInstaller::ConfigureFromOptions()
  30. {
  31. // Name;
  32. if (cmValue optIFW_PACKAGE_NAME =
  33. this->GetOption("CPACK_IFW_PACKAGE_NAME")) {
  34. this->Name = *optIFW_PACKAGE_NAME;
  35. } else if (cmValue optPACKAGE_NAME = this->GetOption("CPACK_PACKAGE_NAME")) {
  36. this->Name = *optPACKAGE_NAME;
  37. } else {
  38. this->Name = "Your package";
  39. }
  40. // Title;
  41. if (cmValue optIFW_PACKAGE_TITLE =
  42. this->GetOption("CPACK_IFW_PACKAGE_TITLE")) {
  43. this->Title = *optIFW_PACKAGE_TITLE;
  44. } else if (cmValue optPACKAGE_DESCRIPTION_SUMMARY =
  45. this->GetOption("CPACK_PACKAGE_DESCRIPTION_SUMMARY")) {
  46. this->Title = *optPACKAGE_DESCRIPTION_SUMMARY;
  47. } else {
  48. this->Title = "Your package description";
  49. }
  50. // Version;
  51. if (cmValue option = this->GetOption("CPACK_PACKAGE_VERSION")) {
  52. this->Version = *option;
  53. } else {
  54. this->Version = "1.0.0";
  55. }
  56. // Publisher
  57. if (cmValue optIFW_PACKAGE_PUBLISHER =
  58. this->GetOption("CPACK_IFW_PACKAGE_PUBLISHER")) {
  59. this->Publisher = *optIFW_PACKAGE_PUBLISHER;
  60. } else if (cmValue optPACKAGE_VENDOR =
  61. this->GetOption("CPACK_PACKAGE_VENDOR")) {
  62. this->Publisher = *optPACKAGE_VENDOR;
  63. }
  64. // ProductUrl
  65. if (cmValue option = this->GetOption("CPACK_IFW_PRODUCT_URL")) {
  66. this->ProductUrl = *option;
  67. }
  68. // ApplicationIcon
  69. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_ICON")) {
  70. if (cmSystemTools::FileExists(option)) {
  71. this->InstallerApplicationIcon = *option;
  72. } else {
  73. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_ICON", option);
  74. }
  75. }
  76. // WindowIcon
  77. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_WINDOW_ICON")) {
  78. if (cmSystemTools::FileExists(option)) {
  79. this->InstallerWindowIcon = *option;
  80. } else {
  81. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_WINDOW_ICON", option);
  82. }
  83. }
  84. // RemoveTargetDir
  85. if (this->IsSetToOff("CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR")) {
  86. this->RemoveTargetDir = "false";
  87. } else if (this->IsOn("CPACK_IFW_PACKAGE_REMOVE_TARGET_DIR")) {
  88. this->RemoveTargetDir = "true";
  89. } else {
  90. this->RemoveTargetDir.clear();
  91. }
  92. // Logo
  93. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_LOGO")) {
  94. if (cmSystemTools::FileExists(option)) {
  95. this->Logo = *option;
  96. } else {
  97. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_LOGO", option);
  98. }
  99. }
  100. // Watermark
  101. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_WATERMARK")) {
  102. if (cmSystemTools::FileExists(option)) {
  103. this->Watermark = *option;
  104. } else {
  105. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_WATERMARK", option);
  106. }
  107. }
  108. // Banner
  109. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_BANNER")) {
  110. if (cmSystemTools::FileExists(option)) {
  111. this->Banner = *option;
  112. } else {
  113. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_BANNER", option);
  114. }
  115. }
  116. // Background
  117. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_BACKGROUND")) {
  118. if (cmSystemTools::FileExists(option)) {
  119. this->Background = *option;
  120. } else {
  121. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_BACKGROUND", option);
  122. }
  123. }
  124. // WizardStyle
  125. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_WIZARD_STYLE")) {
  126. // Setting the user value in any case
  127. this->WizardStyle = *option;
  128. // Check known values
  129. if (this->WizardStyle != "Modern" && this->WizardStyle != "Aero" &&
  130. this->WizardStyle != "Mac" && this->WizardStyle != "Classic") {
  131. cmCPackIFWLogger(
  132. WARNING,
  133. "Option CPACK_IFW_PACKAGE_WIZARD_STYLE has unknown value \""
  134. << option << "\". Expected values are: Modern, Aero, Mac, Classic."
  135. << std::endl);
  136. }
  137. }
  138. // StyleSheet
  139. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_STYLE_SHEET")) {
  140. if (cmSystemTools::FileExists(option)) {
  141. this->StyleSheet = *option;
  142. } else {
  143. this->printSkippedOptionWarning("CPACK_IFW_PACKAGE_STYLE_SHEET", option);
  144. }
  145. }
  146. // WizardDefaultWidth
  147. if (cmValue option =
  148. this->GetOption("CPACK_IFW_PACKAGE_WIZARD_DEFAULT_WIDTH")) {
  149. this->WizardDefaultWidth = *option;
  150. }
  151. // WizardDefaultHeight
  152. if (cmValue option =
  153. this->GetOption("CPACK_IFW_PACKAGE_WIZARD_DEFAULT_HEIGHT")) {
  154. this->WizardDefaultHeight = *option;
  155. }
  156. // WizardShowPageList
  157. if (cmValue option =
  158. this->GetOption("CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST")) {
  159. if (!this->IsVersionLess("4.0")) {
  160. if (this->IsSetToOff("CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST")) {
  161. this->WizardShowPageList = "false";
  162. } else if (this->IsOn("CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST")) {
  163. this->WizardShowPageList = "true";
  164. } else {
  165. this->WizardShowPageList.clear();
  166. }
  167. } else {
  168. std::string currentVersionMsg;
  169. if (this->Generator) {
  170. currentVersionMsg =
  171. "QtIFW version " + this->Generator->FrameworkVersion;
  172. } else {
  173. currentVersionMsg = "an older QtIFW version";
  174. }
  175. cmCPackIFWLogger(
  176. WARNING,
  177. "Option CPACK_IFW_PACKAGE_WIZARD_SHOW_PAGE_LIST is set to \""
  178. << option
  179. << "\", but it is only supported with QtIFW version 4.0 or later. "
  180. "It is being ignored because you are using "
  181. << currentVersionMsg << std::endl);
  182. }
  183. }
  184. // TitleColor
  185. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_TITLE_COLOR")) {
  186. this->TitleColor = *option;
  187. }
  188. // Start menu
  189. if (cmValue optIFW_START_MENU_DIR =
  190. this->GetOption("CPACK_IFW_PACKAGE_START_MENU_DIRECTORY")) {
  191. this->StartMenuDir = *optIFW_START_MENU_DIR;
  192. } else {
  193. this->StartMenuDir = this->Name;
  194. }
  195. // Default target directory for installation
  196. if (cmValue optIFW_TARGET_DIRECTORY =
  197. this->GetOption("CPACK_IFW_TARGET_DIRECTORY")) {
  198. this->TargetDir = *optIFW_TARGET_DIRECTORY;
  199. } else if (cmValue optPACKAGE_INSTALL_DIRECTORY =
  200. this->GetOption("CPACK_PACKAGE_INSTALL_DIRECTORY")) {
  201. this->TargetDir =
  202. cmStrCat("@ApplicationsDir@/", optPACKAGE_INSTALL_DIRECTORY);
  203. } else {
  204. this->TargetDir = "@RootDir@/usr/local";
  205. }
  206. // Default target directory for installation with administrator rights
  207. if (cmValue option = this->GetOption("CPACK_IFW_ADMIN_TARGET_DIRECTORY")) {
  208. this->AdminTargetDir = *option;
  209. }
  210. // Maintenance tool
  211. if (cmValue optIFW_MAINTENANCE_TOOL =
  212. this->GetOption("CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_NAME")) {
  213. this->MaintenanceToolName = *optIFW_MAINTENANCE_TOOL;
  214. }
  215. // Maintenance tool ini file
  216. if (cmValue optIFW_MAINTENANCE_TOOL_INI =
  217. this->GetOption("CPACK_IFW_PACKAGE_MAINTENANCE_TOOL_INI_FILE")) {
  218. this->MaintenanceToolIniFile = *optIFW_MAINTENANCE_TOOL_INI;
  219. }
  220. // Allow non-ASCII characters
  221. if (this->GetOption("CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS")) {
  222. if (this->IsOn("CPACK_IFW_PACKAGE_ALLOW_NON_ASCII_CHARACTERS")) {
  223. this->AllowNonAsciiCharacters = "true";
  224. } else {
  225. this->AllowNonAsciiCharacters = "false";
  226. }
  227. }
  228. // Space in path
  229. if (this->GetOption("CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH")) {
  230. if (this->IsOn("CPACK_IFW_PACKAGE_ALLOW_SPACE_IN_PATH")) {
  231. this->AllowSpaceInPath = "true";
  232. } else {
  233. this->AllowSpaceInPath = "false";
  234. }
  235. }
  236. // Control script
  237. if (cmValue optIFW_CONTROL_SCRIPT =
  238. this->GetOption("CPACK_IFW_PACKAGE_CONTROL_SCRIPT")) {
  239. this->ControlScript = *optIFW_CONTROL_SCRIPT;
  240. }
  241. // Resources
  242. if (cmValue optIFW_PACKAGE_RESOURCES =
  243. this->GetOption("CPACK_IFW_PACKAGE_RESOURCES")) {
  244. this->Resources.clear();
  245. cmExpandList(optIFW_PACKAGE_RESOURCES, this->Resources);
  246. }
  247. // ProductImages
  248. if (cmValue productImages =
  249. this->GetOption("CPACK_IFW_PACKAGE_PRODUCT_IMAGES")) {
  250. this->ProductImages.clear();
  251. cmExpandList(productImages, this->ProductImages);
  252. }
  253. }
  254. /** \class cmCPackIFWResourcesParser
  255. * \brief Helper class that parse resources form .qrc (Qt)
  256. */
  257. class cmCPackIFWResourcesParser : public cmXMLParser
  258. {
  259. public:
  260. explicit cmCPackIFWResourcesParser(cmCPackIFWInstaller* i)
  261. : installer(i)
  262. {
  263. this->path = i->Directory + "/resources";
  264. }
  265. bool ParseResource(size_t r)
  266. {
  267. this->hasFiles = false;
  268. this->hasErrors = false;
  269. this->basePath =
  270. cmSystemTools::GetFilenamePath(this->installer->Resources[r]);
  271. this->ParseFile(this->installer->Resources[r].data());
  272. return this->hasFiles && !this->hasErrors;
  273. }
  274. cmCPackIFWInstaller* installer;
  275. bool file = false;
  276. bool hasFiles = false;
  277. bool hasErrors = false;
  278. std::string path, basePath;
  279. protected:
  280. void StartElement(const std::string& name, const char** /*atts*/) override
  281. {
  282. this->file = name == "file";
  283. if (this->file) {
  284. this->hasFiles = true;
  285. }
  286. }
  287. void CharacterDataHandler(const char* data, int length) override
  288. {
  289. if (this->file) {
  290. std::string content(data, data + length);
  291. content = cmTrimWhitespace(content);
  292. std::string source = this->basePath + "/" + content;
  293. std::string destination = this->path + "/" + content;
  294. if (!cmSystemTools::CopyFileIfDifferent(source, destination)) {
  295. this->hasErrors = true;
  296. }
  297. }
  298. }
  299. void EndElement(const std::string& /*name*/) override {}
  300. };
  301. void cmCPackIFWInstaller::GenerateInstallerFile()
  302. {
  303. // Lazy directory initialization
  304. if (this->Directory.empty() && this->Generator) {
  305. this->Directory = this->Generator->toplevel;
  306. }
  307. // Output stream
  308. cmGeneratedFileStream fout(this->Directory + "/config/config.xml");
  309. cmXMLWriter xout(fout);
  310. xout.StartDocument();
  311. this->WriteGeneratedByToStrim(xout);
  312. xout.StartElement("Installer");
  313. xout.Element("Name", this->Name);
  314. xout.Element("Version", this->Version);
  315. xout.Element("Title", this->Title);
  316. if (!this->Publisher.empty()) {
  317. xout.Element("Publisher", this->Publisher);
  318. }
  319. if (!this->ProductUrl.empty()) {
  320. xout.Element("ProductUrl", this->ProductUrl);
  321. }
  322. // Logo
  323. if (!this->Logo.empty()) {
  324. std::string name = cmSystemTools::GetFilenameName(this->Logo);
  325. std::string path = this->Directory + "/config/" + name;
  326. cmsys::SystemTools::CopyFileIfDifferent(this->Logo, path);
  327. xout.Element("Logo", name);
  328. }
  329. // Banner
  330. if (!this->Banner.empty()) {
  331. std::string name = cmSystemTools::GetFilenameName(this->Banner);
  332. std::string path = this->Directory + "/config/" + name;
  333. cmsys::SystemTools::CopyFileIfDifferent(this->Banner, path);
  334. xout.Element("Banner", name);
  335. }
  336. // Watermark
  337. if (!this->Watermark.empty()) {
  338. std::string name = cmSystemTools::GetFilenameName(this->Watermark);
  339. std::string path = this->Directory + "/config/" + name;
  340. cmsys::SystemTools::CopyFileIfDifferent(this->Watermark, path);
  341. xout.Element("Watermark", name);
  342. }
  343. // Background
  344. if (!this->Background.empty()) {
  345. std::string name = cmSystemTools::GetFilenameName(this->Background);
  346. std::string path = this->Directory + "/config/" + name;
  347. cmsys::SystemTools::CopyFileIfDifferent(this->Background, path);
  348. xout.Element("Background", name);
  349. }
  350. // Attributes introduced in QtIFW 1.4.0
  351. if (!this->IsVersionLess("1.4")) {
  352. // ApplicationIcon
  353. if (!this->InstallerApplicationIcon.empty()) {
  354. std::string name =
  355. cmSystemTools::GetFilenameName(this->InstallerApplicationIcon);
  356. std::string path = this->Directory + "/config/" + name;
  357. name = cmSystemTools::GetFilenameWithoutExtension(name);
  358. cmsys::SystemTools::CopyFileIfDifferent(this->InstallerApplicationIcon,
  359. path);
  360. xout.Element("InstallerApplicationIcon", name);
  361. }
  362. // WindowIcon
  363. if (!this->InstallerWindowIcon.empty()) {
  364. std::string name =
  365. cmSystemTools::GetFilenameName(this->InstallerWindowIcon);
  366. std::string path = this->Directory + "/config/" + name;
  367. cmsys::SystemTools::CopyFileIfDifferent(this->InstallerWindowIcon, path);
  368. xout.Element("InstallerWindowIcon", name);
  369. }
  370. }
  371. // Attributes introduced in QtIFW 2.0.0
  372. if (!this->IsVersionLess("2.0")) {
  373. // WizardDefaultWidth
  374. if (!this->WizardDefaultWidth.empty()) {
  375. xout.Element("WizardDefaultWidth", this->WizardDefaultWidth);
  376. }
  377. // WizardDefaultHeight
  378. if (!this->WizardDefaultHeight.empty()) {
  379. xout.Element("WizardDefaultHeight", this->WizardDefaultHeight);
  380. }
  381. // Start menu directory
  382. if (!this->StartMenuDir.empty()) {
  383. xout.Element("StartMenuDir", this->StartMenuDir);
  384. }
  385. // Maintenance tool
  386. if (!this->MaintenanceToolName.empty()) {
  387. xout.Element("MaintenanceToolName", this->MaintenanceToolName);
  388. }
  389. // Maintenance tool ini file
  390. if (!this->MaintenanceToolIniFile.empty()) {
  391. xout.Element("MaintenanceToolIniFile", this->MaintenanceToolIniFile);
  392. }
  393. if (!this->AllowNonAsciiCharacters.empty()) {
  394. xout.Element("AllowNonAsciiCharacters", this->AllowNonAsciiCharacters);
  395. }
  396. if (!this->AllowSpaceInPath.empty()) {
  397. xout.Element("AllowSpaceInPath", this->AllowSpaceInPath);
  398. }
  399. // Control script (copy to config dir)
  400. if (!this->ControlScript.empty()) {
  401. std::string name = cmSystemTools::GetFilenameName(this->ControlScript);
  402. std::string path = this->Directory + "/config/" + name;
  403. cmsys::SystemTools::CopyFileIfDifferent(this->ControlScript, path);
  404. xout.Element("ControlScript", name);
  405. }
  406. } else {
  407. // CPack IFW default policy
  408. xout.Comment("CPack IFW default policy for QtIFW less 2.0");
  409. xout.Element("AllowNonAsciiCharacters", "true");
  410. xout.Element("AllowSpaceInPath", "true");
  411. }
  412. // Target dir
  413. if (!this->TargetDir.empty()) {
  414. xout.Element("TargetDir", this->TargetDir);
  415. }
  416. // Admin target dir
  417. if (!this->AdminTargetDir.empty()) {
  418. xout.Element("AdminTargetDir", this->AdminTargetDir);
  419. }
  420. // Remote repositories
  421. if (!this->RemoteRepositories.empty()) {
  422. xout.StartElement("RemoteRepositories");
  423. for (cmCPackIFWRepository* r : this->RemoteRepositories) {
  424. r->WriteRepositoryConfig(xout);
  425. }
  426. xout.EndElement();
  427. }
  428. // Attributes introduced in QtIFW 3.0.0
  429. if (!this->IsVersionLess("3.0")) {
  430. // WizardStyle
  431. if (!this->WizardStyle.empty()) {
  432. xout.Element("WizardStyle", this->WizardStyle);
  433. }
  434. // Stylesheet (copy to config dir)
  435. if (!this->StyleSheet.empty()) {
  436. std::string name = cmSystemTools::GetFilenameName(this->StyleSheet);
  437. std::string path = this->Directory + "/config/" + name;
  438. cmsys::SystemTools::CopyFileIfDifferent(this->StyleSheet, path);
  439. xout.Element("StyleSheet", name);
  440. }
  441. // TitleColor
  442. if (!this->TitleColor.empty()) {
  443. xout.Element("TitleColor", this->TitleColor);
  444. }
  445. }
  446. // Attributes introduced in QtIFW 4.0.0
  447. if (!this->IsVersionLess("4.0")) {
  448. // WizardShowPageList
  449. if (!this->WizardShowPageList.empty()) {
  450. xout.Element("WizardShowPageList", this->WizardShowPageList);
  451. }
  452. }
  453. if (!this->RemoveTargetDir.empty()) {
  454. xout.Element("RemoveTargetDir", this->RemoveTargetDir);
  455. }
  456. // Product images (copy to config dir)
  457. if (!this->IsVersionLess("4.0") && !this->ProductImages.empty()) {
  458. xout.StartElement("ProductImages");
  459. for (auto const& srcImg : this->ProductImages) {
  460. std::string name = cmSystemTools::GetFilenameName(srcImg);
  461. std::string dstImg = this->Directory + "/config/" + name;
  462. cmsys::SystemTools::CopyFileIfDifferent(srcImg, dstImg);
  463. xout.Element("Image", name);
  464. }
  465. xout.EndElement();
  466. }
  467. // Resources (copy to resources dir)
  468. if (!this->Resources.empty()) {
  469. std::vector<std::string> resources;
  470. cmCPackIFWResourcesParser parser(this);
  471. for (size_t i = 0; i < this->Resources.size(); i++) {
  472. if (parser.ParseResource(i)) {
  473. std::string name = cmSystemTools::GetFilenameName(this->Resources[i]);
  474. std::string path = this->Directory + "/resources/" + name;
  475. cmsys::SystemTools::CopyFileIfDifferent(this->Resources[i], path);
  476. resources.push_back(std::move(name));
  477. } else {
  478. cmCPackIFWLogger(WARNING,
  479. "Can't copy resources from \""
  480. << this->Resources[i]
  481. << "\". Resource will be skipped." << std::endl);
  482. }
  483. }
  484. this->Resources = resources;
  485. }
  486. xout.EndElement();
  487. xout.EndDocument();
  488. }
  489. void cmCPackIFWInstaller::GeneratePackageFiles()
  490. {
  491. if (this->Packages.empty() || this->Generator->IsOnePackage()) {
  492. // Generate default package
  493. cmCPackIFWPackage package;
  494. package.Generator = this->Generator;
  495. package.Installer = this;
  496. // Check package group
  497. if (cmValue option = this->GetOption("CPACK_IFW_PACKAGE_GROUP")) {
  498. package.ConfigureFromGroup(option);
  499. std::string forcedOption = "CPACK_IFW_COMPONENT_GROUP_" +
  500. cmsys::SystemTools::UpperCase(option) + "_FORCED_INSTALLATION";
  501. if (!this->GetOption(forcedOption)) {
  502. package.ForcedInstallation = "true";
  503. }
  504. } else {
  505. package.ConfigureFromOptions();
  506. }
  507. package.GeneratePackageFile();
  508. return;
  509. }
  510. // Generate packages meta information
  511. for (auto& p : this->Packages) {
  512. cmCPackIFWPackage* package = p.second;
  513. package->GeneratePackageFile();
  514. }
  515. }