• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Your first windows application, written in PHP ONLY !!

phpCompile can be downloaded from http://interviolet.com the others are all lost, and I'll write some more examples when I have time to do so ... I think Colin might have some example winbinder code that he could contribute, he might even have utube.zip ....
 
I don't think I've kept it, I'll have a look though.

The best place to get examples is from www.winbinder.org, download the programme and look at the installed folders (should be one called "examples").
 
I found a version of phpCompile-Beta v4.0.1 - the latest was 4.1.8 however this is the only one I can find ... still uses php5.2.1 and works with winbinder, although is probably quite buggy ...

http://interviolet.com/downloads/

------------------------------------------------
phpCompile v2 Beta 4.0.1 :: PHP Version : 5.2.1
Written by Joe Watkins - krakjoe.com
Thanks to Rubem Pechansky - winbinder.org
------------------------------------------------

Extensions loaded :

cipher - simple xor cipher extension
date - standard date extension
dl_memory - allows stub to load normal php extensions
pcre - standard pcre extension
standard - standard php extension
win32 - select functions from win32std
winbinder - latest winbinder extension

Arguments Required :
-main|m Main script for project

Optional Arguments :
-project|p Project sources
-include|I Pack extra includes from directory
-add|a Add file to exe
-output|o default : $main.exe ( without .php )
-ext|e Add ext to executable
-ico Icon for executable
-ignore|i Ignore files matching pattern
-w Use windows subsystem
-c Use console subsystem
-subsystem console|windows, default : console

Information Arguments :
-iv Print phpCompile version
-ie Print PHP version
-ic Dump constants to stdin
-if Dump functions to stdin
-io Dump classes to stdin

Integration Arguments :
@serial Takes a base64_encode()'d array
~C:\inifile Takes location of ini file


Some example usage :

phpCompile -c -m=myscript.php
Will pack myscript.php into a console executable by itself named myscript.exe

phpCompile -w -p=ProjectSources -m=ProjectMain.php
Will pack all files in ProjectSources into an executable named ProjectMain.exe
with ProjectMain.php as main script

phpCompile -m=myscript
Will pack myscript.php(w) into a console executable by itself named myscript.exe

phpCompile -m=myscript -I=C:\winbinder\phpcode\include -w
Will pack all of winbinders includes, so you can include( 'winbinder.php' );
and set the main script to myscript.php(w) in an executable named myscript.exe using
the windows subsystem

phpCompile -m=myscript -a=C:\snippets\mysnippet.php
Will make an exe named myscript.exe, set main to myscript.php(w) and include mysnippet.php
so you can include('mysnippet.php');

phpCompile -p=myproject -i=.bmp -m=main
Will make an exe named main.exe, set the main script to main.php(w), all files from myproject
will be packed into the exe, except for those mathing .bmp

Notes :

You may omit .php or .phpw from your main script, phpCompile will search for .php first then .phpw
If you specify a project directory, your main script is expected to be found inside that directory
You can use (almost) any extension compatiable with php-5.2.1, download the windows binaries from php.net

Parameters you can use more than once per operation :

-include -I
-add -a
-ignore -i
-ext -e

About -add :

Files you specify here will be available in your executable at the "root" of the php source structure, so for example
if you add C:\snippets\highlight_c_source.php you can access it in your scripts with include( 'highlight_c_source.php' );

About -include :

Directories you specify here will be packed into the executable recursively, the same as -project directory, only you can
use as many as you want, paths will be relative to the -include

About -am :

Manifest update tool, usage :
phpCompile -am C:\projects\mine\myFile.exe C:\projects\mine\myFile.exe.manifest
Use this tool AT YOUR OWN RISK


As of now, that's it folks, be back soon, and for god sake report bugs.

Forever coding krakjoe........

PS Wine can execute this version of phpCompile-Beta, it cannot execute winbinder code though ... that relies to much on the winapi and phpCompile does not ( too much ) ... wine can also execute the executables it creates on linux ...
 
Last edited:
I just installed the WinBinder and tried the sample programs that came with that, its a good tool. I now finally found a way to create applications without compiling in one of my favorite programming language.

Thanks!
 
Back
Top