Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making a distribultable standalone program in PHP

I've decided to code some applications in PHP that are supposed to run offline in the user's machine. However, I can't seem to find an user-friendly install wizard to create a local server in where the script will run. Any ideas?

PS: Here's an example of what I want: http://www.nolapro.com

like image 777
Daniel Sorichetti Avatar asked Dec 23 '22 08:12

Daniel Sorichetti


2 Answers

You could go to the old school route and try using PHP-GTK.
Text Tutorial here: http://www.kksou.com/php-gtk2/References/Compiling-standalone-PHP-GTK2-applications-on-windows-using-PriadoBlender.php

or you could go the route that I believe has much more promise: Adobe AIR + PHP
It has the added bonus of running on any platform!
Video tutorials here: http://www.vtc.com/products/Adobe-AIR-PHP-Development-Tutorials.htm

There's also a new player in the game, Appcelerator. It lets you write your code in whatever language you want (PHP, Ruby, Python, etc) and compile it for the platform of choice (iPhone, Android, Windows, OSX). Parts of it are still beta, but it looks unbelievably slick & cool, and there are lots of tutorial videos. http://www.appcelerator.com

like image 63
lo_fye Avatar answered Dec 27 '22 07:12

lo_fye


I hate to advocate this, because it just feels so wrong. You would probably be better off using a language inteded for use for stand-alone applications, if you're going to be doing this often or in a production setting.

With that said, a colleague of mine used to use the Bambalam PHP to EXE Compiler for this. He actually had a profitable product built around it.

Bambalam will generate an EXE that doesn't rely on any external DLLs, based on your PHP code.

http://www.bambalam.se/bamcompile/

like image 36
Joe Kiley Avatar answered Dec 27 '22 07:12

Joe Kiley