Version: Alpha 1.3.1
Release date: August 5, 2016

Status

This version is deprecated - It is no longer able to validate FSDL documents based on FSDL 3.0 - find the latest version

This version of the FSDL Software Library is embedded in versions 1.3.1 of Frogans Player for Developers (alpha).

Note: The FSDL Software Library (alpha) is a preliminary version provided on an "as is" basis. The OP3FT cannot guarantee that the rendering performed by this alpha version will be compatible down to the last pixel with the rendering performed by the release version of the FSDL Software Library. The API of the FSDL Software Library is also subject to change.

To be informed of the distribution of versions of Frogans Player, subscribe free of charge to the Announcement read-only mailing list.

Purpose

The FSDL Software Library is the reference implementation of the FSDL technical specification version 3.0.

The FSDL Software Library provides the ability to parse and validate FSDL documents, and render them as Frogans slides. The FSDL Software Library also provides access to prepared resources and individual layers of Frogans slides.

Intended audience

The FSDL Software Library (alpha) is intended for developers wishing to contribute to the development of the FSDL language and of the FSDL Software Library by creating and testing software such as an authoring tool or a CMS (Content Management System), implemented either as a desktop application or a Web-based application.

Any contribution to the development of the Frogans technology, in any form, is considered as acceptance of the Frogans Technology Development Contributor Policy and the commitments it contains, without restriction or reserve.

By using the FSDL Software Library, developers can guarantee that Frogans sites designed using their software will be fully compliant with the FSDL technical specification, and will be rendered exactly the same, down to the last pixel, when they are published online and navigated using Frogans Player on any device.

Rather than wasting time implementing the complex rendering algorithms defined in the FSDL specification, developers can focus their efforts on designing productive graphical interfaces and optimizing Frogans site creation workflows.

Feedback sought

This alpha version represents an opportunity for developers to participate in the development of the Frogans technology.

To post questions or suggestions, or to report errors relating to the FSDL language or to this FSDL Software Library version, subscribe free of charge to the Early-questions mailing list. Please prefix the subject of any posts you make to this list concerning FSDL 3.0 with "[FSDL]" and prefix the subject of any posts concerning the FSDL Software Library with "[FSDL-Lib]".

The OP3FT is looking for feedback from the developer community in two key areas:

