PDA

View Full Version : INNO TROUBLESHOOT - Questions Here


Pages : 1 2 3 [4] 5 6 7

danswano
26-09-2013, 07:30
Hello,
I've packed some wav files using srep+tta
when trying to unpack the file with ISDone i get unarc.dll -6 error.

Notes:
Packing the same files without tta only srep works fine but not with tta.
Packing the same files with tta without srep works fine too.

The installation progress unpacks until the end of the arc file and it throw this error:

Dheeraj88
26-09-2013, 10:56
He can you make max payne 3 original black box script script with kurutcu compressor.I will be thankfull to you!!!

indiana1974
12-10-2013, 11:10
Hey Bro! as I do that at the Autorun and Setup work pictures
. BMP and PNG if CI yener90 Designer 0.4a asks only images of JPG

http://i.minus.com/ik4dtLPJGE9vg.jpg

I want to start as well as the example of yener Farcry3 http://fileforums.com/showthread.php?t=91563

http://i.minus.com/iboaOIS1bJqUun.png

PLease help me

Razor12911
12-10-2013, 11:13
CI Designer supports CI and not CIU Projects.

Razor12911
14-10-2013, 07:01
Hmm, Kinda difficult and contradicting but I'd say maybe tta and srep are not supposed to be involved together in compression. I did precomp+srep+paq8 and got the same error. but you may wanna consider unpacking using bat before isdone.

danswano
14-10-2013, 07:05
RG freaking Mechanics installer is unpacking it internally.

Razor12911
14-10-2013, 07:07
give me the source.

danswano
14-10-2013, 11:36
give me the source.

You mean the iss file? it's exe.

Razor12911
14-10-2013, 11:45
All the info I'll need to check out what's the problem with tta and srep

danswano
14-10-2013, 11:58
Using tta is really good for wave files, i wonder why the hell ISDone is extracting all the files and at the end gives that error, i mean ISDone managed to uncompress the file properly but the error at the end will rollback everything to nothing.

killkrazed
14-10-2013, 23:50
If A game has it's registry keys in 2 different places based on if it's 64 or 32-bit how would I add that to innosetup?

EG:
The Game on 32-bit windows has it's registry in "HKEY_LOCAL_MACHINE\SOFTWARE", But in 64-bit windows it instead goes into "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE".

Would I simply add registry for both editions, changing the "HKLM; SubKey: "SOFTWARE\" to "HKLM; SubKey: "SOFTWARE\WOW6432NODE\". Or does innosetup sort it out itself?

Thanks in advance.

Razor12911
15-10-2013, 04:29
If A game has it's registry keys in 2 different places based on if it's 64 or 32-bit how would I add that to innosetup?

EG:
The Game on 32-bit windows has it's registry in "HKEY_LOCAL_MACHINE\SOFTWARE", But in 64-bit windows it instead goes into "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE".

Would I simply add registry for both editions, changing the "HKLM; SubKey: "SOFTWARE\" to "HKLM; SubKey: "SOFTWARE\WOW6432NODE\". Or does innosetup sort it out itself?

Thanks in advance.

you must use "Check: IsWin64;" if you want Inno to add the registry is running under x64 and "Check: not IsWin64" if running in x86.
But remove this line in both x86 and x64 OS in your registry (\WOW6432NODE)

Razor12911
15-10-2013, 04:31
Using tta is really good for wave files, i wonder why the hell ISDone is extracting all the files and at the end gives that error, i mean ISDone managed to uncompress the file properly but the error at the end will rollback everything to nothing.

gimme all the files for the compression and will solve and will give you the results.

killkrazed
17-10-2013, 01:36
you must use "Check: IsWin64;" if you want Inno to add the registry is running under x64 and "Check: not IsWin64" if running in x86.
But remove this line in both x86 and x64 OS in your registry (\WOW6432NODE)

Could you please give an Example?

I am trying to add the registry for PES2014, it works fine off the original installer but every time I convert it the registry doesn't seem to be added correctly.

altef_4
17-10-2013, 02:05
Could you please give an Example?

I am trying to add the registry for PES2014, it works fine off the original installer but every time I convert it the registry doesn't seem to be added correctly.

you are not ask for me but here:
[Registry]
Root: HKLM; SubKey: SOFTWARE\Wow6432Node\Valve\Steam; ValueType: string; ValueName: InstallPath; ValueData: C:\Program Files (x86)\Steam; Flags: createvalueifdoesntexist; Check: isWin64;
Root: HKLM; SubKey: SOFTWARE\Valve\Steam; ValueType: string; ValueName: InstallPath; ValueData: C:\Program Files\Steam; Flags: createvalueifdoesntexist; Check: not isWin64;

killkrazed
17-10-2013, 04:24
Thanks!

I would have never realized I needed the "createvalueifdoesntexist" if you hadn't given me the example.

ASSAiL
22-10-2013, 12:01
Hey guys I am Vishal.

I was going through your CI installscript...it is awesome.

but

this script adds and compress files from DVD(original file)...whereas i want to modify your script according to my game repack(external files that i run through "RUN and UNINSTALLRUN"....but was unable to do so.

I can make a basic setup with splash screen...I need my setup to be good looking with minimum possible size...so can you guys help me out?

also can i use ogg vorbis(small size) for music?

McAntony
23-10-2013, 07:05
How to create shourtcut in one folder with innoide? I do not know of one folder created with Inno shourtcut it just created in the home directory.
Please!

Sorry my bad english :(

ASSAiL
24-10-2013, 02:30
can anyone help me how to create a setup like this?

http://fileforums.com/showthread.php?t=91778

when i put my mouse over the install button it zooms out.

can anyone gimme source code of this?

reiji777
28-10-2013, 13:15
please, how to join / merge setup.cab into setup.exe? I've tried internal instalation tutorial but I still don't quite understand :(

pakrat2k2
28-10-2013, 15:03
using CIU you must have
#define Internal ( like it is in BOTH Installerscript / Langscript ISS files.
In Installerscript.iss the ;#define ProgramFiles .... line MUST have the ; in front.

Then the files from Setup.cab MUST be extracted in Setup subfolder. Then files from setup.cab will be included into the setup.exe.

reiji777
28-10-2013, 22:30
using CIU you must have
#define Internal ( like it is in BOTH Installerscript / Langscript ISS files.
In Installerscript.iss the ;#define ProgramFiles .... line MUST have the ; in front.

Then the files from Setup.cab MUST be extracted in Setup subfolder. Then files from setup.cab will be included into the setup.exe.

http://i1076.photobucket.com/albums/w441/aeropcgame/fileforum/fileforum_zps47003408.jpg

but when i deleted the setup.cab. setup.exe is still looking for the setup.cab
And seems like the game not loaded into the script.

ASSAiL
29-10-2013, 02:13
http://i1076.photobucket.com/albums/w441/aeropcgame/fileforum/fileforum_zps47003408.jpg

but when i deleted the setup.cab. setup.exe is still looking for the setup.cab
And seems like the game not loaded into the script.

hey m8

compile script first (with #define Internal) and then

run file "Convert_AutorunToDLL.bat".

after running this file you can delete setup.cab.

reiji777
29-10-2013, 14:25
I've seen the scripts from some installer.
1st installer (tombraider survival) didn't put any registry code
[Registry]


2nd installer (sleeping dog) put one line of registry code
[Registry]
Root: HKLM; SubKey: "SOFTWARE\{code:GetAppPublisher}\{code:GetAppName}"; ValueName: UninstallString; ValueData: {uninstallexe}; ValueType: string; Flags: UninsDeleteKey;

3rd installer (mass effect 3) put many line of registry code on their scripts
[Registry]
Root: HKLM; SubKey: "SOFTWARE\BioWare\Mass Effect 3"; ValueName: Install Dir; ValueData: {app}\{code:GetMyAppExePath}; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\BioWare\Mass Effect 3"; ValueName: Display Name; ValueData: Mass Effect™ 3 ; ValueType: string; Flags: UninsDeleteKey;
Root: HKLM; SubKey: "SOFTWARE\BioWare\Mass Effect 3"; ValueName: GDFBinary; ValueData: {app}\Mass Effect 3\GDFBinary_en_US.dll ; ValueType: string; Flags: UninsDeleteKey;

etc..

all the script can install and uninstall perfectly.
what is the difference between three of them?
how do i recognize a game which required alot of registry code to be inserted in the script or not at all?
if I don't insert the registry key, then the game wouldn't compatible for the future updates of the game? (like in the first ver. splinter cell blacklist installer)
sorry for my bad english :o

pakrat2k2
29-10-2013, 15:05
some games don't care if they have any registry entries at all. The uninstall entry is only for INNO version, to uninstall properly. ( much like #1 & #2 installers )

Then there is the 3rd type of game which will NOT run at all, or allow any updates to be installed if the proper registry entries are not found.

You need to search thru registry for entries that the particular game your doing, entered any. IF it has you MAY need to copy those types of entries into your INNO script.

ASSAiL
30-10-2013, 22:48
Can anyone modify the installerscript?

I don't want to include "include" folder...that means no arc...no 7z...and nothing else....i want to use my custom files.

and also i don't need disk spanning for three disk or more.

I just need 1 disk slice.

can any one modify the script???...i can't do that because everything is related to each other.

reiji777
01-11-2013, 08:34
i want to make a nice, simple, fast and very effective installer like this:
http://img560.imageshack.us/img560/646/ainstall.jpg
with extra music on/off button
the function is simple : install game => install support drivers (directx, phsyx dll.) in silent mode.
is it possible? can someone share how to make it?
it would be wonderful. thanks :)

ASSAiL
01-11-2013, 08:59
i want to make a nice, simple, fast and very effective installer like this:
http://img560.imageshack.us/img560/646/ainstall.jpg
with extra music on/off button
the function is simple : install game => install support drivers (directx, phsyx dll.) in silent mode.
is it possible? can someone share how to make it?
it would be wonderful. thanks :)

just change the wizard image...for logo...music button has to be created with

and run files thru batch file

like this
[code]
#Soft#\vc80_redist\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"
#Soft#\DirectX\dxwebsetup.exe

reiji777
01-11-2013, 10:08
just change the wizard image...for logo...music button has to be created with

and run files thru batch file

like this
[code]
#Soft#\vc80_redist\Vcredist_x86.exe /q:a /c:"msiexec /i vcredist.msi /qn /l*v %temp%\vcredist_x86.log"
#Soft#\DirectX\dxwebsetup.exe


I hope someone could give the detail tutorial. or maybe the basic template of the script :D
btw is visual basic program capable to make the same exact installer like these scripts especially yener script?

Darkangel5
04-11-2013, 08:58
good evening

sorry to use google translation to translate
i have the same problem that buttignol
a solution?
thank you

Inno setup help disk space
Friends disk size and space available to install is the same when you switch to install on another HD how to fix it
If possible also how to put the point size ex: 149 Gb to 149.50 Gb
Ex: script my script is in two parts.
Quote:

[Code]
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
End;

Function MbOrTb(Byte: Extended): String;
begin
if Byte < 1024 then Result:= NumToStr(Byte) + ' Mb' else
if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' Gb' else
Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' Tb'
end;
procedure InitializeWizard3();
var
Page: TWizardPage;
lbl: TLabel;
Path: String;
FreeMB, TotalMB: Cardinal;
begin
Path := ExpandConstant('{pf}');
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
Page := PageFromID(wpSelectDir);

lbl := TLabel.Create(Page);
lbl.Width := ScaleX(105);
lbl.Height := ScaleY(43);
lbl.Caption := ExpandConstant('Espaзo total do disco : ') + MbOrTb(TotalMB);
lbl.Left := 0;
lbl.Top := 155;
lbl.Parent := Page.Surface;

lbl := TLabel.Create(Page);
lbl.Width := ScaleX(75);
lbl.Height := ScaleY(23);
lbl.Caption := ExpandConstant('Espaзo em disco disponнvel: ') + MbOrTb(FreeMB) + ' (' + IntToStr((FreeMB * 100) div TotalMB) + '%)';
lbl.Left := 0;
lbl.Top := 175;
lbl.Parent := Page.Surface;

lbl := TLabel.Create(Page);
lbl.Width := ScaleX(75);
lbl.Height := ScaleY(23);
lbl.Caption := ExpandConstant('Espaзo do Game : ') + MbOrTb(24000);
lbl.Left := 0;
lbl.Top := 195;
lbl.Parent := Page.Surface;
end;
procedure InitializeWizard();
begin
//InitializeWizard1();
//InitializeWizard2();
InitializeWizard3();
end;
Attached Images



http://img11.hostingpics.net/pics/580597Sanstitre4.jpg (http://www.hostingpics.net/viewer.php?id=580597Sanstitre4.jpg)

y_thelastknight
04-11-2013, 11:41
good evening
sorry to use google translation to translate
i have the same problem that buttignol
a solution?
thank you

it helps you

Darkangel5
05-11-2013, 02:38
it helps you

thank thank it works

Andre Jesus
05-11-2013, 15:48
Hello,
I want to change the default progress bar by a with image PNG customized.
Is possible also, change use only wizardform?
Anybody can show me in both case?

7516

reiji777
06-11-2013, 14:33
please how to make button for 'custom install', 'default install' and finish button?
and on ci 8.x.x.x i can get play button turn on after install. but in ciu after install the play button won't work and the feature of EnableAutorunMenu=0 isn't there.
why upgrading the script but taking off the best feature of the previous script?

Darkangel5
09-11-2013, 08:06
good evening

I have a small problem
I use the script kucukutu 1.8 and I want to add a background, I added the line windowsvisible = yes but the problem is that it launches the splash at the same time as the background (see screen)
I would like to launch the splash then the background
a solution?

thank you

http://img4.hostingpics.net/pics/608531Sanstitre.jpg

Razor12911
09-11-2013, 08:12
well maybe you should disable windowsvisible. what's the function of it anyways?

Darkangel5
10-11-2013, 09:54
well maybe you should disable windowsvisible. what's the function of it anyways?

if I disables I can put more in the background image

this function (windowsvisible) displays a window in the background
You just add a line of code to display the image

reiji777
10-11-2013, 13:24
please help what are the meaning of these arguments in launcher section:
/i --no-display --i-accept-the-pb-eula
/qn
/q /norestart
/S
/q:a

i want all component installing automatically without displays. is it possible?
and what is the correct code for each component such phsyx, punkbuster, etc ?

Razor12911
10-11-2013, 18:38
Here (http://fileforums.com/showthread.php?t=95092)

Darkangel5
14-11-2013, 06:33
Hello

can one remove what have to surround in red on image

thank you

http://img4.hostingpics.net/pics/692002Sanstitre.jpg

Razor12911
15-11-2013, 13:30
procedure InitializeWizard;
begin
WizardForm.BorderStyle:=bsNone;
end;

Darkangel5
16-11-2013, 09:24
procedure InitializeWizard;
begin
WizardForm.BorderStyle:=bsNone;
end;

Thank you

chuotchu001
18-11-2013, 03:28
i don't know how to fix this text. Please help me.

http://i.minus.com/i08D5mklBkyvh.jpg

I use CI Designer 0.4a, and script CIU 1.0.0.6. Thanks

kassane
18-11-2013, 05:07
i don't know how to fix this text. Please help me.

http://i.minus.com/i08D5mklBkyvh.jpg

I use CI Designer 0.4a, and script CIU 1.0.0.6. Thanks

This software is programmed to configure the CI and not CIU.

chuotchu001
18-11-2013, 05:26
This software is programmed to configure the CI and not CIU.

So, what program used to configure CIU 1.0.0.6? I working on LEGO Marvel Super Heroes, but I don't kown how to config install step. can you help me? Thanks.

pakrat2k2
18-11-2013, 16:00
So, what program used to configure CIU 1.0.0.6?

everything is done in setup.ini, placement of buttons, where the text shows up, etc

chuotchu001
18-11-2013, 18:40
everything is done in setup.ini, placement of buttons, where the text shows up, etc

I know setup.ini placement anything, but went i open setup.ini, i dont know how to placement it with manual. So, I think must have a programe same CI designer 0.4a to config setup.ini for CIU 1.0.0.6 and place button, text.. etc. Thanks

y_thelastknight
21-11-2013, 05:42
Fixed Thanks ;)

buttignol
21-11-2013, 15:08
Friends can not add an empty folder I use this file.txt
Example [arc a - ep1 -r -w.\ -m0 -dp"%choice1%" [email protected] .\Final\%dat%)] have to add some command
The empty folder that is in the ([email protected]) does not appear

Example [[email protected]]

multi (empty)
Support\*
pb\*

KaktoR
21-11-2013, 15:14
Why you want to add a empty folder to archive?

Just place a dummy file in this folder.

buttignol
21-11-2013, 15:31
KaktoR this was an example has more than an empty folder in the game so I wanted a command to add empty folders

Darkangel5
23-11-2013, 09:36
good evening

I would like to create a "create a desktop icon" button on the image below that allows me to have a shortcut on my desktop.

http://img11.hostingpics.net/pics/137581381.jpg

KaktoR
23-11-2013, 10:04
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Icons]
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\Game.exe"
Name: "{group}\{#MyAppPublisher}\{#MyAppName}"; Filename: "{app}\Game.exe"



..

danswano
26-11-2013, 04:41
Hello everyone especially razor :)
How do i pack a folder to a zip file inside {app} directory using ISexec/ISDone
Then delete the packed folder?

Thanks :)

Darkangel5
26-11-2013, 07:47
..

thank you

Razor12911
26-11-2013, 08:53
Hello everyone especially razor :)
How do i pack a folder to a zip file inside {app} directory using ISexec/ISDone
Then delete the packed folder?

Thanks :)
Simple.
You need to use Exec and DelTree function.

danswano
26-11-2013, 14:06
Can you fix this code for me, i don't know what's wrong:
ExtractTemporaryFile('7z.exe');
ExtractTemporaryFile('7z.dll');
if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\7z.exe'), '-o"' + ExpandConstant('{app}') + '" a -tzip -y -r data.zip"' + ExpandConstant('{app}\datafiles') + '" ', ExpandConstant('{tmp}'), 'please wait.',false) then break;
DeleteFile(ExpandConstant('{app}\datafiles'));


I want to pack mutiple files/folders inside a folder called datafiles into a single zip called data.zip.

hackjack
28-11-2013, 02:35
hi, if i have encrypted archive of free arc then how/what to add in iss script so that its get extracted to defined location without asking password, but the archive remains password protected in game iso file or whatever.detailed please

Razor12911
01-12-2013, 17:06
hi, if i have encrypted archive of free arc then how/what to add in iss script so that its get extracted to defined location without asking password, but the archive remains password protected in game iso file or whatever.detailed please
action not possible.

Razor12911
01-12-2013, 17:08
Can you fix this code for me, i don't know what's wrong:


I want to pack mutiple files/folders inside a folder called datafiles into a single zip called data.zip.

you need to use deltree function and not deletefile

y_thelastknight
03-12-2013, 08:15
Free Space percentage : {percentage of the free space}

