![]() |
Simple Installer Script
1 Attachment(s)
Simple Installer Script
This script is designed with newbies in mind, although anyone can use it. It is as simple as can be. Features:
How to use this script:
Credits:
Screenshots: https://i.ibb.co/wdQYkZ3/EXAMPLE.png Bugs:
|
Very good!
Glad that people even with little knowledge of Inno Setup or other programming software share their ideas here on the forum. It was from simple installers and projects or a little more elaborated here on the forum that I acquired the little knowledge I currently have. |
2 Attachment(s)
The image problem is only usata Stretch = True.
Must not use ScaleX or ScaleY on values already scaled as in line 145. |
@ Masquerade
Very good, well written and well laid out, good job. :) |
Please FIX ERROR
1 Attachment(s)
Please FIX ERROR
Bitmap.AlphaFormat := afDefined; Please ADD MUSIC |
@Behnam2018, Inno Setup 5.57 or newer is required to compile this script
|
I'm getting this error when running the installer.
Code:
Unarc.dll returned an error code: -2, unsupported compression method xtool+srep+lolz:dt1:dtp1:dto1:dtm1:dtw1:dtd1:mtt0:mt6:d100m:tt4Code:
arc x -dp"..\Unpacked" ..\Packed\Data0.binARC.INI Code:
[External compressor:xtool]Code:
[lolz]Code:
ARC.INI |
1 Attachment(s)
Quote:
I tested it using XTool 2020 (creating file with DSG) and it worked. Code:
xtool:mzlib+srep_new+lolz:dt1:dtp1:dto1:dtm1:dtw1:dtd1:mtt0:mt6:d100m:tt4 |
Quote:
|
Quote:
|
Masquerade, you are a GOD! You were kind enough to let me use your installer script early before it's release onto here in my repacks and let me just say, it is amazing! It's so easy to use, easy to add your own compression methods and the styles you can choose from are the cherry on top! Simplistic, but stunning!
This will be my installer script for a very, very long time. Thank you so much Masq, you're an angel! <3 |
Update for 12/12/21
|
Hi Masquerade,
Well i have figured out my errors, and i was getting the xtool error you were having problems with, i also got it with Razor, uelr but the 2nd script worked for me and i didnt have any errors with it.. although it was missing the Music\MP3 option which i got working.. get in touch with me and i will send you my script to test. not sure why the original script and the fix didnt work.. ScOOt3r |
Update for 25/12/21 - Merry Xmas update
|
Works Great thanks for the Xmas Update..
ScOOt3r |
Is there anyway to add Install Time, how long it took to install, to this.
thanks ScOOt3r |
how to add password in this installer (support text and number password)
i try change this pass: ka321 *{#MyExtension}'), ExpandConstant('{app}'), '', False, 'ka321' but still error |
1 Attachment(s)
Please FIX ERROR
|
Try removing one "l" letter from the word "fille"
|
Bass.dll
Hey all, brilliant script but I cannot seem to get music playing during the install process, maybe its just me but could someone have a look at my script image or post a working script please.
Many Thanks Wiki https://imgur.com/a/KTop1Mi https://imgur.com/a/KTop1Mi [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: dontcop |
Quote:
Code:
//#define enablemusic |
Quote:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////// 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 "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 |
It works here
|
it works for me too as this is my goto installer
ScOOt3r |
Does my script look ok then?
|
yes it does if you want to add music to your installer
also this line #define myextension "data.bin" ;; You can edit this to be whatever you want (your script) is fine but if there is more then one .bin file which is common then you need or can change it to #define myextension ".bin" /* You can edit this to be whatever you want */ (and it will automatically read anything with a.bin extension great when you have selective stuff or optional stuff like language files etc. ScOOt3r |
Quote:
|
make a backup of your current script.iss and then re copy a clean script with no changes from the one from the site again and just edit the music only to see if it works.. dont change anything else.
from this: //#define enablemusic /* Remove ; to enable music support */ to this #define enablemusic /* Remove ; to enable music support */ |
Quote:
|
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} |
Send .iss file
Do you use the script from first post? Do you edited the script? |
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
|
also is your .mp3 named music.mp3 double check
|
Quote:
|
Quote:
|
Quote:
|
2 Attachment(s)
Quote:
but now i got this error, see photo |
Quote:
|
1 Attachment(s)
Quote:
Sorry about all this :( |
What Inno Setup version are you using?
|
| All times are GMT -7. The time now is 01:47. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com