[Pkg-pascal-devel] Castle Game Engine build tool

Michalis Kamburelis michalis.kambi at gmail.com
Thu Feb 4 04:52:54 UTC 2016


Hi,

This may interest you in the context of packaging castle-game-engine in
Debian. I intended to send this around CGE 5.3.0 release (which should
happen in about a month). But the build tool is also part of the current
CGE 5.2.0 release --- so you can consider acting on this, or planning
this, already:)

The CGE 5.3.0 release will include a directory castle_game_engine/tools/
with programs that are useful for engine developers.

1. image2pascal
2. texturefont2pascal
3. build-tool (castle-engine binary)

(In CGE 5.2.0, the build tool is just inside castle_game_engine/tools/,
without subdirectories, as far as I remember.)

The 3rd tool is of particular importance. It can be used as a wrapper
around FPC compiler and some other tools to compile + package + install
the games. It can be used by Debian itself to compile future view3dscene
release, and many other CGE programs (every project using
CastleEngineManifest.xml can be compiled using the build tool).

Note: It does *not* eliminate the option to just use the engine as a set
of Pascal units, and compile programs however you like. In particular,
you always can compile normal (standalone) programs from Lazarus, or use
the xxx_compile.sh scripts that simply execute "fpc ..." with proper
command-line options.

But you can also compile them now using the build tool. For standalone
games, it has rather small advantages (simple "package" command to
package sources or binaries to tar.gz, on Windows it takes care of
Windows-specific resources...). For web browser plugins and for mobile
games the advantages grow. And in particular for Android, the build tool
really shines, as it can "package" the game, which means it can create a
temporary Android project, with the compiled game code + resources +
Android integration code, and call Android SDK + NDK tools to make a
100% correct apk file.

One of the larger features of the 5.3.0 release will be the integration
with various libraries available on Android, which is connected with our
"build tool". The documentation is on
https://github.com/castle-engine/castle-engine/wiki/Build-Tool and
https://github.com/castle-engine/castle-engine/wiki/Android-Project-Components-Integrated-with-Castle-Game-Engine
.

So, it would be great if Debian CGE package of 5.3.0 was including these
3 tools precompiled. You can compile them using the xxx_compile.sh
scripts inside (if they are uncomfortable for any reason, please let me
know --- we can adjust them or provide alternatives). The binaries could
be installed in /usr/bin/ I guess.

For the build tool, it now (since CGE 5.3.0) also has a data/ directory.
It includes precompiled libraries to package the game for various
platforms (we distribute them in binary form, as a convenience for
users; their sources and compilation instructions are scattered across
the Internet; Debian packaging can probably remove them, if it's too
cumbersome to host them), and Android and iOS templates. If you simply
place it in /usr/share/castle-engine/ (that is, you'll have
/usr/share/castle-engine/android/ and such dirs) it will be picked up by
the tool.

(Note: you can always look at latest engine sources from SVN or GIT, if
you want to see upcoming CGE 5.3.0 sources:
http://castle-engine.sourceforge.net/engine.php#section_svn .)

Please ask if you have any questions:)

Best regards,
Michalis



More information about the Pkg-pascal-devel mailing list