free
This is our archive, please go to the main forum page for the latest discussions and news about free web hosting.


phpCompile php2exe php5 compatible

krakjoe
June 23rd, 2007, 18:27
I'm very very tired and falling asleep, so I'll post something I wrote earlier and answer any questions you might have ....

------------------------------------------------
phpCompile v2 Beta 4.0.2 :: PHP Version : 5.2.1
Written by Joe Watkins - krakjoe.com
Thanks to Rubem Pechansky - winbinder.org
------------------------------------------------
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
-bcompile|b Files matching this pattern will be bcompiled
-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


http://krakjoe.com/projects/phpCompile-Beta
Anyone who knows php should check out http://winbinder.org also

While I say it's beta it's good enough to pack itself and that's when I released the last code I had so ...... have fun.......

Lastly, dont waste words if you have a question make sure I didn't answer somewhere already by reading everything that is readable before asking me.....

@mods can you move this post to Ads & Offers I posted it in wrong place and wanna sleep, please delete this line of nonsense too......

krakjoe
June 27th, 2007, 02:54
------------------------------------------------
phpCompile v2 Beta 4.1.2 :: 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
bcompiler - bcompiler extension
tokenizer - bcompiler needs

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
-bcompile|b DOS wildcards or 'all' to bcompile all php code
-ico Icon for executable
-ignore|i Ignore files matching dos wilcards
-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 stdout
-if Dump functions to stdout
-io Dump classes to stdout

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
-bcompile -b

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 -bcompile :

You can enter as many patterns as you want to match files while packing, if a filename matches this pattern
the file will be written as bytecodes, alternatively to pack anything that the compiler can see as php ( ie
anything that begins with <? ) specify -b|bcompile=all at the command line

About -output :

You should steer clear of attempting to output the executable in the same directory structure as the source
for the executable.
If the file you specify at command is not writable, phpCompile will try another name, but only once
so be careful when specifying the path and location of the executable.

About -ext :

Extensions can be anywhere on your filesystem, you should be able to load most any of them from the internal
loader, you should NOT attempt to use dl() in your programs

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

Forever coding krakjoe........


Various updates and improvements have taken place .....

Mentok
June 27th, 2007, 03:49
This really is a great programme Joe, I think I'll stick with the one with the GUI.

You should be proud of yourself ;).

Starcraftmazter
June 27th, 2007, 03:53
You're a bloody genius mate!

krakjoe
June 27th, 2007, 04:21
This really is a great programme Joe, I think I'll stick with the one with the GUI.

You should be proud of yourself ;).

Thanks, I am :angel:

Also, the winbinder guy, Rubem who is the main c programmer for winbinder has agreed to make a gui for it, partly on account of my incapacity to be creative....and also, he created winbinder and can get more out of it than I can, I know it, and better everyday, but not nearly as well as him, the one your using atm uses a php4 stub, this one uses php5.2.1 so when you need php 5 you'll have to swap because I won't be working on the older one anymore as php4 is pretty much outdated.....but by that time there will be a gui, and it'll be better than the first ....... that's nearly a year old now ......

There is more features / plans for features for this one, for instance, being able to brand the exe's properly will be cool, with version numbers and company name and stuff
I wanna be able to load rcdata and get the images out for use in wb so you can pack resources into the executables. edit - I can do that
I wanna be able to pack phpCompile.dll ( optionally ) into a stub, and have the stub load it into the memory - with this and being able to load images, we'll have truly standalone executables
Icons I will be able to change, on the list too .....
Eventually, because I'm using bcompiler ( or can use ), I will make a licensing module to create time limited executables and trial products

You're a bloody genius mate!

Thanks very much :beer:

Mentok
June 27th, 2007, 05:13
Well, I still have a lot to learn about winbinder - I only know the very basics and have only written 2 programmes.

I'm looking to do a simple task reminder one, but even that's too complicated. Is it even possible to use a tray icon with winbinder?

krakjoe
June 27th, 2007, 05:19
check out tray_popup.phpw in the examples folder of winbinder

Mentok
June 27th, 2007, 05:20
Will do, thanks.

iBrightDev
June 27th, 2007, 10:06
what a great program Joe. i will have to download yours and winbinder and compare. great job bro.

krakjoe
June 27th, 2007, 11:04
what a great program Joe. i will have to download yours and winbinder and compare. great job bro.

WB dosn't come with the equipment to pack executables, there are a couple of others but none support such a robust version of php5, and none have such a good console, and none were written by me ......

Also, when wb does have a compiler it will be phpCompile, Rubem said when I made the last version he wanted me to make it the official compiler for wb - when I make some changes and make a console, that's what I did .......

There is still quite a lot to do, the version will go to beta 10 before it's ready to make release quality exe's but it works well enough to pack itself already and can pack any code that comes with winbinder

Thanks for the compliments :angel:

krakjoe
June 27th, 2007, 16:54
v4.1.4 can load images from inside the exe with wb's standard functions ..... no need for external files anymore ......excpet phpCompile.dll and I'm working on that too ..

krakjoe
December 3rd, 2007, 20:00
Back to 4.0.1 can be downloaded from http://interviolet.com if anyone has 4.1.8 please forward to me ... pretty please ....

iBrightDev
December 4th, 2007, 10:10
now that i am upgrading to php5 on my server, i might have to test this program out.

krakjoe
December 6th, 2007, 06:55
Found 4.1.6


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

------------------------------------------------
Parameters Description
------------------------------------------------
-main -m Main script [ required ]
-project -p Project sources [ optional ]
-include -I Include directory [ optional ]
-add -a Include file [ optional ]
-output -o Output EXE [ optional ]
-ext -e Include DSO [ optional ]
-bcompile -b Compile [ optional, wilcards ]
-ico Icon [ optional ]
-ignore -i Ignore [ optional, wilcards ]
-subsystem Set subsystem [ optional ]
-w Windows subsystem [ optional ]
-c Console subsystem [ optional ]
------------------------------------------------

------------------------------------------------
First Arg Output
------------------------------------------------
-iv phpCompile version
-ie PHP version
-ic Constants list
-if Functions list
-io Classes list
-ix DSO list
------------------------------------------------

------------------------------------------------
phpCompile (c) Joe Watkins 2007 - 2017
PHP (c) 1999 - 2006 The PHP Group
------------------------------------------------




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
-bcompile -b

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 -bcompile :

You can enter as many patterns as you want to match files while packing, if a filename matches this pattern
the file will be written as bytecodes, alternatively to pack anything that the compiler can see as php ( ie
anything that begins with <? ) specify -b|bcompile=all at the command line

About -output :

You should steer clear of attempting to output the executable in the same directory structure as the source
for the executable.
If the file you specify at command is not writable, phpCompile will try another name, but only once
so be careful when specifying the path and location of the executable.

About -ext :

Extensions can be anywhere on your filesystem, you should be able to load most any of them from the internal
loader, you should NOT attempt to use dl() in your programs

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

Forever coding krakjoe........


download from interviolet.com

krakjoe
January 2nd, 2008, 21:23
The work continues on this project, only for the moment untill I polish the code and find a way to never loose the sources again, it'll be web based @ http://php2exe.com Same php version ( 5.2.1 ) + the ability to apply icons to executables which wasn't finished in console ....





  
  News · Search free hosts · Free file hosting · Free image hosting · Reviews · Forums · Related Links · Advertising Info · Contact Us


Copyright © 1996-2008 Per Olof Sandholm. All rights reserved. Privacy Statement

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum