mirror of
https://github.com/PCSX2/pcsx2-installer.git
synced 2026-01-31 01:15:18 +01:00
Inno Setup: Initial Commit
This commit is contained in:
147
PCSX2 Installer.iss
Normal file
147
PCSX2 Installer.iss
Normal file
@@ -0,0 +1,147 @@
|
||||
; Script generated by the Inno Setup Script Wizard.
|
||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||
|
||||
#define MyAppName "PCSX2"
|
||||
#define MyAppVersion "2.0"
|
||||
#define MyAppPublisher "PCSX2 Team"
|
||||
#define MyAppURL "http:/pcsx2.net/"
|
||||
#define MyAppExeName "pcsx2-qt.exe"
|
||||
|
||||
#define MyAppSourceDir "main"
|
||||
#define MySetupResourceDir "res"
|
||||
|
||||
[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={{13CEE6E5-8EB3-47D3-882E-E9DBB6A3251C}}
|
||||
AppName={#MyAppName}
|
||||
AppVersion={#MyAppVersion}
|
||||
AppVerName={#MyAppName}
|
||||
AppPublisher={#MyAppPublisher}
|
||||
AppPublisherURL={#MyAppURL}
|
||||
AppSupportURL={#MyAppURL}
|
||||
AppUpdatesURL={#MyAppURL}
|
||||
Compression=lzma/max
|
||||
SolidCompression=yes
|
||||
ArchitecturesInstallIn64BitMode=win64
|
||||
|
||||
DefaultGroupName={#MyAppName}
|
||||
|
||||
DefaultDirName=C:\Program Files\{#MyAppName}
|
||||
|
||||
OutputDir=PCSX2
|
||||
OutputBaseFilename=pcsx2-setup
|
||||
|
||||
; InfoAfterFile=README.txt
|
||||
UninstallDisplayIcon={app}\{#MyAppExeName},0
|
||||
SetupIconFile={#MySetupResourceDir}\AppIconLarge.ico
|
||||
;WizardImageFile={#MySetupResourceDir}\banner.bmp
|
||||
WizardSmallImageFile={#MySetupResourceDir}/AppIconLarge.bmp
|
||||
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
;Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
|
||||
|
||||
[Tasks]
|
||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce
|
||||
|
||||
[Files]
|
||||
Source: "{#MySetupResourceDir}\Redist\VC_redist.x64.exe"; DestDir: {tmp}
|
||||
Source: "{#MyAppSourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
Source: "{#MySetupResourceDir}\portable.txt"; DestDir: {app} ; Check: IsPortableInstallation;
|
||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||
|
||||
[Code]
|
||||
const
|
||||
StandardDescText =
|
||||
'All PCSX2 Data will be stores in My Documents, separate from the program';
|
||||
PortableDescText =
|
||||
'All PCSX2 Data will be kept in the same folder as PCSX2 itself by default.';
|
||||
|
||||
var
|
||||
StandardRadioButton: TNewRadioButton;
|
||||
PortableRadioButton: TNewRadioButton;
|
||||
|
||||
procedure InitializeWizard();
|
||||
var
|
||||
CustomPage: TWizardPage;
|
||||
FullDescLabel: TLabel;
|
||||
PartDescLabel: TLabel;
|
||||
begin
|
||||
CustomPage := CreateCustomPage(wpWelcome, 'Installation type', '');
|
||||
StandardRadioButton := TNewRadioButton.Create(WizardForm);
|
||||
StandardRadioButton.Parent := CustomPage.Surface;
|
||||
StandardRadioButton.Checked := True;
|
||||
StandardRadioButton.Top := 16;
|
||||
StandardRadioButton.Width := CustomPage.SurfaceWidth;
|
||||
StandardRadioButton.Font.Style := [fsBold];
|
||||
StandardRadioButton.Font.Size := 9;
|
||||
StandardRadioButton.Caption := 'Standard Installation'
|
||||
FullDescLabel := TLabel.Create(WizardForm);
|
||||
FullDescLabel.Parent := CustomPage.Surface;
|
||||
FullDescLabel.Left := 8;
|
||||
FullDescLabel.Top := StandardRadioButton.Top + StandardRadioButton.Height + 8;
|
||||
FullDescLabel.Width := CustomPage.SurfaceWidth;
|
||||
FullDescLabel.Height := 40;
|
||||
FullDescLabel.AutoSize := False;
|
||||
FullDescLabel.Wordwrap := True;
|
||||
FullDescLabel.Caption := StandardDescText;
|
||||
PortableRadioButton := TNewRadioButton.Create(WizardForm);
|
||||
PortableRadioButton.Parent := CustomPage.Surface;
|
||||
PortableRadioButton.Top := FullDescLabel.Top + FullDescLabel.Height + 16;
|
||||
PortableRadioButton.Width := CustomPage.SurfaceWidth;
|
||||
PortableRadioButton.Font.Style := [fsBold];
|
||||
PortableRadioButton.Font.Size := 9;
|
||||
PortableRadioButton.Caption := 'Portable Installation'
|
||||
PartDescLabel := TLabel.Create(WizardForm);
|
||||
PartDescLabel.Parent := CustomPage.Surface;
|
||||
PartDescLabel.Left := 8;
|
||||
PartDescLabel.Top := PortableRadioButton.Top + PortableRadioButton.Height + 8;
|
||||
PartDescLabel.Width := CustomPage.SurfaceWidth;
|
||||
PartDescLabel.Height := 40;
|
||||
PartDescLabel.AutoSize := False;
|
||||
PartDescLabel.Wordwrap := True;
|
||||
PartDescLabel.Caption := PortableDescText;
|
||||
end;
|
||||
|
||||
{TODO: Need to find a way to determine how to dynamically adjust "WizardForm.DirEdit.Text := ''" at runtime, how to if else on pascal?;}
|
||||
|
||||
function isPortableInstallation: Boolean;
|
||||
begin
|
||||
Result := PortableRadioButton.Checked;
|
||||
end;
|
||||
|
||||
function SetDefaultDirName(Param: string): string;
|
||||
begin
|
||||
if isPortableInstallation then
|
||||
WizardForm.DirEdit.Text := 'C:\{#MyAppName}' ;
|
||||
WizardForm.DirEdit.Text := 'C:\Program Files\{#MyAppName}' ;
|
||||
end;
|
||||
|
||||
{Where should i call the "SetDefaultDirName" function?}
|
||||
|
||||
[Icons]
|
||||
; StartMenu (Directly)
|
||||
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
|
||||
; or
|
||||
; StartMenu Group
|
||||
;Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
||||
;Name: "{group}\{#MyAppName} README"; Filename: "{app}\readme.txt"
|
||||
;Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
|
||||
|
||||
; Desktop
|
||||
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||
|
||||
[Registry]
|
||||
; Local Machine
|
||||
Root: HKLM; Subkey: "Software\{#MyAppPublisher}"; Flags: uninsdeletekeyifempty
|
||||
Root: HKLM; Subkey: "Software\{#MyAppPublisher}\{#MyAppName}"; Flags: uninsdeletekey
|
||||
Root: HKLM; Subkey: "Software\{#MyAppPublisher}\{#MyAppName}"; ValueType: string; ValueName: "InstallPath"; ValueData: {app}
|
||||
|
||||
[Run]
|
||||
Filename: "{tmp}\VC_redist.x64.exe"; Parameters: "/q /norestart"; \
|
||||
Flags: waituntilterminated; \
|
||||
StatusMsg: "Installing VC++ 2019-2022 Redistributables..."
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
6
README.md
Normal file
6
README.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# How to setup
|
||||
|
||||
0. You will need Inno Setup, you can download it from their website
|
||||
1. Put a PCSX2 build into the main folder
|
||||
2. Put a `VC_redist.x64.exe` file into the Redist folder
|
||||
3. Use the Inno Setup Compiler to open, edit and compile the .iss file
|
||||
0
main/PUT PCSX2 BUILD HERE.txt
Normal file
0
main/PUT PCSX2 BUILD HERE.txt
Normal file
BIN
res/AppIconLarge.bmp
Normal file
BIN
res/AppIconLarge.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 768 KiB |
BIN
res/AppIconLarge.ico
Normal file
BIN
res/AppIconLarge.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
0
res/Redist/PUT VC REDIST INSTALLER HERE.txt
Normal file
0
res/Redist/PUT VC REDIST INSTALLER HERE.txt
Normal file
0
res/portable.txt
Normal file
0
res/portable.txt
Normal file
Reference in New Issue
Block a user