PHP WinBinder 2: Introduction: Difference between revisions

Proofreading and grammatical changes; some minor reformatting
(Proofreading and grammatical changes; some minor reformatting)
Line 2: Line 2:
'''''WinBinder Part 2'''''
'''''WinBinder Part 2'''''
== Introduction ==
== Introduction ==
I like alternatives and options! In my original [[PHP WinBinder: Introduction | WinBinder tutorial]] I avoided compiling because there was no real need and it would have introduced another level of complexity.
I like alternatives and options! In my original [[PHP WinBinder: Introduction | WinBinder tutorial]], I avoided compiling because there was no real need and it would have introduced another level of complexity.


In reality that complexity is a myth because there is an excellent utility PHC-Win, a PHP compiler with WinBinder front end. All it takes is a few mouse clicks to compile a complete project this utility is an excellent piece of work by Andrew Fitzgerald “frantic”. All PHP files are compiled into a nativePHP format greatly reducing their size these are then compiled into a single file.  
In reality that complexity is a myth, because there is an excellent utility called PHC-Win, a PHP compiler with a WinBinder front end. All it takes is a few mouse clicks to compile a complete project. This utility is an excellent piece of work by Andrew Fitzgerald (“frantic”). All PHP files are compiled into a nativePHP format, greatly reducing their size. These are then compiled into a single file.  


You may be wondering how this relates to UniServer? My original tutorial concluded with an alternative Uniform Server controller that is modifiable to meets your own requirements. However the tutorial skipped a need to explore programming Windows applications independent of Uniform Server.
You may be wondering how this relates to UniServer? My original tutorial concluded with an alternative Uniform Server controller that is modifiable to meet your own requirements. However the tutorial skipped a need to explore programming Windows applications independent of Uniform Server.


To address this I have repackaged the newest release of WinBinder and converted it to be fully portable. For completeness included PHC-Win as a separate download. These are not strictly plugins however you will find them in the WinBinder plugin folder on SourceForge.
To address this I have repackaged the newest release of WinBinder and converted it to be fully portable. For completeness, I included PHC-Win as a separate download. These are not strictly plugins, but you will find them in the WinBinder plugin folder on SourceForge.


'''''[[#top | Top]]'''''
=== WinBinder Portable ===
=== WinBinder Portable ===
WinBinder portable is a repackaged verion of WinBinder for users that want a working version straight out of the box. Hence anything relating to compiling WinBinder has been removed. Folder structure changed to be more compatible with Uniform Server. The excellent documentation, examples and licence have been retained.
WinBinder portable is a repackaged version of WinBinder for users that want a working version straight out of the box. Hence anything relating to compiling WinBinder has been removed. The folder structure was changed to be more compatible with Uniform Server. The excellent documentation, examples and licence have been retained.


Hand positioning windows controls is tedious; WinBinder contains a “form editor” greatly reducing the tedium of this task. It takes a no frills approach, uses a minimalist interface hence extremely easy to use. Download is worth the effort just for this tool alone.
Hand positioning windows controls is tedious; WinBinder contains a “form editor,” greatly reducing the tedium of this task. It takes a no-frills approach, uses a minimalist interface and is extremely easy to use. Downloading it is worth the effort just for this tool alone.


'''''[[#top | Top]]'''''