Your feedback can concern either a given platform (Windows, MacOS X, or Linux) or all platforms. It can concern either a given programming language (C, C++, Java, C#, VB, Objective C, PHP, or Node.js) or all languages.

Requirements

Operating System versions currently supported:

Windows 32-bit

Mac OS X 32-bit

Linux 32-bit/64-bit

GLibC 2.2.5 or higher (GlibC 2.14 or higher currently required for PHP 5.4, 5.5, 5.6, 7.0)

Programming languages currently supported:

Support for the following operating systems is under development and will be available soon:

Support for the following programming languages is under development and will be available soon:

Release information

The FSDL Software Library is written in C. It allows you to create and test software based on the Frogans Slide Description Language (FSDL).

This version implements both the graphical and the dynamic elements of FSDL 3.0.

The following elements are available for testing: <frogans-fsdl>, <resimage>, <respixels>, <resdraw>, <respath>, <setfont>, <font>, <restext>, <text>, <setfilter>, <filter>, <setrelief>, <relief>, <setshadow>, <shadow>, <resmerge>, <merge>, <layer>, <file>, <button>, <next>, <redirect>, <setdata>, <data>, <session>, <setentry>, and <entry>.

This version does not manage all Frogans slide rendering constraints (intended to ensure useability for end-users), which are currently under discussion.

Change log:

Changes between 1.2.1 and 1.3.1:

Known issues (as of August 5, 2016):

Download

Instructions

For a video presentation on the FSDL Software Library and how to create desktop and Web-based applications, watch the presentations given during Frogans Technology Conference 6 (video) or Frogans Technology Conference 7 (video).

Sample programs for Java and PHP are provided in the archive file of the FSDL Software Library.

The interface files (for C, Java and PHP) of the FSDL Software Library serve as a reference for calling the functions of the library.

The FSDL Software Library is being developed in compliance with version 1.0 of the UPIL (Uniform Portable Interface Language) technical specification. This is to ensure the accessibility of the FSDL Software Library for developers using the main programming languages on various platforms.

Archive file contents

The archive file is organized as follows:

fsdl-software-library-alpha1.3.1/ │ ├── README.txt │ ├── COPYRIGHT-AND-LICENSE │   ├── Copyright-and-License.txt │   └── Licenses │   ├── Apache-license.txt │   ├── ARPHICPL.txt │   ├── Bitstream-license.txt │   ├── ICU-license.txt │   ├── OFL.txt │   └── Unicode-license.txt │ ├── reference-implementation ◀─────── Directory containing the reference implementation of the library │   │ │   ├── upil │   │ └── upil-types.h ◀─────── UPIL basic types for C │   │ │   └── fsdl │      ├── fsdl.h ◀─────── Library's interface file for C │      │ │      └── binaries │         ├── fsdl-fonts.dat ◀─────── File containing the fonts defined in FSDL 3.0 │         ├── windows │         │ └── 32-bit │         │ ├── fsdl-alpha1.3.1.dll ◀─────── x86 version for Windows │         │ └── fsdl-alpha1.3.1.lib │         ├── macosx │         │   └── 32-bit │         │   └── libfsdl-alpha1.3.1.dylib ◀─────── x86 version for Mac OS X │         └── linux │            ├── 32-bit │            │   └── libfsdl-alpha1.3.1.so ◀─────── x86 version for Linux │            └── 64-bit │            └── libfsdl-alpha1.3.1.so ◀─────── x64 version for Linux │ ├── sample-programs │   │ │   ├── desktop │   │   │ │   │   └── java │   │   │ │   │   └── sampleFsdlTool ◀─────── Directory containing the desktop sample program for Java │   │   ├── Launch.java │   │   ├── SampleSlideDataManager.java │   │   ├── ImagePanel.java │   │   ├── ToolException.java │   │   └── resource │   │      ├── home.fsdl.tpl │   │      ├── slide2.fsdl.tpl │   │      └── world240x240.png │   │ │   ├── web-based │   │   │ │   │ └── php │   │   │ │   │   └── sampleFsdlTool ◀─────── Directory containing the web-based sample program for PHP │   │   ├── index.php │   │   ├── index-with-trace.php │   │   ├── Launch.php │   │   ├── SampleSlideDataManager.php │   │   ├── ToolException.php │   │   └── resource │   │      ├── home.fsdl.tpl │   │      ├── slide2.fsdl.tpl │   │      └── world240x240.png │   │ │   └── mobile │ └── wrappers │ ├── java ◀─────── Directory containing the wrapper of the library for Java │   │ │   ├── doc │   │ └── documentation4java.zip ◀─────── HTML documentation generated using Javadoc │   │ │   ├── upil ◀─────── Directory containing the UPIL basic types for Java │   │ ├── UpilBoolean.java │   │ ├── UpilInteger32.java │   │ ├── UpilBuffer.java │   │ └── UpilBufferInternals.java │   │ │   └── fsdl │      ├── Fsdl.java ◀─────── Library's interface file for Java │      ├── FsdlInternals.java │      │ │      └── binaries │         ├── windows │         │ └── 32-bit │         │ └── fsdl4java-alpha1.3.1.dll ◀─────── x86 version for Windows │         ├── macosx │         │   └── 32-bit │         │   └── libfsdl4java-alpha1.3.1.dylib ◀─────── x86 version for Mac OS X │         └── linux │            ├── 32-bit │            │   └── libfsdl4java-alpha1.3.1.so ◀─────── x86 version for Linux │            └── 64-bit │            └── libfsdl4java-alpha1.3.1.so ◀─────── x64 version for Linux │ └── php ◀─────── Directory containing the wrappers of the library for PHP │ ├── 5.4 │   └── non-zts ◀─────── Directory containing the wrapper of the library for PHP 5.4 - non ZTS │   │ │   ├── doc │   │ └── documentation4php.zip ◀─────── HTML documentation generated using phpDocumentor │   │ │   ├── upil ◀─────── Directory containing the UPIL basic types for PHP │   │ ├── UpilBuffer.php ◀─────── UPIL buffer basic type's interface file (for information only) │   │ └── binaries │   │    └── linux │   │    └── 64-bit │   │      ├── libupilbuffer4php-alpha1.3.1.so ◀─────── x64 version for Linux │   │      └── libupilbuffer4php-alpha1.3.1.ini │   │ │   └── fsdl │      ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │      │ │      └── binaries │         └── linux │         └── 64-bit │         ├── libfsdl4php-alpha1.3.1.so ◀─────── x64 version for Linux │         └── libfsdl4php-alpha1.3.1.ini │ ├── 5.5 │   └── non-zts ◀─────── Directory containing the wrapper of the library for PHP 5.5 - non ZTS │   │ │   ├── doc │   │ └── documentation4php.zip ◀─────── HTML documentation generated using phpDocumentor │   │ │   ├── upil ◀─────── Directory containing the UPIL basic types for PHP │   │ ├── UpilBuffer.php ◀─────── UPIL buffer basic type's interface file (for information only) │   │ └── binaries │   │    └── linux │   │    └── 64-bit │   │      ├── libupilbuffer4php-alpha1.3.1.so ◀─────── x64 version for Linux │   │      └── libupilbuffer4php-alpha1.3.1.ini │   │ │   └── fsdl │      ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │      │ │      └── binaries │         └── linux │         └── 64-bit │         ├── libfsdl4php-alpha1.3.1.so ◀─────── x64 version for Linux │         └── libfsdl4php-alpha1.3.1.ini │ ├── 5.6 │   └── non-zts ◀─────── Directory containing the wrapper of the library for PHP 5.6 - non ZTS │   │ │   ├── doc │   │ └── documentation4php.zip ◀─────── HTML documentation generated using phpDocumentor │   │ │   ├── upil ◀─────── Directory containing the UPIL basic types for PHP │   │ ├── UpilBuffer.php ◀─────── UPIL buffer basic type's interface file (for information only) │   │ └── binaries │   │    └── linux │   │    └── 64-bit │   │      ├── libupilbuffer4php-alpha1.3.1.so ◀─────── x64 version for Linux │   │      └── libupilbuffer4php-alpha1.3.1.ini │   │ │   └── fsdl │      ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │      │ │      └── binaries │         └── linux │         └── 64-bit │         ├── libfsdl4php-alpha1.3.1.so ◀─────── x64 version for Linux │         └── libfsdl4php-alpha1.3.1.ini │ └── 7.0    └── non-zts ◀─────── Directory containing the wrapper of the library for PHP 7.0 - non ZTS    │     ├── doc    │ └── documentation4php.zip ◀─────── HTML documentation generated using phpDocumentor    │    ├── upil ◀─────── Directory containing the UPIL basic types for PHP    │ ├── UpilBuffer.php ◀─────── UPIL buffer basic type's interface file (for information only)    │ └── binaries    │    └── linux    │    └── 64-bit    │      ├── libupilbuffer4php-alpha1.3.1.so ◀─────── x64 version for Linux    │      └── libupilbuffer4php-alpha1.3.1.ini    │    └── fsdl       ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only)       │       └── binaries          └── linux          └── 64-bit          ├── libfsdl4php-alpha1.3.1.so ◀─────── x64 version for Linux          └── libfsdl4php-alpha1.3.1.ini

Desktop applications: Running a sample program for Java

The following instructions are provided for Eclipse IDE for Java Developers, Mars.1 Release (4.5.1). They can be easily adapted to other Eclipse versions. Java versions currently supported are 1.6, 1.7 and 1.8. Platforms currently supported are Windows 32-bit, Mac OS X 32-bit, Linux 32-bit, and Linux 64-bit.

Prerequisite

  1. Install Java SE Development Kit on your system
  2. Install Eclipse IDE for Java Developers on your system

Setting up the Java project

  1. Run Eclipse and select a workspace.
  2. Select the main menu item File -> New -> Project...
  3. In the Java folder, select Java project and click Next.
  4. Enter the following Project name: SampleFsdlTool (case sensitive). Check Use default location, select Use default JRE, select Create separate folders for sources and class files, and click Finish. If you are invited to Open Associated Perspective, click Yes.
  5. In the Package Explorer, right click on SampleFsdlTool and select the contextual menu item New -> Folder. Enter the following Folder name: fonts and click Finish. Repeat the same operation to create the folder native-lib.
  6. In the Package Explorer, expand SampleFsdlTool, right click on src and select the contextual menu item New -> Folder. Enter the following Folder name: frogans and click Finish. Repeat the same operation to create the folder sampleFsdlTool (case sensitive).
  7. In the Package Explorer, expand SampleFsdlTool and src, right click on frogans and select the contextual menu item New -> Folder. Enter the following Folder name: upil and click Finish. Repeat the same operation to create the folder fsdl.
  8. In the Package Explorer, expand SampleFsdlTool and src, right click on sampleFsdlTool (case sensitive) and select the contextual menu item New -> Folder. Enter the following Folder name: resource and click Finish.

