summaryrefslogtreecommitdiff
path: root/bindings/bcppmake
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:59 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:59 -0400
commit03134fa5f6f25d92724ce4c183f9bbe12a9e37dc (patch)
tree847326a4de82f0241ac87cbbc427a1b92a696a02 /bindings/bcppmake
parentd7469385b05b9510338407fa123e9ad090f80af6 (diff)
Imported Upstream version 1.5.11
Diffstat (limited to 'bindings/bcppmake')
-rw-r--r--bindings/bcppmake/MainCLXTest.cpp16
-rw-r--r--bindings/bcppmake/MainCLXTest.dfm16
-rw-r--r--bindings/bcppmake/MainCLXTest.h21
-rw-r--r--bindings/bcppmake/MainTest.cpp37
-rw-r--r--bindings/bcppmake/MainTest.dfm36
-rw-r--r--bindings/bcppmake/MainTest.h25
-rw-r--r--bindings/bcppmake/Makefile.am16
-rw-r--r--bindings/bcppmake/clxtest.bpr93
-rw-r--r--bindings/bcppmake/clxtest.cpp24
-rw-r--r--bindings/bcppmake/sword.bpf11
-rw-r--r--bindings/bcppmake/sword.bpr111
-rw-r--r--bindings/bcppmake/sword.c31
-rw-r--r--bindings/bcppmake/sworddll.bpg33
-rw-r--r--bindings/bcppmake/test.cpp23
14 files changed, 493 insertions, 0 deletions
diff --git a/bindings/bcppmake/MainCLXTest.cpp b/bindings/bcppmake/MainCLXTest.cpp
new file mode 100644
index 0000000..b82658a
--- /dev/null
+++ b/bindings/bcppmake/MainCLXTest.cpp
@@ -0,0 +1,16 @@
+//---------------------------------------------------------------------------
+
+#include <vcl.h>
+#pragma hdrstop
+
+#include "MainCLXTest.h"
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+TForm2 *Form2;
+//---------------------------------------------------------------------------
+__fastcall TForm2::TForm2(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
diff --git a/bindings/bcppmake/MainCLXTest.dfm b/bindings/bcppmake/MainCLXTest.dfm
new file mode 100644
index 0000000..3d5e63c
--- /dev/null
+++ b/bindings/bcppmake/MainCLXTest.dfm
@@ -0,0 +1,16 @@
+object Form2: TForm2
+ Left = 346
+ Top = 107
+ Width = 870
+ Height = 600
+ Caption = 'Form2'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ PixelsPerInch = 96
+ TextHeight = 13
+end
diff --git a/bindings/bcppmake/MainCLXTest.h b/bindings/bcppmake/MainCLXTest.h
new file mode 100644
index 0000000..fbb0f72
--- /dev/null
+++ b/bindings/bcppmake/MainCLXTest.h
@@ -0,0 +1,21 @@
+//---------------------------------------------------------------------------
+
+#ifndef MainCLXTestH
+#define MainCLXTestH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+//---------------------------------------------------------------------------
+class TForm2 : public TForm
+{
+__published: // IDE-managed Components
+private: // User declarations
+public: // User declarations
+ __fastcall TForm2(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TForm2 *Form2;
+//---------------------------------------------------------------------------
+#endif
diff --git a/bindings/bcppmake/MainTest.cpp b/bindings/bcppmake/MainTest.cpp
new file mode 100644
index 0000000..46c0b65
--- /dev/null
+++ b/bindings/bcppmake/MainTest.cpp
@@ -0,0 +1,37 @@
+//---------------------------------------------------------------------------
+
+#include <vcl.h>
+#pragma hdrstop
+
+#include "MainTest.h"
+extern "C" {
+#include <flatapi.h>
+}
+//using namespace sword;
+//---------------------------------------------------------------------------
+#pragma package(smart_init)
+#pragma resource "*.dfm"
+TForm1 *Form1;
+//---------------------------------------------------------------------------
+__fastcall TForm1::TForm1(TComponent* Owner)
+ : TForm(Owner)
+{
+}
+//---------------------------------------------------------------------------
+void __fastcall TForm1::FormShow(TObject *Sender)
+{
+ SWHANDLE mgr = SWMgr_new();
+ SWHANDLE it = SWMgr_getModulesIterator(mgr);
+ SWHANDLE module = 0;
+ String modlist;
+ do {
+ module = ModList_iterator_val(it);
+ if (module) {
+ modlist += SWModule_getName(module) + (String)"\r\n";
+ ModList_iterator_next(it);
+ }
+ } while (module);
+ Memo1->Text = modlist;
+ SWMgr_delete(mgr);
+}
+//---------------------------------------------------------------------------
diff --git a/bindings/bcppmake/MainTest.dfm b/bindings/bcppmake/MainTest.dfm
new file mode 100644
index 0000000..ffb3c5a
--- /dev/null
+++ b/bindings/bcppmake/MainTest.dfm
@@ -0,0 +1,36 @@
+object Form1: TForm1
+ Left = 346
+ Top = 234
+ Width = 446
+ Height = 265
+ Caption = 'Form1'
+ Color = clBtnFace
+ Font.Charset = DEFAULT_CHARSET
+ Font.Color = clWindowText
+ Font.Height = -11
+ Font.Name = 'MS Sans Serif'
+ Font.Style = []
+ OldCreateOrder = False
+ OnShow = FormShow
+ PixelsPerInch = 96
+ TextHeight = 13
+ object Memo1: TMemo
+ Left = 0
+ Top = 0
+ Width = 438
+ Height = 197
+ Align = alClient
+ Lines.Strings = (
+ 'Memo1')
+ TabOrder = 0
+ end
+ object Panel1: TPanel
+ Left = 0
+ Top = 197
+ Width = 438
+ Height = 41
+ Align = alBottom
+ Caption = 'Panel1'
+ TabOrder = 1
+ end
+end
diff --git a/bindings/bcppmake/MainTest.h b/bindings/bcppmake/MainTest.h
new file mode 100644
index 0000000..99802c8
--- /dev/null
+++ b/bindings/bcppmake/MainTest.h
@@ -0,0 +1,25 @@
+//---------------------------------------------------------------------------
+
+#ifndef MainTestH
+#define MainTestH
+//---------------------------------------------------------------------------
+#include <Classes.hpp>
+#include <Controls.hpp>
+#include <StdCtrls.hpp>
+#include <Forms.hpp>
+#include <ExtCtrls.hpp>
+//---------------------------------------------------------------------------
+class TForm1 : public TForm
+{
+__published: // IDE-managed Components
+ TMemo *Memo1;
+ TPanel *Panel1;
+ void __fastcall FormShow(TObject *Sender);
+private: // User declarations
+public: // User declarations
+ __fastcall TForm1(TComponent* Owner);
+};
+//---------------------------------------------------------------------------
+extern PACKAGE TForm1 *Form1;
+//---------------------------------------------------------------------------
+#endif
diff --git a/bindings/bcppmake/Makefile.am b/bindings/bcppmake/Makefile.am
new file mode 100644
index 0000000..0e34fea
--- /dev/null
+++ b/bindings/bcppmake/Makefile.am
@@ -0,0 +1,16 @@
+swbcppmakedir = $(top_srcdir)/bindings/bcppmake
+
+EXTRA_DIST += $(swbcppmakedir)/MainCLXTest.dfm
+EXTRA_DIST += $(swbcppmakedir)/MainTest.cpp
+EXTRA_DIST += $(swbcppmakedir)/MainTest.h
+EXTRA_DIST += $(swbcppmakedir)/clxtest.bpr
+EXTRA_DIST += $(swbcppmakedir)/sword.bpf
+EXTRA_DIST += $(swbcppmakedir)/sword.c
+EXTRA_DIST += $(swbcppmakedir)/test.cpp
+EXTRA_DIST += $(swbcppmakedir)/MainCLXTest.cpp
+EXTRA_DIST += $(swbcppmakedir)/MainCLXTest.h
+EXTRA_DIST += $(swbcppmakedir)/MainTest.dfm
+EXTRA_DIST += $(swbcppmakedir)/Makefile.am
+EXTRA_DIST += $(swbcppmakedir)/clxtest.cpp
+EXTRA_DIST += $(swbcppmakedir)/sword.bpr
+EXTRA_DIST += $(swbcppmakedir)/sworddll.bpg
diff --git a/bindings/bcppmake/clxtest.bpr b/bindings/bcppmake/clxtest.bpr
new file mode 100644
index 0000000..0231ee9
--- /dev/null
+++ b/bindings/bcppmake/clxtest.bpr
@@ -0,0 +1,93 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="clxtest.exe"/>
+ <OBJFILES value="..\clx\Sword.obj clxtest.obj MainCLXTest.obj"/>
+ <RESFILES value="clxtest.res"/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES) MainCLXTest.dfm"/>
+ <LIBFILES value="sword.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value="Vcl50.lib"/>
+ <PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
+ ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
+ VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;"/>
+ <PATHPAS value=".;..\clx"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_DEBUG"/>
+ <SYSDEFINES value="_RTLDLL;NO_STRICT;USEPACKAGES"/>
+ <MAINSOURCE value="clxtest.cpp"/>
+ <INCLUDEPATH value="..\clx;$(BCB)\include;$(BCB)\include\vcl"/>
+ <LIBPATH value="..\clx;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <CFLAG1 value="-Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c
+ -tW -tWM"/>
+ <PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zd"/>
+ <LFLAGS value="-D&quot;&quot; -aa -Tpe -x -Gn -v"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0w32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+ShowInfoMsgs=0
+LinkDebugVcl=0
+LinkCGLIB=0
+
+[Language]
+ActiveLang=
+ProjectLang=
+RootDir=
+ </IDEOPTIONS>
+</PROJECT> \ No newline at end of file
diff --git a/bindings/bcppmake/clxtest.cpp b/bindings/bcppmake/clxtest.cpp
new file mode 100644
index 0000000..9c481eb
--- /dev/null
+++ b/bindings/bcppmake/clxtest.cpp
@@ -0,0 +1,24 @@
+//---------------------------------------------------------------------------
+
+#include <vcl.h>
+#pragma hdrstop
+USERES("clxtest.res");
+USEFORM("MainCLXTest.cpp", Form2);
+USEUNIT("..\clx\Sword.pas");
+USELIB("sword.lib");
+//---------------------------------------------------------------------------
+WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
+{
+ try
+ {
+ Application->Initialize();
+ Application->CreateForm(__classid(TForm2), &Form2);
+ Application->Run();
+ }
+ catch (Exception &exception)
+ {
+ Application->ShowException(&exception);
+ }
+ return 0;
+}
+//---------------------------------------------------------------------------
diff --git a/bindings/bcppmake/sword.bpf b/bindings/bcppmake/sword.bpf
new file mode 100644
index 0000000..b3caae1
--- /dev/null
+++ b/bindings/bcppmake/sword.bpf
@@ -0,0 +1,11 @@
+USEUNIT("sword.c");
+USEUNIT("..\flatapi.cpp");
+USELIB("..\..\lib\libsword.lib");
+USELIB("..\..\..\icu-sword\as_is\borland\icui18n.lib");
+USELIB("..\..\..\icu-sword\as_is\borland\icudatab.lib");
+USELIB("..\..\..\icu-sword\as_is\borland\icucommon.lib");
+//---------------------------------------------------------------------------
+This file is used by the project manager only and should be treated like the project file
+
+
+DllEntryPoint \ No newline at end of file
diff --git a/bindings/bcppmake/sword.bpr b/bindings/bcppmake/sword.bpr
new file mode 100644
index 0000000..092cb6f
--- /dev/null
+++ b/bindings/bcppmake/sword.bpr
@@ -0,0 +1,111 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!-- C++Builder XML Project -->
+<PROJECT>
+ <MACROS>
+ <VERSION value="BCB.05.03"/>
+ <PROJECT value="sword.dll"/>
+ <OBJFILES value="sword.obj ..\flatapi.obj"/>
+ <RESFILES value=""/>
+ <DEFFILE value=""/>
+ <RESDEPEN value="$(RESFILES)"/>
+ <LIBFILES value="..\..\lib\libsword.lib ..\..\..\icu-sword\as_is\borland\icui18n.lib
+ ..\..\..\icu-sword\as_is\borland\icudatab.lib
+ ..\..\..\icu-sword\as_is\borland\icucommon.lib"/>
+ <LIBRARIES value=""/>
+ <SPARELIBS value=""/>
+ <PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
+ ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
+ VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
+ dclocx50.bpi bcb2kaxserver50.bpi"/>
+ <PATHCPP value=".;.."/>
+ <PATHPAS value=".;"/>
+ <PATHRC value=".;"/>
+ <PATHASM value=".;"/>
+ <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
+ <RELEASELIBPATH value="$(BCB)\lib\release"/>
+ <LINKER value="tlink32"/>
+ <USERDEFINES value="_DEBUG;SWMAKINGDLL"/>
+ <SYSDEFINES value="NO_STRICT;_NO_VCL"/>
+ <MAINSOURCE value="sword.bpf"/>
+ <INCLUDEPATH value="..;..\..\include;$(BCB)\include;$(BCB)\include\vcl"/>
+ <LIBPATH value="..;$(BCB)\lib\obj;$(BCB)\lib"/>
+ <WARNINGS value="-w-par"/>
+ </MACROS>
+ <OPTIONS>
+ <CFLAG1 value="-WD -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi-
+ -tWD -tWM -c"/>
+ <PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
+ <RFLAGS value=""/>
+ <AFLAGS value="/mx /w2 /zi"/>
+ <LFLAGS value="-D&quot;&quot; -aa -Tpd -x -Gn -Gi -v"/>
+ </OPTIONS>
+ <LINKER>
+ <ALLOBJ value="c0d32.obj $(OBJFILES)"/>
+ <ALLRES value="$(RESFILES)"/>
+ <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
+ </LINKER>
+ <IDEOPTIONS>
+[Version Info]
+IncludeVerInfo=0
+AutoIncBuild=0
+MajorVer=1
+MinorVer=0
+Release=0
+Build=0
+Debug=0
+PreRelease=0
+Special=0
+Private=0
+DLL=0
+Locale=1033
+CodePage=1252
+
+[Version Info Keys]
+CompanyName=
+FileDescription=
+FileVersion=1.0.0.0
+InternalName=
+LegalCopyright=
+LegalTrademarks=
+OriginalFilename=
+ProductName=
+ProductVersion=1.0.0.0
+Comments=
+
+[HistoryLists\hlIncludePath]
+Count=4
+Item0=..\;..;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item1=..\;..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item2=..\..\include;$(BCB)\include;$(BCB)\include\vcl
+Item3=..\;$(BCB)\include;$(BCB)\include\vcl
+
+[HistoryLists\hlLibraryPath]
+Count=2
+Item0=..\;..;$(BCB)\lib\obj;$(BCB)\lib
+Item1=..\;$(BCB)\lib\obj;$(BCB)\lib
+
+[HistoryLists\hlDebugSourcePath]
+Count=1
+Item0=$(BCB)\source\vcl
+
+[HistoryLists\hlConditionals]
+Count=2
+Item0=_DEBUG;SWMAKINGDLL
+Item1=_DEBUG
+
+[Debugging]
+DebugSourceDirs=$(BCB)\source\vcl
+
+[Parameters]
+RunParams=
+HostApplication=
+RemoteHost=
+RemotePath=
+RemoteDebug=0
+
+[Compiler]
+ShowInfoMsgs=0
+LinkDebugVcl=0
+LinkCGLIB=0
+ </IDEOPTIONS>
+</PROJECT> \ No newline at end of file
diff --git a/bindings/bcppmake/sword.c b/bindings/bcppmake/sword.c
new file mode 100644
index 0000000..4c1c100
--- /dev/null
+++ b/bindings/bcppmake/sword.c
@@ -0,0 +1,31 @@
+//---------------------------------------------------------------------------
+
+#include <windows.h>
+//---------------------------------------------------------------------------
+// Important note about DLL memory management when your DLL uses the
+// static version of the RunTime Library:
+//
+// If your DLL exports any functions that pass String objects (or structs/
+// classes containing nested Strings) as parameter or function results,
+// you will need to add the library MEMMGR.LIB to both the DLL project and
+// any other projects that use the DLL. You will also need to use MEMMGR.LIB
+// if any other projects which use the DLL will be performing new or delete
+// operations on any non-TObject-derived classes which are exported from the
+// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
+// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
+// the file BORLNDMM.DLL should be deployed along with your DLL.
+//
+// To avoid using BORLNDMM.DLL, pass string information using "char *" or
+// ShortString parameters.
+//
+// If your DLL uses the dynamic version of the RTL, you do not need to
+// explicitly add MEMMGR.LIB as this will be done implicitly for you
+//---------------------------------------------------------------------------
+
+#pragma argsused
+int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void* lpReserved)
+{
+ return 1;
+}
+//---------------------------------------------------------------------------
+ \ No newline at end of file
diff --git a/bindings/bcppmake/sworddll.bpg b/bindings/bcppmake/sworddll.bpg
new file mode 100644
index 0000000..7f3c269
--- /dev/null
+++ b/bindings/bcppmake/sworddll.bpg
@@ -0,0 +1,33 @@
+#------------------------------------------------------------------------------
+VERSION = BWS.01
+#------------------------------------------------------------------------------
+!ifndef ROOT
+ROOT = $(MAKEDIR)\..
+!endif
+#------------------------------------------------------------------------------
+MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
+DCC = $(ROOT)\bin\dcc32.exe $**
+BRCC = $(ROOT)\bin\brcc32.exe $**
+#------------------------------------------------------------------------------
+PROJECTS = libsword.lib sword.dll test.exe clxtest.exe
+#------------------------------------------------------------------------------
+default: $(PROJECTS)
+#------------------------------------------------------------------------------
+
+libsword.lib: ..\..\lib\bcppmake\libsword.bpr
+ $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+sword.dll: sword.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+test.exe: test.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+clxtest.exe: clxtest.bpr
+ $(ROOT)\bin\bpr2mak $**
+ $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
+
+
diff --git a/bindings/bcppmake/test.cpp b/bindings/bcppmake/test.cpp
new file mode 100644
index 0000000..1d02c50
--- /dev/null
+++ b/bindings/bcppmake/test.cpp
@@ -0,0 +1,23 @@
+//---------------------------------------------------------------------------
+
+#include <vcl.h>
+#pragma hdrstop
+USERES("test.res");
+USEFORM("MainTest.cpp", Form1);
+USELIB("sword.lib");
+//---------------------------------------------------------------------------
+WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
+{
+ try
+ {
+ Application->Initialize();
+ Application->CreateForm(__classid(TForm1), &Form1);
+ Application->Run();
+ }
+ catch (Exception &exception)
+ {
+ Application->ShowException(&exception);
+ }
+ return 0;
+}
+//---------------------------------------------------------------------------