SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast irbrian's Avatar
    Join Date
    Jul 2004
    Location
    Cache Valley, USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generate Win32 Installer from PHP?

    Is there some module or package out there that makes it possible to generate a win32 installer from within PHP?

    We have a Java-based client application which connects to a custom socket server (written in PHP, for convenience in interacting with the rest of our web-based software). Our customers need to be able to login to the website and download the client application securely, but there are conditions that make this complicated:

    1) The application relies on an XML config file to provide data it needs to properly connect to the server. The data is unique to each customer and is stored in the MySQL database on the webserver.

    2) Our customers need to be able to download the client as a single file and easily install it. For this, we'd like to use a windows installer package.

    3) This is optional, and probably not even feasible for our company from a licensing standpoint, but it would be really nice if we could also include the Java downloader-installer and run that as part of the installation if they don't already have Java installed.

    So the question is, how can we manipulate the XML file, and then also include it in an executable installer file? Are there any Installer packages that can be generated from within PHP??

    Ideally we'd like a similar solution that works on Mac and Linux as well, but if we could at least find a solution for Windows, that would be a good start.

  2. #2
    SitePoint Addict Php_penguin's Avatar
    Join Date
    Aug 2004
    Location
    Colwyn Bay, Wales, UK
    Posts
    287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    linux is lovely and open source, so the xml file can just be cut and pasted and the rpm/deb file can then be written and downloaded.

  3. #3
    <?php while(!sleep()){code();} G.Schuster's Avatar
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have a look at NSIS: http://nsis.sourceforge.net/Main_Page
    You can write your main installer (it's plaintext) and then compile it.
    What you will need is either a windows server or a linux server running wine/other windows emulators.

  4. #4
    SitePoint Wizard stereofrog's Avatar
    Join Date
    Apr 2004
    Location
    germany
    Posts
    4,324
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd also consider jnlp

  5. #5
    SitePoint Enthusiast irbrian's Avatar
    Join Date
    Jul 2004
    Location
    Cache Valley, USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did look into NSIS, and it looked like it might be a pretty decent option if our whole system were Windows based. Unfortunately that is not the case -- our server is Linux, and our sysadmin is extremely unlikely to consider running wine just to generate a single install file. There is also a very slim possibility that some of our customers may have *nix-based systems.

    I think we're just going to use php_zip to compress the necessary files into a .ZIP file. The client application is very small and only needs two files -- the client executable and the xml config file; so with some straightforward instructions, I think our customers will be able to handle it (as simple as it is to extract a ZIP file, I can't guarantee that statement).

  6. #6
    SitePoint Enthusiast irbrian's Avatar
    Join Date
    Jul 2004
    Location
    Cache Valley, USA
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by stereofrog View Post
    I'd also consider jnlp
    Good suggestion, but it looks like Java Web Start isn't really designed to install applications to run off a standalone machine, so much as to start a Java program from a web location. This app needs to run on a standalone POS system and load settings from the separate XML config file.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •