How to package and distribute a web system?

Asked

Viewed 2,688 times

26

I need a certain Web system - including the PHP server itself, as well as Mysql - to be "packaged" in an executable file, thus allowing the layman to use it in a kind of browser of his own. What steps would you need to take to make this system distributable?

Edit: PHP and Mysql I can install manually, but still do not know how to have a browser for the system.

  • is it really necessary to use a browser that is not present on the system? For the server side, it would even use something like Vagrant (in English) to virtualize the environment, but I can’t devise options for uploading the browser into the package.

  • Yes, the browser itself would be fundamental.

4 answers

16


Whereas you can install PHP and Mysql on your client’s computer, then just create a fake domain using the Windows hosts file (C: Windows System32 drivers etc hosts).

# Localhost
127.0.0.1 localhost
127.0.0.1 meusite.dev

But you need to create a virtual host by httpd.conf:

NameVirtualHost *:80

<VirtualHost *:80>
    ServerName meusite.dev
    DocumentRoot "C:\Users\Nome\Documents\.....\pasta_do_site"
</VirtualHost>

And ask him to visit http://meusite.dev in the browser.

The only other alternative I can think of is to host the site on some test server.

=============

Edit: I turned my comment into a reply:

You can do the following:

  1. Install the Google Chrome;
  2. Open the development address;
  3. Click the three bar icon in the upper right corner;
  4. Choose "Tools > Create App Shortcut" and tick "Desktop".

And ready you have a dedicated browser for the site in question, no back button, address bar, etc with desktop icon. See also http://en.wikipedia.org/wiki/Site-specific_browser

The result looks like this:

site com browser próprio

  • I’ve thought about the possibility, but I’m missing the browser.

  • 1

    But the user does not have a browser (browser) installed?

  • No. The browser would be customized, just to open that page, no toolbar, back button, or something like that, so the client doesn’t get distracted and open facebook "unintentionally".

6

An alternative solution would be to create an installer of its own and include the sub-installations of the necessary programs. The NSIS is a good tool to do this.

WAMP

The first step of the main installation would be to install a WAMP package, for example from Bitnami. To do this without user intervention the package with the parameter is executed --mode unnatended (source). The main installation could check if the WAMP package is already installed and skip this step if so.

In this first step, you could still install the required apps separately. Apache, PHP and Mysql (until the version I used, at least) work if we run the binaries directly from the installation folder. So in fact, if there is time and need, you could create a custom WAMP, whose advantage is the smaller package size and the smaller amount of unnecessary elements installed in the client.

Navigator

For navigation, there are topics in some forums about how to leave a Firefox Portable no toolbars. I didn’t get to test this idea, but I’ve used the portable version of this browser and I know it works.

Another option would be to create a small executable (in another language, of course) with a built-in browser. Many years ago I used to do this in Delphi or VB including some DLL’s that allowed putting a component with Internet Explorer inside a window. The program only needs a simple window that always opens the system on the home page, although it is possible to include some interesting features, as a special window for login data which then makes a request to the local server before opening the system itself or a system that logs the user when it closes the window.

Applying

After that, you need to extract the application files in the WAMP directory, in addition to the required configuration files, which can be obtained from a test installation.

A last step would be to create the database structure, which can be done still in the installation through a PHP command line script or on the first access of the application through a Wizard the Wordpress line.

Updating

And an epilogue to this story would be to upgrade the system via PHP even using a SVN or GIT extension, or even downloading a zip from the web.

Alternative: The Virtual Machine

One last alternative I would consider is a Virtual Machine (VM) with the preconfigured system environment. In the case of Windows a service associated with that VM could be created that turns on/off or saves/restores its state when the OS starts or shuts down.

There are websites that provide linux-based lean Vms that can be used for such purposes. For example, the Turnkey Linux.

6

I already did some tests and I liked the Tidesdk. You create the system with html, javascript, php etc, package and distribute to mac, linux and windows. Already with an SDK browser, you don’t need anything else. They are soon migrating to tideKit

  • I had some problems with Tidesdk some time ago, so I shelved the project. Let’s see how Tidekit does.

2

I found a website that brings some alternatives beyond those already mentioned here, as well as the pros and cons of each, bringing also its main resources.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.