Copying files from the archive file

  1. Download the FSDL Software Library archive file, and uncompress it to a temporary directory. This temporary directory contains the fsdl-software-library-alpha1.3.1 directory. All copies described hereafter are made from the fsdl-software-library-alpha1.3.1 directory, using a file manager (do not use the Package Explorer).
  2. Copy the file reference-implementation/fsdl/binaries/fsdl-fonts.dat to the fonts folder of the Java project.
  3. In this step, the operations depend on your operating system.
    For Windows 32-bit:
    Copy the two files reference-implementation/fsdl/binaries/windows/32-bit/fsdl-alpha1.3.1.dll and wrappers/java/fsdl/binaries/windows/32-bit/fsdl4java-alpha1.3.1.dll to the native-lib folder of the Java project.
    For Mac OS X 32-bit:
    Copy the two files reference-implementation/fsdl/binaries/macosx/32-bit/libfsdl-alpha1.3.1.dylib and wrappers/java/fsdl/binaries/macosx/32-bit/libfsdl4java-alpha1.3.1.dylib to the native-lib folder of the Java project.
    For Linux 32-bit:
    Copy the two files reference-implementation/fsdl/binaries/linux/32-bit/libfsdl-alpha1.3.1.so and wrappers/java/fsdl/binaries/linux/32-bit/libfsdl4java-alpha1.3.1.so to the native-lib folder of the Java project.
    For Linux 64-bit:
    Copy the two files reference-implementation/fsdl/binaries/linux/64-bit/libfsdl-alpha1.3.1.so and wrappers/java/fsdl/binaries/linux/64-bit/libfsdl4java-alpha1.3.1.so to the native-lib folder of the Java project.
  4. Copy the four files UpilBoolean.java, UpilInteger32.java, UpilBuffer.java, and UpilBufferInternals.java, located in the wrappers/java/upil directory, to the src/frogans/upil folder of the Java project.
  5. Copy the two files Fsdl.java and FsdlInternals.java, located in the wrappers/java/fsdl directory, to the src/frogans/fsdl folder of the Java project.
  6. Copy the four files Launch.java, SampleSlideDataManager.java, ImagePanel.java, and ToolException.java, located in the sample-programs/desktop/java/sampleFsdlTool directory, to the src/sampleFsdlTool folder of the Java project.
  7. Copy the three files home.fsdl.tpl, slide2.fsdl.tpl, and world240x240.png, located in the sample-programs/desktop/java/sampleFsdlTool/resource directory, to the src/sampleFsdlTool/resource folder of the Java project.
  8. In the Package Explorer, right click on SampleFsdlTool and select the contextual menu item Refresh.

