Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-05-2019, 06:45
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
MinimizePathName error

I wanted to add '"MinimizePathName" in my script but the error "The folder name is invalid" added only this to the sript

Code:
procedure InitializeWizard();
begin
with WizardForm do begin
DirEdit.text := MinimizePathName(WizardForm.DirEdit.Text,WizardForm.DirEdit.Font,WizardForm.DirEdit.Width);
ComponentsDiskSpaceLabel.Visible := false;
BorderStyle := bsSingle;
Center;
end;
WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
Can someone help with what's missing Thank you
Attached Files
File Type: rar Script.rar (3.06 MB, 27 views)
Reply With Quote
Sponsored Links
  #2  
Old 02-05-2019, 08:05
Jiva newstone's Avatar
Jiva newstone Jiva newstone is offline
Registered User
 
Join Date: Nov 2016
Location: India
Posts: 190
Thanks: 227
Thanked 412 Times in 96 Posts
Jiva newstone is on a distinguished road
Quote:
Originally Posted by buttignol View Post
I wanted to add '"MinimizePathName" in my script but the error "The folder name is invalid" added only this to the sript

Code:
procedure InitializeWizard();
begin
with WizardForm do begin
DirEdit.text := MinimizePathName(WizardForm.DirEdit.Text,WizardForm.DirEdit.Font,WizardForm.DirEdit.Width);
ComponentsDiskSpaceLabel.Visible := false;
BorderStyle := bsSingle;
Center;
end;
WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
Can someone help with what's missing Thank you
try add font size and width size manually like as integer value , eg := font size = 12, width = 25
Reply With Quote
  #3  
Old 02-05-2019, 08:43
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
Quote:
Originally Posted by Jiva newstone View Post
try add font size and width size manually like as integer value , eg := font size = 12, width = 25
You say add so
DirEdit.font.Size := 12
DirEdit.width := 25
did not work
Reply With Quote
  #4  
Old 02-05-2019, 10:59
ffmla ffmla is offline
Registered User
 
Join Date: Nov 2014
Location: Digital world
Posts: 112
Thanks: 609
Thanked 65 Times in 41 Posts
ffmla is on a distinguished road
Thumbs up Hey Try this code

I'll add direditonchange code.

copy and replace your code section with the following code.
Code:
var
ISDoneProgressBar: TNewProgressBar;
ISDoneCancel: integer;
ISDoneError: boolean;
MyCancelButton: TButton;

LabelCurrFileName,LabelPct,LabelTime1,LabelTime2,LabelTime3: TLabel;
//=================================================================================ISDONE
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): 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:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers: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';

