Readme

Content of Readme file of js-projekt.  See Make Command and also System Configuration.

License

Licensed under GNU General Public License v2 (see LICENSE), or (at your option) any later version.

Author

© 2010-2014 Jörg Seebohn

Web location

Free software project hosted at github: https://github.com/je-so/js-projekt

Download

The newest source code (Linux version) can be downloaded from: http://github.com/je-so/js-projekt/zipball/master

Summary
ReadmeContent of Readme file of js-projekt.
Description
GoalTo develop a database server and also a transactional general purpose programming language.
StateThe current development is the architecture and design phase.
Developed IdeasReads text database in CSV format and patches query result into C-source code.
Build
Make CommandRun ‘make’ at the top level directory.
System ConfigurationTo run the test program no special system configuration is required for most of the tests.
Project ConfigurationRun ./configure which reads the system configuration of freetype2 and writes it to projekte/external-lib/freetype2.
Make Targets
DocumentationThe documentation is extracted from the source files by naturaldoc.
DependenciesTo build the whole project or any subproject the following dependencies should be considered.
Development Environment:
Project-structureExplanation of directory structure.

Description

Summary
GoalTo develop a database server and also a transactional general purpose programming language.
StateThe current development is the architecture and design phase.
Developed IdeasReads text database in CSV format and patches query result into C-source code.

Goal

To develop a database server and also a transactional general purpose programming language.  The goal is to remove the impedance mismatch between computer languages and database backends.  Implementation language is C99 (switch to C11 will be made if gcc supports it).  During the design phase the development is done only on Linux.  Development system is Ubuntu 11.04 or later.

State

The current development is the architecture and design phase.  The structure of the base system must support many users so the concurrency problem has to be solved in one way or another.  Some kind of transaction processing monitor which can handle things like client-server communication, transaction contexts and process management is needed.

Developed Ideas

Subproject TextDB

Reads text database in CSV format and patches query result into C-source code.  Used to manage initialization lists and to configure unix signal handlers.  See directory “C-kern/resource/config/” for textdb databases.

Example

The following code shows how the init and free functions (which should be called once at the start of the process) are patched into code.  The list of functions is stored in the text database file ‘C-kern/resource/config/initprocess’.

// TEXTDB:SELECT(\n"   err = initonce_"module"("(if (parameter!="") "&pcontext->" else "")parameter") ;"\n"   if (err) goto ONABORT ;"\n"   ++ pcontext->initcount ;")FROM("C-kern/resource/config/initprocess")
...
err = initonce_valuecache(&pcontext->valuecache) ;
if (err) goto ONABORT ;
++ pcontext->initcount ;

err = initonce_thread() ;
if (err) goto ONABORT ;
++ pcontext->initcount ;
// TEXTDB:END

Subproject Genmake

Automate generation of makefiles.  Genmake offers a simple project description and generates the corresponding makefile with all source code dependencies.

Example

The following example shows the project description of the text resource compiler.

include        projekte/binary.gcc
Src            = C-kern/main/tools/resource_textcompiler.c
Src           += C-kern/tools/hash.c
Includes       = .
Defines        =

Subproject textres2compiler

Handle text resources for different languages.  The textres2compiler generates a C header and source file from a text resource file, see “C-kern/resource/loerror2.text”.  The generated files can be used to produce text strings for any language described in the resource file.  The kind of language must be decided at compile time - runtime switching is not supported at the moment.

The second version of the resource compiler supports conditional text which can depend on the supplied parameters.

Example

The following text resource has as single parameter the number of files and the returned text depends on it.

FILES_DELETED(unsigned nr_of_deleted_files)
en: "I have deleted " ((nr_of_deleted_files==0) "no" (nr_of_deleted_files==1) "one" else nr_of_deleted_files)
    ((nr_of_deleted_files==1) " file\n" else " files\n")

Build

Summary
Make CommandRun ‘make’ at the top level directory.
System ConfigurationTo run the test program no special system configuration is required for most of the tests.
Project ConfigurationRun ./configure which reads the system configuration of freetype2 and writes it to projekte/external-lib/freetype2.
Make Targets
DocumentationThe documentation is extracted from the source files by naturaldoc.
DependenciesTo build the whole project or any subproject the following dependencies should be considered.
Development Environment:
Project-structureExplanation of directory structure.