Configuring the Java project

  1. In the Package Explorer, right click on SampleFsdlTool and select the contextual menu item Properties.
  2. On the left of the Properties window, select Run/Debug Settings and click New.... Select Java Application and click OK.
  3. In the Edit Configuration window, replace the name New_configuration by SampleFsdlTool.
  4. In the Main tab of the Edit Configuration window, click Search, then select Launch - sampleFsdlTool and click OK.
  5. For MacOSX 32-bit only: in the Arguments tab of the Edit Configuration window, enter -d32 in the VM arguments field.
  6. In the Environment tab of the Edit Configuration window, click New... and enter:
    For Windows 32-bit: Name = PATH and Value = ./native-lib
    For Mac OS X 32-bit: Name = DYLD_LIBRARY_PATH and Value = ./native-lib
    For Linux 32-bit and Linux 64-bit: Name = LD_LIBRARY_PATH and Value = ./native-lib
    and click OK.
  7. Click OK on the Edit Configuration window. Click OK on the Properties window.

Running the sample program

  1. In the Package Explorer, expand SampleFsdlTool, src, and sampleFsdlTool.
  2. Select (i.e. double click on) the file Launch.java.
  3. If you are using Java 1.6: in the file Launch.java, replace the two occurrences of JComboBox<String> by JComboBox.
  4. Run.

Note: In the sample program, changes to the content of a text field is taken into account after pressing the Enter key.

Developing your program

You can develop your own program by using the sample program as a starting point.

If a function of the library fails, it always returns a failure code. A failure code is a unique number across the library. It corresponds to a constant indicating what caused the failure. To retrieve a constant corresponding to a failure code, search for the number either:

When developing your program, two exceptions can be raised by the wrapper of the library for Java (JNI wrapper): java.lang.IllegalArgumentException (e.g. if an argument is null) and java.lang.RuntimeException (e.g. if an argument is a class for which a member has not been set).

Using the HTML documentation

The FSDL Software Library archive file contains HTML documentation generated by Javadoc. This HTML documentation is available in the documentation4java.zip archive file located in the fsdl-software-library-alpha1.3.1/wrappers/java/doc directory.

Upgrading the library from a previous version

If you used the same method to set up and configure your Java project as described for the sample program, the way to upgrade the library from a previous version is very simple:

  1. Check that your Java project contains the following folders: fonts, native-lib, src/frogans/upil, and src/frogans/fsdl.
  2. Copy the files as described in steps 1, 2, 3, 4, and 5 of the above section Copying files from the archive file, replacing the old files. You may manually delete the two files corresponding to the previous version of the library in the native-lib folder of your Java project.
  3. Refresh your Java project.

To run the sample program with the new version of the library, copy the files as described in steps 6, 7, and 8 of the above section Copying files from the archive file, replacing the old files.

Packaging your program for distribution

This section will be available in a future release.

Web-based applications: Running a sample program for PHP (Linux 64-bit)

The following instructions are provided for Debian 8. They can easily be adapted to other Linux distributions. PHP versions currently supported are 5.4, 5.5, 5.6, and 7.0. Web server currently supported is Apache 2.

