Skip to content

Commit a019189

Browse files
Merge branch 'release/1.0.0'
2 parents 7579140 + 097e553 commit a019189

7 files changed

+1019
-10
lines changed

BossExperts.dpk

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package BossExperts;
2+
3+
{$R *.res}
4+
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
5+
{$ALIGN 8}
6+
{$ASSERTIONS ON}
7+
{$BOOLEVAL OFF}
8+
{$DEBUGINFO OFF}
9+
{$EXTENDEDSYNTAX ON}
10+
{$IMPORTEDDATA ON}
11+
{$IOCHECKS ON}
12+
{$LOCALSYMBOLS OFF}
13+
{$LONGSTRINGS ON}
14+
{$OPENSTRINGS ON}
15+
{$OPTIMIZATION ON}
16+
{$OVERFLOWCHECKS OFF}
17+
{$RANGECHECKS OFF}
18+
{$REFERENCEINFO OFF}
19+
{$SAFEDIVIDE OFF}
20+
{$STACKFRAMES OFF}
21+
{$TYPEDADDRESS OFF}
22+
{$VARSTRINGCHECKS ON}
23+
{$WRITEABLECONST OFF}
24+
{$MINENUMSIZE 1}
25+
{$IMAGEBASE $400000}
26+
{$DEFINE RELEASE}
27+
{$ENDIF IMPLICITBUILDING}
28+
{$DESCRIPTION 'Boss Experts'}
29+
{$IMPLICITBUILD ON}
30+
31+
requires
32+
rtl,
33+
designide;
34+
35+
contains
36+
dpipes in 'Source\Third\dpipes.pas',
37+
dprocess in 'Source\Third\dprocess.pas',
38+
BE.Wizard.Forms in 'Source\IDE\BE.Wizard.Forms.pas' {BEWizardForms},
39+
BE.Commands.Interfaces in 'Source\Core\BE.Commands.Interfaces.pas',
40+
BE.Commands.ProcessDelphi in 'Source\Core\BE.Commands.ProcessDelphi.pas',
41+
BE.ContextMenu in 'Source\IDE\BE.ContextMenu.pas',
42+
BE.Registry in 'Source\IDE\BE.Registry.pas',
43+
BE.Constants in 'Source\Core\BE.Constants.pas',
44+
BE.Model in 'Source\Core\BE.Model.pas',
45+
BE.Helpers.Json in 'Source\Helpers\BE.Helpers.Json.pas';
46+
47+
end.

BossExperts.dproj

+959
Large diffs are not rendered by default.

BossExperts.res

652 Bytes
Binary file not shown.

Source/Core/BE.Commands.Interfaces.pas

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ interface
2222

2323
function Uninstall(AComplete: TProc = nil): IBECommands; overload;
2424
function Uninstall(ADependency: TBEModelDependency; AComplete: TProc = nil): IBECommands; overload;
25+
26+
function BossInstalled: Boolean;
2527
end;
2628

2729
function CreateBossCommand(Path: String): IBECommands;

Source/Core/BE.Commands.ProcessDelphi.pas

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ interface
66
dprocess,
77
BE.Model,
88
BE.Commands.Interfaces,
9+
BE.Constants,
910
{$IF CompilerVersion > 26.0}
1011
System.Threading,
1112
{$ENDIF}
@@ -35,6 +36,7 @@ type TBECommandsProcessDelphi = class(TInterfacedObject, IBECommands)
3536
function Uninstall(AComplete: TProc = nil): IBECommands; overload;
3637
function Uninstall(ADependency: TBEModelDependency; AComplete: TProc = nil): IBECommands; overload;
3738

39+
function BossInstalled: Boolean;
3840
public
3941
constructor create(Path: string);
4042
class function New(Path: string): IBECommands;
@@ -50,6 +52,11 @@ function TBECommandsProcessDelphi.AsyncMode(Value: Boolean): IBECommands;
5052
FAsyncMode := Value;
5153
end;
5254

55+
function TBECommandsProcessDelphi.BossInstalled: Boolean;
56+
begin
57+
result := FileExists(FPath + BOSS_JSON);
58+
end;
59+
5360
constructor TBECommandsProcessDelphi.create(Path: string);
5461
begin
5562
FPath := Path;

Source/IDE/BE.ContextMenu.pas

+3-9
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ TBEContextMenu = class(TNotifierObject, IOTALocalMenu, IOTAProjectManagerMenu)
4141

4242
procedure DoRefreshProject;
4343

44-
function BossInstalled: Boolean;
4544
procedure VerifyBoss;
4645

4746
function GetCaption: string;
@@ -177,11 +176,6 @@ constructor TBEContextMenuBoss.create(Project: IOTAProject);
177176

178177
{ TBEContextMenu }
179178

180-
function TBEContextMenu.BossInstalled: Boolean;
181-
begin
182-
result := FileExists(ExtractFilePath(FProject.FileName) + BOSS_JSON);
183-
end;
184-
185179
constructor TBEContextMenu.create(Project: IOTAProject);
186180
begin
187181
FProject := Project;
@@ -307,7 +301,7 @@ procedure TBEContextMenu.SetVerb(const Value: string);
307301

308302
procedure TBEContextMenu.VerifyBoss;
309303
begin
310-
if not BossInstalled then
304+
if not FBossCommand.BossInstalled then
311305
raise Exception.Create('Boss is not installed. Use Boss Init...');
312306
end;
313307

@@ -338,12 +332,12 @@ constructor TBEContextMenuBossInit.create(Project: IOTAProject);
338332
FVerb := BOSS_INIT_VERB;
339333
FParent := BOSS_VERB;
340334

341-
FChecked := BossInstalled;
335+
FChecked := FBossCommand.BossInstalled;
342336
end;
343337

344338
procedure TBEContextMenuBossInit.Execute(const MenuContextList: IInterfaceList);
345339
begin
346-
if BossInstalled then
340+
if FBossCommand.BossInstalled then
347341
raise Exception.CreateFmt('Boss already installed.', []);
348342
FBossCommand.Init;
349343
end;

boss.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "",
66
"mainsrc": "Source",
77
"projects": [
8-
"Source/BossExperts.dproj"
8+
"BossExperts.dproj"
99
],
1010
"dependencies": {}
1111
}

0 commit comments

Comments
 (0)