View Full Version : INNO TROUBLESHOOT - Questions Here
May be you are using wrong version of unarc.dll
ImmortalArc
30-03-2017, 07:54
Have anybody got version .67 of freearc next setup if yes then please share here as
I don't think so
pakrat2k2
30-03-2017, 08:36
Have anybody got version .67 of freearc next setup if yes then please share here as
I don't think so
freearc itself ?
How to decompress an arc file if i selected a determinate component (from components list) when i use a isdone (ini) script?? (custom ISDone by dante1995).
How to decompress an arc file if i selected a determinate component (from components list) when i use a isdone (ini) script?? (custom ISDone by dante1995).
I don't have the script, but it should work like this
search for the line starting with "If not ISARCEXTRACT" in the code section. Before this line, add anoher line like this
if IsComponentSelected('ComponentName') then
after that the line starting with "If not ISARCEXTRACT" should be placed
I hope you understand
bairagyakushal4
01-04-2017, 01:17
hey when i am rerunning the setup(after 1st time install it uninstalling the gme silently . how to stop this?
I don't have the script, but it should work like this
search for the line starting with "If not ISARCEXTRACT" in the code section. Before this line, add anoher line like this
if IsComponentSelected('ComponentName') then
after that the line starting with "If not ISARCEXTRACT" should be placed
I hope you understand
Thanks for answer but the code that i use is not the original ISDone, is the dante1995 version, ISDone(ini).
This is part of code (important):
ISDoneError:=false;
i:=1;
if (GetIniString('FreearcFile' + IntToStr(i),'Archive','',ExpandConstant('{tmp}\Set up.ini')) <> '') then
begin
WizardForm.ProgressGauge.Max:=0;
repeat
WizardForm.ProgressGauge.Max:= WizardForm.ProgressGauge.Max + 1000;
i:= i + 1;
until (GetIniString('FreearcFile' + IntToStr(i),'Archive','',ExpandConstant('{tmp}\Set up.ini')) = '');
end;
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin
repeat
ChangeLanguage('English');
if not SrepInit('',512,0) then ISDoneError := True;
if not PrecompInit('',128,0) then ISDoneError := True;
if not FileSearchInit(true) then ISDoneError := True;
i:=1;
if (GetIniString('FreearcFile' + IntToStr(i),'Archive','',ExpandConstant('{tmp}\Set up.ini')) <> '') then
begin
SetArrayLength(Arc1,4);
SetArrayLength(Arc2,4);
repeat
Arc1[0]:=ExpandConstant(GetIniString('FreearcFile' + IntToStr(i),'Archive','',ExpandConstant('{tmp}\Set up.ini')));
Arc1[1]:=ExpandConstant(GetIniString('FreearcFile' + IntToStr(i),'Output','',ExpandConstant('{tmp}\Setu p.ini')));
Arc1[2]:=ExpandConstant(GetIniString('FreearcFile' + IntToStr(i),'Disk','1',ExpandConstant('{tmp}\Setup .ini')));
if Arc1[0] <> '' then
begin
if not FileExists(Arc1[0]) then
begin
if MsgBox(SetupMessage(msgChangeDiskTitle) +' '+'( '+ Arc1[2]+' )', mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;
end else begin
if not ISArcExtract( 0, 0, Arc1[0], Arc1[1], '', false, Arc1[3], ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}'), False) then ISDoneError := True;
i:= i + 1;
end;
end;
until ((GetIniString('FreearcFile' + IntToStr(i),'Archive','',ExpandConstant('{tmp}\Set up.ini')) = '') or (ISDoneError = True));
end;
until true;
ISDoneStop;
end;
AllCancel;
HideControls;
WizardForm.ProgressGauge.Hide;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec(ExpandConstant('{uninstallexe}'), '/SILENT','', sw_Hide, ewNoWait, ResultCode);
end;
end;
How to decompress an arc file if i selected a determinate component (from components list) when i use a isdone (ini) script??
And.... How to decompress 2 files but at a certain percentage each one? Similar to this but for my code (ISDone(ini) by dante1995):
if not ISArcExtract ( 0, 40, ExpandConstant('{src}\video1.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if not ISArcExtract ( 0, 60, ExpandConstant('{src}\video2.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
Anyone can help me? I'm a bit confused :confused:
[Registry]
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed(R) III\1.01"; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed(R) III v1.02\1.02"; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed(R) III v1.03\1.03"; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed(R) III v1.04\1.04"; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed(R) III v1.05\1.05"; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed(R) III v1.06\1.06"; Flags: uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "SKU"; ValueData: "DIGITAL"; ValueType: string; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "InstallDir"; ValueData: "{app}"; ValueType: string; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "English"; ValueType: string; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "French"; ValueType: string; Check: "Language('French')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Italian"; ValueType: string; Check: "Language('Italian')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "German"; ValueType: string; Check: "Language('German')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Spanish"; ValueType: string; Check: "Language('Spanish')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Russian"; ValueType: string; Check: "Language('Russian')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Polish"; ValueType: string; Check: "Language('Polish')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "ChineseTrad"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Hungarian"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Czech"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Dutch"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Danish"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Norwegian"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Swedish"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Portuguese"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Brazil"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3"; ValueName: "Language"; ValueData: "Finnish"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "execPath"; ValueData: "{app}\AC3SP.exe"; ValueType: string; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "info"; ValueData: "fcc67c4a082f43f0ad2b33428a7ae9f7"; ValueType: string; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "installdir"; ValueData: "{app}"; ValueType: string; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "en"; ValueType: string; Check: "Language('English')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "de"; ValueType: string; Check: "Language('German')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "es"; ValueType: string; Check: "Language('Spanish')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "fr"; ValueType: string; Check: "Language('French')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "it"; ValueType: string; Check: "Language('Italian')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "nl"; ValueType: string; Check: "Language('Dutch')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: "SOFTWARE\Ubisoft\Assassin's Creed 3\GameUpdate"; ValueName: "Language"; ValueData: "prbr"; ValueType: string; Check: "Language('PortugueseBR')"; Flags: uninsdeletevalue uninsdeletekeyifempty
Registry for "Rogue" is even with this, and there it works.
PS: If i remove ' character it works. But then the registry is useless. Even Rogue registry has this ' Character and there it works.
PSS: Someone knows how to use two checks? One for language, one for component (it only works for one, if i use two then it will not work).
pakrat2k2
04-04-2017, 16:37
I always put check:Language('English'); at end of the line... same for all languages.
Flags: uninsdeletevalue uninsdeletekeyifempty; Check: Language('English');
ImmortalArc
04-04-2017, 22:08
What is class type expected error in inno???
pakrat2k2
05-04-2017, 21:42
^ screenshot of error, & what script ?
Viper645
06-04-2017, 04:34
I need a script to extract freearc files(no external compressors, no isdone) by inno setups with progress. The script should be compatible to embed with other designed scripts
Actually i use windows phone installer script by razor, i have 2 problems, someone can help me ? Thanks:
1. When i use pzlib and try to cancel during installation (Extract Files), this not cancel, pzlib keep runing in the adm task and not close.
2. When i cancel during installation during installation (Extract Files), what is the script for reverse back and delete the copied files.
Actually i use windows phone installer script by razor, i have 2 problems, someone can help me ? Thanks:
1. When i use pzlib and try to cancel during installation (Extract Files), this not cancel, pzlib keep runing in the adm task and not close.
2. When i cancel during installation during installation (Extract Files), what is the script for reverse back and delete the copied files.
Don't know about the first one because I never tried by the answer of your second question is, if you use wpi update 3, it will delete the copied files if you cancel installation
ImmortalArc
06-04-2017, 09:01
It will be awesome if somebody gives slideshow script which uses lesser memory....
ImmortalArc
07-04-2017, 01:19
I was using an slide show script by Ronaldo and got this error and even my ram and CPU usage keep increasing
Hi! Newbie question here:
Let's say i create a button using botva:
btn1:=BtnCreate(WizardForm.Handle,200,200,160,50,E xpandConstant('{tmp}\button.png'),18,False);
BtnSetText(btn1,'Hola')
BtnSetFontColor(btn1, $000000, $000000, $000000, $000000);
how do i attach event to the button? (for example: exit).
thanks
>>how do i attach event to the button? (for example: exit).
procedure BtnClick(hBtn:HWND);
begin
WizardForm.CancelButton.Click;
end;
...
BtnSetEvent(hBtn,BtnClickEventID,WrapBtnCallback(@ BtnClick,1));
compiler error: unknown identifier click
i'm using inno compiler 5.5.9 (u)
thanks
romulus_ut3
20-04-2017, 03:37
Hello everyone, I have a really simple query.
I have this Redist folder alongside the archives I have for the installer (Windows Phone Installed by Razor 12911) and I want the Redist folder along with it's sub directories to be copied over to the installation folder, then run the Redist Installers from the installation path instead of the installer source.
What modifications do I need to make?
I would also like to add that I am unable to cancel an installer that has pzlib in it. Is there anyway to fix this? I am sure I saw a post where someone shared a code but I am unable to find the post.
Second query: Can I make changes to my arc.ini to set a limit for the decompression memory it'll be using?
For example, my arc.ini looks something like this:
[External compressor:pzlib,pzlib64]
header = 0
unpackcmd = pzlib d -t8 - -o - <stdin> <stdout>
[External compressor:srep,srep64]
header = 0
unpackcmd = srep -d -s -- <stdin> <stdout>
[External compressor:xz]
header = 0
unpackcmd = 7z x -txz -an -y -si -so <stdin> <stdout>
How can I limit my overall usage of RAM to 1GB for the installer+Decompression? The highest threshold I'd like to maintain is 1.25 GB.
Viper645
23-04-2017, 07:58
Which compressors are supported by unarc.dll (314kb) by default? I mean without other extra compressor exe's and cls/other dll's?
LINKOBJ_FAR_PLUGIN = Environment.o Common.o CompressionLibrary.o C_LZMA.o
LINKOBJ_TINY = $(LINKOBJ_FAR_PLUGIN) C_BCJ.o C_Dict.o C_Delta.o
LINKOBJ_MINI = $(LINKOBJ_TINY) C_REP.o C_LZP.o C_PPMD.o C_External.o
LINKOBJ = $(LINKOBJ_MINI) C_MM.o C_TTA.o C_Tornado.o C_GRZip.o C_4x4.o C_DisPack.o C_LZ4.o C_Encryption.o C_CLS.o C_CELS.o
Viper645
23-04-2017, 09:42
Understood nothing. Is srep/precomp supported with unarc.dll? or only the mx method is the highest?
If anyone helps by letting me know some scripts compatible with inno setup quickstart pack 5.2.3, I will appreciate that very much.
Viper645
25-04-2017, 08:07
How to use ISSrep.dll based on srep 1.5?
Is there actually any method to protect my inno script extremely that there is no way to break it?
pakrat2k2
29-04-2017, 07:14
^ he is here ocassionaly, just PM him.
Hi: Isdone question:
My isdone script is overwriting my arc.ini and changing the srep line with -mem4096b
i tried adding this
if ISDoneInit(ExpandConstant(''),$F777, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin
repeat
ChangeLanguage('Spanish');
if not SrepInit('',512,0) then break;
;that line
and then it changes the line with 512b (NOT 512m)
So is using 512 bytes instead of 512m for srep.
What i need to change?
Thanks
Viper645
29-04-2017, 18:50
What's the difference between CI & CIU?
I mean which is easy to use?
pakrat2k2
30-04-2017, 07:52
CI were the early versions of the script, CIU has had tremendous update made to the original work that yener90 released. Read the sticky topics for files needed if you plan on making own conversions.
Viper645
01-05-2017, 09:02
I want to know the difference between packjpg_dll 9kb, 137kb and 934kb
Update:
I just confirmed that isdone puts a "b" after the memory size for srep on the
arc.ini:
unpackcmd = srep -mem4096b -d - - <stdin> <stdout>
but it does correctly on the cls.ini file:
[Srep]
Memory=4096
Im using isdone0.6final
It's a bug or i'm doing something wrong?
Thanks
can't you just use larger constant, i.e. 512000000 or so?
ATL4NTYS
03-05-2017, 09:04
I donť know why but someone when open installer see only just this..
http://img.centerofwarez.cz/subdom/img/image.php?di=1BL2
but me never happend...
i always see all good..
http://img.centerofwarez.cz/subdom/img/image.php?di=EXBZ
please help.. any ideas.?? why.? where is the problem.. they try many of compatabilites modes, run as admin, change the dpi.. (size of frames,windows)
i dont know why.. problem is on win7 + :( please help..
script:
https://hastebin.com/pilacuzoca.php
pakrat2k2
03-05-2017, 14:34
Try the entire package, instead of just script. ( edit your post & add it )
ATL4NTYS
05-05-2017, 05:31
SOLVED... :) thx
pakrat2k2
05-05-2017, 08:32
SOLVED... :) thx
for others, here's the post that solved his issue
http://www.fileforums.com/showpost.php?p=458614&postcount=13
Viper645
07-05-2017, 10:39
Is there any way to use CallBackCtrl.dll instead of InnoCallBack.dll? I always ger an error saying cannot import file.
ATL4NTYS
08-05-2017, 05:28
Any method to protect my setup.exe from decompile by inno unpackers/decompilers ? :) thx in advance..
Any method to protect my setup.exe from decompile by inno unpackers/decompilers ? :) thx in advance..
http://fileforums.com/showpost.php?p=458428&postcount=10
It's probably a good solution, but not the best solution though :)
ATL4NTYS
10-05-2017, 03:23
Any better way.? simpliest..?
This is a strong way. There are no more better way than this to use with inno setup ee2
Danziel123
14-05-2017, 23:38
Excuse me.
I want to ask.
I make simple installer a game with inno setup 5.5.9.
The installation work perfect.
But the problem is i want install another game, but i cant't change the installation folder.
Installation folder will follow first game installation.
What's worng with my scrip?
Or version of inno setup?
First before i change my hardware from intel to amd i can choose the installation folder.
Now at amd i can't change the installation folder.
Sorry for my bad english :)
Thank you before :)
Add this line to your [Setup] section
Usepreviousappdir=no
Is there any way to use CallBackCtrl.dll instead of InnoCallBack.dll? I always ger an error saying cannot import file.
Make surre you have extracted Callbackctrl.dll before initialising the wizard
Advanced users, I need help ...
I need help with with an adaptation of the code below to work inside the inno setup.
function ConvertLanguageName(Const Value: String): String;
var
L: Integer;
WideCharCode: Word;
C: Char;
begin
Result := '';
L := 1;
while L <= Length(Value) do
begin
if Value[L] = '<' then
begin
//WideCharCode := Ord( StrToInt('$' + Copy(Value, L + 1, 4)));
WideCharCode := StrToInt('$' + Copy(Value, L + 1, 4));
L := L + 6;
end else begin
WideCharCode := Ord(Value[L]);
L := L + 1;
end;
C := Chr(WideCharCode);
SetLength(Result, Length(Result) + 1);
Result[Length(Result)] := C;
end;
end;
function InitializeSetup(): Boolean;
begin
MsgBox(ConvertLanguageName2('<0420><0443><0441><0441><043a><0438><0439>'), mbInformation, MB_OK); //Pусский
end;
This code compiled in Dephi 2009 Lite works perfectly, but if compiled in delphi 7 does not work. So far I've noticed that the Chr or Char function does not work correctly for unicode characters if compiled in Inno Setup or in Delphi 7. Compiling in Delphi 2009 works fine.
http://i.imgur.com/RZ1y0dV.jpg
Delphi code to compare
https://mega.nz/#!sZYGWTJJ!WnaRzdNszz8HKb6ZHzpcNAcfemgkpc9XM9AqdwF 60aA
Is there a way that works?
Thanks!
Viper645
29-05-2017, 07:07
Anyone can give me the download links of all of the old versions of ISDone.dll with scripts?
Is it possible to change the position (top) of one of the status messages of the installation? (only one)
; *** Installation status messages
StatusClosingApplications=Closing applications...
StatusCreateDirs=Creating directories...
StatusExtractFiles=Completing the installation...
StatusCreateIcons=Creating shortcuts...
StatusCreateIniEntries=Creating INI entries...
StatusCreateRegistryEntries=Creating registry entries...
StatusRegisterFiles=Registering files...
StatusSavingUninstall=Saving uninstall information...
StatusRunProgram=Finishing installation...
StatusRestartingApplications=Restarting applications...
StatusRollback=Rolling back changes...
run fazip w/o parameters - it will show cmdline syntax :)
run fazip w/o parameters - it will show cmdline syntax :)
Could you explain me better how to use facompress? I do not understand this. Thanks!!!
pakrat2k2
10-06-2017, 11:32
Could you explain me better how to use facompress? I do not understand this. Thanks!!!
run cmd.exe , navigate to where fazip is & type in fazip.exe name, should give list of commands.
@pakrat2k2 or @Bulat Can you give me an example of use of facompress.dll and fazip.exe? (ISDone). Please, thanks.
johnnyusa
12-06-2017, 13:34
Luis, Delphi 9 is fully compatible with unicode, that's why your script is working properly, you can try to compile Inno Unicode with Delphi 2009, worked for me. Also you can dll your functions in Delphi 2009 and should work fine in Inno.
Now a question, is there a way to get Inno Setup Extended Edition sorce code? I'd like to compile my own Inno with a different DiskID.
Danziel123
22-07-2017, 04:28
How to make 2 or more icon in inno setup?
pakrat2k2
23-07-2017, 08:16
How to make 2 or more icon in inno setup?
try:
[Icons]
Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"; Components: main; Tasks: startmenu
Name: "{group}\My Program Help"; Filename: "{app}\MyProg.chm"; Components: help; Tasks: startmenu
Name: "{commondesktop}\My Program"; Filename: "{app}\MyProg.exe"; Components
or in INNO > HELP > documentation, search for icon, for more info.
seventhorama
24-07-2017, 02:57
i need some help in modifying xml using innosetup
<?xml version="1.0"?>
<Settings>
<Setting type="10" key="DownloadInPlaceDir" value="D:\Games\My Games"/>
<Setting type="10" key="LastUsernameToLoginProd" value="fb2076434038419fa915a7c07bc4768f2b847bd600b9482d44 0f1ced341a48c64654c4fdec3f57a7b1b35d4913675d33d8c7 793691b0ff84caaf6815ee873f91964e2fe64cbf4683"/>
<Setting type="10" key="RememberMeProd" value="1b07700a38e33470"/>
<Setting type="10" key="RememberMeUserIdProd" value="1b07700a38e33470"/>
<Setting type="10" key="TFAIdProd" value="1b07700a38e33470"/>
</Settings>
can i modify D:\Games\My Games into parent dir (not app dir)?
i have tried this script but no luck yet...
procedure CurStepChanged(CurStep: TSetupStep);
var
UnicodeStr: string;
ANSIStr: AnsiString;
begin
if (CurStep = ssPostInstall) then
begin
LoadStringFromFile(ExpandConstant('{src}\apps.xml' ), ANSIStr)
UnicodeStr := String(ANSIStr);
StringChangeEx(UnicodeStr, 'DownloadInPlaceDir', ExpandConstant('{src}'), False)
SaveStringToFile(ExpandConstant('{src}\apps.xml'), AnsiString(UnicodeStr), False);
end;
end;
Need some help.
function InitializeSetup(): Boolean;
begin
if FileExists(ExpandConstant('{tmp}\Setup.cjstyles')) then begin
LoadSkin(ExpandConstant('{tmp}\Setup.cjstyles'), '');
Result := True;
end;
if FileExists(ExpandConstant('{tmp}\Setup.vsf')) then begin
LoadVCLStyle(ExpandConstant('{tmp}\Setup.vsf'));
Result := True;
end;
end;
procedure DeinitializeSetup();
begin
if FileExists(ExpandConstant('{tmp}\Setup.cjstyles')) then begin
UnloadSkin();
end;
if FileExists(ExpandConstant('{tmp}\Setup.vsf')) then begin
UnLoadVCLStyles;
end;
end;
Setup.exe don't start, it just closes.
Maybe i am blind and don't see the mistake :confused:
Edit: Ok after a cup of coffee i just found my mistake.
Result := True was missing in InitializeSetup
Chayan Manna
21-08-2017, 10:17
Hello
Am trying to add a customform. To make short once you click on System Tile
that page opens.
I suceeded to make it but once open it just freezes and not moving.
https://extraimage.net/images/2017/08/21/d227613cdd58b25d0dbaa963bc42fe3e.png
https://extraimage.net/images/2017/08/21/b4f0effd66050f62ca7973b53b04dcc7.png
Here the code
You must write a code of "mousedown" for the custom form.
You must write a code of "mousedown" for the custom form.
Nevermind , fixed
Thank you JRD! :)
You must write a code of "mousedown" for the custom form.
-NORO-
he is asking for form's mouse drag functionality. This is what happens when you copy the code, doesn't know what is really the purpose behind, conjectures is all you got and foul perceptions
Chayan Manna
21-08-2017, 21:09
he is asking for form's mouse drag functionality. This is what happens when you copy the code, doesn't know what is really the purpose behind, conjectures is all you got and foul perceptions
That's the thing I have said him. I made the reply from my phone so, that's why I have not wrote the full code. I know all the purpose of the code.
The procedure "onmousedown" is a fixed property of a label in a custom form in which one have to add the mouse drag procedure. like this,
OnMouseDown:=@INFOMouseDown;
And the "INFOMouseDown" procedure is the mouse drag procedure which can be like this,
procedure INFOMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(InfoForm.Handle,$0112,$F012,0);
end;
And one thing, you have cracked my mod, so You can see there is more things than coping a code. No one can make such type of mod by just only coping the codes.
That's the thing I have said him. I made the reply from my phone so, that's why I have not wrote the full code. I know all the purpose of the code.
The procedure "onmousedown" is a fixed property of a label in a custom form in which one have to add the mouse drag procedure. like this,
OnMouseDown:=@INFOMouseDown;
And the "INFOMouseDown" procedure is the mouse drag procedure which can be like this,
procedure INFOMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(InfoForm.Handle,$0112,$F012,0);
end;
And one thing, you have cracked my mod, so You can see there is more things than coping a code. No one can make such type of mod by just only coping the codes.
That wasnt the problem
Chayan Manna
22-08-2017, 04:41
That wasnt the problem
So, What's the problem? :)
So, What's the problem? :)
The
procedure CreateSystemPage();
i placed under InitializeWizard; but it should be placed under InitializeSetup
Again all credit goes to JRD! :)
Anyone knows how to draw shadow on text TLabel?
Google comes up with nothing.
yener had used A dummy label to use as shadows.
jst top and left property be +1 else everything is same
procedure UpdateShadow(var Current, Shadow :TLabel);
begin
if Shadow = nil then
Shadow := TLabel.Create(WizardForm);
if Current.Visible and (ShadowTXT >= 0) then begin
with Shadow do begin
Caption := Current.Caption;
Alignment := Current.Alignment;
AutoSize := Current.Autosize;
Transparent := Current.Transparent;
WordWrap := Current.Wordwrap;
Parent := Current.Parent;
OnClick := Current.OnClick;
OnDblClick := Current.OnDblClick;
OnMouseDown := Current.OnMouseDown;
OnMouseMove := Current.OnMouseMove;
OnMouseUp := Current.OnMouseUp;
Font.Color := ShadowTXT;
Font.Size := Current.Font.Size;
Font.Name := Current.Font.Name;
Font.Style := Current.Font.Style;
Visible := Current.Visible;
Height := Current.Height;
Width := Current.Width;
Left := Current.Left + 1;
Top := Current.Top + 1;
SendToBack;
end;
end else
Shadow.Hide;
end;
or
https://msdn.microsoft.com/en-us/library/windows/desktop/bb775639(v=vs.85).aspx
procedure CurPageChanged(CurPageID: integer);
begin
case CurPageID of
wpInstalling: begin
WizardForm.ClientHeight := (180);
WizardForm.ClientWidth := (497);
WizardForm.CancelButton.SetBounds(ScaleX(75), ScaleY(23), ScaleX(412), ScaleY(327));
...
...
I'm not able to move Cancel button on installing page. Anyone knows why?
Also, BackButton just disappears with this
wpSelectDir: begin
WizardForm.NextButton.Caption := 'Install';
WizardForm.BackButton.SetBounds(ScaleX(75), ScaleY(23), ScaleX(242), ScaleY(227));
I have to define these buttons seperatly? I just thought because there are already in "InnoSetup Support" tab.
if u r using Native controls(Notebooks), then you can't put anything on them unless control is a child
Thank you for your help.
Do it a different way then.
How i can hide
wpInfoBefore: begin
WizardForm.NoStartMenu.Hide; WizardForm.Icons.Hide;
end;
Unknown identifier :confused:
var
Icons: TNewCheckBox;
NoStartMenu: TNewCheckBox;
NoStartMenu := TNewCheckBox.Create(WizardForm);
with NoStartMenu do begin
Parent := WizardForm.InnerPage;
Left := ScaleX(46);
Top := ScaleY(224);
Width := ScaleX(411);
Height := ScaleY(17);
Caption := 'Don''t create Start Menu folder';
OnClick := @NoStartMenuClick;
Checked := False;
end;
Icons := TNewCheckBox.Create(WizardForm);
with Icons do begin
Parent := WizardForm.InnerPage;
Left := ScaleX(46);
Top := ScaleY(248);
Width := ScaleX(411);
Height := ScaleY(17);
Caption := 'Create {#Name} Desktop Icon';
Checked := False;
end;
NoStartMenu, Icons aren't real members of WizardForm, you added them later on
try
NoStartMenu.Hide; Icons.Hide;
That makes totally sense. THank you, it works :D
Sometimes i make mistakes like those things.
Is there a way to resize SelectDirPage? Because i can't deactivate it.
with WizardForm.SelectDirPage do begin
Left := ScaleX(1);
Top := ScaleY(1);
Width := ScaleX(500);
Height := ScaleY(364);
end;
wpSelectDir: begin
WizardForm.SelectDirPage.SetBounds(ScaleX(0), ScaleY(0), ScaleX(500), ScaleY(364));
Both doesn't work.
I'm not in the mood to create a whole new page instead.
Any way to set CheckBox style to default?
CheckBoxes from [Run] and Style (cjstyle/vsf) are different in appearance. I don't like that.
Using GetIniInt to get required space (mb) digits. But at this point i don't know exactly how to replace it with the SizeMB define properly.
NeedSpaceLabel.Caption := ExpandConstant('{cm:NeedSpace} ') + MbOrTb({#SizeMB});
I've tried with {code:RequiredSpace} and it's associated procedure, but get an error when it comes to the page where disk space is called.
Going to change my code to get rid of defines and using GetIniStr and GetIniInt instead. GetIniStr is fine, not a problem.
I hope someony could point me in right direction.
Maybe I am not understanding the question. Reading from ini and placing in the wizard form doesn't work or what?
Yes, exactly, but only for the one mentioned code tag above.
Show code please (you used ISPP code, right?)
MARCUS HOLLOWAY
27-01-2018, 11:53
Hey KaktoR,
#define SizeMB ReadIni(SourcePath + "\setup.ini", "Application", "Appsize", "")
in setup.ini
[Application]
Appsize=4096
Hey KaktoR,
#define SizeMB ReadIni(SourcePath + "\setup.ini", "Application", "Appsize", "")
in setup.ini
[Application]
Appsize=4096
Ok, didn't know it's possible to read from ini through define. Good to know. :p
I guess this answeres my question.
Thanks both of you ;)
my setup created with innosetup starts very late. you have some suggestion to give me??
ZakirAhmad
18-02-2018, 08:42
Can anyone give a sample generic installer script with isdone support.
pakrat2k2
18-02-2018, 15:18
Can anyone give a sample generic installer script with isdone support.
First & ONLY warning given, stop posting in every script topic there is, asking for the same thing over & over.
ZakirAhmad
19-02-2018, 22:21
I want to cange the time format of my script from
elapsed time = 29 minutes 30 seconds remaining to 29:30.
how can i do that.
thanks.
Hi guys/gals, is there any way i can make Razor work with ISExec? This is what i've tried so far with no luck:
if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\rz.exe'), ExpandConstant('x "{src}\data.rz" -o "{app}\Folder"'), ExpandConstant('{app}'), 'Extracting...',false) then break;
ZakirAhmad
20-02-2018, 22:58
i did that use timetype parameter as $1111.
how can i add win tb support.
Cyber_Phantom
22-02-2018, 08:12
Don't know if i should post this here. Its related to WPI installer.
I added 3 archives to it and now the install bar goes upto to 300%. i tried to add ArchiveProgress=33 for each file....still same
ZakirAhmad
22-02-2018, 10:14
Don't know if i should post this here. Its related to WPI installer.
I added 3 archives to it and now the install bar goes upto to 300%. i tried to add ArchiveProgress=33 for each file....still same
u might have added recoeds.inf with installer
ZakirAhmad
23-02-2018, 10:51
Is it possible to nclude exe files like pzlib with setup just like cls are included with setup. that is we r not able to see other thing working with setup/unimstall in task manager.
Could anyone give me a easy example for FindFile function?
Have to find a specific file inside {app} folder, use result for FileCopy function that copies the specific file to result location.
Sergey3695
11-06-2018, 09:26
Could anyone give me a easy example for FindFile function?
Have to find a specific file inside {app} folder, use result for FileCopy function that copies the specific file to result location.
http://forum.oszone.net/post-1351758-1312.html
pakrat2k2
27-10-2018, 10:35
brought to front page
CANNIBAL
27-10-2018, 21:04
How To Add "Split" Module To Inno Script? Please Help
Jiva newstone
27-10-2018, 21:34
Don't know if i should post this here. Its related to WPI installer.
I added 3 archives to it and now the install bar goes upto to 300%. i tried to add ArchiveProgress=33 for each file....still same
Send the CurPageChanged code, i think i can help u
blairknox
15-11-2018, 09:59
I have a problem with my installer. After the installer is finished there are 2 folders freearc..... .tmp. they are not being deleted and are taking up space. Both folders are few size less than unpacked files that are installed.
I'm using Inno Setup Compiler 5.5.1.ee2 (u) (build 121002). I am creating installler like WPI by RAZOR 12911 as practice.
i tried using deleteafterinstall next to flag under [files] section but it is still not working. i even tried to use WPI files by RAZOR 12911 but still does not work.
Can someone please help me.
blairknox
03-12-2018, 03:30
even deleteafterinstall does not work. can some one please help me. here is the file if you need.
Jiva newstone
10-12-2018, 03:24
any idea how to fix percentage with isdone
if not ISExec (0, 0, 0, ExpandConstant('{tmp}\app.exe'),
if not ISExec (0, 0, 0, ExpandConstant('{tmp}\app.exe'),
if not ISExec (0, 0, 0, ExpandConstant('{tmp}\app.exe'),
if not ISExec (0, 0, 0, ExpandConstant('{tmp}\app.exe'),
i get 200% 300% for each one
i'm looking for like this 10% 20% 30% ....
correct setting and first run it and get records.inf and use and extract records.inf in temp folder , in second time it works fine
u can change the records.inf creation location in
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), $FFFF, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin
amin fear
15-01-2019, 02:32
I have successfully managed to compress PES 2019 to 11 GB using this method , i used below script command :
Method : -mztool_pzlib_zlib+srep:m3f:a16:d1g+lolz:dtb1:tt8:m t2:gm2 0:fba0:d128m+mc1023
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::
bin\arc a -ma9 -ds -di -i2 -ep1 -ed -r -w.\tempzZ "Data_pzlib_Zlib-2.arc" -mztool_pzlib_zlib+srep:m3f:a16:d1g+lolz:dtb1:tt8:m t2:gm2 0:fba0:d128m+mc1023 "C:\PES\*"
:::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::
Download whole compression method below if it helps :
https://ufile.io/vpeek
Now when extracting game archives using CIU or ASIS script , i am getting "Unknown compression method" error.
Can you guys share your decompression script for this compression method or at least tell me which values should i change in those scripts to manage decompress this archives ? please ?
any help would be appreciated
CIU arc.ini
[External compressor:ztool_pzlib_zlib]
header = 0
unpackcmd = ZTool d:{compressor}{:option}:t100p:cm0mb - - <stdin> <stdout>
amin fear
15-01-2019, 04:54
CIU arc.ini
[External compressor:ztool_pzlib_zlib]
header = 0
unpackcmd = ZTool d:{compressor}{:option}:t100p:cm0mb - - <stdin> <stdout>
Thanks KaktoR , it worked ! , although the "Unknown compression method" error goes away , i am getting this new error message by installer :
An error occurred while unpacking: Unable to write data to disk!
Unarc.dll returned an error code: -11
ERROR: archive data corrupted (decompression fails)
Do you have any idea what does it mean ? is my compression method/switch problematic & not working ?
the compression method plus files is already posted in above post.
Which lolz version did you use for compress?
CIU use new lolz version and I can say that compress with old lolz and install with new lolz does not work
pakrat2k2
15-01-2019, 15:51
also in the method ( sent me files ) he also has spaces where there shouldnt be any
(not the forum posting spaces issue...)
m t2:gm2 0
amin fear
21-01-2019, 01:50
Which lolz version did you use for compress?
CIU use new lolz version and I can say that compress with old lolz and install with new lolz does not work
Thanks , sorry for delay.
There is only "lolz_x64.exe" binary with no version information data using tools such as Resource Hacker. will check that version conflict in detail.:)
Also the problem solved by @pakrat2k2 switch correction.
Thanks a lot, fellows!
describe19
20-02-2019, 01:59
Hi I'm wondering how to extract a .arc compressed with lolz with isdone.
I compressed with this simple arc.ini:
[Compression methods]
lolzonly=lolz:mtt0:mt3:mc1023
[External compressor:lolz]
header = 0
packcmd = lolz_x64.exe {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
And I can easily extract just with arc.exe x -w.\ -dpunpacked\ data.arc (need cls-lolz stuff in directory and run as admin)
How can I get isdone/ISFreeArcExtract to unpack this file? Using the isdoneexample1.iss I just get the "unsupported method" error. How can I tell it how to extract my file?
Also is there a way to extract lolz without needing an administrator command prompt?
Thank you in advance
EDIT: I worked it out - you must have the cls-lolz stuff in the Include section of the .iss an also make sure to ExtractTemporaryFile each of the files too in the Code section. I was missing the ExtractTemporaryFile each of the cls-lolz files.
describe19
22-02-2019, 00:33
I am now having the same issue with srep: i can extract with a .bat just using srep64.exe like above with this in arc.ini:
[External compressor:srep64]
header = 0
packcmd = srep64.exe {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64.exe -d -s $$arcpackedfile$$.tmp $$arcdatafile$$.tmp
But using inno setup I get "srep64:m3f unsupported compression method"
I have made sure to include srep64.exe in [Files] and the ExtractTemporaryFile('srep64.exe') in the [Code] section,as well as arc.ini, but I still get the error, .
How can I extract srep64 with ISDone.dll / ISFreeArcExtract? Thank you, sorry for the double post.
Edit:Works fine with srep.exe but not srep64 i dont understand why, only thing i changed was srep64.exe to srep.exe. Why doesn't srep64 work with isdone but it does with just a .bat. How can I get it to work?
Also is there a way to change whether xlolz and srep 64 bit or 32 bit .exe is used depending on the user's system?
Edit2: I have changed the unpackcmd to srep64.exe -d -s -- <stdin> <stdout> and this seems to fix. I have also tried cls-srep.dll but I get a crc error...no error just using just srep64.exe and arc.ini.
describe19
24-02-2019, 18:48
I have another question: I am trying to make an array of strings I have tried this but it doesn't work:
var
MyArray: array [0..2] of string =('cat','dog','man');
Is it possible to declare and initialize an array of strings in such a way?
Razor12911
24-02-2019, 20:03
I have another question: I am trying to make an array of strings I have tried this but it doesn't work:
var
MyArray: array [0..2] of string =('cat','dog','man');
Is it possible to declare and initialize an array of strings in such a way?
var
MyArray: array of string;
begin
MyArray := ['cat','dog','man'];
describe19
26-02-2019, 04:36
var
MyArray: array of string;
begin
MyArray := ['cat','dog','man'];
Thank you! I could not find the proper syntax for inno pascal anywhere! Is there documentation I can learn from?
Razor12911
26-02-2019, 06:45
Thank you! I could not find the proper syntax for inno pascal anywhere! Is there documentation I can learn from?
Try this
https://www.tutorialspoint.com/pascal/
Anyone knows if there is SuspendProc for ISDone too?
Respectively to pause TimeStr2.
amin fear
09-11-2019, 04:50
I am getting "unarc.dll error code: -12 check sum error" at first percent/% of my setup decompression phase on SOME windows systems using below XTOOL command :
The decompression goes without error on most systems but on a few systems gives "unarc.dll error code: -12 check sum error" , anybody knows some solution for this ? increasing virtual memory does not help ! the system has 16GB Ram + CPU corei5 ,so the problem is not from computer resources , its very odd
xZLib+srep:m3f+4x4:b128mb:lzma:ultra:64m:bt4:fb273 :lc8:mc1000000
I am getting "unarc.dll error code: -12 check sum error" at first percent/% of my setup decompression phase on SOME windows systems using below XTOOL command :
The decompression goes without error on most systems but on a few systems gives "unarc.dll error code: -12 check sum error" , anybody knows some solution for this ? increasing virtual memory does not help ! the system has 16GB Ram + CPU corei5 ,so the problem is not from computer resources , its very odd
xZLib+srep:m3f+4x4:b128mb:lzma:ultra:64m:bt4:fb273 :lc8:mc1000000
Use XTool 12_x86 for Decompression
and Edit CLS.ini
[SREP]
Bufsize=24m
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
Memory=512m
TempPath=.\
I'm having this error:
An error ocurred while unpacking: Unable to write data to disk!
Unarc.dll returned an error code: -11
ERROR: archive data corrupted (decompression fails)
What has me puzzled is that it occurs at random: 1%, 16.7%, 30%, sometimes even 40%, if the source was corrupted shouldn't it always fail at the same progress? I tried searching online and found a few methods(defrag, temp delete, increase page file, copy unarc.dll to game dir) with no success.
amin fear
11-11-2019, 00:20
Use XTool 12_x86 for Decompression
and Edit CLS.ini
[SREP]
Bufsize=24m
transfer_ReadBufSize=512k
transfer_WriteBufSize=512k
Memory=512m
TempPath=.\
Thanks Simorq jan , the following error as i mentioned , resolved by pre-installing Visual C++ 2013 by using below CIU config :
[LauncherSettings]
-------------------------------------------------------
InstallRedist=1
[Launch1]
Name=Visual C++ 2013
64Exe={src}\vcredist_x64_2013.exe
Argument=/q /passive
BeforeInstall=1
Checked=1
First installed Visual C++ 2013 , then unpacking data process started without any problem !
Is "XTool 12_x86" still dependent to Visual C++ 2013 ?
*************************************************
"unarc.dll error code: -12 check sum error" was very deceiving !:):):)
Nobody can guess the cause at first glimpse !
artexjay
13-11-2019, 09:00
Hello all,
I'm quite new to inno setup and new here as well. I have been having trouble with one of inno's addons mainly the uninshs. It's supposed to modify the uninstaller so that it prompts the user if they want to modify, repair or remove the program.
So the issue I'm having is that when i try to uninstall it doesn't do anything it simply closes the uninstaller but no files are removed. I did my best to follow the readme for properly adding it to the inno setup.
My setup simply installs the default inno myprog.exe. Im trying to understand the addons better first. I haven't done any compression tests yet.
This is what i have so far in my code:
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "MyProg.exe"
[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={{413F3F57-3FFB-4B22-B47C-1D9DE9772114}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={commonpf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=mysetup
Compression=lzma
SolidCompression=yes
DisableWelcomePage=False
ShowTasksTreeLines=True
WizardResizable = Yes
#define Use_UninsHs_Default_CustomMessages
#include "uninshs.iss"
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Components]
Name: main; Description: "Main"; Types: full compact custom; Flags: fixed
[Files]
Source: "C:\Users\artex\AppData\Local\Programs\Inno Setup 6\Examples\MyProg.exe"; DestDir: "{app}";
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: shellexec skipifdoesntexist nowait skipifsilent postinstall; \
Check: UninsHs_IsInstallation();
[Codes] //change to [Code (in inno)]
{ RedesignWizardFormBegin } // Don't remove this line!
// Don't modify this section. It is generated automatically.
procedure RedesignWizardForm;
begin
with WizardForm do
begin
AutoScroll := False;
ClientHeight := ScaleY(366);
ClientWidth := ScaleX(500);
end;
with WizardForm.NextButton do
begin
Left := ScaleX(388);
Top := ScaleY(330);
end;
with WizardForm.ProgressGauge do
begin
Height := ScaleY(13);
end;
with WizardForm.CancelButton do
begin
Left := ScaleX(32);
Top := ScaleY(330);
end;
with WizardForm.BackButton do
begin
Left := ScaleX(300);
Top := ScaleY(330);
end;
{ ReservationBegin }
// This part is for you. Add your specialized code here.
{ ReservationEnd }
end;
// Don't modify this section. It is generated automatically.
{ RedesignWizardFormEnd } // Don't remove this line!
procedure InitializeWizard();
begin
UninsHs_InitializeWizard();
RedesignWizardForm;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
UninsHs_CurPageChanged(CurPageID);
end;
function ShouldSkipPage(CurPageId: Integer): Boolean;
begin
Result := False;
UninsHs_ShouldSkipPage(CurPageId, Result);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
UninsHs_NextButtonClick(CurPageID, Result);
end;
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
UninsHs_CancelButtonClick(CurPageID, Cancel, Confirm);
end;
function InitializeUninstall(): Boolean;
begin
Result := True;
UninsHs_InitializeUninstall(Result);
end;
Any help would be appreciated. Thank you
Sometimes randomly whenever I repack games and extract/install, I receive this error from Lolz:
Can't open read file mapping
Masquerade
10-02-2020, 11:12
I have compressed an archive using Bink Pack (multiple .bik files). Compression is all good (no FreeArc errors) but whenever I feed it to my installer for decompression, I always get the following error:
https://i.imgur.com/vqpLPCL.png
As far as I know, CLS-BPK.DLL is the only way of decompressing files compressed using BPK (.exe). Not too sure what could be causing this error, I have tried recompressing the files, to no avail. I am using a standalone Arc CLI compressor with only BPK hooked up.
I am using Advanced Simple Installer Script v7.1.3 (if this helps).
If any more info is required I'll happily provide.
mausschieber
11-02-2020, 01:47
I have compressed an archive using Bink Pack (multiple .bik files). Compression is all good (no FreeArc errors) but whenever I feed it to my installer for decompression, I always get the following error:
https://i.imgur.com/vqpLPCL.png
As far as I know, CLS-BPK.DLL is the only way of decompressing files compressed using BPK (.exe). Not too sure what could be causing this error, I have tried recompressing the files, to no avail. I am using a standalone Arc CLI compressor with only BPK hooked up.
I am using Advanced Simple Installer Script v7.1.3 (if this helps).
If any more info is required I'll happily provide.
This feature isn't supported
FREEARC_ERRCODE_NOT_IMPLEMENTED= -8; (* Requested feature isn't supported *)
I have compressed an archive using Bink Pack (multiple .bik files). Compression is all good (no FreeArc errors) but whenever I feed it to my installer for decompression, I always get the following error:
https://i.imgur.com/vqpLPCL.png
As far as I know, CLS-BPK.DLL is the only way of decompressing files compressed using BPK (.exe). Not too sure what could be causing this error, I have tried recompressing the files, to no avail. I am using a standalone Arc CLI compressor with only BPK hooked up.
I am using Advanced Simple Installer Script v7.1.3 (if this helps).
If any more info is required I'll happily provide.
Try to use another compressor with bpk
I want to create shortcuts with CreateShellLink function, it works for {commondesktop} but not for {group} nor {userstartmenu} / {commonstartmenu}. Why?
I read the information directly from INI file.
if IniKeyNotEmpty('Executable', 'Exe') then
begin
CreateShellLink(
ExpandConstant('{commonstartmenu}\' + GetIniString('Executable', 'ExeName', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'),
GetIniString('Executable','ExeName','',ExpandConst ant('{tmp}\Settings.ini')),
GetIniString('Executable','Exe','',ExpandConstant( '{tmp}\Settings.ini')),
GetIniString('Executable','ExeParam','',ExpandCons tant('{tmp}\Settings.ini')),
'',
'',
0,
SW_SHOWNORMAL
);
end;
I want to create shortcuts with CreateShellLink function, it works for {commondesktop} but not for {group} nor {userstartmenu} / {commonstartmenu}. Why?
I read the information directly from INI file.
Post a usage example [Executable] section.
Perhaps because the folder where you are going to create the shortcut does not exist.
Perhaps because the executable does not exist (But I think it should create such randomness).
The path to Exe must be expanded if you use constants like {app}...
If the shortcut destination contains a subfolder, create the folder before calling CreateShellLink using:
ForceDirectories(ExpandConstant( FolderName ));
if IniKeyNotEmpty('Executable', 'Exe') then
begin
CreateShellLink(
ExpandConstant('{commonstartmenu}\' + GetIniString('Executable', 'ExeName', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'),
GetIniString('Executable','ExeName','',ExpandConst ant('{tmp}\Settings.ini')),
ExpandConstant(GetIniString('Executable','Exe','', ExpandConstant('{tmp}\Settings.ini'))),
GetIniString('Executable','ExeParam','',ExpandCons tant('{tmp}\Settings.ini')),
'',
'',
0,
SW_SHOWNORMAL
);
end;
Here created correctly.
https://i.imgur.com/5ZO5ImN.jpg
The path to Exe must be expanded if you use constants like {app}...
This was the error.
Thanks!
For all the code I just overlooked this:D:p
So, how to delete the shortcuts after uninstall?
IS help tells me to do this through [UninstallDelete], but how?
DiCaPrIo
24-04-2020, 10:10
try it it might delete
[UninstallDelete]
Type: FilesAndOrDirs; Name: {app}
Type: Files; Name: {code:GetIconDir}
#define IconName ReadIni(SourcePath + "\Settings.ini", "Executable", "ExeName", "")
[Code]
function GetIconDir(Value:String):string;
begin
Result:=ExpandConstant('{commonstartmenu}\{#IconNa me}.lnk')
end;
Thanks. Will look into this later :D
Edit: It works but only for one icon (not for both). Not very smart because I have to create functions for both desktop and group icons ^^
However, I just did it this way until I find a better way
[UninstallDelete]
Type: files; Name: {userdesktop}\{#Shortcut1Name}.lnk
Type: files; Name: {userstartmenu}\{#Name}\{#Shortcut2Name}.lnk
So, how to delete the shortcuts after uninstall?
IS help tells me to do this through [UninstallDelete], but how?
You can do it through [UninstallDelete].
But as the shortcut was created on installation in the code, you can remove this shortcut using the code in the:
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
if IniKeyNotEmpty('Executable', 'Exe') then
begin
DeleteFile(ExpandConstant('{commonstartmenu}\' + GetIniString('Executable', 'ExeName', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'));
end;
In this way, the Settings.ini file must be copied to the installation folder during installation and when uninstalling it must be copied to the temp folder at:
function InitializeUninstall (): Boolean;
I did it this way too, but doesn't work.
My old code
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
case of usPostUninstall
begin
DeleteFile(ExpandConstant('{userdesktop}\' + GetIniString('Executable', 'Shortcut1Name', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'));
DeleteFile(ExpandConstant('{userstartmenu}\' + GetIniString('Executable', 'Shortcut1Name', '', ExpandConstant('{tmp}\Settings.ini')) + '.lnk'));
end;
Maybe I should have test this with ForceDirectories function?
Edit:
In this way, the Settings.ini file must be copied to the installation folder during installation and when uninstalling it must be copied to the temp folder at:
function InitializeUninstall (): Boolean;
Ok, that explains alot. Unfortunatelly not an option for me.
[UninstallDelete]
#define i 0
#sub RemoveShortcut
#emit "Type: Files; Name: ""{userdesktop}" + Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ExeName", "")) + ".lnk"";"
#emit "Type: Files; Name: ""{userprograms}" + Trim(ReadIni(SourcePath + "\Settings.ini", "Settings", "Name", "")) + "" + Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ExeName", "")) + ".lnk"";"
#endsub
#for {i = 1; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ExeName", "")) != ""; i++} RemoveShortcut
I attached another example using ISPP and the icons section.
Using ISPP it is not possible to change the name of the shortcuts by changing any external ini after compiling the script
Thanks Cesar.
But there seems to be a problem with this ispp code.
I have this
[Executable1]
ShortcutName=Application
ExePath=bin\Application.exe
ExeParam=-Testparameter
Path is always "C:\bin" (I use {sd}\Games constant as default) and my test archive is like this: Archive.arc\bin\application.exe
The shortcut on desktop and startmenu is always C:\bin\application.exe.
I would like it read from INI: DefaultInstallDir={sd}\Games\{#Name}
Thanks Cesar.
But there seems to be a problem with this ispp code.
I have this
[Executable1]
ShortcutName=Application
ExePath=bin\Application.exe
ExeParam=-Testparameter
Path is always "C:\bin" (I use {sd}\Games constant as default) and my test archive is like this: Archive.arc\bin\application.exe
The shortcut on desktop and startmenu is always C:\bin\application.exe.
I would like it read from INI: DefaultInstallDir={sd}\Games\{#Name}
Try as in the attachment...
@KaktoR, I changed the attachment.
If you don't want to use tasks for the desktop shortcut, simply remove the [Tasks] section and also + "Tasks: desktopicon;" the shortcut line.
If you do not want to use a URL, simply do not include the lines referring to the URL shortcut.
Thanks, this works fine.
I just don't understand all of this ispp things... Will read about it some more.
Thanks, this works fine.
I just don't understand all of this ispp things... Will read about it some more.
The ISPP performs procedures (ISPP Procedures) before compiling the script by changing the script text.
In the example in the above file you are saving a preprocessed script.
This file is used to visualize how the preprocessed code will look.
If using ISPP it is not possible to use an external Settings.ini with settings for shortcuts.
Using ISPP the settings.ini settings are "copied" to script.iss when compiling and cannot be changed afterwards.
doofoo24
25-05-2020, 10:54
does the new inno 6.0.5 have Dark theme built-in ?
Masquerade
02-06-2020, 05:33
Hello all, I have been adding the module ITDownload (http://www.sherlocksoftware.org/page.php?id=51) to my installer script, so redist files can be downloaded instead of me having to bundle them into the installer.
I currently have everything integrated, here is an example:
procedure InstallRedists;
begin
itd_init;
#ifdef directx
itd_addfile('https://download.microsoft.com/download/1/7/1/1718CCC4-6315-4D8E-9543-8E28A4E18C4C/dxwebsetup.exe',expandconstant('{app}\_Redist\dxwe bsetup.exe'));
#endif
itd_downloadafter(wpInstalling);
#ifdef directx
Exec2(ExpandConstant('{app}\_Redist\dxwebsetup.exe '),'',true);
#endif
end;
At the start of the script, #define directx exists so this code does apply.
I integrated into the script the iss file and module:
#include "Resources\Modules\itd\it_download.iss"
However now when compiling, this error appears:
https://i.imgur.com/Ea67Y36.png
Does anyone know what this error could mean? The error lies in the iss script for the ITDownlaod module and not in my installer script.
I am using Inno Setup Unicode 6.0.3
pincoball
02-06-2020, 06:15
Seems like the variable type PChar is not anymore compatible with Inno Setup 6.
https://jrsoftware.org/ishelp/index.php?topic=unicode
Quoting:
Its 'PChar' type has been renamed to 'PAnsiChar'
and
If you want to compile an existing script that imports ANSI Windows API calls with the Unicode compiler, either upgrade to the 'W' Unicode API call or change the parameters from 'String' or 'PChar' to 'AnsiString'. The 'AnsiString' approach will make your [Code] compatible with both the Unicode and the non Unicode version.
Try replacing in the mentioned script from PChar to either PAnsiChar or AnsiString
Masquerade
02-06-2020, 07:07
Try replacing in the mentioned script from PChar to either PAnsiChar or AnsiString
Compiling works, brilliant!
On testing though, things get a little nasty:
https://i.imgur.com/4wUj20w.png
The progress bar is at 100% so the redist downloader process is began.
Installing/Uninstalling works without checking redist box so the script still functions. Only with redist selected will cause this.
Edit: the module is loaded, behind the buttons that the text for the module is there (the progress bar, eta etc..).
pincoball
02-06-2020, 07:31
I think that this module is pretty old and it might not support newer versions of Inno Setup thus the problem may arise from another incompatibility... but I think that something else can be done.
Have you tried translating the error message? I know that if you cannot copy and paste you should rely on OCR reading from the screenshot but I think you might give it a try if it says something relevant
Also, does it give the same problem with both PAnsiChar and AnsiString?
Compiling works, brilliant!
On testing though, things get a little nasty:
https://i.imgur.com/4wUj20w.png
The progress bar is at 100% so the redist downloader process is began.
Installing/Uninstalling works without checking redist box so the script still functions. Only with redist selected will cause this.
Edit: the module is loaded, behind the buttons that the text for the module is there (the progress bar, eta etc..).
Can you send me the code that is showing this image message?
I would like to analyze this.
Another way to make Unicode and Ansi compatible is to just include this before the functions that PChar uses.
#ifdef UNICODE
type
PChar = PAnsiChar;
#endif
I found it much more interesting to download this module DwinsHs (https://www.han-soft.com/dwinshs.php).
The FTP, HTTP and HTTPS protocols are supported.
Masquerade
03-06-2020, 06:44
I found it much more interesting to download this module DwinsHs (https://www.han-soft.com/dwinshs.php).
The FTP, HTTP and HTTPS protocols are supported.
Thank you Cesar, I will try and implement this. Is there a way to add an extra page to the installer after installing for the redist downloading? I am using the ASIS script which already has an extra page for CRC checking.
Thank you Cesar, I will try and implement this. Is there a way to add an extra page to the installer after installing for the redist downloading? I am using the ASIS script which already has an extra page for CRC checking.
Sure. Just create a new page :D
Look on how the CRCPage was created. This should guide you in the right direction :p
bunti_o4u
19-06-2020, 09:07
I am trying to load the items in a combobox from a text file but whats it loading is the last line and not all the lines..
Pl help. Thnx in advance..
var
S: String;
function GetFileLines(const FileName: string; out Items: string): Boolean;
var
FileLines: TArrayOfString;
LineIndex: Integer;
begin
Result:= LoadStringsFromFile(FileName, FileLines);
if Result then
for LineIndex:=0 to (GetArrayLength(FileLines)-1) do
Items:= FileLines[LineIndex];
end;
Combobox1:= TComboBox.Create(WizardForm);
with Combobox1 do
begin
Parent:=WizardForm;
SetBounds(left, Top, Width, Height);
Style:=csDropDown;
Color:=clWhite;
if GetFileLines(ExpandConstant('{src}\Text.ini'), S) then
Items.Add(S);
end;
I am trying to load the items in a combobox from a text file but whats it loading is the last line and not all the lines..
Pl help. Thnx in advance..
var
S: String;
function GetFileLines(const FileName: string; out Items: string): Boolean;
var
FileLines: TArrayOfString;
LineIndex: Integer;
begin
Result:= LoadStringsFromFile(FileName, FileLines);
if Result then
for LineIndex:=0 to (GetArrayLength(FileLines)-1) do
Items:= FileLines[LineIndex];
end;
Combobox1:= TComboBox.Create(WizardForm);
with Combobox1 do
begin
Parent:=WizardForm;
SetBounds(left, Top, Width, Height);
Style:=csDropDown;
Color:=clWhite;
if GetFileLines(ExpandConstant('{src}\Text.ini'), S) then
Items.Add(S);
end;
TRY:
procedure GetFileLines(const FileName: string; var Combo: TComboBox);
var
FileLines: TArrayOfString;
LineIndex: Integer;
begin
if LoadStringsFromFile(FileName, FileLines) then
for LineIndex := 0 to GetArrayLength(FileLines) - 1 do
Combo.Items.Add(FileLines[LineIndex]);
end;
Combobox1:= TComboBox.Create(WizardForm);
with Combobox1 do
begin
Parent := WizardForm;
SetBounds(left, Top, Width, Height);
Style := csDropDown;
Color := clWhite;
GetFileLines(ExpandConstant('{src}\Text.ini'), Combobox1)
end;
bunti_o4u
19-06-2020, 13:49
TRY:
I have done the same but forgot to put var in the procedure procedure GetFileLines(const FileName: string; var Combo: TComboBox);
Thank you.. it worked but now I am facing another problem.
I have second Combobox which is dependent on first combobox for its filename. Procedure is generating Combobox1.Items.Text as Line1Line2Line3(...).ini
Pl tell me how to fix it..
Combobox2:= TComboBox.Create(WizardForm);
with Combobox2 do
begin
Parent := WizardForm;
SetBounds(left, Top, Width, Height);
Style := csDropDown;
Color := clWhite;
GetFileLines(ExpandConstant('{src}\'+ ComboBox1.Items.Text +'.ini'), Combobox2)
end;
I have second Combobox which is dependent on first combobox for its filename. Procedure is generating Combobox1.Items.Text as Line1Line2Line3(...).ini
Pl tell me how to fix it..
Combobox2:= TComboBox.Create(WizardForm);
with Combobox2 do
begin
Parent := WizardForm;
SetBounds(left, Top, Width, Height);
Style := csDropDown;
Color := clWhite;
GetFileLines(ExpandConstant('{src}\'+ ComboBox1.Items.Text +'.ini'), Combobox2)
end;
TRY
var
I: Integer
Combobox2:= TComboBox.Create(WizardForm);
with Combobox2 do
begin
Parent := WizardForm;
SetBounds(left, Top, Width, Height);
Style := csDropDown;
Color := clWhite;
for I := 0 to Combobox1.Items.Count - 1 do
GetFileLines(ExpandConstant('{src}\' + ComboBox1.Items.Strings[I]), Combobox2)
end;
bunti_o4u
20-06-2020, 01:54
TRY
Thank you for helping me out..
This code didn't work.. I am trying something else and I don't know whether it would fix it or not..
Pl have a look at the attached script..
Thank you for helping me out..
This code didn't work.. I am trying something else and I don't know whether it would fix it or not..
Pl have a look at the attached script..
Try attached file.
I added 2 modes. (I commented on the mode with external functions)
bunti_o4u
20-06-2020, 08:52
Try attached file.
I added 2 modes. (I commented on the mode with external functions)
Thank you very much..
it's working smooth as butter..
Hey guys.
Can someone help me with a problem.
I was wondering if you have a way to convert hexadecimal Cyrillic characters (string) to a string using only inno setup functions or just the windows API without including additional libraries.
Summing up: I would like to convert: C := Chr($05E2);
I attached a file with a function that uses this, but I can't get it to work without including an additional library (I don't want to use Libs)
If some of the more knowledgeable users can help me, thank you in advance.
Please look at the attached code.
Razor12911
21-06-2020, 03:24
Hey guys.
Can someone help me with a problem.
I was wondering if you have a way to convert hexadecimal Cyrillic characters (string) to a string using only inno setup functions or just the windows API without including additional libraries.
Summing up: I would like to convert: C := Chr($05E2);
I attached a file with a function that uses this, but I can't get it to work without including an additional library (I don't want to use Libs)
If some of the more knowledgeable users can help me, thank you in advance.
Please look at the attached code.
$05E2 is not Cyrillic, it's Hebrew
Chr accepts byte value and returns ASCII value, $0532 is a Word value
You must use #$???? For UTF-8 format, example C := #$05E2
$05E2 is not Cyrillic, it's Hebrew
Chr accepts byte value and returns ASCII value, $0532 is a Word value
You must use #$???? For UTF-8 format, example C := #$05E2
Yes, I ended up putting the non-Cyrillic example, but it has the same meaning.
They are Word values.
I know that chr only supports Byte and these type of characters are word type.
But as in the script example, I need to convert a hexadecimal string read from the inno setup language file and convert it to a string (text).
S1 := '<0420><0443><0441><0441><043A><0438><0439>';
From this string above I need to return: "Русский"
I want to do this using only API or in the script itself if there is im way to do this without external DLL.
Please take a look at the script.
bunti_o4u
21-06-2020, 11:37
S1 := '<0420><0443><0441><0441><043A><0438><0439>';
From this string above I need to return: "Русский"
I hope you want this...
BTW if you are on discord pl add me (discord id: buntionly4u#4466)
function InitializeSetup(): Boolean;
var
S1, S2: String;
begin
S1 := #$0420+#$0443+#$0441+#$0441+#$043A+#$0438+#$0439;
MsgBox(S1, mbInformation, MB_OK);
end;
I hope you want this...
BTW if you are on discord pl add me (discord id: buntionly4u#4466)
function InitializeSetup(): Boolean;
var
S1, S2: String;
begin
S1 := #$0420+#$0443+#$0441+#$0441+#$043A+#$0438+#$0439;
MsgBox(S1, mbInformation, MB_OK);
end;
Thanks for responding, but it's not that simple.
I get the string using the ISPP by calling the ReadIni function.
Check the Russian.isl language language of Inno Setup and try to read the key LanguageName= using GetIniString and try to transform it into text as in your message.
Download the ChrW script that you will understand.
Hey guys&girls :p
I'm looking for a char (preferably) or icon (max 14x14px) to display free/need space, which can be understand in any language (or at least most).
Anyone have ideas?
I already had looked through windows charmap but can't find anything usefull.
bunti_o4u
22-06-2020, 12:15
If we want to run any task during installation we can use below command which run the task or other program in a separate window:
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.
If yes then pl tell how to do it..
Thanks in advance..
DiCaPrIo
22-06-2020, 13:25
If we want to run any task during installation we can use below command which run the task or other program in a separate window:
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.
If yes then pl tell how to do it..
Thanks in advance..
here
download ISutils and got the CaptureConsole.iss
https://www.fileforums.com/showthread.php?t=99835
If we want to run any task during installation we can use below command which run the task or other program in a separate window:
function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;
I just want to know - can we add console within wizard page instead of separate windows to show console details to user.
If yes then pl tell how to do it..
Thanks in advance..
If you use capture console you will not be able to interact.
Be aware that the commands used do not ask for confirmation.
bunti_o4u
22-06-2020, 14:59
here
download ISutils and got the CaptureConsole.iss
https://www.fileforums.com/showthread.php?t=99835
Thanks.. It worked with my script. But it throwing weird output don't know why.
If you use capture console you will not be able to interact.
Be aware that the commands used do not ask for confirmation.
Thanks for info.
Thanks.. It worked with my script. But it throwing weird output don't know why.
Thanks for info.
If you want, send me the script by PM that I take a look.
DiCaPrIo
23-06-2020, 01:57
[QUOTE=bunti_o4u;486495]Thanks.. It worked with my script. But it throwing weird output don't know why.
https://docs.microsoft.com/en-us/windows/console/readconsoleoutput
BLACKFIRE69
23-06-2020, 01:59
Thanks.. It worked with my script. But it throwing weird output don't know why.
Thanks for info.
seems to be a incorrect encoding. :rolleyes:
DiCaPrIo
23-06-2020, 02:39
seems to be a incorrect encoding. :rolleyes:
No it's correct you need to use ReadConsoleOutputW for exact output
bunti_o4u
23-06-2020, 07:30
If you want, send me the script by PM that I take a look.
I have shared the script...
No it's correct you need to use ReadConsoleOutputW for exact output
still the same type of output..
I think it is writing the output per second....
Ideally it should write output if there is change in output string..
Why :confused::D
https://i.imgur.com/gx9CBzl.png
pincoball
26-06-2020, 12:10
Why :confused::D
I guess it's from the ASIS.
Could you send the entire code? I don't get that warning when compiling any version of it
Edit: I get it as well with compact mode = 1, that code it's not used after preprocessing (ISPP), that's why it give you that warning
The code after line 4503 shown in the screen it's not present during the compiling
I already got it :p
But it's not that bad anyway. I was just courios.
Why :confused::D
Was this capture not made before recompiling (Previous Debug)?
You would not have been able to compile with the variable ReloadComponents outside the area defined in the ISPP
ReloadComponents: = False;
Copy from the bottom and paste into the variable declaration this:
#if UseComponents == "1"
NOTES: The ISPP can also be used to limit a variable whether or not it is defined.
var
//////////////////////// Check boxes ////////////////////////
IconsCB, StartMenuCB, {#if CheckCRC == "1"}CRCCheckCB,{#endif} PauseCB, UninstallCB, LimitRAMCB: TNewCheckBox;
mustafaabd
27-06-2020, 06:57
i have problem with xtool unpack
i use this method code to Compress
-mxprecomp+srep:m3f:a16:d1g+lolz:dtb1:d128m:mtt1:mt 8:tt8:mc1023:fba0
and this arc.ini fail
[External compressor:lolz]
header = 0
packcmd = lolz_x64.exe {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
[External compressor:srep]
header = 0
packcmd = srep64 {-option } $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64 -d -s -- <stdin> <stdout>
[External compressor:xprecomp]
header = 0
packcmd = xtool.exe e:precomp:t90p:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xzlib]
header = 0
packcmd = xtool.exe e:precomp:t90p,c128mb:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xzstd]
header = 0
packcmd = xtool.exe e:precomp:t90p:zstd - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xlz4]
header = 0
packcmd = xtool.exe e:precomp:t90p:lz4 - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xlzo]
header = 0
packcmd = xtool.exe e:precomp:t90p:lzo - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
but
this error when use any Script to unpack
https://i.imgur.com/eNZpaMU.jpg
https://i.imgur.com/WAoRxYb.jpg
:confused:
mausschieber
27-06-2020, 13:03
i have problem with xtool unpack
i use this method code to Compress
-mxprecomp+srep:m3f:a16:d1g+lolz:dtb1:d128m:mtt1:mt 8:tt8:mc1023:fba0
and this arc.ini fail
[External compressor:lolz]
header = 0
packcmd = lolz_x64.exe {options} $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
[External compressor:srep]
header = 0
packcmd = srep64 {-option } $$arcdatafile$$.tmp $$arcpackedfile$$.tmp
unpackcmd = srep64 -d -s -- <stdin> <stdout>
[External compressor:xprecomp]
header = 0
packcmd = xtool.exe e:precomp:t90p:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xzlib]
header = 0
packcmd = xtool.exe e:precomp:t90p,c128mb:zlib - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xzstd]
header = 0
packcmd = xtool.exe e:precomp:t90p:zstd - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xlz4]
header = 0
packcmd = xtool.exe e:precomp:t90p:lz4 - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
[External compressor:xlzo]
header = 0
packcmd = xtool.exe e:precomp:t90p:lzo - - <stdin> <stdout>
unpackcmd = xtool.exe d:precomp:t4 - - <stdin> <stdout>
but
this error when use any Script to unpack
https://i.imgur.com/eNZpaMU.jpg
https://i.imgur.com/WAoRxYb.jpg
:confused:
as the Error says
RC_ERRCODE_INVALID_COMPRESSOR= -2; (* Invalid compression method or parameters *)
Hi guys
I am a beginner at this, I am trying to repack a 60gb game (Heat) and I am confused on how to add FreeARC to my installer. Can someone give me a tutorial? I am super interested in repacking/compressing games. Can you send me some guides through private message?
Thanks
Masquerade
17-07-2020, 07:40
Hi all, dipping my feet back into the Inno pool again - I have gotten to the point where I am trying to add a label, but the label does not show up. Perhaps I am missing something?
[code]
var
DesktopIconCheckBox: TNewCheckBox;
Progress: TNewProgressBar;
RequiredLabel: TLabel;
Requiredlabel := TLabel.Create(WizardForm);
with Requiredlabel do
begin
SetBounds(10, 160, 390, 25);
RequiredLabel.Caption := ExpandConstant('{cm:RequiredSpace} {#Size}');
end;
{#Size} is a predefined variable.
procedure CurPageChanged(CurPageID: integer);
begin
if CurPageID = wpWelcome then
begin
Progress.Hide;
RequiredLabel.Show;
end;
This is the code for the lable, but it does not show when the installer is running:
https://i.imgur.com/7glfbBQ.png
The pink highlights were the label is meant to be.
Try to change the parent of the label
Parent := WizardForm(.WelcomePage);
If this doesn't has any effect, try to make the position in relation to the DirEdit form
SetBounds(WizardForm.DirEdit.Left, WizardForm.DirEdit.Top + ScaleX(20), ScaleX(390), ScaleY(25));
Sometimes it's complicated because parents are different and positions get broke :D
PS: And if I were you, I would change the SetBounds integers and add ScaleX/Y to it :p
Masquerade
18-07-2020, 09:03
Adding the parent made it work, thank you! That'll explain why I couldn't get other things to appear too.
Masquerade
04-08-2020, 06:40
Hi, does Exec2 support extra parameters on files?
Say if I want to use 78372's directory patcher, it needs:
dpzapply patch.dpz {app} - but the normal application cannot understand {app}, so Inno has to execute it - can Inno do this?
Yes it does.
function Exec2 (FileName, Param: PAnsiChar; Show: boolean):boolean;
Exec2(ExpandConstant('{app}\DirPatcher.exe'), 'dpzapply patch.dpz', true);
Masquerade
04-08-2020, 09:12
Thanks, can Exec2 run .msi executables too? I tried with the XNA framework redist installer however Exec2 didn't seem to do anything. Maybe I mis typed the command.
Thank you for the helpful answer.
I don't think so.
I don't remember exactly, but you have to run a system executable (from windows system folder) with the msi file as parameter. I really don't remember which file this was ... :p
Edit: https://jrsoftware.org/iskb.php?msi
Masquerade
04-08-2020, 11:43
I don't think so.
I don't remember exactly, but you have to run a system executable (from windows system folder) with the msi file as parameter. I really don't remember which file this was ... :p
Edit: https://jrsoftware.org/iskb.php?msi
Oh of course! I completely forgot about how msi exec worked. Thanks for all of the help!
BLACKFIRE69
05-08-2020, 10:59
Does anyone know how to show up the decompression percentage of a file which in inside a archive with ISDone?
i mean if i decompress a archive like data1.bin with ISDone, i need to show up the percentage of a file (like tanks.pak) inside the archive.
for a example :=
Total : 24% completed.
current archive : data1.bin (86% completed).
process file : {app}\game\tanks.pak (68% extracted)
(i hope you understand what i mean. :rolleyes:)
I think this is at least possible with unarc.
At least the freearc example is able to do this (but I don't know if the example is using isdone).
BLACKFIRE69
05-08-2020, 12:17
I think this is at least possible with unarc.
At least the freearc example is able to do this (but I don't know if the example is using isdone).
freearc example ?
Epic Titan 69
21-02-2021, 22:11
freearc example ?
Adding ISHASH.dll to Windows Phone Installer
Can Anyone Help Me Adding This Script (https://fileforums.com/showthread.php?t=103790)
To The Below Script
Windows Phone Installer Script (https://fileforums.com/showthread.php?t=102774&highlight=windows)
Plz Do Help As I am A Newbie(usually Noob) In SCRIPTING SETUPS
I repacked a game using FreeArc (and XTool19H8, SREP and LOLZ), what tool is best to create a simple setup .exe (no graphics needed) to install redists / decompress the game files?
freearc example ?
I think KaktoR refers to the example without IsDone as the example in the attachment.
I repacked a game using FreeArc (and XTool19H8, SREP and LOLZ), what tool is best to create a simple setup .exe (no graphics needed) to install redists / decompress the game files?
I didn't understand the version of XTool you used.
As you have already compressed the game, the same compressor/decompressor (or similar) must be used to decompress the game.
Maybe you can use Light Installer Script 1.0.0.7 (https://www.fileforums.com/showpost.php?p=485107&postcount=3) and define the compressors you used in COMPRESSOR_GUI.exe.
You may need to replace the XTool exes with the one you used for compression (testing only).
If you can recompress the game you can use the latest "Light Installer Script v1.0.0.8 (https://www.fileforums.com/showthread.php?t=103408)".
I didn't understand the version of XTool you used.
As you have already compressed the game, the same compressor/decompressor (or similar) must be used to decompress the game.
Maybe you can use Light Installer Script 1.0.0.7 (https://www.fileforums.com/showpost.php?p=485107&postcount=3) and define the compressors you used in COMPRESSOR_GUI.exe.
You may need to replace the XTool exes with the one you used for compression (testing only).
If you can recompress the game you can use the latest "Light Installer Script v1.0.0.8 (https://www.fileforums.com/showthread.php?t=103408)".
I'll try it out, thanks
Does anyone know any way to send a text from one Inno Setup executable to another?
Similar to the SendMessage function.
Is there any way to use WM_COPYDATA with SendMessage in Inno Setup?
It is not possible to configure WindowProc without pointers in innoSetup (It is not possible to type for TCopyDataStruct).
I've a problem. How to fix this? :confused:
https://i.ibb.co/Q6b8bbv/Screenshot-2021-03-18-142010.png
Example:
Load.ini
[Form]
; Language
cache1=En_us
; Position: X
cache2=$DeskWidth$ - 95%
; Position: Y
cache3=$DeskHeight$ - 90%
; Form Width
cache4=450
; Form Height
cache5=450
; Form Border
cache6=no
cache7, cache8, ...
Test.iss
{Code]
#define public i
#define public FCacheMax 26
#dim public FCache[5]
#sub CheckFCache
#define FCache[i] ReadIni(AddBackSlash(SourcePath) + "load.ini", "Form", StringChange("cacheInt","Int", Str(i)), "")
#endsub
#if ReadIni(AddBackSlash(SourcePath) + "load.ini", "Form", "cache1", "") != ""
#redim FCache[Int(FCacheMax)]
#for {i = 1; ReadIni(AddBackSlash(SourcePath) + "load.ini", "Form", StringChange("cacheInt","Int", Str(i)), "") !=""; i++} CheckFCache
#endif
function InitializeSetup(): Boolean;
begin
MsgBox('{#FCache[1]}', mbConfirmation, MB_OK);
end;
Change the lines:#define public FCache[i] ReadIni(...
...
#redim public FCache[Int(FCacheMax)]
Change the lines:#define public FCache[i] ReadIni(...
...
#redim public FCache[Int(FCacheMax)]
Thanks @Cesar82, it works. :)
Masquerade
28-03-2021, 00:52
I know there's an if/else but is there an if/else for ifdef?
Example:
#define example
#ifdef example
ExtractTemporaryFile('def.txt')
#else
ExtractTemporaryFile('notdef.txt')
#endif
Would that work?
Yes there is
https://jrsoftware.org/ispphelp/index.php?topic=directives
I know there's an if/else but is there an if/else for ifdef?
Example:
#define example
#ifdef example
ExtractTemporaryFile('def.txt')
#else
ExtractTemporaryFile('notdef.txt')
#endif
Would that work?
Yes. For ISPP there is more than one way to use ELSE like:
#define example 5
#if defined(example)
#if Example == 5
ExtractTemporaryFile('def5.txt')
#elif Example == 4
ExtractTemporaryFile('def4.txt')
#elif Example == 3
ExtractTemporaryFile('def3.txt')
#elif Example == 2
ExtractTemporaryFile('def2.txt')
#elif Example == 1
ExtractTemporaryFile('def1.txt')
#else
ExtractTemporaryFile('def.txt')
#endif
#else
ExtractTemporaryFile('notdef.txt')
#endif
P.S: elif = else if
Masquerade
07-05-2021, 12:24
Hello everyone, I am trying to add a progress bar to a script.
Progress:= TNewProgressBar.Create(WizardForm);
with Progress do
begin
Parent := WizardForm;
SetBounds(10, 150, 200, 0);
Max:=1000;
end;
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
begin
if OveralPct <=1000 then Progress.Position := OveralPct;
Result := ISDoneCancel;
end;
if CurPageID = wpInstalling then
begin
ExtractTemporaryFile('unarc.dll')
Progress.Show;
DesktopIconCheckBox.Enabled := false;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
ISDoneCancel:= 0
ISDoneError := true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) then begin
ChangeLanguage('English')
begin
repeat
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;
ISDoneError := false;
until true;
ISDoneStop;
end;
end;
end;
These above code snippets all are the code for the progress bar
I'm not entirely sure why the progress bar isn't showing up during installation.
I click "Install" to trigger wpInstalling.
THe directory box and the browse button disappear and the desktop icon checkbox is frozen. However, the progress bar does not appear.
Why could this be? Thanks!
Hello everyone, I am trying to add a progress bar to a script.
Progress:= TNewProgressBar.Create(WizardForm);
with Progress do
begin
Parent := WizardForm;
SetBounds(10, 150, 200, 0);
Max:=1000;
end;
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
begin
if OveralPct <=1000 then Progress.Position := OveralPct;
Result := ISDoneCancel;
end;
if CurPageID = wpInstalling then
begin
ExtractTemporaryFile('unarc.dll')
Progress.Show;
DesktopIconCheckBox.Enabled := false;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
ISDoneCancel:= 0
ISDoneError := true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) then begin
ChangeLanguage('English')
begin
repeat
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;
ISDoneError := false;
until true;
ISDoneStop;
end;
end;
end;
These above code snippets all are the code for the progress bar
I'm not entirely sure why the progress bar isn't showing up during installation.
I click "Install" to trigger wpInstalling.
THe directory box and the browse button disappear and the desktop icon checkbox is frozen. However, the progress bar does not appear.
Why could this be? Thanks!
Maybe it's because you set Parent = WizardForm.
If you are a native installer, the parent should be the wpInstalling page.
If you are an installer that uses the native interface, try setting the ProgressBar Parent to:
Parent: = WizardForm.ProgressGauge.Parent;
or
Parent: = WizardForm.InstallingPage;
DiCaPrIo
07-05-2021, 14:12
Hello everyone, I am trying to add a progress bar to a script.
Progress:= TNewProgressBar.Create(WizardForm);
with Progress do
begin
Parent := WizardForm;
SetBounds(10, 150, 200, 0);
Max:=1000;
end;
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
begin
if OveralPct <=1000 then Progress.Position := OveralPct;
Result := ISDoneCancel;
end;
if CurPageID = wpInstalling then
begin
ExtractTemporaryFile('unarc.dll')
Progress.Show;
DesktopIconCheckBox.Enabled := false;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
ISDoneCancel:= 0
ISDoneError := true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0, 0, 0, MainForm.Handle, 512, @ProgressCallback) then begin
ChangeLanguage('English')
begin
repeat
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\*.arc'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;
ISDoneError := false;
until true;
ISDoneStop;
end;
end;
end;
These above code snippets all are the code for the progress bar
I'm not entirely sure why the progress bar isn't showing up during installation.
I click "Install" to trigger wpInstalling.
THe directory box and the browse button disappear and the desktop icon checkbox is frozen. However, the progress bar does not appear.
Why could this be? Thanks!
because you didn't give height value SetBounds(10, 150, 200, 40);//(l,t,w,h)
Masquerade
09-05-2021, 06:10
Is there any way I can use ExtractTemporaryFile with the * wildcard?
Currently I have this:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?
DiCaPrIo
09-05-2021, 06:50
Is there any way I can use ExtractTemporaryFile with the * wildcard?
Currently I have this:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?
#define Resources "Files\*"
[Files]
Source: {#Resources}; DestDir: {tmp}; Flags: dontcopy
[Code]
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;
Is there any way I can use ExtractTemporaryFile with the * wildcard?
Currently I have this:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
However, how can I extract all of the files included above to {tmp} without manually specifiying everything (since I'm trying to desing the code so that anything in the Include folder will be extracted to {tmp})?
For not so old versions of Inno Setup you can use:
[Files]
Source: Include\*; DestDir: {tmp}; Flags: dontcopy
[ code]
function InitializeSetup(): Boolean;
begin
ExtractTemporaryFiles('{tmp}\*.*');
Result := True;
end;
If you use @files: in the path of any of the DLL functions they will be extracted automatically before the InitializeSetup function.
So I recommend you change to {tmp} in the DLL functions, or specify a destination other than {tmp} for them using the dontcopy flag.
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';
change to:
function ISArcExtract(CurComponent: Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile: Boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@{tmp}\ISDone.dll stdcall delayload';
Can anyone tell me if it is necessary to call these IsDone functions below if I do not use the ISFindFiles e and ISPrecompExtract and ISSRepExtract functions.
if not SrepInit(ExpandConstant('{app}\'), 512, 0) then
Break;
if not PrecompInit(ExpandConstant('{app}\'), 128, 0) then
Break;
if not FileSearchInit(True) then
Break;
IsDone's help is all in Russian and it would help a lot if someone who understands the language could share this information.
I will only use IsArcExtract, IsRarExtract, IS7ZipExtract and ISxDeltaExtract.
Masquerade
09-05-2021, 22:53
@Cesar82
No, you don't.
Can anyone tell me if it is necessary to call these IsDone functions below if I do not use the ISFindFiles e and ISPrecompExtract and ISSRepExtract functions.
if not SrepInit(ExpandConstant('{app}\'), 512, 0) then
Break;
if not PrecompInit(ExpandConstant('{app}\'), 128, 0) then
Break;
if not FileSearchInit(True) then
Break;
IsDone's help is all in Russian and it would help a lot if someone who understands the language could share this information.
I will only use IsArcExtract, IsRarExtract, IS7ZipExtract and ISxDeltaExtract.
Data taken from Help file..
function ISDoneInit (RecordFileName:string; TimeType, Comp1, Comp2, Comp3:Cardinal; WinHandle, NeededMem:longint; callback: TCallback):boolean;
When we initialize the ISDoneInit(...),This SrepInit,PrecompInit & FileSearchInit takes their default values.
function SrepInit (TmpPath:PAnsiChar; VirtMem, MaxSave:Cardinal):boolean;
function PrecompInit (TmpPath:PAnsiChar; VirtMem:cardinal; PrecompVers:single):boolean;
For Srep and Precomp if you want to extract the temp file [Virtualmem_00.srep and others] to specific location then use it.otherwise it is completely optional.
function FileSearchInit (RecursiveSubDir:boolean):boolean;
For FileSearchInit, subdirectories scanning is enabled by default.
If you specify true Then when specifying the input file name containing the mask (eg * .pcf), files will be searched in the same in all subdirectories from the specified path. If false - Only in the specified folder.
GaMEr_2077
28-05-2021, 07:42
Can anyone here tell me how can i direct my setup to install a font without informing the user and the first priority of setup must be installing the font
Thanks
pratikpatel8982
28-05-2021, 09:07
Can anyone here tell me how can i direct my setup to install a font without informing the user and the first priority of setup must be installing the font
Thanks
You can take a look at this: https://superuser.com/questions/201896/how-do-i-install-a-font-from-the-windows-command-prompt
GopnikRepackz
01-06-2021, 18:16
Hello everyone, trying to know how I can get the components to be fixed when in full installation but then selectable when in custom installation:
-The Full Installation at the moment-
https://imgur.com/aS2TWYh
-The Custom Installation at the moment-
https://imgur.com/Lgl13Fl
Thanks for the help!
Can someone Explain what does those two hyphen or minus do?
packcmd = xtool precomp -mzlib+preflate -c32mb -t100p --dbase=temp.db - - <stdin> <stdout>
Also these "<stdin> <stdout>" are only used in Installer's Arc.ini right? For UnArc.dll?
GaMEr_2077
07-06-2021, 00:43
is there any option in inno for example if component A is selected then the setup will extract specified file and if selected B then other specified file
Edit:- Files are embeded in installer
Masquerade
07-06-2021, 03:59
is there any option in inno for example if component A is selected then the setup will extract specified file and if selected B then other specified filer
I use a similar feature to what you ask in my installer, to decide whether a user will have a full power installation or limited installation ("Low Resource Mode")
if LowResourceCB.Checked then begin
ExtractTemporaryFile('low_ARC.ini');
ExtractTemporaryFile('low_CLS.ini');
end else begin
ExtractTemporaryFile('ARC.INI');
ExtractTemporaryFile('CLS.INI');
end;
Hopefully this helps you out. This code is tied with a checkbox.
I use a similar feature to what you ask in my installer, to decide whether a user will have a full power installation or limited installation ("Low Resource Mode")
('low_ARC.ini');('low_CLS.ini');
;Hopefully this helps you out. This code is tied with a checkbox.
How do you rename them later? ISDone or UnARc don't read "low_ARc.ini" as "ARC.ini" do they?
Try like this
if LowResourceCB.Checked then begin
ExtractTemporaryFile('low_ARC.ini');
ExtractTemporaryFile('low_CLS.ini');
RenameFile(ExpandConstant('{tmp}\low_ARC.ini', '{tmp}\Arc.ini'));
RenameFile(ExpandConstant('{tmp}\low_CLS.ini', '{tmp}\Cls.ini'));
end else begin
ExtractTemporaryFile('ARC.INI');
ExtractTemporaryFile('CLS.INI');
end;
This code has to be placed BEFORE archive unpacking begins.
Epic Titan 69
11-06-2021, 00:17
How to show custom text instead of LABELCURRFILE
I know that we need to put .Hide in front of it to stop showing current file name but what to do to show custom text like
Extracting or Unpacking...... etc
THANKS
GaMEr_2077
11-06-2021, 06:33
How to show custom text instead of LABELCURRFILE
I know that we need to put .Hide in front of it to stop showing current file name but what to do to show custom text like
Extracting or Unpacking...... etc
THANKS
I also need that.....
LABELCURFILE is not inside InnoSetup Support, maybe you mean 'StatusLabel' instead?
StatusLabel is showing 'Unpacking Files ...', FileNameLabel is showing current file.
However, to make a new TLabel or TNewStaticText variable you can do something like this.
var
MyText: TLabel;
procedure InitializeWizard();
begin
MyText := TLabel.Create(WizardForm);
with MyText do begin
Parent := WizardForm.InstallingPage;
Caption := 'My Text here'; // you can also use constants like '{cm:MyText}' with [CustomMessage] section if you like it to make multi langual
Left := ScaleX(1);
Top := ScaleY(1);
Width := ScaleX(150);
Height := ScaleY(12);
Wordwrap := False;
end;
end;
procedure CurPageChanged(CurPageID: integer);
if CurPageID = wpInstalling then begin
//Here you can hide (x.Hide) or show (x.Show) your variable
MyText.Show;
end;
end;
Masquerade
17-06-2021, 00:20
There was a plugin for Inno Setup that allowed for bat file / console application output to be redirected to the inno Setup memo window instead of producing a cmd window.
The name seems to have slipped my mind - can anyone help?
L33THAK0R
17-06-2021, 05:19
Hi all,
Does anyone know if Inno Setup supports checksum parts/segments/other-name-here? A lot of my conversions have selective/optional .bins and I usually only supply the checksums for the "main" files, but was wondering if I could have multiple smaller checksum files for each component then splice these together to verify selected parts.
Masquerade
17-06-2021, 09:03
Hi all,
Does anyone know if Inno Setup supports checksum parts/segments/other-name-here? A lot of my conversions have selective/optional .bins and I usually only supply the checksums for the "main" files, but was wondering if I could have multiple smaller checksum files for each component then splice these together to verify selected parts.
bat file - copy main.md5+selective.md5 new.md5
:( Sad8669
17-06-2021, 11:18
Damn, any idea where should i start to learn basic inno setup functions and stuff?
There was a plugin for Inno Setup that allowed for bat file / console application output to be redirected to the inno Setup memo window instead of producing a cmd window.
The name seems to have slipped my mind - can anyone help?
I know and have public versions there is "ISUtils.dll (https://www.fileforums.com/showthread.php?t=99835&highlight=ISUtils)" (by Peterf1999) and also "Memo Console for Inno Setup (https://www.fileforums.com/showthread.php?t=103712&highlight=console)" (Console.dll) (by BLACKFIRE69).
It has other libraries like cmdout.dll (by Ele) but I don't know if it's public.
I've also attached here an example using version without libraries.
GaMEr_2077
17-06-2021, 20:26
I know and have public versions there is "ISUtils.dll (https://www.fileforums.com/showthread.php?t=99835&highlight=ISUtils)" (by Peterf1999) and also "Memo Console for Inno Setup (https://www.fileforums.com/showthread.php?t=103712&highlight=console)" (Console.dll) (by BLACKFIRE69).
It has other libraries like cmdout.dll (by Ele) but I don't know if it's public.
I've also attached here an example using version without libraries.
okay so this will run cmd commands in inno console
RIGHT??
It has other libraries like cmdout.dll (by Ele) but I don't know if it's public.
Yes, it wasn't a public Lib. I only use it on my personal projects. If anyone finds it useful, here it is. :)
Tested with: Inno 5.5.1.ee2(unicode) Enhanced and Inno 6.2.0(unicode).
Note: There're two separate libraries here. One is for Inno and the other is for Delphi.
Preview:
Masquerade
02-07-2021, 09:29
@Ele, thanks your plugin works great in my tests. I tried the dll by BLACKFIRE69 however I could not get it to work.
Is there a way to stop my memo from echoing the same thing twice?
Currently I have it set to echo the file currently being extracted however this means it echoes the same file over and over again until it moves onto the next file.
Here's the current code:
function ProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
var
CurTick: DWORD;
begin
Memo.Lines.Add('Unpacking: ' + CurrentFile);
I thought maybe I could make a temporary string variable and comparing it with the current file and if so, skip echoing the current file, I am interested if anyone has any thoughts on this.
Yes it it possible the way you thought on it. I remember this was the case in all your repacks and I wondered why you made it this way :)
However, I think there is a more easier way to do this. I guess one of our experts will answer you on this :D
DiCaPrIo
02-07-2021, 11:28
@Ele, thanks your plugin works great in my tests. I tried the dll by BLACKFIRE69 however I could not get it to work.
Is there a way to stop my memo from echoing the same thing twice?
Currently I have it set to echo the file currently being extracted however this means it echoes the same file over and over again until it moves onto the next file.
Here's the current code:
function ProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
var
CurTick: DWORD;
begin
Memo.Lines.Add('Unpacking: ' + CurrentFile);
I thought maybe I could make a temporary string variable and comparing it with the current file and if so, skip echoing the current file, I am interested if anyone has any thoughts on this.
if not Memo.Lines.IndexOf('Unpacking: ' + CurrentFile) > -1 then
Memo.Lines.Add('Unpacking: ' + CurrentFile);
function ProgressCallback(OveralPct, CurrentPct: Integer; CurrentFile, TimeStr1, TimeStr2, TimeStr3: PAnsiChar): LongWord;
var
CurTick: DWORD;
begin
Memo.Lines.Add('Unpacking: ' + CurrentFile);
I thought maybe I could make a temporary string variable and comparing it with the current file and if so, skip echoing the current file, I am interested if anyone has any thoughts on this.
Another option is to use it this way.
I don't know if the filenames are partially cut off or not.
Let's say you have 2 files with same names in somewhat similar paths then the second file will also be displayed.
Example:
1) Data1.bin destination {app}\bin
FileName = Bin32\File1.txt
FileName = Bin32\File2.txt
2) Data2.bin destination {app}\
FileName = Bin\Bin32\File1.txt
FileName = Bin\File3.txt
In this case there are similar names as long as it is not the same name as the previous line, it will be added.
if (Memo.Lines.Count = 0) or (CompareText(Memo.Lines.Strings[Memo.Lines.Count - 1], 'Unpacking: ' + CurrentFile) <> 0) then
Memo.Lines.Add('Unpacking: ' + CurrentFile);
Carldric Clement
26-07-2021, 04:51
Yes, it wasn't a public Lib. I only use it on my personal projects. If anyone finds it useful, here it is. :)
Tested with: Inno 5.5.1.ee2(unicode) Enhanced and Inno 6.2.0(unicode).
Note: There're two separate libraries here. One is for Inno and the other is for Delphi.
Preview:
Idk if it works with Delphi XE 10 I guess. But my problem is the ISCmdInit doesn't support the latest version of Delphi XE because I'm using FMX. :p
Masquerade
30-07-2021, 13:15
Is there an inno library that support blake3 hashings? ISHash does MD5 but not Blake3.
Something like this?
https://github.com/namazso/OpenHashTab
Edit: Scratch it, it's just a shellext installer...
Maybe ask peterf if he got some spare time to add it into ishash
http://www41.zippyshare.com/v/i3eMQfbO/file.html
Carldric Clement
12-08-2021, 08:34
I didn't expect it before. the newest version of Inno Setup 6 was no longer code of Application.ProcessMessanges; Is there any similar this code?
DiCaPrIo
12-08-2021, 09:01
I didn't expect it before. the newest version of Inno Setup 6 was no longer code of Application.ProcessMessanges; Is there any similar this code?
function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external '
[email protected] stdcall';
function TranslateMessage(const lpMsg: TMsg): BOOL; external '
[email protected] stdcall';
function DispatchMessage(const lpMsg: TMsg): Longint; external '
[email protected] stdcall';
procedure AppProcessMessages;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, 0, 0, 1) do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
Carldric Clement
12-08-2021, 09:12
function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): BOOL; external '
[email protected] stdcall';
function TranslateMessage(const lpMsg: TMsg): BOOL; external '
[email protected] stdcall';
function DispatchMessage(const lpMsg: TMsg): Longint; external '
[email protected] stdcall';
procedure AppProcessMessages;
var
Msg: TMsg;
begin
while PeekMessage(Msg, 0, 0, 0, 1) do
begin
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end;
almost but there is one thing was unknown type: TMsg; :)
almost but there is one thing was unknown type: TMsg; :)
type
TMsg = record hWnd: HWND; message: LongWord; wParam: Longint; lParam: Longint; Time: LongWord; pt: TPoint; end;
1234567890123
17-08-2021, 01:54
Is there a way to make a listener (code, etc) that listens to get file size in an inno setup? My goal is to show progress in nanozip. It will listen to the nanozip output file with a time interval and get to the rate of total file size to the current size.
Masquerade
18-08-2021, 10:11
Is there a way to detect the amount of CPU threads / cores there are and do something accordingly?
Eg.
if CPU_THREADS = 6 then
begin
do_stuff
end else begin
do_other_stuff
end;
Asking because some multithreading tools crash when dealing with 6 or 12 threads.
DiCaPrIo
18-08-2021, 11:02
Is there a way to detect the amount of CPU threads / cores there are and do something accordingly?
Eg.
if CPU_THREADS = 6 then
begin
do_stuff
end else begin
do_other_stuff
end;
Asking because some multithreading tools crash when dealing with 6 or 12 threads.
function GetSysCores(): Integer;
var
WbemLocator, WbemServices, WbemObjectSet, WbemObject: Variant;
begin;
WbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
WbemServices := WbemLocator.ConnectServer('localhost', 'root\CIMV2');
WbemObjectSet := WbemServices.ExecQuery('Select NumberOfCores from Win32_Processor');
WbemObject := WbemObjectSet.ItemIndex(0);
Result := WbemObject.Properties_.Item('NumberOfCores').Value ;
WbemLocator:=Unassigned;
WbemServices:=Unassigned;
WbemObjectSet:=Unassigned;
WbemObject:=Unassigned;
end;
function GetSysThreads(): Integer;
var
WbemLocator, WbemServices, WbemObjectSet, WbemObject: Variant;
begin;
WbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
WbemServices := WbemLocator.ConnectServer('localhost', 'root\CIMV2');
WbemObjectSet := WbemServices.ExecQuery('Select NumberOfLogicalProcessors from Win32_Processor');
WbemObject := WbemObjectSet.ItemIndex(0);
Result := WbemObject.Properties_.Item('NumberOfLogicalProces sors').Value;
WbemLocator:=Unassigned;
WbemServices:=Unassigned;
WbemObjectSet:=Unassigned;
WbemObject:=Unassigned;
end;
Masquerade
18-08-2021, 11:37
DiCaPrIo
So I would put if GetSysCores = 6 in the if loop after calling the function?
DiCaPrIo
18-08-2021, 11:56
DiCaPrIo
So I would put if GetSysCores = 6 in the if loop after calling the function?
procedure InitializeWizard();
var Cores,Threads:Integer;
begin
Cores:=GetSysCores;
Threads:=GetSysThreads;
if Cores = 6 then begin
//yourcode
end;
if Threads = 6 then begin
//yourcode
end;
end;
DiCaPrIo
So I would put if GetSysCores = 6 in the if loop after calling the function?
As the function returns an integer value I think I can use it directly without declaring variables.
if GetSysCores = 6 then
begin
end;
The function can also be simplified using variables of type variant so you can get any supported value just by changing the string you want to search for.
function GetSysInfo(const WMIClass, WMIProperty: String): Variant;
var
WbemLocator, WbemServices, WbemObjectSet, WbemObject: Variant;
begin;
WbemLocator := CreateOleObject('WbemScripting.SWbemLocator');
WbemServices := WbemLocator.ConnectServer('localhost', 'root\CIMV2');
WbemObjectSet := WbemServices.ExecQuery('Select ' + WMIProperty + ' from ' + WMIClass);
if (not VarIsNull(WbemObjectSet)) and (WbemObjectSet.Count > 0) then begin
WbemObject := WbemObjectSet.ItemIndex(0);
if not VarIsNull(WbemObject) then
Result := WbemObject.Properties_.Item(WMIProperty).Value;
end;
end;
procedure GetFreeMemory(var Free, Total: Extended);
begin
Total := GetSysInfo('Win32_OperatingSystem', 'TotalVisibleMemorySize');
Free := GetSysInfo('Win32_OperatingSystem ', 'FreePhysicalMemory');
end;
function CPUCores: Integer;
begin
Result := GetSysInfo('Win32_Processor', 'NumberOfCores');
end;
function CPUThreads: Integer;
begin
Result := GetSysInfo('Win32_Processor', 'NumberOfLogicalProcessors');
end;
You can also use the API if you prefer to get Threads.
type
TSystemInfo = record
wProcessorArchitecture: Word;
wReserved: Word;
dwPageSize: DWORD;
lpMinimumApplicationAddress: Integer;
lpMaximumApplicationAddress: Integer;
dwActiveProcessorMask: DWORD;
dwNumberOfProcessors: DWORD;
dwProcessorType: DWORD;
dwAllocationGranularity: DWORD;
wProcessorLevel: Integer;
wProcessorRevision: Word;
end;
procedure GetSystemInfo(var lpSystemInfo: TSystemInfo);
external '
[email protected] stdcall delayload';
function GetCPUThreads: Integer;
var
SysInfo: TSystemInfo;
begin
GetSystemInfo(SysInfo);
Result := SysInfo.dwNumberOfProcessors;
end;
L33THAK0R
19-08-2021, 00:49
Has anyone had an installer made using inno setup just soft-lock consistently? Trying to unpack an archive but it consistently gets stuck on this one file, refusing to progress any further, the funny thing is though, no error codes are displayed, the applications "elapsed time" function continues to run, with CPU & Disk utilisation dropping to 0%, I'm honestly stumped on this one.
Masquerade
19-08-2021, 01:53
L33THAK0R
This appears an issue with the decompressor you are using and not inno setup itself.
L33THAK0R
19-08-2021, 04:36
L33THAK0R
This appears an issue with the decompressor you are using and not inno setup itself.
Ah grim, well that narrows it down to 2 issues then. Fingers crossed I can get it working! I have a feeling it might be due to the assets I ripped, was a bit messy with ripping shit.
L33THAK0R
29-09-2021, 21:15
Just as a preface, I originally posted this in the "ASIS" thread, but I reckon it might be more applicable here.
So I have a handful of repacks which have selective installs for a collection of titles, with each having its own shortcut to be placed on the users Desktop, should they select this as an option. Currently however, regardless of the end-users selection a shortcut for each entry made for the application is placed on the desktop, even if the target file is not present. It's not a critical issue but it is a slight annoyance.
My proposed solution, as detailed below, was to use a function named "RemoveShortcut", which is used for the uninstaller generated for a given install, as can be seen here:
[UninstallDelete]
Type: filesandordirs; Name: {app}
#sub RemoveShortcut
#emit "Type: Files; Name: ""{userdesktop}\" + Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) + ".lnk"";"
#emit "Type: Files; Name: ""{userprograms}\" + Trim(ReadIni(SourcePath + "\Settings.ini", "Settings", "ShortcutName", "")) + "\" + Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) + ".lnk"";"
#endsub
#for {i = 1; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) != ""; i++} RemoveShortcut
However this doesn't seem to work, with testing of 2 dummy data files (each housing its own target application, as well as a blank file to be used as a indicator that the selected component was present), demonstrating both shortcuts were removed even when installing only one of the selected components. If anyone has any thoughts on this I'd love to hear them. I initially thought I might be able to use a series of batch scripts instead, with one script for the removal of each component to be run post-install present in a "main" data file, with a given components archive having an identical, but blank script to overwrite the valid script, however I found I wasn't able to consistently CD to the userdesktop, since I didn't initially take into account a user having a desktop location at a location outside of their C: drive.
__________________________________________________ __________
ORIGINAL QUESTION:
Hi all,
Got a small question regarding whether my proposed solution could work at all (I'm terribly new to pascal/delphi). I've got a fair few packs that feature selective, multiple-title offerings to the end-user, each with their own, separate executable to launch from (since some are emulated and require a small script to launch the ROM), as well as their own entry under the shortcut section of the "Settings.ini" file used in ASIS (baked into a executable thats just a batch script wrapped in an exe). My issue is that regardless of the component selection, upon extraction of all selected archives, all desktop shortcuts defined within the "settings.ini" are generated (should the option be selected).
My current thought process is using the "RemoveShortcut" function, in the Post-install section of the script to delete the shortcut, if a given .txt file is missing (which would be packed with a given selective offering), like so:
#if ("{app}\_CommonRedist\APPS\APP_1.txt" == "0") && ("{userdesktop}\APP_1.lnk" == "1")
#for {i = 1; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) != ""} RemoveShortcut
#endif
#if ("{app}\_CommonRedist\APPS\APP_2.txt" == "0") && ("{userdesktop}\APP_2.lnk" == "1")
#for {i = 2; Trim(ReadIni(SourcePath + "\Settings.ini", "Executable" + Str(i), "ShortcutName", "")) != ""} RemoveShortcut
#endif
However upon testing this both shortcuts were removed even when installing only one of the selected components. Does anyone have any idea why this might be?
I would like to know if anyone has a solution to my problem. I would like to display the thumbnail in the taskbar and at the same time include a checkbox to keep the installer window on top (over other windows) if the checkbox is checked. If I use the code from the page below to display the installer thumbnail on the taskbar the property "WizardForm.FormStyle" doesn't work.
Part of the code was obtained from: inno-setup-window-preview-in-taskbar (https://stackoverflow.com/questions/64060208/inno-setup-window-preview-in-taskbar)
If anyone can help me, I appreciate it.
Below is a code to better understand my question.
[Setup]
AppName=My App
AppVersion=1.0
DefaultDirName={{#VER > 0x06000000 ? "common" : ""}pf}\My App
DisableWelcomePage=no
OutputBaseFilename=My_App
OutputDir=.
[ code]
const
GW_OWNER = 4;
GWL_HWNDPARENT = (-8);
function GetWindowLong(Wnd: HWND; nIndex: Integer): Longint; external '
[email protected] stdcall delayload';
function SetWindowLong(Wnd: HWND; nIndex: Integer; dwNewLong: Longint): Longint; external '
[email protected] stdcall delayload';
function GetWindow(hWnd: HWND; uCmd: UINT): HWND; external '
[email protected] stdcall delayload';
var
OnTopCheckBox: TNewCheckBox;
////OldParent: Longint;
procedure OnTopCheckBox_OnClick(Sender: TObject);
begin
if OnTopCheckBox.Checked then
begin
////SetWindowLong(WizardForm.Handle, GWL_HWNDPARENT, OldParent);
WizardForm.FormStyle := fsStayOnTop;
end else
begin
WizardForm.FormStyle := fsNormal;
////SetWindowLong(WizardForm.Handle, GWL_HWNDPARENT, GetWindowLong(GetWindow(WizardForm.Handle, GW_OWNER), GWL_HWNDPARENT));
end;
end;
procedure InitializeWizard();
begin
////OldParent := GetWindowLong(WizardForm.Handle, GWL_HWNDPARENT);
OnTopCheckBox := TNewCheckBox.Create(WizardForm);
with OnTopCheckBox do begin
Parent := WizardForm;
Caption := 'Keep On Top';
SetBounds(ScaleX(10), WizardForm.NextButton.Top + ScaleY(2), ScaleX(100), ScaleX(15));
OnClick := @OnTopCheckBox_OnClick;
end;
{ work if disable this line }
SetWindowLong(WizardForm.Handle, GWL_HWNDPARENT, GetWindowLong(GetWindow(WizardForm.Handle, GW_OWNER), GWL_HWNDPARENT));
end;
Hi all.
Could you please help me with the following:
I have an installer for a mod, but if a person uninstalls a mod, the whole game is uninstalled as well.
How can I make it so that only the mod files are deleted?
I was thinking of keeping an install log and taking files from it to delete, but damn, that doesn't work right.
(It doesn't delete files from the list and it doesn't log small files)
I'll attach a sample code)
Thank you in advance.
Function InitializeUninstall(): Boolean;
begin
ULog := FileExists(ExpandConstant('{app}\INSTALL.LOG')); // you need to get the log now, it might not exist later
if ULog then // if there is a log file, create a sheet where we load the list of files
begin
unins_list := TStringList.Create;
unins_list.LoadFromFile(ExpandConstant('{app}\INST ALL.LOG'));
end;
Result := True;
end;
Procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
i : Integer;
begin
If CurUninstallStep = usPostUninstall then
if ULog then
begin
for i := 0 to unins_list.Count-1 do DeleteFile(unins_list:[i]); // delete files from the list - It doesn't work
unins_list.Free;
end;
end;
Example here (https://mega.nz/file/ThExkITK#bX47p5-Y3CCVjc9G7n_d3To81Gnr0jNlzqwAf8kDvmY)
Hi all.
Could you please help me with the following:
I have an installer for a mod, but if a person uninstalls a mod, the whole game is uninstalled as well.
How can I make it so that only the mod files are deleted?
I was thinking of keeping an install log and taking files from it to delete, but damn, that doesn't work right.
(It doesn't delete files from the list and it doesn't log small files)
I'll attach a sample code)
Thank you in advance.
Function InitializeUninstall(): Boolean;
begin
ULog := FileExists(ExpandConstant('{app}\INSTALL.LOG')); // you need to get the log now, it might not exist later
if ULog then // if there is a log file, create a sheet where we load the list of files
begin
unins_list := TStringList.Create;
unins_list.LoadFromFile(ExpandConstant('{app}\INST ALL.LOG'));
end;
Result := True;
end;
Procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
i : Integer;
begin
If CurUninstallStep = usPostUninstall then
if ULog then
begin
for i := 0 to unins_list.Count-1 do DeleteFile(unins_list:[i]); // delete files from the list - It doesn't work
unins_list.Free;
end;
end;
Example here (https://mega.nz/file/ThExkITK#bX47p5-Y3CCVjc9G7n_d3To81Gnr0jNlzqwAf8kDvmY)
The IsDone callback function (ProgressCallback) does not display the names of all files.
This function is called 4 times per second and only the current filename is shown in the output.
If you use a native installation of Inno Setup (No UnArc/ISDone) it will only remove the installed files.
But for you to continue using your script you can create a list using FindFirst and FindNext of all the files that are in the game folder right after the ISDoneInit function.
After the ISDoneStop function you do a new check using FindFirst and FindNext and compare the names with the previous list using:
if oldfileslist.IndexOf(<fullfilename>) < 0 then ins_log.Append(<fullfilename>);
The IsDone callback function (ProgressCallback) does not display the names of all files.
This function is called 4 times per second and only the current filename is shown in the output.
If you use a native installation of Inno Setup (No UnArc/ISDone) it will only remove the installed files.
But for you to continue using your script you can create a list using FindFirst and FindNext of all the files that are in the game folder right after the ISDoneInit function.
After the ISDoneStop function you do a new check using FindFirst and FindNext and compare the names with the previous list using:
if oldfileslist.IndexOf(<fullfilename>) < 0 then ins_log.Append(<fullfilename>);
Here is my ProgressCallback code
procedure DeinitializeSetup;
begin
BASS_Free;
ForceCloseApp(ExpandConstant('{tmp}'));
end;
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
var
s : AnsiString;
FCurrentFile : String;
begin
if OveralPct<=1000 then ProgressBar.Value(OveralPct);
WizardForm.ProgressGauge.Position:=OveralPct;
FinishLabl5.Text(ExpandConstant('{cm:TIME_TAKEN} ')+TimeStr2);
InsPageLabl4.Text(ExpandConstant('Осталось около: ')+TimeStr1);
InsPageLabl5.Text(ExpandConstant('Прошло около: ')+TimeStr2);
InsPageLabl6.Text(IntToStr(Round(OveralPct div 10))+'% ИЗВЛЕЧЕНО ФАЙЛОВ');
s := ExpandConstant('{cm:Extracting} ') + CurrentFile;
If InsLogBox.LineStrings(InsLogBox.LineCount - 1) <> s Then
begin
FCurrentFile := MinimizePathName(ExpandConstant('{cm:Extracting} ') +CurrentFile, WizardForm.ReadyMemo.Font, 500 - ScaleX(50))
InsLogBox.AddLine(FCurrentFile);
end;
Result := ISDoneCancel;
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode:Integer;
begin
if CurStep = ssPostInstall then
begin
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{tmp}\records.inf'), 5555, 0,0,0, MainForm.Handle, 512, @ProgressCallback) then begin
repeat
ChangeLanguage('english');
SetIniString('srep','temp',ExpandConstant('{app}') ,ExpandConstant('{tmp}\cls.ini'));
Installing:=true;
#ifdef Data1
if not ISArcExtract ( 0, {#D1[61]}, ExpandConstant('{src}\{#D1[60]}'), ExpandConstant('{app}'), '', false,('{#Dat1}'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'), false) then break;
#ifdef Data2
if not ISArcExtract ( 0, {#D2[61]}, ExpandConstant('{src}\{#D2[60]}'), ExpandConstant('{app}'), '', false,('{#Dat2}'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'), false) then break;
#ifdef Data3
if not ISArcExtract ( 0, {#D3[61]}, ExpandConstant('{src}\{#D3[60]}'), ExpandConstant('{app}'), '', false,('{#Dat3}'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'), false) then break;
#ifdef Data4
if not ISArcExtract ( 0, {#D4[61]}, ExpandConstant('{src}\{#D4[60]}'), ExpandConstant('{app}'), '', false,('{#Dat4}'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'), false) then break;
#ifdef Data5
if not ISArcExtract ( 0, {#D5[61]}, ExpandConstant('{src}\{#D5[60]}'), ExpandConstant('{app}'), '', false,('{#Dat5}'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'), false) then break;
#ifdef Data6
if not ISArcExtract ( 0, {#D6[61]}, ExpandConstant('{src}\{#D6[60]}'), ExpandConstant('{app}'), '', false,('{#Dat6}'), ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\temp'), false) then break;
#endif
#endif
#endif
#endif
#endif
#endif
ISDoneError:=false;
until true;
ISDoneStop;
end;
end;
If you can, please attach an example that I can lean on - it will be easier for me to understand and change my code.
And perhaps an IsDone can be substituted?
UPD/
I have information displayed in FMemo (InsLogBox : FMemo;), can it also be saved to a file?
s := ExpandConstant('{cm:Extracting} ') + CurrentFile;
If InsLogBox.LineStrings(InsLogBox.LineCount - 1) <> s Then
begin
FCurrentFile := MinimizePathName(ExpandConstant('{cm:Extracting} ') +CurrentFile, WizardForm.ReadyMemo.Font, 500 - ScaleX(50))
InsLogBox.AddLine(FCurrentFile);
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.