Installing the FSDL Software Library

  1. Become super user:
    $ su -
  2. Install PHP and Apache 2:
    For PHP 5.4, 5.5, and 5.6:
    # apt update
    # apt install php5
    For PHP 7.0:
    # echo "deb http://packages.dotdeb.org jessie all" > /etc/apt/sources.list.d/dotdeb.list
    # wget -O- https://www.dotdeb.org/dotdeb.gpg | apt-key add -
    # apt update
    # apt install apache2
    # apt install php7.0 libapache2-mod-php7.0
  3. Once the installation is complete, check that the PHP version installed is 5.4, 5.5, 5.6, or 7.0:
    # php --version
  4. Download the FSDL Software Library archive file, and uncompress it to a temporary directory.
  5. Go to the temporary directory:
    # cd fsdl-software-library-alpha1.3.1/
  6. Copy the font file to your system:
    # mkdir -p /usr/lib/fsdl/alpha1.3.1
    # cp reference-implementation/fsdl/binaries/fsdl-fonts.dat /usr/lib/fsdl/alpha1.3.1/
  7. Copy the reference implementation to your system:
    # cp reference-implementation/fsdl/binaries/linux/64-bit/libfsdl-alpha1.3.1.so /usr/lib/
  8. Copy the wrapper to your system:
    For PHP 5.4:
    # cp wrappers/php/5.4/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.so /usr/lib/php5/20100525/
    # cp wrappers/php/5.4/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.so /usr/lib/php5/20100525/
    # cp wrappers/php/5.4/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.ini /etc/php5/mods-available/
    # cp wrappers/php/5.4/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.ini /etc/php5/mods-available/
    For PHP 5.5:
    # cp wrappers/php/5.5/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.so /usr/lib/php5/20121212/
    # cp wrappers/php/5.5/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.so /usr/lib/php5/20121212/
    # cp wrappers/php/5.5/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.ini /etc/php5/mods-available/
    # cp wrappers/php/5.5/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.ini /etc/php5/mods-available/
    For PHP 5.6:
    # cp wrappers/php/5.6/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.so /usr/lib/php5/20131226/
    # cp wrappers/php/5.6/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.so /usr/lib/php5/20131226/
    # cp wrappers/php/5.6/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.ini /etc/php5/mods-available/
    # cp wrappers/php/5.6/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.ini /etc/php5/mods-available/
    For PHP 7.0:
    # cp wrappers/php/7.0/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.so /usr/lib/php/20151012/
    # cp wrappers/php/7.0/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.so /usr/lib/php/20151012/
    # cp wrappers/php/7.0/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha1.3.1.ini /etc/php/7.0/mods-available/
    # cp wrappers/php/7.0/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha1.3.1.ini /etc/php/70./mods-available/
  9. Make the wrapper available in your system:
    For PHP 5.4, 5.5, and 5.6:
    - for the CLI:
    # cd /etc/php5/cli/conf.d/
    # ln -s ../../mods-available/libupilbuffer4php-alpha1.3.1.ini 20-libupilbuffer4php-alpha1.3.1.ini
    # ln -s ../../mods-available/libfsdl4php-alpha1.3.1.ini 21-libfsdl4php-alpha1.3.1.ini
    - for Apache 2:
    # cd /etc/php5/apache2/conf.d/
    # ln -s ../../mods-available/libupilbuffer4php-alpha1.3.1.ini 20-libupilbuffer4php-alpha1.3.1.ini
    # ln -s ../../mods-available/libfsdl4php-alpha1.3.1.ini 21-libfsdl4php-alpha1.3.1.ini
    For PHP 7.0:
    - for the CLI:
    # cd /etc/php/7.0/cli/conf.d/
    # ln -s ../../mods-available/libupilbuffer4php-alpha1.3.1.ini 20-libupilbuffer4php-alpha1.3.1.ini
    # ln -s ../../mods-available/libfsdl4php-alpha1.3.1.ini 21-libfsdl4php-alpha1.3.1.ini
    - for Apache 2:
    # cd /etc/php/7.0/apache2/conf.d/
    # ln -s ../../mods-available/libupilbuffer4php-alpha1.3.1.ini 20-libupilbuffer4php-alpha1.3.1.ini
    # ln -s ../../mods-available/libfsdl4php-alpha1.3.1.ini 21-libfsdl4php-alpha1.3.1.ini
  10. Restart Apache 2:
    # service apache2 restart

