My Project  + 80db3
header.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011-2019 Daniel Scharrer
3  *
4  * This software is provided 'as-is', without any express or implied
5  * warranty. In no event will the author(s) be held liable for any damages
6  * arising from the use of this software.
7  *
8  * Permission is granted to anyone to use this software for any purpose,
9  * including commercial applications, and to alter it and redistribute it
10  * freely, subject to the following restrictions:
11  *
12  * 1. The origin of this software must not be misrepresented; you must not
13  * claim that you wrote the original software. If you use this software
14  * in a product, an acknowledgment in the product documentation would be
15  * appreciated but is not required.
16  * 2. Altered source versions must be plainly marked as such, and must not be
17  * misrepresented as being the original software.
18  * 3. This notice may not be removed or altered from any source distribution.
19  */
20 
21 #include "setup/header.hpp"
22 
23 #include <cstdio>
24 #include <cstring>
25 
26 #include <boost/static_assert.hpp>
27 
28 #include "setup/version.hpp"
29 #include "util/load.hpp"
30 #include "util/storedenum.hpp"
31 
32 namespace setup {
33 
34 namespace {
35 
36 STORED_ENUM_MAP(stored_alpha_format, header::AlphaIgnored,
40 );
41 
42 STORED_ENUM_MAP(stored_install_verbosity, header::NormalInstallMode,
46 );
47 
48 STORED_ENUM_MAP(stored_log_mode, header::AppendLog,
52 );
53 
54 STORED_ENUM_MAP(stored_setup_style, header::ClassicStyle,
57 );
58 
59 STORED_ENUM_MAP(stored_bool_auto_no_yes, header::Auto,
61  header::No,
63 );
64 
65 // pre- 5.3.7
66 STORED_ENUM_MAP(stored_privileges_0, header::NoPrivileges,
70 );
71 
72 // post- 5.3.7
73 STORED_ENUM_MAP(stored_privileges_1, header::NoPrivileges,
78 );
79 
80 STORED_ENUM_MAP(stored_bool_yes_no_auto, header::Yes,
82  header::No,
84 );
85 
86 STORED_ENUM_MAP(stored_language_detection_method, header::UILanguage,
90 );
91 
92 STORED_FLAGS_MAP(stored_architectures_0,
93  header::ArchitectureUnknown,
94  header::X86,
95  header::Amd64,
96  header::IA64
97 );
98 
99 STORED_FLAGS_MAP(stored_architectures_1,
100  header::ArchitectureUnknown,
101  header::X86,
102  header::Amd64,
103  header::IA64,
104  header::ARM64,
105 );
106 
107 // pre-4.2.5
108 STORED_ENUM_MAP(stored_compression_method_0, stream::UnknownCompression,
109  stream::Zlib,
112 );
113 
114 // 4.2.5
115 STORED_ENUM_MAP(stored_compression_method_1, stream::UnknownCompression,
119 );
120 
121 // [4.2.6 5.3.9)
122 STORED_ENUM_MAP(stored_compression_method_2, stream::UnknownCompression,
124  stream::Zlib,
127 );
128 
129 // 5.3.9+
130 STORED_ENUM_MAP(stored_compression_method_3, stream::UnknownCompression,
132  stream::Zlib,
136 );
137 
138 // 6.0.0+
139 STORED_FLAGS_MAP(stored_privileges_required_overrides,
140  header::Commandline,
141  header::Dialog
142 );
143 
144 } // anonymous namespace
145 
146 void header::load(std::istream & is, const version & version) {
147 
148  options = 0;
149 
150  if(version < INNO_VERSION(1, 3, 0)) {
151  (void)util::load<boost::uint32_t>(is); // uncompressed size of the setup header
152  }
153 
156  if(version >= INNO_VERSION(1, 3, 0)) {
158  } else {
159  app_id.clear();
160  }
162  if(version >= INNO_VERSION(1, 3, 0)) {
165  } else {
166  app_publisher.clear(), app_publisher_url.clear();
167  }
168  if(version >= INNO_VERSION(5, 1, 13)) {
170  } else {
171  app_support_phone.clear();
172  }
173  if(version >= INNO_VERSION(1, 3, 0)) {
177  } else {
178  app_support_url.clear(), app_updates_url.clear(), app_version.clear();
179  }
182  if(version < INNO_VERSION(3, 0, 0)) {
184  } else {
185  uninstall_icon_name.clear();
186  }
188  if(version >= INNO_VERSION(1, 3, 0) && version < INNO_VERSION(5, 2, 5)) {
192  } else {
193  license_text.clear(), info_before.clear(), info_after.clear();
194  }
195  if(version >= INNO_VERSION(1, 3, 3)) {
197  } else {
198  uninstall_files_dir.clear();
199  }
200  if(version >= INNO_VERSION(1, 3, 6)) {
203  } else {
204  uninstall_name.clear(), uninstall_icon.clear();
205  }
206  if(version >= INNO_VERSION(1, 3, 14)) {
208  } else {
209  app_mutex.clear();
210  }
211  if(version >= INNO_VERSION(3, 0, 0)) {
214  } else {
216  }
217  if(version >= INNO_VERSION(4, 0, 0) || (version.is_isx() && version >= INNO_VERSION_EXT(3, 0, 6, 1))) {
219  } else {
220  default_serial.clear();
221  }
222  if((version >= INNO_VERSION(4, 0, 0) && version < INNO_VERSION(5, 2, 5)) ||
223  (version.is_isx() && version >= INNO_VERSION(1, 3, 24))) {
225  } else {
226  compiled_code.clear();
227  }
228  if(version >= INNO_VERSION(4, 2, 4)) {
233  } else {
234  app_readme_file.clear(), app_contact.clear();
235  app_comments.clear(), app_modify_path.clear();
236  }
237  if(version >= INNO_VERSION(5, 3, 8)) {
239  } else {
241  }
242  if(version >= INNO_VERSION(5, 3, 10)) {
244  } else {
245  uninstallable.clear();
246  }
247  if(version >= INNO_VERSION(5, 5, 0)) {
249  } else {
251  }
252  if(version >= INNO_VERSION(5, 5, 6)) {
254  } else {
255  setup_mutex.clear();
256  }
257  if(version >= INNO_VERSION(5, 6, 1)) {
260  } else {
261  changes_environment.clear();
262  changes_associations.clear();
263  }
264  if(version >= INNO_VERSION(5, 2, 5)) {
268  }
269  if(version >= INNO_VERSION(5, 2, 1) && version < INNO_VERSION(5, 3, 10)) {
271  } else {
272  uninstaller_signature.clear();
273  }
274  if(version >= INNO_VERSION(5, 2, 5)) {
276  }
277 
278  if(version >= INNO_VERSION(2, 0, 6) && !version.is_unicode()) {
280  } else {
281  lead_bytes = 0;
282  }
283 
284  if(version >= INNO_VERSION(4, 0, 0)) {
285  language_count = util::load<boost::uint32_t>(is);
286  } else if(version >= INNO_VERSION(2, 0, 1)) {
287  language_count = 1;
288  } else {
289  language_count = 0;
290  }
291 
292  if(version >= INNO_VERSION(4, 2, 1)) {
293  message_count = util::load<boost::uint32_t>(is);
294  } else {
295  message_count = 0;
296  }
297 
298  if(version >= INNO_VERSION(4, 1, 0)) {
299  permission_count = util::load<boost::uint32_t>(is);
300  } else {
301  permission_count = 0;
302  }
303 
304  if(version >= INNO_VERSION(2, 0, 0) || version.is_isx()) {
305  type_count = util::load<boost::uint32_t>(is);
306  component_count = util::load<boost::uint32_t>(is);
307  } else {
308  type_count = 0, component_count = 0;
309  }
310  if(version >= INNO_VERSION(2, 0, 0) || (version.is_isx() && version >= INNO_VERSION(1, 3, 17))) {
311  task_count = util::load<boost::uint32_t>(is);
312  } else {
313  task_count = 0;
314  }
315 
316  directory_count = util::load<boost::uint32_t>(is, version.bits());
317  file_count = util::load<boost::uint32_t>(is, version.bits());
318  data_entry_count = util::load<boost::uint32_t>(is, version.bits());
319  icon_count = util::load<boost::uint32_t>(is, version.bits());
320  ini_entry_count = util::load<boost::uint32_t>(is, version.bits());
321  registry_entry_count = util::load<boost::uint32_t>(is, version.bits());
322  delete_entry_count = util::load<boost::uint32_t>(is, version.bits());
323  uninstall_delete_entry_count = util::load<boost::uint32_t>(is, version.bits());
324  run_entry_count = util::load<boost::uint32_t>(is, version.bits());
325  uninstall_run_entry_count = util::load<boost::uint32_t>(is, version.bits());
326 
327  boost::int32_t license_size = 0;
328  boost::int32_t info_before_size = 0;
329  boost::int32_t info_after_size = 0;
330  if(version < INNO_VERSION(1, 3, 0)) {
331  license_size = util::load<boost::int32_t>(is, version.bits());
332  info_before_size = util::load<boost::int32_t>(is, version.bits());
333  info_after_size = util::load<boost::int32_t>(is, version.bits());
334  }
335 
336  winver.load(is, version);
337 
338  back_color = util::load<boost::uint32_t>(is);
339  if(version >= INNO_VERSION(1, 3, 3)) {
340  back_color2 = util::load<boost::uint32_t>(is);
341  } else {
342  back_color2 = 0;
343  }
344  if(version < INNO_VERSION(5, 5, 7)) {
345  image_back_color = util::load<boost::uint32_t>(is);
346  } else {
347  image_back_color = 0;
348  }
349  if((version >= INNO_VERSION(2, 0, 0) && version < INNO_VERSION(5, 0, 4)) || version.is_isx()) {
350  small_image_back_color = util::load<boost::uint32_t>(is);
351  } else {
353  }
354 
355  if(version >= INNO_VERSION(6, 0, 0)) {
357  wizard_resize_percent_x = util::load<boost::uint32_t>(is);
358  wizard_resize_percent_y = util::load<boost::uint32_t>(is);
359  } else {
363  }
364 
365  if(version >= INNO_VERSION(5, 5, 7)) {
367  } else {
369  }
370 
371  if(version < INNO_VERSION(4, 2, 0)) {
372  password.crc32 = util::load<boost::uint32_t>(is);
374  } else if(version < INNO_VERSION(5, 3, 9)) {
375  is.read(password.md5, std::streamsize(sizeof(password.md5)));
377  } else {
378  is.read(password.sha1, std::streamsize(sizeof(password.sha1)));
380  }
381  if(version >= INNO_VERSION(4, 2, 2)) {
382  password_salt.resize(8);
383  is.read(&password_salt[0], std::streamsize(password_salt.length()));
384  password_salt.insert(0, "PasswordCheckHash");
385  } else {
386  password_salt.clear();
387  }
388 
389  if(version >= INNO_VERSION(4, 0, 0)) {
390  extra_disk_space_required = util::load<boost::int64_t>(is);
391  slices_per_disk = util::load<boost::uint32_t>(is);
392  } else {
393  extra_disk_space_required = util::load<boost::int32_t>(is);
394  slices_per_disk = 1;
395  }
396 
397  if((version >= INNO_VERSION(2, 0, 0) && version < INNO_VERSION(5, 0, 0)) ||
398  (version.is_isx() && version >= INNO_VERSION(1, 3, 4))) {
400  } else {
402  }
403 
404  if(version >= INNO_VERSION(1, 3, 0)) {
406  } else {
408  }
409 
410  if(version >= INNO_VERSION(5, 0, 0)) {
412  } else if(version >= INNO_VERSION(2, 0, 0) || (version.is_isx() && version >= INNO_VERSION(1, 3, 13))) {
414  } else {
416  }
417 
418  if(version >= INNO_VERSION(1, 3, 6)) {
420  } else {
422  }
423 
424  if(version.is_isx() && version >= INNO_VERSION(2, 0, 10) && version < INNO_VERSION(3, 0, 0)) {
425  boost::int32_t code_line_offset = util::load<boost::int32_t>(is);
426  (void)code_line_offset;
427  }
428 
429  if(version >= INNO_VERSION(3, 0, 0) && version < INNO_VERSION(3, 0, 3)) {
431  switch(val) {
432  case Yes: options |= AlwaysRestart; break;
433  case Auto: options |= RestartIfNeededByRun; break;
434  case No: break;
435  }
436  }
437 
438  if(version >= INNO_VERSION(5, 3, 7)) {
440  } else if(version >= INNO_VERSION(3, 0, 4) || (version.is_isx() && version >= INNO_VERSION(3, 0, 3))) {
442  }
443 
444  if(version >= INNO_VERSION(5, 7, 0)) {
446  } else {
448  }
449 
450  if(version >= INNO_VERSION(4, 0, 10)) {
453  }
454 
455  if(version >= INNO_VERSION(5, 3, 9)) {
457  } else if(version >= INNO_VERSION(4, 2, 6)) {
459  } else if(version >= INNO_VERSION(4, 2, 5)) {
461  } else if(version >= INNO_VERSION(4, 1, 5)) {
463  }
464 
465  if(version >= INNO_VERSION(5, 6, 0)) {
468  } else if(version >= INNO_VERSION(5, 1, 0)) {
471  } else {
472  architectures_allowed = architecture_types::all();
473  architectures_installed_in_64bit_mode = architecture_types::all();
474  }
475 
476  if(version >= INNO_VERSION(5, 2, 1) && version < INNO_VERSION(5, 3, 10)) {
477  signed_uninstaller_original_size = util::load<boost::uint32_t>(is);
478  signed_uninstaller_header_checksum = util::load<boost::uint32_t>(is);
479  } else {
481  }
482 
483  if(version >= INNO_VERSION(5, 3, 3)) {
486  }
487 
488  if(version >= INNO_VERSION(5, 5, 0)) {
489  uninstall_display_size = util::load<boost::uint64_t>(is);
490  } else if(version >= INNO_VERSION(5, 3, 6)) {
491  uninstall_display_size = util::load<boost::uint32_t>(is);
492  } else {
494  }
495 
496  if(version == INNO_VERSION_EXT(5, 5, 0, 1)) {
497  /*
498  * This is needed to extract an Inno Setup variant (BlackBox v2?) that uses
499  * the 5.5.0 (unicode) data version string while the format differs:
500  * The language entries are off by one byte and the EncryptionUsed flag
501  * gets set while there is no decrypt_dll.
502  * I'm not sure where exactly this byte goes, but it's after the compression
503  * type and before EncryptionUsed flag.
504  * The other values/flags between here and there look sane (mostly default).
505  */
506  (void)util::load<boost::uint8_t>(is);
507  }
508 
509  stored_flag_reader<flags> flagreader(is, version.bits());
510 
511  flagreader.add(DisableStartupPrompt);
512  if(version < INNO_VERSION(5, 3, 10)) {
513  flagreader.add(Uninstallable);
514  }
515  flagreader.add(CreateAppDir);
516  if(version < INNO_VERSION(5, 3, 3)) {
517  flagreader.add(DisableDirPage);
518  }
519  if(version < INNO_VERSION(1, 3, 6)) {
520  flagreader.add(DisableDirExistsWarning);
521  }
522  if(version < INNO_VERSION(5, 3, 3)) {
523  flagreader.add(DisableProgramGroupPage);
524  }
525  flagreader.add(AllowNoIcons);
526  if(version < INNO_VERSION(3, 0, 0) || version >= INNO_VERSION(3, 0, 3)) {
527  flagreader.add(AlwaysRestart);
528  }
529  if(version < INNO_VERSION(1, 3, 3)) {
530  flagreader.add(BackSolid);
531  }
532  flagreader.add(AlwaysUsePersonalGroup);
533  flagreader.add(WindowVisible);
534  flagreader.add(WindowShowCaption);
535  flagreader.add(WindowResizable);
536  flagreader.add(WindowStartMaximized);
537  flagreader.add(EnableDirDoesntExistWarning);
538  if(version < INNO_VERSION(4, 1, 2)) {
539  flagreader.add(DisableAppendDir);
540  }
541  flagreader.add(Password);
542  if(version >= INNO_VERSION(1, 2, 6)) {
543  flagreader.add(AllowRootDirectory);
544  }
545  if(version >= INNO_VERSION(1, 2, 14)) {
546  flagreader.add(DisableFinishedPage);
547  }
548  if(version.bits() != 16) {
549  if(version < INNO_VERSION(3, 0, 4)) {
550  flagreader.add(AdminPrivilegesRequired);
551  }
552  if(version < INNO_VERSION(3, 0, 0)) {
553  flagreader.add(AlwaysCreateUninstallIcon);
554  }
555  if(version < INNO_VERSION(1, 3, 6)) {
556  flagreader.add(OverwriteUninstRegEntries);
557  }
558  if(version < INNO_VERSION(5, 6, 1)) {
559  flagreader.add(ChangesAssociations);
560  }
561  }
562  if(version >= INNO_VERSION(1, 3, 0) && version < INNO_VERSION(5, 3, 8)) {
563  flagreader.add(CreateUninstallRegKey);
564  }
565  if(version >= INNO_VERSION(1, 3, 1)) {
566  flagreader.add(UsePreviousAppDir);
567  }
568  if(version >= INNO_VERSION(1, 3, 3)) {
569  flagreader.add(BackColorHorizontal);
570  }
571  if(version >= INNO_VERSION(1, 3, 10)) {
572  flagreader.add(UsePreviousGroup);
573  }
574  if(version >= INNO_VERSION(1, 3, 20)) {
575  flagreader.add(UpdateUninstallLogAppName);
576  }
577  if(version >= INNO_VERSION(2, 0, 0) || (version.is_isx() && version >= INNO_VERSION(1, 3, 10))) {
578  flagreader.add(UsePreviousSetupType);
579  }
580  if(version >= INNO_VERSION(2, 0, 0)) {
581  flagreader.add(DisableReadyMemo);
582  flagreader.add(AlwaysShowComponentsList);
583  flagreader.add(FlatComponentsList);
584  flagreader.add(ShowComponentSizes);
585  flagreader.add(UsePreviousTasks);
586  flagreader.add(DisableReadyPage);
587  }
588  if(version >= INNO_VERSION(2, 0, 7)) {
589  flagreader.add(AlwaysShowDirOnReadyPage);
590  flagreader.add(AlwaysShowGroupOnReadyPage);
591  }
592  if(version >= INNO_VERSION(2, 0, 17) && version < INNO_VERSION(4, 1, 5)) {
593  flagreader.add(BzipUsed);
594  }
595  if(version >= INNO_VERSION(2, 0, 18)) {
596  flagreader.add(AllowUNCPath);
597  }
598  if(version >= INNO_VERSION(3, 0, 0)) {
599  flagreader.add(UserInfoPage);
600  flagreader.add(UsePreviousUserInfo);
601  }
602  if(version >= INNO_VERSION(3, 0, 1)) {
603  flagreader.add(UninstallRestartComputer);
604  }
605  if(version >= INNO_VERSION(3, 0, 3)) {
606  flagreader.add(RestartIfNeededByRun);
607  }
608  if(version >= INNO_VERSION(4, 0, 0) || (version.is_isx() && version >= INNO_VERSION(3, 0, 3))) {
609  flagreader.add(ShowTasksTreeLines);
610  }
611  if(version >= INNO_VERSION(4, 0, 0) && version < INNO_VERSION(4, 0, 10)) {
612  flagreader.add(ShowLanguageDialog);
613  }
614  if(version >= INNO_VERSION(4, 0, 1) && version < INNO_VERSION(4, 0, 10)) {
615  flagreader.add(DetectLanguageUsingLocale);
616  }
617  if(version >= INNO_VERSION(4, 0, 9)) {
618  flagreader.add(AllowCancelDuringInstall);
619  } else {
620  options |= AllowCancelDuringInstall;
621  }
622  if(version >= INNO_VERSION(4, 1, 3)) {
623  flagreader.add(WizardImageStretch);
624  }
625  if(version >= INNO_VERSION(4, 1, 8)) {
626  flagreader.add(AppendDefaultDirName);
627  flagreader.add(AppendDefaultGroupName);
628  }
629  if(version >= INNO_VERSION(4, 2, 2)) {
630  flagreader.add(EncryptionUsed);
631  }
632  if(version >= INNO_VERSION(5, 0, 4) && version < INNO_VERSION(5, 6, 1)) {
633  flagreader.add(ChangesEnvironment);
634  }
635  if(version >= INNO_VERSION(5, 1, 7) && !version.is_unicode()) {
636  flagreader.add(ShowUndisplayableLanguages);
637  }
638  if(version >= INNO_VERSION(5, 1, 13)) {
639  flagreader.add(SetupLogging);
640  }
641  if(version >= INNO_VERSION(5, 2, 1)) {
642  flagreader.add(SignedUninstaller);
643  }
644  if(version >= INNO_VERSION(5, 3, 8)) {
645  flagreader.add(UsePreviousLanguage);
646  }
647  if(version >= INNO_VERSION(5, 3, 9)) {
648  flagreader.add(DisableWelcomePage);
649  }
650  if(version >= INNO_VERSION(5, 5, 0)) {
651  flagreader.add(CloseApplications);
652  flagreader.add(RestartApplications);
653  flagreader.add(AllowNetworkDrive);
654  } else {
655  options |= AllowNetworkDrive;
656  }
657  if(version >= INNO_VERSION(5, 5, 7)) {
658  flagreader.add(ForceCloseApplications);
659  }
660  if(version >= INNO_VERSION(6, 0, 0)) {
661  flagreader.add(AppNameHasConsts);
662  flagreader.add(UsePreviousPrivileges);
663  flagreader.add(WizardResizable);
664  }
665 
666  options |= flagreader;
667 
668  if(version < INNO_VERSION(3, 0, 4)) {
669  privileges_required = (options & AdminPrivilegesRequired) ? AdminPriviliges : NoPrivileges;
670  }
671 
672  if(version < INNO_VERSION(4, 0, 10)) {
673  show_language_dialog = (options & ShowLanguageDialog) ? Yes : No;
674  language_detection = (options & DetectLanguageUsingLocale) ? LocaleLanguage : UILanguage;
675  }
676 
677  if(version < INNO_VERSION(4, 1, 5)) {
678  compression = (options & BzipUsed) ? stream::BZip2 : stream::Zlib;
679  }
680 
681  if(version < INNO_VERSION(5, 3, 3)) {
682  disable_dir_page = (options & DisableDirPage) ? Yes : No;
683  disable_program_group_page = (options & DisableProgramGroupPage) ? Yes : No;
684  }
685 
686  if(version < INNO_VERSION(1, 3, 0)) {
687  if(license_size > 0) {
688  license_text.resize(size_t(license_size));
689  is.read(&license_text[0], license_size);
691  }
692  if(info_before_size > 0) {
693  info_before.resize(size_t(info_before_size));
694  is.read(&info_before[0], info_before_size);
696  }
697  if(info_after_size > 0) {
698  info_after.resize(size_t(info_after_size));
699  is.read(&info_after[0], info_after_size);
701  }
702  }
703 
704 }
705 
707 
738 
739 }
740 
741 } // namespace setup
742 
743 NAMES(setup::header::flags, "Setup Option",
744  "disable startup prompt",
745  "create app dir",
746  "allow no icons",
747  "always restart",
748  "always use personal group",
749  "window visible",
750  "window show caption",
751  "window resizable",
752  "window start maximized",
753  "enable dir doesn't exist warning",
754  "password",
755  "allow root directory",
756  "disable finished page",
757  "changes associations",
758  "use previous app dir",
759  "back color horizontal",
760  "use previous group",
761  "update uninstall log app name",
762  "use previous setup type",
763  "disable ready memo",
764  "always show components list",
765  "flat components list",
766  "show component sizes",
767  "use previous tasks",
768  "disable ready page",
769  "always show dir on ready page",
770  "always show group on ready page",
771  "allow unc path",
772  "user info page",
773  "use previous user info",
774  "uninstall restart computer",
775  "restart if needed by run",
776  "show tasks tree lines",
777  "allow cancel during install",
778  "wizard image stretch",
779  "append default dir name",
780  "append default group name",
781  "encrypted",
782  "changes environment",
783  "show undisplayable languages",
784  "setup logging",
785  "signed uninstaller",
786  "use previous language",
787  "disable welcome page",
788  "close applications",
789  "restart applications",
790  "allow network drive",
791  "force close applications",
792  "uninstallable",
793  "disable dir page",
794  "disable program group page",
795  "disable append dir",
796  "admin privilegesrequired",
797  "always create uninstall icon",
798  "create uninstall reg key",
799  "bzip used",
800  "show language dialog",
801  "detect language using locale",
802  "disable dir exists warning",
803  "back solid",
804  "overwrite uninst reg entries",
805 )
806 
807 NAMES(setup::header::architecture_types, "Architecture",
808  "unknown",
809  "x86",
810  "amd64",
811  "IA64",
812  "ARM64",
813 )
814 
815 NAMES(setup::header::privileges_required_overrides, "Priviledge Override"
816  "commandline",
817  "dialog",
818 )
819 
820 NAMES(setup::header::alpha_format, "Alpha Format",
821  "ignored",
822  "defined",
823  "premultiplied",
824 )
825 
826 NAMES(setup::header::install_verbosity, "Install Mode",
827  "normal",
828  "silent",
829  "very silent",
830 )
831 
832 NAMES(setup::header::log_mode, "Uninstall Log Mode",
833  "append",
834  "new log",
835  "overwrite",
836 )
837 
838 NAMES(setup::header::style, "Style",
839  "classic",
840  "modern",
841 )
842 
843 NAMES(setup::header::auto_bool, "Auto Boolean",
844  "auto",
845  "no",
846  "yes",
847 )
848 
849 NAMES(setup::header::privilege_level, "Privileges",
850  "none",
851  "power user",
852  "admin",
853  "lowest",
854 )
855 
856 NAMES(setup::header::language_detection_method, "Language Detection",
857  "ui language",
858  "locale",
859  "none",
860 )
Color image_back_color
Definition: header.hpp:198
flag_type get()
Definition: storedenum.hpp:168
Definition: gog.hpp:34
size_t file_count
Definition: header.hpp:183
std::string uninstall_icon_name
Definition: header.hpp:149
#define NAMES(Enum, Name,...)
Definition: enum.hpp:70
char sha1[20]
Definition: checksum.hpp:55
size_t uninstall_delete_entry_count
Definition: header.hpp:189
size_t directory_count
Definition: header.hpp:182
std::string uninstallable
Definition: header.hpp:163
boost::uint16_t bits() const
Definition: version.hpp:80
boost::uint32_t crc32
Definition: checksum.hpp:53
Utility function to load stored data while properly handling encodings and endianness.
bool is_isx() const
Definition: version.hpp:82
alpha_format image_alpha_format
Definition: header.hpp:214
size_t data_entry_count
Definition: header.hpp:184
auto_bool show_language_dialog
Definition: header.hpp:256
style uninstall_style
Definition: header.hpp:236
flags options
Definition: header.hpp:278
#define STORED_FLAGS_MAP(MapName, Flag0,...)
Declare a mapping from bits to flag enum elements to be used for stored_flags.
Definition: storedenum.hpp:62
checksum_type type
Definition: checksum.hpp:58
std::string info_after
Definition: header.hpp:170
std::string default_user_organisation
Definition: header.hpp:156
size_t message_count
Definition: header.hpp:177
auto_bool dir_exists_warning
Definition: header.hpp:244
Load a flag set where the possible flags are known at compile-time.
Definition: storedenum.hpp:157
std::string default_dir_name
Definition: header.hpp:147
std::string app_readme_file
Definition: header.hpp:158
language_detection_method language_detection
Definition: header.hpp:263
install_verbosity install_mode
Definition: header.hpp:227
#define STORED_ENUM_MAP(MapName, Default,...)
Declare a mapping from integers to enum elements to be used for stored_enum.
Definition: storedenum.hpp:55
stream::compression_method compression
Definition: header.hpp:265
std::string app_name
Definition: header.hpp:137
#define INNO_VERSION(a, b, c)
Definition: version.hpp:47
std::string base_filename
Definition: header.hpp:150
std::string app_contact
Definition: header.hpp:159
std::string license_text
Definition: header.hpp:168
crypto::checksum password
Definition: header.hpp:216
std::string uninstaller_signature
Definition: header.hpp:171
architecture_types architectures_installed_in_64bit_mode
Definition: header.hpp:268
boost::uint32_t signed_uninstaller_original_size
Definition: header.hpp:270
Color back_color
Definition: header.hpp:196
std::string info_before
Definition: header.hpp:169
std::string uninstall_files_dir
Definition: header.hpp:151
boost::uint32_t codepage_id
Definition: encoding.hpp:146
std::string app_version
Definition: header.hpp:146
std::string default_user_name
Definition: header.hpp:155
boost::uint32_t signed_uninstaller_header_checksum
Definition: header.hpp:271
char md5[16]
Definition: checksum.hpp:54
std::string app_comments
Definition: header.hpp:160
size_t permission_count
Definition: header.hpp:178
Structures for the main setup header in Inno Setup files.
boost::uint32_t wizard_resize_percent_x
Definition: header.hpp:206
style wizard_style
Definition: header.hpp:205
boost::int64_t extra_disk_space_required
Definition: header.hpp:219
std::string compiled_code
Definition: header.hpp:172
std::string app_mutex
Definition: header.hpp:154
size_t delete_entry_count
Definition: header.hpp:188
size_t language_count
Definition: header.hpp:176
boost::uint32_t wizard_resize_percent_y
Definition: header.hpp:207
size_t registry_entry_count
Definition: header.hpp:187
void load(std::istream &is, const version &version)
Definition: windows.cpp:62
void add(enum_type flag)
Declare the next possible flag.
Definition: storedenum.hpp:225
#define INNO_VERSION_EXT(a, b, c, d)
Definition: version.hpp:41
std::string app_support_phone
Definition: header.hpp:143
std::string password_salt
Definition: header.hpp:217
void load(std::istream &is, const version &version)
Definition: header.cpp:146
auto_bool disable_program_group_page
Definition: header.hpp:274
std::string default_group_name
Definition: header.hpp:148
bool is_unicode() const
Definition: version.hpp:81
std::string app_updates_url
Definition: header.hpp:145
architecture_types architectures_allowed
Definition: header.hpp:267
size_t task_count
Definition: header.hpp:181
std::string uninstall_name
Definition: header.hpp:152
std::string app_copyright
Definition: header.hpp:140
stored_bitfield< 256 > stored_char_set
Definition: storedenum.hpp:259
size_t icon_count
Definition: header.hpp:185
std::string create_uninstall_registry_key
Definition: header.hpp:162
void to_utf8(std::string &data, codepage_id codepage)
Convert a string in place to UTF-8 from a specified encoding.
Definition: encoding.cpp:782
auto_bool disable_dir_page
Definition: header.hpp:273
std::string app_publisher_url
Definition: header.hpp:142
log_mode uninstall_log_mode
Definition: header.hpp:234
Color small_image_back_color
Definition: header.hpp:199
windows_version_range winver
Definition: header.hpp:193
std::string app_id
Definition: header.hpp:139
Load a flag set where the possible flags are not known at compile-time.
Definition: storedenum.hpp:196
std::string setup_mutex
Definition: header.hpp:165
Utilities for decoding stored enum values into run-time values.
std::string default_serial
Definition: header.hpp:157
boost::uint64_t uninstall_display_size
Definition: header.hpp:276
Color back_color2
Definition: header.hpp:197
boost::uint16_t codepage
Definition: language.cpp:39
enum_type get()
Definition: storedenum.hpp:82
std::string close_applications_filter
Definition: header.hpp:164
std::bitset< 256 > lead_bytes
Definition: header.hpp:174
Convenience specialization of encoded_string for loading Windows-1252 strings.
Definition: load.hpp:128
privilege_level privileges_required
Definition: header.hpp:252
std::string changes_environment
Definition: header.hpp:166
size_t slices_per_disk
Definition: header.hpp:220
Wrapper to load a length-prefixed string from an input stream into a std::string.
Definition: load.hpp:50
size_t type_count
Definition: header.hpp:179
std::string app_modify_path
Definition: header.hpp:161
std::string changes_associations
Definition: header.hpp:167
std::string app_support_url
Definition: header.hpp:144
size_t component_count
Definition: header.hpp:180
size_t ini_entry_count
Definition: header.hpp:186
Inno Setup version number utilities.
privileges_required_overrides privileges_required_override_allowed
Definition: header.hpp:254
std::string app_publisher
Definition: header.hpp:141
void decode(util::codepage_id codepage)
Definition: header.cpp:706
std::string uninstall_icon
Definition: header.hpp:153
size_t uninstall_run_entry_count
Definition: header.hpp:191
size_t run_entry_count
Definition: header.hpp:190
std::string app_versioned_name
Definition: header.hpp:138