diff --git a/lazproj/coedit.lpi b/lazproj/coedit.lpi
index d2ec2ec0..f9697920 100644
--- a/lazproj/coedit.lpi
+++ b/lazproj/coedit.lpi
@@ -135,7 +135,7 @@
-
+
@@ -345,6 +345,10 @@
+
+
+
+
diff --git a/lazproj/coedit.lpr b/lazproj/coedit.lpr
index 9475f138..40090178 100644
--- a/lazproj/coedit.lpr
+++ b/lazproj/coedit.lpr
@@ -9,7 +9,7 @@ uses
Interfaces, Forms, lazcontrols, runtimetypeinfocontrols, ce_sharedres,
ce_observer, ce_libman, ce_tools, ce_dcd, ce_main, ce_writableComponent,
ce_symstring, ce_staticmacro, ce_inspectors, ce_editoroptions, ce_dockoptions,
- ce_shortcutseditor, ce_mru, ce_processes, ce_dubproject;
+ ce_shortcutseditor, ce_mru, ce_processes, ce_dubproject, ce_dialogs;
{$R *.res}
diff --git a/src/ce_common.pas b/src/ce_common.pas
index 94edc008..9e730b3b 100644
--- a/src/ce_common.pas
+++ b/src/ce_common.pas
@@ -13,11 +13,12 @@ uses
{$IFDEF LINUX}
ExtCtrls, FileUtil,
{$ENDIF}
- dialogs, forms, process, asyncprocess;
+ {$IFNDEF CEBUILD}
+ forms,
+ {$ENDIF}
+ process, asyncprocess;
const
-
- DdiagFilter = 'D source|*.d|D interface|*.di|All files|*.*';
exeExt = {$IFDEF WINDOWS} '.exe' {$ELSE} '' {$ENDIF};
objExt = {$IFDEF WINDOWS} '.obj' {$ELSE} '.o' {$ENDIF};
libExt = {$IFDEF WINDOWS} '.lib' {$ELSE} '.a' {$ENDIF};
@@ -101,21 +102,6 @@ type
*)
function stripFileExt(const aFilename: string): string;
- (**
- * Ok/Cancel modal dialog
- *)
- function dlgOkCancel(const aMsg: string): TModalResult;
-
- (**
- * Info message
- *)
- function dlgOkInfo(const aMsg: string): TModalResult;
-
- (**
- * Error message
- *)
- function dlgOkError(const aMsg: string): TModalResult;
-
(**
* Returns an unique object identifier, based on its heap address.
*)
@@ -494,27 +480,6 @@ begin
exit(aFilename);
end;
-function dlgOkCancel(const aMsg: string): TModalResult;
-const
- Btns = [mbOK,mbCancel];
-begin
- exit( MessageDlg('Coedit', aMsg, mtConfirmation, Btns, ''));
-end;
-
-function dlgOkInfo(const aMsg: string): TModalResult;
-const
- Btns = [mbOK];
-begin
- exit( MessageDlg('Coedit', aMsg, mtInformation, Btns, ''));
-end;
-
-function dlgOkError(const aMsg: string): TModalResult;
-const
- Btns = [mbOK];
-begin
- exit( MessageDlg('Coedit', aMsg, mtError, Btns, ''));
-end;
-
function uniqueObjStr(const aObject: Tobject): string;
begin
{$HINTS OFF}{$WARNINGS OFF}
@@ -753,8 +718,10 @@ begin
else
begin
env := sysutils.GetEnvironmentVariable('PATH');
+ {$IFNDEF CEBUILD}
if Application <> nil then
env += PathSeparator + ExtractFileDir(ExtractFilePath(application.ExeName));
+ {$ENDIF}
exit(ExeSearch(anExeName, env));
end;
end;
diff --git a/src/ce_dialogs.pas b/src/ce_dialogs.pas
new file mode 100644
index 00000000..cf317fdb
--- /dev/null
+++ b/src/ce_dialogs.pas
@@ -0,0 +1,55 @@
+unit ce_dialogs;
+
+{$I ce_defines.inc}
+
+interface
+
+uses
+ classes, sysutils, forms, dialogs;
+
+
+(**
+ * Ok/Cancel modal dialog
+ *)
+function dlgOkCancel(const aMsg: string): TModalResult;
+
+(**
+ * Info message
+ *)
+function dlgOkInfo(const aMsg: string): TModalResult;
+
+(**
+ * Error message
+ *)
+function dlgOkError(const aMsg: string): TModalResult;
+
+
+const
+ DdiagFilter = 'D source|*.d|D interface|*.di|All files|*.*';
+
+implementation
+
+
+function dlgOkCancel(const aMsg: string): TModalResult;
+const
+ Btns = [mbOK,mbCancel];
+begin
+ exit( MessageDlg('Coedit', aMsg, mtConfirmation, Btns, ''));
+end;
+
+function dlgOkInfo(const aMsg: string): TModalResult;
+const
+ Btns = [mbOK];
+begin
+ exit( MessageDlg('Coedit', aMsg, mtInformation, Btns, ''));
+end;
+
+function dlgOkError(const aMsg: string): TModalResult;
+const
+ Btns = [mbOK];
+begin
+ exit( MessageDlg('Coedit', aMsg, mtError, Btns, ''));
+end;
+
+end.
+
diff --git a/src/ce_editor.pas b/src/ce_editor.pas
index f67e600b..08407fc4 100644
--- a/src/ce_editor.pas
+++ b/src/ce_editor.pas
@@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, FileUtil, ExtendedNotebook, Forms, Controls, lcltype,
Graphics, SynEditKeyCmds, ComCtrls, SynEditHighlighter, ExtCtrls, Menus,
- SynMacroRecorder, SynPluginSyncroEdit, SynEdit, SynHighlighterMulti,
+ SynMacroRecorder, SynPluginSyncroEdit, SynEdit, SynHighlighterMulti, ce_dialogs,
ce_widget, ce_interfaces, ce_synmemo, ce_dlang, ce_common, ce_dcd, ce_observer;
type
diff --git a/src/ce_interfaces.pas b/src/ce_interfaces.pas
index 77d32ecb..5624ac5d 100644
--- a/src/ce_interfaces.pas
+++ b/src/ce_interfaces.pas
@@ -305,6 +305,16 @@ type
end;
+
+ (**
+ * Single service that allows objects with a short life-time
+ * to get the project information.
+ *)
+ //ICEProjectInfos = interface(ICESingleService)
+ // function getCurrentProjectInterface: ICECommonProject;
+ //end;
+
+
{
subject primitives:
diff --git a/src/ce_libman.pas b/src/ce_libman.pas
index 9da5381f..7ec5fdb4 100644
--- a/src/ce_libman.pas
+++ b/src/ce_libman.pas
@@ -5,7 +5,8 @@ unit ce_libman;
interface
uses
- Classes, SysUtils, FileUtil, ce_common, ce_writableComponent, ce_dcd;
+ Classes, SysUtils, FileUtil, ce_common, ce_writableComponent, ce_dcd,
+ ce_dialogs;
type
@@ -116,7 +117,7 @@ begin
end;
if fCol.Count = 0 then
begin
- ce_common.dlgOkError(
+ dlgOkError(
'Coedit failed to automatically add "druntime" and "phobos" to the library manager.'
+ 'These two items have to be added manually following the procedure described in the wiki.'
);
diff --git a/src/ce_libmaneditor.pas b/src/ce_libmaneditor.pas
index ab678391..57cde1dc 100644
--- a/src/ce_libmaneditor.pas
+++ b/src/ce_libmaneditor.pas
@@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, ComCtrls, Buttons, ce_widget, ce_interfaces, ce_nativeproject, ce_dmdwrap,
- ce_common;
+ ce_common, ce_dialogs;
type
diff --git a/src/ce_main.pas b/src/ce_main.pas
index 9397643e..dd539863 100644
--- a/src/ce_main.pas
+++ b/src/ce_main.pas
@@ -12,7 +12,7 @@ uses
ce_widget, ce_messages, ce_interfaces, ce_editor, ce_projinspect, ce_projconf,
ce_search, ce_miniexplorer, ce_libman, ce_libmaneditor, ce_todolist, ce_observer,
ce_toolseditor, ce_procinput, ce_optionseditor, ce_symlist, ce_mru, ce_processes,
- ce_infos, ce_dubproject;
+ ce_infos, ce_dubproject, ce_dialogs;
type
@@ -911,7 +911,7 @@ end;
procedure TCEMainForm.ApplicationProperties1Exception(Sender: TObject;E: Exception);
begin
if fMesgWidg = nil then
- ce_common.dlgOkError(E.Message)
+ dlgOkError(E.Message)
else
fMsgs.message(E.Message, nil, amcApp, amkErr);
end;
@@ -923,7 +923,7 @@ begin
canClose := false;
SaveLastDocsAndProj;
if fProjectInterface <> nil then if fProjectInterface.getIfModified then
- if ce_common.dlgOkCancel(
+ if dlgOkCancel(
'The project modifications are not saved, quit anyway ?') <> mrOK then
exit;
for i := fMultidoc.documentCount-1 downto 0 do
diff --git a/src/ce_nativeproject.pas b/src/ce_nativeproject.pas
index da161a33..eae3c383 100644
--- a/src/ce_nativeproject.pas
+++ b/src/ce_nativeproject.pas
@@ -8,6 +8,9 @@ uses
{$IFDEF DEBUG}
LclProc,
{$ENDIF}
+ {$IFNDEF CEBUILD}
+ ce_dialogs,
+ {$ENDIF}
Classes, SysUtils, process, strUtils, ce_common, ce_writableComponent,
ce_dmdwrap, ce_observer, ce_interfaces, ce_processes;
@@ -433,6 +436,7 @@ end;
procedure TCENativeProject.afterLoad;
var
hasPatched: Boolean;
+ {$IFNDEF CEBUILD}
// either all the source files have moved or only the project file
procedure checkMissingAllSources;
var
@@ -510,11 +514,13 @@ var
end;
end;
end;
+ {$ENDIF}
//
begin
patchPlateformPaths(fSrcs);
fModified := false;
hasPatched := false;
+ {$IFNDEF CEBUILD}
//
// TODO-cfeature: a modal form with the file list, green checkers and red crosses to indicate the state
// and some actions to apply to a particular selection: patch root, remove from project, replace, etc...
@@ -526,6 +532,7 @@ begin
'paths or file may still exist (-of, -od, extraSources, etc)' +
'but cannot be automatically handled. Note that the modifications have not been saved.');
end;
+ {$ENDIF}
//
updateOutFilename;
endUpdate;
diff --git a/src/ce_optionseditor.pas b/src/ce_optionseditor.pas
index 6ea2fd41..c7a2c90b 100644
--- a/src/ce_optionseditor.pas
+++ b/src/ce_optionseditor.pas
@@ -6,8 +6,8 @@ interface
uses
Classes, SysUtils, FileUtil, RTTIGrids, Forms, Controls, Graphics, ExtCtrls,
- Menus, ComCtrls, Buttons, ce_common, ce_widget, ce_interfaces,
- ce_observer, PropEdits, ObjectInspector;
+ Menus, ComCtrls, Buttons, PropEdits, ObjectInspector,
+ ce_common, ce_widget, ce_interfaces, ce_observer, ce_dialogs;
type
diff --git a/src/ce_projinspect.pas b/src/ce_projinspect.pas
index 37d35ef5..72ea900b 100644
--- a/src/ce_projinspect.pas
+++ b/src/ce_projinspect.pas
@@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, Controls, Graphics, actnlist,
Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, lcltype, ce_nativeproject, ce_interfaces,
- ce_common, ce_widget, ce_observer;
+ ce_common, ce_widget, ce_observer, ce_dialogs;
type
TCEProjectInspectWidget = class(TCEWidget, ICEProjectObserver)
diff --git a/src/ce_search.pas b/src/ce_search.pas
index 21b0d8f8..e913fcdc 100644
--- a/src/ce_search.pas
+++ b/src/ce_search.pas
@@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes,
ce_common, ce_mru, ce_widget, ce_synmemo, ce_interfaces, ce_observer,
- ce_writableComponent;
+ ce_writableComponent, ce_dialogs;
type
diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas
index 9238f953..4ae41a13 100644
--- a/src/ce_synmemo.pas
+++ b/src/ce_synmemo.pas
@@ -8,7 +8,7 @@ uses
Classes, SysUtils, controls,lcltype, Forms, graphics, ExtCtrls, crc,
SynPluginSyncroEdit, SynCompletion, SynEditKeyCmds, LazSynEditText, SynEdit,
SynHighlighterLFM, SynEditHighlighter, SynEditMouseCmds, SynEditFoldedView,
- ce_common, ce_observer, ce_writableComponent, ce_d2syn, ce_txtsyn;
+ ce_common, ce_observer, ce_writableComponent, ce_d2syn, ce_txtsyn, ce_dialogs;
type