Installing the sample program

  1. If the Apache 2 default page exists, then use the following command to rename it:
    # mv /var/www/html/index.html /var/www/html/index.save.html
  2. Create a public directory to store the public part of the sample program:
    # mkdir -p /var/www/html/sample-fsdl-tool
  3. Create a public subdirectory to store the generated images:
    # mkdir -p /var/www/html/sample-fsdl-tool/generated-images
    # chmod 777 /var/www/html/sample-fsdl-tool/generated-images
  4. Create a private directory to store the private part of the sample program:
    # mkdir -p /var/www/private/sample-fsdl-tool
  5. Create a private subdirectory to store the resources:
    # mkdir -p /var/www/private/sample-fsdl-tool/resource
  6. Create a private subdirectory to store the interface files for PHP:
    # mkdir -p /var/www/private/sample-fsdl-tool/for-information-only
  7. Return to the temporary directory fsdl-software-library-alpha1.3.1/
  8. Copy the public part of the sample program:
    # cp sample-programs/web-based/php/sampleFsdlTool/index.php /var/www/html/sample-fsdl-tool
    # cp sample-programs/web-based/php/sampleFsdlTool/index-with-trace.php /var/www/html/sample-fsdl-tool
  9. Copy the private part of the sample program:
    # cp sample-programs/web-based/php/sampleFsdlTool/Launch.php /var/www/private/sample-fsdl-tool
    # cp sample-programs/web-based/php/sampleFsdlTool/SampleSlideDataManager.php /var/www/private/sample-fsdl-tool
    # cp sample-programs/web-based/php/sampleFsdlTool/ToolException.php /var/www/private/sample-fsdl-tool
    # cp sample-programs/web-based/php/sampleFsdlTool/resource/home.fsdl.tpl /var/www/private/sample-fsdl-tool/resource
    # cp sample-programs/web-based/php/sampleFsdlTool/resource/slide2.fsdl.tpl /var/www/private/sample-fsdl-tool/resource
    # cp sample-programs/web-based/php/sampleFsdlTool/resource/world240x240.png /var/www/private/sample-fsdl-tool/resource
  10. Copy the interface files for PHP:
    For PHP 5.4:
    # cp wrappers/php/5.4/non-zts/fsdl/Fsdl.php /var/www/private/sample-fsdl-tool/for-information-only
    # cp wrappers/php/5.4/non-zts/upil/UpilBuffer.php /var/www/private/sample-fsdl-tool/for-information-only
    For PHP 5.5:
    # cp wrappers/php/5.5/non-zts/fsdl/Fsdl.php /var/www/private/sample-fsdl-tool/for-information-only
    # cp wrappers/php/5.5/non-zts/upil/UpilBuffer.php /var/www/private/sample-fsdl-tool/for-information-only
    For PHP 5.6:
    # cp wrappers/php/5.6/non-zts/fsdl/Fsdl.php /var/www/private/sample-fsdl-tool/for-information-only
    # cp wrappers/php/5.6/non-zts/upil/UpilBuffer.php /var/www/private/sample-fsdl-tool/for-information-only
    For PHP 7.0:
    # cp wrappers/php/7.0/non-zts/fsdl/Fsdl.php /var/www/private/sample-fsdl-tool/for-information-only
    # cp wrappers/php/7.0/non-zts/upil/UpilBuffer.php /var/www/private/sample-fsdl-tool/for-information-only

Running the sample program

  1. Open a Web browser on your system
  2. To run the program normally, enter the URL: http://localhost/sample-fsdl-tool/index.php
  3. To run the program with debug information, enter the URL: http://localhost/sample-fsdl-tool/index-with-trace.php
  4. Click on the links to change the slide or display the query fields in the URL.
  5. The query fields in the URL are organized as follows:

    applicability field name description value
    always slide slide reference 0: home slide
    1: second slide
    if slide=0
    if slide=0
    if slide=0
    if slide=0
    if slide=0
    opacity1
    text1
    text2
    angle4
    opacity4
    layer1 opacity
    restext1 characters
    restext2 characters
    layer4 angle
    layer4 opacity
    between 0 and 100
    UTF-8 encoded
    UTF-8 encoded
    between -180 and 180
    between 0 and 100
    if slide=1
    if slide=1
    if slide=1
    if slide=1
    if slide=1
    color1
    blur1
    opacity1
    pos2
    pos4
    resdraw1 color
    setshadow1 blur
    setshadow1 opacity
    layer2 position
    layer4 position
    rrggbb (hex digits)
    between 0 and 32
    between 0 and 100
    x,y
    x,y
    x is between -640 and 1280
    y is between -480 and 960

    Examples:

    index.php?slide=0&opacity1=75&text1=Hello%20World!&text2=Hello%20World!&angle4=0&opacity4=100
    index.php?slide=1&color1=98000a&blur1=5&opacity1=80&pos2=430,240&pos4=120,240

  6. If you want to run the sample program via CLI, use this command in order to pass query fields:
    $ php -e -r 'parse_str("queryfields", $_GET); include "index.php";'

