How to write a program in PHP, Ruby or Python and make it easy to download and install by regular users, such as a Win32 application?

I wonder when we write a program in PHP, Ruby or Python, how can we easily download and install it for ordinary users, such as a Win32 application?

and is it easy to make this app for mac?

+7
user-interface windows ruby php
source share
4 answers

ruby

RubyScript2Exe

RubyScript2Exe converts your Ruby application into a standalone, compressed Windows, Linux, or Mac OS X (Darwin) executable.

There is also a decent message

Another possible option is the Shoes GUI framework , which can create Widows, Linux, and OS X executables from your Shoes application.

Python

py2exe

py2exe is a Python Distutils extension that converts Python scripts to Windows executables that can be run without having to install Python.

py2exe is used by BitTorrent, SpamBayes and thousands of others

Php

Bambalam PHP EXE Compiler / Embedder

Bambalam PHP EXE Compiler / Embedder is a free command line tool for converting PHP applications to standalone Windows.exe applications. The exe source files are completely standalone, php dll, etc. are not needed.

and is it easy to make this app for mac?

Py2app

py2app is a Python setuptools command that allows you to create stand-alone application packages and plugins from Python scripts. py2app is similar in purpose and design to py2exe for Windows.

In addition, there is a "Build Applet" utility included in the Developer Tools. Drag the Python script onto it and it will become .app . The utility is located in /Developer/Applications/Utilities/MacPython 2.5/


Note that all of the above basically takes your script, packs it along with the Python interpreter and any dependencies, and runs your script at startup. If you use a graphics platform that does not work on Windows, running it through Py2EXE will not make it work!

Also as Peter D mentioned, you need to be careful about dependencies - if your application requires a MySQL database, your users will need to install it separately in order to use your application, and each library you use will add size to your executable files.

+9
source share

I think your question should be: "How to write PHP / Ruby / Python applications so that they can be easily downloaded and installed on Windows computers?"

If I write a PHP application to use the MySQL database, now I have to consider (when packaging the application) if the user will install and configure the database on his own. Perhaps I will use the SQLite database instead to save the user from having to start the database on their own.

So, I think it’s important here not to understand how to pack the application so that users can easily download it. This is how to create an application to make it as portable as possible.

+1
source share

At least with PHP and Python, I know that there are GTK bindings ( http://gtk.php.net/ , http://www.pygtk.org/ ) for Windows ( http: //www.gtk. org / download-windows.html ). Packing an application into an easy-to-distribute package becomes a little complicated, but it can certainly be done. If you are talking about PHP in the sense of a web application, as a rule, the user will have the environment set up, and all they need to do is unzip the scripts.

There are other widget bindings for these languages, I just list GTK as a fairly frequent binding.

Once you have configured the application correctly, it is a relatively simple matter to create an installer for your application. There are various solutions for this, one of which is NSIS ( http://nsis.sourceforge.net/Main_Page ), which simplifies the creation of installers. This is a scenario, so there are many settings.

+1
source share

I am not sure what you are asking, so I will post some general ideas.

I'm a ruby ​​programmer, and JRuby is a great way to launch a ruby ​​cross platform. You can pack it in the same way as a java program package, and there are many examples of java applications for windowsxs.

You can also look at adobe AIR . "Adobe® AIR ™ runtime allows developers to use proven web technologies to create rich Internet applications that run outside the browser on multiple operating systems."

0
source share

All Articles