Skip to content
This repository was archived by the owner on Apr 11, 2022. It is now read-only.

Commit

Permalink
Add option to create shortcuts to skip intro videos,
Browse files Browse the repository at this point in the history
trim whitespace, convert tabs to spaces
  • Loading branch information
le717 committed Jan 4, 2014
1 parent 04238fc commit 1e5ca00
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions SR-Alternate-Installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
; Copyright (c) 2007-2008 Bgbennyboy
; <http://quick.mixnmojo.com/>

; If any version below the specified version is used for compiling,
; If any version below the specified version is used for compiling,
; this error will be shown.
#if VER < EncodeVer(5,5,2)
#error You must use Inno Setup 5.5.2 or newer to compile this script
Expand All @@ -20,13 +20,13 @@
#define MyAppExeName "StuntRally.exe"
#define MySecondAppExeName "_msr.exe"

[Setup]
[Setup]
AppID={#MyAppInstallerName}{#MyAppInstallerVersion}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
VersionInfoVersion={#MyAppInstallerVersion}
AppPublisher={#MyAppPublisher}
AppCopyright=© 2000 {#MyAppPublisher}
AppCopyright=(C) 2000 {#MyAppPublisher}
LicenseFile=license.txt
; Start menu/screen and Desktop shortcuts
DefaultDirName={pf}\LEGO Media\Games\{#MyAppNameNoR}
Expand Down Expand Up @@ -54,7 +54,8 @@ SolidCompression=True
InternalCompressLevel=ultra
LZMAUseSeparateProcess=yes
; From top to bottom:
; Explicitly set Admin rights, no other languages, do not restart upon finishing.
; Explicitly set Admin rights, no other languages,
; do not restart upon finishing.
PrivilegesRequired=admin
ShowLanguageDialog=no
RestartIfNeededByRun=no
Expand All @@ -64,14 +65,16 @@ Name: "English"; MessagesFile: "compiler:Default.isl"

[Messages]
BeveledLabel={#MyAppInstallerName} {#MyAppInstallerVersion}
; WelcomeLabel2 is overridden because I'm unsure if every LEGO Stunt Rally disc says version 0.3.5.1 or just mine.
; WelcomeLabel2 is overridden because I'm unsure if every
; LEGO Stunt Rally disc says version 0.3.5.1 or just mine.
WelcomeLabel2=This will install [name] on your computer.%n%nIt is recommended that you close all other applications before continuing.
; DiskSpaceMBLabel is overridden because it reports an incorrect installation size.
DiskSpaceMBLabel=At least 399 MB of free disk space is required.

; Both Types and Components sections are required to create the installation options.
; Both Types and Components sections are required
; to create the installation options.
[Types]
Name: "Full"; Description: "Full Installation (With Movies)"
Name: "Full"; Description: "Full Installation (With Movies)"
Name: "Minimal"; Description: "Minimal Installation (Without Movies)"

[Components]
Expand All @@ -94,12 +97,13 @@ Source: "Tools\CABExtract\i5comp.exe"; DestDir: "{app}"; Flags: deleteafterinsta
Source: "Tools\CABExtract\ZD51145.DLL"; DestDir: "{app}"; Flags: deleteafterinstall

[Icons]
; First and last icons are created only if user choose not to use the videos, else the normal ones are created.
; The first {group} and {commondesktop} entries are created only if the user
;chooses to play the intro videos, while the second ones skip the intro vidoes.
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\StuntRally.ico"; Comment: "Run {#MyAppName}"; Components: Full
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\StuntRally.ico"; Parameters: "-novideo"; Comment: "Run {#MyAppName} without Intro videos"; Components: Minimal
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\Stunt-Rally.ico"; Comment: "Run {#MyAppName}";
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MySecondAppExeName}"; IconFilename: "{app}\StuntRally.ico"; Parameters: "/NOINTROVIDEO"; Comment: "Run {#MyAppName} without Intro videos"; Components: Minimal
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\StuntRally.ico"; Comment: "Run {#MyAppName}"; Components: Full; Tasks: desktopicon
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\StuntRally.ico"; Parameters: "-novideo"; Comment: "Run {#MyAppName} without Intro videos"; Components: Minimal; Tasks: desktopicon
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MySecondAppExeName}"; IconFilename: "{app}\StuntRally.ico"; Parameters: "/NOINTROVIDEO"; Comment: "Run {#MyAppName} without Intro videos"; Components: Minimal; Tasks: desktopicon
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; IconFilename: "{app}\Stunt-Rally.ico"; Comment: "Run {#MyAppName}";

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Expand All @@ -110,13 +114,14 @@ Name: "Admin"; Description: "Run {#MyAppName} with Administrator Rights"; GroupD
; Root: "HKCU"; Subkey: "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers"; ValueType: string; ValueName: "{app}\LEGORacers.exe"; ValueData: "RUNASADMIN"; Flags: uninsdeletevalue; Tasks: Admin

[Run]
; From to to bottom: Extract the CAB, run game (depending on user's choice on the videos).
; From to to bottom: Extract the CAB, run game
; (depending on user's choice on the videos).
Filename: "{app}\i5comp.exe"; Parameters: "x ""{app}\data1.cab"""; Flags: runascurrentuser
Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent runascurrentuser; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Components: Full
Filename: "{app}\{#MyAppExeName}"; Parameters: "-novideo"; Flags: nowait postinstall skipifsilent runascurrentuser; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Components: Minimal

[UninstallDelete]
; Because the files came from a CAB were not installed from [Files],
; Because the files came from a CAB were not installed from [Files],
; this section needed to uninstall them.
Type: files; Name: "{app}\{#MyAppExeName}"
Type: files; Name: "{app}\{#MySecondAppExeName}"
Expand All @@ -125,24 +130,24 @@ Type: files; Name: "{app}\*.avi"
; Type: filesandordirs; Name: "{app}\Uninstall"

[Dirs]
; Created to ensure the save games are not removed
; Created to ensure the save games are not removed
; (which should never ever happen).
Name: "{app}\SavedTracks"; Flags: uninsneveruninstall

[Code]
// Pascal script from Bgbennyboy to pull files off a CD, greatly trimmed up
// Pascal script from Bgbennyboy to pull files off a CD, greatly trimmed up
// and modified to support ANSI and Unicode Inno Setup by Triangle717.
var
SourceDrive: string;
SourceDrive: string;
#include "FindDisc.pas"
function GetSourceDrive(Param: String): String;
begin
Result:=SourceDrive;
Result:=SourceDrive;
end;
procedure InitializeWizard();
begin
SourceDrive:=GetSourceCdDrive();
SourceDrive:=GetSourceCdDrive();
end;

0 comments on commit 1e5ca00

Please sign in to comment.