Developing your program

You can develop your own program by using the sample program as a starting point.

If a function of the library fails, it always returns a failure code. A failure code is a unique number across the library. It corresponds to a constant indicating what caused the failure. To retrieve a constant corresponding to a failure code, search for the number in the Fsdl.php file (the interface file for PHP that is provided for information only).

Using the HTML documentation

The FSDL Software Library archive file contains HTML documentation generated by phpDocumentor. This HTML documentation is available in the documentation4php.zip archive file located, depending on your version of PHP:
For PHP 5.4: in the fsdl-software-library-alpha1.3.1/wrappers/php/5.4/non-zts/doc directory
For PHP 5.5: in the fsdl-software-library-alpha1.3.1/wrappers/php/5.5/non-zts/doc directory
For PHP 5.6: in the fsdl-software-library-alpha1.3.1/wrappers/php/5.6/non-zts/doc directory
For PHP 7.0: in the fsdl-software-library-alpha1.3.1/wrappers/php/7.0/non-zts/doc directory

Upgrading the library from a previous version

The way to upgrade the library from a previous version is very simple:

  1. Copy the files as described in steps 4, 5, 6, and 7 of the above section Installing the FSDL Software Library. You may manually delete the files corresponding to the previous version of the library in the /usr/lib and /usr/lib/fsdl directories.
  2. Copy the files as described in steps 8 and 9 of the above section Installing the FSDL Software Library.
  3. Because of a PHP limitation, two versions of the wrapper of the library cannot coexist on a server. Therefore, you must delete the files corresponding to the previous version of the library in the following directories (where applicable):
    For PHP 5.4: /usr/lib/php5/20100525, /etc/php5/mods-available, /etc/php5/cli/conf.d, and /etc/php5/apache2/conf.d
    For PHP 5.5: /usr/lib/php5/20121212, /etc/php5/mods-available, /etc/php5/cli/conf.d, and /etc/php5/apache2/conf.d
    For PHP 5.6: /usr/lib/php5/20131226, /etc/php5/mods-available, /etc/php5/cli/conf.d, and /etc/php5/apache2/conf.d
    For PHP 7.0: /usr/lib/php/20151012, /etc/php/mods-available, /etc/php/7.0/cli/conf.d, and /etc/php/7.0/apache2/conf.d
  4. Restart Apache 2 as described in step 10 of the above section Installing the FSDL Software Library.
  5. In your program, when creating slide handles, in the configuration, you must set the value of the fontsFileDirectory field to /usr/lib/fsdl/alpha1.3.1/.
  6. See step 10 in the above section Installing the sample program to get the new interface files for PHP (for information only).

FSDL Software Library
Version: alpha1.3.1

Copyright ©1999-2016 OP3FT
All rights reserved

The FSDL Software Library (the "Software") is developed by and belongs to the OP3FT.

The archive file of the Software includes the reference implementation, its wrappers, and sample programs.

The Software must be used in compliance with the Frogans Technology User Policy, accessible at the following permanent URL: https://www.frogans.org/en/resources/ftup/access.html.

By downloading and using the Software, you agree to and undertake to be bound by the version in force of the Frogans Technology User Policy.

Sample programs included in the "sample-programs" directory in the archive file are provided by the OP3FT to help you create your own programs. You are free to use, copy, distribute, modify, adapt, or share these sample programs.

The Software uses third-party source materials which are credited in the "COPYRIGHT-AND-LICENSE" directory available in the archive file of the Software.

©2012-2018 OP3FT - Home - Legal information