gnope php gtk gui gnope.org  

How to distribute PHP-GTK applications ?
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    gnope.org Forum Index -> PHP GTK2 Beginners
View previous topic :: View next topic  
Author Message
rajuvk



Joined: 02 May 2006
Posts: 10
Location: Kerala, India

PostPosted: Tue May 02, 2006 11:08 am    Post subject: How to distribute PHP-GTK applications ? Reply with quote

I have some experiance in PHP programming for the web. As a PHP-GTK programme can run on all platforms (this attracts me as my office has a mixed windows / linux environment), I get interested in PHP-GTK, and downloaded and installed the GNOPE installer on my Windows XP laptop. I created a simple programme for accounting my personnel expenses. It is a simple programme connecting to a MYSQL database. It has two treeviews, a combobox and a couple of entry boxes. It is working fairly good, and so far it is good.
How ever I could not find a way to create an EXE file to distribute my work. I assume that I have to distribute it as the source code file itself. I have no problem in distributing my work , but my concern is about PHP-GTK's utility for serious application development. if I decide to develope an application for use in my office, how can I prevent some curious users from editing the source code and change the behaviour of the application ?
Is PHP-GTK is suitable for developing large applications ?. How the interpreted style of execution of PHP will affect large applications ?

Raju
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 455
Location: Leipzig/Germany

PostPosted: Tue May 02, 2006 11:41 am    Post subject: Reply with quote

Hello Rajuvk,


PHP was meant to be run on a server, delivering web pages to the users that didn't have any access to the sources. That far, nobody was concerned about the security of the code.

With PHP-CLI or PHP-Gtk apps, things have changed as the apps need to be delivered to end users and their computers. The first question is code obfuscation. You need a way to hide the source from the users to prevent changing them.
Normal applications do that by compiling the sources into a binary and distributing this. For PHP, there are several compilers:


The next thing is installing your application. Just distributing the source doesn't help as there need to be a php setup on the user's desktop. The next thing would be to create start menu entries or similar that make it easy to launch the program after installation.
Gnope partly solves this problems:

  • First, it allows you to install PHP-Gtk2 with just a few clicks, and you have a working environment.
  • Second: With the included PEAR package installer, it's easy to install PHP-Gtk2 applications that reside on any PEAR channel server in the web. The downside is that you need to setup the channel server, or publish your app on a public one (e.g. Gnope's own channel server)
  • Third: Gnope includes an application called "AppRunner", that has an own entry in the start menu and shows a list of available PHP-Gtk2 applications installed on the local computer. Click on it, and it starts.

If you want to make a one-click setup for your application, you could either develop your own installer, that sets up php, php-gtk2 and your application.
Or simply take the Gnope installer's sources and add your application to the list of installed pear packages. Compile it, and you're ready to distribute it. That way the Gnope installer will not only setup php, php-gtk2 and the gnope apps, but also your own application.
Remember that Gnope is GPL, meaning you can have and modify the sources, but need to contribute any changes back to the community.
Back to top
rajuvk



Joined: 02 May 2006
Posts: 10
Location: Kerala, India

PostPosted: Tue May 02, 2006 1:49 pm    Post subject: Reply with quote

Thanks cweiske for the prompt reply. It is very interesting. I was not aware of existance of compilers for PHP. Do these compilers support PHP-GTK2 ?. What about LINUX environment ?. Is complilers available for LINUX also ? I was earlier read that same code runs on both windows and LINUX platform. Is that true for compiled codes ?.

What about my other question, Whether PHP-GTK is suitable for large application development (mainly office automation) ? Is it worth to learn PHP-GTK for this ?

Raju
Back to top
scott



Joined: 16 Feb 2006
Posts: 35

PostPosted: Tue May 02, 2006 3:15 pm    Post subject: Reply with quote

rajuvk wrote:
Thanks cweiske for the prompt reply. It is very interesting. I was not aware of existance of compilers for PHP. Do these compilers support PHP-GTK2 ?. What about LINUX environment ?. Is complilers available for LINUX also ? I was earlier read that same code runs on both windows and LINUX platform. Is that true for compiled codes ?.


Not too long ago, the folks at Roadsend promised me that their PHP Compiler would work with PHP-GTK 2 by the end of April. I have not yet seen a working version though. Roadsend is the only company I know of actively working on including PHP-GTK 2 support. When it is ready, it will work on both Windows and Linux. I believe that two separate executables will need to be created though. (One for Windows, one for Linux).

Quote:
What about my other question, Whether PHP-GTK is suitable for large application development (mainly office automation) ? Is it worth to learn PHP-GTK for this ?


PHP-GTK is as suitable as its parts (PHP and GTK). I don't think there is any reason PHP-GTK cannot be used for production quality application development. The biggest hurdle is distributing the application. It requires PHP-GTK to be installed on the user's machine which in the past was problematic. The new build system makes this much less of an issue.
Back to top
beidlerj



Joined: 10 Feb 2006
Posts: 55
Location: Oregon, USA

PostPosted: Tue May 02, 2006 6:10 pm    Post subject: Reply with quote

I just got the email that Roadsend released version 2.0 of their PHP Compiler today... unfortunately, it still does not support PHP5/Gtk2... Crying or Very sad
Back to top
rajuvk



Joined: 02 May 2006
Posts: 10
Location: Kerala, India

PostPosted: Wed May 03, 2006 11:54 am    Post subject: Reply with quote

Hello everybody,
So can I conclude that there is no way to convert a PHP-GTK2 programme in to an exe, and distribute it ?. (The question is theoratical only as I have no programme ready for distribution, but plans to do some small test applications) And PHP-GTK2 is still in the nascent stage, and yet to be taken seriously ?.
Why a PHP compiler is not released along with the official PHP or PHP-GTK2, releases, since compiling is required for practically all PHP-GTK2 applications ?

Raju
Back to top
will.garcia



Joined: 28 Apr 2006
Posts: 8

PostPosted: Wed May 03, 2006 12:08 pm    Post subject: Reply with quote

Hi,

I don't know if it's always actual but I have hear about differents ways to compile, encrypt PHP scripts and distribute with an installer :
- Bcompiler
- PHP Compiler (RoadSend)
- PriadoBlender
- IonCube Encode : encrypt php script (not free..)
- Installer : NSIS (NullSoft Install System)
- SetupStream32
- uses the embed sapi : what's sapi ???


Take a look also to a discussion about how to distribute PHP-GTK appli. : it maybe can help : http://www.webhostinghosts.com/forums/archive/o_t__t_12578__installation-and-distribution-programs.html
A citation : "Linux side I just make a rpm or distribute as a
tarball w/ a makefile which installs it as that is so easy to do and
what most Linux people know well."

Regards,
W.GARCIA
Back to top
beidlerj



Joined: 10 Feb 2006
Posts: 55
Location: Oregon, USA

PostPosted: Wed May 03, 2006 5:22 pm    Post subject: Reply with quote

I have used Inno Setup to create an .exe file that installs PHP5/Gtk2 on the users system, then makes a folder in the Program Files directory, copies the PHP file (main application) to the folder along with supporting files. The installer also writes to the $PATH variable, creates shortcuts to launch the program from the Start Menu (and Desktop, if desired) and forces the user to reboot his/her machine for all this to take effect.

Very slick program (Inno Setup), and the best part is, it's FREE! Smile

It will be nice, though, when Roadsend gets PHP5/Gtk2 support added to their PHP Compiler... then the users of your executable won't have to have PHP installed on their system at all!
Back to top
rgljr



Joined: 10 Apr 2006
Posts: 15
Location: Minnesota, USA

PostPosted: Tue May 09, 2006 10:30 pm    Post subject: Phalanger Reply with quote

Anybody Tried the Phalanger PHP Compiler for .net framework?

FAQ has a response to this question:
"How to make PHP GTK application working? "

The response indicates that it should work, but haven't tried it myself.
Back to top
cweiske



Joined: 08 Dec 2005
Posts: 455
Location: Leipzig/Germany

PostPosted: Wed May 10, 2006 7:02 am    Post subject: Reply with quote

Thei FAQ talk only about PHP-Gtk1, not version 2 that we are using here.
Back to top
omis28ca



Joined: 26 Dec 2005
Posts: 11
Location: Fresno, CA

PostPosted: Wed May 10, 2006 7:37 am    Post subject: Possible solution Reply with quote

There is a program called Nova (an open source Gnutella client built with PHP-GTK1) the author has a small Visual C++ 6 executable that runs the nova PHP file directly. He has released the source code here: http://novap2p.sourceforge.net/downloads/nova.zip Using this method one would only have to ecrypt or use a PHP Code Obfuscator to protect the code.

I compiled the example and it works very well with my php-gtk1 programs but a haven't tried it with the latest php-gtk2.dll.
Back to top
will.garcia



Joined: 28 Apr 2006
Posts: 8

PostPosted: Wed May 10, 2006 5:05 pm    Post subject: Reply with quote

I haven't test but you can take a look at http://wildphp.free.fr/wiki/doku.php?id=win32std:embeder : Embeder is a program which permit to convert php scripts into an executable (only win32).

Regards.
Back to top
omis28ca



Joined: 26 Dec 2005
Posts: 11
Location: Fresno, CA

PostPosted: Mon May 15, 2006 8:38 am    Post subject: Another compiler Reply with quote

I found this compiler at http://www.fsw2.com/showthread.php?p=1277459#post1277459
I will test it out and let everyone know if it works for me.
Back to top
rgljr



Joined: 10 Apr 2006
Posts: 15
Location: Minnesota, USA

PostPosted: Fri May 19, 2006 5:04 am    Post subject: Another Possible way to Distribute PHP-GTK2 code as exe Reply with quote

While the Priado Blender does not yet fully support the PHP-GTK2 environment as GNOPE does, it does have a potential future. The author of Priado Blender is waiting for the official release of GTK2 for PHP.

You can now create EXEs which support the PHP-GTK2/GNOPE environment, but they have a DOS window associated with them. PHP-GTK1 apps do not have the DOS window as they are supported natively by Priado Blender. Instructions for doing PHP-GTK2 apps with a DOS window are on the Forum at the link below.

http://pb.impressivegames.com/

Priado Blender is not a PHP compiler. It just appends the php code to the php interpreter, but you get an EXE. Still uses all the standard php dlls and php.ini file for configuration. So adding functions like GTK2 and MYSQL support is as easy as it is in standard PHP.
Back to top
m_khattar



Joined: 19 May 2008
Posts: 1

PostPosted: Mon May 19, 2008 6:50 pm    Post subject: Inno Setup for PHP-gtk2 Reply with quote

hello, i tried to use inno setup but i didn't know how to put all php-gtk2 files in one installer, can you provide me with the steps you followed? or with the setup file?

I would be very thankful
Back to top
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    gnope.org Forum Index -> PHP GTK2 Beginners All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Templates enhanced by DigiWiki. Hosting by Tradebit.