forked from jnorthrup/metakit
-
Notifications
You must be signed in to change notification settings - Fork 5
/
README
executable file
·203 lines (157 loc) · 9.74 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
The Metakit Library 2.4.9.8 Jun 2015
==============================================================================
WHAT IT IS - Metakit is an embeddable database which runs on Unix, Windows,
Macintosh, and other platforms. It lets you build applications which
store their data efficiently, in a portable way, and which will not need a
complex runtime installation. In terms of the data model, Metakit takes
the middle ground between RDBMS, OODBMS, and flat-file databases - yet it
is quite different from each of them.
TECHNOLOGY - Everything is stored variable-sized yet with efficient positional
row access. Changing an existing datafile structure is as simple as re-
opening it with that new structure. All changes are transacted, including
restructuring. You can mix and match software written in C++, Python,
and Tcl. Things can't get much more flexible...
CORE - The Metakit core library is written in C++. It has a code footprint of
just over 100 Kb on Windows. It can be used as DLL, or linked statically.
Debug builds include extensive assertion checks to catch problems early.
PYTHON - The binding for Python is called "Mk4py". It uses SCXX by Gordon
McMillan as C++ glue interface. The source is in directory "python/".
TCL/TK - The MK extension for Tcl is called "Mk4tcl". It is being used in a
number of commercial projects. The source is in directory "tcl/".
LICENSE AND SUPPORT - Metakit is distributed as open source software (see the
X/MIT-style license at the end of this document). Commercial support is
available through an Enterprise License, see the URL mentioned below.
DOCUMENTATION - All documentation uses HTML. The main page is "Metakit.html",
which leads to the rest of the documentation in the "doc/" directory.
The C++ API Reference is extracted from the source code using Doxygen.
WEBSITE URLS - The main pages on the world wide web, for news and downloads:
Homepage: http://equi4.com/metakit/
Python news: http://equi4.com/metakit/python.html
Tcl/Tk news: http://equi4.com/metakit/tcl.html
License info: http://equi4.com/metakit/license.html
Contact info: http://equi4.com/about/contact.html
ACKNOWLEDGEMENTS - Thanks to everyone who has helped shape and extend Metakit,
including Kyrill Denisenko, Mark Roseman, Gordon McMillan, Matt Newman,
Christian Tismer, John Bushakra, Steve Landers, Jacob Levy, John Barnard,
Nicholas Riley, Brian Kelley, and many more people who have reported bugs
and helped fix them. Last but not least, many thanks to all enterprise
license customers and all my clients for funding Metakit work.
INSTALLATION
============
All platform builds and language bindings are designed to work from a single
common "builds/" directory. Where possible, that is - it turns out to be
impossible to keep build side-effects limited to *just* this directory
(CodeWarrior can't be told where to place its temp data, and Visual C++ still
alters a few files next to the project ".dsw" file, to name two offenders).
PYTHON - Nov 2006
There is a --with-python option in unix/configure, but it does not always
seem to work. One problem is python version numbers being hard-wired into
the configure/make files (2.5 right now). This worked for me on Mac OS X:
cd builds
../unix/configure \
--with-python=/Library/Frameworks/Python.framework/Versions/2.5
ln -s Mk4py.dylib Mk4py.so
Note that the arg to --with-python is the path *upto* include/python2.5
There is also a python/setup.py script which should simplify building for
Python. Unfortunately, it does things in a somewhat tricky way in that
it uses MK's .o files from the builds/ directory. This in turn means
that on Mac OS X, you'll need to hack things a bit to make these .o's end
up as "fat" (ppc+i386) binaries since setup.py needs them that way.
Here's how a non-macosx build should work:
cd builds
sh ../unix/configure
make test
cd ../python
python setup.py clean build
The result will be left in ../builds/lib.*/{Mk4py.so,metakit.py}
For Mac OS X, you need to hack ../builds/Makefile after running configure:
* change "CXXFLAGS = $(CXX_FLAGS)" to "CXXFLAGS = $(CXX_FLAGS) \
-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
* change "SHLIB_LD = g++" to "SHLIB_LD = g++ -dynamiclib \
-flat_namespace -undefined suppress -arch ppc -arch"
Then do the rest, using "make" i.s.o. "make test" because the changes to
the flags don't seem to create proper executables. That's ok though, the
.o files are fat, which is all setup.py needs.
TCL - Jun 2007
The Tcl build has been converted to use the TEA3-based configure script
in the tcl/ directory. The way to build Mk4tcl is now as follows:
mkdir tbuild # can be anywhere, really...
cd tbuild
CC=g++ sh ../tcl/configure
make
make test
make install
This build configuration has not yet been tested with non-gcc compilers.
There are no dependencies on the C++ build process, nor the builds/ dir.
Note: for Windows CE, an older version of the tcl.configure script was
successfully used with MS EVC3. One trick is that in tcl/configure.in,
"TEA_ADD_CFLAGS([])" has to be changed to "TEA_ADD_CFLAGS([-Dq4_WINCE])".
UNIX (ALSO MAC OS X)
It is no longer advised to build the Unix code in the "unix/" directory.
Instead, you should perform the following steps:
cd builds
sh ../unix/configure
make
make test
And optionally (this only installs the core lib, not script extensions):
make install
By switching to the "builds/" directory, you will keep the distribution
directory tree 100% unaltered. All changes are made in this subdir, and
all final build results are left behind in this same subdir.
To build with STL containers and strings, you can do the following:
make CXXFLAGS='-Dq4_STD' test # add -O3 etc, as needed
OLD: to build the Mk4tcl extension on Unix, change the configure to:
../unix/configure --with-tcl=<dir-where-tcl.h-is>
OLD: to build the Mk4py extension on Unix, change the configure to:
../unix/configure --with-python=<dir-where-include/-is>
E.g.
../unix/configure --with-tcl=/usr/include --with-python=/usr
Use "../unix/configure --help" to find out about other variants, when the
include & lib dirs are completely different, and for other build options.
WINDOWS
There is a "win/" directory which contains subdirectories for a number of
compiler systems. Metakit has been built with many different compilers
in the past (Microsoft, Borland, Watcom, Symantec, Metrowerks, Optima),
only a few are maintained (there are 12 configurations for MSVC6 alone!).
The MS Visual C++ 6.0 project is "win/msvc60/mksrc.dsw", with subprojects
for the C++ demo (mkdemo), building dll's (mkdll), static libs (mklib),
regression tests (mktest), as well as Tcl (mktcl) and Python (mkpython).
It has been set up to place all intermediate files and final results in
the "builds/" subdirectory, even though you'll launch it from "win/".
An MSVC 7.0 project by David Van Maren is in win/msvc70/mksrc.sln.
To build with STL containers and strings under MSVC, define "q4_STD".
To build with MFC containers and strings under MSVC, define "q4_MFC".
The Metrowerks Codewarrior project is in the "mac/" directory, and can be
used to build both Mac and Windows versions (on either Mac *or* Windows).
The core libraries are built with "mac/cw5.mcp", demos / tests are built
with "cw5apps.mcp", Tcl is "cw5tcl.mcp", and Python is "cw5python.mcp".
The Borland C++ Builder projects have not yet been incorporated in this
release, but the "KitViewer" application is an example of how to use BCB.
The Cygwin build (B20.1 / gcc 2.95.2) is different, because it uses the
unix autoconf system, and must be launched as described above for UNIX.
I have upgraded to the latest development of libtool to be able to build
DLL's with Cygwin. You can build the "-mno-cygwin" version by editing
the Makefile by hand and adding that option to CXXFLAGS.
Rob Bloodgood adds that the following GCC options are for maximum code
efficiency on x86 hardware: "-O2 -m486 -malign-loops=2 -malign-jumps=2".
I have not yet tried this myself, but am passing on the tip.
LICENSE AND COPYRIGHT STATEMENT
===============================
Copyright (c) 1996-2007 Jean-Claude Wippler
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
==============================================================================
-- Jean-Claude Wippler <[email protected]>