94 lines
3.8 KiB
Plaintext
94 lines
3.8 KiB
Plaintext
; Script generated by the Inno Setup Script Wizard.
|
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
|
|
#define MyAppName "AUTO_MAA"
|
|
#define MyAppVersion ""
|
|
#define MyAppPublisher "AUTO_MAA Team"
|
|
#define MyAppURL "https://doc.automaa.xyz/"
|
|
#define MyAppExeName "AUTO_MAA.exe"
|
|
#define MyAppPath ""
|
|
#define OutputDir ""
|
|
|
|
[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={{D116A92A-E174-4699-B777-61C5FD837B19}
|
|
AppName={#MyAppName}
|
|
AppVersion={#MyAppVersion}
|
|
AppVerName={#MyAppName}
|
|
AppPublisher={#MyAppPublisher}
|
|
AppPublisherURL={#MyAppURL}
|
|
AppSupportURL={#MyAppURL}
|
|
AppUpdatesURL={#MyAppURL}
|
|
DefaultDirName={autopf}\{#MyAppName}
|
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
|
; "ArchitecturesAllowed=x64compatible" specifies that Setup cannot run
|
|
; on anything but x64 and Windows 11 on Arm.
|
|
ArchitecturesAllowed=x64compatible
|
|
; "ArchitecturesInstallIn64BitMode=x64compatible" requests that the
|
|
; install be done in "64-bit mode" on x64 or Windows 11 on Arm,
|
|
; meaning it should use the native 64-bit Program Files directory and
|
|
; the 64-bit view of the registry.
|
|
ArchitecturesInstallIn64BitMode=x64compatible
|
|
DisableProgramGroupPage=yes
|
|
LicenseFile={#MyAppPath}\LICENSE
|
|
PrivilegesRequired=admin
|
|
OutputDir={#OutputDir}
|
|
OutputBaseFilename=AUTO_MAA-Setup
|
|
SetupIconFile={#MyAppPath}\resources\icons\AUTO_MAA.ico
|
|
SolidCompression=yes
|
|
WizardStyle=modern
|
|
AppMutex=AUTO_MAA_Installer_Mutex
|
|
|
|
[Languages]
|
|
Name: "Chinese"; MessagesFile: "{#MyAppPath}\resources\docs\ChineseSimplified.isl"
|
|
Name: "English"; MessagesFile: "compiler:Default.isl"
|
|
|
|
[Tasks]
|
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
|
|
|
[Files]
|
|
Source: "{#MyAppPath}\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
|
Source: "{#MyAppPath}\app\*"; DestDir: "{app}\app"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
Source: "{#MyAppPath}\resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
Source: "{#MyAppPath}\Go_Updater\*"; DestDir: "{app}\Go_Updater"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
Source: "{#MyAppPath}\AUTO_MAA_Go_Updater_install.exe"; DestDir: "{app}"; Flags: ignoreversion
|
|
Source: "{#MyAppPath}\main.py"; DestDir: "{app}"; Flags: ignoreversion
|
|
Source: "{#MyAppPath}\requirements.txt"; DestDir: "{app}"; Flags: ignoreversion
|
|
Source: "{#MyAppPath}\README.md"; DestDir: "{app}"; Flags: ignoreversion
|
|
Source: "{#MyAppPath}\LICENSE"; DestDir: "{app}"; 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
|
|
|
|
[Run]
|
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall runascurrentuser
|
|
|
|
[Code]
|
|
var
|
|
DeleteDataQuestion: Boolean;
|
|
|
|
function InitializeUninstall: Boolean;
|
|
begin
|
|
DeleteDataQuestion := MsgBox('您确认要完全移除 AUTO_MAA 的所有配置、用户数据与子组件吗?' + #13#10 +
|
|
'选择"是"将删除所有配置文件、数据与子组件程序。' + #13#10 +
|
|
'选择"否"将保留数据文件与子组件。',
|
|
mbConfirmation, MB_YESNO) = IDYES;
|
|
Result := True;
|
|
end;
|
|
|
|
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
|
|
begin
|
|
if CurUninstallStep = usPostUninstall then
|
|
begin
|
|
DelTree(ExpandConstant('{app}\app'), True, True, True);
|
|
DelTree(ExpandConstant('{app}\resources'), True, True, True);
|
|
if DeleteDataQuestion then
|
|
begin
|
|
DelTree(ExpandConstant('{app}'), True, True, True);
|
|
end;
|
|
end;
|
|
end;
|