-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.iss
114 lines (99 loc) · 4.98 KB
/
package.iss
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#include "ipaddress.iss"
#define MyAppName "My Program"
#define MyAppVersion "2022.02"
#define MyAppDir "My Program"
#define MyAppExe "MyProg.exe"
#define MyAppPublisher "Est, Inc."
#define MyAppURL "https://www.something/"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{4BE2E4C9-A94B-427E-99F9-4B69417280DB}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppDir}
DefaultGroupName={#MyAppName}
LicenseFile=files\licence.rtf
;InfoBeforeFile=files\doc\InfoBeforeInstall.rtf
;InfoAfterFile=files\doc\InfoAfterInstall.rtf
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
;PrivilegesRequiredOverridesAllowed=dialog
OutputDir=output
OutputBaseFilename={#MyAppDir}_{#MyAppVersion}_setup_x64
SetupIconFile=files\MyProg.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
; "ArchitecturesInstallIn64BitMode=x64" requests that the install be
; done in "64-bit mode" on x64, meaning it should use the native
; 64-bit Program Files directory and the 64-bit view of the registry.
ArchitecturesInstallIn64BitMode=x64
; Writing to {commonstartup} requires administrative privileges, so be sure this is in your [Setup] section:
PrivilegesRequired=admin
AlwaysRestart = no
RestartIfNeededByRun = yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
[CustomMessages]
english.DescriptionReadme=User Manul
turkish.DescriptionReadme=Kullanici Kitabi
english.DescriptionStartAfterInstall=Run application after install
turkish.DescriptionStartAfterInstall=Yüklemeden sonra uygulamayi Ac
english.DescriptionAppType=Application Type WAN
turkish.DescriptionAppType=Uygulama Tipi WAN
[Files]
Source: "files\{#MyAppExe}"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: makeAfterInstall
Source: "files\MyProg.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "files\MyProg.chm"; DestDir: "{app}"; Flags: ignoreversion
Source: "files\Readme.txt"; DestDir: "{app}"; Languages: english; Flags: isreadme
Source: "files\Readme.txt"; DestDir: "{app}"; Languages: turkish; Flags: isreadme
Source: "files\packages\*"; DestDir: "{app}\packages"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "files\ini\*"; DestDir: "{app}\ini"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExe}"
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExe}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExe}"
Name: "{autostartmenu}\{#MyAppName}"; Filename: "{app}\{#MyAppExe}"
Name: "{autostartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExe}"
[Run]
Filename: {app}\{#MyAppExe}; Flags: shellexec skipifsilent nowait; Tasks: TaskStartAfterInstall
;
; Add firewall inbound and outbound rules
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""MyProg (SSH-in)"" dir=in action=allow protocol=TCP localport=22"; StatusMsg: "Add MyProg SSH registration..."; Flags: runhidden;
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""MyProg (SSH-Out)"" dir=out action=allow protocol=TCP remoteport=22"; StatusMsg: "Add MyProg SSH registration..."; Flags: runhidden;
; MyProg.exe
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall Delete rule name=""MyProg"""; StatusMsg: "Remove MyProg registration..."; Flags: runhidden;
Filename: "{sys}\netsh.exe"; Parameters: "advfirewall firewall add rule name=""MyProg"" dir=in action=allow program=""{app}\{#MyAppExe}"" enable=yes"; StatusMsg: "Add MyProg registration..."; Flags: runhidden;
;Filename: "{sys}\java.exe"; Parameters: "-jar ""{app}\ini\jPreferences-1.0-shaded.jar"" int app.main.type 1"; Flags: shellexec skipifsilent nowait runhidden; Tasks: apptype;
[Tasks]
; The following task doesn't do anything and is only meant to show [CustomMessages] usage
Name: TaskStartAfterInstall; Description: "{cm:DescriptionStartAfterInstall}"
Name: mytask; Description: "{cm:DescriptionReadme}"
Name: apptype; Description: "{cm:DescriptionAppType}"
[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ErrorCode: Integer;
begin
ShellExec('open', 'taskkill.exe', '/f /im MyProg.exe','',SW_HIDE,ewNoWait,ErrorCode);
end;
procedure InitializeWizard();
begin
// ----- IMPORTANT! INCLUDE IN YOUR SCRIPT! -----
IpAdress_Create(); // <<< This is your newly created Page
// ----- END OF IMPORTANT SCRIPT -----
end;
procedure makeAfterInstall();
begin
IpAdress_Set(true);
end;