|
#601
|
||||
|
||||
|
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;
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;
Last edited by Razor12911; 13-06-2013 at 09:17. |
| The Following User Says Thank You to Razor12911 For This Useful Post: | ||
buttignol (14-06-2013) | ||
| Sponsored Links |
|
#602
|
||||
|
||||
|
Razor 12911 decimal solved but I am not getting the location to install you could put in my script how
Quote:
|
|
#603
|
||||
|
||||
|
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; Last edited by Razor12911; 13-06-2013 at 10:00. |
|
#604
|
||||
|
||||
|
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; |
|
#605
|
|||
|
|||
|
[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.....
|
|
#606
|
|||
|
|||
|
hi all i neeed isdone i how to use it thnx
|
|
#607
|
||||
|
||||
|
To Razor12911 thanks for your help and patience is now "solved"
A hug even more. |
|
#608
|
|||
|
|||
|
What is the problem? I used compact mode. Then finished resize installer and I see this. 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
Last edited by Kurutucu; 15-06-2013 at 18:22. |
|
#609
|
||||
|
||||
|
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;
|
|
#610
|
|||
|
|||
|
Hello,
Is it possible to set the compatibility mode of game .exe to Windows XP using inno automatically? |
|
#612
|
||||
|
||||
|
R.G.Catalyst Inno Setup Script
Preview |
|
#613
|
|||
|
|||
|
Is it the official one or it's a rip/your work?
|
|
#614
|
||||
|
||||
|
the original one.
|
|
#615
|
|||
|
|||
|
Do you have RG Mechanics script?
|
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup | REV0 | Conversion Tutorials | 129 | 21-05-2021 05:51 |
| INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup | REV0 | Conversion Tutorials | 51 | 26-03-2015 06:57 |
| Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |