All you need is:
@echo off embeder.exe new myapp embeder.exe main myapp main.php embeder.exe add myapp include.inc
myapp.exe
<? function hello() { echo "Hello people !"; } ?>
<? function _f($file) { return defined('EMBEDED')?'res:///PHP/'.md5($file):$file; } include _f('include.inc'); hello(); ?>
As you noticed the included file is wrapped by the _f function. This function returns the correct filename according to the EMBEDED constant which is automatically defined when your script is embedded in the exe.
You can then run make.bat to create the executable file and you’re ready to run the exe.
If that fail it’s probably because the php-embed.ini is not in (in the correct order):
If you use a GUI you probably want to get rid of the DOS box, there’s currently no direct support for that in embeder but I’ve also released a port of Perl's exetype that has the abilty change the ‘type’ of an exe, in our case from CONSOLE (the default exe type created by embeder) to WINDOWS (console-less).
Currently the only way to install the PHP binaries is to use the PHP installer.
I dream about something like a PHP redistribuable that will install PHP and the usefull extensions used in client-side scripting.