=== Phc-win ===
=== Phc-win ===
In the previous tutorial compacting files into a [[PHP WinBinder: Project2#Create a single EXE file | '''single executable''']] file [[PHP WinBinder: Project#Create an EXE file | '''bat_to_exe''']] was used. Although this gets the job done each file needs to be extracted before the application can run. PHP files are not compiled hence their size remains unchanged.
In the previous tutorial, compacting files into a [[PHP WinBinder: Project2#Create a single EXE file | '''single executable''']] file, [[PHP WinBinder: Project#Create an EXE file | '''bat_to_exe''']] was used. Although this gets the job done, each file needs to be extracted before the application can run. PHP files are not compiled, so their size remains unchanged.


PHC-Win on the other hand compiles each individual PHP file greatly reducing size. These along with any resource files are compacted into a single executable. Advantage of using PHC-Win total number of files to include in an application distribution is minimal.
PHC-Win on the other hand compiles each individual PHP file, greatly reducing their size. These along with any resource files are compacted into a single executable. The advantage of using PHC-Win is that the total number of files included in an application distribution is minimal.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


== Download and Install ==
== Download and Install ==
Note all download file names provide an indication of package content. Once downloaded these can be renamed. This tutorial assumes you will be installing on “C” drive and into a folder named “us_wb” you can chose any other location and folder name just substitute as appropriate in the tutorial description.
Note: all download file names provide an indication of package content. Once downloaded these can be renamed. This tutorial assumes you will be installing on "C" drive and into a folder named "us_wb". you can choose any other location and folder name; just substitute as appropriate in the tutorial description.


'''''[[#top | Top]]'''''
=== WinBinder Portable ===
=== WinBinder Portable ===
Portable WinBinder has been packaged in two file formats the “exe” is a 7z self-extracting archive while the “zip” archive requires manual extraction.
Portable WinBinder has been packaged in two file formats the “exe” is a 7z self-extracting archive while the “zip” archive requires manual extraction.
Line 70: Line 67:


</pre>
</pre>
'''''[[#top | Top]]'''''
==== File download options ====
==== File download options ====
There are two file options VC6 or VC9 these refer to the compiler that was used to create the binaries. Reason for including both is to allow you to compare speed of your application when run on either.
There are two file options: VC6 or VC9. These refer to the compiler that was used to create the binaries. The reason for including both is to allow you to compare the speed of your application when run on either.


'''''Note'':''' Uniform Server all components (Apache MySQL and PHP) currently uses VC6 binaries.
If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP
 
VC6 Versions are compiled with the legacy Visual Studio 6 compiler. 
VC9 Versions are compiled with the Visual Studio 2008 compiler. The VC9 versions require you to have the Microsoft 2008 C++ Runtime (x86) or the Microsoft 2008 C++ Runtime (x64) installed. 
 
'''''Note'':''' In Uniform Server, all components (Apache, MySQL and PHP) currently use VC6 binaries.


'''''File option'':'''
'''''File option'':'''
Line 80: Line 81:
* [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/WinBinder/winbindervc9/ WinBinder_531VC9TS_FULL_1.0] - PHP version 5.3.1 VC9 Thread safe
* [http://sourceforge.net/projects/miniserver/files/Plugins/UniServer%2055-Nano%20Plugins/WinBinder/winbindervc9/ WinBinder_531VC9TS_FULL_1.0] - PHP version 5.3.1 VC9 Thread safe


Like Uniform Server they only extract to a folder and sub-folders there is no install program hence nothing is placed in the registry. To uninstall just delete the folder and all it’s content.  
Like Uniform Server they only extract to a folder and sub-folders. There is no install program, so nothing is placed in the registry. To uninstall, just delete the folder and all its content.  


'''''[[#top | Top]]'''''
==== WinBinder extension compatibility ====
==== WinBinder extension compatibility ====


Please note the WinBinder extension '''php_winbinder.dll''' is compatible across a PHP series
Please note that the WinBinder extension '''php_winbinder.dll''' is compatible across a PHP series.
 
That means the included dll will run on PHP versions 5.3.0, 5.3.1 and 5.3.2RC1, etc.
that means the included dll will run on PHP versions 5.3.0, 5.3.1 and 5.3.2RC1 etc
 
'''''[[#top | Top]]'''''


=== Phc-win ===
=== Phc-win ===
Line 125: Line 122:


</pre>
</pre>
'''''[[#top | Top]]'''''
 
==== File download options ====
==== File download options ====
Phc-win does not provide a VC6 version it is released with VC9 binaries only.
Phc-win does not provide a VC6 version. It is released with VC9 binaries only.


This is not a real restriction you must include binaries an application was compiled with.
This is not a real restriction, but you must include the binaries an application was compiled with.


PHC-Win does not install anything on your PC's system path or registry other than extracting to a folder. Hence the program is inherently portable. To uninstall just delete the folder and all it’s content.
PHC-Win does not install anything on your PC's system path or registry other than extracting to a folder. Hence the program is inherently portable. To uninstall just delete the folder and all its content.


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


== Acknowledgements ==
== Acknowledgements ==
I would like to express my thanks to Alec Gorge "WinBinder forum name alecgorge" for allowing inclusion of his binaries.
I would like to express my thanks to Alec Gorge, WinBinder forum name "alecgorge," for allowing inclusion of his binaries.


Also may thanks to Andrew Fitzgerald (WinBinder Wiki name Frantik) for allowing publication of PHC-Win (I have made only a small modification essentially it remains unchanged)
Also may thanks to Andrew Fitzgerald (WinBinder Wiki name Frantik) for allowing publication of PHC-Win (I have made only a small modification; it essentially it remains unchanged).


The above two chaps are dedicated to the WinBinder project and its advancement.
The above two chaps are dedicated to the WinBinder project and its advancement.
Line 148: Line 145:
'''''Note 1'':'''
'''''Note 1'':'''


This WinBinder [http://winbinder.org/forum/viewtopic.php?f=10&t=1058 '''forum thread'''] source of original material
This WinBinder [http://winbinder.org/forum/viewtopic.php?f=10&t=1058 '''forum thread'''] is the source of original material.


'''''Note 2'':'''
'''''Note 2'':'''


If you like scripting with PHP Alec published a full version of php5ts.dll where he statically compiled most of the PHP extensions including the kitchen sink it has a footprint of 3.8 MB. You also have a choice of using the mini version that has a footprint of 3MB.
If you like scripting with PHP, Alec published a full version of php5ts.dll, where he statically compiled most of the PHP extensions including the kitchen sink. It has a footprint of 3.8 MB. You also have a choice of using the mini version that has a footprint of 3MB.


Below a list of modules included:
Below is a list of modules included:
{|
{|
|-
|-
Line 253: Line 250:
The real reason for including the above downloads is to provide a consistent reference source for Uniform Server users.
The real reason for including the above downloads is to provide a consistent reference source for Uniform Server users.


Specifically those users that would like to design and compile alternative control or other Windows application to run the servers or start associated applications.
Specifically those users that would like to design and compile alternative control or other Windows application to run the servers or start associated applications.  
 
Remainder of this tutorial provides a quick introduction to the above tools.


The remainder of this tutorial provides a quick introduction to these tools. 
First to be covered is [[PHP WinBinder 2: WinBinder portable | '''WinBinder portable''']].
First to be covered is [[PHP WinBinder 2: WinBinder portable | '''WinBinder portable''']].