-
Notifications
You must be signed in to change notification settings - Fork 0
/
lacInstall.iss
63 lines (53 loc) · 2.51 KB
/
lacInstall.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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "LAC"
#define MyAppVersion "1.1.4"
#define MyAppPublisher "steledama"
#define MyAppURL "https://github.com/steledama/lac"
#define user "C:\Users\stefa"
[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={{E16C8990-2083-4CB6-893E-21E6617F9578}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
DisableProgramGroupPage=yes
PrivilegesRequired=admin
OutputDir={#user}\Desktop
OutputBaseFilename=LAC_setup
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
[Files]
Source: "{#user}\Documents\GitHub\lac\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "\.next,\node_modules,conf.json,confAuto.json"
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "http://localhost:3000"; IconFilename: "{app}\win\lac.ico"
[Run]
; Run install script
; Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\win\lacInstall.ps1"""; StatusMsg: "Downloading node modules, building nextjs app and installing windows service. Please wait..."; Flags: runhidden; BeforeInstall: UpdateProgress(60)
;Postinstall launch web page
Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\win\lacInstall.ps1"""; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall runascurrentuser
; Filename: "http://localhost:3000"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec postinstall
[UninstallRun]
; Run uninstall script
Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -File ""{app}\win\lacUninstall.ps1"""; Flags: runhidden; RunOnceId: "Uninistall"
[UninstallDelete]
Type: filesandordirs; Name: "C:\LAC"
[Code]
procedure UpdateProgress(Position: Integer);
begin
WizardForm.ProgressGauge.Position :=
Position * WizardForm.ProgressGauge.Max div 100;
end;