FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   INNO TROUBLESHOOT - Questions Here (https://fileforums.com/showthread.php?t=93193)

Razor12911 13-06-2013 09:13

Make an onchange for wizardform.diredit to update changes.

How to do one,

Code:

procedure DirEditOnChange(Sender: TObject);
begin
lbl.caption:= ExpandConstant('Espaço do Game : ') + MbOrTb(24000);
end;

WizardForm.DirEdit.OnChange:= @DirEditOnChange;

to add the two decimals use this mbortb

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(Float: Extended): String;
begin
if Float < 1024 then Result:= NumToStr(Float)+' '+ 'MB'else
if Float/1024 < 1024 then Result:= NumToStr(Float/1024)+' '+'GB' else
Result:= NumToStr(Float/(1024*1024))+' '+'TB';
end;


buttignol 13-06-2013 09:54

Razor 12911 decimal solved but I am not getting the location to install you could put in my script how
Quote:

procedure DirEditOnChange(Sender: TObject);
begin
lbl.caption:= ExpandConstant('Espaço do Game : ') + MbOrTb(24000);
end;

WizardForm.DirEdit.OnChange:= @DirEditOnChange;

Razor12911 13-06-2013 09:56

oops, forgot something.

procedure DirEditOnChange(Sender: TObject);
var
Page: TWizardPage;
lbl: TLabel;
Path: String;
FreeMB, TotalMB: Cardinal;
begin
Path := WizardForm.DirEdit.Text;
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;

WizardForm.DirEdit.OnChange:= @DirEditOnChange;

buttignol 13-06-2013 17:54

Thanks Razor12911 I tried many ways but failed error when compiling (Line 19 Identifier expected) inno setup 5.5.2 unicode

[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(Float: Extended): String;
begin
if Float < 1024 then Result:= NumToStr(Float)+' '+ 'MB'else
if Float/1024 < 1024 then Result:= NumToStr(Float/1024)+' '+'GB' else
Result:= NumToStr(Float/(1024*1024))+' '+'TB';
end;

procedure InitializeWizard3();
begin

procedure DirEditOnChange(Sender: TObject);
var
Path: String;
Page: TWizardPage;
lbl: TLabel;
FreeMB, TotalMB: Cardinal;
begin
Path := WizardForm.DirEdit.Text;
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;

WizardForm.DirEdit.OnChange:= @DirEditOnChange;

procedure InitializeWizard();
begin
InitializeWizard1();
InitializeWizard2();
InitializeWizard3();
end;

red01 14-06-2013 01:52

[QUOTE=Razor12911;419320]I think you can certify Inno Setup as Portable, I mean, all it does is extracts Files.

you are right about this point.
Well i was trying to find out a way where i dont have to install the game or application in pf or any other directory ( natural way of innoset up).

i want to extract the file in directory (anyone and anywhere) and play that game or run application from there.

sorry for being so troublesome..... :D

lyesbboy 14-06-2013 06:02

hi all i neeed isdone i how to use it thnx

buttignol 14-06-2013 06:55

To Razor12911 thanks for your help and patience is now "solved"
A hug even more.

Kurutucu 15-06-2013 16:20

What is the problem? I used compact mode. Then finished resize installer and I see this. http://i41.tinypic.com/30lmnpv.png

http://i41.tinypic.com/30lmnpv.png

It's extraction files... caption. How I disable it in Finished page?

Code:

procedure CompactCheckBoxClick(Sender: TObject);
begin
  if CompactCheckBox.Checked then
  begin
    with WizardForm do
    begin
      Status.SetBounds(150,90,125,15);
      WizardSmallBitmapImage.Hide;
      WizardForm.ClientWidth:=420;
      WizardForm.ClientHeight:=175;
      MainPanel.Hide;
      Bevel.Hide;
      Bevel1.top:=132
      CompactCheckBox.SetBounds(326,150,90,14);
      SoundCtrlButton.SetBounds(16,141,100,30);
      CancelButton.SetBounds(151,141,100,30);
      MyCancelButton.SetBounds(151,141,100,30);
      ISDoneProgressBar1.Width:= ScaleX(388);
      ISDoneProgressBar1.height:=20;
      ISDoneProgressBar1.Left:= ScaleX(16);
      ISDoneProgressBar1.Top:=50;
      LabelTime1.Left:=ISDoneProgressBar1.Left;
      LabelTime1.Top:=ISDoneProgressBar1.Top +25;;
      LabelTime2.Top:= LabelTime1.Top;
      LabelTime2.Left:= 227;
      LabelCurrFileName.Left:= ISDoneProgressBar1.Left;
      LabelCurrFileName.Top:= ISDoneProgressBar1.Top -20;
      LabelPct1.Font.Height:=-24;
      LabelPct1.Left:= ISDoneProgressBar1.Left -33 + ISDoneProgressBar1.Width div 2;
      LabelPct1.Top:= ISDoneProgressBar1.Top + ScaleY(43);
      ProgressGauge.Width:= ScaleX(388);
      ProgressGauge.height:=20;
      ProgressGauge.Left:= ScaleX(16);
      ProgressGauge.Top:=50;
      Filenamelabel.Parent:=WizardForm;
      Filenamelabel.Left:=WizardForm.ProgressGauge.Left
      Filenamelabel.Top:=WizardForm.ProgressGauge.Top -20
      Filenamelabel.Width:=WizardForm.ProgressGauge.Width
      StatusLabel.parent:=wizardform;
      StatusLabel.Left:=WizardForm.ProgressGauge.Left
      StatusLabel.Top:=WizardForm.Filenamelabel.Top -20
      Top:=GetScreenHeight-ClientHeight-45
      Left:=GetScreenWidth-ClientWidth-20
    end;
  end else begin
    with WizardForm do
    begin
      Status.SetBounds(265,250,125,30);
      WizardSmallBitmapImage.show;
      WizardForm.ClientWidth:=654;
      WizardForm.ClientHeight:=402;
      MainPanel.Show;
      Bevel.Show;
      Bevel1.top:=90
      CompactCheckBox.SetBounds(560,315,90,14);
      SoundCtrlButton.SetBounds(250,353,60,30);
      CancelButton.SetBounds(420,353,100,30);
      MyCancelButton.SetBounds(420,353,100,30);
      ISDoneProgressBar1.Width:= ScaleX(500);
      ISDoneProgressBar1.height:=30;
      ISDoneProgressBar1.Left:= ScaleX(77);
      ISDoneProgressBar1.Top:=170;
      LabelTime1.Left:=ISDoneProgressBar1.Left;
      LabelTime1.Top:=ISDoneProgressBar1.Top +35;;
      LabelTime2.Top:= LabelTime1.Top;
      LabelTime2.Left:= 400;
      LabelCurrFileName.Left:= ISDoneProgressBar1.Left;
      LabelCurrFileName.Top:= ISDoneProgressBar1.Top -20;
      LabelPct1.Font.Height:=-24;
      LabelPct1.Left:= ISDoneProgressBar1.Left -33 + ISDoneProgressBar1.Width div 2;
      LabelPct1.Top:= ISDoneProgressBar1.Top + ScaleY(70);
      ProgressGauge.Width:= ScaleX(500);
      ProgressGauge.height:=30;
      ProgressGauge.Left:= ScaleX(77);
      ProgressGauge.Top:=170;
      top:=GetScreenHeight-ClientHeight-45
      left:=GetScreenWidth-ClientWidth-20
    end;
  end;
end;

Code:

  if CurPageID=wpFinished then begin
    HideComponents;
    WizardForm.ProgressGauge.Hide;
    SoundCtrlButton.SetBounds(210,347,100,30);
    SoundCtrlButton.Caption :=ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}');
    WizardForm.Position:=poScreenCenter;
    WizardForm.ClientWidth:=654;
    WizardForm.ClientHeight:=402;
    WizardForm.Visible:=True;
    WizardForm.WizardBitmapImage.Show;
    WelcomeLbl.Show;
    WelcomeLbl.Left:=145;
    WizardForm.Caption:= 'Finish «{#AppName}» Setup Wizard';
    WelcomeLbl.Caption:='«{#AppName}» was successfully installed on your computer.' + #13#10#13#10 + 'Run the game from shortcut in "start" menu or Desktop shortcut.' + #13#10#13#10 + 'Click "Finish" to exit the installation program.';
  end;
//--------Game Fail To Install PAGE--------\\
  if (CurPageID = wpFinished) and ISDoneError then
  begin
    //LabelTime3.Hide;
    WizardForm.Caption:= 'Error! «{#AppName}»';
    WelcomeLbl.Font.Color:= clRed;
    WelcomeLbl.Caption:= 'Setup encountered an error while installing «{#AppName}»' + #13#10#13#10 + 'Changes were not saved , please re-run the setup again.';
    WelcomeLbl.Left:=163;
    WizardForm.ProgressGauge.Hide;
    WizardForm.Position:=poScreenCenter;
  end;


FIXED.

I deleted all
Code:

      Filenamelabel.Parent:=WizardForm;
      Filenamelabel.Left:=WizardForm.ProgressGauge.Left
      Filenamelabel.Top:=WizardForm.ProgressGauge.Top -20
      Filenamelabel.Width:=WizardForm.ProgressGauge.Width
      StatusLabel.parent:=wizardform;
      StatusLabel.Left:=WizardForm.ProgressGauge.Left
      StatusLabel.Top:=WizardForm.Filenamelabel.Top -20


buttignol 15-06-2013 20:44

Help how do I show page is only wpSelectTasks and also add Surface

[CODE]
Code:

var
avisoLabel: TLabel;

procedure InitializeWizard();
begin

avisoLabel := TLabel.Create(WizardForm);
avisoLabel.Left := ScaleX(0);
avisoLabel.Top := ScaleY(190)
avisoLabel.Width := ScaleY(185)
avisoLabel.Height := ScaleY(13)
//avisoLabel.Parent := WizardForm;      //sempre desativado
avisoLabel.Parent:= WizardForm.SelectDirPage;
avisoLabel.Font.Name:='Verdana';
avisoLabel.Font.Size:= 8;
avisoLabel.Font.Color:=${#Color};
avisoLabel.Transparent:=true;
avisoLabel.Caption := 'Leia antes';
avisoLabel.Font.Style:= [fsBold];

end;


danswano 16-06-2013 04:44

Hello,
Is it possible to set the compatibility mode of game .exe to Windows XP using inno automatically?

pakrat2k2 16-06-2013 09:58

look in inno help> [Setup]: TerminalServicesAware

you can set that there for the games EXE

Razor12911 16-06-2013 13:17

4 Attachment(s)
R.G.Catalyst Inno Setup Script

Preview

danswano 16-06-2013 13:21

Is it the official one or it's a rip/your work?

Razor12911 16-06-2013 13:22

the original one.

danswano 16-06-2013 13:24

Do you have RG Mechanics script?


All times are GMT -7. The time now is 05:39.

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