I'm developing a Qt desktop GUI.
I need to be able to run:
php myWonderfulScript.php parameter from the Qt app.
php is available on the command line on my development computer, however it's unlikely to be available on the user's computer. I also need php5-curl installed...
Can I reliably distribute php .so/.a/.dll files with my Qt desktop application so it will run on Mac/Windows/Linux? (I know there are big licensing issues that arise in this situation and I will be sure to not steal anyones work)
I'm using Qt Creator 3.1.2 (based on Qt 5.3.1)
Related
I have made a web application with php and mysql in wamp server. Now i want to convert it into desktop application for windows platform which will run offline as complete desktop application.
Please anybody help me. Because it so so important for my job place...
Thanks..
nightrain - https://github.com/kjellberg/nightrain
PHP Nightrain is a packager written in Python for the PHP Programming Language. Using this tool you can convert your PHP/HTML/CSS/Javascript application to a Native Desktop Application. Currently, PHP Nightrain supports the Windows, Mac (OS X) and the Linux operating systems.
PHP Desktop - https://github.com/cztomczak/phpdesktop
PHP desktop GUI framework with HTML5 Chrome/IE engine.
You can check out exeoutput for php. It's a paid application priced at one time fee of USD 99. They also have discounts for students and teachers.
It outputs the file in a single exe file format for Windows and the exe can be run as a standalone file without installation and portable in a USB too with complete web server, chrome browser packaged as an application.
You don't need to rewrite your existing html, php code and can use it as it is.
You can also connect to sqlite and mysql databases if your app is database dependent and place the database either outside the main exe or embedded inside it. The latest version is packaged with php 7.3 which you can upgrade if needed. All major php modules are included by default
Your complete PHP, HTML java script code is protected since it's inside of an exe which doesn't extract when running so no one can reverse engineer the code and redistribute your app. You can also set a splash screen png image, an expiration date so just in case some one redistributes it, it will become invalid and unusable after the expiration date. changing the system clock will not allow reuse of the expired app.
I have been using it for some time and that's the only solution i found which was polished enough for use.
I tried PHP Desktop before but the code is exposed in that case and end user can modify your code and redistribute it in PHP Desktop.
Note: I am not associated with exeoutput in any way but found the app so useful hence the lengthy answer.
I have my application written on PHP/MYSQL. We are looking at option for deployment at client site machine. What is the option and how to do it? Apart from that we are more concern about protecting our code. Hence, we're looking at the option that can make a binary application for our web application developed on php/mysql.
Apart from that is there any installer available that can extract and install php/apache/mysql stack ?
See this previous response to a similar question for a comprehensive list of the options available for compiling/wrapping PHP code as an executable for Windows
Other options available for non-Windows:
HPHP (Facebook's HipHop)
https://github.com/facebook/hiphop-php/wiki/
https://github.com/facebook/hiphop-php
HipHop for PHP is a source code transformer for PHP script code. HipHop programmatically transforms PHP source code into highly optimized C++ and then uses g++ to compile it to machine code. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.
HipHop was created by Facebook to save resources on its servers. It is being distributed with its over 300,000 lines of source code written in C++ and C as free software under the terms of version 3.01 of the PHP License.
Facebook has also developed HPHPi, which is an experimental interpreter designed for development with no need to compile the PHP source code before running it.
Roadsend and Roadsend Raven
http://www.roadsend.com/home/index.php
https://github.com/weyrick/roadsend-php/wiki
https://github.com/weyrick/roadsend-php
Roadsend PHP is an open source implementation of the PHP language. It compiles PHP source code to stand alone, native binaries which do not require an interpreter. Roadsend Compiler can build online web applications with Fast/CGI, offline web applications with an embedded web server (!MicroServer), desktop GUI applications with PHP-GTK, and console applications. It is known to build on Linux, Windows (using mingw), Mac OSX, and FreeBSD.
Roadsend Compiler also contains facilities for interpreting, profiling and step debugging PHP code.
Roadsend PHP is a completely independent implementation of the PHP language and runtime environment, and is not based on the original implementation (using the Zend engine) which is separately and freely available at http://www.php.net. Zend PHP is not required, and is not used in any way, by Roadsend PHP.
Last change to the roadsend code was 17 months ago (a patch for Ubuntu 10.04 llvm package), prior to that was 21 months ago. Readme's have been updated in the last two weeks (at time of writing this) so perhaps it's about to be resurrected again.
Can build Linux executables
Phalanger
http://www.php-compiler.net/
http://wiki.php-compiler.net/Phalanger_Wiki
http://phalanger.codeplex.com/
Phalanger is a project which was started at Charles University in Prague and was supported by Microsoft. It compiles source code written in the PHP scripting language into CIL (Common Intermediate Language) byte-code. It handles the beginning of a compiling process which is completed by the JIT compiler component of the .NET Framework. It does not address native code generation nor optimization. Its purpose is to compile PHP scripts into .NET assemblies, logical units containing CIL code and meta-data.
phc
http://www.phpcompiler.org/
phc is an open source compiler for PHP with support for plugins. In addition, it can be used to pretty-print or obfuscate PHP code, as a framework for developing applications that process PHP scripts, or to convert PHP into XML and back, enabling processing of PHP scripts using XML tools.
phc for PHP programmers (See Manual):
Compile PHP source into an (optimized) executable (supports entire
PHP standard library).
Compile a web application into an (optimized)
extension (supports entire PHP standard library).
Obfuscate PHP code (--obfuscate flag - experimental). Combine
many php scripts into a single file (--include flag - experimental).
Last change to the phc code was on 18th December, so sill actively ongoing development.
Can build Linux executables
Can be used to build C code, with appropriate PHP "macros" for extensions
ROSE Compiler
http://rosecompiler.org/
Dependent on phc compiler for working with PHP
Look at PHP obfuscators, examples:
http://www.seocompany.ca/software/free-encryption-software.html
https://stackoverflow.com/questions/908678/is-there-any-good-php-obfuscator
Obfuscators aren't 100% but they are easy to implement and the output is pretty gnarly.
I am not sure about windows but on Linux you can try using Facebook's HipHop project, Of cource if you are not using eval() and other functions. Get more info and how to on Facebook Hiphop PHP - git
Any installer for "php/apache/mysql" stack? yes there is one EasyPHP, you can get the portable(extract and run) version too.
If you can do some R&D try using vmware ThinApp for windows platform. With VMware ThinApp, applications are packaged into single executables that run completely isolated from each other and the operating system
I have a server running oracle linux and has Oracle WebLogic. How can I set it up so that if you go to my website on port 80 it runs of files on WebLogic. I only have command line access, and the reason im using web logic is because apache wont work on oracle linux.
I dont plan on changing OS.
Connah
See if this could help you: http://quercus.caucho.com
Quercus is Caucho Technology's fast, open-source, 100% Java implementation of the PHP language. Quercus is a feature of Caucho Technology's Resin Application Server and is built into Resin - there is no additional download/install. Developers using Resin can launch PHP projects without having to install the standard PHP interpreter (http://www.php.net) as Quercus takes on the role of the PHP engine.
I hope you are not waiting for an answer but for all folks who came here to find Java - PHP integration here is an article on oracle.com -
http://www.oracle.com/technetwork/articles/dsl/oracle-java-zend-server-152557.html
Now I would mention 2 obvious things:
You need to know both Java and PHP.
If you are using Oracle 11/12 G with PHP this is the best way to do so because the other way doesn't work and is not even maintained.
I'd like to develop a PHP application that users would download and then could run. The application will have a web service.
I assume they will need Apache, but my main question is what is needed for PHP to run on their machine? Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).
Is anything else required that I did not mention?
Thank you,
They will need a web server with a compatible version of php. That's it.
Are you asking what is required to run a .php file on a windows machine? Do you mean like an executable or a web server script?
If like an executable need the php files:
Download the php installer from http://windows.php.net/download/, and then you can run php.exe script.php
If like a web site:
You need a webserver (like apache) and the php.exe files. I would suggest if testing to download a prebuilt webserver like XAMPP (download from http://www.apachefriends.org/en/xampp-windows.html)
It depends on the application. At a minimum it will need PHP.
Is there something needed like the JVM in Java or the .Net framework in .Net? What is it called and how difficult is it for them to download (size, etc.).
PHP. Presumably as difficult as it is for you, but it depends on the platform. OS X comes with it. Most Linux variants either come with it, or allow it to be installed with one command to the package manager. Windows users will have to download it seperately.
As for other things that might be needed…
If it has a GUI, it might need PHP-GTK.
If it expects to be accessed via HTTP then they will need a webserver which supports PHP. This could be Apache, IIS, or one of numerous other servers.
(It isn't clear if, when you say "The application will have a web service.", you mean "The application will access a web service" or "The application will provide a web service". If the latter, then a web server will be needed).
If you use any non-core modules, then they will be needed as well.
You need to describe your proposed application a bit better. Is there a reason the application must be in PHP? It may be possible, but it's certainly not common to code and distribute a desktop application written in PHP.
There are a few options.
If you are just writing a script (command line, etc) you don't need a webserver. You just need PHP installed to run it (there are even downloadable installers for it).
If you are writing a web-based tool, then you will need your users to have a webserver if they are meant to run it on their physical machines. And you don't need a framework...
just think of it as a Webserver + PHP as a plugin. Some webserver options: Apache, nginx, lighttpd
Try having users install WAMP, MAMP, or Zend Server CE all of which are free and come with both a webserver and PHP.
If you really want a deployable PHP script/tool, maybe look into something like PHPDock, which gives your users a single installable app (embedded server, php). NuSphere PHPDock
Honestly, it's not the greatest language to use for this type of deployment, but it's certainly fun to try to figure out! Sorry for not linking out also, don't have enough rep points for all of the links I had intended to supply.
Actually you can run php script without the need to have a webserver installed.
Just install php and then from command line:
$ php myscript.php
If you really want you can even build GUI application with php even though I would not suggest it.
Cheers Andrea
you could also try to use quercus.
Quercus is Caucho Technology's fast,
open-source, 100% Java implementation
of the PHP language (requires JDK
1.5).
This way you only will need a jvm+quercus. It also is platform independent this way because it runs in the JVM.
I have an application in which I change the data on web and then download the files then I compile my iPhone app with data. I just want to create ad-hoc distribution so I have already added devices. So is there a way that anytime I change data on web then I compile my iPhone app over the server using PHP and some command-line script so that I create a ready-made ipa and user can install the application using iTunes? Also is it possible to compile on Windows?
Also how do we change ad hoc provision profile? I mean where we can set code sign?
How do we invoke terminal and run command xcodebuild using PHP? Suppose we have mac server then how we invoke terminal and then navigate to project directory and run xcodebuild command?
Check out the OS X commandline program xcodebuild. When your current directory is the project directory (the one with the .xcodeproj file), xcodebuild will compile the primary target. See man xcodebuild for more options.
have you thought about setting up a build server with different scripts that can perform the requirements that you are asking for and of course a Web Interface to interact with it ?
This link describes how to do it, and in the comments of the blog readers mention several other Build Server alternatives with Xcode Project support.
Sorry if this is not the exact answer that you are looking for, but may be a valid angle to solve your problem ?