-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexe_installer_setup.iss
More file actions
77 lines (68 loc) · 3.55 KB
/
exe_installer_setup.iss
File metadata and controls
77 lines (68 loc) · 3.55 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
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "PyFlat Youtube Downloader"
#define MyAppPublisher "PyFlat Studios"
#define MyAppExeName "main.exe"
#define MyAppIconFile "appdata/images/app-icon.ico"
#define BaseBuildDir "C:\Users\Johannes\Documents\GitHub\YT-Downloader\build\exe.win-amd64-"
#define BuildDir BaseBuildDir + AppPythonVersion
[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.)
SignTool=signtool
AppId={{C07689AF-CD91-4D65-BF7E-33F6F1D6F556}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
LicenseFile=C:\Users\Johannes\Documents\GitHub\YT-Downloader\LICENSE
AllowNoIcons=no
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
OutputDir=C:\Users\Johannes\Documents\GitHub\YT-Downloader\build
OutputBaseFilename=pyflat_yt_dl_win_installer_{#MyAppVersion}
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{#BuildDir}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildDir}\frozen_application_license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildDir}\python3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildDir}\python{#StringChange(AppPythonVersion, '.', '')}.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#BuildDir}\appdata\*"; DestDir: "{app}\appdata"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#BuildDir}\languages\*"; DestDir: "{app}\languages"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#BuildDir}\lib\*"; DestDir: "{app}\lib"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\{#MyAppIconFile}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\{#MyAppIconFile}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "{app}\{#MyAppIconFile}"
[Run]
Filename: "{cmd}"; Parameters: "/C del /S /Q ""{app}\lib\appdata\__init__.pyc"""; Flags: runhidden
Filename: "{cmd}"; Parameters: "/C del /S /Q ""{app}\lib\src\__init__.pyc"""; Flags: runhidden
Filename: "{cmd}"; Parameters: "/C for /R ""{app}\lib\appdata"" %F in (__init__.pyc) do del ""%F"""; Flags: runhidden
Filename: "{cmd}"; Parameters: "/C for /R ""{app}\lib\src"" %F in (__init__.pyc) do del ""%F"""; Flags: runhidden
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Code]
procedure EditIniFileIfNeeded;
var
IniFilePath: string;
begin
IniFilePath := ExpandConstant('{app}\appdata\config.ini');
if FileExists(IniFilePath) then
begin
SetIniString('DEFAULT', 'first-use-since-update', 'True', IniFilePath);
end;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
EditIniFileIfNeeded;
end;