Skip to content
Browse files

* Improved JclInstaller startup time

* Added "Install selected only" checkbox" than comes in hand if the compilation failed for the last target
* Added missing lib/d20 directory structure
* Updated InnoSetup installer
  • Loading branch information...
1 parent 39e0326 commit 80c0f921149adb3c7a412e5a9210d380f20b5c19 @ahausladen ahausladen committed Apr 16, 2014
View
65 jcl/install/JclInstall.pas
@@ -307,8 +307,8 @@ TJclDistribution = class (TInterfacedObject, IJediProduct)
// IJediProduct
procedure Init;
- function Install: Boolean;
- function Uninstall: Boolean;
+ function Install(InstallPage: IJediInstallPage = nil): Boolean;
+ function Uninstall(InstallPage: IJediInstallPage = nil): Boolean;
procedure Close;
property JclPath: string read FJclPath;
@@ -3501,7 +3501,7 @@ procedure TJclDistribution.Init;
InitInstallations;
end;
-function TJclDistribution.Install: Boolean;
+function TJclDistribution.Install(InstallPage: IJediInstallPage): Boolean;
var
I: Integer;
KeepSettings: Boolean;
@@ -3538,11 +3538,14 @@ function TJclDistribution.Install: Boolean;
AInstallation := TargetInstalls[I];
if AInstallation.Enabled then
begin
- if Assigned(AInstallation.GUIPage) then
- AInstallation.GUIPage.Show;
- KeepSettings := GUI.Dialog(LoadResString(@RsKeepExpertSettings),
- dtConfirmation, [drYes, drNo]) = drYes;
- Break;
+ if (InstallPage = nil) or (AInstallation.GUIPage = InstallPage) then
+ begin
+ if Assigned(AInstallation.GUIPage) then
+ AInstallation.GUIPage.Show;
+ KeepSettings := GUI.Dialog(LoadResString(@RsKeepExpertSettings),
+ dtConfirmation, [drYes, drNo]) = drYes;
+ Break;
+ end;
end;
end;
end;
@@ -3553,27 +3556,34 @@ function TJclDistribution.Install: Boolean;
FNbInstalled := 0;
for I := 0 to TargetInstallCount - 1 do
- if TargetInstalls[I].Enabled then
- Inc(FNbEnabled);
-
- for I := 0 to TargetInstallCount - 1 do
- if GUI.DeletePreviousLogFiles then
- SysUtils.DeleteFile(TargetInstalls[I].LogFileName);
+ begin
+ AInstallation := TargetInstalls[I];
+ if (InstallPage = nil) or (AInstallation.GUIPage = InstallPage) then
+ begin
+ if AInstallation.Enabled then
+ Inc(FNbEnabled);
+ if GUI.DeletePreviousLogFiles then
+ SysUtils.DeleteFile(AInstallation.LogFileName);
+ end;
+ end;
Result := True;
for I := 0 to TargetInstallCount - 1 do
begin
AInstallation := TargetInstalls[I];
if AInstallation.Enabled then
begin
- AInstallation.Silent := False;
- if not KeepSettings then
- AInstallation.RemoveSettings;
- AInstallation.Uninstall(False);
- Result := AInstallation.Install;
- if not Result and (not Assigned(GUI) or not GUI.ContinueOnTargetError) then
- Break;
- Inc(FNbInstalled);
+ if (InstallPage = nil) or (AInstallation.GUIPage = InstallPage) then
+ begin
+ AInstallation.Silent := False;
+ if not KeepSettings then
+ AInstallation.RemoveSettings;
+ AInstallation.Uninstall(False);
+ Result := AInstallation.Install;
+ if not Result and (not Assigned(GUI) or not GUI.ContinueOnTargetError) then
+ Break;
+ Inc(FNbInstalled);
+ end;
end;
end;
@@ -3815,7 +3825,7 @@ procedure TJclDistribution.RegHelpUnregisterNameSpace(const Name: WideString);
end;
{$ENDIF MSWINDOWS}
-function TJclDistribution.Uninstall: Boolean;
+function TJclDistribution.Uninstall(InstallPage: IJediInstallPage): Boolean;
var
I: Integer;
AInstallation: TJclInstallation;
@@ -3836,9 +3846,12 @@ function TJclDistribution.Uninstall: Boolean;
for I := 0 to TargetInstallCount - 1 do
begin
AInstallation := TargetInstalls[I];
- AInstallation.Silent := False;
- if AInstallation.Enabled and ((not AInstallation.RemoveSettings) or not AInstallation.Uninstall(True)) then
- Result := False;
+ if (InstallPage = nil) or (AInstallation.GUIPage = InstallPage) then
+ begin
+ AInstallation.Silent := False;
+ if AInstallation.Enabled and ((not AInstallation.RemoveSettings) or not AInstallation.Uninstall(True)) then
+ Result := False;
+ end;
end;
{$IFDEF MSWINDOWS}
View
16 jcl/install/JediInstall.pas
@@ -224,8 +224,8 @@ TOptionRec = record
IJediProduct = interface
['{CF5BE67A-4A49-43FB-8F6E-217A51023DA4}']
procedure Init;
- function Install: Boolean;
- function Uninstall: Boolean;
+ function Install(InstallPage: IJediInstallPage = nil): Boolean;
+ function Uninstall(InstallPage: IJediInstallPage = nil): Boolean;
procedure Close;
end;
@@ -268,8 +268,8 @@ TJediInstallCore = class(TComponent)
function AddProduct(const AProduct: IJediProduct): Integer;
procedure Execute;
- function Install: Boolean;
- function Uninstall: Boolean;
+ function Install(InstallPage: IJediInstallPage): Boolean;
+ function Uninstall(InstallPage: IJediInstallPage): Boolean;
procedure Close;
function AddInstallOption(const Name: string): Integer;
function GetInstallOptionName(Id: Integer): string;
@@ -444,7 +444,7 @@ function TJediInstallCore.GetProductCount: Integer;
Result := FProducts.Size;
end;
-function TJediInstallCore.Install: Boolean;
+function TJediInstallCore.Install(InstallPage: IJediInstallPage): Boolean;
var
Index: Integer;
AInstallGUI: IJediInstallGUI;
@@ -458,7 +458,7 @@ function TJediInstallCore.Install: Boolean;
if Result then
for Index := FProducts.Size - 1 downto 0 do
begin
- Result := (FProducts.GetObject(Index) as IJediProduct).Install;
+ Result := (FProducts.GetObject(Index) as IJediProduct).Install(InstallPage);
if not Result then
Break;
end;
@@ -574,7 +574,7 @@ function TJediInstallCore.ProcessLogLine(const Line: string;
Page.AddText(Line);
end;
-function TJediInstallCore.Uninstall: Boolean;
+function TJediInstallCore.Uninstall(InstallPage: IJediInstallPage): Boolean;
var
Index: Integer;
AInstallGUI: IJediInstallGUI;
@@ -587,7 +587,7 @@ function TJediInstallCore.Uninstall: Boolean;
if Result then
for Index := FProducts.Size - 1 downto 0 do
- Result := (FProducts.GetObject(Index) as IJediProduct).Uninstall and Result;
+ Result := (FProducts.GetObject(Index) as IJediProduct).Uninstall(InstallPage) and Result;
if Assigned(AInstallGUI) then
begin
View
1 jcl/install/JediInstallResources.pas
@@ -76,6 +76,7 @@ interface
RsGUIQuit = '&Quit';
RsGUIProfiles = 'Select profiles in the list below. Note that only remote profiles logged on local computer and local profiles are available.' + NativeLineBreak +
'If a profile has not IDE settings, the JCL won''t be installed on it.';
+ RsGUIInstallSelectedOnly = 'Install &selected only';
implementation
View
22 jcl/install/VclGui/JediGUIInstall.pas
@@ -149,6 +149,7 @@ TNodeRec = record
Id: Integer;
Options: TJediInstallGUIOptions;
Hint: string;
+ Node: TTreeNode;
end;
PNodeRec = ^TNodeRec;
@@ -174,10 +175,10 @@ destructor TInstallFrame.Destroy;
Index: Integer;
begin
for Index := FNodeData.Count - 1 downto 0 do
- Dispose(FNodeData.Items[Index]);
+ Dispose(PNodeRec(FNodeData.Items[Index]));
FNodeData.Free;
for Index := FDirectories.Count - 1 downto 0 do
- Dispose(FDirectories.Items[Index]);
+ Dispose(PDirectoryRec(FDirectories.Items[Index]));
FDirectories.Free;
inherited Destroy;
@@ -325,14 +326,20 @@ procedure TInstallFrame.ToggleNodeChecked(Node: TTreeNode);
end;
function TInstallFrame.GetNode(Id: Integer): TTreeNode;
+var
+ I: Integer;
+ Data: PNodeRec;
begin
- Result := TreeView.Items.GetFirstNode;
- while Assigned(Result) do
+ for I := 0 to FNodeData.Count - 1 do
begin
- if PNodeRec(Result.Data)^.Id = Id then
- Break;
- Result := Result.GetNext;
+ Data := FNodeData[I];
+ if Data^.Id = Id then
+ begin
+ Result := Data^.Node;
+ Exit;
+ end;
end;
+ Result := nil;
end;
procedure TInstallFrame.UpdateImageIndex(N: TTreeNode);
@@ -499,6 +506,7 @@ procedure TInstallFrame.AddInstallOption(Id: Integer; Options: TJediInstallGUIOp
NodeRec^.Hint := Hint;
NodeRec^.Options := Options;
ThisNode := TreeView.Items.AddChildObject(ParentNode, Caption, NodeRec);
+ NodeRec^.Node := ThisNode;
FNodeData.Add(NodeRec);
end;
View
14 jcl/install/VclGui/JediGUIMain.dfm
@@ -56,8 +56,8 @@ object MainForm: TMainForm
Color = 9981440
TabOrder = 3
object JediImage: TImage
- Left = 582
- Top = 8
+ Left = 664
+ Top = 5
Width = 116
Height = 31
Cursor = crHandPoint
@@ -327,6 +327,7 @@ object MainForm: TMainForm
Images = ImageList
MultiLine = True
TabOrder = 4
+ OnChange = ProductsPageControlChange
end
object ProgressBar: TProgressBar
Left = 380
@@ -347,6 +348,15 @@ object MainForm: TMainForm
TabOrder = 1
OnClick = UninstallBtnClick
end
+ object InstallSelectedOnlyCheckBox: TCheckBox
+ Left = 384
+ Top = 551
+ Width = 129
+ Height = 17
+ Caption = 'RsGUIInstallSelectedOnly'
+ TabOrder = 6
+ Visible = False
+ end
object ImageList: TImageList
AllocBy = 1
Left = 32
View
47 jcl/install/VclGui/JediGUIMain.pas
@@ -58,13 +58,15 @@ TMainForm = class(TForm, IJediInstallGUI)
Bevel1: TBevel;
ProgressBar: TProgressBar;
ImageList: TImageList;
+ InstallSelectedOnlyCheckBox: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure QuitBtnClick(Sender: TObject);
procedure InstallBtnClick(Sender: TObject);
procedure UninstallBtnClick(Sender: TObject);
procedure JediImageClick(Sender: TObject);
+ procedure ProductsPageControlChange(Sender: TObject);
protected
FPages: IJclIntfList;
FAutoAcceptDialogs: TDialogTypes;
@@ -78,6 +80,9 @@ TMainForm = class(TForm, IJediInstallGUI)
FIncludeLogFilesInXML: Boolean;
FDeletePreviousLogFiles: Boolean;
FTaskBarList: ITaskbarList3;
+ FInstallPageCount: Integer;
+ procedure UpdateInstallSelectedOnlyCheckBoxVisibility;
+ function GetSelectedInstallPage: IJediInstallPage;
procedure HandleException(Sender: TObject; E: Exception);
procedure SetFrameIcon(Sender: TObject; const FileName: string);
procedure WMAfterShow(var Message: TMessage); Message WM_AFTERSHOW;
@@ -178,6 +183,7 @@ procedure TMainForm.FormCreate(Sender: TObject);
InstallBtn.Caption := LoadResString(@RsGUIInstall);
UninstallBtn.Caption := LoadResString(@RsGUIUninstall);
QuitBtn.Caption := LoadResString(@RsGUIQuit);
+ InstallSelectedOnlyCheckBox.Caption := LoadResString(@RsGUIInstallSelectedOnly);
JediImage.Hint := DelphiJediURL;
@@ -203,6 +209,11 @@ procedure TMainForm.FormShow(Sender: TObject);
PostMessage(Handle, WM_AFTERSHOW, 0, 0);
end;
+procedure TMainForm.UpdateInstallSelectedOnlyCheckBoxVisibility;
+begin
+ InstallSelectedOnlyCheckBox.Visible := (FInstallPageCount > 1) and (GetSelectedInstallPage <> nil);
+end;
+
procedure TMainForm.ShowFeatureHint(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);
var
ATabSheet: TTabSheet;
@@ -263,18 +274,25 @@ procedure TMainForm.QuitBtnClick(Sender: TObject);
procedure TMainForm.InstallBtnClick(Sender: TObject);
var
Success: Boolean;
+ InstallPage: IJediInstallPage;
begin
+ InstallPage := nil;
+ if InstallSelectedOnlyCheckBox.Visible and InstallSelectedOnlyCheckBox.Checked then
+ InstallPage := GetSelectedInstallPage;
+
ProgressBar.Position := 0;
ProgressBar.Visible := True;
+ InstallSelectedOnlyCheckBox.Visible := False;
Screen.Cursor := crHourGlass;
try
if Assigned(FTaskBarList) then
FTaskBarList.SetProgressState(Self.Handle, TBPF_NORMAL);
- Success := InstallCore.Install;
+ Success := InstallCore.Install(InstallPage);
if (Success and FAutoCloseOnSuccess) or (not Success and FAutoCloseOnFailure) then
Close;
finally
ProgressBar.Visible := False;
+ UpdateInstallSelectedOnlyCheckBoxVisibility;
Screen.Cursor := crDefault;
if Assigned(FTaskBarList) then
FTaskBarList.SetProgressState(Self.Handle, TBPF_NOPROGRESS);
@@ -285,19 +303,26 @@ procedure TMainForm.InstallBtnClick(Sender: TObject);
procedure TMainForm.UninstallBtnClick(Sender: TObject);
var
Success: Boolean;
+ InstallPage: IJediInstallPage;
begin
+ InstallPage := nil;
+ if InstallSelectedOnlyCheckBox.Visible and InstallSelectedOnlyCheckBox.Checked then
+ InstallPage := GetSelectedInstallPage;
+
ProgressBar.Position := 0;
ProgressBar.Visible := True;
+ InstallSelectedOnlyCheckBox.Visible := False;
Screen.Cursor := crHourGlass;
try
if Assigned(FTaskBarList) then
FTaskBarList.SetProgressState(Self.Handle, TBPF_NORMAL);
- Success := InstallCore.Uninstall;
+ Success := InstallCore.Uninstall(InstallPage);
if (Success and FAutoCloseOnSuccess) or (not Success and FAutoCloseOnFailure) then
Close;
finally
ProgressBar.Visible := False;
+ UpdateInstallSelectedOnlyCheckBoxVisibility;
Screen.Cursor := crDefault;
if Assigned(FTaskBarList) then
FTaskBarList.SetProgressState(Self.Handle, TBPF_NOPROGRESS);
@@ -320,6 +345,11 @@ procedure TMainForm.JediImageClick(Sender: TObject);
ShellExecEx(DelphiJediURL);
end;
+procedure TMainForm.ProductsPageControlChange(Sender: TObject);
+begin
+ UpdateInstallSelectedOnlyCheckBoxVisibility;
+end;
+
procedure TMainForm.HandleException(Sender: TObject; E: Exception);
begin
if E is EJediInstallInitFailure then
@@ -403,6 +433,8 @@ function TMainForm.CreateInstallPage: IJediInstallPage;
AInstallFrame: TInstallFrame;
ATabSheet: TTabSheet;
begin
+ Inc(FInstallPageCount);
+
ATabSheet := TTabSheet.Create(Self);
ATabSheet.PageControl := ProductsPageControl;
ATabSheet.ImageIndex := -1;
@@ -436,6 +468,17 @@ function TMainForm.CreateProfilesPage: IJediProfilesPage;
FPages.Add(Result);
end;
+function TMainForm.GetSelectedInstallPage: IJediInstallPage;
+var
+ Tab: TTabSheet;
+begin
+ Tab := ProductsPageControl.ActivePage;
+ if (Tab <> nil) and (Tab.ControlCount > 0) and (Tab.Controls[0] is TInstallFrame) then
+ Result := TInstallFrame(Tab.Controls[0])
+ else
+ Result := nil;
+end;
+
function TMainForm.GetPageCount: Integer;
begin
Result := FPages.Size;
View
1 jcl/lib/d20/win32/debug/dirinfo.txt
@@ -0,0 +1 @@
+This directory is intended as a common place for debug .dcu files of Delphi 20 Win32 packages.
View
1 jcl/lib/d20/win32/dirinfo.txt
@@ -0,0 +1 @@
+This directory is intended as a common place for .dcu files of Delphi 20 Win32 packages.
View
1 jcl/lib/d20/win64/debug/dirinfo.txt
@@ -0,0 +1 @@
+This directory is intended as a common place for debug .dcu files of Delphi 20 Win64 packages.
View
1 jcl/lib/d20/win64/dirinfo.txt
@@ -0,0 +1 @@
+This directory is intended as a common place for .dcu files of Delphi 20 Win64 packages.
View
BIN thirdparty/InnoSetup/CompInstall.dll
Binary file not shown.
View
3 thirdparty/InnoSetup/IdeComponents.iss
@@ -40,3 +40,6 @@ Name: "IDE\Delphi18"; Description: "Install for RAD Studio XE4"; Types: full pre
#ifdef Include_Delphi19
Name: "IDE\Delphi19"; Description: "Install for RAD Studio XE5"; Types: full prefered; Check: IsDelphiInstalled(19)
#endif
+#ifdef Include_Delphi20
+Name: "IDE\Delphi20"; Description: "Install for RAD Studio XE6"; Types: full prefered; Check: IsDelphiInstalled(20)
+#endif
View
25 thirdparty/InnoSetup/Install.iss
@@ -61,6 +61,9 @@
#define JclLib19 JclLib
#define JclBpl19 JclBpl
#define JclHpp19 JclHpp
+#define JclLib20 JclLib
+#define JclBpl20 JclBpl
+#define JclHpp20 JclHpp
#endif
;---------------------------------------------------
@@ -228,6 +231,13 @@ Source: {#JclBpl19}\*; DestDir: "{code:GetDelphiBplDir|19}"; Components: "IDE\De
Source: {#JclBpl19}\Win64\*; DestDir: "{code:GetDelphiBplDir|19}\Win64"; Components: "IDE\Delphi19"; Flags: ignoreversion sortfilesbyextension
Source: {#JclHpp19}\*; DestDir: "{app}\include\d19"; Components: "IDE\Delphi19"; Flags: ignoreversion sortfilesbyextension
#endif
+#ifdef Include_Delphi20
+; SolidBreak;
+Source: {#JclLib20}\*; DestDir: "{app}\lib\d20"; Excludes: ".svn,__history,*.txt,*.hpp"; Components: "IDE\Delphi20"; Flags: ignoreversion recursesubdirs sortfilesbyextension createallsubdirs solidbreak
+Source: {#JclBpl20}\*; DestDir: "{code:GetDelphiBplDir|20}"; Components: "IDE\Delphi20"; Flags: ignoreversion sortfilesbyextension
+Source: {#JclBpl20}\Win64\*; DestDir: "{code:GetDelphiBplDir|20}\Win64"; Components: "IDE\Delphi20"; Flags: ignoreversion sortfilesbyextension
+;Source: {#JclHpp20}\*; DestDir: "{app}\include\d20"; Components: "IDE\Delphi20"; Flags: ignoreversion sortfilesbyextension
+#endif
#endif
@@ -329,6 +339,14 @@ Root: HKCU; Subkey: "{code:GetDelphiRegKey|19}\Jedi\JCL"; ValueType: string; Val
Root: HKCU; Subkey: "{code:GetDelphiRegKey|19}\Jedi\JCL"; ValueType: string; ValueName: "Version"; ValueData: {#JclVersionStr}; Components: "IDE\Delphi19"; Flags: uninsdeletevalue;
Root: HKCU; Subkey: "{code:GetDelphiRegKey|19}\Globals"; ValueType: string; ValueName: "ForceEnvOptionsUpdate"; ValueData: "1"; Components: "IDE\Delphi19";
#endif
+#ifdef Include_Delphi20
+; Delphi XE6
+Root: HKCU; Subkey: "{code:GetDelphiRegKey|20}\Jedi\JCL"; ValueType: string; ValueName: "BplDir"; ValueData: {code:GetDelphiBplDir|20}; Components: "IDE\Delphi20"; Flags: uninsdeletevalue;
+Root: HKCU; Subkey: "{code:GetDelphiRegKey|20}\Jedi\JCL"; ValueType: string; ValueName: "DcpDir"; ValueData: {app}\lib\d20; Components: "IDE\Delphi20"; Flags: uninsdeletevalue;
+Root: HKCU; Subkey: "{code:GetDelphiRegKey|20}\Jedi\JCL"; ValueType: string; ValueName: "RootDir"; ValueData: {app}; Components: "IDE\Delphi20"; Flags: uninsdeletevalue;
+Root: HKCU; Subkey: "{code:GetDelphiRegKey|20}\Jedi\JCL"; ValueType: string; ValueName: "Version"; ValueData: {#JclVersionStr}; Components: "IDE\Delphi20"; Flags: uninsdeletevalue;
+Root: HKCU; Subkey: "{code:GetDelphiRegKey|20}\Globals"; ValueType: string; ValueName: "ForceEnvOptionsUpdate"; ValueData: "1"; Components: "IDE\Delphi20";
+#endif
#endif
@@ -410,6 +428,13 @@ Type: files; Name: "{app}\lib\d19\win64\*"
Type: files; Name: "{app}\lib\d19\win64\debug\*"
Type: files; Name: "{app}\include\d19\*"
Type: files; Name: "{code:GetDelphiBplDir|19}\Jcl*.~bpl";
+; lib\Delphi/C++Builder XE6
+Type: files; Name: "{app}\lib\d20\win32\*"
+Type: files; Name: "{app}\lib\d20\win32\debug\*"
+Type: files; Name: "{app}\lib\d20\win64\*"
+Type: files; Name: "{app}\lib\d20\win64\debug\*"
+Type: files; Name: "{app}\include\d20\*"
+Type: files; Name: "{code:GetDelphiBplDir|20}\Jcl*.~bpl";
[Icons]
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"

0 comments on commit 80c0f92

Please sign in to comment.
Something went wrong with that request. Please try again.