Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-07-2022, 09:17
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Below is the FULL Script

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////// Simple Script - Thanks KaktoR, Cesar82, DiCaPrIo
////////// Uses ISDONE library v0.6 final thanks to ProFrager (https://krinkels.org/resources/isdone.67/)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

#define Name "The Sims 4" ;; Insert Name of Program Here
#define AppVersion "1.89.214.1030" ;; Program Version
#define Size "51GB" ;; This is just a string, type size in MB or GB, it's up to you!
#define Binary "Game\Bin\TS4_x64.exe" ;; Type full path to EXE file
#define myextension "data.bin" ;; You can edit this to be whatever you want

#define EnableVclStyles
//Remove // to enable VCL styles support

#define enablemusic /* Remove ; to enable music support */

//// You do not need to change anything below this line! ////
#define Resources "Include\*"

[Setup]
AllowCancelDuringInstall=yes
AllowNetworkDrive=no
AllowRootDirectory=no
AppName={#Name}
AppVersion={#AppVersion}
DefaultDirName={sd}\Games\{#Name}
DisableDirPage=yes
DisableFinishedPage=yes
DisableProgramGroupPage=yes
DisableReadyMemo=yes
DisableReadyPage=yes
DisableWelcomePage=yes
OutputDir=.
OutputBaseFilename=Setup
SetupIconFile=Script\icon.ico
UninstallFilesDir={app}
UnInstallable=yes

[Files]
Source: Script\ISDONE.DLL; DestDir: {tmp}; Flags: dontcopy
Source: Script\ENGLISH.INI; DestDir: {tmp}; Flags: dontcopy
Source: Script\LOGOIMAGE.BMP; DestDir: {tmp}; Flags: dontcopy
#ifdef enablevclstyles
Source: Script\VCLSTYLESINNO.DLL; DestDir: {tmp}; Flags: dontcopy
Source: Script\STYLE.VSF; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef enablemusic
Source: Script\BASS.DLL; DestDir: {tmp}; Flags: dontcopy
Source: Script\MUSIC.MP3; DestDir: {tmp}; Flags: dontcopy
#endif
Source: {#Resources}; DestDir: {tmp}; Flags: dontcopy

[Icons]
Name: "{commondesktop}\{#Name}"; Filename: "{app}\{#Binary}"; Check: CreateADesktopIcon

[Code]
type
TCallback = function (OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;

var
DesktopIconCheckBox: TNewCheckBox;
Progress: TNewProgressBar;
RequiredLabel: TLabel;
ISDoneCancel: Integer;
ISDoneError: Boolean;
LogoImage: TBitmapImage;

#ifdef EnableVclStyles
procedure LoadVCLStyle(VClStyleFile: String);
external 'LoadVCLStyleW@{tmp}\VclStylesInno.dll stdcall delayload';
procedure UnLoadVCLStyles;
external 'UnLoadVCLStyles@{tmp}\VclStylesInno.dll stdcall delayload';
#endif
function FileSearchInit(RecursiveSubDir: Boolean): Boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISArcExtract(CurComponent: Cardinal; PctOfTotal: Double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile: Boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: Boolean): Boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function Exec2 (FileName, Param: PAnsiChar;Show: Boolean): Boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName: AnsiString; TimeType, Comp1, Comp2, Comp3: Cardinal; WinHandle, NeededMem: Longint; Callback: TCallback): Boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop: Boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString): Boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';

function ProgressCallback(OveralPct,CurrentPct: Integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): LongWord;
begin
if OveralPct <= 1000 then
Progress.Position := OveralPct;
Result := ISDoneCancel;
end;

function CreateADesktopIcon: Boolean;
begin
Result := DesktopIconCheckBox.Checked and (not ISDoneError);
end;


///// Code by DiCaPrIo /////
function InitializeSetup:boolean;
begin
#define FHandle
#define FRst
#define Mask Resources
#sub ProcessFiles
#define FileName FindGetFileName(FHandle)
ExtractTemporaryFile('{#FileName}');
#endsub
#for {FHandle = FRst = FindFirst(Mask, 0); FRst; FRst = FindNext(FHandle)} ProcessFiles
Result:=True;
end;
/////////////////////////////

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
ISDoneCancel := 1;
Cancel := True;
Confirm := False;
end;

procedure InitializeWizard();
begin
with WizardForm do
begin
#ifdef EnableVclStyles
ExtractTemporaryFile('VCLSTYLESINNO.DLL');
ExtractTemporaryFile('STYLE.VSF');
LoadVCLStyle(ExpandConstant('{tmp}\STYLE.VSF'));
#endif
Bevel.Hide;
Caption := '{#Name} | Setup';
InnerNotebook.Hide;
OuterNotebook.Hide;
Position := poScreenCenter;
WizardBitmapImage.Show;
WizardForm.ClientWidth := ScaleX(345);
WizardForm.ClientHeight := ScaleY(200);
end;

with WizardForm.DirBrowseButton do
begin
Parent := WizardForm;
SetBounds(ScaleX(305), ScaleY(120), ScaleX(30), ScaleY(25));
Caption := '...'
end;

with WizardForm.DirEdit do
begin
Parent := WizardForm;
SetBounds(ScaleX(10), ScaleY(122), ScaleX(285), ScaleY(25));
end;

Requiredlabel := TLabel.Create(WizardForm);
with Requiredlabel do
begin
Parent := WizardForm;
SetBounds(ScaleX(10), ScaleY(152), ScaleX(390), ScaleY(25));
RequiredLabel.Caption := ExpandConstant('Required Space: {#Size}');
Font.Style := [fsBold];
end;

DesktopIconCheckBox := TNewCheckBox.Create(WizardForm);
with DesktopIconCheckBox do
begin
Parent := WizardForm;
SetBounds(ScaleX(10), ScaleY(170), ScaleX(150), ScaleY(20));
Caption := ExpandConstant('Create a Desktop Icon');
Checked := False;
Font.Style := [fsBold];
end;

Progress:= TNewProgressBar.Create(WizardForm);
with Progress do
begin
Parent := WizardForm;
SetBounds(ScaleX(10), ScaleY(122), ScaleX(325), ScaleY(25));
Max := 1000;
end;

ExtractTemporaryFile('logoimage.bmp');
LogoImage := TBitmapImage.Create(WizardForm);
with LogoImage do
begin
Name := 'LogoImage';
Parent := WizardForm;
Stretch := True;
Bitmap.AlphaFormat := afDefined;
SetBounds(ScaleX(10), ScaleY(10), ScaleX(325), ScaleY(100));
Bitmap.LoadFromFile(ExpandConstant('{tmp}\logoimag e.bmp'));
end;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpWelcome then
begin
LogoImage.Show;
Progress.Hide;
RequiredLabel.Show;
WizardForm.CancelButton.Show;
end;

if CurPageID = wpInstalling then
begin
Progress.Show;
DesktopIconCheckBox.Enabled := False;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then
begin
ISDoneCancel := 0;
ISDoneError := True;
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) and FileSearchInit(True) then
begin
ExtractTemporaryFile('ENGLISH.INI');
ChangeLanguage('English');
if FileExists(ExpandConstant('{tmp}\CLS-SREP.dll')) and (not IsIniSectionEmpty('SREP', ExpandConstant('{tmp}\CLS.ini'))) then
SetIniString('SREP', 'TempPath', ExpandConstant('{app}'), ExpandConstant('{tmp}\CLS.ini'));
if FileExists(ExpandConstant('{tmp}\CLS-SREP_NEW.dll')) and (not IsIniSectionEmpty('SREP_NEW', ExpandConstant('{tmp}\CLS.ini'))) then
SetIniString('SREP_NEW', 'TempPath', ExpandConstant('{app}'), ExpandConstant('{tmp}\CLS.ini'));
if FileExists(ExpandConstant('{tmp}\CLS-SREP_OLD.dll')) and (not IsIniSectionEmpty('SREP_OLD', ExpandConstant('{tmp}\CLS.ini'))) then
SetIniString('SREP_OLD', 'TempPath', ExpandConstant('{app}'), ExpandConstant('{tmp}\CLS.ini'));
if FileExists(ExpandConstant('{tmp}\CLS-PRECOMP.dll')) and (not IsIniSectionEmpty('PRECOMP', ExpandConstant('{tmp}\CLS.ini'))) then
SetIniString('PRECOMP', 'TempPath', ExpandConstant('{app}'), ExpandConstant('{tmp}\CLS.ini'));
repeat
if not ISArcExtract(0, 0, ExpandConstant('{src}\*{#MyExtension}'), ExpandConstant('{app}'), '', False, '', ExpandConstant('{tmp}\Arc.ini'), ExpandConstant('{app}'), False) then Break;
ISDoneError := False;
until True;
ISDoneStop;
end;
end;

if (CurStep = ssPostInstall) and ISDoneError then
begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', False);
end;

if CurStep = ssDone then
begin
if not ISDoneError then
MsgBox('Installation Success.', mbInformation, MB_OK)
else
MsgBox('Installation Fail.', mbInformation, MB_OK);
end;
end;

procedure DeinitializeSetup();
begin
#ifdef EnableVclStyles
UnLoadVCLStyles(); //Unload the VCL Style if it was enabled.
#endif

end;

[UninstallDelete]
Type: filesandordirs; Name: {app}
Reply With Quote
Sponsored Links
  #2  
Old 11-07-2022, 09:19
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,717
Thanks: 1,107
Thanked 7,371 Times in 2,854 Posts
KaktoR is on a distinguished road
Send .iss file

Do you use the script from first post? Do you edited the script?
__________________
Haters gonna hate
Reply With Quote
  #3  
Old 11-07-2022, 09:33
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Send .iss file

Do you use the script from first post? Do you edited the script?
How do i send you the file bud?
Reply With Quote
  #4  
Old 11-07-2022, 09:42
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,717
Thanks: 1,107
Thanked 7,371 Times in 2,854 Posts
KaktoR is on a distinguished road
Quote:
Originally Posted by Wikinoob View Post
How do i send you the file bud?
Upload it here as post attachment
__________________
Haters gonna hate
Reply With Quote
The Following User Says Thank You to KaktoR For This Useful Post:
Wikinoob (11-07-2022)
  #5  
Old 11-07-2022, 09:50
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
Upload it here as post attachment
Here you go bud

but now i got this error, see photo
Attached Images
File Type: png Untitled.png (47.6 KB, 139 views)
Attached Files
File Type: rar Script.rar (3.3 KB, 9 views)
Reply With Quote
  #6  
Old 11-07-2022, 10:03
Masquerade Masquerade is offline
Registered User
 
Join Date: Jan 2020
Location: Monte d'Or
Posts: 1,219
Thanks: 294
Thanked 1,407 Times in 637 Posts
Masquerade is on a distinguished road
Quote:
Originally Posted by Wikinoob View Post
Here you go bud

but now i got this error, see photo
Remove the second L in Fille (it's a typo)
Reply With Quote
The Following User Says Thank You to Masquerade For This Useful Post:
Wikinoob (11-07-2022)
  #7  
Old 11-07-2022, 09:21
ScOOt3r ScOOt3r is offline
Registered User
 
Join Date: Jun 2019
Location: Canada
Posts: 79
Thanks: 714
Thanked 41 Times in 35 Posts
ScOOt3r is on a distinguished road
my bad you need to Remove ; and not // but either way you have removed it and it should work.. also you have modified the script too i see which could be causing the issues
Reply With Quote
  #8  
Old 11-07-2022, 09:25
ScOOt3r ScOOt3r is offline
Registered User
 
Join Date: Jun 2019
Location: Canada
Posts: 79
Thanks: 714
Thanked 41 Times in 35 Posts
ScOOt3r is on a distinguished road
also is your .mp3 named music.mp3 double check
Reply With Quote
  #9  
Old 11-07-2022, 09:33
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Quote:
Originally Posted by ScOOt3r View Post
also is your .mp3 named music.mp3 double check
Yep .mp3 for defo
Reply With Quote
  #10  
Old 11-07-2022, 10:22
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,717
Thanks: 1,107
Thanked 7,371 Times in 2,854 Posts
KaktoR is on a distinguished road
What Inno Setup version are you using?
__________________
Haters gonna hate
Reply With Quote
  #11  
Old 11-07-2022, 10:23
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
What Inno Setup version are you using?
Inno Compiler 6.2.1
Reply With Quote
  #12  
Old 11-07-2022, 10:26
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,717
Thanks: 1,107
Thanked 7,371 Times in 2,854 Posts
KaktoR is on a distinguished road
It works for me with latest version.

Last check I thought of is if maybe your mp3 file is broken in some way.
__________________
Haters gonna hate
Reply With Quote
The Following User Says Thank You to KaktoR For This Useful Post:
Wikinoob (11-07-2022)
  #13  
Old 11-07-2022, 10:27
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
It works for me with latest version.

Last check I thought of is if maybe your mp3 file is broken in some way.
I'll try a different MP3
Reply With Quote
  #14  
Old 11-07-2022, 10:30
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Quote:
Originally Posted by KaktoR View Post
It works for me with latest version.

Last check I thought of is if maybe your mp3 file is broken in some way.
Nope changed MP3 but still getting above error
Reply With Quote
  #15  
Old 11-07-2022, 10:54
Wikinoob Wikinoob is offline
Registered User
 
Join Date: Apr 2018
Location: UK
Posts: 43
Thanks: 26
Thanked 11 Times in 8 Posts
Wikinoob is on a distinguished road
Thumbs up Sorted

Everyone who has spent time helping me out tonight, Thankyou very much....

I have managed to sort it out...the bloody BASS.DLL file had been corrupted, redownloaded and viola sorted.

Many Thanks again people
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Light Installer Script (LIS) - DiskSpan_GUI Cesar82 Conversion Tutorials 227 30-05-2026 05:01
Ultimate Conversion Compressor (UCC) vollachr Conversion Tutorials 55 26-04-2021 09:27
INDEX - Conversion Tutorial Index Razor12911 Conversion Tutorials 5 11-06-2020 02:05



All times are GMT -7. The time now is 21:26.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com