Attachment
Link (http://fileforums.com/attachment.php?attachmentid=7493&d=1383594026)

how to create like this?
http://img132.imageshack.us/img132/9262/qh23.jpg

lupetto77
03-12-2013, 14:10
Hello to all ...

I would like to add a video with the edges of blacks during the installation this way:

http://s10.imagestime.com/out.php/i903893_Immagine.jpg (http://www.imagestime.com/show.php/903893_Immagine.jpg.html)

does anyone know how to do it?

Razor12911
04-12-2013, 03:32
Free Space percentage : {percentage of the free space}

Attachment
Link (http://fileforums.com/attachment.php?attachmentid=7493&d=1383594026)

how to create like this?
http://img132.imageshack.us/img132/9262/qh23.jpg
Free Space / Total Space * 100

y_thelastknight
04-12-2013, 03:49
Free Space / Total Space * 100

message me on FB

y_thelastknight
05-12-2013, 13:04
hi fellow Member

Check my Attached exe and tell me how is it?

http://img404.imageshack.us/img404/9127/7f48.jpg

danswano
10-12-2013, 12:10
Hello,

I have 2 questions:

1- Few games recently have 32bit and 64bit executables, how to make a condition in inno to create a shortcut for the 64bit exe if the system is x64 and a shortcut for the 32bit exe if the system is x86.

2- Is it possible to customize the ISDone.dll error messages?

Thanks.

y_thelastknight
10-12-2013, 12:25
2- Is it possible to customize the ISDone.dll error messages?
Thanks.

you can edit english.ini file..

danswano
10-12-2013, 12:28
you can edit english.ini file..

Not the inno messages, the ISDone.dll error popups.

y_thelastknight
10-12-2013, 12:35
Not the inno messages, the ISDone.dll error popups.

Dude check english.ini in where arc.ini and other isdone file are placed..edit that it will work.

sentinelks
10-12-2013, 12:35
[Files]
Source: "MyProg-x64.exe"; DestDir: "{app}"; Check: IsWin64; install only system x64
Source: "MyProg-x86.exe"; DestDir: "{app}"; Check: "not IsWin64"; no install in win x64

y_thelastknight
10-12-2013, 12:38
[Files]
Source: "MyProg-x64.exe"; DestDir: "{app}"; Check: IsWin64; install only system x64
Source: "MyProg-x86.exe"; DestDir: "{app}"; Check: "not IsWin64"; no install in win x64

Will it work sentinelks??

danswano
10-12-2013, 12:40
Dude check english.ini in where arc.ini and other isdone file are placed..edit that it will work.

What about "ISDone.dll" in the popup window title?

sentinelks
10-12-2013, 12:40
Hello to all ...

I would like to add a video with the edges of blacks during the installation this way:

http://s10.imagestime.com/out.php/i903893_Immagine.jpg (http://www.imagestime.com/show.php/903893_Immagine.jpg.html)

does anyone know how to do it?


16:9 standard with black stripes
4:3 standard no black stripes

sentinelks
10-12-2013, 12:42
Will it work sentinelks??
I think so .. or need to create an if

sentinelks
10-12-2013, 12:47
What about "ISDone.dll" in the popup window title?

"ERROR_PARSE_FILENOTFOUND"="Your message

danswano
10-12-2013, 15:59
Dude i meant the title of the window it self not the content.

hackjack
15-12-2013, 01:35
i compiled using blackbox script by kurutuco but i get error during when the setup file is extracting.i tried darkbox setup too. here is the images of error- http://img11.imageshack.us/img11/6941/lkkv.png
http://img607.imageshack.us/img607/5185/vkxz.png
http://img42.imageshack.us/img42/9836/ve3u.png

Dubl1n
19-12-2013, 11:20
Hi All -

I am new to the forums and new to INNO installers. The company I work for has used INNO installers for quite some time, well over 5 years - well before I started working here, and it has fallen to me to fix an issue with our installers. Normally we create downloadable installers from our site, and have not had any issues. We do, about once per year, create DVDs to install our product and this year we have run into an issue, while not broken, is frustrating for our QA dept. and will be for our customers.

So the issue: again, the DVDs work - so the installer is not "broken" per se. This year we have 3 DVDs. Starting the installation from Disk 1, no issues. Get to Disk 2 installs some, but then gets to a point where it needs to go back to Disk 1. And it does this about 6 times, before it then asks for Disk 3 and completes. My guess from looking at the files is that it is getting to a file that needs to reference back to another file that is located on Disk 1 and will only continue once it references that file. Again a guess.

Has anyone seen this issue? And is there a way to make certain files group together in the installer so that they will always be in the same bin files and ultimately on the same Disk so that multiple Disk swaps need to occur?

Thanks for the help.
D

Joe Forster/STA
23-12-2013, 02:30
Find out in which order the files are being extracted and try to archive them into the installation package in the same order. (That's a tip without actually knowing Inno Setup. :))

GloverK1911
24-12-2013, 17:01
How to make a setup file can extract the .bin file?

sentinelks
24-12-2013, 17:12
How to make a setup file can extract the .bin file?
Please more details:rolleyes:

chuotchu001
25-12-2013, 01:00
How to make a setup file can extract the .bin file?

Go here (http://fileforums.com/showthread.php?t=95097) ;)

GloverK1911
25-12-2013, 05:53
Please more details:rolleyes:

How to make a setup file like this to extract the .bin file compressed
http://i.minus.com/i5u59F4NrlvQc.png

http://i.minus.com/i1JK4lK7H4LSU.png

Razor12911
25-12-2013, 05:56
that's an ordinary installer.

all that it require for you is to set up the product files, set bmp images, then done.

sentinelks
25-12-2013, 06:07
line red create bin

#define Internal "C:\Program Files (x86)\Truck Racer\"
#define MyAppName "My Program"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppExeName "MyProg.exe"

[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=no
DiskSpanning=yes
SlicesPerDisk=3
DiskSliceSize=1566000000

[Languages]
Name: "default"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1


[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon

[File]
#ifdef Internal
Source:{#Internal}*; DestDir: {app}; Flags: ignoreversion recursesubdirs; Excludes:unins*;
#endif

reiji777
27-12-2013, 04:57
how to make CIU 1.0.0.6 compatible with windows 8.1? because i often getting error on win8

Razor12911
27-12-2013, 05:56
Just tested CIU 1.0.0.6 on Windows 8.1 Enterprise and it works perfect.

danswano
29-12-2013, 07:19
Hello dear ISDone experts,
Is it possible to remove/modify the highlighted text in the popup error message in ISDone?
The title modify is not available in english.ini or it's missing.
I've tried resource hacker and it didn't help.

Thanks :)

y_thelastknight
29-12-2013, 20:11
is this correct? if not help me with this.


procedure AboutButtonOnClick(Sender: TObject);
begin
If CurPageID=wpWelcome then
begin
MsgBox('Hello.', mbInformation, MB_OK);
end;
end;

altef_4
30-12-2013, 04:26
is this correct? if not help me with this.

procedure AboutButtonOnClick(Sender: TObject);
begin
MsgBox('Hello.', mbInformation, MB_OK);
end;

y_thelastknight
30-12-2013, 08:08
no bro i need like this, but it not working.

procedure AboutButtonOnClick(Sender: TObject);
begin

If CurPageID=wpWelcome then
begin
MsgBox('Hello.', mbInformation, MB_OK);
end;

If CurPageID=wpSelectDir then
begin
MsgBox('Hello.', mbInformation, MB_OK);
end;

end;

altef_4
30-12-2013, 09:56
no bro i need like this, but it not working.

procedure AboutButtonOnClick(Sender: TObject);
begin

If CurPageID=wpWelcome then
begin
MsgBox('Hello.', mbInformation, MB_OK);
end;

If CurPageID=wpSelectDir then
begin
MsgBox('Hello.', mbInformation, MB_OK);
end;

end;

[code]
var
PageID: integer;

procedure CurPageChanged(CurPageID: integer);
begin
PageID:=CurPageID;
end;

procedure AboutButtonOnClick(Sender: TObject);
begin
case PageID of
wpWelcome: MsgBox('wpWelcome', mbInformation, MB_OK);
wpLicense: MsgBox('wpLicense', mbInformation, MB_OK);
wpPassword: MsgBox('wpPassword', mbInformation, MB_OK);
wpInfoBefore: MsgBox('wpInfoBefore', mbInformation, MB_OK);
wpUserInfo: MsgBox('wpUserInfo', mbInformation, MB_OK);
wpSelectDir: MsgBox('wpSelectDir', mbInformation, MB_OK);
wpSelectComponents: MsgBox('wpSelectComponents', mbInformation, MB_OK);
wpSelectProgramGroup: MsgBox('wpSelectProgramGroup', mbInformation, MB_OK);
wpSelectTasks: MsgBox('wpSelectTasks', mbInformation, MB_OK);
wpReady: MsgBox('wpReady', mbInformation, MB_OK);
wpPreparing: MsgBox('wpPreparing', mbInformation, MB_OK);
wpInstalling: MsgBox('wpInstalling', mbInformation, MB_OK);
wpInfoAfter: MsgBox('wpInfoAfter', mbInformation, MB_OK);
wpFinished: MsgBox('wpFinished', mbInformation, MB_OK);
end;
end;

y_thelastknight
30-12-2013, 12:34
thanks works fine.

reiji777
02-01-2014, 13:30
hi fellow Member

Check my Attached exe and tell me how is it?

http://img404.imageshack.us/img404/9127/7f48.jpg

how to make like this m8?

y_thelastknight
03-01-2014, 04:56
how to make like this m8?

script.
http://img404.imageshack.us/img404/9127/7f48.jpg

Vatsal Singh
03-01-2014, 05:12
How to add splash in yener90's script (CIU 1.0.0.6).Thank in advance

y_thelastknight
03-01-2014, 06:39
How to add splash in yener90's script (CIU 1.0.0.6).Thank in advance

put the splash.png file in setup.cab file..it works.

Logrim
03-01-2014, 07:16
Three little question,, help me please :D..

1. When unninstall, how to delete the main folder of the installer? the folder is empty but still in program files.. i try with deltree in CurUninstallStepChanged, and with [UninstallDelete] and nothing works.

2. Same problem that the fist, but when cancel the installation. This is worst.. because when cancel, the main folder AND subdirectories still there.

3. The shit png in unninstall doest show.. i think i put in the incorrect line, but i'm a little lost..

My unninstall code is this:


procedure InitializeUninstallProgressForm;
var
img:Longint;
UnsStatusLabel, UnsGameNameLabel: Tlabel;

begin
FileCopy(ExpandConstant('{app}\Background.png'), ExpandConstant('{tmp}\Background.png'), True);
FileCopy(ExpandConstant('{app}\isskinU.dll'), ExpandConstant('{tmp}\isskinU.dll'), True);
FileCopy(ExpandConstant('{app}\{#Skin}'), ExpandConstant('{tmp}\{#Skin}'), True);
FileCopy(ExpandConstant('{app}\botva2.dll'), ExpandConstant('{tmp}\botva2.dll'), True);
FileCopy(ExpandConstant('{app}\CallbackCtrl'), ExpandConstant('{tmp}\CallbackCtrl'), True);
FileCopy(ExpandConstant('{app}\UninstData.ini'),Ex pandConstant('{tmp}\Setup.ini'),False);
LoadSkinUninst(ExpandConstant('{tmp}\{#Skin}'), '');

with UninstallProgressForm do begin
BorderStyle := bsNone;
AutoScroll := False;
ClientWidth := ScaleX(650);
ClientHeight := ScaleY(400);
Position:= poScreenCenter;
UninstallProgressForm.InnerNotebook.SetBounds(0,0, 650,400);
UninstallProgressForm.OuterNotebook.SetBounds(0,0, 650,400);

Bevel.Hide;
StatusLabel.Hide;
MainPanel.Hide;
WizardSmallBitmapImage.Hide;
CancelButton.Visible:=True;

ProgressBar.SetBounds(ScaleX(185), ScaleY(374), ScaleX(455), ScaleY(15));

UnsStatusLabel:= TLabel.Create(UninstallProgressForm.InstallingPage );
UnsStatusLabel.SetBounds(ScaleX(15), ScaleY(374), ScaleX(200), ScaleY(30));;
UnsStatusLabel.AutoSize:= False;
UnsStatusLabel.WordWrap:= True;
UnsStatusLabel.Transparent:= True;
UnsStatusLabel.Font.Color:= clSilver;
UnsStatusLabel.Font.Size:= 8
UnsStatusLabel.Font.Name := 'Verdana'
UnsStatusLabel.Caption:= 'Estado de la desinstalaciуn:';
UnsStatusLabel.Parent:= UninstallProgressForm.InstallingPage;

UnsGameNameLabel:= TLabel.Create(UninstallProgressForm.InstallingPage );
UnsGameNameLabel.SetBounds(ScaleX(15), ScaleY(6), ScaleX(500), ScaleY(15));
UnsGameNameLabel.AutoSize:= False;
UnsGameNameLabel.WordWrap:= True;
UnsGameNameLabel.Transparent:= True;
UnsGameNameLabel.Font.Color:= clSilver;
UnsGameNameLabel.Font.Size:= 9
UnsGameNameLabel.Font.Name := 'Verdana'
UnsGameNameLabel.Caption:= 'Desinstalando archivos, por favor espere...';
UnsGameNameLabel.Parent:= UninstallProgressForm.InstallingPage;
end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
if CurUninstallStep = usUninstall then
begin
DelTree('{app}', True, True, True);
RegDeleteKeyIncludingSubkeys(HKLM, ExpandConstant('Software\{code:GamePublisher}\{cod e:GameName}'));
img:=ImgLoad(UninstallProgressForm.Handle,ExpandCo nstant('{tmp}\Background.png'),10,27,630,335,True, True);
ImgApplyChanges(UninstallProgressForm.Handle);
end;
end;

Logrim
03-01-2014, 10:32
Anyone knows which is the name of this window in innosetup, and if its posible modify it?

http://i41.tinypic.com/qsmro8.png

y_thelastknight
03-01-2014, 17:51
Anyone knows which is the name of this window in innosetup, and if its posible modify it?

http://i41.tinypic.com/qsmro8.png

There is No name for this window i think :p
Yup you can create a form for it and call it..you can edit the form however you want it.

reiji777
03-01-2014, 18:21
script.
http://img404.imageshack.us/img404/9127/7f48.jpg

the drive letter on the left and the bar won't show up m8. please help

Logrim
04-01-2014, 03:16
y_TheLastKnight please.. can you tell me with and example? thought i have resolved, but this morning i'm little silly :D.. all that i want is remove the border.. "bsNone".. and change the buttons with botva2, same that change in wizarform.

Darkangel5
06-01-2014, 05:24
sorry to use google translation to translate

I need your service.
I am trying to make an autorun and I would like to know:

how to use the roundedcorner

how to scroll a text to a point defined

thank you

sentinelks
06-01-2014, 05:46
the drive letter on the left and the bar won't show up m8. Please help


use inno ansi

y_thelastknight
06-01-2014, 07:09
y_TheLastKnight please.. can you tell me with and example? thought i have resolved, but this morning i'm little silly :D.. all that i want is remove the border.. "bsNone".. and change the buttons with botva2, same that change in wizarform.

ask razor about this.. i just know that..thats all :p

reiji777
06-01-2014, 07:39
use inno ansi

how to convert the script into inno unicode? is it possible?

y_thelastknight
06-01-2014, 08:54
how to convert the script into inno unicode? is it possible?

i try to convert it. but progress bar not showing it percentage :(

sentinelks
06-01-2014, 09:47
yes is possible

reiji777
07-01-2014, 14:30
yes is possible

how bro? please help

sentinelks
07-01-2014, 15:26
if (FreeMB>{#NeedSize}) then NeedSpaceLabel1.Font.Color:=clBlack else NeedSpaceLabel1.Font.Color:=clRed;
if (FreeMB>{#NeedSize}) then Progress.State:= npbsNormal else Progress.State:= npbsError;
if (FreeMB>{#NeedSize}) then progress.Position:=FreeMB*100/TotalMB;

reiji777
07-01-2014, 17:29
i try to convert it. but progress bar not showing it percentage :(

if (FreeMB>{#NeedSize}) then NeedSpaceLabel1.Font.Color:=clBlack else NeedSpaceLabel1.Font.Color:=clRed;
if (FreeMB>{#NeedSize}) then Progress.State:= npbsNormal else Progress.State:= npbsError;
if (FreeMB>{#NeedSize}) then progress.Position:=FreeMB*100/TotalMB;

wow it really works like a charm bro. thankyou so much to both of you :);)

y_thelastknight
07-01-2014, 19:37
if (FreeMB>{#NeedSize}) then progress.Position:=FreeMB*100/TotalMB;

sentinelks i don't know about reiji777 but thats not in my mind..
progress percentage is should be like (((TotalMB-FreeMB)/TotalMB)*100)
not FreeMB*100/TotalMB

reiji777
07-01-2014, 21:31
sentinelks i don't know about reiji777 but thats not in my mind..
progress percentage is should be like (((TotalMB-FreeMB)/TotalMB)*100)
not FreeMB*100/TotalMB

at first I didn't noticed it, apparently the progress bar is not relevant with the function indeed
btw when I embedded hdd.bmp file to setup by pre-extracting it to 'temp' suddenly my antivirus detecting it as virus/worm/trojan :eek:
what could possibly wrong? am I accidentally creating a virus?

sentinelks
08-01-2014, 00:41
y_thelastknight
perhaps a calculation error but the synthesis is that ;)

however, does not change anything just give a different interpretation

reiji777
12-01-2014, 03:16
sentinelks i don't know about reiji777 but thats not in my mind..
progress percentage is should be like (((TotalMB-FreeMB)/TotalMB)*100)
not FreeMB*100/TotalMB

how to run it without have to define #NeedSize?
because in default inno has already count the program size

mask512
13-01-2014, 10:12
Hei .
I'm noob who tried to create simple installer with inno setup .
i am using unicode version and got problems about creating setup.exe icon

This is my script
; Script generated by the Inno Setup Script 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={{D9D83115-4AA4-4C1F-ABC1-E1C9CCCE5937}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=setup
SetupIconFile=C:\Program Files (x86)\Inno Setup 5\Examples\icon.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files (x86)\Inno Setup 5\Examples\icon.ico"; DestDir: "{app}"; Flags: ignoreversion
; 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: nowait postinstall skipifsilent



LOG
*** Starting compile. [1:04:34 AM]

[ISPP] Preprocessing.
[ISPP] Preprocessed.

Parsing [Setup] section, line 14
Parsing [Setup] section, line 15
Parsing [Setup] section, line 16
Parsing [Setup] section, line 18
Parsing [Setup] section, line 19
Parsing [Setup] section, line 20
Parsing [Setup] section, line 21
Parsing [Setup] section, line 22
Parsing [Setup] section, line 23
Parsing [Setup] section, line 24
Parsing [Setup] section, line 25
Parsing [Setup] section, line 26
Parsing [Setup] section, line 27
Reading file (WizardImageFile)
File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNIMAGE.BMP
Reading file (WizardSmallImageFile)
File: C:\Program Files (x86)\Inno Setup 5\WIZMODERNSMALLIMAGE.BMP
Preparing Setup program executable
Updating icons (SETUP.E32)
Determining language code pages
Parsing [Languages] section, line 30
File: C:\Program Files (x86)\Inno Setup 5\Default.isl
Messages in script file
Reading default messages from Default.isl
Parsing [Languages] section, line 30
File: C:\Program Files (x86)\Inno Setup 5\Default.isl
Parsing [LangOptions], [Messages], and [CustomMessages] sections
Messages in script file
Reading [ Code] section
Parsing [Tasks] section, line 33
Parsing [Icons] section, line 41
Parsing [Icons] section, line 42
Parsing [Run] section, line 45
Parsing [Files] section, line 36
Parsing [Files] section, line 37
Creating setup files
Updating icons (SETUP.EXE)
Compressing: C:\Program Files (x86)\Inno Setup 5\Examples\MyProg.exe
Compressing: C:\Program Files (x86)\Inno Setup 5\Examples\icon.ico
Compressing Setup program executable
Updating version info

*** Finished. [1:04:35 AM, 00:00.624 elapsed]


My icon
http://fileforums.com/attachment.php?attachmentid=8118&stc=1&d=1389636443

and result with no icon
http://fileforums.com/attachment.php?attachmentid=8119&stc=1&d=1389636443

Can anyone tell me whats wrong that script



Sorry for my english .

thanks

y_thelastknight
13-01-2014, 10:26
where did you get that icon file, did you create it?
there is no error in the script.

reiji777
13-01-2014, 14:50
how to insert .png file in inno?

mask512
14-01-2014, 00:07
where did you get that icon file, did you create it?
there is no error in the script.

Yes i did .
This is the details of icon
http://fileforums.com/attachment.php?attachmentid=8123&stc=1&d=1389686794

y_thelastknight
14-01-2014, 00:53
Just attach the icon file. Or use other icon file

pakrat2k2
14-01-2014, 05:11
probably didn't include all sizes for the icon ?

y_thelastknight
14-01-2014, 05:27
probably didn't include all sizes for the icon ?

i have the same thoughts.

mask512
14-01-2014, 20:49
probably didn't include all sizes for the icon ?

i have the same thoughts.

I'm using 2 type of icon
icon download here (http://fileforums.com/attachment.php?attachmentid=8125&stc=1&d=1389759356)

y_thelastknight
15-01-2014, 01:02
I'm using 2 type of icon

I don't know how did you create that icon, both icon files are corrupted.
test with my icon file and tell me..

Vatsal Singh
15-01-2014, 06:20
I'm getting this error on merging setup.cab to setup.exe according to yener90's script v1.0.0.6 . Please help me. Thanks in advance. Sorry for my bad English.

Error:- Setup couldn't find necessary files.

mausschieber
15-01-2014, 07:56
I'm using 2 type of icon



I have corrected it for you
you can use the icons now

http://fileforums.com/attachment.php?attachmentid=8130&stc=1&d=1389801304

mask512
15-01-2014, 10:07
I don't know how did you create that icon, both icon files are corrupted.
test with my icon file and tell me..
your icon worked

Can you edit my pic to icon please ? i dont know whats wrong :D
PIC (http://fileforums.com/attachment.php?attachmentid=8131&stc=1&d=1389809161)


I have corrected it for you
you can use the icons now

http://fileforums.com/attachment.php?attachmentid=8130&stc=1&d=1389801304

Oh thanks . that's password protected

y_thelastknight
15-01-2014, 10:16
here you go

mask512
15-01-2014, 10:53
here you go

Thank you very much :D

y_thelastknight
15-01-2014, 11:06
Thank you very much :D

i use axialis iconworkshop to create icons. and there more software to create or edit icons.

sentinelks
15-01-2014, 13:59
http://iconverticons.com/online/

pakrat2k2
15-01-2014, 15:54
I'm getting this error on merging setup.cab to setup.exe according to yener90's script v1.0.0.6 . Please help me. Thanks in advance. Sorry for my bad English.

Error:- Setup couldn't find necessary files.

in both ISS scripts you need
#define internal NOT ;#define internal

then your setup.cab needs to be extracted into its setup folder. ( same place as ISS scripts ). Then when you compile both scripts, it will merge the setup folder ( basically your setup.cab ) into the exe.

Make sure that if you used compress.bat to make your files that the setup folder has arc.ini in the root of the folder. Also that you've specified the
extract settings in setup.ini properly... IE:

[ExtractSettings]
FreeArcFile1=Data1.cab;DestDir:{app};Disk:1;
FreeArcFile2=Data2.cab;DestDir:{app};Disk:2;

y_thelastknight
15-01-2014, 22:45
in both ISS scripts you need
#define internal NOT ;#define internal

then your setup.cab needs to be extracted into its setup folder. ( same place as ISS scripts ). Then when you compile both scripts, it will merge the setup folder ( basically your setup.cab ) into the exe.


i don't know about that. i have to try :D

pakrat2k2
16-01-2014, 05:09
i don't know about that. i have to try :D

all info is in REV0's topic here>
http://fileforums.com/showthread.php?t=93191

reiji777
19-01-2014, 02:11
I would like to ask how to add bmp image to a button. please help

y_thelastknight
21-01-2014, 02:39
how to create a quick install button for normal installer.

altef_4
21-01-2014, 03:16
how to create a quick install button for normal installer.

try this
function shouldskippage(pageid: integer):boolean;
begin
case pageid of
wplicense,wppassword: //add or remove skiped pages
result:=true;
else result:=false;
end;
end;

y_thelastknight
21-01-2014, 03:40
thanks. used like this :)

function shouldskippage(pageid: integer):boolean;
begin
If RadioButton1.Checked=true then
case pageid of
wpSelectDir,wpSelectProgramGroup,wpReady: //add or remove skiped pages
result:=true;
else
result:=false;
end;
end;

altef_4
21-01-2014, 05:04
thanks. used like this :)

function shouldskippage(pageid: integer):boolean;
begin
If RadioButton1.Checked=true then
case pageid of
wpSelectDir,wpSelectProgramGroup,wpReady: //add or remove skiped pages
result:=true;
else
result:=false;
end;
end;

little edit
function shouldskippage(pageid: integer):boolean;
begin
If RadioButton1.Checked then
case pageid of
wpSelectDir,wpSelectProgramGroup,wpReady: result:=true;
else
result:=false;
else result:=false;
end;

y_thelastknight
21-01-2014, 06:08
http://www.mediafire.com/convkey/c5f6/433mdork3fee73rfg.jpg?size_id=8

altef_4
21-01-2014, 06:36
uuups, sorry little error, i think you already fix it yourself, but if no - hare edited code

function shouldskippage(pageid: integer):boolean;
begin
If RadioButton1.Checked then
case pageid of
wpSelectDir,wpSelectProgramGroup,wpReady: result:=true;
else
result:=false;
end
else result:=false;
end;

i dont check but must work ;)

y_thelastknight
21-01-2014, 06:49
uuups, sorry little error, i think you already fix it yourself, but if no - hare edited code

function shouldskippage(pageid: integer):boolean;
begin
If RadioButton1.Checked then
case pageid of
wpSelectDir,wpSelectProgramGroup,wpReady: result:=true;
else
result:=false;
end
else result:=false;
end;

i dont check but must work ;)

hehe works now. i use my old code before :p
thank Bro..

Logrim
21-01-2014, 07:35
y_thelastknight, i dont know if this method is valid to you, but in mine work :D.

my installer have only welcome screen.. All i do its create a config button like this:

procedure ConfigBtnClick(h: HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
img2:=ImgLoad(WizardForm.Handle,ExpandConstant('{t mp}\Directorio.png'),0,0,600,375,True,True);
ImgApplyChanges(WizardForm.Handle);
WizardForm.DirEdit.Show;
WizardForm.DirBrowseButton.Show;
CoderLabel.Show;
TaskLabel.Show;
DirLabel.Show;
WizardForm.DirEdit.Show;
DiskSpaceLablel.Show;
WizardForm.NextButton.Show;
WizardForm.NextButton.Caption := 'Instalar';
WizardForm.DirBrowseButton.Show;
DiskSpaceLablel.Show;
ShortcutCB.Show;
CreateDLabel.Show;
DirectXCB.Visible:=ExpandConstant('{code:Redist1Na me}') <> '';
DirectXLabel.Visible:=ExpandConstant('{code:Redist 1Name}') <> '';
VisualCCB.Visible:=ExpandConstant('{code:Redist2Na me}') <> '';
VisualCLabel.Visible:=ExpandConstant('{code:Redist 2Name}') <> '';
NvidiaPhysxCB.Visible:=ExpandConstant('{code:Redis t3Name}') <> '';
NvidiaPhysxLabel.Visible:=ExpandConstant('{code:Re dist3Name}') <> '';
LiveCB.Visible:=ExpandConstant('{code:Redist4Name} ') <> '';
LiveLabel.Visible:=ExpandConstant('{code:Redist4Na me}') <> '';
CreateDLabel.Visible:=ExpandConstant('{code:GameEx e}') <> '';
ShortcutCB.Visible:=ExpandConstant('{code:GameExe} ') <> '';
ShortcutCB.Checked:= True;
GameNameLabel.Caption:='Directorio de instalaciуn';
end;

hConfigBtn:=BtnCreate(WizardForm.Handle,400,259,10 0,40,ExpandConstant('{tmp}\Button.png'),18,False);
BtnSetEvent(hConfigBtn,BtnClickEventID,WrapBtnCall back(@ConfigBtnClick,1));
BtnSetCursor(hConfigBtn,GetSysCursorHandle(32649)) ;
BtnSetText(hConfigBtn,'CONFIGURAR');
BtnSetFont(hConfigBtn,Font.Handle);
BtnSetFontColor(hConfigBtn,clGray,clSilver,clGray, clSilver);

And i have the quick install button wich is the next button, and custom config button :D

Without botva its the same, create config button and leave next how quick install..

i hope if its not valid to you, be valid for other..

y_thelastknight
21-01-2014, 07:56
thanks logrim.

Logrim
21-01-2014, 09:05
One question.. how can i call a custom form in a button?

y_thelastknight
21-01-2014, 09:18
One question.. how can i call a custom form in a button?

can't understand it.

Logrim
21-01-2014, 09:20
yup.. i try to explain :D. i create a custom form for task. i want to call it when I click "Task" button, created with botva. But i dont know how to call it.

y_thelastknight
21-01-2014, 09:23
yup.. i try to explain :D. i create a custom form for task. i want to call it when I click "Task" button, created with botva. But i dont know how to call it.

did you add (formname).Showmodel; ???

Logrim
21-01-2014, 09:28
mmm, no, i have another custom form for the search button, and i call it in initializeWizard with "CreateDirBrowseForm";

p.d. i forget to say.. i work with inno 5.5.4 not with innoultra

y_thelastknight
21-01-2014, 09:44
mmm, no, i have another custom form for the search button, and i call it in initializeWizard with "CreateDirBrowseForm";

p.d. i forget to say.. i work with inno 5.5.4 not with innoultra


check your personal msg

reiji777
21-01-2014, 09:52
guys what is botva, gdf, gdi etc? is it some kind plugin? & what are their functions? sorry i'm still noob :o

y_thelastknight
21-01-2014, 09:59
what is botva

we can add png jpg file to inno setup. can create wizardfom from image, or set masks for form.

i know thats all :p

Logrim
24-01-2014, 06:26
I need to know if it posible to disable the unninstall confirmation, and the finished unninstall confirmation msgboxes in inno, and how.. i already disable it in cancel button, but no figure how to make it in unninstall form. thanks..

P.D. Problem solved.. i add the /silent parameter in unnins000.exe shorcut, and how i have the unninstall form created, it appears without msgboxes.. i leave the answer for anyone who need it.
P.D2. Its only work in unninstall shorcut.. someone knows the form of make silent in add/remove program? Thanks

P.D. All Problems solved, thanks, Razor and Altef.

Sorry for my poor vocabulary, i hope understand me.

Logrim
30-01-2014, 04:53
I have a problem, i want a custom form that when click install button, detect if the game is already installed and ofers unninstall it. I have the custom form made and attached in install button, the form works but allways appears, when game is installed and when not..

my code in the install button is this:

function NextButtonClick(CurPageID: Integer): Boolean;
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVer sion\Uninstall\Knights of the Old Republic_is1','UninstallString', Uninstall) then
DetectUnsLabel.Show;
DetectUninsForm.ShowModal;
Uninstall:=RemoveQuotes(Uninstall);
if RadioButton_1.Checked then
begin
if not RadioButton_1.Checked then
Result := True;
end;
end;

EDIT:Another question.. how to hide a custom form?

Thanks, and again sorry if my english is not god.

Vatsal Singh
01-02-2014, 06:14
How to merge autorun.exe into setup.exe according to yener90 CIU v1.0.0.6.Thanks in advance.

altef_4
01-02-2014, 07:20
I have a problem, i want a custom form that when click install button, detect if the game is already installed and ofers unninstall it. I have the custom form made and attached in install button, the form works but allways appears, when game is installed and when not..

my code in the install button is this:



EDIT:Another question.. how to hide a custom form?

Thanks, and again sorry if my english is not god.

i can't write working example baset on this data, but i can see few errors
function NextButtonClick(CurPageID: Integer): Boolean;
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
if CurPageID = wpInstalling then begin
if IsWin64 then
if RegQueryStringValue(HKLM, 'SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVer sion\Uninstall\Knights of the Old Republic_is1','UninstallString', Uninstall) then begin
DetectUnsLabel.Show;
DetectUninsForm.ShowModal;
Uninstall:=RemoveQuotes(Uninstall);
end;
end else begin
if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVer sion\Uninstall\Knights of the Old Republic_is1','UninstallString', Uninstall) then begin
DetectUnsLabel.Show;
DetectUninsForm.ShowModal;
Uninstall:=RemoveQuotes(Uninstall);
end;
Result := not RadioButton_1.Checked;
end else Result := True;
end;
you not checked 64 bit version of windows, result of function can be null, and to write working example i need know what do radiobutton, unslabel,uninstall.

for hide customform use customform.hide, for delete use customform.free, customform := nil; if you use customform.showmodal then to close it use customform.modalresult := mrok; in ee version

Logrim
03-02-2014, 08:40
Another question,, its posible to add a round mask with botva2 and how? thanks.

Razor12911
03-02-2014, 14:52
it's possible and the how part, you need contact me via PM. :)

Logrim
11-02-2014, 00:17
And another question... how can i call filenamelabel when the compression is external? i mean compressed with freearc.

altef_4
11-02-2014, 02:49
And another question... how can i call filenamelabel when the compression is external? i mean compressed with freearc.

if you use ISDone, check this function
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
CurrentFile is container with current extract file name

e.g.

LabelCurrFileName.Caption:='Current File Name: '+MinimizePathName(CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width-ScaleX(100));

this code was taken from original ISDone 0.6 example

Logrim
11-02-2014, 05:48
Thanks altef_4, problem solved.. and the detect install and offer unninstall too. :d Thanks for your help, man.

P.D. if i #define x64.. its the same than iswin64?, i try to do this for x64 registry keys and for x86 with RegWriteStringValue, but i dont have any way to test in x86 system.. The script work like a charm in x64 :D

This is the way i do it:

#ifdef x64
RegWriteStringValue(HKLM,'SOFTWARE\Wow6432Node\Mic rosoft\Windows\CurrentVersion\Uninstall\' + GameName('') + '_is1','UninstallString','"'+ExpandConstant('{uninstallexe}')+'" /Silent');
#else
RegWriteStringValue(HKCU,'Software\Microsoft\Windo ws\CurrentVersion\Uninstall\' + GameName('') + '_is1','UninstallString','"'+ExpandConstant('{uninstallexe}')+'" /Silent');
#endif

Is this correct?

altef_4
12-02-2014, 07:22
Thanks altef_4, problem solved.. and the detect install and offer unninstall too. :d Thanks for your help, man.

P.D. if i #define x64.. its the same than iswin64?....


no, its not, if you use any pre processor directive e.g. #define, #include and others, its only works in compilation stage.
example how to use iswin64 with registry:

if iswin64 then
RegWriteStringValue(HKLM,'SOFTWARE\Wow6432Node\Mic rosoft\Windows\CurrentVersion\Uninstall\' + GameName('') + '_is1','UninstallString','"'+ExpandConstant('{unin stallexe}')+'" /Silent')
else
RegWriteStringValue(HKCU,'Software\Microsoft\Windo ws\CurrentVersion\Uninstall\' + GameName('') + '_is1','UninstallString','"'+ExpandConstant('{unin stallexe}')+'" /Silent');

Andrey167
12-02-2014, 13:20
can have someone else there is an example check md5

jamel2013
14-02-2014, 03:22
FontExpert is the software you need to view and manage fonts
installed or uninstalled on your computer. Not only it can display
these policies but also edit their properties and in print
reports. For easy searching, it can assign keywords and
organize them into categories. Obviously, you can copy, move or
remove fonts and if necessary even perform a filter or sort
according to your own criteria. Furthermore, FontExpert is able to detect and
resolve errors in installed fonts and also create a file
GIF, JPG, PNG, TIFF, BMP or even a HTML page from fonts
selected.

https://www.zeta-uploader.com/116132814

Logrim
14-02-2014, 09:49
One question.. i try to execute directx in ssPostInstall.. my code for this is:

procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep=ssPostInstall) then begin
if (DirectXCB.Checked = True) then begin
FileStatusLabel.Caption := ExpandConstant('{cm:Installing} ') + ExpandConstant('{#Redist1}') + ExpandConstant(', {cm:Wait}');
Exec(ExpandConstant('{src}\_CommonRedist\DirectX\D XSETUP.exe'),'/Silent',false);

but return invalid numbers of parameters error.. i'm lost,, what is wrong? thanks.
end;

altef_4
14-02-2014, 10:42
One question.. i try to execute directx in ssPostInstall.. my code for this is:



but return invalid numbers of parameters error.. i'm lost,, what is wrong? thanks.
end;

if (CurStep=ssPostInstall) then begin
if (DirectXCB.Checked = True) then begin
FileStatusLabel.Caption := ExpandConstant('{cm:Installing} ') + ExpandConstant('{#Redist1}') + ExpandConstant(', {cm:Wait}');
Exec(ExpandConstant('{src}\_CommonRedist\DirectX\D XSETUP.exe'),'/Silent',ExpandConstant('{src}'),1,ewWaitUntilIdle, ResCode);
end;
end;

original Exec function looks like:

function Exec(const Filename, Params, WorkingDir: String; const ShowCmd: Integer; const Wait: TExecWait; var ResultCode: Integer): Boolean;

p.s. add in var section
ResCode: integer;

Logrim
15-02-2014, 00:28
Edit: All Problem Solved. Thanks for your answers Altef. Only one more dude. I try to install silently the nvidia physx msi packaje, mi code is this:

if (NvidiaPhysxCB.Checked = True) then begin
FileStatusLabel.Caption := ExpandConstant('{cm:Installing} ') + ExpandConstant('{#Redist3}') + ExpandConstant(', {cm:Wait}');
Exec(ExpandConstant('{sys}\msiexec.exe {src}\_CommonRedist\PhysX\PhysX-9.13.0604-SystemSoftware.msi'),'/qn /i',ExpandConstant('{src}'),1,ewWaitUntilIdle,ResCo de);

but dont install,, no errors, nothing,, dont install.. what are i doing wrong?

pakrat2k2
15-02-2014, 08:39
check version number/msi extension. PhysX-9.13.0604-SystemSoftware.msi

sometime new files are exe not msi.

check this thread for component values ( redists )
http://fileforums.com/showthread.php?t=95092

Logrim
15-02-2014, 10:00
all syntax is correct pakrat2k2.. Only problem is the {sys}\msiexec.exe.. i dont know where allocate it, lol.. :D.

P.D. And the progressbar blink while install and i dont know why..

GloverK1911
16-02-2014, 04:57
I get error while installing
i use Conversion Quick Archive Packer of Razor
script inno i use: http://fileforums.com/showpost.php?p=416548&postcount=295
http://i.minus.com/ibb68niSdB5lB9.png

Razor12911
16-02-2014, 06:36
set up arc.ini

GloverK1911
16-02-2014, 07:32
set up arc.ini

I already

GloverK1911
17-02-2014, 05:05
I'm Try use BlacBoxScript and it's works fine
But with my Setup it's not working

danswano
17-02-2014, 06:21
Hello,
How to execute a command line using ISExec?
for example i want to execute
program.exe file.ext
This is the stock code from ISDone.iss
if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
can you modify it for me?

Logrim
17-02-2014, 07:06
Anyone, can tell me how to establish priority in install?

altef_4
17-02-2014, 07:31
Anyone, can tell me how to establish priority in install?

[Setup]
AppName=MyApp
AppVername=MyApp
DefaultDirName={pf}\MyApp

[code]

const
NORMAL_PRIORITY_CLASS = $00000020;
IDLE_PRIORITY_CLASS = $00000040;
HIGH_PRIORITY_CLASS = $00000080;
REALTIME_PRIORITY_CLASS = $00000100;
ABOVE_NORMAL_PRIORITY_CLASS = $00004000;
BELOW_NORMAL_PRIORITY_CLASS = $00008000;

function SetPriorityClass(hProcess: THandle; dwPriorityClass: DWORD): BOOL;
external 'SetPriorityClass@kernel32';

function GetCurrentProcess: THandle;
external 'GetCurrentProcess@kernel32';

procedure InitializeWizard();
begin
SetPriorityClass(GetCurrentProcess, IDLE_PRIORITY_CLASS); //set setup priority
end;

taken from here (http://krinkels.org/showpost.php?p=362&postcount=20)

altef_4
17-02-2014, 07:42
Hello,
How to execute a command line using ISExec?
for example i want to execute

This is the stock code from ISDone.iss

can you modify it for me?

if not ISExec ( 0, 0, 0, 'program.exe', 'file.ext', '', '',false) then break;

danswano
17-02-2014, 07:47
Thanks altef_4
I want to run that command in multiple sub directories.
for example {app}\dir\program.exe

how the code will look like?

y_thelastknight
17-02-2014, 07:50
I'm Try use BlacBoxScript and it's works fine
But with my Setup it's not working

If you use quick archive packer then copy file from support dir in quick archive packer and paste it in your setup include dir..

Sorry for my bad english

altef_4
17-02-2014, 08:10
Thanks altef_4
I want to run that command in multiple sub directories.
for example {app}\dir\program.exe

how the code will look like?

if not ISExec ( 0, 0, 0,ExpandConstant('{app}\dir\program.exe'), 'file.ext', '', '',false) then break;

Logrim
17-02-2014, 08:26
I need an expert help here :D.. i know that in msgboxes i cant insert a image, because of that, i make a custom form, and it work well, but i need to know how to to insert the "insert disc" message that i have in the original msgbox, into the custom form.

This is the code:
if Arc1[0] <> '' then
begin
if not FileExists(Arc1[0]) then
begin
ChangeDiscForm.ShowModal;
//if MsgBox(ExpandConstant('{cm:ChangeDisk} ') + 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;

The part with // (the msgbox) its the part i need to include inside the custom form.

altef_4
17-02-2014, 08:45
I need an expert help here :D.. i know that in msgboxes i cant insert a image, because of that, i make a custom form, and it work well, but i need to know how to to insert the "insert disc" message that i have in the original msgbox, into the custom form.

This is the code:


The part with // (the msgbox) its the part i need to include inside the custom form.

you must create new label, button for dir browse dialog and edit in your custom form

Logrim
17-02-2014, 08:53
Thanks for your help altef 4.. i have the custom form, an ok and cancel button and a label. The code only ask for next disc, dont have browse dialog, i think the problem is in this part:

IDCANCEL then ISDoneError := True

i dont know how to insert in the custom form code.. the complete code for the custom form is this:

///////////////////////////////////////////////////////////CHANGE DISC CUSTOM FORM PROCEDURES
procedure ChangeDiscNoClick(Sender: TObject);
begin
ChangeDiscForm.ModalResult:=mrCancel;
end;

procedure ChangeDiscOkClick(Sender: TObject);
begin
ChangeDiscForm.ModalResult:=mrOk;
end;

procedure ChangeDiscFormOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(ChangeDiscForm.Handle,$0112,$F012,0);
end;
////////////////////////////////////////////////////////////////////////////////////////////////
procedure FormCloseBtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
DirBrowseCancel.onclick(nil);
TaskCancel.onclick(nil);
ChangeDiscCancel.onclick(nil);
end;

procedure FormOkBtnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
DirBrowseOk.onclick(nil);
TaskOk.onclick(nil);
ChangeDiscOk.onclick(nil);
end;
////////////////////////////////////////////////////////////////////////////////////////////////

and this is the custom form perse:

///////////////////////////////////////////////////////////CHANGE DISC CUSTOM FORM
procedure CreateChangeDiscForm;
begin
ChangeDiscForm:= CreateCustomForm();
ChangeDiscForm.BorderStyle:=bsNone;
ChangeDiscForm.ClientWidth := ScaleX(400);
ChangeDiscForm.ClientHeight := ScaleY(300);
ChangeDiscForm.FormStyle:= fsStayOnTop;
ChangeDiscForm.OnMouseDown:=@ChangeDiscFormOnMouse Down;
ChangeDiscForm.Center;
ChangeDiscForm.BringToFront;

ChangeDiscLabel:= TLabel.Create(ChangeDiscForm);
ChangeDiscLabel.Parent:= ChangeDiscForm;
ChangeDiscLabel.SetBounds(40,13,600,30);
ChangeDiscLabel.AutoSize:= False;
ChangeDiscLabel.WordWrap:= True;
ChangeDiscLabel.Transparent:= True;
ChangeDiscLabel.Font.Name := 'Verdana';
ChangeDiscLabel.Font.Color:= clGray;
ChangeDiscLabel.Font.Style:=[fsBold];
ChangeDiscLabel.Font.Size:= 8;
ChangeDiscLabel.Caption:=ExpandConstant('{cm:Chang eDiscLabel}');

ChangeDiscCancel:= TButton.Create(ChangeDiscForm);
ChangeDiscCancel.SetBounds(0,0,0,0);
ChangeDiscCancel.OnClick:=@ChangeDiscNoClick;
ChangeDiscCancel.Cursor := crHand;
ChangeDiscCancel.Parent:=ChangeDiscForm;

ChangeDiscOk:= TButton.Create(ChangeDiscForm);
ChangeDiscOk.Parent:=ChangeDiscForm;
ChangeDiscOk.SetBounds(0,0,0,0);
ChangeDiscOk.OnClick:=@ChangeDiscOkClick;
ChangeDiscOk.Cursor := crHand;

hChangeDiscCancelBtn:=BtnCreate(ChangeDiscForm.Han dle,375,13,15,15,ExpandConstant('{tmp}\ExitBtn.png '), 0, false);
BtnSetEvent(hChangeDiscCancelBtn, BtnClickEventID,WrapBtnCallback(@FormCloseBtnClick ,1));
BtnSetEvent(hChangeDiscCancelBtn,BtnMouseEnterEven tID,WrapBtnCallback(@BtnEnter,1));
BtnSetCursor(hChangeDiscCancelBtn,GetSysCursorHand le(32649));

hChangeDiscOkBtn:=BtnCreate(ChangeDiscForm.Handle, 362,13,15,15,ExpandConstant('{tmp}\OkBtn.png'), 0, false);
BtnSetEvent(hChangeDiscOkBtn, BtnClickEventID,WrapBtnCallback(@FormOkBtnClick,1) );
BtnSetEvent(hChangeDiscOkBtn,BtnMouseEnterEventID, WrapBtnCallback(@BtnEnter,1));
BtnSetCursor(hChangeDiscOkBtn,GetSysCursorHandle(3 2649));

img:=ImgLoad(ChangeDiscForm.Handle,ExpandConstant( '{tmp}\ChangeDisc.png'),0,0,400,300,True,True);
ImgApplyChanges(ChangeDiscForm.Handle);
end;
////////////////////////////////////////////////////////////////////////////////////////////////

And thanks for the code of priority Altef,, i have problem with cpu usage even with -m0, cant open a single web page :D.

altef_4
17-02-2014, 09:06
Thanks for your help altef 4.. i have the custom form, an ok and cancel button and a label. The code only ask for next disc, dont have browse dialog, i think the problem is in this part:

IDCANCEL then ISDoneError := True

i dont know how to insert in the custom form code.. the complete code for the custom form is this:



and this is the custom form perse:



And thanks for the code of priority Altef,, i have problem with cpu usage even with -m0, cant open a single web page :D.

here is example of custom form for next disk for ISDone
[Setup]
AppName=My Program
AppVersion=1.5
;AppVerName=My Program 1.5
AppPublisher=Winst@n, Inc.
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputDir=.
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "rus"; MessagesFile: "compiler:Languages\Russian.isl"


[Files]
Source: {win}\help\*; DestDir: {app}\files1\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files2\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files3\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files4\; Flags: external recursesubdirs;

[code]
var
TNewDiskForm :TSetupForm;
DiskBitmapImage: TBitmapImage;
SelectDiskLabel,PathLabel: TLabel;
PathEdit: TEdit;
BrowseButton: TButton;
OKButton: TButton;
CancelButton: TButton;
Filename: String;
Path: String;
Dir: String;
ModalResult: Longint;


//path for searching file
function GetSanitizedPath: String;
begin
Result := Trim(PathEdit.Text);
end;

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

//browse button procedure
procedure BrowseButtonClick(Sender: TObject);
begin
Dir := GetSanitizedPath;
if BrowseForFolder(SetupMessage (msgSelectDirectoryLabel), Dir, False) then
PathEdit.Text := Dir + '\';
TNewDiskForm.show;
end;

// close form (based on mrOK)
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
Path := PathEdit.Text;
Filename:= ExpandConstant ('data_2.arc');
case TNewDiskForm.ModalResult of mrOK: begin
if (Path = '') or not FileExists(Path + Filename) then begin CanClose := false
MsgBox(FmtMessage(SetupMessage(msgFileNotInDir2), [Filename, Path]), mbError, MB_OK);
end;
end;
mrCancel:
begin
CanClose := True;
end;
end;
end;

// ask for next disk
procedure SelectDisk(const DiskNumber: Integer; const Filename, Path: String);
var ExitFlag:Boolean;
begin
repeat
TNewDiskForm:= CreateCustomForm();
TNewDiskForm.SetBounds(ScaleX(0), ScaleY(0), ScaleX(377), ScaleY(200));
TNewDiskForm.CenterInsideControl(WizardForm, False);
TNewDiskForm.Caption:=SetupMessage(msgChangeDiskTi tle);
TNewDiskForm.Font.Color:= clWindowText
TNewDiskForm.Font.Height:= -11
TNewDiskForm.Font.Name:= 'MS Sans Serif'
TNewDiskForm.Font.Style:= []
TNewDiskForm.OnCloseQuery:=@FormCloseQuery;

SelectDiskLabel:=TLabel.Create(TNewDiskForm)
SelectDiskLabel.SetBounds(ScaleX(72),ScaleY(8), ScaleX(297), ScaleY(72));
SelectDiskLabel.AutoSize:=False
SelectDiskLabel.WordWrap:=True
SelectDiskLabel.Transparent:=True
SelectDiskLabel.Font.Color:=clBlack
SelectDiskLabel.Font.Size:=8
SelectDiskLabel.Caption:=FmtMessage(SetupMessage(m sgSelectDiskLabel2), [IntToStr(DiskNumber)]);
SelectDiskLabel.Parent:=TNewDiskForm
SelectDiskLabel.ShowAccelChar:= False

PathEdit:=TEdit.Create(TNewDiskForm)
PathEdit.SetBounds(ScaleX(8), ScaleY(96), ScaleX(281), ScaleY(21));
PathEdit.TabOrder:=2
PathEdit.Text := ExpandConstant('{src}\');
PathEdit.Parent := TNewDiskForm;

PathLabel:= TLabel.Create(TNewDiskForm);
PathLabel.SetBounds(ScaleX(8),ScaleY(80), ScaleX(5), ScaleY(14));
PathLabel.Font.Color:=clBlack
PathLabel.FocusControl:= PathEdit
PathLabel.Caption := SetupMessage(msgPathLabel);
PathLabel.Parent:=TNewDiskForm

BrowseButton := TNewButton.Create(TNewDiskForm);
BrowseButton.SetBounds(ScaleX(296), ScaleY(95), ScaleX(73), ScaleY(23));
BrowseButton.Parent := TNewDiskForm;
BrowseButton.OnClick:=@BrowseButtonClick;
BrowseButton.Caption := SetupMessage(msgButtonBrowse);

CancelButton := TNewButton.Create(TNewDiskForm);
CancelButton.SetBounds(ScaleX(296), ScaleY(137), ScaleX(73), ScaleY(23));
CancelButton.ModalResult := mrCancel;
CancelButton.Parent := TNewDiskForm;
CancelButton.Caption := SetupMessage (msgButtonCancel);

OkButton := TNewButton.Create(TNewDiskForm);
OkButton.SetBounds(ScaleX(216), ScaleY(137), ScaleX(73), ScaleY(23));
OkButton.ModalResult := mrOk;
OkButton.Parent := TNewDiskForm;
OKButton.Caption := SetupMessage(msgButtonOK);

TNewDiskForm.ShowModal;

//close form (based on mrCancel)
case TNewDiskForm.ModalResult of mrCancel:
begin
MsgBox('file not found or you just want to exit, setup now finished',mbError, MB_OK);
TNewDiskForm.free;
ExitFlag:= ExitSetupMsgBox;
Case ExitFlag of True:WizardForm.Close;
False:SelectDisk (DiskNumber,Filename,Path);
True:TNewDiskForm.free;
end;
end;
end;
until ((TNewDiskForm.ModalResult=mrOk)or(TNewDiskForm.Mo dalResult=mrCancel));
end;


procedure CurStepChanged(CurStep: TSetupStep);
begin
// Unpacking form start disk № search path
// | |
if CurStep = ssInstall then SelectDisk (2, 'Filename','{src}');
end; // |
// searching file name


taken from this (http://krinkels.org/showpost.php?p=6944&postcount=26)

GloverK1911
18-02-2014, 01:17
I'm use this script and it's not working when extract with precomp anybody can help me?
http://i1.minus.com/ibb68niSdB5lB9.png

Darkangel5
18-02-2014, 02:15
Hello
how to install a skin for the window to Uninstall InnoSetup.

thank you

danswano
18-02-2014, 05:37
Hello everyone.
How can i group the tasks so i can check/uncheck them all at once in one click?

y_thelastknight
18-02-2014, 06:15
I'm use this script and it's not working when extract with precomp anybody can help me?
http://i1.minus.com/ibb68niSdB5lB9.png

Check post #929
I didnt check your script

Hello
how to install a skin for the window to Uninstall InnoSetup.

thank you

Skin for uninstall wizardform???

Hello everyone.
How can i group the tasks so i can check/uncheck them all at once in one click?

Did you create custom checkbox?

Then create a another check box and control them

Else check help file for it

Reply via mobile so cant do example :(

Darkangel5
18-02-2014, 06:37
Skin for uninstall wizardform???


yes

GloverK1911
18-02-2014, 07:03
Check post #929
I didnt check your script


I have copied but it still does not work

y_thelastknight
18-02-2014, 07:05
yes

Check this script
I cant do example dude im in mobile.
http://fileforums.com/showthread.php?t=95588

Darkangel5
18-02-2014, 08:33
Check this script
I cant do example dude im in mobile.
http://fileforums.com/showthread.php?t=95588

thank you

Logrim
18-02-2014, 08:49
Thank for the change disc code Altef 4, work perfect.. this is how my change disk screen looks now thanks to you:

Nedd more fixers in the desing :D

http://imageshack.com/a/img843/5337/yxac.png

y_thelastknight
18-02-2014, 10:46
I have copied but it still does not work

Then i have to check on pc :(
Right now i cant use pc

Logrim
19-02-2014, 03:46
One rapid question.. I see in the forum (i dont remember what conversion has that) a custom procedure that add custom exit msgbox with image (that is the importat part) :D, the procedure in cuestion was myexit.. anyone can help me to do a similar procedure? dont imagine how to do it.. thanks,, and sorry for so many questions.. its my first script with inno, and want to make a bit different.. i like to complicate my life, lol :D

P.D. i think, the conversion is made by fabio.. dont remember.

Edit: I found the answer for myself.. Thanks to Razor, y_thelastknight and Altef i'm learning a lot. In two days i post a preview, i hope you like it, thanks all three.

Edit2.. Found a new problem that i dont know how to resolve,, sorry.. the custom exit button work like a charm in normal exit, but in change disk exit, the button appears twice. One normal exit msgbox and one the custom exit. I know whats is the problem, but i dont know how to change things for it works.. I need help,,, again.. sorry..

The problem is here, (ExitFlag:= ExitSetupMsgBox; //this is normal exit message) this is the final part of change disk form:
case TNewDiskForm.ModalResult of mrCancel:
begin
TNewDiskForm.free;
ExitFlag:= ExitSetupMsgBox;
Case ExitFlag of True:WizardForm.Close;
False:SelectDisk (DiskNumber,Filename,Path);
True:TNewDiskForm.free;
end;
end;
end;
until ((TNewDiskForm.ModalResult=mrOk)or(TNewDiskForm.Mo dalResult=mrCancel));
end;

this the custo exit button:

///////////////////////////////////////////////////////////CUSTOM EXIT
procedure MyExitMessage();
var
Font: TFont;
begin
MyExit := CreateCustomForm();
with MyExit do
begin
Position := poScreenCenter;
ClientWidth := WizardForm.Width;
ClientHeight := WizardForm.Height div 2;
Caption := ExpandConstant(SetupMessage(msgExitSetupTitle));
Color := clBlack;

with TNewStaticText.Create(MyExit) do
begin
Left := ScaleX(110);
Top := ScaleY(20);
Width := MyExit.Width - ScaleX(115);
Height := MyExit.Height div 2;
AutoSize := False;
WordWrap := True;
Caption := ExpandConstant(SetupMessage(msgExitSetupMessage));
Parent := MyExit;
Font.Color := clWhite;
end;
end;

Font := TFont.Create;
Font.Size := WizardForm.CancelButton.Font.Size;

NoBtn := BtnCreate(MyExit.Handle, MyExit.Width - 165,
MyExit.Height - 50 - ScaleY(25), 160, 50,
ExpandConstant('{tmp}\button2.png'), 18, True);
BtnSetEvent(NoBtn, BtnClickEventID, WrapBtnCallback(@ButtonOnClick, 1));
BtnSetText(NoBtn, 'Нет');
BtnSetFontColor(NoBtn, clWhite, clWhite, clWhite, clWhite);
BtnSetFont(NoBtn, Font.Handle);

YesBtn := BtnCreate(MyExit.Handle, MyExit.Width - 323,
MyExit.Height - 50 - ScaleY(25), 160, 50,
ExpandConstant('{tmp}\button2.png'), 18, True);
BtnSetEvent(YesBtn, BtnClickEventID, WrapBtnCallback(@ButtonOnClick, 1));
BtnSetText(YesBtn, 'Да');
BtnSetFontColor(YesBtn, clWhite, clWhite, clWhite, clWhite);
BtnSetFont(YesBtn, Font.Handle);

Font.Free;
end;
////////////////////////////////////////////////////////////////////////////////////////////////

and this the ancel button procedure:
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
Confirm:=False;
if CurPageID=wpInstalling then begin;
if Cancel then begin
ISDoneError:=True;
ISDoneCancel:=1;
FileStatusLabel.Font.Color:=clRed;
FileStatusLabel.Caption:=ExpandConstant('{cm:Rolli ngFileStatusLabel}');
DelTree(ExpandConstant('{app}'), True, True, True);
WizardForm.CancelButton.Enabled:=False;

MyExitMessage();

if MyExit.ShowModal() = mrNo then
Cancel := False;
end;
end;
end;

GloverK1911
20-02-2014, 02:11
Then i have to check on pc :(
Right now i cant use pc

Can you help me as soon as possible no? I'm very need it

EA-Games
20-02-2014, 07:08
the percent ..
i want it 100% normal .
http://s14.postimg.org/ies1w2zhb/231.jpg

this is the script ::
http://www.mediafire.com/download/db1cwg8fns31d1y/script.iss

Razor12911
20-02-2014, 08:32
http://fileforums.com/showpost.php?p=418281&postcount=89

reiji777
21-02-2014, 00:51
should I put a different AppId for each conversion? or is it only for the updates?
and what its function and how important this AppId?
for example I had this AppId={{46C93620-0A14-4C5B-B1D5-362233D85F30} for one program can I change it manually?
somehow in yener script I didn't find this entry line.

Razor12911
21-02-2014, 04:47
it's up to you but using the same AppId will use previous installation data, better use Different AppID.

AppId is the program uninstall description shard whereby uninstall information is stored. AppId is also optional, you can choose not to use then Inno Setup will use AppName as AppId.

GloverK1911
21-02-2014, 06:18
Razor12911 can u help me check the script? I very need it. Plz :(

Logrim
21-02-2014, 07:19
Hi,, i need help.. again.. how can i put this code in a custom label?

(ExpandConstant('{cm:ChangeDisk} ') + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;

Thanks for your help.

altef_4
21-02-2014, 07:52
Hi,, i need help.. again.. how can i put this code in a custom label?



Thanks for your help.

YourCustomLabel.Caption := ExpandConstant('{cm:ChangeDisk} ') + Arc1[2];

Logrim
21-02-2014, 09:12
Thanks Altef,, but dont work,, is not a label, sorry is a tnewstatictext, i create a form, and i want to skin my "insert disc 1" msgbox like i made with the custom exit, but i have problem inserting that code :D

I'll show you the code of the custom form, and the part where i want to put it,, if you can help me with that i'm very thankful to you.

The change disc custom form:


///////////////////////////////////////////////////////////CUSTOM CHANGE DISC FORM
procedure ButtonOnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
case hBtn of
CDYesBtn: begin MyExit.ModalResult:= mrYes; end;
CDNoBtn: begin MyExit.ModalResult:= mrNo; end;
end;
end;

procedure MyChangeDiscMessage();
begin
MyChangeDisc := CreateCustomForm();
with MyChangeDisc do
begin
BorderStyle:= bsNone;
Position := poScreenCenter;
ClientWidth := WizardForm.Width;
ClientHeight := WizardForm.Height div 2;
Color := clBlack;

with TNewStaticText.Create(MyChangeDisc) do
begin
Left := ScaleX(110);
Top := ScaleY(20);
Width := MyChangeDisc .Width - ScaleX(115);
Height := MyChangeDisc .Height div 2;
AutoSize := False;
WordWrap := True;
Caption := ExpandConstant('{cm:ChangeDisk} ') + Arc1[2];
Parent := MyChangeDisc ;
Font.Color := clWhite;
end;
end;

CDYesBtn:=BtnCreate(MyChangeDisc .Handle,572,5,15,15,ExpandConstant('{tmp}\ExitBtn. png'),0,False);
BtnSetEvent(CDYesBtn,BtnClickEventID,WrapBtnCallba ck(@ButtonOnClick,1));
BtnSetEvent(CDYesBtn,BtnMouseEnterEventID,WrapBtnC allback(@BtnEnter,1));
BtnSetCursor(CDYesBtn,GetSysCursorHandle(32649));

CDNoBtn:=BtnCreate(MyChangeDisc .Handle,560,5,15,15,ExpandConstant('{tmp}\OkBtn.pn g'), 0, false);
BtnSetEvent(CDNoBtn,BtnClickEventID,WrapBtnCallbac k(@ButtonOnClick,1));
BtnSetEvent(CDNoBtn,BtnMouseEnterEventID,WrapBtnCa llback(@BtnEnter,1));
BtnSetCursor(CDNoBtn,GetSysCursorHandle(32649));
end;
////////////////////////////////////////////////////////////////////////////////////////////////


And in this part of the code is where i want to skin the msgbox:

if Arc1[0] <> '' then
begin
if not FileExists(Arc1[0]) then
begin
if MsgBox(ExpandConstant('{cm:ChangeDisk} ') + 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;

y_thelastknight
21-02-2014, 10:33
If im correct delete this line

if MsgBox(ExpandConstant('{cm:ChangeDisk} ') + Arc1[2], mbError, MB_OKCANCEL) = IDCANCEL then ISDoneError := True;

It would be like this


MyChangeDiscMessage;
MyChangeDisc.showmodel;
If modelresult=mrno then ISDoneError := True;



procedure ButtonOnClick(hBtn:HWND);
begin
sndPlaySound(ExpandConstant('{tmp}\click.wav'), $0002);
case hBtn of
CDYesBtn: begin MyExit.ModalResult:= mrYes; end;
CDNoBtn: begin MyExit.ModalResult:= mrNo; end;
end;
end;


What is that?? Is that fine??

Correct me if im wrong

Logrim
21-02-2014, 15:27
Thanks y_thelastnight, work fine, the form show correctly, but there is two little problems :d.. the buttons ok and cancel, not work well, and i cant show one part of the message..
this code part+ Arc1[2] dont work,, "unknow identifier Arc1[2]" error.

And the buttons how i say dont work :D.. but thanks man, i have problems calling custom forms :D.. Still on vacations, by the way? :P

y_thelastknight
21-02-2014, 20:27
the buttons ok and cancel, not work well, and i cant show one part of the message..
this code part dont work,, "unknow identifier Arc1[2]" error.


I know button wont work like this situation.we did with another method create tbutton and made them as mrok and mrno and call them with botva2 button.

unknow identifier Arc1[2]

Set the var and try. I guess this is the problem. But im not pro you know :p

Still on vacations, by the way? :P

Yup :p

Darkangel5
22-02-2014, 01:52
sorry to use google translation to translate

I need your service.
how to scroll a text to a point defined

thank you

Logrim
22-02-2014, 02:05
I forget to set the var.. ains.. sorry for the silly cuestion y_thelasknight.. but the buttons still doesnt work,, i test in some ways and nothing work.

y_thelastknight
22-02-2014, 02:24
Did you try with only tbutton??did it works??

Logrim
22-02-2014, 02:31
I try with invisible tbuttons like in my other forms, you know the others :D.. but nothing,, i try with botva buttons and nothing,, and i try making a form like my detect installation form in that way:

function ShowOptionsForm: TModalResult;
var
OptionsLabel, RepairButtonLabel, UninstallButtonLabel, OptionsCancelLabel: TLabel;
RepairButton, UninstallButton, OptionsCancelButton: TNewButton;
begin
Result := mrNone;
OptionsForm := CreateCustomForm;
try
etc
etc

But nothing seems to work.

The botva butons showing correctly but seems not to aply mrCancel and mrOk.

y_thelastknight
22-02-2014, 02:43
I try with invisible tbuttons like in my other forms, you know the others :D.. but nothing,, i try with botva buttons and nothing,, and i try making a form like my detect installation form in that way:

function ShowOptionsForm: TModalResult;
var
OptionsLabel, RepairButtonLabel, UninstallButtonLabel, OptionsCancelLabel: TLabel;
RepairButton, UninstallButton, OptionsCancelButton: TNewButton;
begin
Result := mrNone;
OptionsForm := CreateCustomForm;
try
etc
etc

But nothing seems to work.

The botva butons showing correctly but seems not to aply mrCancel and mrOk.

Change the invisible button to visible and try click it. If it works set the botva2 button click tbutton

Eg ( botva2 button name.onclick=tbutton name.click )

Hope you understand what iam saying

Logrim
22-02-2014, 03:10
not work.. aggg,,, nah, y_thelasknight, thanks,, dont worry,, i'll try make the work later,, i need a beer :P..

y_thelastknight
22-02-2014, 03:27
not work.. aggg,,, nah, y_thelasknight, thanks,, dont worry,, i'll try make the work later,, i need a beer :P..

Rofl

Logrim
22-02-2014, 09:34
Problems solved y_thelastknight,, :D all work ok now.

y_thelastknight
22-02-2014, 10:20
Problems solved y_thelastknight,, :D all work ok now.

Beer fix it :D

Alfons
23-02-2014, 00:18
Hello all!
Im new in this thingy aaaaand i dont really have some expirience in Inno or Issi or Isskin and so on and on aaaaaaaand my question might be dumb :D but i wasted 2 days of thinking how to solve the problem aaaaand i cant.Im working with INNO, ISSI, and ISSkin

So i have some codes with InitializeWizard and InitializaSetup i know that in _issi.isi has the same lines aaaaaaand i tryed with making #define ISSI_useMyInitializeWizard and ISSI_useMyInitializeSetup and add it the same in the [CODE] Line but then the code dont work.

I tryed to make the line liiiike InitializeWizard() and InitializeWizard(1/2/3/4 and so on) aaand the codes dont respawn again. I even tryed to change the lines in .isi file (that idea was retard i know) aaand nothing again xD

I guess there is solution but i dont have the point of view to see it (if you know what i mean) so please i will be really happy if someone has some ideas how to work that out.

Razor12911
23-02-2014, 01:10
Hello all!
Im new in this thingy aaaaand i dont really have some expirience in Inno or Issi or Isskin and so on and on aaaaaaaand my question might be dumb :D but i wasted 2 days of thinking how to solve the problem aaaaand i cant.Im working with INNO, ISSI, and ISSkin

So i have some codes with InitializeWizard and InitializaSetup i know that in _issi.isi has the same lines aaaaaaand i tryed with making #define ISSI_useMyInitializeWizard and ISSI_useMyInitializeSetup and add it the same in the [CODE] Line but then the code dont work.

I tryed to make the line liiiike InitializeWizard() and InitializeWizard(1/2/3/4 and so on) aaand the codes dont respawn again. I even tryed to change the lines in .isi file (that idea was retard i know) aaand nothing again xD

I guess there is solution but i dont have the point of view to see it (if you know what i mean) so please i will be really happy if someone has some ideas how to work that out.

It's best to copy and fill a custom script by yourself else some line will repeat then error.

Alfons
23-02-2014, 01:38
It's best to copy and fill a custom script by yourself else some line will repeat then error.

I did that aaand same thingy BUT :D
I think i made it just now xD im not really sure how but it works now hahahahah.

Thanx for the quick answer :) thanx you so much

GloverK1911
23-02-2014, 04:30
I have a problem with my setup: the eplapsed not show time but when i'm click English button and click again to my language it's works with show time. How to fixx it???
http://i.minus.com/irNeIFf725tdT.png
http://i.minus.com/iKpcCEy2Exqir.png

This is my script
;================================================= =====;
; ;
; $$$$ $$ $$ $$ $$$$$$$$ $$ $$ ;
; $$$$$$ $$ $$ $$ $$ $$ $$ ;
; $$ $$ $$ $$ $$ $$ $$ $$ ;
; $$$ $$$$$$ $$ $$$$$$ $$ $$ $$ $ $$ ;
; $$ $$ $ $$ $ $$ $$ $$ $$ $ $ $$ ;
; $$$$$$ $$ $ $$ $ $$ $$ $$ $$ $$ ;
; $$$$ $$ $ $$ $$$$$$ $$$$$$$$ $$ $$ ;
; ;
;========================================= © shidow====;
//-------- Информация по игре
// Название игры
#define GameName "DmC: Devil May Cry"
// Название папки игры (без /:*?"<>|)
#define PathGameName "DmC Devil May Cry"
// Исполняемый файл (ехе)
#define GameExeName "NFS13.exe"
// Версия
#define GameVersion "1.0
// Необходимое место для установки
#define NeedSize "5300"
//-------- Настройки инсталлятора
// Цвет текста
#define FontColor "$FFFFFF"
// Цвет текста на кнопках
#define ButtonColor "clBlack"
// Шрифт
#define FontName "UVF Assassin"
//-------- Дополнительные функции
// Каталог расположения exe файла игры (полный путь от корня {app}, если это не корень, то завершающий слэш "\" обязателен!)
#define GameExeFolder ""
// Каталог расположения деинсталлятора
#define UninstallFolder "Uninstall"
// Проверка на наличие русских букв в пути установки, если не нужно - закомментировать
#define RusLetters
// Английский язык инсталлятора, если не нужно - закомментировать
#define English
// Интеграция с социальными сетями, если не нужно - закомментировать
// Текст для сохранения. Вместо пробелов "+"
;#define SocialNetwork "RePack+Need+for+Speed:+Most+Wanted+by+shidow"
// Autorun, если не нужен - закомментировать
;#define Autorun
// Путь до мануала, если не нужен манул - закомментировать
;#define ManualPath "{src}\support\manual.txt"
// URL оф.сайта игры, если не нужен сайт - закомментировать
#define SiteURL "http://www.needforspeed.com/"
// Проверка на наличие установленной игры через реестр, если не нужно - закомментировать
#define RegCheck
// Ветка реестра
#define RegPath "SOFTWARE\EA Games\Need for Speed(TM) Most Wanted"
// Параметр
#define RegValue "DisplayName"
//-------- Компоненты
// Закоментировать, которые не используются (en - не обязательно)!
// Ru, En соответственно на русском и английском.
;#define Comp1Ru "Язык интерфейса"
#define Comp1En "Language text"
//---------------
;#define Comp2Ru "Английский"
#define Comp2En "English"
//---------------
;#define Comp3Ru "Русский"
#define Comp3En "Russian"
//---------------
;#define Comp4Ru "Таблетка"
#define Comp4En "Crack"
//---------------
;#define Comp5Ru "SKiDROW"
#define Comp5En "SKiDROW"
//---------------
;#define Comp6Ru "3DM"
#define Comp6En "3DM"
//---------------
;#define Comp7Ru ""
#define Comp7En ""
//---------------
;#define Comp8Ru ""
#define Comp8En ""
//-------- Проверка MD5-хеша файлов
// Хеш-суммы архивов по порядку data-1.bin, data-2.bin, ... data-8.bin.
// Закоментировать, которые не используются
;#define MD5_1 "8c3ebbccc64527c57aa08904860a9fba1"
;#define MD5_2 "9c7ccdce4e77225ad8d42c52e614fb2b"
;#define MD5_3 "c938c10d268cfc013fa6073e272522ad"
;#define MD5_4 ""
;#define MD5_5 ""
;#define MD5_6 ""
;#define MD5_7 ""
;#define MD5_8 ""
//-------- ISDone
// Компоненты ISDone
;#define Components
// Плавный прогрессбар
#define records
// а) первым делом убедитесь, что в начале скрипта закомментирована строка #define records
// б) компилим проект и запускаем на установку. Это и будет нашим тестовым проходом. Все операции должны дойти до конца и завершиться удачно.
// в) после тестового прогона в указанной папке создастся файл records.inf, его необходимо добавить в проект, раскомметировав строку
// Версия precomp'a
;#define precomp "0.42"
// Распаковка diff архивов
;#define XDelta
// Упаковка файлов в .zip архив
;#define PackZIP
// Распаковка .rar архивов
;#define unrar
// Увеличивает скорость распаковки архивов FreeArc'a
#define facompress
// Для распаковки FreeArc архивов с алгоритмом типа precomp+lzma
#define PrecompInside
// Для распаковки FreeArc архивов с алгоритмом типа srep+lzma
#define SrepInside
;#define MSCInside

[Setup]
AppName={#GameName}
AppPublisher=CongTruongIT
AppVersion={#GameVersion}
DefaultDirName={pf}\{#PathGameName}
DefaultGroupName={#PathGameName}
outputdir=New folder
OutputBaseFilename=setup
;SetupIconFile=D:\Other\RePack\Games\icon.ico
UninstallFilesDir={app}\{#UninstallFolder}

Compression=lzma/ultra64
SolidCompression=yes
RestartIfNeededByRun=no
ShowComponentSizes=false
ShowTasksTreeLines=True

[Files]
Source: Files\Include\Russian.ini; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\English.ini; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\unarc.dll; DestDir: {tmp}; Flags: dontcopy
Source: Files\ISDone.dll; DestDir: {tmp}; Flags: dontcopy
#ifdef records
Source: Files\records.inf; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PrecompInside

Source: Files\Include\CLS-precomp.dll; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\packjpg_dll.dll; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\packjpg_dll1.dll; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\precomp.exe; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\zlib1.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef SrepInside
Source: Files\Include\CLS-srep.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef MSCInside
Source: Files\Include\CLS-MSC.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef facompress
Source: Files\Include\facompress.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef precomp
#if precomp == "0.38"
Source: Files\Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.4"
Source: Files\Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.41"
Source: Files\Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
#else
#if precomp == "0.42"
Source: Files\Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#else
Source: Files\Include\precomp038.exe; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\precomp040.exe; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\precomp041.exe; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\precomp042.exe; DestDir: {tmp}; Flags: dontcopy
#endif
#endif
#endif
#endif
#endif
#ifdef unrar
Source: Files\Include\Unrar.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef XDelta
Source: Files\Include\XDelta3.dll; DestDir: {tmp}; Flags: dontcopy
#endif
#ifdef PackZIP
Source: Files\Include\7z.dll; DestDir: {tmp}; Flags: dontcopy
Source: Files\Include\packZIP.exe; DestDir: {tmp}; Flags: dontcopy
#endif
Source: Files\CallbackCtrl.dll; DestDir: {tmp}; Flags: dontcopy;
Source: Files\ISDone.dll; DestDir: {tmp}; Flags: dontcopy;
Source: Files\botva2.dll; DestDir: {tmp}; Flags: dontcopy;
Source: Files\b2p.dll; DestDir: {tmp}; Flags: dontcopy;
Source: Files\WinTB.dll; DestDir: {tmp}; Flags: dontcopy;
Source: Files\background.bmp; DestDir: {tmp}; Flags: dontcopy;
Source: Files\ProgressBackground.png; DestDir: {tmp}; Flags: dontcopy;
Source: Files\ProgressImg.png; DestDir: {tmp}; Flags: dontcopy;
Source: Files\button.png; DestDir: {tmp}; Flags: dontcopy;
Source: Files\edit.png; DestDir: {tmp}; Flags: dontcopy;
#ifdef SocialNetwork
Source: Files\vk.bmp; DestDir: {tmp}; Flags: dontcopy;
Source: Files\facebook.bmp; DestDir: {tmp}; Flags: dontcopy;
Source: Files\twitter.bmp; DestDir: {tmp}; Flags: dontcopy;
#endif
#ifdef Autorun
Source: Files\background-autorun.bmp; DestDir: {tmp}; Flags: dontcopy;
#endif

[Types]
Name: full; Description: Full installation; Flags: iscustom

[Components]
;Name: text; Description: {#Comp1Ru}; Types: full; Flags: fixed
;Name: text\eng; Description: {#Comp2Ru}; Flags: exclusive;
;Name: text\rus; Description: {#Comp3Ru}; Flags: exclusive;
;Name: crack; Description: {#Comp4Ru}; Types: full; Flags: fixed
;Name: crack\skid; Description: {#Comp5Ru}; Flags: exclusive;
;Name: crack\3dm; Description: {#Comp6Ru}; Flags: exclusive;
;Name: voice\fra; Description: {#Comp7Ru}; Flags: exclusive;
;Name: voice\ita; Description: {#Comp8Ru}; Flags: exclusive;

[Icons]
Name: {userdesktop}\{#PathGameName}; IconFilename: {app}\{#GameExeFolder}{#GameExeName}; Filename: {app}\{#GameExeFolder}{#GameExeName}; WorkingDir: {app}\{#GameExeFolder}; Tasks: icon\desktop; Comment: Запустить {#GameName};
Name: {group}\{#PathGameName}; IconFilename: {app}\{#GameExeFolder}{#GameExeName}; Filename: {app}\{#GameExeFolder}{#GameExeName}; WorkingDir: {app}\{#GameExeFolder}; Tasks: icon\start;
Name: {group}\Удалить игру; IconFilename: {app}\{#GameExeFolder}{#GameExeName}; Filename: {uninstallexe}; WorkingDir: {app}\{#UninstallFolder}; Tasks: icon\start;
// Manual и ReadMe если есть
;Name: {group}\Руководство пользователя; Filename: {app}\Support\Russian\manual.pdf; WorkingDir: {app}; Check: NoIconsCheck;
;Name: {group}\ReadMe; Filename: {app}\Support\Russian\readme.txt; WorkingDir: {app}; Check: NoIconsCheck;


[Run]
Filename: {src}\Redist\vcredist_x86.exe; WorkingDir: {src}\Redist; Tasks: Redist\1; Flags: skipifdoesntexist; Check: CheckError;
Filename: {src}\Redist\dxwebsetup.exe; WorkingDir: {src}\Redist; Tasks: Redist\2; Flags: skipifdoesntexist; Check: CheckError;
;Filename: {src}\Redist\oalinst.exe; WorkingDir: {src}\Redist\; Tasks: Redist\3; Flags: skipifdoesntexist; Check: CheckError;
;Filename: {src}\Redist\vcredist_x86.exe; WorkingDir: {src}\Redist; Tasks: Redist\3; Flags: skipifdoesntexist; Check: CheckError and not IsWin64;
;Filename: {src}\Redist\vcredist_x64.exe; WorkingDir: {src}\Redist; Tasks: Redist\3; Flags: skipifdoesntexist; Check: CheckError and IsWin64;
;Filename: {src}\Redist\Rapture3D\rapture3d_2.4.9game.exe; WorkingDir: {src}\Redist\Rapture3D\; Tasks: Redist\4; Flags: skipifdoesntexist; Check: CheckError;
;Filename: msiexec.exe; Parameters: "-i ""{src}\Redist\xnafx31_redist.msi"" -qf"; WorkingDir: {src}\Redist\; Tasks: Redist\2; Flags: skipifdoesntexist; Check: CheckError;

[Tasks]
Name: icon; Description: Biк̉u tượng; Flags: checkablealone
Name: icon\desktop; Description: Tạo icon ngoài màn hình; Flags: checkablealone
Name: icon\start; Description: Tạo icon trкn Start Menu; Flags: checkablealone
Name: redist; Description: Phв̀n mк̀m khác; Flags: checkablealone
Name: redist\1; Description: Microsoft Visual C++; Flags: checkablealone
Name: redist\2; Description: DirectX; Flags: checkablealone
;Name: redist\3; Description: NET Framework; Flags: checkablealone
;Name: redist\4; Description: OpenAL; Flags: checkablealone

;[Registry]
[Languages]
Name: Via; MessagesFile:Vietnamese_2.isl
[CustomMessages]
Via.WizardForm=WizardForm - {#GameName}
Via.AutorunForm=Autorun - {#GameName}
Via.WelcomeLabel1=Chào mừng bạn đќn với trình cài đặt
Via.WelcomeLabel2=«{#GameName}» sẽ được cài trкn máy tính của bạn.%n%nBạn nкn đóng các ứng dụng đang chạy trước khi tiќp tục.%n%nNhв́n «Next» đк̉ tiќp tục, hoặc «Cancel» đк̉ thoát.
Via.SelectDirLabel1=Chọn thư mục cài đặt và các phв̀n mк̀m khác.%nNhв́n «Install» đк̉ bắt đв̀u.
Via.SelectDirLabel2_1=Cв̀n ít nhв́t
Via.SelectDirLabel2_2=ф̉ đĩa trф́ng đк̉ cài game.
Via.StatusLabel_1=Đang giải nén...
Via.StatusLabel_2=Giải nén hoàn tв́t...
Via.StatusLabel_3=Đang cài đặt các phв̀n mк̀m khác...
Via.StatusLabel_4=Đã dừng giải nén...
Via.FinishedLabel1=Completing the Setup Wizard of the game
Via.FinishedLabel2=Trò chơi «{#GameName}» Đã được cài đặt trкn máy tính của bạn!.%n%nTrò chơi có thк̉khởi đф̣ng ngay bвy giờ bằng cách mở biк̉u tượng trò chơi.%n%nNhв́n «Finish», đк̉thoát trình cài đặt.
Via.FinishedLabel2_error=Đã có lф̃i xảy ra trong quá trình cài đặt «{#GameName}»%n%nHãy chắc chắn bạn đã khắc phục sự cф́ và chạy trình cài đặt mф̣t lв̀n nữa.%n%nNhв́n «Finish» đк̉ thoát.
Via.SelectDirForm=Duyк̣t thư mục
Via.SelectDirFormLabel=chọn mф̣t thư mục ở danh sách dưới rф̀i nhв́n «ОК».
Via.RusLetters_header=Invalid characters
Via.RusLetters=There're russian letters in the folder name so it can't be.%nPlease remove russian letters and repeat operation.
Via.ElapsedTime=Thời gian đã qua:
Via.RemainingTime=Tф̉ng thời gian cài:
Via.NewFolder=Thư mục mới
Via.CancelButton=Cancel
Via.NextButton=Next >
Via.BackButton=< Back
Via.BrowseButton=Browse...
Via.InstallButton=Install
Via.FinishButton=Finish
Via.PauseButton=Pause
Via.ResumeButton=Rumse
Via.EnglishButton=English
Via.RussianButton=Vietnamese
Via.OKButton=OK
Via.SocialNetworkButton=Social Network
Via.SocialNetworkFormLabel=Share
Via.RunGameError=Gặp lф̃i trong lúc bắt đв̀u trò chơi
Via.GameSet=«{#GameName}» Đã được cài trкn máy tính của bạn.%nVв̃n tiќp tục cài?
Via.InstallAutorunButton=Installation
Via.PlayAutorunButton=Play
Via.ManualAutorunButton=Manual
Via.SiteAutorunButton=Game Site
Via.ExitAutorunButton=Exit
Via.MD5ErrorEn=Hash checksums do not match!%nThis means that the files are corrupted.%nLoad distribution otherwise performance can not be guaranteed.%nAll still start the installation?


[UninstallDelete]
Type: filesandordirs; Name: {app};




//-------- Подключаем модули
#Include "iss\botva2.iss"
#Include "iss\ProgressBar.iss"
#Include "iss\WinTB.iss"
#ifdef MD5_1
#Include "iss\MD5.iss"
#endif
//--------------------------

const
MB_ICONEXCLAMATION = $30;
PCFonFLY=true;
notPCFonFLY=false;

type
LCID = LongInt;

var
CloseLabel, WelcomeLabel1, WelcomeLabel2, DirEditLabel, SelectDirLabel1, SelectDirLabel2, SelectDirFormLabel,
LabelPct1, LabelTime1, LabelTime2, StatusLabel, FinishedLabel1, FinishedLabel2: TLabel;
CancelButton, NextButton, BackButton, BrowseButton, PauseButton, ResumeButton: HWND;
SelectDirFormOKButton, SelectDirFormCancelButton, SelectDirFormNewFolderButton: TButton;
BackgroundImg, DirEditImg: Longint;
ISDoneCancel, ResultCode: Integer;
FolderTreeView: TFolderTreeView;
ISDoneProgressBar1: TImgPB;
FreeMB, TotalMB: Cardinal;
SelectDirForm: TSetupForm;
ISDoneError: Boolean;
ButtonFont: TFont;
DirEdit: TEdit;
PCFVer: Double;
#ifdef SocialNetwork
SocialNetworkFormLabel, CloseSocialNetworkFormLabel: TLabel;
VKImage, FacebookImage, TwitterImage: TBitmapImage;
SocialNetworkForm: TSetupForm;
SocialNetworkButton: HWND;
#endif
#ifdef Autorun
InstallAutorunButton, ManualAutorunButton, SiteAutorunButton, SocialNetworkAutorunButton,
ExitAutorunButton, InfoAutorunButton: HWND;
BackgroundAutorunImg: Longint;
AutorunForm: TSetupForm;
InstallCreate: boolean;
Language: string;
#ifdef English
EnglishAutorunButton, RussianAutorunButton: HWND;
#endif
#ifdef RegCheck
PlayAutorunButton: HWND;
ResultReg: string;
#endif
#endif
#ifdef English
EnglishButton, RussianButton: HWND;
#endif

function ReleaseCapture(): Longint; external '[email protected] stdcall';

function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external '[email protected] stdcall';
function SetClassLong(hWnd: HWND; Index, NewLong: Longint): Longint; external 'SetClassLongA@user32 stdcall';

function MessageBox(hWnd: Integer; lpText, lpCaption: String; uType: Cardinal): Integer; external '[email protected] stdcall';

function GetSystemDefaultLCID() : LCID; external '[email protected] stdcall';

procedure WizardFormOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(WizardForm.Handle,$0112,$F012,0);
end;

procedure CancelButtonOnClick(hBtn:HWND);
begin
WizardForm.CancelButton.OnClick(nil);
end;

procedure NextButtonOnClick(hBtn:HWND);
begin
WizardForm.NextButton.OnClick(nil);
end;

procedure BackButtonOnClick(hBtn:HWND);
begin
WizardForm.BackButton.OnClick(nil);
end;

procedure CloseLabelOnClick(Sender: TObject);
begin
WizardForm.CancelButton.OnClick(nil);
end;

procedure CloseLabelOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
CloseLabel.SetBounds(ScaleX(640), ScaleY(10), ScaleX(20), ScaleY(20));
end;

procedure WizardFormOnMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
CloseLabel.SetBounds(ScaleX(640), ScaleY(7), ScaleX(20), ScaleY(20));
end;

//------- Необходимое место для установки
function NumToStr(Float: Extended): String;
begin
Result:= Format('%.2n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result)-1);
end;

function CompareNum(FirstNum, SecondNum: Integer): Boolean;
begin
if FirstNum < SecondNum then Result:= False else Result:= True;
end;

function MbOrTb(Byte: Extended): String;
begin
#ifdef English
if BtnGetVisibility(RussianButton) then begin
if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' GB' else
Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' TB'
end else begin
#endif
if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
if Byte/1024 < 1024 then Result:= NumToStr(round(Byte/1024*100)/100) + ' GB' else
Result:= NumToStr(round((Byte/(1024*1024))*100)/100) + ' TB'
#ifdef English
end;
#endif
end;

procedure GetFreeSpaceCaption(Sender: TObject);
var Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if CompareNum(FreeMB, {#NeedSize}) then begin
BtnSetEnabled(NextButton, True);
SelectDirLabel2.Font.Color:={#FontColor};
end else begin
BtnSetEnabled(NextButton, False);
SelectDirLabel2.Font.Color:=clRed;
end;
end;

//------- ISDone
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;

function WrapCallback(callback:TCallback; paramcount:integer):longword;external 'wrapcallback@files:ISDone.dll stdcall delayload';

function ISArcExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath, ExtractedPath: AnsiString; DeleteInFile:boolean; Password, CfgFile, WorkPath: AnsiString; ExtractPCF: boolean ):boolean; external 'ISArcExtract@files:ISDone.dll stdcall delayload';
function IS7ZipExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'IS7zipExtract@files:ISDone.dll stdcall delayload';
function ISRarExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutPath: AnsiString; DeleteInFile:boolean; Password: AnsiString):boolean; external 'ISRarExtract@files:ISDone.dll stdcall delayload';
function ISPrecompExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISPrecompExtract@files:ISDone.dll stdcall delayload';
function ISSRepExtract(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString; DeleteInFile:boolean):boolean; external 'ISSrepExtract@files:ISDone.dll stdcall delayload';
function ISxDeltaExtract(CurComponent:Cardinal; PctOfTotal:double; minRAM,maxRAM:integer; InName, DiffFile, OutFile: AnsiString; DeleteInFile, DeleteDiffFile:boolean):boolean; external 'ISxDeltaExtract@files:ISDone.dll stdcall delayload';
function ISPackZIP(CurComponent:Cardinal; PctOfTotal:double; InName, OutFile: AnsiString;ComprLvl:integer; DeleteInFile:boolean):boolean; external 'ISPackZIP@files:ISDone.dll stdcall delayload';
function ShowChangeDiskWindow(Text, DefaultPath, SearchFile:AnsiString):boolean; external 'ShowChangeDiskWindow@files:ISDone.dll stdcall delayload';

function Exec2 (FileName, Param: PAnsiChar;Show:boolean):boolean; external 'Exec2@files:ISDone.dll stdcall delayload';
function ISFindFiles(CurComponent:Cardinal; FileMask:AnsiString; var ColFiles:integer):integer; external 'ISFindFiles@files:ISDone.dll stdcall delayload';
function ISPickFilename(FindHandle:integer; OutPath:AnsiString; var CurIndex:integer; DeleteInFile:boolean):boolean; external 'ISPickFilename@files:ISDone.dll stdcall delayload';
function ISGetName(TypeStr:integer):PAnsichar; external 'ISGetName@files:ISDone.dll stdcall delayload';
function ISFindFree(FindHandle:integer):boolean; external 'ISFindFree@files:ISDone.dll stdcall delayload';
function ISExec(CurComponent:Cardinal; PctOfTotal,SpecifiedProcessTime:double; ExeName,Parameters,TargetDir,OutputStr:AnsiString; Show:boolean):boolean; external 'ISExec@files:ISDone.dll stdcall delayload';

function SrepInit(TmpPath:PAnsiChar;VirtMem,MaxSave:Cardina l):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;Pre compVers:single):boolean; external 'PrecompInit@files:ISDone.dll stdcall delayload';
function FileSearchInit(RecursiveSubDir:boolean):boolean; external 'FileSearchInit@files:ISDone.dll stdcall delayload';
function ISDoneInit(RecordFileName:AnsiString; TimeType,Comp1,Comp2,Comp3:Cardinal; WinHandle, NeededMem:longint; callback:TCallback):boolean; external 'ISDoneInit@files:ISDone.dll stdcall';
function ISDoneStop:boolean; external 'ISDoneStop@files:ISDone.dll stdcall';
function ChangeLanguage(Language:AnsiString):boolean; external 'ChangeLanguage@files:ISDone.dll stdcall delayload';
function SuspendProc:boolean; external 'SuspendProc@files:ISDone.dll stdcall';
function ResumeProc:boolean; external 'ResumeProc@files:ISDone.dll stdcall';

function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAn siChar): longword;
begin
if OveralPct<=1000 then ImgPBSetPosition(ISDoneProgressBar1,OveralPct);
LabelPct1.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
#ifdef English
if BtnGetVisibility(RussianButton) then begin
if BtnGetVisibility(PauseButton) then begin
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTim eEn} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingT imeEn} ')+TimeStr1;
end else begin
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTim eEn}');
LabelTime2.Caption:=ExpandConstant('{cm:RemainingT imeEn}');
end;
end else begin
#endif
if BtnGetVisibility(PauseButton) then begin
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTim e} ')+TimeStr2;
LabelTime2.Caption:=ExpandConstant('{cm:RemainingT ime} ')+TimeStr1;
end else begin
LabelTime1.Caption:=ExpandConstant('{cm:ElapsedTim e}');
LabelTime2.Caption:=ExpandConstant('{cm:RemainingT ime}');
end;
#ifdef English
end;
#endif
Result := ISDoneCancel;
end;

procedure ISDoneCancelButtonOnClick(hBtn:HWND);
begin
ISDoneCancel:=1;
end;

procedure HideControls;
begin
LabelPct1.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
BtnSetEnabled(CancelButton, False);
ImgPBVisibility(ISDoneProgressBar1, False);
BtnSetVisibility(PauseButton, False);
BtnSetVisibility(ResumeButton, False);
#ifdef English
if BtnGetVisibility(RussianButton) then begin
StatusLabel.Caption:=ExpandConstant('{cm:StatusLab el_2En}');
BtnSetEnabled(RussianButton, False);
end else begin
#endif
StatusLabel.Caption:=ExpandConstant('{cm:StatusLab el_2}');
#ifdef English
BtnSetEnabled(EnglishButton, False);
end;
#endif
#ifdef SocialNetwork
BtnSetEnabled(SocialNetworkButton, False);
#endif
end;

//-------- Подключаем модуль смены языка
#ifdef English
#Include "iss\ChangeLanguage.iss"
#endif
//--------------------------

//------- Пауза
// Отмена
procedure ISDoneCancelButtonOnClick2(hBtn:HWND);
begin
ResumeProc;
ISDoneCancel:=1;
end;

// Пауза
procedure PauseButtonOnClick(hBtn:HWND);
begin
SuspendProc;
BtnSetVisibility(PauseButton, False);
BtnSetVisibility(ResumeButton, True);
BtnSetEvent(CancelButton,BtnClickEventID,WrapBtnCa llback(@ISDoneCancelButtonOnClick2,1));
#ifdef English
if BtnGetVisibility(RussianButton) then begin
StatusLabel.Caption:=ExpandConstant('{cm:StatusLab el_4En}');
end else begin
#endif
StatusLabel.Caption:=ExpandConstant('{cm:StatusLab el_4}');
#ifdef English
end;
#endif
ImgApplyChanges(WizardForm.Handle);
end;

// Продолжить
procedure ResumeButtonOnClick(hBtn:HWND);
begin
ResumeProc;
BtnSetVisibility(PauseButton, True);
BtnSetVisibility(ResumeButton, False);
BtnSetEvent(CancelButton,BtnClickEventID,WrapBtnCa llback(@ISDoneCancelButtonOnClick,1));
#ifdef English
if BtnGetVisibility(RussianButton) then begin
StatusLabel.Caption:=ExpandConstant('{cm:StatusLab el_1En}');
end else begin
#endif
StatusLabel.Caption:=ExpandConstant('{cm:StatusLab el_1}');
#ifdef English
end;
#endif
ImgApplyChanges(WizardForm.Handle);
end;

//------- Форма выбора папки установки
procedure FolderTreeViewOnChange(Sender: TObject);
begin
if FolderTreeView.Directory <> WizardForm.DirEdit.Text then
DirEdit.Text:=AddBackslash(FolderTreeView.Director y) + '{#PathGameName}' else
DirEdit.Text:=FolderTreeView.Directory;
end;

procedure SelectDirFormOKButtonOnClick(Sender: TObject);
begin
WizardForm.DirEdit.Text:=DirEdit.Text;
DirEditLabel.Caption:=MinimizePathName(WizardForm. DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
end;

procedure SelectDirFormNewFolderButtonOnClick(Sender: TObject);
begin
#ifdef English
if BtnGetVisibility(RussianButton) then begin
FolderTreeView.CreateNewDirectory(ExpandConstant(' {cm:NewFolderEn}'));
end else begin
#endif
FolderTreeView.CreateNewDirectory(ExpandConstant(' {cm:NewFolder}'));
#ifdef English
end;
#endif
DirEdit.Text := AddBackslash(FolderTreeView.Directory) + '{#PathGameName}';
end;

procedure BrowseButtonOnClick(hBtn:HWND);
begin
// Форма
SelectDirForm:=CreateCustomForm;
with SelectDirForm do begin
SetBounds(ScaleX(0), ScaleY(0), ScaleX(355), ScaleY(365));
Position:=poScreenCenter;
Caption:=ExpandConstant('{cm:SelectDirForm}');
end;

// Дерево дисков и папок
FolderTreeView:=TFolderTreeView.Create(WizardForm) ;
with FolderTreeView do begin
SetBounds(ScaleX(16), ScaleY(64), ScaleX(317), ScaleY(229));
Parent:=SelectDirForm;
OnChange:=@FolderTreeViewOnChange;
end;

// Эдит
DirEdit:= TEdit.Create(WizardForm);
with DirEdit do begin
SetBounds(ScaleX(16), ScaleY(36), ScaleX(317), ScaleY(21));
Text:=WizardForm.DirEdit.Text;
Parent:=SelectDirForm;
end;

// Лейблы
SelectDirFormLabel:= TLabel.Create(WizardForm);
with SelectDirFormLabel do begin
AutoSize:=False;
SetBounds(ScaleX(10), ScaleY(10), ScaleX(300), ScaleY(18));
Transparent:=True;
Font.Color:=clBlack;
Font.Name:='Tahoma';
Font.Size:=8;
Caption:=ExpandConstant('{cm:SelectDirFormLabel}') ;
Parent:=SelectDirForm;
end;

// Кнопки
SelectDirFormOKButton:= TNewButton.Create(WizardForm);
with SelectDirFormOKButton do begin
SetBounds(ScaleX(181), ScaleY(305), ScaleX(75), ScaleY(23));
Caption:=ExpandConstant('{cm:OKButton}');
Parent:=SelectDirForm;
OnClick:=@SelectDirFormOKButtonOnClick;
ModalResult:=mrOk;
end;

SelectDirFormCancelButton:= TNewButton.Create(WizardForm);
with SelectDirFormCancelButton do begin
SetBounds(ScaleX(262), ScaleY(305), ScaleX(75), ScaleY(23));
Caption :=ExpandConstant('{cm:CancelButton}');
Parent:=SelectDirForm;
ModalResult:=mrCancel;
end;

SelectDirFormNewFolderButton:= TNewButton.Create(WizardForm);
with SelectDirFormNewFolderButton do begin
SetBounds(ScaleX(12), ScaleY(305), ScaleX(85), ScaleY(23));
Caption :=ExpandConstant('{cm:NewFolder}');
Parent:=SelectDirForm;
OnClick:=@SelectDirFormNewFolderButtonOnClick;
end;

#ifdef English
if BtnGetVisibility(RussianButton) then begin
SelectDirForm.Caption:=ExpandConstant('{cm:SelectD irFormEn}');
SelectDirFormLabel.Caption:=ExpandConstant('{cm:Se lectDirFormLabelEn}');
SelectDirFormCancelButton.Caption :=ExpandConstant('{cm:CancelButtonEn}');
SelectDirFormNewFolderButton.Caption :=ExpandConstant('{cm:NewFolderEn}')
end else begin
SelectDirForm.Caption:=ExpandConstant('{cm:SelectD irForm}');
SelectDirFormLabel.Caption:=ExpandConstant('{cm:Se lectDirFormLabel}');
SelectDirFormCancelButton.Caption :=ExpandConstant('{cm:CancelButton}');
SelectDirFormNewFolderButton.Caption :=ExpandConstant('{cm:NewFolder}')
end;
#endif

FolderTreeView.ChangeDirectory(AddBackslash(Wizard Form.DirEdit.Text), True);
SelectDirForm.ShowModal;
SelectDirForm.Free;
end;

#ifdef SocialNetwork
//------- Интеграция с социальными сетями
procedure SocialNetworkFormOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
ReleaseCapture;
SendMessage(SocialNetworkForm.Handle,$0112,$F012,0 );
end;

procedure VKImageOnClick(Sender: TObject);
begin
ShellExec('open', 'http://vk.com/share.php?url=http%3A%2F%2Fshidow.com&title={#SocialNetwork}&description=%20%D0%91%D0%BB%D0%BE%D0%B3%20%D1%8E%D 0%B7%D0%B5%D1%80%D0%B0%20shidow', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
SocialNetworkForm.Close;
end;

procedure FacebookImageOnClick(Sender: TObject);
begin
ShellExec('open', 'http://www.facebook.com/sharer/sharer.php?src=sp&u=http%3A%2F%2Fshidow.com', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
SocialNetworkForm.Close;
end;

procedure TwitterImageOnClick(Sender: TObject);
begin
ShellExec('open', 'http://twitter.com/intent/tweet?status={#SocialNetwork}+http%3A%2F%2Fshidow. com', '', '', SW_SHOWNORMAL, ewNoWait, ResultCode);
SocialNetworkForm.Close;
end;

procedure CloseSocialNetworkFormLabelOnClick(Sender: TObject);
begin
SocialNetworkForm.Close;
end;

procedure SocialNetworkButtonOnClick(hBtn:HWND);
begin
// Форма
SocialNetworkForm:=CreateCustomForm;
with SocialNetworkForm do begin
SetBounds(ScaleX(0), ScaleY(0), ScaleX(205), ScaleY(85));
Position:=poScreenCenter;
BorderStyle:=bsNone;
OnMouseDown:=@SocialNetworkFormOnMouseDown;
end;

CloseSocialNetworkFormLabel:= TLabel.Create(nil);
with CloseSocialNetworkFormLabel do begin
AutoSize:=False;
SetBounds(ScaleX(187), ScaleY(5), ScaleX(10), ScaleY(18));
Transparent:=True;
Font.Color:=clBlack;
Font.Name:='Tahoma';
Font.Size:=10;
Caption:='X';
Cursor:=crHand;
Parent:=SocialNetworkForm;
OnClick:=@CloseSocialNetworkFormLabelOnClick;
end;

SocialNetworkFormLabel:= TLabel.Create(nil);
with SocialNetworkFormLabel do begin
AutoSize:=False;
SetBounds(ScaleX(10), ScaleY(10), ScaleX(150), ScaleY(18));
Transparent:=True;
Font.Color:=clBlack;
Font.Name:='Tahoma';
Font.Size:=8;
Caption:=ExpandConstant('{cm:SocialNetworkFormLabe l}');
Parent:=SocialNetworkForm;
OnMouseDown:=@SocialNetworkFormOnMouseDown;
end;

// ВКонтакте
VKImage:= TBitmapImage.Create(nil);
with VKImage do begin
SetBounds(ScaleX(40), ScaleY(35), ScaleX(35), ScaleY(35));
Bitmap.LoadFromFile(ExpandConstant('{tmp}\vk.bmp') );
Cursor:=crHand;
Parent:=SocialNetworkForm;
OnClick:=@VKImageOnClick;
end;

// Facebook
FacebookImage:= TBitmapImage.Create(nil);
with FacebookImage do begin
SetBounds(ScaleX(85), ScaleY(35), ScaleX(35), ScaleY(35));
Bitmap.LoadFromFile(ExpandConstant('{tmp}\facebook .bmp'));
Cursor:=crHand;
Parent:=SocialNetworkForm;
OnClick:=@FacebookImageOnClick;
end;

// Twitter
TwitterImage:= TBitmapImage.Create(nil);
with TwitterImage do begin
SetBounds(ScaleX(130), ScaleY(35), ScaleX(35), ScaleY(35));
Bitmap.LoadFromFile(ExpandConstant('{tmp}\twitter. bmp'));
Cursor:=crHand;
Parent:=SocialNetworkForm;
OnClick:=@TwitterImageOnClick;
end;

#ifdef English
#ifdef Autorun
if BtnGetVisibility(RussianButton) or BtnGetVisibility(RussianAutorunButton) then begin
#else
if BtnGetVisibility(RussianButton) then begin
#endif
SocialNetworkFormLabel.Caption:=ExpandConstant('{c m:SocialNetworkFormLabelEn}');
end else begin
SocialNetworkFormLabel.Caption:=ExpandConstant('{c m:SocialNetworkFormLabel}');
end;
#endif

SetClassLong(SocialNetworkForm.Handle, (-26), GetWindowLong(SocialNetworkForm.Handle, (-26)) or $00020000);
SocialNetworkForm.ShowModal;
SocialNetworkForm.Free;
end;
#endif

//------- Шрифт для кнопок
procedure ButtonFontCreate;
begin
ButtonFont:=TFont.Create;
with ButtonFont do begin
Size:=12;
Name:='{#FontName}';
end;
end;

//-------- Подключаем Autorun
#ifdef Autorun
#include "iss\Autorun.iss"
#endif
//--------

function InitializeSetup:boolean;
begin
ButtonFontCreate
#ifdef MD5_1
MD5Check;
#endif
if not FileExists(ExpandConstant('{tmp}\WinTB.dll')) then ExtractTemporaryFile('WinTB.dll');
#ifdef SocialNetwork
if not FileExists(ExpandConstant('{tmp}\vk.bmp')) then ExtractTemporaryFile('vk.bmp');
if not FileExists(ExpandConstant('{tmp}\facebook.bmp')) then ExtractTemporaryFile('facebook.bmp');
if not FileExists(ExpandConstant('{tmp}\twitter.bmp')) then ExtractTemporaryFile('twitter.bmp');
#endif
if not FileExists(ExpandConstant('{tmp}\b2p.dll')) then ExtractTemporaryFile('b2p.dll');
if not FileExists(ExpandConstant('{tmp}\botva2.dll')) then ExtractTemporaryFile('botva2.dll');
if not FileExists(ExpandConstant('{tmp}\CallbackCtrl.dll' )) then ExtractTemporaryFile('CallbackCtrl.dll');
#ifdef MD5_1
#ifdef Autorun
if MD5Error = True then begin
if MsgBox(ExpandConstant('{cm:MD5Error}'), mbError, MB_YESNO) = IDYES then Result:=AutorunCreate else Result:=False;
end else begin
Result:=AutorunCreate;
end;
#else
if MD5Error = True then begin
if MsgBox(ExpandConstant('{cm:MD5Error}'), mbError, MB_YESNO) = IDYES then Result:=True else Result:=False;
end else begin
Result:=True;
end;
#endif
#else
#ifdef Autorun
Result:=AutorunCreate;
#else
Result:=True;
#endif
#endif
end;

procedure InitializeWizard;
begin

with WizardForm do begin
Width:=ScaleX(666); // Ширина
Height:=ScaleY(370); // Высота
Position:=poScreenCenter; // Выравниваем инсталлятор по центру монитора
BorderStyle:=bsNone;
CancelButton.SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0));
NextButton.SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0));
BackButton.SetBounds(ScaleX(0), ScaleY(0), ScaleX(0), ScaleY(0));
OnMouseDown:=@WizardFormOnMouseDown;
OnMouseMove:=@WizardFormOnMouseMove;
InnerNotebook.Hide;
OuterNotebook.Hide;
Bevel.Hide;
end;

//------- Извлекаем файлы в Temp
ExtractTemporaryFile('background.bmp');
#ifdef Autorun
ExtractTemporaryFile('background-autorun.bmp');
#endif
#ifdef English
ExtractTemporaryFile('russian.ini');
ExtractTemporaryFile('english.ini');
#endif

TaskBarV11(WizardForm.Handle);
SetClassLong(WizardForm.Handle, (-26), GetWindowLong(WizardForm.Handle, (-26)) or $00020000);

//------- Лейблы
CloseLabel:= TLabel.Create(WizardForm);
with CloseLabel do begin
AutoSize:=False;
SetBounds(ScaleX(640), ScaleY(7), ScaleX(20), ScaleY(20));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:= 16;
Font.Style:=[fsBold];
Caption:='X';
Cursor:=crHand;
Parent:=WizardForm;
OnClick:=@CloseLabelOnClick;
OnMouseMove:=@CloseLabelOnMouseMove;
end;

// WelcomePage
WelcomeLabel1:= TLabel.Create(WizardForm);
with WelcomeLabel1 do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(100), ScaleX(510), ScaleY(40));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:= 13;
Font.Style:=[fsBold];
Caption:=ExpandConstant('{cm:WelcomeLabel1} ') + '«{#GameName}»';
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

// Посчитаем количество символов
if Length(WelcomeLabel1.Caption) <= 55 then begin
WelcomeLabel1.Caption:=ExpandConstant('{cm:Welcome Label1} ') + '«{#GameName}»';
end else begin
WelcomeLabel1.Caption:=ExpandConstant('{cm:Welcome Label1} ') + #13 + '«{#GameName}»';
end;

WelcomeLabel2:= TLabel.Create(WizardForm);
with WelcomeLabel2 do begin
AutoSize:=False;
WordWrap:=True;
SetBounds(ScaleX(100), ScaleY(160), ScaleX(490), ScaleY(120));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:= 11;
Caption:=ExpandConstant('{cm:WelcomeLabel2}');
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

// SelectDirPage
DirEditLabel:= TLabel.Create(WizardForm);
with DirEditLabel do begin
AutoSize:=False;
SetBounds(ScaleX(110), ScaleY(114), ScaleX(350), ScaleY(16));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=12;
Caption:=MinimizePathName(WizardForm.DirEdit.Text, DirEditLabel.Font, DirEditLabel.Width);
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

SelectDirLabel1:= TLabel.Create(WizardForm);
with SelectDirLabel1 do begin
AutoSize:=False;
SetBounds(ScaleX(110), ScaleY(70), ScaleX(500), ScaleY(36));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:= 12;
Caption:=ExpandConstant('{cm:SelectDirLabel1}');
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

SelectDirLabel2:= TLabel.Create(WizardForm);
with SelectDirLabel2 do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(290), ScaleX(450), ScaleY(18));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=12;
Caption:=ExpandConstant('{cm:SelectDirLabel2_1}') + MbOrTb({#NeedSize}) + ExpandConstant(' {cm:SelectDirLabel2_2} ');
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

// InstallingPage
StatusLabel:= TLabel.Create(WizardForm);
with StatusLabel do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(130), ScaleX(450), ScaleY(18));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=10;
Caption:=ExpandConstant('{cm:StatusLabel_1}');
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

// FinishedPage
FinishedLabel1:= TLabel.Create(WizardForm);
with FinishedLabel1 do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(100), ScaleX(510), ScaleY(40));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=13;
Font.Style:=[fsBold];
Caption:=ExpandConstant('{cm:FinishedLabel1} ') + '«{#GameName}»';
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

if Length(FinishedLabel1.Caption) <= 55 then begin
FinishedLabel1.Caption:=ExpandConstant('{cm:Finish edLabel1} ') + '«{#GameName}»';
end else begin
FinishedLabel1.Caption:=ExpandConstant('{cm:Finish edLabel1}') + #13 + '«{#GameName}»';
end;

FinishedLabel2:= TLabel.Create(WizardForm);
with FinishedLabel2 do begin
AutoSize:=False;
WordWrap:=True;
SetBounds(ScaleX(100), ScaleY(160), ScaleX(490), ScaleY(120));
Transparent:=True;
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=11;
Caption:=ExpandConstant('{cm:FinishedLabel2}');
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

//------- Таск лист
with WizardForm.TasksList do begin
SetBounds(ScaleX(100), ScaleY(142), ScaleX(170), ScaleY(145));
Font.Color:={#FontColor};
Font.Name:='MS Sans Serif';
BorderStyle:=bsNone;
WantTabs:=False;
MinItemHeight:=0;
LoadBGBmpFromFile(ExpandConstant('{tmp}\background .bmp'), WizardForm.TasksList.Left, WizardForm.TasksList.Top);
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

//------- Компонент лист
#ifdef Comp1Ru
with WizardForm.ComponentsList do begin
SetBounds(ScaleX(350), ScaleY(142), ScaleX(170), ScaleY(145));
Font.Color:={#FontColor};
Font.Name:='MS Sans Serif';
BorderStyle:=bsNone;
MinItemHeight:=0;
LoadBGBmpFromFile(ExpandConstant('{tmp}\background .bmp'), WizardForm.ComponentsList.Left, WizardForm.ComponentsList.Top);
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;
#endif

//------- Эдит
WizardForm.DirEdit.OnChange:=@GetFreeSpaceCaption;
WizardForm.DirEdit.Text:=WizardForm.DirEdit.Text + #0;

//------- Картинки
// Фон
BackgroundImg:=ImgLoad(WizardForm.Handle,ExpandCon stant('{tmp}\background.bmp'), ScaleX(0), ScaleY(0), ScaleX(666), ScaleY(370) ,True,True);
// Рамка
DirEditImg:=ImgLoad(WizardForm.Handle,ExpandConsta nt('{tmp}\edit.png'), ScaleX(100), ScaleY(110), ScaleX(370), ScaleY(24) ,True,True);
// Прогессбар
//------- Кнопки
// Отмена
CancelButton:=BtnCreate(WizardForm.Handle, ScaleX(515), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(CancelButton,BtnClickEventID,WrapBtnCa llback(@CancelButtonOnClick,1));
BtnSetText(CancelButton, ExpandConstant('{cm:CancelButton}'));
BtnSetFont(CancelButton, ButtonFont.Handle);
BtnSetFontColor(CancelButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Далее
NextButton:=BtnCreate(WizardForm.Handle, ScaleX(415), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(NextButton,BtnClickEventID,WrapBtnCall back(@NextButtonOnClick,1));
BtnSetFont(NextButton, ButtonFont.Handle);
BtnSetFontColor(NextButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Назад
BackButton:=BtnCreate(WizardForm.Handle, ScaleX(320), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(BackButton,BtnClickEventID,WrapBtnCall back(@BackButtonOnClick,1));
BtnSetText(BackButton, ExpandConstant('{cm:BackButton}'));
BtnSetFont(BackButton, ButtonFont.Handle);
BtnSetFontColor(BackButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Обзор
BrowseButton:=BtnCreate(WizardForm.Handle, ScaleX(469), ScaleY(100), ScaleX(105), ScaleY(43), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(BrowseButton,BtnClickEventID,WrapBtnCa llback(@BrowseButtonOnClick,1));
BtnSetText(BrowseButton, ExpandConstant('{cm:BrowseButton}'));
BtnSetFont(BrowseButton, ButtonFont.Handle);
BtnSetFontColor(BrowseButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Пауза
PauseButton:=BtnCreate(WizardForm.Handle, ScaleX(415), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(PauseButton,BtnClickEventID,WrapBtnCal lback(@PauseButtonOnClick,1));
BtnSetText(PauseButton, ExpandConstant('{cm:PauseButton}'));
BtnSetFont(PauseButton, ButtonFont.Handle);
BtnSetFontColor(PauseButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Продолжить
ResumeButton:=BtnCreate(WizardForm.Handle, ScaleX(415), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(ResumeButton,BtnClickEventID,WrapBtnCa llback(@ResumeButtonOnClick,1));
BtnSetText(ResumeButton, ExpandConstant('{cm:ResumeButton}'));
BtnSetFont(ResumeButton, ButtonFont.Handle);
BtnSetVisibility(ResumeButton, False);
BtnSetFontColor(ResumeButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Social Network
#ifdef SocialNetwork
#ifdef English
SocialNetworkButton:=BtnCreate(WizardForm.Handle, ScaleX(153), ScaleY(320), ScaleX(25), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
#else
SocialNetworkButton:=BtnCreate(WizardForm.Handle, ScaleX(53), ScaleY(320), ScaleX(25), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
#endif
BtnSetEvent(SocialNetworkButton,BtnClickEventID,Wr apBtnCallback(@SocialNetworkButtonOnClick,1));
BtnSetText(SocialNetworkButton, 'S');
BtnSetFont(SocialNetworkButton, ButtonFont.Handle);
BtnSetFontColor(SocialNetworkButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
#endif
//--- Кнопки смены языков
#ifdef English
// English
EnglishButton:=BtnCreate(WizardForm.Handle, ScaleX(53), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(EnglishButton,BtnClickEventID,WrapBtnC allback(@EnglishButtonOnClick,1));
BtnSetText(EnglishButton, ExpandConstant('{cm:EnglishButton}'));
BtnSetFont(EnglishButton, ButtonFont.Handle);
BtnSetFontColor(EnglishButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
// Русский
RussianButton:=BtnCreate(WizardForm.Handle, ScaleX(53), ScaleY(320), ScaleX(105), ScaleY(44), ExpandConstant('{tmp}\button.png'),1,False);
BtnSetEvent(RussianButton,BtnClickEventID,WrapBtnC allback(@RussianButtonOnClick,1));
BtnSetText(RussianButton, ExpandConstant('{cm:RussianButton}'));
BtnSetFont(RussianButton, ButtonFont.Handle);
BtnSetVisibility(RussianButton, False);
BtnSetFontColor(RussianButton, {#ButtonColor}, {#ButtonColor}, {#ButtonColor}, {#ButtonColor});
#endif
ImgApplyChanges(WizardForm.Handle);

#ifdef English
#ifdef Autorun
if Language='english' then begin
EnglishLanguage;
WizardFormChangeLanguage;
end;
#endif
#endif
end;

procedure CreateControls;
begin
ISDoneProgressBar1:=ImgPBCreate(WizardForm.Handle, ExpandConstant('{tmp}\ProgressBackground.png'), ExpandConstant('{tmp}\ProgressImg.png'), ScaleX(100), ScaleY(150), ScaleX(466), ScaleY(23));

LabelPct1 := TLabel.Create(WizardForm);
with LabelPct1 do begin
AutoSize:=False;
Alignment:=taCenter;
SetBounds(ScaleX(0), ScaleY(120), ScaleX(666), ScaleY(20));
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=15;
Font.Style:=[fsBold];
Transparent:=True;
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(180), ScaleX(280), ScaleY(18));
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=10;
Transparent:=True;
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;

LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
AutoSize:=False;
SetBounds(ScaleX(100), ScaleY(200), ScaleX(280), ScaleY(18));
Font.Color:={#FontColor};
Font.Name:='{#FontName}';
Font.Size:=10;
Transparent:=True;
Parent:=WizardForm;
OnMouseDown:=@WizardFormOnMouseDown;
end;
end;

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

//-------- Проверка, есть ли русские буквы в пути установки
#ifdef RusLetters
function NextButtonClick(CurPageID: Integer): Boolean;
var
S1: string;
S2: string;
begin
Result:= False;
S1 := AnsiUppercase(WizardForm.DirEdit.Text);
S2 := Uppercase(WizardForm.DirEdit.Text);
if CompareStr(S1, S2) = 0 then begin
S1 := Lowercase(WizardForm.DirEdit.Text);
S2 := AnsiLowercase(WizardForm.DirEdit.Text);
if CompareStr(S1, S2) = 0 then begin
Result:= True;
Exit;
end;
end;
#ifdef English
if BtnGetVisibility(RussianButton) then begin
MessageBox(WizardForm.Handle, ExpandConstant('{cm:RusLettersEn}'), ExpandConstant('{cm:RusLetters_headerEn}'), MB_OK or $30);
end else begin
#endif
MessageBox(WizardForm.Handle, ExpandConstant('{cm:RusLetters}'), ExpandConstant('{cm:RusLetters_header}'), MB_OK or $30);
#ifdef English
end
#endif
end;
#endif

//-------- Пропуск страниц
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID = wpSelectDir) or (PageID = wpSelectComponents) or (PageID = wpSelectProgramGroup) or (PageID = wpReady) then
Result:= True;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpWelcome then begin
WelcomeLabel1.Visible:=True;
WelcomeLabel2.Visible:=True;
BtnSetEnabled(NextButton, True);
BtnSetVisibility(BackButton, False);
BtnSetText(NextButton, ExpandConstant('{cm:NextButton}'));
end else begin
WelcomeLabel1.Visible:=False;
WelcomeLabel2.Visible:=False;
BtnSetVisibility(BackButton, True);
end;
if CurPageID = wpSelectTasks then begin
GetFreeSpaceCaption(nil);
WizardForm.ComponentsList.Visible:=True;
WizardForm.TasksList.Visible:=True;
DirEditLabel.Visible:=True;
SelectDirLabel1.Visible:=True;
SelectDirLabel2.Visible:=True;
ImgSetVisibility(DirEditImg, True);
BtnSetVisibility(BrowseButton, True);
BtnSetText(NextButton, ExpandConstant('{cm:InstallButton}'));
end else begin
WizardForm.ComponentsList.Visible:=False;
WizardForm.TasksList.Visible:=False;
DirEditLabel.Visible:=False;
SelectDirLabel1.Visible:=False;
SelectDirLabel2.Visible:=False;
ImgSetVisibility(DirEditImg, False);
BtnSetVisibility(BrowseButton, False);
end;
if CurPageID = wpInstalling then begin
StatusLabel.Visible:=True;
CloseLabel.Enabled:=False;
BtnSetVisibility(PauseButton, True);
BtnSetVisibility(NextButton, False);
BtnSetVisibility(BackButton, False);
ImgPBVisibility(ISDoneProgressBar1, true);
BtnSetEvent(CancelButton,BtnClickEventID,WrapBtnCa llback(@ISDoneCancelButtonOnClick,1));
end else begin
StatusLabel.Visible:=False;
BtnSetVisibility(PauseButton, False);
end;
if CurPageID = wpFinished then begin
CloseLabel.Enabled:=False;
FinishedLabel1.Visible:=True;
FinishedLabel2.Visible:=True;
BtnSetVisibility(CancelButton, False);
BtnSetVisibility(BackButton, False);
BtnSetVisibility(NextButton, True);
BtnSetText(NextButton, ExpandConstant('{cm:FinishButton}'));
#ifdef SocialNetwork
BtnSetEnabled(SocialNetworkButton, True);
#endif
end else begin
FinishedLabel1.Visible:=False;
FinishedLabel2.Visible:=False;
end;
if (CurPageID = wpFinished) and ISDoneError then begin
FinishedLabel2.Font.Color:=clRed;
FinishedLabel2.Caption:=ExpandConstant('{cm:Finish edLabel2_error} ') + '«{#GameName}»';
end;
#ifdef English
WizardFormChangeLanguage();
#endif
ImgApplyChanges(WizardForm.Handle);
end;

procedure DeinitializeSetup;
begin
ButtonFont.Free;
gdipShutDown;
end;

function CheckError:boolean;
begin
result:= not ISDoneError;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var Comps1,Comps2,Comps3, TmpValue:cardinal;
FindHandle1,ColFiles1,CurIndex1,tmp:integer;
ExecError:boolean;
InFilePath,OutFilePath,OutFileName:PAnsiChar;
begin
if CurStep = ssInstall then begin //Если необходимо, можно поменять на ssPostInstall
WizardForm.ProgressGauge.Hide;
WizardForm.CancelButton.Hide;
CreateControls;
ISDoneCancel:=0;

// Распаковка всех необходимых файлов в папку {tmp}.

ExtractTemporaryFile('unarc.dll');

#ifdef PrecompInside

ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('zlib1.dll');
#endif
#ifdef SrepInside
ExtractTemporaryFile('CLS-srep.dll');
#endif
#ifdef MSCInside
ExtractTemporaryFile('CLS-MSC.dll');
#endif
#ifdef facompress
ExtractTemporaryFile('facompress.dll'); //ускоряет распаковку .arc архивов.
#endif
#ifdef records
ExtractTemporaryFile('records.inf');
#endif
#ifdef precomp
#if precomp == "0.38"
ExtractTemporaryFile('precomp038.exe');
#else
#if precomp == "0.4"
ExtractTemporaryFile('precomp040.exe');
#else
#if precomp == "0.41"
ExtractTemporaryFile('precomp041.exe');
#else
#if precomp == "0.42"
ExtractTemporaryFile('precomp042.exe');
#else
ExtractTemporaryFile('precomp038.exe');
ExtractTemporaryFile('precomp040.exe');
ExtractTemporaryFile('precomp041.exe');
ExtractTemporaryFile('precomp042.exe');
#endif
#endif
#endif
#endif
#endif
#ifdef unrar
ExtractTemporaryFile('Unrar.dll');
#endif
#ifdef XDelta
ExtractTemporaryFile('XDelta3.dll');
#endif
#ifdef PackZIP
ExtractTemporaryFile('7z.dll');
ExtractTemporaryFile('PackZIP.exe');
#endif

// Подготавливаем переменную, содержащую всю информацию о выделенных компонентах для ISDone.dll
// максимум 96 компонентов.
Comps1:=0; Comps2:=0; Comps3:=0;
#ifdef Components
TmpValue:=1;
if IsComponentSelected('text\eng') then Comps1:=Comps1+TmpValue; //компонент 1
TmpValue:=TmpValue*2;
if IsComponentSelected('text\rus') then Comps1:=Comps1+TmpValue; //компонент 2
TmpValue:=TmpValue*2;
if IsComponentSelected('crack\skid') then Comps1:=Comps1+TmpValue; //компонент 3
TmpValue:=TmpValue*2;
if IsComponentSelected('crack\3dm') then Comps1:=Comps1+TmpValue; //компонент 4
// .....
// см. справку
#endif

#ifdef precomp
PCFVer:={#precomp};
#else
PCFVer:=0;
#endif
ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, Comps1,Comps2,Comps3, MainForm.Handle, 0, @ProgressCallback) then begin
repeat

#ifdef English
if BtnGetVisibility(RussianButton) then begin
ChangeLanguage('English');
end;
#endif

if not SrepInit('',512,0) then break;
if not PrecompInit('',128,PCFVer) then break;
if not FileSearchInit(true) then break;
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\Data.bin'), ExpandConstant('{app}\'), '', false, 'thieugiangoc', '', ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;

// далее находятся закомментированые примеры различных функций распаковки (чтобы каждый раз не лазить в справку за примерами)
(*
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\arc.arc'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), notPCFonFLY{PCFonFLY}) then break;
if not IS7ZipExtract ( 0, 0, ExpandConstant('{src}\CODMW2.7z'), ExpandConstant('{app}\data1'), false, '') then break;
if not ISRarExtract ( 0, 0, ExpandConstant('{src}\data_*.rar'), ExpandConstant('{app}'), false, '') then break;
if not ISSRepExtract ( 0, 0, ExpandConstant('{app}\data1024_1024.srep'),ExpandC onstant('{app}\data1024.arc'), true) then break;
if not ISPrecompExtract( 0, 0, ExpandConstant('{app}\data.pcf'), ExpandConstant('{app}\data.7z'), true) then break;
if not ISxDeltaExtract ( 0, 0, 0, 640, ExpandConstant('{app}\in.pcf'), ExpandConstant('{app}\*.diff'), ExpandConstant('{app}\out.dat'), false, false) then break;
if not ISPackZIP ( 0, 0, ExpandConstant('{app}\1a1\*'), ExpandConstant('{app}\1a1.pak'), 2, false ) then break;
if not ISExec ( 0, 0, 0, ExpandConstant('{tmp}\Arc.exe'), ExpandConstant('x -o+ "{src}\001.arc" "{app}\"'), ExpandConstant('{tmp}'), '...',false) then break;
if not ShowChangeDiskWindow ('Пожалуйста, вставьте второй диск и дождитесь его инициализации.', ExpandConstant('{src}'),'CODMW_2.arc') then break;

// распаковка группы файлов посредством внешнего приложения

FindHandle1:=ISFindFiles(0,ExpandConstant('{app}\* .ogg'),ColFiles1);
ExecError:=false;
while not ExecError and ISPickFilename(FindHandle1,ExpandConstant('{app}\' ),CurIndex1,true) do begin
InFilePath:=ISGetName(0);
OutFilePath:=ISGetName(1);
OutFileName:=ISGetName(2);
ExecError:=not ISExec(0, 0, 0, ExpandConstant('{tmp}\oggdec.exe'), '"'+InFilePath+'" -w "'+OutFilePath+'"',ExpandConstant('{tmp}'),OutFileName,false);
end;
ISFindFree(FindHandle1);
if ExecError then break;
*)

ISDoneError:=false;
until true;
ISDoneStop;
end;
HideControls;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
ImgApplyChanges(WizardForm.Handle);
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
end;

[ISFormDesigner]
WizardForm=FF0A005457495A415244464F524D0030109D010 00054504630F10B5457697A617264466F726D0A57697A61726 4466F726D0C436C69656E744865696768740368010B436C696 56E74576964746803F1010C4578706C696369744C656674020 00B4578706C69636974546F7002000D4578706C69636974576 96474680301020E4578706C69636974486569676874038E010 D506978656C73506572496E636802600A54657874486569676 874020D00F10C544E65774E6F7465626F6F6B0D4F757465724 E6F7465626F6F6B00F110544E65774E6F7465626F6F6B50616 7650B57656C636F6D65506167650D4578706C6963697457696 4746803F1010E4578706C69636974486569676874033901000 0F110544E65774E6F7465626F6F6B5061676509496E6E65725 06167650D4578706C69636974576964746803F1010E4578706 C6963697448656967687403390100F10C544E65774E6F74656 26F6F6B0D496E6E65724E6F7465626F6F6B00F110544E65774 E6F7465626F6F6B506167650B4C6963656E7365506167650D4 578706C69636974576964746803A1010E4578706C696369744 8656967687403ED00000000000000

reiji777
24-02-2014, 08:52
how to make sure the game compatible with future updates?
is it randomly different on each game or is there a certain pattern to make it?
can someone gave me an example of 2 combined game registry lines for making a trilogy?
the last thing, for saved games like in the sims 3 all dlc how to create other directory in document?
sorry if too much to ask :)
thanks in advance

pakrat2k2
24-02-2014, 17:55
open up inno & goto help there's detailed information on my documents etc already included with program.

danswano
26-02-2014, 18:52
Hello everyone,
How do i create a file hash checking wizard (integrity check) before first installer page?

Razor12911
01-03-2014, 01:25
http://www.jrsoftware.org/ispphelp/index.php?topic=getmd5ofunicodestring

danswano
01-03-2014, 04:44
Thanks razor, how do i apply the code for ISDone and i need to create it as a small progress window with a progress bar with a skip button. :)

Razor12911
02-03-2014, 08:12
oh, you mean something like the new R.G.Catalyst Script?

danswano
02-03-2014, 08:55
Yes and GOG.com as well.

Razor12911
02-03-2014, 09:10
hmm, no problem, will upload example.

Razor12911
02-03-2014, 09:11
ISMD5 Hash checker for Inno Setup

danswano
02-03-2014, 09:16
Is it possible to use a single md5 hash to check multiple files?
In the example i see that i must set the hash for each archive.

Razor12911
02-03-2014, 09:31
not possible. you need to set md5 for each file.

danswano
02-03-2014, 09:36
Thanks razor, how do i make this checker part of the main exe itself, it's creating an another exe and when check finish it execute the setup.exe.

Razor12911
02-03-2014, 09:38
you can copy tform and everything and put it right under InitializeSetup for anywhere else so that you can be able to use it.

danswano
02-03-2014, 09:42
How to check multiple files located on multiple disks?
Maybe like insert next disk to check then ask to insert back the first disk to start setup.
Possible?

Razor12911
02-03-2014, 09:52
hmm, you can make a msgbox request for another disk. :D

danswano
02-03-2014, 12:20
My ISDone script is customized, i've tried to put every part of the code in it's place but i end up with each try with this error:

Logrim
02-03-2014, 15:02
hi, i need help.. again,.. i hope that is the last time :D..

i have a custom change disc form.. all work,, but the image and the change disk label dont show together.. when i quit the image, the label show,, if i put the image the label not show.. i hope i explain well..

This is the form code:

///////////////////////////////////////////////////////////CUSTOM CHANGE DISC FORM
procedure MyChangeDiscMessage();
begin
MyChangeDisc := CreateCustomForm();
MyChangeDisc.BorderStyle:= bsNone;
MyChangeDisc.Position := poScreenCenter;
MyChangeDisc.BringToFront;
MyChangeDisc.ClientWidth := WizardForm.Width;
MyChangeDisc.ClientHeight := WizardForm.Height div 2;

MyChangeDiscLabel:= TLabel.Create(MyChangeDisc);
MyChangeDiscLabel.Parent:= MyChangeDisc;
MyChangeDiscLabel.SetBounds(40,7,600,15);
MyChangeDiscLabel.AutoSize:= False;
MyChangeDiscLabel.WordWrap:= True;
MyChangeDiscLabel.Transparent:= True;
MyChangeDiscLabel.Font.Name := 'Verdana';
MyChangeDiscLabel.Font.Color:= clGray;
MyChangeDiscLabel.Font.Size:= 8;

CDYesBtn:=BtnCreate(MyChangeDisc.Handle,560,6,15,1 5,ExpandConstant('{tmp}\OkBtn.png'),0,False);
BtnSetEvent(CDYesBtn,BtnClickEventID,WrapBtnCallba ck(@ButtonOnClick,1));
BtnSetEvent(CDYesBtn,BtnMouseEnterEventID,WrapBtnC allback(@BtnEnter,1));
BtnSetCursor(CDYesBtn,GetSysCursorHandle(32649));

CDNoBtn:=BtnCreate(MyChangeDisc.Handle,572,6,15,15 ,ExpandConstant('{tmp}\ExitBtn.png'), 0, false);
BtnSetEvent(CDNoBtn,BtnClickEventID,WrapBtnCallbac k(@ButtonOnClick,1));
BtnSetEvent(CDNoBtn,BtnMouseEnterEventID,WrapBtnCa llback(@BtnEnter,1));
BtnSetCursor(CDNoBtn,GetSysCursorHandle(32649));

img:=ImgLoad(MyChangeDisc.Handle,ExpandConstant('{ tmp}\Exit.png'),0,0,600,190,True,True);
ImgApplyChanges(MyChangeDisc.Handle);
end;

function ShowDiskChanger(Disk, Arc: String):Integer;
begin
MyChangeDiscMessage();
MyChangeDiscLabel.Caption:='Please insert disc ' + Disk + ' with ' + ExtractFileName(Arc);
Result:=MyChangeDisc.ShowModal;
end;
////////////////////////////////////////////////////////////////////////////////////////////////

and this part in curvestepchanged:
if Arc[0] = 'Freearc' then
begin
if not FileExists(Arc[1]) then begin
repeat
if ShowDiskChanger(Arc[3],Arc[1]) = mrNo then
ISDoneError := True;
until (FileExists(Arc[1]) = True) or (ISDoneError = True)
end;
if ISDoneError = False then
if not ISArcExtract ( 0, 0, Arc[1], Arc[2], '', false, Arc[7], ExpandConstant('{tmp}\arc.ini'), Arc[2], false) then ISDoneError := True;
end;

P.D. I try to put the imgload code in all sites in the form, but doesnt work.. The label is inside the "ShowDiscChanger" funtion, i think is for this, but i need the funtion for the correct operation of the script..

y_thelastknight
02-03-2014, 20:35
My ISDone script is customized, i've tried to put every part of the code in it's place but i end up with each try with this error:

Check your code again danswano. Its calling for initilizewizard from initilizesetup. It cannot be done like that.

hi, i need help.. again,.. i hope that is the last time :D..

i have a custom change disc form.. all work,, but the image and the change disk label dont show together.. when i quit the image, the label show,, if i put the image the label not show.. i hope i explain well..

This is the form code:



and this part in curvestepchanged:


P.D. I try to put the imgload code in all sites in the form, but doesnt work.. The label is inside the "ShowDiscChanger" funtion, i think is for this, but i need the funtion for the correct operation of the script..

Did you try with this??

MyChangeDiscLabel.bringtofront
I forget it :p search it in inno setup file

Logrim
03-03-2014, 02:21
Thanks y_thelastknight, but doesnt work...

reiji777
03-03-2014, 04:43
how to install many fonts, right before the initial setup page starts?

altef_4
03-03-2014, 05:43
hi, i need help.. again,.. i hope that is the last time :D..

i have a custom change disc form.. all work,, but the image and the change disk label dont show together.. when i quit the image, the label show,, if i put the image the label not show.. i hope i explain well..

This is the form code:



and this part in curvestepchanged:


P.D. I try to put the imgload code in all sites in the form, but doesnt work.. The label is inside the "ShowDiscChanger" funtion, i think is for this, but i need the funtion for the correct operation of the script..

///////////////////////////////////////////////////////////CUSTOM CHANGE DISC FORM
procedure MyChangeDiscMessage(Disk, Arc: String);
begin
MyChangeDisc := CreateCustomForm();
MyChangeDisc.BorderStyle:= bsNone;
MyChangeDisc.Position := poScreenCenter;
MyChangeDisc.BringToFront;
MyChangeDisc.ClientWidth := WizardForm.Width;
MyChangeDisc.ClientHeight := WizardForm.Height div 2;

MyChangeDiscLabel:= TLabel.Create(MyChangeDisc);
MyChangeDiscLabel.Parent:= MyChangeDisc;
MyChangeDiscLabel.Caption:='Please insert disc ' + Disk + ' with ' + ExtractFileName(Arc);
MyChangeDiscLabel.SetBounds(40,7,600,15);
MyChangeDiscLabel.AutoSize:= False;
MyChangeDiscLabel.WordWrap:= True;
MyChangeDiscLabel.Transparent:= True;
MyChangeDiscLabel.Font.Name := 'Verdana';
MyChangeDiscLabel.Font.Color:= clGray;
MyChangeDiscLabel.Font.Size:= 8;

CDYesBtn:=BtnCreate(MyChangeDisc.Handle,560,6,15,1 5,ExpandConstant('{tmp}\OkBtn.png'),0,False);
BtnSetEvent(CDYesBtn,BtnClickEventID,WrapBtnCallba ck(@ButtonOnClick,1));
BtnSetEvent(CDYesBtn,BtnMouseEnterEventID,WrapBtnC allback(@BtnEnter,1));
BtnSetCursor(CDYesBtn,GetSysCursorHandle(32649));

CDNoBtn:=BtnCreate(MyChangeDisc.Handle,572,6,15,15 ,ExpandConstant('{tmp}\ExitBtn.png'), 0, false);
BtnSetEvent(CDNoBtn,BtnClickEventID,WrapBtnCallbac k(@ButtonOnClick,1));
BtnSetEvent(CDNoBtn,BtnMouseEnterEventID,WrapBtnCa llback(@BtnEnter,1));
BtnSetCursor(CDNoBtn,GetSysCursorHandle(32649));

img:=ImgLoad(MyChangeDisc.Handle,ExpandConstant('{ tmp}\Exit.png'),0,0,600,190,True,True);
ImgApplyChanges(MyChangeDisc.Handle);
end;

function ShowDiskChanger(Disk, Arc: String):Integer;
begin
MyChangeDiscMessage(Disk, Arc);
Result:=MyChangeDisc.ShowModal;
end;
////////////////////////////////////////////////////////////////////////////////////////////////

Logrim
03-03-2014, 05:54
Thanks Altef, but unknow identifier Arc in this line, into curvestepchanged:

SetArrayLength(Arc,8);

When i define the var in curvestepchange give me type mismatch error in:
Arc[0]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Type','',ExpandConstant('{tmp}\Setup.ini'));

The entire part of the code is:

Wizardform.ProgressGauge.Max:=0;
x:=1;
if GetIniString('ExtractSettings','Archive1Type','',E xpandConstant('{tmp}\Setup.ini')) <> '' then
begin
SetArrayLength(Arc,8);
repeat
Arc[0]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Type','',ExpandConstant('{tmp}\Setup.ini'));
Arc[1]:=ExpandConstant(GetIniString('ExtractSettings','A rchive'+IntToStr(x)+'Source','',ExpandConstant('{t mp}\Setup.ini')));
Arc[2]:=ExpandConstant(GetIniString('ExtractSettings','A rchive'+IntToStr(x)+'Output','',ExpandConstant('{t mp}\Setup.ini')));
Arc[3]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Disk','1',ExpandConstant('{tmp}\Setup.ini')) ;
Arc[4]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Language','',ExpandConstant('{tmp}\Setup.ini '));
Arc[5]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Component','',ExpandConstant('{tmp}\Setup.in i'));
Arc[6]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Task','',ExpandConstant('{tmp}\Setup.ini'));
Arc[7]:=GetIniString('ExtractSettings','Archive'+IntToSt r(x)+'Password','',ExpandConstant('{tmp}\Setup.ini '));
Wizardform.ProgressGauge.Max:=Wizardform.ProgressG auge.Max + 1000;
x:= x + 1;
until GetIniString('ExtractSettings','Archive' + IntToStr(x) + 'Type','',ExpandConstant('{tmp}\Setup.ini')) = '';
end;

altef_4
03-03-2014, 06:22
do you have Arc: array of string; in var section? or Arc: array [0..7] of string;

Logrim
03-03-2014, 06:40
Ermm.. Altef,, thanks for take so much trouble with me :D.. im sleep :D.. i define the arc only as a string,, not array of string.. .. sorry.. all work perfect now,, script FINISHED!!!.. .. erm... i hope so :d.

Logrim
04-03-2014, 13:39
One question more... how can i make a multiple autorun? i mean.. "install game1", "install game2", "install game3". Thanks.. i recently discover how to make a mask for the installer, so I'm going to remodel completly the desing of the setup. All the installer work perfectly, without errors, thanks to your help again, razor, y_thelasknight and altef, only remain the multi-autorun :D. thanks, and i hope you like the final design.

y_thelastknight
04-03-2014, 21:00
One question more... how can i make a multiple autorun? i mean.. "install game1", "install game2", "install game3". Thanks.. i recently discover how to make a mask for the installer, so I'm going to remodel completly the desing of the setup. All the installer work perfectly, without errors, thanks to your help again, razor, y_thelasknight and altef, only remain the multi-autorun :D. thanks, and i hope you like the final design.

I like your final desing.

What you mean by multiple autorun.
Did you create seperate script for autorun??

Logrim
05-03-2014, 02:05
Yup, y_thelasknight, i have another script with the autorun..
i have it with install and play buttons.. (this are the main buttons). i want it with install1, install2, install3, button.. i figure how to make but I'm not sure and I prefer to ask before teasing the code :D

Logrim
05-03-2014, 06:12
I have a trouble.. i have bitmap resources in "SETUP"

"BitmapResource=btn:Res\btnimage.bmp|Logrim:Res\Log rim.bmp

But not load.. how can i load this resources?

y_thelastknight
05-03-2014, 07:11
Yup, y_thelasknight, i have another script with the autorun..
i have it with install and play buttons.. (this are the main buttons). i want it with install1, install2, install3, button.. i figure how to make but I'm not sure and I prefer to ask before teasing the code :D

What is the install1 install2 install3 purpose??

Logrim
05-03-2014, 07:17
.. install for example drakensang and drakensang 2, for the same dvd9 :P