One Page Installer using botva

InstallationWay

Новичок
Hi brothers, I'm new to botva, could anyone help me creating such an installer?

CustomInstaller.jpg

- Custom Buttons
- Custom Font
- Custom Checkboxes
- Custom Close / Minimize buttons on the title bar
- Custom Installer Frame / Shape
- A Movie is playing in the middle and the setup should not change its page and just by pressing install the installation should start.

Any help is really appreciated, brothers :)
 

InstallationWay

Новичок
I have found a little problem @Nemko :( While installing, press the cancel button and then click Yes on the message:
after clicking the yes, immediately click on the cancel button or the install form, then the setup will not exit forever!

as another question, after canceling the process, is there any way to show the exit button instead of closing the setup?
also is this possible after canceling to put the setup state in the install state? I mean the user again clicks on the install button to start the process.
 

InstallationWay

Новичок
GREAT, but I have found another problem, while installing (just at the start) try to cancel the process, it will give you an error that the setup can not find BTN.png in temp. I tried to extract the BTN.png if not exists before creating the button in the exit message, but no success.
Where is the problem then?
 

InstallationWay

Новичок
Nemko

I Tested a lot, I do not know why the setup while installing can not extract files to temp. It will give the error: Exception: Internal error: ExtractTempraryFile: The (file) was not found. Not Always but in certain moments.

Where is the problem?
 

InstallationWay

Новичок
If you click on the X exit button before installation, so many times, it does not have any problem. But as soon as the installation starts, if you press cancel, the setup will try to show that custom exit message and can not extract related images! I just tried to extract the images on setup start, but it seems inno setup will extract images every time it needs.

I have checked the Splinter Cell Blacklist script by Nemko, it works fine in a such manner, but this one has a problem which I can not find it :(
 

InstallationWay

Новичок
It seems while installing files, the setup can not extract files at the same time.
for some files like video, dll etc if you extract them once they will be in temp till the end. But about images, it seems the setup will not extract them into temp!

How to keep images extracted before installation start?
 

Shegorat

Lord of Madness
Администратор
@InstallationWay, just look in botva2.iss from example above. Lines 306-340. Images are deleted after loading
Код:
function ImgLoad(Wnd :HWND; FileName :PAnsiChar; Left, Top, Width, Height :integer; Stretch, IsBkg :boolean) :Longint;
begin
  if not FileExists(FileName) then begin
    ExtractTemporaryFile(FileName);
    Result:=_ImgLoad(Wnd,ExpandConstant('{tmp}\')+FileName,Left,Top,Width,Height,Stretch,IsBkg);
    DeleteFile(ExpandConstant('{tmp}\')+FileName);
  end else Result:=_ImgLoad(Wnd,FileName,Left,Top,Width,Height,Stretch,IsBkg);
end;

function BtnCreate(hParent :HWND; Left, Top, Width, Height :integer; FileName :PAnsiChar; ShadowWidth :integer; IsCheckBtn :boolean) :HWND; 
begin
  if not FileExists(FileName) then begin
    ExtractTemporaryFile(FileName);
    Result:=_BtnCreate(hParent,Left,Top,Width,Height,ExpandConstant('{tmp}\')+FileName,ShadowWidth,IsCheckBtn);
    DeleteFile(ExpandConstant('{tmp}\')+FileName);
  end else Result:=_BtnCreate(hParent,Left,Top,Width,Height,FileName,ShadowWidth,IsCheckBtn);
end;

function CheckBoxCreate(hParent:HWND; Left,Top,Width,Height:integer; FileName:PAnsiChar; GroupID, TextIndent:integer):HWND;
begin
  if not FileExists(FileName) then begin
    ExtractTemporaryFile(FileName);
    Result:=_CheckBoxCreate(hParent,Left,Top,Width,Height,ExpandConstant('{tmp}\')+FileName,GroupID,TextIndent);
    DeleteFile(ExpandConstant('{tmp}\')+FileName);
  end else Result:=_CheckBoxCreate(hParent,Left,Top,Width,Height,FileName,GroupID,TextIndent);
end;

procedure CreateFormFromImage(h:HWND; FileName:PAnsiChar);
begin
  if not FileExists(FileName) then begin
    ExtractTemporaryFile(FileName);
    _CreateFormFromImage(h, ExpandConstant('{tmp}\')+FileName);
    DeleteFile(ExpandConstant('{tmp}\')+FileName);
  end else _CreateFormFromImage(h, FileName);
end;
 

InstallationWay

Новичок
@InstallationWay , just look in botva2.iss from example above. Lines 306-340. Images are deleted after loading
you said the images are deleted, right. But I also try to extract them explicitly before showing the message box. I also commented on those lines about deleting the files and tested it again. Nothing changed :(

Could you please give it a test? you need to add some large files for installation.
 

InstallationWay

Новичок
You need to try to cancel button (and then pressing no on the exit message) several times till the error occurred, I think while installing larger files the error will come.
I commented all DeleteFile commands in botva2. It will keep images in temp. But I'm amazed that some exit message related images will delete just before the error! I do not know why those images should delete! There is no DeleteFile command anymore!
 
Сверху