diff --git a/Includer/Includer.ico b/Includer/Includer.ico
new file mode 100644
index 00000000..0341321b
Binary files /dev/null and b/Includer/Includer.ico differ
diff --git a/Includer/Includer.lpi b/Includer/Includer.lpi
new file mode 100644
index 00000000..fe85cd0c
--- /dev/null
+++ b/Includer/Includer.lpi
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Includer/Includer.lpr b/Includer/Includer.lpr
new file mode 100644
index 00000000..f15152eb
--- /dev/null
+++ b/Includer/Includer.lpr
@@ -0,0 +1,21 @@
+program Includer;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Interfaces, // this includes the LCL widgetset
+ Forms, Unit1
+ { you can add units after this };
+
+{$R *.res}
+
+begin
+ RequireDerivedFormResource:=True;
+ Application.Initialize;
+ Application.CreateForm(TForm1, Form1);
+ Application.Run;
+end.
+
diff --git a/Includer/Includer.lps b/Includer/Includer.lps
new file mode 100644
index 00000000..ca99623a
--- /dev/null
+++ b/Includer/Includer.lps
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Includer/Includer.res b/Includer/Includer.res
new file mode 100644
index 00000000..4ff746d8
Binary files /dev/null and b/Includer/Includer.res differ
diff --git a/Includer/backup/Includer.lpi.bak b/Includer/backup/Includer.lpi.bak
new file mode 100644
index 00000000..32eb63f5
--- /dev/null
+++ b/Includer/backup/Includer.lpi.bak
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Includer/backup/Includer.lps.bak b/Includer/backup/Includer.lps.bak
new file mode 100644
index 00000000..967d835c
--- /dev/null
+++ b/Includer/backup/Includer.lps.bak
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Includer/backup/unit1.lfm.bak b/Includer/backup/unit1.lfm.bak
new file mode 100644
index 00000000..07cb72d3
--- /dev/null
+++ b/Includer/backup/unit1.lfm.bak
@@ -0,0 +1,40 @@
+object Form1: TForm1
+ Left = 287
+ Height = 663
+ Top = 233
+ Width = 666
+ Caption = 'Form1'
+ ClientHeight = 663
+ ClientWidth = 666
+ LCLVersion = '1.6.4.0'
+ object IncludeButton: TButton
+ Left = 536
+ Height = 25
+ Top = 56
+ Width = 107
+ Caption = 'Resolve Include'
+ OnClick = IncludeButtonClick
+ TabOrder = 0
+ end
+ object Memo1: TMemo
+ Left = 16
+ Height = 608
+ Top = 8
+ Width = 520
+ Font.CharSet = ANSI_CHARSET
+ Font.Height = -11
+ Font.Name = 'Courier New'
+ Font.Pitch = fpFixed
+ Font.Quality = fqDraft
+ Lines.Strings = (
+ 'Memo1'
+ )
+ ParentFont = False
+ TabOrder = 1
+ end
+ object OpenDialog1: TOpenDialog
+ Filter = 'CL sources|*.cl'
+ left = 576
+ top = 8
+ end
+end
diff --git a/Includer/backup/unit1.pas.bak b/Includer/backup/unit1.pas.bak
new file mode 100644
index 00000000..286f5030
--- /dev/null
+++ b/Includer/backup/unit1.pas.bak
@@ -0,0 +1,93 @@
+unit Unit1;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
+
+type
+
+ { TForm1 }
+
+ TForm1 = class(TForm)
+ IncludeButton: TButton;
+ Memo1: TMemo;
+ OpenDialog1: TOpenDialog;
+ procedure IncludeButtonClick(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.lfm}
+
+{ TForm1 }
+
+
+function FindInclude(var TxtList:TStringList): integer;
+var
+ i:integer;
+begin
+ Result:=-1;
+ for i:=0 to TxtList.Count-1 do
+ begin
+ if ( Pos('#include',TxtList.Strings[i]) >=1) then
+ begin
+ Result:=i; break;
+ end;
+ end;
+ end;
+
+function ExtractString( Line:string):string;
+begin
+ Line:= Copy(Line,Pos('"',Line)+1,1024);
+ Line:= Copy(Line,1,Pos('"',Line)-1);
+ result:=Line;
+end;
+
+procedure TForm1.IncludeButtonClick(Sender: TObject);
+var Orig,Header:TStringList;
+ p1,p2,processed,idx,num : integer;
+ FileToLoad: String;
+
+begin
+ Header:=TStringList.Create;
+ processed := 0;
+ if (OpenDialog1.Execute) then
+ begin
+ Orig := TStringList.Create;
+ Orig.LoadFromFile(OpenDialog1.FileName);
+ Orig.SaveToFile(OpenDialog1.FileName+'.bak');
+ while (true) do
+ begin
+ idx := FindInclude(Orig);
+ if (idx=-1) then
+ break;
+ FileToLoad := ExtractFileDir(OpenDialog1.FileName) + '\' +ExtractString(Orig.Strings[idx]);
+ if (FileExists(FileToLoad)) then
+ begin
+ Header.LoadFromFile(FileToLoad);
+ Orig.Delete(idx);
+ inc(Processed);
+ for num:=0 to Header.Count-1 do
+ begin
+ Orig.Insert(Idx+num,Header.Strings[num]);
+
+ end
+ end
+ end;
+ end;
+ Memo1.Text := Orig.Text;
+ //Orig.SaveToFile(OpenDialog1.FileName);
+end;
+
+end.
+
diff --git a/Includer/lib/x86_64-win64/Includer.compiled b/Includer/lib/x86_64-win64/Includer.compiled
new file mode 100644
index 00000000..44feddc2
--- /dev/null
+++ b/Includer/lib/x86_64-win64/Includer.compiled
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/Includer/lib/x86_64-win64/Includer.obj b/Includer/lib/x86_64-win64/Includer.obj
new file mode 100644
index 00000000..c6e7bfe3
Binary files /dev/null and b/Includer/lib/x86_64-win64/Includer.obj differ
diff --git a/Includer/lib/x86_64-win64/Includer.res b/Includer/lib/x86_64-win64/Includer.res
new file mode 100644
index 00000000..4ff746d8
Binary files /dev/null and b/Includer/lib/x86_64-win64/Includer.res differ
diff --git a/Includer/lib/x86_64-win64/unit1.lfm b/Includer/lib/x86_64-win64/unit1.lfm
new file mode 100644
index 00000000..07cb72d3
--- /dev/null
+++ b/Includer/lib/x86_64-win64/unit1.lfm
@@ -0,0 +1,40 @@
+object Form1: TForm1
+ Left = 287
+ Height = 663
+ Top = 233
+ Width = 666
+ Caption = 'Form1'
+ ClientHeight = 663
+ ClientWidth = 666
+ LCLVersion = '1.6.4.0'
+ object IncludeButton: TButton
+ Left = 536
+ Height = 25
+ Top = 56
+ Width = 107
+ Caption = 'Resolve Include'
+ OnClick = IncludeButtonClick
+ TabOrder = 0
+ end
+ object Memo1: TMemo
+ Left = 16
+ Height = 608
+ Top = 8
+ Width = 520
+ Font.CharSet = ANSI_CHARSET
+ Font.Height = -11
+ Font.Name = 'Courier New'
+ Font.Pitch = fpFixed
+ Font.Quality = fqDraft
+ Lines.Strings = (
+ 'Memo1'
+ )
+ ParentFont = False
+ TabOrder = 1
+ end
+ object OpenDialog1: TOpenDialog
+ Filter = 'CL sources|*.cl'
+ left = 576
+ top = 8
+ end
+end
diff --git a/Includer/lib/x86_64-win64/unit1.ppu b/Includer/lib/x86_64-win64/unit1.ppu
new file mode 100644
index 00000000..849d8de5
Binary files /dev/null and b/Includer/lib/x86_64-win64/unit1.ppu differ
diff --git a/Includer/unit1.lfm b/Includer/unit1.lfm
new file mode 100644
index 00000000..07cb72d3
--- /dev/null
+++ b/Includer/unit1.lfm
@@ -0,0 +1,40 @@
+object Form1: TForm1
+ Left = 287
+ Height = 663
+ Top = 233
+ Width = 666
+ Caption = 'Form1'
+ ClientHeight = 663
+ ClientWidth = 666
+ LCLVersion = '1.6.4.0'
+ object IncludeButton: TButton
+ Left = 536
+ Height = 25
+ Top = 56
+ Width = 107
+ Caption = 'Resolve Include'
+ OnClick = IncludeButtonClick
+ TabOrder = 0
+ end
+ object Memo1: TMemo
+ Left = 16
+ Height = 608
+ Top = 8
+ Width = 520
+ Font.CharSet = ANSI_CHARSET
+ Font.Height = -11
+ Font.Name = 'Courier New'
+ Font.Pitch = fpFixed
+ Font.Quality = fqDraft
+ Lines.Strings = (
+ 'Memo1'
+ )
+ ParentFont = False
+ TabOrder = 1
+ end
+ object OpenDialog1: TOpenDialog
+ Filter = 'CL sources|*.cl'
+ left = 576
+ top = 8
+ end
+end
diff --git a/Includer/unit1.pas b/Includer/unit1.pas
new file mode 100644
index 00000000..0204488b
--- /dev/null
+++ b/Includer/unit1.pas
@@ -0,0 +1,93 @@
+unit Unit1;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+ Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
+
+type
+
+ { TForm1 }
+
+ TForm1 = class(TForm)
+ IncludeButton: TButton;
+ Memo1: TMemo;
+ OpenDialog1: TOpenDialog;
+ procedure IncludeButtonClick(Sender: TObject);
+ private
+ { private declarations }
+ public
+ { public declarations }
+ end;
+
+var
+ Form1: TForm1;
+
+implementation
+
+{$R *.lfm}
+
+{ TForm1 }
+
+
+function FindInclude(var TxtList:TStringList): integer;
+var
+ i:integer;
+begin
+ Result:=-1;
+ for i:=0 to TxtList.Count-1 do
+ begin
+ if ( Pos('#include',TxtList.Strings[i]) >=1) then
+ begin
+ Result:=i; break;
+ end;
+ end;
+ end;
+
+function ExtractString( Line:string):string;
+begin
+ Line:= Copy(Line,Pos('"',Line)+1,1024);
+ Line:= Copy(Line,1,Pos('"',Line)-1);
+ result:=Line;
+end;
+
+procedure TForm1.IncludeButtonClick(Sender: TObject);
+var Orig,Header:TStringList;
+ p1,p2,processed,idx,num : integer;
+ FileToLoad: String;
+
+begin
+ Header:=TStringList.Create;
+ processed := 0;
+ if (OpenDialog1.Execute) then
+ begin
+ Orig := TStringList.Create;
+ Orig.LoadFromFile(OpenDialog1.FileName);
+ Orig.SaveToFile(OpenDialog1.FileName+'.bak');
+ while (true) do
+ begin
+ idx := FindInclude(Orig);
+ if (idx=-1) then
+ break;
+ FileToLoad := ExtractFileDir(OpenDialog1.FileName) + '\' +ExtractString(Orig.Strings[idx]);
+ if (FileExists(FileToLoad)) then
+ begin
+ Header.LoadFromFile(FileToLoad);
+ Orig.Delete(idx);
+ inc(Processed);
+ for num:=0 to Header.Count-1 do
+ begin
+ Orig.Insert(Idx+num,Header.Strings[num]);
+
+ end
+ end
+ end;
+ end;
+ Memo1.Text := Orig.Text;
+ Orig.SaveToFile(OpenDialog1.FileName);
+end;
+
+end.
+