FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Simple Installer Script (https://fileforums.com/showthread.php?t=104745)

Masquerade 31-10-2021 14:18

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:
  • VCL Style Support.
  • Can make a desktop icon.
  • Include custom setup icon and banner image.
  • Extract archives with a custom extension.
  • Play music while setup is running.

How to use this script:
  • Install Inno Setup. You must use Inno Setup v6.0 or greater to compile this script.
  • You can edit the configuration settings at the top of the Script.iss:
    Code:

    #define Name "Test"        ;; Insert Name of Program Here
    #define AppVersion "1.0.0" ;; Program Version
    #define Size "1000mb"      ;; This is just a string, type size in MB or GB, it's up to you!
    #define Binary "Test.exe"  ;; Type full path to EXE file!
    #define myextension ".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 can change the banner image, setup icon and music in the "Script" folder:

    https://i.ibb.co/qdv19T4/ex-Untitled.png

  • The LOGOIMAGE.BMP should be a bitmap image that is 325x100 pixels.
  • To use a VCL Style, copy any of the VSF files from the "_Styles" folder and rename to STYLE.VSF. You can use the included Viewer (drag VSF onto the EXE) to test a style. These styles & viewer were included from ASIS Script thanks to KaktoR.
  • Icons should be named ICON.ICO.
  • Music should be named MUSIC.MP3.

  • All of your decompressors should go into the "Include" folder. FreeArc stuff is already included.
  • Compile the script by pressing CTRL + F9 in Inno Setup window.

Credits:

Screenshots:
https://i.ibb.co/wdQYkZ3/EXAMPLE.png

Bugs:
  • None currently.

Cesar82 31-10-2021 14:30

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.

Cesar82 31-10-2021 15:17

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.

Grumpy 31-10-2021 18:21

@ Masquerade

Very good, well written and well laid out, good job. :)

Behnam2018 31-10-2021 21:05

Please FIX ERROR
 
1 Attachment(s)
Please FIX ERROR

Bitmap.AlphaFormat := afDefined;

Please ADD MUSIC

Cesar82 31-10-2021 21:25

@Behnam2018, Inno Setup 5.57 or newer is required to compile this script

hausdev 08-11-2021 09:39

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:tt4
I put the compressors in the include folder and updated the ARC.INI and CLS.INI files. Manually running
Code:

arc x -dp"..\Unpacked" ..\Packed\Data0.bin
extracts the files just fine.

ARC.INI
Code:

[External compressor:xtool]
header    = 0
packcmd  = xtool precomp -mzlib -c128mb -t100p --dbase --dedup - $$arcpackedfile$$.tmp <stdin>
unpackcmd = xtool decode -t75p - - <stdin> <stdout>

[External compressor:srep]
header    = 0
packcmd    = srep {options} -m5f -a2 $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd  = srep {options} -d - - <stdin> <stdout>

[External compressor:lolz]
header    = 0
packcmd    = lolz {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd  = lolz $$arcpackedfile$$.tmp $$arcdatafile$$.tmp

CLS.INI
Code:

[lolz]
Bufsize=512k
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
MaxThreadsUsage=75%
MaxMemoryUsage=75%
ldmfTempPath=.\temp
ldmfDeleteTmp=1

[Srep]
Memory = 256
TempPath =

[Precomp]
Memory = 40
TempPath =

Include Dir
Code:

ARC.INI
cls-lolz.dll
cls-lolz.exe
CLS-srep.dll
CLS.INI
FACOMPRESS.DLL
FACOMPRESS_MT.DLL
lolz.exe
srep.exe
UNARC.DLL
xtool.exe
zlibwapi.dll


Cesar82 08-11-2021 11:41

1 Attachment(s)
Quote:

Originally Posted by hausdev (Post 494785)
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:tt4

TRY attached script.
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

hausdev 08-11-2021 11:47

Quote:

Originally Posted by Cesar82 (Post 494786)
TRY attached script.
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

That seems to have fixed it. Much appreciated!

Masquerade 08-11-2021 14:01

Quote:

Originally Posted by hausdev (Post 494787)
That seems to have fixed it. Much appreciated!

You do not need lolz.exe and srep.exe unpackcmds inside arc.ini...

M4CKD0GE Repacks 12-11-2021 20:49

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

Masquerade 12-12-2021 14:31

Update for 12/12/21
  • Included scaling fixes thanks to Cesar82. Setup now appears correctly on desktop scaling greater than 100%.
  • Added BASS library so you can now play music during installation. Please read the updated main post in order to find out how to use music in your setup.
  • Fixed typo in VCL Style definition ("enablevcltyles" corrected to "enablevclstyles").

ScOOt3r 25-12-2021 06: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

Masquerade 25-12-2021 11:48

Update for 25/12/21 - Merry Xmas update
  • Various improvements added thanks to Ceasr82. XTool is now working correctly.

ScOOt3r 25-12-2021 15:42

Works Great thanks for the Xmas Update..

ScOOt3r


All times are GMT -7. The time now is 16:34.

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