Rev 9 | Rev 17 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9 | Rev 10 | ||
---|---|---|---|
1 | ; ViaThinkSoft Checksum Tools Setup Script for InnoSetup |
1 | ; ViaThinkSoft Checksum Tools Setup Script for InnoSetup |
2 | ; by Daniel Marschall, ViaThinkSoft |
2 | ; by Daniel Marschall, ViaThinkSoft |
3 | ; http://www.viathinksoft.com/ |
3 | ; http://www.viathinksoft.com/ |
4 | 4 | ||
5 | [Setup] |
5 | [Setup] |
6 | AppName=ViaThinkSoft Checksum Tools |
6 | AppName=ViaThinkSoft Checksum Tools |
7 | AppVerName=ViaThinkSoft Checksum Tools 1.0 |
7 | AppVerName=ViaThinkSoft Checksum Tools 1.0 |
8 | AppVersion=1.0 |
8 | AppVersion=1.0 |
9 | AppCopyright=© Copyright 2021 ViaThinkSoft. |
9 | AppCopyright=© Copyright 2021 ViaThinkSoft. |
10 | AppPublisher=ViaThinkSoft |
10 | AppPublisher=ViaThinkSoft |
11 | AppPublisherURL=http://www.viathinksoft.com/ |
11 | AppPublisherURL=http://www.viathinksoft.com/ |
12 | AppSupportURL=http://www.daniel-marschall.de/ |
12 | AppSupportURL=http://www.daniel-marschall.de/ |
13 | AppUpdatesURL=http://www.viathinksoft.com/ |
13 | AppUpdatesURL=http://www.viathinksoft.com/ |
14 | DefaultDirName={commonpf}\ViaThinkSoft Checksum Tools |
14 | DefaultDirName={commonpf}\ViaThinkSoft Checksum Tools |
15 | DefaultGroupName=Checksum Tools |
15 | DefaultGroupName=Checksum Tools |
16 | VersionInfoCompany=ViaThinkSoft |
16 | VersionInfoCompany=ViaThinkSoft |
17 | VersionInfoCopyright=© Copyright 2017 - 2021 ViaThinkSoft. |
17 | VersionInfoCopyright=© Copyright 2017 - 2021 ViaThinkSoft. |
18 | VersionInfoDescription=Checksum Tools Setup |
18 | VersionInfoDescription=Checksum Tools Setup |
19 | VersionInfoTextVersion=1.0.0.0 |
19 | VersionInfoTextVersion=1.0.0.1 |
20 | VersionInfoVersion=1.0 |
20 | VersionInfoVersion=1.0 |
21 | Compression=zip/9 |
21 | Compression=zip/9 |
22 | ChangesAssociations=yes |
22 | ChangesAssociations=yes |
23 | OutputBaseFilename=ChecksumTools |
23 | OutputBaseFilename=ChecksumTools |
24 | LicenseFile=..\LICENSE |
24 | LicenseFile=..\LICENSE |
25 | 25 | ||
26 | [CustomMessages] |
26 | [CustomMessages] |
27 | Assoc=File associations: |
27 | Assoc=File associations: |
28 | 28 | ||
29 | [Languages] |
29 | [Languages] |
30 | ;Name: de; MessagesFile: "compiler:Languages\German.isl" |
30 | ;Name: de; MessagesFile: "compiler:Languages\German.isl" |
31 | 31 | ||
32 | [LangOptions] |
32 | [LangOptions] |
33 | LanguageName=English |
33 | LanguageName=English |
34 | LanguageID=$0409 |
34 | LanguageID=$0409 |
35 | 35 | ||
36 | [Components] |
36 | [Components] |
37 | Name: "dirchecker"; Description: "Recursive directory checker"; Types: full compact custom |
37 | Name: "dirchecker"; Description: "Recursive directory checker"; Types: full compact custom |
38 | Name: "editor"; Description: "Checksum file editor"; Types: full |
38 | Name: "editor"; Description: "Checksum file editor"; Types: full |
39 | 39 | ||
40 | [Tasks] |
40 | [Tasks] |
41 | Name: fileassocSFV; Description: "{cm:AssocFileExtension,'SFV Checksum File','.sfv'}"; GroupDescription: "{cm:Assoc}"; Components: editor |
41 | Name: fileassocSFV; Description: "{cm:AssocFileExtension,'SFV Checksum File','.sfv'}"; GroupDescription: "{cm:Assoc}"; Components: editor |
42 | Name: fileassocMD5; Description: "{cm:AssocFileExtension,'MD5 Checksum File','.md5'}"; GroupDescription: "{cm:Assoc}"; Components: editor |
42 | Name: fileassocMD5; Description: "{cm:AssocFileExtension,'MD5 Checksum File','.md5'}"; GroupDescription: "{cm:Assoc}"; Components: editor |
43 | 43 | ||
44 | [Files] |
44 | [Files] |
45 | Source: "MD5DirCheck.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: dirchecker |
45 | Source: "MD5DirCheck.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: dirchecker |
46 | Source: "SFVCorrect.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
46 | Source: "SFVCorrect.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
47 | Source: "ChecksumFileIcon.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
47 | Source: "ChecksumFileIcon.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: editor |
48 | 48 | ||
49 | [Dirs] |
49 | [Dirs] |
50 | 50 | ||
51 | [Icons] |
51 | [Icons] |
52 | Name: "{group}\Recursive directory checker"; Filename: "{app}\MD5DirCheck.exe"; Components: dirchecker |
52 | Name: "{group}\Recursive directory checker"; Filename: "{app}\MD5DirCheck.exe"; Components: dirchecker |
53 | Name: "{group}\Checksum file editor"; Filename: "{app}\SFVCorrect.exe"; Components: editor |
53 | Name: "{group}\Checksum file editor"; Filename: "{app}\SFVCorrect.exe"; Components: editor |
54 | 54 | ||
55 | [Run] |
55 | [Run] |
56 | Filename: "{app}\MD5DirCheck.exe"; Description: "Run recursive directory checker"; Flags: nowait postinstall skipifsilent; Components: dirchecker |
56 | Filename: "{app}\MD5DirCheck.exe"; Description: "Run recursive directory checker"; Flags: nowait postinstall skipifsilent; Components: dirchecker |
57 | Filename: "{app}\SFVCorrect.exe"; Description: "Run checksum file editor"; Flags: nowait postinstall skipifsilent unchecked; Components: editor |
57 | Filename: "{app}\SFVCorrect.exe"; Description: "Run checksum file editor"; Flags: nowait postinstall skipifsilent unchecked; Components: editor |
58 | 58 | ||
59 | [Registry] |
59 | [Registry] |
60 | Root: HKCR; Subkey: ".sfv"; ValueName: ""; ValueType: string; ValueData: "VtsChecksumSFV"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocSFV |
60 | Root: HKCR; Subkey: ".sfv"; ValueName: ""; ValueType: string; ValueData: "VtsChecksumSFV"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocSFV |
61 | Root: HKCR; Subkey: ".sfv\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "SFV checksum file"; Components: editor; Tasks: fileassocSFV |
61 | Root: HKCR; Subkey: ".sfv\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "SFV checksum file"; Components: editor; Tasks: fileassocSFV |
62 | Root: HKCR; Subkey: ".sfv\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocSFV |
62 | Root: HKCR; Subkey: ".sfv\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocSFV |
63 | Root: HKCR; Subkey: "VtsChecksumSFV"; ValueName: ""; ValueType: string; ValueData: "SFV checksum File"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocSFV |
63 | Root: HKCR; Subkey: "VtsChecksumSFV"; ValueName: ""; ValueType: string; ValueData: "SFV checksum File"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocSFV |
64 | Root: HKCR; Subkey: "VtsChecksumSFV\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\ChecksumFileIcon.ico"; Components: editor; Tasks: fileassocSFV |
64 | Root: HKCR; Subkey: "VtsChecksumSFV\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\ChecksumFileIcon.ico"; Components: editor; Tasks: fileassocSFV |
65 | Root: HKCR; Subkey: "VtsChecksumSFV\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SFVCorrect.exe"" ""%1"""; Components: editor; Tasks: fileassocSFV |
65 | Root: HKCR; Subkey: "VtsChecksumSFV\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SFVCorrect.exe"" ""%1"""; Components: editor; Tasks: fileassocSFV |
66 | 66 | ||
67 | Root: HKCR; Subkey: ".md5"; ValueName: ""; ValueType: string; ValueData: "VtsChecksumMD5"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocMD5 |
67 | Root: HKCR; Subkey: ".md5"; ValueName: ""; ValueType: string; ValueData: "VtsChecksumMD5"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocMD5 |
68 | Root: HKCR; Subkey: ".md5\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "MD5 checksum file"; Components: editor; Tasks: fileassocMD5 |
68 | Root: HKCR; Subkey: ".md5\ShellNew"; ValueName: "ItemName"; ValueType: string; ValueData: "MD5 checksum file"; Components: editor; Tasks: fileassocMD5 |
69 | Root: HKCR; Subkey: ".md5\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocMD5 |
69 | Root: HKCR; Subkey: ".md5\ShellNew"; ValueName: "NullFile"; ValueType: string; ValueData: ""; Components: editor; Tasks: fileassocMD5 |
70 | Root: HKCR; Subkey: "VtsChecksumMD5"; ValueName: ""; ValueType: string; ValueData: "MD5 checksum File"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocMD5 |
70 | Root: HKCR; Subkey: "VtsChecksumMD5"; ValueName: ""; ValueType: string; ValueData: "MD5 checksum File"; Flags: uninsdeletekey; Components: editor; Tasks: fileassocMD5 |
71 | Root: HKCR; Subkey: "VtsChecksumMD5\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\ChecksumFileIcon.ico"; Components: editor; Tasks: fileassocMD5 |
71 | Root: HKCR; Subkey: "VtsChecksumMD5\DefaultIcon"; ValueName: ""; ValueType: string; ValueData: "{app}\ChecksumFileIcon.ico"; Components: editor; Tasks: fileassocMD5 |
72 | Root: HKCR; Subkey: "VtsChecksumMD5\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SFVCorrect.exe"" ""%1"""; Components: editor; Tasks: fileassocMD5 |
72 | Root: HKCR; Subkey: "VtsChecksumMD5\shell\open\command"; ValueName: ""; ValueType: string; ValueData: """{app}\SFVCorrect.exe"" ""%1"""; Components: editor; Tasks: fileassocMD5 |
73 | 73 | ||
74 | 74 | ||
75 | [Code] |
75 | [Code] |
76 | function InitializeSetup(): Boolean; |
76 | function InitializeSetup(): Boolean; |
77 | begin |
77 | begin |
78 | if CheckForMutexes('VtsChecksumToolsSetup')=false then |
78 | if CheckForMutexes('VtsChecksumToolsSetup')=false then |
79 | begin |
79 | begin |
80 | Createmutex('VtsChecksumToolsSetup'); |
80 | Createmutex('VtsChecksumToolsSetup'); |
81 | Result := true; |
81 | Result := true; |
82 | end |
82 | end |
83 | else |
83 | else |
84 | begin |
84 | begin |
85 | Result := False; |
85 | Result := False; |
86 | end; |
86 | end; |
87 | end; |
87 | end; |
88 | function IsAnyComponentSelected: Boolean; |
88 | function IsAnyComponentSelected: Boolean; |
89 | var |
89 | var |
90 | I: Integer; |
90 | I: Integer; |
91 | begin |
91 | begin |
92 | // Source: https://stackoverflow.com/questions/20691583/innosetup-if-no-components-are-selected-go-back-to-components-page |
92 | // Source: https://stackoverflow.com/questions/20691583/innosetup-if-no-components-are-selected-go-back-to-components-page |
93 | Result := False; |
93 | Result := False; |
94 | for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do |
94 | for I := 0 to WizardForm.ComponentsList.Items.Count - 1 do |
95 | if WizardForm.ComponentsList.Checked[I] then |
95 | if WizardForm.ComponentsList.Checked[I] then |
96 | begin |
96 | begin |
97 | Result := True; |
97 | Result := True; |
98 | Exit; |
98 | Exit; |
99 | end; |
99 | end; |
100 | end; |
100 | end; |
101 | function NextButtonClick(PageID: Integer): Boolean; |
101 | function NextButtonClick(PageID: Integer): Boolean; |
102 | begin |
102 | begin |
103 | Result:= True; |
103 | Result:= True; |
104 | if PageID = wpSelectComponents then |
104 | if PageID = wpSelectComponents then |
105 | begin |
105 | begin |
106 | if not IsAnyComponentSelected then |
106 | if not IsAnyComponentSelected then |
107 | begin |
107 | begin |
108 | MsgBox('No items selected, please select at least one item', mbError, MB_OK); |
108 | MsgBox('No items selected, please select at least one item', mbError, MB_OK); |
109 | Result := False; |
109 | Result := False; |
110 | end; |
110 | end; |
111 | end; |
111 | end; |
112 | end; |
112 | end; |