-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.iss
More file actions
91 lines (81 loc) · 4.25 KB
/
Copy pathsetup.iss
File metadata and controls
91 lines (81 loc) · 4.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
89
90
91
; ScanLink Installer Script
; Generated by Inno Setup Script Wizard and customized for ScanLink
;
; Compile x64: ISCC /DMyAppArch=x64 setup.iss
; Compile x86: ISCC /DMyAppArch=x86 setup.iss
#define MyAppName "ScanLink"
#define VersionFileHandle FileOpen("VERSION")
#define MyAppVersion Trim(FileRead(VersionFileHandle))
#expr FileClose(VersionFileHandle)
#define MyAppPublisher "Institute Document Management System"
#ifndef MyAppArch
#define MyAppArch "x86"
#endif
#if MyAppArch != "x64" && MyAppArch != "x86"
#error MyAppArch must be "x64" or "x86"
#endif
#define MyBuildExeName "ScanLink_" + MyAppVersion + "_" + MyAppArch + ".exe"
#define MyAppExeName "ScanLink.exe"
#define MyAppURL "https://github.com/DEVGREIDC/scanlink"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
AppId={{12345678-1234-1234-1234-1234567890AB}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppVerName={#MyAppName} {#MyAppVersion} ({#MyAppArch})
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
DefaultDirName={localappdata}\Programs\{#MyAppName}
DisableProgramGroupPage=yes
PrivilegesRequired=lowest
OutputDir=.
OutputBaseFilename=ScanLinkSetup_{#MyAppVersion}_{#MyAppArch}
SetupIconFile=app_icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
UninstallDisplayIcon={app}\app_icon.ico
#if MyAppArch == "x64"
ArchitecturesAllowed=x64compatible
#endif
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "startupicon"; Description: "Run on Windows Startup"; GroupDescription: "{cm:AdditionalIcons}"
[Files]
Source: "dist\{#MyBuildExeName}"; DestDir: "{app}"; DestName: "{#MyAppExeName}"; Flags: ignoreversion
Source: "app_icon.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "README.md"; DestDir: "{app}"; Flags: ignoreversion isreadme
Source: "static\scanlink.js"; DestDir: "{app}\static"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
; NOTE: Startup shortcut removed - using registry instead (see [Registry] section)
[Registry]
; =============================================================================
; Startup Registration (replaces {commonstartup} shortcut to sync with app)
; Uses HKCU so it works for non-admin users after installation
; =============================================================================
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "ScanLink"; ValueData: """{app}\{#MyAppExeName}"""; Flags: uninsdeletevalue; Tasks: startupicon
; =============================================================================
; Custom Protocol Handler (scanlink://)
; Allows browser links like: <a href="scanlink://scan?docId=123">Scan</a>
; =============================================================================
Root: HKCU; Subkey: "Software\Classes\scanlink"; ValueType: string; ValueData: "URL:ScanLink Protocol"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\Classes\scanlink"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""
Root: HKCU; Subkey: "Software\Classes\scanlink\DefaultIcon"; ValueType: string; ValueData: """{app}\{#MyAppExeName},0"""
Root: HKCU; Subkey: "Software\Classes\scanlink\shell"; ValueType: string; ValueData: "open"
Root: HKCU; Subkey: "Software\Classes\scanlink\shell\open"; ValueType: string; ValueData: "Open with ScanLink"
Root: HKCU; Subkey: "Software\Classes\scanlink\shell\open\command"; ValueType: string; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; Flags: uninsdeletekey
[Run]
; Launch the app after installation
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[UninstallDelete]
; Clean up SSL certificates on uninstall
Type: files; Name: "{localappdata}\ScanLink\localhost.pem"
Type: files; Name: "{localappdata}\ScanLink\localhost-key.pem"
Type: files; Name: "{localappdata}\ScanLink\config.json"
Type: files; Name: "{localappdata}\ScanLink\scanner.log*"
Type: dirifempty; Name: "{localappdata}\ScanLink"