|
#1
|
||||
|
||||
|
Repack Installer by InnoSetup (5.5.6 compatible)
v1 Compression Internal v2 FreeArc Compression Project abandoned, there will be no help from the creator Rinaldo Last edited by rinaldo; 27-03-2018 at 15:04. |
| The Following 28 Users Say Thank You to rinaldo For This Useful Post: | ||
-XCX- (12-12-2016), ADMIRAL (04-07-2020), Amsal (26-02-2016), Andu21 (14-10-2016), arkantos7 (25-11-2015), Black_Angel_Kjh (11-07-2021), Blue-D (12-08-2016), EzzEldin16 (28-12-2017), GogGames (25-11-2015), gozarck (25-11-2015), GTX590 (20-10-2016), Johan1969 (02-03-2019), kj911 (06-06-2021), lolaya (06-10-2016), mausschieber (25-11-2015), Mini (25-11-2015), oltjon (25-11-2015), panker1992 (30-12-2015), RamiroCruzo (25-11-2015), Rekulou (03-06-2021), Sarvagya (25-11-2015), ScOOt3r (24-04-2021), Simorq (25-11-2015), Sony091090 (04-10-2016), Stor31 (28-11-2015), Susano-o (03-10-2016), Titeuf (28-12-2017), yasserdivar (04-10-2021) | ||
| Sponsored Links |
|
#2
|
||||
|
||||
|
Nice Work
does this support external Compression ? freearc+srep etc ?
|
|
#3
|
||||
|
||||
|
Quote:
|
| The Following User Says Thank You to rinaldo For This Useful Post: | ||
panker1992 (30-12-2015) | ||
|
#4
|
|||
|
|||
|
Sorry bro how to disable about button
|
|
#5
|
||||
|
||||
|
Good work Rinaldo (like Always)
win7x64 works fine the files extracted info works good. and cancel setup rollback very well. i want this size of the installer. and add % progress in the bar. i like minimalistic setups like SFX installers. minimal info and easy click&Install all in one window. (the image is very, very, very, very .....illustrative. i trust in yours designer's instincts)
__________________
-the science of the useless- |
|
#6
|
||||
|
||||
|
Quote:
Code:
// Rinaldo G_Installer v1.1.0.0 Compact
#Define Transparent "255"
//MemoColor=InstallingBackgroundMemoColor: False=White
#Define MemoColor "True"
#define Font "OpenSans-Semibold.ttf"
#define FontName "Open Sans Semibold"
#define Font2 "OpenSans-Regular.ttf"
#define FontName2 "Open Sans"
#Define SetupCaption "Game Test"
#Define Size 134
#Define URL "http://fileforums.com/member.php?u=223794"
#define AppName "Game Test"
#define Publisher "Rinaldo"
#define AppExe "MyProg.exe"
#Define InternalCompression "C:\Windows\Fonts"
[Setup]
AppName={#AppName}
AppVerName={#AppName}
AppPublisher={#Publisher}
AppVersion=1.0.0.0
AppCopyright=Rinaldo
DefaultDirName={pf}\{#Publisher}\{#AppName}
SetupIconFile=Files\icon.ico
OutputDir=_Output
OutputBaseFilename=Setup_{#AppName}
VersionInfoVersion=1.0.0.0
VersionInfoCompany={#Publisher}
VersionInfoDescription={#AppName}_Setup
VersionInfoTextVersion=1, 0, 0, 0
InternalCompressLevel=ultra64
MinVersion= 0,6.1
#ifdef NeedSize
ExtraDiskSpaceRequired={#NeedSize}
#endif
AllowNoIcons=yes
DirExistsWarning=no
UninstallDisplayIcon={uninstallexe}
UninstallFilesDir={app}\Un
DiskSpanning=true
DiskSliceSize=1530000000
SlicesPerDisk=3
SolidCompression=true
Compression=none
[Files]
Source: MyProg.exe; DestDir: {app}; Flags: ignoreversion; Check:CMP;BeforeInstall: MemoExec;
Source: Files\{#Font}; Flags: dontcopy
Source: Files\{#Font2}; Flags: dontcopy
Source: Files\InnoCallback.dll; Flags: dontcopy
Source: Files\pb.bmp; Flags: dontcopy
Source: Files\bg.bmp; Flags: dontcopy
;Source: C:\Windows\inf\*; DestDir: {app}\Folder; Flags: ignoreversion recursesubdirs createallsubdirs;BeforeInstall: MemoExec;
Source: Files\*.bmp; DestDir: "{tmp}"; Flags: dontcopy
#ifdef InternalCompression
Source: {#InternalCompression}\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: unins*,_CommonRedist,CommonRedist,Redist;Check:CMP;BeforeInstall: MemoExec;
#endif
[Icons]
Name: {commondesktop}\Uninstall {#AppName}; Filename:{app}\Un\unins000.exe; WorkingDir:{app}\Un; Check: DeskIcon;
Name: {commondesktop}\{cm:LaunchProgram,{#AppName}}; Filename:{app}\{#AppExe}; Check: DeskIcon;
#include "registry.txt"
[Messages]
ButtonNext=Install
ButtonBrowse=Browse
[CustomMessages]
mb = Mb
gb = Gb
tb = Tb
size =RS:
frees =FS:
setupname ={#SetupCaption}
deskiconname =Create Desktop Icon
redisticon =Install Redist
showdetails =Show Details...
hidedetails =Hide
aboutformcaption =About
aboutbutton =About
memofinish =Finish!
installationredist =Installation Redist Components...
welcomelbl =Welcome to the {#AppName} Setup Wizard
welcomelbl2 =This will install {#AppName} on your computer.
gamedir =Game Dir
copyby =Copyright © by Rina
OPLbl =Install Options
dirlabel =Install game to:
finishedlabel =Finished
[UninstallDelete]
Type: filesandordirs; Name: {app}
[Code ]
//=-=-=-=-=-=-=-=-=-=-=-
var
ShowBtn,DetailsBtn: TNewButton;
FilesMemo: TNewMemo;
Flag: boolean;
RedistChk,DeskChk,CheckBtn: TNewCheckBox;
AboutForm: TForm;
p0,p1,p2,p3,p4: TPanel;
BVL,BVL2:TBevel;
FreeMB, TotalMB: Cardinal;
NeedSize: Integer;
OPLbl,FinishedLbl,DirLbl,CopyLbl,GameDirLbl,EditLbl,WLabel,WLabel_2,LabelMT,LabelMT_2,NSLbl, FreeSLbl,NoDiskSLbl: TLabel;
Program1: TCheckBox;
//=-=-=-=-=-=-=-=-=-=-=-
const
#ifdef transparent
WS_EX_LAYERED = $80000; WS_EX_TRANSPARENT = $20; LWA_ALPHA = 2; GWL_EXSTYLE = (-20);
#endif
FR_PRIVATE = $10;
//=-=-=-=-=-=-=-=-=-=-=-
function AddFontResource(lpszFilename: String; fl, pdv: DWORD): Integer; external '[email protected] stdcall';
function RemoveFontResource(lpFileName: String; fl, pdv: DWORD): BOOL; external '[email protected] stdcall';
//=-=-=-=-=-=-=-=-=-=-=-
function SetLayeredWindowAttributes(hwnd: HWnd; crKey: TColor; bAlpha: Byte; dwFlags: DWord): Boolean; external '[email protected] stdcall';
function SetWindowLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint; external '[email protected] stdcall';
function GetWindowLong(Wnd: HWnd; Index: Integer): Longint; external '[email protected] stdcall';
#ifdef transparent
Procedure WizardFormOnActivate(Sender: TObject); Begin SetLayeredWindowAttributes(WizardForm.Handle, 0, {#Transparent} , LWA_ALPHA) End;
#endif
//=-=-=-=-=-=-=-=-=-=-=-
#include "Files\pb.txt"
//=-=-=-=-=-=-=-=-=-=-=-
procedure MemoExec();
var
AFile: String;
begin
AFile:= ExpandConstant(CurrentFilename);
if ExtractFileExt(AFile)='' then
FilesMemo.Lines.Add(RemoveBackslash(AFile)) else
FilesMemo.Lines.Add(AFile);
end;
procedure HideShow(Sender: TObject);
begin
If not Flag then begin
FilesMemo.Hide;
DetailsBtn.Caption:=CustomMessage('showdetails');
Flag:= True;
end else begin
FilesMemo.Show;
DetailsBtn.Caption:=CustomMessage('hidedetails');
Flag:= False;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-
#ifdef transparent
Procedure MainFormOnActivate(Sender: TObject); Begin
SetLayeredWindowAttributes(WizardForm.Handle, 0, 127, LWA_ALPHA)
End;
#endif
//=-=-=-=-=-=-=-=-=-=-=-
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)+CustomMessage('mb') else
if Float/1024 < 1024 then Result:= NumToStr(Float/1024)+CustomMessage('gb') else
Result:= NumToStr(Float/(1024*1024))+CustomMessage('tb');
end;
procedure GetFreeSpace(Sender: TObject);
var Path: String;
begin
Path := ExtractFileDrive(WizardForm.DirEdit.Text);
GetSpaceOnDisk(Path, True, FreeMB, TotalMB);
if FreeMB > 1024 then
FreeSLbl.Caption :=CustomMessage('frees')+' '+MbOrTb(FreeMB)
else
FreeSLbl.Caption :=CustomMessage('frees')+' '+MbOrTb(FreeMB);
LabelMT.Caption:=Path;
if FreeMB < NeedSize then begin
WizardForm.NextButton.Enabled := False;
FreeSLbl.Font.Color:=$0000008B
WizardForm.DirEdit.Font.Color:=$0000008B;
NoDiskSLbl.Caption:=SetupMessage(msgDiskSpaceWarningTitle);
Program1.Enabled:=false;
LabelMT.Font.Color:=$0000008B;
end else begin
LabelMT.Font.Color:=$00007F61;
WizardForm.DirEdit.Font.Color:=$005F5F5F;
WizardForm.NextButton.Enabled := True;
FreeSLbl.Font.Color:=$00007F61;
NoDiskSLbl.Caption:='';
Program1.Enabled:=True;
end;
end;
procedure Program1OnClick(Sender: TObject);
begin
if Program1.Checked then
NeedSize := NeedSize + {#Size}
else
NeedSize := NeedSize - {#Size};
NSLbl.Caption :=CustomMessage('size')+' '+ MbOrTb(NeedSize);
if FreeMB < NeedSize then
WizardForm.NextButton.Enabled := False
else
WizardForm.NextButton.Enabled := True;
if NeedSize >0 then
WizardForm.NextButton.Enabled := True
else
WizardForm.NextButton.Enabled := False;
end;
//=-=-=-=-=-=-=-=-=-=-=-
function CMP: Boolean;
begin
Result:= Program1.Checked;
end;
function DeskIcon: Boolean;
begin
Result:= DeskChk.Checked;
end;
function Redists: Boolean;
begin
Result:= RedistChk.Checked;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure ActivateClick(Sender: TObject);
begin
p0.Show;
OPLbl.Show;
p1.Show;
p2.Show;
p3.Show;
p4.Show;
BVL.Show;
BVL2.Show;
ShowBtn.Hide;
AboutForm.Close;
Wizardform.NextButton.Enabled := true;
WLabel.Hide;
WLabel_2.Hide;
GameDirLbl.Hide;
EditLbl.Hide;
CopyLbl.Hide;
end;
procedure LinkClick(Sender: TObject);
var lc:integer;
begin
ShellExec('open', '{#URL}', '', '', SW_SHOWNORMAL, ewNoWait, lc);
end;
procedure CFClick(Sender: TObject);
begin
AboutForm := TForm.Create(nil);
try
with AboutForm do
begin
//ClientWidth := ScaleX(600);
//ClientHeight := ScaleY(335);
ClientWidth := ScaleX(440);
ClientHeight := ScaleY(190);
Position := poScreenCenter;
BorderStyle:=bsDialog;
Caption :=CustomMessage('aboutformcaption');
Color:=$00FFFFFF;
End;
with TButton.Create(nil) do
begin
//SetBounds(ScaleX(543), ScaleY(304), ScaleX(57), ScaleX(30));
SetBounds(ScaleX(384), ScaleY(160), ScaleX(57), ScaleX(30));
Parent := AboutForm;
Caption :=SetupMessage(msgButtonOK);
Cursor := crHand;
ModalResult := mrCancel;
OnClick:=@ActivateClick;
end;
with TBevel.Create(nil) do
begin
SetBounds(ScaleX(5), ScaleY(5), AboutForm.ClientWidth-10,AboutForm.ClientHeight-10);
Parent := AboutForm;
Style := bsLowered;
Shape := bsFrame;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(5), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='Simply Installer (Gog Similar Designe) Created: by Rina';
Font.Size:=12;
Font.Name:='{#FontName}';
Font.Color:=$00E27500;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(35), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='Copyright ©: Rinaldo';
Font.Size:=10;
Font.Name:='{#FontName}';
Font.Color:=$00656565;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(55), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='Script Compilet with: Inno Setup 5.5.6';
Font.Size:=10;
Font.Name:='{#FontName}';
Font.Color:=$00656565;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(75), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='Compression: Internal';
Font.Size:=10;
Font.Name:='{#FontName}';
Font.Color:=$00656565;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(95), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='Version: v1.0.0.0';
Font.Size:=10;
Font.Name:='{#FontName}';
Font.Color:=$00656565;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(115), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='It was adapted code with: TLama and Serega';
Font.Size:=10;
Font.Name:='{#FontName}';
Font.Color:=$00656565;
end;
with Tlabel.Create(nil) do
begin
SetBounds(ScaleX(10), ScaleY(155), AboutForm.ClientWidth,AboutForm.ClientHeight);
Parent := AboutForm;
Caption :='Rina Link: Fileforums';
OnClick:=@LinkClick;
Font.Size:=10;
Font.Name:='{#FontName}';
Font.Color:=$00656560;
Cursor:=1;
end;
AboutForm.ShowModal;
finally
AboutForm.Free;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure HideComponents();
begin
OPLbl.Hide;
p0.Hide;
p1.Hide;
p2.Hide;
p3.Hide;
p4.Hide;
BVL.Hide;
BVL2.Hide;
WizardForm.CancelButton.SetBounds(0,0,0,0);
DetailsBtn.Hide;
FilesMemo.Hide;
WLabel.Hide;
WLabel_2.Hide;
GameDirLbl.Hide;
EditLbl.Hide;
CopyLbl.Hide;
DirLbl.Hide;
FinishedLbl.Hide;
end;
//=-=-=-=-=-=-=-=-=-=-=-
{procedure ShowComponents(Sender: TObject);begin end;}
//=-=-=-=-=-=-=-=-=-=-=-
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False;
end;
//=-=-=-=-=-=-=-=-=-=-=-
function InitializeSetup:boolean;
begin
ExtractTemporaryFile('pb.bmp');
ExtractTemporaryFile('bg.bmp');
Result:=True;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure CenterInParent(Control: TControl);
begin
if Assigned(Control) and Assigned(Control.Parent) then
begin
Control.Left := (Control.Parent.Width - Control.Width) div 2;
//Control.Top := (Control.Parent.Height - Control.Height) div 2;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure WZ();
begin with WizardForm do begin
FilesMemo := TNewMemo.Create(WizardForm);
FilesMemo.ParentColor:={#MemoColor};
//FilesMemo.SetBounds(5, 5, WizardForm.Width,350);
FilesMemo.SetBounds(3, 3, WizardForm.Width-13,160);
FilesMemo.Parent := WizardForm;
FilesMemo.WordWrap:= True;
FilesMemo.BorderStyle := bsNone;
FilesMemo.ReadOnly:= True;
FilesMemo.Visible := false;
FilesMemo.Font.Name:='{#FontName}';
FilesMemo.Font.Size:=6;
FilesMemo.Font.Color:=$005F5F5F;
FilesMemo.Clear;
DetailsBtn := TNewButton.Create(WizardForm);
DetailsBtn.Parent := WizardForm;
//DetailsBtn.SetBounds(490,366,100,30);
DetailsBtn.SetBounds(482,168,100,25);
DetailsBtn.Caption := CustomMessage('showdetails');
DetailsBtn.OnClick := @HideShow
DetailsBtn.Font.Name:='{#FontName2}';
DetailsBtn.Font.Size:=8;
Flag:= True;
p0 := TPanel.Create(WizardForm);
p0.Parent := WizardForm;
p0.SetBounds(0,0,WizardForm.ClientWidth,wizardform.ClientHeight-350);
p0.BevelOuter := bvNone;
p1 := TPanel.Create(WizardForm);
p1.Parent := WizardForm;
//p1.SetBounds(9,85,642,40);
p1.SetBounds(4,4,642,40);
p1.Color := 15461355;
p1.ParentBackground := False;
p2 := TPanel.Create(WizardForm);
p2.Parent := WizardForm;
//p2.SetBounds(9,125,642,40);
p2.SetBounds(4,44,642,40);
p2.Color := 15461355;
p2.ParentBackground := False;
p3 := TPanel.Create(WizardForm);
p3.Parent := WizardForm;
//p3.SetBounds(9,174,495,76);
p3.SetBounds(4,88,495,76);
p3.Color := $00D3D3D3;
p3.ParentBackground := False;
p4 := TPanel.Create(WizardForm);
p4.Parent := WizardForm;
//p4.SetBounds(504,174,147,76);
p4.SetBounds(499,88,147,76);
p4.Color := $00D3D3D3;
p4.ParentBackground := False;
//CancelButton.SetBounds(592,365,60,30);
CancelButton.SetBounds(586,168,60,25);
CancelButton.Font.Size:=10;
CancelButton.Font.Name:='{#FontName2}';
//NextButton.SetBounds(592,366,60,30);
NextButton.SetBounds(586,168,60,25);
NextButton.Font.Size:=10;
NextButton.Font.Name:='{#FontName2}';
ShowBtn := TNewButton.Create(WizardForm);
ShowBtn.Parent := WizardForm;
//ShowBtn.SetBounds(5,366,60,30);
ShowBtn.SetBounds(5,168,60,25);
ShowBtn.Caption :=CustomMessage('aboutbutton');
ShowBtn.OnClick := @CFClick
ShowBtn.Font.Name:='{#FontName2}';
ShowBtn.Font.Size:=10;
ProgressGauge.Parent:=WizardForm;
//ProgressGauge.SetBounds(WizardForm.ProgressGauge.Left+5,WizardForm.ProgressGauge.Top+328,WizardForm.ProgressGauge.Width+65,WizardForm.ProgressGauge.Height);
ProgressGauge.SetBounds(WizardForm.ProgressGauge.Left+2,WizardForm.ProgressGauge.Top+127,WizardForm.ProgressGauge.Width+62,WizardForm.ProgressGauge.Height);
DirEdit.Parent:= WizardForm;
DirEdit.Left:=10;
DirBrowseButton.Parent:= WizardForm;
BackButton.SetBounds(0,0,0,0);
//Bevel.SetBounds(0,355,660,1);
Bevel.SetBounds(0,0,0,0);
DirEdit.Parent:=p3;
DirEdit.SetBounds(17,35,400,21);
DirEdit.Font.Color:=$00EBEBEB;
DirEdit.Font.Size:=10;
DirEdit.Font.Name:='{#FontName}';
DirBrowseButton.Parent:=p3;
DirBrowseButton.SetBounds(423,34,60,30);
DirBrowseButton.Caption:='Browse';
DirBrowseButton.Font.Name:='{#FontName2}';
DirBrowseButton.Font.Size:=10;
WizardForm.WizardBitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\bg.bmp'));;
WizardForm.WizardBitmapImage.Stretch:=True;
WizardForm.WizardBitmapImage.Parent:=WizardForm;
//WizardForm.WizardBitmapImage.SetBounds(0,0,WizardForm.ClientWidth,355);
WizardForm.WizardBitmapImage.SetBounds(0,0,WizardForm.ClientWidth,200);
WizardForm.WizardBitmapImage.AutoSize := False;
BVL := TBevel.Create(WizardForm);
BVL.Parent := WizardForm;
//BVL.SetBounds(ScaleX(8),ScaleY(84),ScaleX(643),ScaleY(81));
BVL.SetBounds(ScaleX(3),ScaleY(3),ScaleX(643),ScaleY(81));
BVL.Style := bsLowered;
BVL.Shape := bsFrame;
BVL2 := TBevel.Create(WizardForm);
BVL2.Parent := WizardForm;
//BVL2.SetBounds(ScaleX(8),ScaleY(173),ScaleX(643),ScaleY(77));
BVL2.SetBounds(ScaleX(3),ScaleY(87),ScaleX(643),ScaleY(77));
BVL2.Style := bsLowered;
BVL2.Shape := bsFrame;
CheckBtn := TNewCheckBox.Create(WizardForm);
CheckBtn.Parent := WizardForm;
CheckBtn.SetBounds(302,327,73,25);
CheckBtn.Caption := 'Show';
CheckBtn.OnClick := @CFClick
CheckBtn.Font.Name:='{#FontName2}';
CheckBtn.Font.Size:=10;
CheckBtn.Hide;
LabelMT := TLabel.Create(WizardForm);
LabelMT.Parent := p4;
LabelMT.SetBounds(120,40,209,14);
LabelMT.Font.Name:='{#FontName}';
LabelMT.Font.Size:=10;
LabelMT.Font.Color:=$00007F61;
NSLbl := TLabel.Create(WizardForm);
NSLbl.Parent := p4;
NSLbl.SetBounds(10,16,209,14);
NSLbl.Caption :=CustomMessage('size') + MbOrTb(NeedSize);
NSLbl.Font.Name:='{#FontName}';
NSLbl.Font.Size:=10;
NSLbl.Font.Color:=$00808080;
NoDiskSLbl := TLabel.Create(WizardForm);
NoDiskSLbl.Parent := p3;
NoDiskSLbl.SetBounds(320,0,209,14);
NoDiskSLbl.Font.Color:=clred;
NoDiskSLbl.Font.Name:='{#FontName2}';
NoDiskSLbl.Font.Size:=10;
FreeSLbl := TLabel.Create(WizardForm);
FreeSLbl.Parent := p4;
FreeSLbl.SetBounds(10,40,209,14);
FreeSLbl.Font.Name:='{#FontName2}';
FreeSLbl.Font.Size:=10;
FreeSLbl.Font.Color:=$00007F61;
Program1 := TCheckBox.Create(WizardForm);
Program1.Parent := p1;
Program1.Caption :=CustomMessage('setupname');
Program1.SetBounds(15,12,300,14);
Program1.OnClick := @Program1OnClick;
Program1.Checked:=True;
Program1.Font.Name:='{#FontName}';
Program1.Font.Size:=10;
Program1.Color:=$00EBEBEB;
DeskChk := TNewCheckBox.Create(WizardForm);
DeskChk.Parent := p2;
DeskChk.Caption :=CustomMessage('deskiconname');
DeskChk.SetBounds(15,12,300,14);
DeskChk.Checked:=True;
DeskChk.Font.Name:='{#FontName2}';
DeskChk.Font.Size:=10;
DeskChk.Color:=$00EBEBEB;
RedistChk := TNewCheckBox.Create(WizardForm);
RedistChk.Parent := p2;
RedistChk.Caption :=CustomMessage('redisticon');
RedistChk.SetBounds(250,12,300,14);
RedistChk.Checked:=True;
RedistChk.Font.Name:='{#FontName2}';
RedistChk.Font.Size:=10;
RedistChk.Color:=$00EBEBEB;
end;
WLabel := TLabel.Create(WizardForm);
WLabel.Parent := WizardForm;
WLabel.Font.Name:='{#FontName}';
//WLabel.Font.Size:=15;
//WLabel.Top:=16;
WLabel.Font.Size:=12;
WLabel.Top:=5;
WLabel.Font.Color:=$00414141;
WLabel.Caption:=CustomMessage('welcomelbl');
WLabel.Transparent:=True;
CenterInParent(WLabel);
WLabel_2 := TLabel.Create(WizardForm);
WLabel_2.Parent := WizardForm;
//WLabel_2.Font.Name:='{#FontName2}';
//WLabel_2.Font.Size:=13;
//WLabel_2.Top:=71;
WLabel_2.Font.Name:='{#FontName}';
WLabel_2.Font.Size:=10;
WLabel_2.Top:=40;
WLabel_2.Font.Color:=$00414141;
WLabel_2.Caption:=CustomMessage('welcomelbl2');
WLabel_2.Transparent:=True;
CenterInParent(WLabel_2);
GameDirLbl := TLabel.Create(WizardForm);
GameDirLbl.Parent := WizardForm;
GameDirLbl.Font.Name:='{#FontName}';
//GameDirLbl.Font.Size:=10;
//GameDirLbl.Top:=120;
GameDirLbl.Font.Size:=9;
GameDirLbl.Top:=80;
GameDirLbl.Caption:=CustomMessage('gamedir');
GameDirLbl.Transparent:=True;
CenterInParent(GameDirLbl);
EditLbl := TLabel.Create(WizardForm);
EditLbl.Parent := WizardForm;
EditLbl.Font.Name:='{#FontName}';
//EditLbl.Font.Size:=10;
//EditLbl.Top:=140;
EditLbl.Font.Size:=8;
EditLbl.Top:=100;
EditLbl.Font.Color:=$00414141;
EditLbl.Caption:=WizardForm.DirEdit.Text;
EditLbl.Transparent:=True;
CenterInParent(EditLbl);
CopyLbl := TLabel.Create(WizardForm);
CopyLbl.Parent := WizardForm;
CopyLbl.Font.Name:='{#FontName}';
//CopyLbl.Font.Size:=10;
//CopyLbl.Top:=220;
CopyLbl.Font.Size:=10;
CopyLbl.Top:=150;
CopyLbl.Font.Color:=$000000FF;
CopyLbl.Caption:=CustomMessage('copyby')
CopyLbl.Transparent:=True;
CenterInParent(CopyLbl);
DirLbl := TLabel.Create(WizardForm);
DirLbl.Parent := p3;
DirLbl.Font.Name:='{#FontName2}';
DirLbl.Font.Size:=10;
DirLbl.Font.Color:=$00414141;
DirLbl.Caption:=CustomMessage('dirlabel');
DirLbl.Transparent:=True;
DirLbl.SetBounds(5,5,300,17);
FinishedLbl := TLabel.Create(WizardForm);
FinishedLbl.Parent := WizardForm;
FinishedLbl.Font.Name:='{#FontName}';
FinishedLbl.Font.Size:=20;
//FinishedLbl.Top:=71;
FinishedLbl.Top:=5;
FinishedLbl.Font.Color:=$00414141;
FinishedLbl.Caption:=CustomMessage('finishedlabel');
FinishedLbl.Transparent:=True;
CenterInParent(FinishedLbl);
OPLbl := TLabel.Create(WizardForm);
OPLbl.Parent := p0;
OPLbl.Font.Color:=$00414141;
OPLbl.Font.Name:='{#FontName2}';
OPLbl.Font.Size:=20;
//OPLbl.Top:=20;
OPLbl.Top:=999;
OPLbl.Caption:=CustomMessage('OPLbl');
OPLbl.Transparent:=True;
CenterInParent(OPLbl);
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure InitializeWizard;
begin
if not FontExists('{#FontName}') then
begin
ExtractTemporaryFile('{#Font}');
AddFontResource(ExpandConstant('{tmp}\{#Font}'), FR_PRIVATE, 0);
ExtractTemporaryFile('{#Font2}');
AddFontResource(ExpandConstant('{tmp}\{#Font2}'), FR_PRIVATE, 0);
end;
WizardForm.Font.Name := '{#FontName}';
with WizardForm do begin
NeedSize := 0;
Caption:='{#SetupCaption}';
Color:=$00D3D3D3;
Position:=poScreenCenter;
InnerNotebook.Hide;
OuterNotebook.Hide;
//ClientWidth:=660;
//ClientHeight:=405;
ClientWidth:=649;
ClientHeight:=197;
BorderStyle := bsDialog;
WZ();
DirEdit.OnChange := @GetFreeSpace;
DirEdit.Text := WizardForm.DirEdit.Text + #0;
TPB(WizardForm.ProgressGauge);
#ifdef transparent
SetWindowLong(WizardForm.Handle, GWL_EXSTYLE, GetWindowLong(WizardForm.Handle, GWL_EXSTYLE) or WS_EX_LAYERED);
WizardForm.OnActivate:= @WizardFormOnActivate
MainForm.OnActivate:= @MainFormOnActivate
#endif
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure DeinitializeSetup;
begin
RemoveFontResource(ExpandConstant('{tmp}\{#Font}'), FR_PRIVATE, 0);
RemoveFontResource(ExpandConstant('{tmp}\{#Font2}'), FR_PRIVATE, 0);
WizardForm.Free;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure CurPageChanged(CurPageID: Integer);
begin
HideTPB();
HideComponents;
Wizardform.NextButton.Enabled := False;
case CurPageID of
wpWelcome:
begin
WLabel.Show;
WLabel_2.Show;
GameDirLbl.Show;
EditLbl.Show;
CopyLbl.Show;
DirLbl.Show;
end;
wpSelectDir:begin
GetFreeSpace(nil);
end;
wpInstalling:
begin
DetailsBtn.Show;
//Wizardform.CancelButton.SetBounds(592,365,60,30);
Wizardform.CancelButton.SetBounds(586,168,60,25);
end;
wpfinished:
begin
FinishedLbl.Show;
FilesMemo.Clear;
FilesMemo.Lines.Add(CustomMessage('memofinish'));
Wizardform.NextButton.Enabled := True;
DetailsBtn.Hide;
HideTPB();
WizardForm.ProgressGauge.Hide;
end;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-
procedure CurStepChanged(CurStep: TSetupStep);
var
Rina: Integer;
begin
if CurStep=ssInstall then ProgressTimer:= SetTimer(0,0, 200, WrapTimerProc(@UpdatePB, 4));
if CurStep=ssPostInstall then begin
if (RedistChk.Checked = True) then begin
FilesMemo.Clear;
FilesMemo.Font.Color:=clblue;
FilesMemo.Lines.Add(CustomMessage('installationredist'));
Exec(ExpandConstant('{src}\_CommonRedist\DirectX\DXSETUP.exe'), '/Silent', '', SW_SHOW,
ewWaitUntilTerminated, Rina);
Exec(ExpandConstant('{src}\_CommonRedist\vcredist_x64.exe'), '/q', '', SW_SHOW,
ewWaitUntilTerminated, Rina);
Exec(ExpandConstant('{src}\_CommonRedist\vcredist_x86.exe'), '/q', '', SW_SHOW,
ewWaitUntilTerminated, Rina);
KillTimer(0, ProgressTimer);
end;
end;
end;
//=-=-=-=-=-=-=-=-=-=-=-
function ShouldSkipPage(PageID: Integer): Boolean;
begin
if (PageID=6)or (PageID=7)or (PageID=8)or (PageID=10)
then Result:=true;
end;
//=-=-=-=-=-=-=-=-=-=-=-
Last edited by rinaldo; 25-11-2015 at 13:02. |
| The Following 2 Users Say Thank You to rinaldo For This Useful Post: | ||
gozarck (25-11-2015), TheGh0stie13 (02-01-2023) | ||
|
#8
|
||||
|
||||
|
Hmm, you listened me?
__________________
Don't Judge Me |
|
#9
|
|||
|
|||
|
How enable Install button without open "About" ?
|
|
#10
|
|||
|
|||
|
why i get runtime error "could not call proc" am i do something wrong?
|
|
#11
|
|||
|
|||
|
nice work rin
|
|
#12
|
|||
|
|||
|
Thank you Rina for your nice work... Just 2 questions, could someone help me change the code for
1 - Insert a PNG logo centered vertically on 1st windows 2 - Activate logo on title bar Thank you all for your help
|
|
#13
|
|||
|
|||
|
I edit the code to display the logo on the first page.
But I do not find in the code how to hide on the options page. Last edited by OkaX; 31-12-2017 at 08:15. |
|
#14
|
||||
|
||||
|
Code:
procedure CurPageChanged(CurPageID: Integer); begin wpSelectDir:begin YourImage.Hide;
__________________
Haters gonna hate
|
| The Following User Says Thank You to KaktoR For This Useful Post: | ||
OkaX (31-12-2017) | ||
|
#15
|
|||
|
|||
|
Already done but not work. In wpfinished: and wpInstalling: this works but not in wpSelectDir:
I don't know why :/ But only half of the logo is displayed. Quote:
Last edited by OkaX; 22-03-2018 at 06:45. |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Conversion Designer/Installer Creator | Razor12911 | Conversion Tutorials | 1613 | 03-10-2024 01:24 |
| altef_4's installer | altef_4 | Conversion Tutorials | 244 | 24-05-2024 22:20 |
| Game Installer Designer by altef_4 | altef_4 | Conversion Tutorials | 236 | 28-05-2021 02:54 |
| INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
| Tutorial using CI 8.0.0 | yener90 | Conversion Tutorials | 424 | 21-10-2014 09:49 |