Version: Alpha 0.16.1
Release date: May 16, 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 version 0.16.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:
- The FSDL 3.0 language
You can suggest improvements in the design of FSDL, such as:
- changes to the minimum, maximum, and default values of attributes
- changes to applicability rules for attributes
- new Frogans slide rendering constraints (intended to ensure useability for end-users)
- The implementation of the FSDL Software Library
You can suggest improvements or report errors in the implementation of the FSDL Software Library, in areas such as:
- validation of FSDL documents (including error messages)
- rendering of Frogans slides
- the Application Programming Interface (API)
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
- Windows 2000
- Windows XP
- Windows Vista
- Windows 7
- Windows 8
- Windows 8.1
- Windows 10
Mac OS X 32-bit
- Mac OS 10.6.6
- Mac OS 10.7
- Mac OS 10.8
- Mac OS 10.9
- Mac OS 10.10
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:
- C
- C++
- Java 1.6, 1.7, 1.8
- Objective C
- PHP 5.4, 5.5, 5.6, 7.0 (Linux 64-bit only)
Support for the following operating systems is under development and will be available soon:
- Windows 64-bit
- Mac OS X 64-bit
Support for the following programming languages is under development and will be available soon:
- C# (.NET)
- Node.js
- Pascal (Delphi, FPC)
- Python
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 the graphical elements of
FSDL 3.0.
It does not implement dynamic elements of FSDL.
The following elements are available for testing: <frogans-fsdl>, <file>, <resimage>, <respixels>, <resdraw>, <respath>, <setfont>, <font>, <restext>, <text>, <setfilter>, <filter>, <setrelief>, <relief>, <setshadow>, <shadow>, <resmerge>, <merge>, <layer>, <button>, and <next>.
This version does not manage Frogans slide rendering constraints (intended to ensure useability for end-users), which are currently under discussion.
Future versions of the FSDL Software Library will support dynamic elements of FSDL.
Change log:
Changes between 0.15.1 and 0.16.1:
- Change in the FSDL Software Library: In order to give developers better control over the rendering of Frogans slides, the interface of the library has been enhanced in the rendering section: rendering modes have been reorganized; a new parameter has been added to the function used to perform the rendering; a new record has been added to manage areas in the rendering canvas and the rollover record has been modified accordingly; the composition record has been replaced by the representation record; the width and height of representations are always equal to 640 and 480 respectively (cropping is no longer applied); a rendered slide record has been added and the function used to get a rendering canvas has been replaced by the function used to get a rendered slide; the prepared resource record has been added and the function used to get a prepared resource has been modified accordingly; the layer record has been added and the function used to get a layer has been modified accordingly. If you have already developed a program calling the library, you must update your code to reflect these changes.
- The file containing the fonts defined in FSDL 3.0 has been reorganized internally, without modifying the existing fonts. If you are using a previous version of the library, you must follow the instructions in the "Upgrading the library from a previous version" section below for your programming language (otherwise the function used to initialize the library can fail, or the function used to perform the rendering can return an internal failure code).
Known issues (as of May 16, 2016):
- The second and third steps in the optimization of the FSDL Software Library have not been completed yet. (The second step consists in optimizing processes implemented in low-level functions, and the third step consists in optimizing the overall process for parsing and rendering Frogans slides.) Therefore, parsing and rendering can be slow. The release version of the FSDL Software Library will be significantly faster. As a reminder, the first step was completed with alpha version 0.1.7 of Frogans Player for Developers. (This step consisted in enabling options that control optimization when compiling the Frogans Player runtime engine, which is written in C and embeds the FSDL Software Library.)
- The error reporting system of the XML parser and the FSDL validator can generate incomplete or inaccurate messages.
- Since Frogans slide rendering constraints are not managed yet, internal rendering errors can still occur. Such an error can occur, for example, if the lead or the vignette representation of the Frogans slide is unintentionally authored to be fully transparent, or if the placement of a button prevents it from being visible.
Download
- FSDL Software Library (archive in 7z format): fsdl-software-library-alpha0.16.1.7z - 38.3 MB - [ SHA1 ]
- FSDL Software Library (archive in tarball format): fsdl-software-library-alpha0.16.1.tar.gz - 58.8 MB - [ SHA1 ]
- FSDL Software Library (archive in zip format): fsdl-software-library-alpha0.16.1.zip - 58.9 MB - [ SHA1 ]
Instructions
For a video presentation on the FSDL Software Library and how to create desktop and Web-based applications, watch the presentations given during the Frogans Technology Conference 6, available at conference.frogans.org.
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-alpha0.16.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-alpha0.16.1.dll ◀─────── x86 version for Windows │ │ └── fsdl-alpha0.16.1.lib │ ├── macosx │ │ └── 32-bit │ │ └── libfsdl-alpha0.16.1.dylib ◀─────── x86 version for Mac OS X │ └── linux │ ├── 32-bit │ │ └── libfsdl-alpha0.16.1.so ◀─────── x86 version for Linux │ └── 64-bit │ └── libfsdl-alpha0.16.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-alpha0.16.1.dll ◀─────── x86 version for Windows │ ├── macosx │ │ └── 32-bit │ │ └── libfsdl4java-alpha0.16.1.dylib ◀─────── x86 version for Mac OS X │ └── linux │ ├── 32-bit │ │ └── libfsdl4java-alpha0.16.1.so ◀─────── x86 version for Linux │ └── 64-bit │ └── libfsdl4java-alpha0.16.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-alpha0.16.1.so ◀─────── x64 version for Linux │ │ └── libupilbuffer4php-alpha0.16.1.ini │ │ │ └── fsdl │ ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │ │ │ └── binaries │ └── linux │ └── 64-bit │ ├── libfsdl4php-alpha0.16.1.so ◀─────── x64 version for Linux │ └── libfsdl4php-alpha0.16.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-alpha0.16.1.so ◀─────── x64 version for Linux │ │ └── libupilbuffer4php-alpha0.16.1.ini │ │ │ └── fsdl │ ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │ │ │ └── binaries │ └── linux │ └── 64-bit │ ├── libfsdl4php-alpha0.16.1.so ◀─────── x64 version for Linux │ └── libfsdl4php-alpha0.16.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-alpha0.16.1.so ◀─────── x64 version for Linux │ │ └── libupilbuffer4php-alpha0.16.1.ini │ │ │ └── fsdl │ ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │ │ │ └── binaries │ └── linux │ └── 64-bit │ ├── libfsdl4php-alpha0.16.1.so ◀─────── x64 version for Linux │ └── libfsdl4php-alpha0.16.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-alpha0.16.1.so ◀─────── x64 version for Linux │ └── libupilbuffer4php-alpha0.16.1.ini │ └── fsdl ├── Fsdl.php ◀─────── Library's interface file for PHP (for information only) │ └── binaries └── linux └── 64-bit ├── libfsdl4php-alpha0.16.1.so ◀─────── x64 version for Linux └── libfsdl4php-alpha0.16.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
- Install Java SE Development Kit on your system
- Install Eclipse IDE for Java Developers on your system
Setting up the Java project
- Run Eclipse and select a workspace.
- Select the main menu item File -> New -> Project...
- In the Java folder, select Java project and click Next.
- 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.
- 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.
- 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).
- 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.
- 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
- Download the FSDL Software Library archive file, and uncompress it to a temporary directory. This temporary directory contains the fsdl-software-library-alpha0.16.1 directory. All copies described hereafter are made from the fsdl-software-library-alpha0.16.1 directory, using a file manager (do not use the Package Explorer).
- Copy the file reference-implementation/fsdl/binaries/fsdl-fonts.dat to the fonts folder of the Java project.
- 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-alpha0.16.1.dll and wrappers/java/fsdl/binaries/windows/32-bit/fsdl4java-alpha0.16.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-alpha0.16.1.dylib and wrappers/java/fsdl/binaries/macosx/32-bit/libfsdl4java-alpha0.16.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-alpha0.16.1.so and wrappers/java/fsdl/binaries/linux/32-bit/libfsdl4java-alpha0.16.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-alpha0.16.1.so and wrappers/java/fsdl/binaries/linux/64-bit/libfsdl4java-alpha0.16.1.so to the native-lib folder of the Java project. - 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.
- 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.
- 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.
- 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.
- In the Package Explorer, right click on SampleFsdlTool and select the contextual menu item Refresh.
Configuring the Java project
- In the Package Explorer, right click on SampleFsdlTool and select the contextual menu item Properties.
- On the left of the Properties window, select Run/Debug Settings and click New.... Select Java Application and click OK.
- In the Edit Configuration window, replace the name New_configuration by SampleFsdlTool.
- In the Main tab of the Edit Configuration window, click Search, then select Launch - sampleFsdlTool and click OK.
- For MacOSX 32-bit only: in the Arguments tab of the Edit Configuration window, enter -d32 in the VM arguments field.
- 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. - Click OK on the Edit Configuration window. Click OK on the Properties window.
Running the sample program
- In the Package Explorer, expand SampleFsdlTool, src, and sampleFsdlTool.
- Select (i.e. double click on) the file Launch.java.
- If you are using Java 1.6: in the file Launch.java, replace the two occurrences of JComboBox<String> by JComboBox.
- 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:
- in the Fsdl.java file, or
- in the Constant Field Values page of the Javadoc documentation (constant-values.html)
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-alpha0.16.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:
- Check that your Java project contains the following folders: fonts, native-lib, src/frogans/upil, and src/frogans/fsdl.
- 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.
- 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
- Become super user:
$ su - - Install PHP:
For PHP 5.4, 5.5, and 5.6:
# apt-get 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 php7.0 libapache2-mod-php7.0
- Once the installation is complete, check that the PHP version installed is 5.4, 5.5, 5.6, or 7.0:
# php --version - Download the FSDL Software Library archive file, and uncompress it to a temporary directory.
- Go to the temporary directory:
# cd fsdl-software-library-alpha0.16.1/ - Copy the font file to your system:
# mkdir -p /usr/lib/fsdl/alpha0.16.1
# cp reference-implementation/fsdl/binaries/fsdl-fonts.dat /usr/lib/fsdl/alpha0.16.1/ - Copy the reference implementation to your system:
# cp reference-implementation/fsdl/binaries/linux/64-bit/libfsdl-alpha0.16.1.so /usr/lib/ - Copy the wrapper to your system:
For PHP 5.4:
# cp wrappers/php/5.4/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.so /usr/lib/php5/20100525/
# cp wrappers/php/5.4/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.so /usr/lib/php5/20100525/
# cp wrappers/php/5.4/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.ini /etc/php5/mods-available/
# cp wrappers/php/5.4/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.ini /etc/php5/mods-available/
For PHP 5.5:
# cp wrappers/php/5.5/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.so /usr/lib/php5/20121212/
# cp wrappers/php/5.5/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.so /usr/lib/php5/20121212/
# cp wrappers/php/5.5/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.ini /etc/php5/mods-available/
# cp wrappers/php/5.5/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.ini /etc/php5/mods-available/
For PHP 5.6:
# cp wrappers/php/5.6/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.so /usr/lib/php5/20131226/
# cp wrappers/php/5.6/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.so /usr/lib/php5/20131226/
# cp wrappers/php/5.6/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.ini /etc/php5/mods-available/
# cp wrappers/php/5.6/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.ini /etc/php5/mods-available/
For PHP 7.0:
# cp wrappers/php/7.0/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.so /usr/lib/php/20151012/
# cp wrappers/php/7.0/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.so /usr/lib/php/20151012/
# cp wrappers/php/7.0/non-zts/fsdl/binaries/linux/64-bit/libfsdl4php-alpha0.16.1.ini /etc/php/mods-available/
# cp wrappers/php/7.0/non-zts/upil/binaries/linux/64-bit/libupilbuffer4php-alpha0.16.1.ini /etc/php/mods-available/
- 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-alpha0.16.1.ini 20-libupilbuffer4php-alpha0.16.1.ini
# ln -s ../../mods-available/libfsdl4php-alpha0.16.1.ini 21-libfsdl4php-alpha0.16.1.ini
- for Apache 2:
# cd /etc/php5/apache2/conf.d/
# ln -s ../../mods-available/libupilbuffer4php-alpha0.16.1.ini 20-libupilbuffer4php-alpha0.16.1.ini
# ln -s ../../mods-available/libfsdl4php-alpha0.16.1.ini 21-libfsdl4php-alpha0.16.1.ini
For PHP 7.0:
- for the CLI:
# cd /etc/php/7.0/cli/conf.d/
# ln -s ../../../mods-available/libupilbuffer4php-alpha0.16.1.ini 20-libupilbuffer4php-alpha0.16.1.ini
# ln -s ../../../mods-available/libfsdl4php-alpha0.16.1.ini 21-libfsdl4php-alpha0.16.1.ini
- for Apache 2:
# cd /etc/php/7.0/apache2/conf.d/
# ln -s ../../../mods-available/libupilbuffer4php-alpha0.16.1.ini 20-libupilbuffer4php-alpha0.16.1.ini
# ln -s ../../../mods-available/libfsdl4php-alpha0.16.1.ini 21-libfsdl4php-alpha0.16.1.ini
- Restart Apache 2:
# service apache2 restart
Installing the sample program
- 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 - Create a public directory to store the public part of the sample program:
# mkdir -p /var/www/html/sample-fsdl-tool - 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 - Create a private directory to store the private part of the sample program:
# mkdir -p /var/www/private/sample-fsdl-tool - Create a private subdirectory to store the resources:
# mkdir -p /var/www/private/sample-fsdl-tool/resource - Create a private subdirectory to store the interface files for PHP:
# mkdir -p /var/www/private/sample-fsdl-tool/for-information-only - Return to the temporary directory fsdl-software-library-alpha0.16.1/
- 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 - 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 - 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
- Open a Web browser on your system
- To run the program normally, enter the URL: http://localhost/sample-fsdl-tool/index.php
- To run the program with debug information, enter the URL: http://localhost/sample-fsdl-tool/index-with-trace.php
- Click on the links to change the slide or display the query fields in the URL.
- The query fields in the URL are organized as follows:
applicability field name description value always slide slide reference 0: home slide
1: second slideif slide=0
if slide=0
if slide=0
if slide=0
if slide=0opacity1
text1
text2
angle4
opacity4layer1 opacity
restext1 characters
restext2 characters
layer4 angle
layer4 opacitybetween 0 and 100
UTF-8 encoded
UTF-8 encoded
between -180 and 180
between 0 and 100if slide=1
if slide=1
if slide=1
if slide=1
if slide=1color1
blur1
opacity1
pos2
pos4resdraw1 color
setshadow1 blur
setshadow1 opacity
layer2 position
layer4 positionrrggbb (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 960Examples:
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 - 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-alpha0.16.1/wrappers/php/5.4/non-zts/doc directory
For PHP 5.5: in the fsdl-software-library-alpha0.16.1/wrappers/php/5.5/non-zts/doc directory
For PHP 5.6: in the fsdl-software-library-alpha0.16.1/wrappers/php/5.6/non-zts/doc directory
For PHP 7.0: in the fsdl-software-library-alpha0.16.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:
- 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.
- Copy the files as described in steps 8 and 9 of the above section Installing the FSDL Software Library.
- 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 - Restart Apache 2 as described in step 10 of the above section Installing the FSDL Software Library.
- In your program, when creating slide handles, in the configuration, you must set the value of the fontsFileDirectory field to /usr/lib/fsdl/alpha0.16.1/.
- See step 10 in the above section Installing the sample program to get the new interface files for PHP (for information only).
Legal information / Credits
FSDL Software Library
Version: alpha0.16.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.
© OP3FT - Home - Legal information