Compiling a Desktop GUI Application in Unix is the same as compiling a normal console application, with the addition of the –gui command line option. This option ensures the correct libraries are linked into the final executable.
You should specify the project main file as the first source file on the command line, then list all additional source files to be compiled.
pcc --gui gtkmain.php pfile1.php pfile2.php
On Windows you can also use the –resource option to specify a Windows Resource file that can be compiled in with the project. In this way an icon can be compiled into the resulting .EXE file.
Assuming the following example resource file sample.rc contains:
1 ICON "C:\\roadsend\\projects\\php_file.ico"
You can use the following command in the Roadsend Commandline to produce a desktop GUI application with an icon in Windows:
pcc --gui --resource sample.rc gtkmain.php
The Roadsend Studio IDE does this automatically when you select an icon file in the Project Properties - Project Options.
For instructions on deploying with the Roadsend Studio IDE on Windows, see Deploying Your Project
On Unix, you may either link statically or include the necessary runtime libraries.
The appropriate Roadsend runtime libraries can be found in the runtime package, freely available on the roadsend.com website.
Other possible libraries required for a PHP-GTK application include the GTK, Glade and/or related graphics libraries for your distribution.