-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphMF4.iss
More file actions
130 lines (109 loc) · 4.48 KB
/
Copy pathGraphMF4.iss
File metadata and controls
130 lines (109 loc) · 4.48 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
; GraphMF4 — InnoSetup installer script
;
; Prerequisites:
; 1. Run PyInstaller first: pyinstaller GraphMF4.spec --clean --noconfirm
; 2. Open this file in InnoSetup IDE and click Build, OR run from command line:
; "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" GraphMF4.iss
;
; Output: installer\GraphMF4_Setup_1.0.0.exe (~90-100 MB, lzma2 compressed)
#define AppName "GraphMF4"
#define AppVersion "1.0.18"
#define AppPublisher "GraphMF4"
#define AppExe "GraphMF4.exe"
#define AppId "{{6F3A2D85-C419-4B7E-A8D3-E5F1C2B94A70}"
[Setup]
AppId={#AppId}
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher={#AppPublisher}
AppVerName={#AppName} {#AppVersion}
; Install to %LocalAppData%\Programs\GraphMF4 — no admin required
DefaultDirName={autopf}\{#AppName}
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
DefaultGroupName={#AppName}
DisableProgramGroupPage=yes
; Output
OutputDir=installer
OutputBaseFilename={#AppName}_Setup_{#AppVersion}
SetupIconFile=src\icon\mf4_icon_multi.ico
; Compression
Compression=lzma2/max
SolidCompression=yes
; UI
WizardStyle=modern
ShowLanguageDialog=no
; Metadata shown in Programs & Features
UninstallDisplayIcon={app}\{#AppExe}
UninstallDisplayName={#AppName} {#AppVersion}
; License shown on the installer welcome page
LicenseFile=LICENSE
; Architecture
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
; ── Optional tasks ──────────────────────────────────────────────────────────
[Tasks]
Name: "desktopicon"; \
Description: "Create a &desktop shortcut"; \
GroupDescription: "Additional shortcuts:"; \
Flags: unchecked
Name: "fileassoc"; \
Description: "Associate &.gmf4proj files with {#AppName}"; \
GroupDescription: "File associations:"
; ── Files ───────────────────────────────────────────────────────────────────
[Files]
; Everything PyInstaller produced
Source: "dist\{#AppName}\*"; \
DestDir: "{app}"; \
Flags: ignoreversion recursesubdirs createallsubdirs
; ── Shortcuts ───────────────────────────────────────────────────────────────
[Icons]
Name: "{userprograms}\{#AppName}"; \
Filename: "{app}\{#AppExe}"; \
IconFilename: "{app}\{#AppExe}"
Name: "{userdesktop}\{#AppName}"; \
Filename: "{app}\{#AppExe}"; \
IconFilename: "{app}\{#AppExe}"; \
Tasks: desktopicon
; ── .gmf4proj file association (HKCU — no admin needed) ─────────────────────
[Registry]
; Extension → ProgID
Root: HKCU; \
Subkey: "Software\Classes\.gmf4proj"; \
ValueType: string; ValueName: ""; ValueData: "GraphMF4.Project"; \
Flags: uninsdeletevalue; Tasks: fileassoc
; ProgID definition
Root: HKCU; \
Subkey: "Software\Classes\GraphMF4.Project"; \
ValueType: string; ValueName: ""; ValueData: "GraphMF4 Project"; \
Flags: uninsdeletekey; Tasks: fileassoc
; Icon for .gmf4proj files in Explorer
Root: HKCU; \
Subkey: "Software\Classes\GraphMF4.Project\DefaultIcon"; \
ValueType: string; ValueName: ""; ValueData: "{app}\{#AppExe},0"; \
Tasks: fileassoc
; Open command — passes the file path as argument to the exe
Root: HKCU; \
Subkey: "Software\Classes\GraphMF4.Project\shell\open\command"; \
ValueType: string; ValueName: ""; \
ValueData: """{app}\{#AppExe}"" ""%1"""; \
Tasks: fileassoc
; ── Post-install ─────────────────────────────────────────────────────────────
[Run]
; Optionally launch the app after installation
Filename: "{app}\{#AppExe}"; \
Description: "Launch {#AppName}"; \
Flags: nowait postinstall skipifsilent
; ── Code: refresh Explorer shell after file association change ────────────────
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
// Notify Explorer to reload file type icons/associations
RegWriteStringValue(
HKCU,
'Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gmf4proj\UserChoice',
'ProgId', 'GraphMF4.Project');
end;