-
Notifications
You must be signed in to change notification settings - Fork 1
/
ScriptSetup.iss
123 lines (110 loc) · 7.33 KB
/
ScriptSetup.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
114
115
116
117
118
119
120
121
122
123
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "GSyncftp"
#define MyAppVersion "1.0"
#define MyAppPublisher "COORP LTDA"
#define MyAppURL "https://www.sitename.com.br/"
#define MyAppExeName "GSyncftp.exe"
[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={{8B5F4494-E32D-4246-8651-92BDF65478F9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; The [Icons] "quicklaunchicon" entry uses {userappdata} but its [Tasks] entry has a proper IsAdminInstallMode Check.
UsedUserAreasWarning=no
DisableWelcomePage=no
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename=GSyncftpSetup
SetupIconFile=C:\Users\glaucio\PycharmProjects\GSyncftp\icons\main.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode
[Files]
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\GSyncftp.exe"; DestDir: "{app}"; AfterInstall: MyAfterInstall; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_asyncio.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_bz2.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_ctypes.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_decimal.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_hashlib.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_lzma.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_multiprocessing.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_overlapped.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_queue.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_socket.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\_ssl.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\base_library.zip"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\GSyncftp.exe.manifest"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\libcrypto-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\libssl-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\MSVCP140.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\pyexpat.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\python3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\python37.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5DBus.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Network.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Qml.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Quick.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Svg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5WebSockets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\select.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\unicodedata.pyd"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\VCRUNTIME140.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\PyQt5\*"; DestDir: "{app}\PyQt5"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\glaucio\PycharmProjects\GSyncftp\dist\GSyncftp\icons\*"; DestDir: "{app}\icons"; Flags: ignoreversion recursesubdirs createallsubdirs
; 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
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
[Code]
var
HomologacaoPage: TInputQueryWizardPage;
UploadsPath: String;
procedure InitializeWizard;
begin
{ Create the pages }
HomologacaoPage := CreateInputQueryPage(wpWelcome,
'Homologação', 'Onde esta instalado?',
'Por favor, especifique qual é o caminho do Upload de arquivos');
HomologacaoPage.Add('Caminho:', False);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
var
I: Integer;
begin
{ Validate certain pages before allowing the user to proceed }
if CurPageID = HomologacaoPage.ID then begin
UploadsPath := HomologacaoPage.Values[0];
if not DirExists(UploadsPath) then begin
MsgBox('Caminho não encontrado!', mbError, MB_OK);
Result := False;
end else
Result := True;
end else
Result := True;
end;
procedure MyAfterInstall();
begin
StringChangeEx(UploadsPath, '\', '\\', True);
SaveStringToFile(WizardDirValue()+'\config.json', '{"autosync": false, "patGSyncftp": "'+UploadsPath+'"}' + #13#10, False);
end;