SinkWorld banner image

These notes are incomplete

There are several places in build scripts where files are expected to be in particular paths and these will need to be modified. Other things may only work because of my particular setup and may require work.

Building and running Tentacle and Pentacle

Tentacle is a demonstration editor application using the SinkWorld library. It is written in a subset of C++ that is automatically converted into Java and C# to run on the JVM and .Net framework.

Pentacle is the same application written in Python running on the same platforms.

Download

The code can be checked out of the Scintilla CVS as the module "sinkworld".

Directory layout

Prerequisite tools

The full suite requires a large set of tools to build and run. Particular targets require fewer prerequisites as listed later. The URLs here are either for cross platform versions or Windows versions for tools that are normally available on Linux. Where version numbers are given they are the versions developed with and more recent versions should be OK.

  1. Python 2.4 required by all targets
  2. make
  3. Visual Studio .NET 2003
  4. scons 0.96.90
  5. Java J2SE 5.0
  6. .NET Framework 2.0 SDK 2 x86
  7. Boost
  8. Boost Build
  9. ctypes 0.9.6
  10. Jython 2.1
  11. IronPython 0.9.5
  12. cppunit only needed for unit tests on Windows

On recent distributions of Linux most of the tools should be included but Jython and Boost will need to be downloaded.

Targets with prerequisites

Tentacle
C++/Win32 unit tests1,3,4test
C++/GTK+2.4/Linux1,2,3tentacle/cxx
C++/Win321,3tentacle/cxx
Java 1.51,2,5tentacle/java
C#/.Net1,2,6tentacle/csharp
Pentacle
Python/GTK+2.4/Linux1,2,3,7,8tentacle/python
Python/Win321,3,4,7,8,9tentacle/python
Jython 2.11,2,5,10tentacle/java
IronPython 0.7.51,2,6,11tentacle/csharp

Building

Initial step for all targets: Translate.py

The first step for all targets is to run bin/Translate.py from the bin directory. This script expands code templates and translates C++ code to Java and C#. The generated files and object files can be removed with "Translate.py clean".

Options files

Tentacle and Pentacle use a set of files to specify the modes available and personal preferences. Modes are stored in tentacle/*.mode and preferences in user.options. These should be copied into the user's home directory (~ on Linux and %USERPROFILE% on Windows) before running the application.

C++/Win32 unit tests

The unit tests are optional but can help ensure that much of the library code works after any modifications. From the top level directory, run scons to compile base and lexers. In the test directory compile SimpleTest.cxx linking in the base, lexers and cppunit libraries. The command line should be like this but with the cppunit home directory fixed up:
cl /Zi -EHsc -MD /I..\base /I..\lexers /IC:\cppunit\include SimpleTest.cxx /link /LIBPATH:..\base /LIBPATH:..\lexers /LIBPATH:C:\cppunit\lib base.lib lexers.lib cppunit.lib
Then run "SimpleTest" which will report the number of tests that succeeded.

C++/GTK+2.4/Linux

In the tentacle/cxx directory run make to produce a tentacle executable.

C++/Win32

From Visual Studio .Net 2003, load tentacle/cxx/Tentacle.sln and build and run.

Has also worked in Visual Studio 2005.

The code runs in MSVC 6 but there is no project for that.

Java 1.5

In the tentacle/java directory run make to produce tentacle.jar.

Run with "java -jar tentacle.jar".

Has also worked with Java 1.4 but this has not been tested with current code.

C#/.Net

In the tentacle/csharp directory run make to produce TentacleN.exe.

Python/GTK+2.4/Linux

In the tentacle/python directory run "bjam -sBUILD=debug test" to build and test the SinkWorld.so library. This library will be found in a deeply nested subdirectory based on compilation options, and there will be both the library with a Boost version number name like "SinkWorld.so.1.32.0" and a link file "SinkWorld.so".

Copy the library files to tentacle/python.

Run application with "Python PentacleGTK.py".

Python/Win32

In the tentacle/python directory run "bjam -sBUILD=debug test" to build and test the SinkWorld.pyd library. This library will be found in a deeply nested subdirectory based on compilation options.

Copy the library file to tentacle/python.

Run application with "python PentacleWin.py".

Jython 2.1

First, follow the instructions for Java 1.5 to compile the Java files.

Run application with "jython PentacleJ.py".

IronPython 0.9.5

First, follow the instructions for C#/.Net to build the library in SinkWorld.dll.

Run application with "IronPythonConsole PentacleNet.py".