#ifdef FireWall
function AddApplicationToExceptionList(path: String; name: String): Boolean; external 'AddApplicationToExceptionListA@files:FirewallInstallHelper.dll stdcall setuponly';
function RemoveApplicationFromExceptionList(path: String): Boolean; external 'RemoveApplicationFromExceptionListA@{app}\FirewallInstallHelper.dll stdcall uninstallonly';
#endif
//=================================================================================Extract
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar.Position := OveralPct;
LabelPct.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
LabelCurrFileName.Caption := MinimizePathName(ExpandConstant('{app}\')+CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width);
LabelTime1.Caption := ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption := ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption := ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;
//=================================================================================CancelButton
procedure CancelButtonOnClick(Sender: TObject);
begin
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
end;
//=================================================================================HideComponents
procedure HideComponents;
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar.Hide;
LabelPct.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
end;

procedure DirEditOnChange(Sender: TObject);
begin
  Wizardform.DirEdit.text := MinimizePathName(WizardForm.DirEdit.Text,WizardForm.DirEdit.Font,WizardForm.DirEdit.Width);
end;

//=================================================================================InitializeWizard
procedure InitializeWizard();
begin
//with WizardForm do begin
//DirEdit.text := MinimizePathName(WizardForm.DirEdit.Text,WizardForm.DirEdit.Font,WizardForm.DirEdit.Width);
//ComponentsDiskSpaceLabel.Visible := false;
//BorderStyle := bsSingle;
//Center;
//end;
//WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
//-------
with WizardForm.DirEdit do
begin
  OnChange := @DirEditOnChange;
  WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0; 
end;
//-------
//=================================================================================Installing
with WizardForm.StatusLabel do
begin
Parent := WizardForm.InstallingPage;
Caption := SetupMessage(msgStatusExtractFiles);
Left := ScaleY(0);
Top := ScaleY(0);
end;

LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
SetBounds(0,20,360,20);
end;

ISDoneProgressBar := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar do begin
Parent := WizardForm.InstallingPage;
SetBounds(0,40,370,20);
Max := 1000;
end;

LabelPct := TLabel.Create(WizardForm);
with LabelPct do begin
Parent := WizardForm.InstallingPage;
AutoSize := true;
Left := ScaleY(377);
Top := ScaleY(41);
end;

LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
SetBounds(0,69,150,20);
end;

LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
SetBounds(244,69,150,20);
end;

LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
SetBounds(175,290,300,20);
end;

MyCancelButton := TButton.Create(WizardForm);
with MyCancelButton do begin
Parent := WizardForm;
SetBounds(412,327,75,23);
Caption := 'Cancelar';
OnClick := @CancelButtonOnClick;
end;
end;
//=================================================================================CurPageChanged(CurPageID)
procedure CurPageChanged(CurPageID: Integer);
begin
MyCancelButton.Visible := CurPageID = wpInstalling;

if (CurPageID = wpFinished) then
begin
WizardForm.NextButton.SetBounds(412,327,75,23);
end;

if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;
//=================================================================================CheckError
function CheckError:boolean;
begin
result := not ISDoneError;
end;
//=================================================================================CurStepChanged(CurStep)
procedure CurStepChanged(CurStep: TSetupStep);
var
path, name: String;
begin
if CurStep = ssInstall then begin
WizardForm.ProgressGauge.Hide;
WizardForm.FilenameLabel.Hide;
WizardForm.CancelButton.Hide;
ISDoneCancel:=0;

ExtractTemporaryFile('arc.ini');
ExtractTemporaryFile('unarc.dll');
ExtractTemporaryFile('zlib1.dll');
ExtractTemporaryFile('7z.exe');
ExtractTemporaryFile('7z.dll');
ExtractTemporaryFile('english.ini');
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('CLS-MSC.dll');
ExtractTemporaryFile('CLS-srep.dll');
ExtractTemporaryFile('facompress.dll');
ExtractTemporaryFile('facompress_mt.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('srep64.exe');
ExtractTemporaryFile('pZLib.exe');
ExtractTemporaryFile('CallbackCtrl.dll');

ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0,0,0, MainForm.Handle, 1024, @ProgressCallback) then begin
repeat
ChangeLanguage('English');
if not SrepInit('',512,0) then break;
if not PrecompInit('',128,0) then break;
if not FileSearchInit(true) then break;

//if not ISArcExtract ( 0, 100, ExpandConstant('{src}\*.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), false) then break;
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\*.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;

ISDoneError:=false;
until true;
ISDoneStop;
end;
HideComponents;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
#ifdef FireWall
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing.exe');
name:=ExpandConstant('Van Helsing Final Cut');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64.exe');
name:=ExpandConstant('Van Helsing Final Cut_x64');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64_11.exe');
name:=ExpandConstant('Van Helsing Final Cut_x64_11');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86.exe');
name:=ExpandConstant('Van Helsing Final Cut_x86');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86_11.exe');
name:=ExpandConstant('Van Helsing Final Cut_x86_11');
AddApplicationToExceptionList(path, name);
#endif
end;
end;
//=================================================================================Uninstall
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
path: String;
begin
#ifdef FireWall
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64_11.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86_11.exe');
RemoveApplicationFromExceptionList(path)
UnloadDll(ExpandConstant('{app}\FirewallInstallHelper.dll'));
#endif
end;
#ifdef SAVES
if CurUninstallStep = usPostUninstall then begin
if DirExists(ExpandConstant('{#SAVES}'))
then
begin
if MsgBox(ExpandConstant('{cm:del}'),mbconfirmation, mb_yesno) = IDYES then
begin
DelTree(ExpandConstant('{#SAVES}'), True, True, True);
end;
end;
end;
#endif
end;
Reply With Quote
  #5  
Old 02-05-2019, 13:29
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
Quote:
Originally Posted by ffmla View Post
I'll add direditonchange code.

copy and replace your code section with the following code.
Code:
var
ISDoneProgressBar: TNewProgressBar;
ISDoneCancel: integer;
ISDoneError: boolean;
MyCancelButton: TButton;

LabelCurrFileName,LabelPct,LabelTime1,LabelTime2,LabelTime3: TLabel;
//=================================================================================ISDONE
type
TCallback = function (OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): 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:Cardinal):boolean; external 'SrepInit@files:ISDone.dll stdcall delayload';
function PrecompInit(TmpPath:PAnsiChar;VirtMem:cardinal;PrecompVers: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';

#ifdef FireWall
function AddApplicationToExceptionList(path: String; name: String): Boolean; external 'AddApplicationToExceptionListA@files:FirewallInstallHelper.dll stdcall setuponly';
function RemoveApplicationFromExceptionList(path: String): Boolean; external 'RemoveApplicationFromExceptionListA@{app}\FirewallInstallHelper.dll stdcall uninstallonly';
#endif
//=================================================================================Extract
function ProgressCallback(OveralPct,CurrentPct: integer;CurrentFile,TimeStr1,TimeStr2,TimeStr3:PAnsiChar): longword;
begin
if OveralPct<=1000 then ISDoneProgressBar.Position := OveralPct;
LabelPct.Caption := IntToStr(OveralPct div 10)+'.'+chr(48 + OveralPct mod 10)+'%';
LabelCurrFileName.Caption := MinimizePathName(ExpandConstant('{app}\')+CurrentFile, LabelCurrFileName.Font, LabelCurrFileName.Width);
LabelTime1.Caption := ExpandConstant('{cm:ElapsedTime} ')+TimeStr2;
LabelTime2.Caption := ExpandConstant('{cm:RemainingTime} ')+TimeStr1;
LabelTime3.Caption := ExpandConstant('{cm:AllElapsedTime}')+TimeStr3;
Result := ISDoneCancel;
end;
//=================================================================================CancelButton
procedure CancelButtonOnClick(Sender: TObject);
begin
SuspendProc;
if MsgBox(SetupMessage(msgExitSetupMessage), mbConfirmation, MB_YESNO) = IDYES then ISDoneCancel:=1;
ResumeProc;
end;
//=================================================================================HideComponents
procedure HideComponents;
begin
WizardForm.FileNamelabel.Hide;
ISDoneProgressBar.Hide;
LabelPct.Hide;
LabelCurrFileName.Hide;
LabelTime1.Hide;
LabelTime2.Hide;
MyCancelButton.Hide;
end;

procedure DirEditOnChange(Sender: TObject);
begin
  Wizardform.DirEdit.text := MinimizePathName(WizardForm.DirEdit.Text,WizardForm.DirEdit.Font,WizardForm.DirEdit.Width);
end;

//=================================================================================InitializeWizard
procedure InitializeWizard();
begin
//with WizardForm do begin
//DirEdit.text := MinimizePathName(WizardForm.DirEdit.Text,WizardForm.DirEdit.Font,WizardForm.DirEdit.Width);
//ComponentsDiskSpaceLabel.Visible := false;
//BorderStyle := bsSingle;
//Center;
//end;
//WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0;
//-------
with WizardForm.DirEdit do
begin
  OnChange := @DirEditOnChange;
  WizardForm.DirEdit.Text := WizardForm.DirEdit.Text + #0; 
end;
//-------
//=================================================================================Installing
with WizardForm.StatusLabel do
begin
Parent := WizardForm.InstallingPage;
Caption := SetupMessage(msgStatusExtractFiles);
Left := ScaleY(0);
Top := ScaleY(0);
end;

LabelCurrFileName := TLabel.Create(WizardForm);
with LabelCurrFileName do begin
Parent := WizardForm.InstallingPage;
AutoSize := False;
SetBounds(0,20,360,20);
end;

ISDoneProgressBar := TNewProgressBar.Create(WizardForm);
with ISDoneProgressBar do begin
Parent := WizardForm.InstallingPage;
SetBounds(0,40,370,20);
Max := 1000;
end;

LabelPct := TLabel.Create(WizardForm);
with LabelPct do begin
Parent := WizardForm.InstallingPage;
AutoSize := true;
Left := ScaleY(377);
Top := ScaleY(41);
end;

LabelTime1 := TLabel.Create(WizardForm);
with LabelTime1 do begin
Parent := WizardForm.InstallingPage;
SetBounds(0,69,150,20);
end;

LabelTime2 := TLabel.Create(WizardForm);
with LabelTime2 do begin
Parent := WizardForm.InstallingPage;
SetBounds(244,69,150,20);
end;

LabelTime3 := TLabel.Create(WizardForm);
with LabelTime3 do begin
Parent := WizardForm.FinishedPage;
SetBounds(175,290,300,20);
end;

MyCancelButton := TButton.Create(WizardForm);
with MyCancelButton do begin
Parent := WizardForm;
SetBounds(412,327,75,23);
Caption := 'Cancelar';
OnClick := @CancelButtonOnClick;
end;
end;
//=================================================================================CurPageChanged(CurPageID)
procedure CurPageChanged(CurPageID: Integer);
begin
MyCancelButton.Visible := CurPageID = wpInstalling;

if (CurPageID = wpFinished) then
begin
WizardForm.NextButton.SetBounds(412,327,75,23);
end;

if (CurPageID = wpFinished) and ISDoneError then
begin
LabelTime3.Hide;
WizardForm.Caption:= ExpandConstant('{cm:Error}');
WizardForm.FinishedLabel.Font.Color:= clRed;
WizardForm.FinishedLabel.Caption:= SetupMessage(msgSetupAborted) ;
end;
end;
//=================================================================================CheckError
function CheckError:boolean;
begin
result := not ISDoneError;
end;
//=================================================================================CurStepChanged(CurStep)
procedure CurStepChanged(CurStep: TSetupStep);
var
path, name: String;
begin
if CurStep = ssInstall then begin
WizardForm.ProgressGauge.Hide;
WizardForm.FilenameLabel.Hide;
WizardForm.CancelButton.Hide;
ISDoneCancel:=0;

ExtractTemporaryFile('arc.ini');
ExtractTemporaryFile('unarc.dll');
ExtractTemporaryFile('zlib1.dll');
ExtractTemporaryFile('7z.exe');
ExtractTemporaryFile('7z.dll');
ExtractTemporaryFile('english.ini');
ExtractTemporaryFile('CLS-precomp.dll');
ExtractTemporaryFile('CLS-MSC.dll');
ExtractTemporaryFile('CLS-srep.dll');
ExtractTemporaryFile('facompress.dll');
ExtractTemporaryFile('facompress_mt.dll');
ExtractTemporaryFile('precomp.exe');
ExtractTemporaryFile('packjpg_dll.dll');
ExtractTemporaryFile('packjpg_dll1.dll');
ExtractTemporaryFile('srep64.exe');
ExtractTemporaryFile('pZLib.exe');
ExtractTemporaryFile('CallbackCtrl.dll');

ISDoneError:=true;
if ISDoneInit(ExpandConstant('{src}\records.inf'), $F777, 0,0,0, MainForm.Handle, 1024, @ProgressCallback) then begin
repeat
ChangeLanguage('English');
if not SrepInit('',512,0) then break;
if not PrecompInit('',128,0) then break;
if not FileSearchInit(true) then break;

//if not ISArcExtract ( 0, 100, ExpandConstant('{src}\*.bin'), ExpandConstant('{app}\'), '', false, '', ExpandConstant('{tmp}\arc.ini'), ExpandConstant('{app}\'), false) then break;
if not ISArcExtract ( 0, 100, ExpandConstant('{src}\*.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), false) then break;

ISDoneError:=false;
until true;
ISDoneStop;
end;
HideComponents;
WizardForm.CancelButton.Visible:=true;
WizardForm.CancelButton.Enabled:=false;
end;
if (CurStep=ssPostInstall) and ISDoneError then begin
Exec2(ExpandConstant('{uninstallexe}'), '/VERYSILENT', false);
end;
#ifdef FireWall
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing.exe');
name:=ExpandConstant('Van Helsing Final Cut');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64.exe');
name:=ExpandConstant('Van Helsing Final Cut_x64');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64_11.exe');
name:=ExpandConstant('Van Helsing Final Cut_x64_11');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86.exe');
name:=ExpandConstant('Van Helsing Final Cut_x86');
AddApplicationToExceptionList(path, name);
end;
if CurStep = ssPostInstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86_11.exe');
name:=ExpandConstant('Van Helsing Final Cut_x86_11');
AddApplicationToExceptionList(path, name);
#endif
end;
end;
//=================================================================================Uninstall
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
path: String;
begin
#ifdef FireWall
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x64_11.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86.exe');
RemoveApplicationFromExceptionList(path)
end;
if CurUninstallStep=usUninstall then begin
path:=ExpandConstant('{app}\VanHelsing_x86_11.exe');
RemoveApplicationFromExceptionList(path)
UnloadDll(ExpandConstant('{app}\FirewallInstallHelper.dll'));
#endif
end;
#ifdef SAVES
if CurUninstallStep = usPostUninstall then begin
if DirExists(ExpandConstant('{#SAVES}'))
then
begin
if MsgBox(ExpandConstant('{cm:del}'),mbconfirmation, mb_yesno) = IDYES then
begin
DelTree(ExpandConstant('{#SAVES}'), True, True, True);
end;
end;
end;
#endif
end;
Not resolved the same error continues "The folder name is invalid"
Reply With Quote
  #6  
Old 02-05-2019, 14:43
y_thelastknight's Avatar
y_thelastknight y_thelastknight is offline
Registered User
 
Join Date: Mar 2010
Location: Canada
Posts: 437
Thanks: 616
Thanked 576 Times in 213 Posts
y_thelastknight is on a distinguished road
Quote:
Originally Posted by ffmla View Post
I'll add direditonchange code.

copy and replace your code section with the following code.
i think this code work fine.
Attached Images
File Type: png adsad.png (25.3 KB, 69 views)
__________________
Glass BB | BlackBox v2 | Portable Installer
Reply With Quote
  #7  
Old 02-05-2019, 15:44
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
Quote:
Originally Posted by y_thelastknight View Post
i think this code work fine.
Yes I know when I click on "next" that gives the error
Attached Images
File Type: png Image.PNG (30.0 KB, 67 views)
Reply With Quote
  #8  
Old 03-05-2019, 00:18
Jiva newstone's Avatar
Jiva newstone Jiva newstone is offline
Registered User
 
Join Date: Nov 2016
Location: India
Posts: 190
Thanks: 227
Thanked 412 Times in 96 Posts
Jiva newstone is on a distinguished road
Quote:
Originally Posted by buttignol View Post
Yes I know when I click on "next" that gives the error
Try this but you can't alter or modify location in DirEdit because i created new DirEdit and hide older one and just used minimize option in new DirEdit2
try it !!!
Attached Files
File Type: 7z Script.7z (2.54 MB, 10 views)
Reply With Quote
The Following 2 Users Say Thank You to Jiva newstone For This Useful Post:
buttignol (03-05-2019), y_thelastknight (03-05-2019)
  #9  
Old 03-05-2019, 05:56
buttignol's Avatar
buttignol buttignol is offline
Registered User
 
Join Date: Sep 2012
Location: Brasil
Posts: 126
Thanks: 102
Thanked 16 Times in 13 Posts
buttignol is on a distinguished road
Quote:
Originally Posted by Jiva newstone View Post
Try this but you can't alter or modify location in DirEdit because i created new DirEdit and hide older one and just used minimize option in new DirEdit2
try it !!!
That's exactly what I wanted, thank you Jiva newstone
and to all who will help
"SOLVED"
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New Fox Kompressor 1.01c Ultimate felice2011 Conversion Tutorials 31 07-06-2023 14:58
Ultimate Conversion Compressor (UCC) vollachr Conversion Tutorials 55 26-04-2021 09:27
BF2 1.4 Crack Online Issue glenbo PC Games 58 31-07-2008 19:43
Call of Duty Error! Help pls! markishmark General Gaming 3 28-03-2006 00:26
CSI: Exe Error Monty Burns General Gaming 6 26-12-2005 02:23



All times are GMT -7. The time now is 17:22.


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