PHP WinBinder: Overlay: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(New page: {{Nav PHP WinBinder}} '''''WinBinder Overlayed on Uniform Server''''' A penalty of using this plugin is a significant increase in size. The plugin duplicates code that is already installe...)
 
(Proofreading and grammatical changes; some minor reformatting)
 
Line 2: Line 2:
'''''WinBinder Overlayed on Uniform Server'''''
'''''WinBinder Overlayed on Uniform Server'''''


A penalty of using this plugin is a significant increase in size. The plugin duplicates code that is already installed.
A penalty of using this plugin is a significant increase in the UniServer directory size. The plugin duplicates code that is already installed in the core.


If you check the size of folder UniServer\plugins\winbinder\'''php''' its around 9.8 MB a significant hit.
If you check the size of folder UniServer\plugins\winbinder\'''php''', you'll see it's around 9.8 MB, which is a significant hit.
 
The solution is to copy files required for WinBinder to UniServer’s core and delete the above folder.
Solution is to copy files required for WinBinder to UniServer’s core and delete the above folder.
== Copy files to core ==
== Copy files to core ==
Copy these folders and files to Uniform Server’s core:
Copy these folders and files to Uniform Server’s core:
Line 15: Line 14:
* Delete folder UniServer\plugins\winbinder\php
* Delete folder UniServer\plugins\winbinder\php


'''''[[#top | Top]]'''''
== Adjust paths ==
== Adjust paths ==
Having moved folders and files our examples will fail, paths need to match the new configuration. Lets modify test9 to this new configuration.
Having moved folders and files, our examples will fail. Paths need to match the new configuration. Let's modify test9 to this new configuration.


'''''[[#top | Top]]'''''
=== Batch file ===
=== Batch file ===
Edit file UniServer\'''test_9_final.bat''' (If it does not exist copy it from folder UniServer\plugins\winbinder\alt_con_1)
Edit file UniServer\'''test_9_final.bat''' (If it does not exist, copy it from folder UniServer\plugins\winbinder\alt_con_1)


Change this code
Change this code:
<pre>
<pre>
cd plugins\winbinder\alt_con_1
cd plugins\winbinder\alt_con_1
Line 34: Line 31:
</pre>
</pre>


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


=== PHP Script ===
=== PHP Script ===
Edit file UniServer\plugins\winbinder\alt_con_1\test_9.phpw
Edit file UniServer\plugins\winbinder\alt_con_1\test_9.phpw
   
   
Change this code
Change this code:
<pre>
<pre>
<?php
<?php
Line 49: Line 45:
Include "../../../usr/local/php/include/winbinder.php";      // Location Of Winbinder Library
Include "../../../usr/local/php/include/winbinder.php";      // Location Of Winbinder Library
</pre>
</pre>
'''''[[#top | Top]]'''''
 
== Summary ==
== Summary ==
Using WinBinder I have show how to create an alternative controller for running the servers in standard program mode.
Using WinBinder, I have show how to create an alternative controller for running the servers in standard program mode.


Running the servers as a service you can add this functionality by adding a tab control. This will allow you to switch between standard and service.
For running the servers as a service, you can add this functionality by adding a tab control. This will allow you to switch between standard and service.


The drop down menu allows you to quickly add additional functionality.
The drop down menu allows you to quickly add additional functionality.
Line 61: Line 57:
This tutorial has shown how to use WinBinder for producing Windows application coded in PHP.
This tutorial has shown how to use WinBinder for producing Windows application coded in PHP.


If you do not like Uniform Server’s control interface you now have the tools to create your own.  
If you do not like Uniform Server’s control interface, you now have the tools to create your own.  


WinBinder remains an excellent PHP module for quickly programming windows applications.   
WinBinder remains an excellent PHP module for quickly programming windows applications.   
Line 67: Line 63:
'''''Follow up tutorial'''''.
'''''Follow up tutorial'''''.


Manually positioning controls is tedious WinBinder has an excellent tool “form editor” that removes this tedium. Scripts can become larges especially if you document code. The code packaging technique covered in this tutorial does not compile or reduce code size however there is an excellent tool PHC-Win that does.
Manually positioning controls is tedious. WinBinder has an excellent tool called "form editor" that removes this tedium. Scripts can become large, especially if you document code. The code packaging technique covered in this tutorial does not compile or reduce code size, however there is an excellent tool called PHC-Win that does.


[[PHP WinBinder 2: Introduction | '''Tutorial 2''']] covers both PHC-Win and “form editor”.  PHC-Win has been packaged in Uniform Servers format and WinBinder repackaged for portability it includes “form editor” and original examples these are separate downloads.       
[[PHP WinBinder 2: Introduction | '''Tutorial 2''']] covers both PHC-Win and "form editor".  PHC-Win has been packaged in Uniform Servers format and WinBinder repackaged for portability. It includes "form editor" and original examples; these are separate downloads.       





Latest revision as of 18:57, 2 February 2010

 

UniServer 5-Nano
PHP WinBinder.

WinBinder Overlayed on Uniform Server

A penalty of using this plugin is a significant increase in the UniServer directory size. The plugin duplicates code that is already installed in the core.

If you check the size of folder UniServer\plugins\winbinder\php, you'll see it's around 9.8 MB, which is a significant hit. The solution is to copy files required for WinBinder to UniServer’s core and delete the above folder.

Copy files to core

Copy these folders and files to Uniform Server’s core:

  • Copy folder UniServer\plugins\winbinder\php\include to follder UniServer\usr\local\php
  • Copy folder UniServer\plugins\winbinder\php\resources to follder UniServer\usr\local\php
  • Copy file UniServer\plugins\winbinder\php\extensions\php_winbinder.dll to folder UniServer\usr\local\php\extensions
  • Copy file UniServer\plugins\winbinder\php\php-wb.ini to folder UniServer\usr\local\php
  • Delete folder UniServer\plugins\winbinder\php

Adjust paths

Having moved folders and files, our examples will fail. Paths need to match the new configuration. Let's modify test9 to this new configuration.

Batch file

Edit file UniServer\test_9_final.bat (If it does not exist, copy it from folder UniServer\plugins\winbinder\alt_con_1)

Change this code:

cd plugins\winbinder\alt_con_1
..\php\php.exe -c ..\php\php-wb.ini test_9.phpw

To:

cd plugins\winbinder\alt_con_1
..\..\..\usr\local\php\php.exe -c ..\..\..\usr\local\php\php-wb.ini test_9.phpw


PHP Script

Edit file UniServer\plugins\winbinder\alt_con_1\test_9.phpw

Change this code:

<?php
Include "../php/include/winbinder.php";       // Location Of Winbinder Library

To:

<?php
Include "../../../usr/local/php/include/winbinder.php";       // Location Of Winbinder Library

Summary

Using WinBinder, I have show how to create an alternative controller for running the servers in standard program mode.

For running the servers as a service, you can add this functionality by adding a tab control. This will allow you to switch between standard and service.

The drop down menu allows you to quickly add additional functionality.

Top

Conclusion

This tutorial has shown how to use WinBinder for producing Windows application coded in PHP.

If you do not like Uniform Server’s control interface, you now have the tools to create your own.

WinBinder remains an excellent PHP module for quickly programming windows applications.

Follow up tutorial.

Manually positioning controls is tedious. WinBinder has an excellent tool called "form editor" that removes this tedium. Scripts can become large, especially if you document code. The code packaging technique covered in this tutorial does not compile or reduce code size, however there is an excellent tool called PHC-Win that does.

Tutorial 2 covers both PHC-Win and "form editor". PHC-Win has been packaged in Uniform Servers format and WinBinder repackaged for portability. It includes "form editor" and original examples; these are separate downloads.


Top