Make Command

Run ‘make’ at the top level directory.  This should build all subprojects.

The main makefile (‘Makefile’) calls for every subproject the corresponding makefile in ‘projekte/makefiles/’.

To run all unit tests execute bin/unittest (release version) or bin/unittest_Debug.

System Configuration

To run the test program no special system configuration is required for most of the tests.

unittest_platform_sysuser

The authenfication service which is implemented with help of libpam uses the service name “passwd” and therefore the same configuration as the passwd system command.  But to make the unittest work you should create a user “guest” with passowrd “GUEST” and either run the test as setuid root or as setuid guest to work.  If you want to change the values edit C-kern/resource/config/modulevalues and change the values prefixed with module “sysuser_t”.

Project Configuration

Run ./configure which reads the system configuration of freetype2 and writes it to projekte/external-lib/freetype2.

Edit projekte/unittest.prj

If you want to build the tests with graphic subsystem enabled edit projekte/unittest.prj and uncomment the includes for the graphic subsystem and at the bottom of the file switch the comments for the Libs and Defines settings.  The system uses: native X11, portable EGL (OpenGL binding to native window sytem), and portable OpenGL ES.

Make Targets

allBuilds »Debug« and »Release« version of every subproject except »html«.
DebugBuilds debug binaries of every subproject.  The generated binaries are stored under directory ‘bin/’.  A binary is named after its corresponding project name plus an additional ‘_Debug’ suffix.
ReleaseBuilds release binaries of every subproject.  The generated binaries are stored under directory ‘bin/’.  A binary is named after its corresponding project name without any additional suffix or prefix.
htmlGenerate documentation from source code with naturaldoc.  You can view it by opening html/index.html in a browser.
genmakeBuild genmake binaries: »bin/genmake« and »bin/genmake_Debug«.
unittestBuild test binaries »bin/unittest« and »bin/unittest_Debug« which run all unit tests of all devloped modules.
textdbBuild text database tool binaries: »bin/textdb[_Debug]«
textrescompilerBuild resource compiler binaries: »bin/textrescompiler[_Debug]«
testchildprocessBuild test process »bin/testchildprocess[_Debug]« used in “unittest_platform_process”.
pp-textdbRuns the textdb tool to preprocess all C source files to patch the m with the content of the textdb database files.
pp-textresRuns the textrescompiler tool to preprocess all text resourc files and to generate the corresponding C header files.

Documentation

The documentation is extracted from the source files by naturaldoc.  Type ‘make html’ to run it.  Make sure you have installed v1.5 on your system.  Type ‘firetestchildprocessfox html/index.html’ to view it (replace firefox with your favourite browser).

Dependencies

To build the whole project or any subproject the following dependencies should be considered.

Libraries

  • libpthread for threading support (installed on Linux by default)
  • librt for realtime signal support (installed on Linux by default)
  • libpam (Pluggable Authentication Modules) for authentication of user names and password secrets (installed on Linux by default) But you need to install libpam0g-dev (other distros than Ubuntu have other names) which contains all the C header development files for libpam.

Libraries for graphic subsystem

  • libfreetype: FreeType 2 font engine development files to support text in combination with OpenGL or OpenGL ES
  • libgl: OpenGL API development files to support OpenGL
  • libegl: OpenGL EGL API development files to support binding of OpenGL ES
  • libgles2: OpenGL GL ES 2 API development files to support OpenGL ES 2

You do not need OpenGL and OpenGL ES support both at the same time.  Choose one.  But EGL (OpenGL binding to native window system) supports both (version >= 1.4) with eglBindAPI.

Development Environment:

Project-structure

Explanation of directory structure.

LICENSEGPL v2 license
MakefileTop level makefile which calls project makefiles
READMEThis readme file
C-kern/Contains all C source code and other resources, e.g. localized text
C-kern/apiContains all C header files (interfaces) of the implementation modules
C-kern/konfig.hGlobal configuration file (must be included by every source module)
coding-conventions/A textual description of the made design decisions
projekte/Contains project descriptions suitable for Genmake
projekte/makefiles/Contains generated makefiles
projekte/codelite/Contains workspace & projects for the CodeLite IDE.
Run ‘make’ at the top level directory.
To run the test program no special system configuration is required for most of the tests.
Close