Language

Building or installing a new Pliant release

Overview

A Pliant release is two things:

   •   

A tiny set of executables and libraries in file:/pliant/binary/

   •   

A set of Pliant programs in file:/pliant/pliant/

Please notice that the file:/pliant/binary/ content is not the same under FullPliant or Linux on one side, and under Windows on the other, but the file:/pliant/pliant/ directory is.

Moreover, the file:/pliant/binary/ content tend to not change much from one release to another, so it is often possible to upgrade without touching it, also it's not recommended since it's just gambling.

Packaging a new release

There is not a one shot command to do that.
The problem is that GCC compilers tend to compile Pliant code poorly, so you have to be very careful in order to get a working set of executables in the end.

Packaging a new Pliant release is done in a standard Linux distribution since it requires a GCC compiler. As a result, if you run FullPliant operating system, just do that in a virtual computer running Ubuntu or whatever Linux distribution you like.
Please, notice that in facts, it is also possible to compile Pliant for Windows under Windows, using Cygwin or a Watcom compiler, but it's undocumented. Just try to see if some of the scripts in /pliant/fullpliant/install/ work for your configuration and produce working executables.

The first thing to do is set the Pliant release number at the top of /pliant/language/declare/struct.c

Then try to compile the Linux executable through executing
  /pliant/pliant/install/make-linux-i386-gcc
in a shell script.
The script should be easy to read and change if necessary since it does not rely on any complex things such as as make file or .configure.
Please notice that GCC 4 is known to not compile Pliant code properly if -O1 or -O2 is set, so the scripts demands GCC 3.4 to be available.
The expected result is three executables in file:/pliant/binary/ and the following command to run for a few seconds and return without crashing:
  /pliant/binary/pliant-debug1.exe reset module /pliant/install/minimal.pli

Then try to compile the Windows executables through executing
  /pliant/pliant/install/make-win32-i386-gcc
in a shell script.
Also, you have to previously install GCC 2.95 cross compiler, plus zlib and libjpeg patched source code through downloading i386-pc-cygwin.tgz and win32libs.tgz from Pliant web site to your file:/tmp/ directory, then type in:
  cd /usr/local
  tar -zx -f /tmp/i386-pc-cygwin.tgz
  cd /
  tar -zx -f /tmp/win32libs.tgz
The provided zlib and libjpeg have been patched to ensure that standard calling convention is used, as opposed to compiler specific one that unpatched source was providing.
Moreover, I failed to cross compile zlib using a more modern GCC because, as far as I could understand it, it seems that newer GCC silently generates some 'memcpy' calls.
The expected result is a file:/pliant/archive/win32-i386/ directory with the following content:
  fullpliant.exe
  libjpeg.dll
  pliant-debug0.dll
  pliant-debug0.exe
  pliant-debug1.dll
  pliant-debug1.exe
  pliant-debug2.dll
  pliant-debug2.exe
  vncchallenge.dll
  zlib.dll
If you want to test it, move the directory to a Windows machine file:/pliant/binary/ directory (I mean c:\pliant\binary using Windows standard way of specifying paths), then try the following command in a Windows prompt:
  c:\pliant\binary\pliant-debug1.exe reset module /pliant/install/minimal.pli
Please notice that some GCC compiler produce a non working zlib under Windows, so you might want to check it specifically through:
  c:\pliant\binary\pliant-debug1.exe reset module /pliant/install/minimal.pli module /pliant/sample/zlib.pli

Finally, try to build Pliant tarballs through executing
  /pliant/pliant/install/pack-archive
or, if you did not precompile Pliant yet or have no /bin/pliant softlink to /pliant/binary/pliant-debug1.exe, through the full command:
  /pliant/binary/pliant-debug1.exe module /pliant/install/precompile.pli module /pliant/install/pack-archive
The tarballs should land in file:/pliant/archive/

One last word: if Unix rights on various directories are not set properly, you might need to 'sudo' some of these commands.

Installing a new release

Select 'Install' 'Upgrade Pliant release' from FullPliant main menu.

Alternatively, you can untar the Pliant tarball in 'file:/'. See /pliant/fullpliant/install/pliant.ui for details.
Please notice that you should take care if you do that while Pliant is running because the operating system might prevent the unpacking program overwrite a running executable.