📄 jedipackinstall.pas
字号:
InstallPackage(FJclPath, JclIdeDebugDpk);
if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeAnalyzerDpk);
if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeFavoriteDpk);
if Tool.FeatureChecked(FID_JCL_ExpertsThrNames, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeThrNamesDpk);
end;
procedure D5Install;
begin
Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name]));
// JCL
if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then
Installation.AddToLibrarySearchPath(FJclSourcePath);
if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then
AddJclHelpToDelphiHelp;
if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then
AddJclHelpToIdeTools;
if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then
Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate,
Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName,
DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm);
if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then
InstallPackage(FJclPath, JclRuntimeDpk);
if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeDebugDpk);
if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeAnalyzerDpk);
if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeFavoriteDpk);
if Tool.FeatureChecked(FID_JCL_ExpertsThrNames, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeThrNamesDpk);
// JVCL
if Tool.FeatureChecked(FID_VCL_EnvLibPath, Installation.VersionNumber) then
begin
Installation.AddToLibrarySearchPath(FVclSourcePath);
Installation.AddToLibrarySearchPath(FVclCommonPath);
end;
if Tool.FeatureChecked(FID_VCL_HelpHlp, Installation.VersionNumber) then
AddVclHelpToDelphiHelp;
if Tool.FeatureChecked(FID_VCL_HelpChm, Installation.VersionNumber) then
AddVclHelpToIdeTools;
if Tool.FeatureChecked(FID_VCL_EnvDesignPkg, Installation.VersionNumber) then
case Installation.Edition of
deSTD:
begin
InstallPackage(FVclPath, VclRuntimeDpkStd);
InstallPackage(FVclPath, VclDesignDpkStd);
end;
dePRO, deCSS:
begin
InstallPackage(FVclPath, VclRuntimeDpk);
InstallPackage(FVclPath, VclDesignDpk);
end;
end;
end;
procedure D6Install;
begin
Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name]));
// JCL
if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then
Installation.AddToLibrarySearchPath(FJclSourcePath);
if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then
AddJclHelpToDelphiHelp;
if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then
AddJclHelpToIdeTools;
if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then
Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate,
Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName,
DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm);
if Tool.FeatureChecked(FID_JCL_ExcDialogCLX, Installation.VersionNumber) then
Installation.Repository.AddObject(FClxDialogFileName, DelphiRepositoryFormTemplate,
Installation.Repository.FindPage(DialogPage, 1), ClxDialogName, FClxDialogIconFileName,
DialogDescription, DialogAuthor, DelphiRepositoryDesignerXfm);
if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then
InstallPackage(FJclPath, JclRuntimeDpk);
if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeDebugDpk);
if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeAnalyzerDpk);
if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeFavoriteDpk);
if Tool.FeatureChecked(FID_JCL_ExpertsThrNames, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeThrNamesDpk);
// JVCL
if Tool.FeatureChecked(FID_VCL_EnvLibPath, Installation.VersionNumber) then
begin
Installation.AddToLibrarySearchPath(FVclSourcePath);
Installation.AddToLibrarySearchPath(FVclCommonPath);
end;
if Tool.FeatureChecked(FID_VCL_HelpHlp, Installation.VersionNumber) then
AddVclHelpToDelphiHelp;
if Tool.FeatureChecked(FID_VCL_HelpChm, Installation.VersionNumber) then
AddVclHelpToIdeTools;
if Tool.FeatureChecked(FID_VCL_EnvDesignPkg, Installation.VersionNumber) then
case Installation.Edition of
deSTD:
begin
InstallPackage(FVclPath, VclRuntimeDpkPers);
InstallPackage(FVclPath, VclDesignDpkPers);
end;
dePRO, deCSS:
begin
InstallPackage(FVclPath, VclRuntimeDpk);
InstallPackage(FVclPath, VclDesignDpk);
end;
end;
end;
procedure D7Install;
begin
Tool.UpdateStatus(Format(RsStatusMessage, [Installation.Name]));
// JCL
if Tool.FeatureChecked(FID_JCL_EnvLibPath, Installation.VersionNumber) then
Installation.AddToLibrarySearchPath(FJclSourcePath);
if Tool.FeatureChecked(FID_JCL_HelpHlp, Installation.VersionNumber) then
AddJclHelpToDelphiHelp;
if Tool.FeatureChecked(FID_JCL_HelpChm, Installation.VersionNumber) then
AddJclHelpToIdeTools;
if Tool.FeatureChecked(FID_JCL_ExcDialogVCL, Installation.VersionNumber) then
Installation.Repository.AddObject(FVclDialogFileName, DelphiRepositoryFormTemplate,
Installation.Repository.FindPage(DialogPage, 1), VclDialogName, FVclDialogIconFileName,
DialogDescription, DialogAuthor, DelphiRepositoryDesignerDfm);
if Tool.FeatureChecked(FID_JCL_ExcDialogCLX, Installation.VersionNumber) then
Installation.Repository.AddObject(FClxDialogFileName, DelphiRepositoryFormTemplate,
Installation.Repository.FindPage(DialogPage, 1), ClxDialogName, FClxDialogIconFileName,
DialogDescription, DialogAuthor, DelphiRepositoryDesignerXfm);
if Tool.FeatureChecked(FID_JCL_Experts, Installation.VersionNumber) then
InstallPackage(FJclPath, JclRuntimeDpk);
if Tool.FeatureChecked(FID_JCL_ExpertDebug, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeDebugDpk);
if Tool.FeatureChecked(FID_JCL_ExpertAnalyzer, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeAnalyzerDpk);
if Tool.FeatureChecked(FID_JCL_ExpertFavorite, Installation.VersionNumber) then
InstallPackage(FJclPath, JclIdeFavoriteDpk);
// JVCL
if Tool.FeatureChecked(FID_VCL_EnvLibPath, Installation.VersionNumber) then
begin
Installation.AddToLibrarySearchPath(FVclSourcePath);
Installation.AddToLibrarySearchPath(FVclCommonPath);
end;
if Tool.FeatureChecked(FID_VCL_HelpHlp, Installation.VersionNumber) then
AddVclHelpToDelphiHelp;
if Tool.FeatureChecked(FID_VCL_HelpChm, Installation.VersionNumber) then
AddVclHelpToIdeTools;
if Tool.FeatureChecked(FID_VCL_EnvDesignPkg, Installation.VersionNumber) then
case Installation.Edition of
deSTD:
begin
InstallPackage(FVclPath, VclRuntimeDpkPers);
InstallPackage(FVclPath, VclDesignDpkPers);
end;
dePRO, deCSS:
begin
InstallPackage(FVclPath, VclRuntimeDpk);
InstallPackage(FVclPath, VclDesignDpk);
end;
end;
end;
begin
Result := True;
try
Installation := Tool.DelphiInstallations.InstallationFromVersion[4];
if Assigned(Installation) and Installation.Valid then
D4Install;
Installation := Tool.DelphiInstallations.InstallationFromVersion[5];
if Assigned(Installation) and Installation.Valid then
D5Install;
Installation := Tool.DelphiInstallations.InstallationFromVersion[6];
if Assigned(Installation) and Installation.Valid then
D6Install;
Installation := Tool.DelphiInstallations.InstallationFromVersion[7];
if Assigned(Installation) and Installation.Valid then
D7Install;
finally
Tool.UpdateStatus('');
end;
end;
function TJediPackInstall.PopulateTreeView(Nodes: TTreeNodes; VersionNumber: Integer; Page: TTabSheet): Boolean;
var
InstallationNode, ProductNode, TempNode: TTreeNode;
Installation: TJclDelphiInstallation;
function AddNode(Parent: TTreeNode; const Caption: string; FeatureID: Cardinal): TTreeNode;
begin
FeatureID := FeatureID or FID_Checked;
Result := Nodes.AddChildObject(Parent, Caption, Pointer(FeatureID));
Result.ImageIndex := IcoChecked;
Result.SelectedIndex := IcoChecked;
end;
begin
Installation := Tool.DelphiInstallations.InstallationFromVersion[VersionNumber];
Result := Assigned(Installation) and Installation.Valid;
Nodes.BeginUpdate;
try
if Result then
begin
InstallationNode := AddNode(nil, Installation.Name, 0);
InstallationNode.StateIndex := 0;
if Assigned(Installation) and Installation.Valid then
begin
// API Library
if DirectoryExists(FApiSourcePath) then
begin
ProductNode := AddNode(InstallationNode, RsAPI, FID_API);
TempNode := AddNode(ProductNode, RsEnvironment, FID_API_Env);
AddNode(TempNode, RsEnvLibPath, FID_API_EnvLibPath);
end;
// JCL
ProductNode := AddNode(InstallationNode, RsJCL, FID_JCL);
TempNode := AddNode(ProductNode, RsEnvironment, FID_JCL_Env);
AddNode(TempNode, RsEnvLibPath, FID_JCL_EnvLibPath);
if (FJclHlpHelpFileName <> '') or (FJclChmHelpFileName <> '') then
begin
TempNode := AddNode(ProductNode, RsHelpFiles, FID_JCL_Help);
if FJclHlpHelpFileName <> '' then
AddNode(TempNode, RsIdeHelpHlp, FID_JCL_HelpHlp);
if FJclChmHelpFileName <> '' then
AddNode(TempNode, RsIdeHelpChm, FID_JCL_HelpChm);
end;
TempNode := AddNode(ProductNode, RsJCLExceptDlg, FID_JCL_ExcDialog);
AddNode(TempNode, RsJCLDialogVCL, FID_JCL_ExcDialogVCL);
if (Installation.VersionNumber >= 6) and (Installation.Edition <> deSTD) then
AddNode(TempNode, RsJCLDialogCLX, FID_JCL_ExcDialogCLX);
TempNode := AddNode(ProductNode, RsIdeExperts, FID_JCL_Experts);
AddNode(TempNode, RsJCLIdeDebug, FID_JCL_ExpertDebug);
AddNode(TempNode, RsJCLIdeAnalyzer, FID_JCL_ExpertAnalyzer);
AddNode(TempNode, RsJCLIdeFavorite, FID_JCL_ExpertFavorite);
if Installation.VersionNumber <= 6 then
AddNode(TempNode, RsJCLIdeThrNames, FID_JCL_ExpertsThrNames);
InstallationNode.Expand(True);
// JVCL
if DirectoryExists(FVclSourcePath) and (Installation.VersionNumber >= 5) then
begin
ProductNode := AddNode(InstallationNode, RsJVCL, FID_VCL);
TempNode := AddNode(ProductNode, RsEnvironment, FID_VCL_Env);
AddNode(TempNode, RsEnvLibPath, FID_VCL_EnvLibPath);
AddNode(TempNode, RsVCLDesignPkg, FID_VCL_EnvDesignPkg);
if (FVclHlpHelpFileName <> '') or (FVclChmHelpFileName <> '') then
begin
TempNode := AddNode(ProductNode, RsHelpFiles, FID_VCL_Help);
if FVclHlpHelpFileName <> '' then
AddNode(TempNode, RsIdeHelpHlp, FID_VCL_HelpHlp);
if FVclChmHelpFileName <> '' then
AddNode(TempNode, RsIdeHelpChm, FID_VCL_HelpChm);
end;
end;
end;
InstallationNode.Expand(True);
end;
finally
Nodes.EndUpdate;
end;
end;
function TJediPackInstall.SelectedNodeCollapsing(Node: TTreeNode): Boolean;
begin
Result := False;
// Result := Cardinal(Node.Data) and FID_Category <> 0;
end;
procedure TJediPackInstall.SelectedNodeChanged(Node: TTreeNode);
var
ReadmeText: string;
begin
case Cardinal(Node.Data) and FID_Product of
FID_JCL: ReadmeText := FileToString(FJclReadmeFileName);
FID_VCL: ReadmeText := FileToString(FVclReadmeFileName);
else
ReadmeText := '';
end;
Tool.UpdateInfo(Tool.ActiveVersionNumberPage, ReadmeText);
end;
procedure TJediPackInstall.SetTool(const Value: IJediInstallTool);
begin
FTool := Value;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -