-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.iss
More file actions
90 lines (78 loc) · 3.25 KB
/
setup.iss
File metadata and controls
90 lines (78 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#define MyAppName "AutoTotal"
#define MyAppVersion "1.2"
#define MyAppPublisher "malw.ru"
#define MyAppURL "https://malw.ru/autototal"
#define MyAppExeName "AutoTotal.exe"
[Setup]
AppId={{F8A5E29D-B6A8-4696-941C-FDFA8ABD44F8}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
PrivilegesRequired=admin
OutputDir=Setup
OutputBaseFilename=AutoTotalSetup
SetupIconFile=atsetup.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
UninstallDisplayIcon={app}\AutoTotal.exe
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
[CustomMessages]
CreateStartMenuShortcut=Create Start Menu shortcut
russian.CreateStartMenuShortcut=Ñîçäàòü ÿðëûê â ìåíþ Ïóñê
AddScanToContextMenu=Add "Scan on VirusTotal" in files' context menu
russian.AddScanToContextMenu=Äîáàâèòü ýëåìåíò "Ñêàíèðîâàòü íà VirusTotal" â êîíòåêñòíîå ìåíþ ôàéëîâ
ScanOnVT=Scan on VirusTotal
russian.ScanOnVT=Ñêàíèðîâàòü íà VirusTotal
DontEnterCyrillicLetters=You can't install AutoTotal in folder with cyrillic letters in it
russian.DontEnterCyrillicLetters=Íåëüçÿ óñòàíîâèòü AutoTotal â ïàïêó ñ ðóññêèìè áóêâàìè
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "addcontextmenu"; Description: "{cm:AddScanToContextMenu}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "startmenuicon"; Description: "{cm:CreateStartMenuShortcut}"; GroupDescription: "{cm:AdditionalIcons}"
[Registry]
Root: HKCR; Subkey: "*\shell\AutoTotal"; ValueType: string; ValueName: ""; ValueData: "{cm:ScanOnVT}"; Tasks: addcontextmenu; Flags: uninsdeletekey
Root: HKCR; Subkey: "*\shell\AutoTotal"; ValueType: string; ValueName: "Icon"; ValueData: "{app}\{#MyAppExeName}"; Tasks: addcontextmenu; Flags: uninsdeletekey
Root: HKCR; Subkey: "*\shell\AutoTotal\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" /scan ""%1"""; Tasks: addcontextmenu; Flags: uninsdeletekey
[Files]
Source: "bin\Release\net9.0-windows10.0.19041.0\*"; Excludes: "AutoTotal.pdb, AutoTotal.runtimeconfig.json"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startmenuicon
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Code]
function IsCyrillicString(const S: String): Boolean;
var
CharIndex: Integer;
begin
Result := False;
for CharIndex := 1 to Length(S) do
begin
if (S[CharIndex] >= #$0400) and (S[CharIndex] <= #$04FF) then
begin
Result := True;
Exit;
end;
end;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
if CurPageID = wpSelectDir then
begin
if IsCyrillicString(WizardForm.DirEdit.Text) then
begin
MsgBox(CustomMessage('DontEnterCyrillicLetters'), mbError, MB_OK);
Result := False;
end;
end;
end;