Re: PHP-Gtk use in companies
| From: | Jeremy Johnstone | Date: | Wed, 17 Nov 2004 08:30:49 +0000 |
| Subject: | Re: PHP-Gtk use in companies | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5246@lists.php.net to get a copy of this message | ||
Well rather than have to build an exe file each time of the updated
files, I decided it was easier to build the system I did. When I want
to release a new version, I type the following at a command prompt:
prompt> make_build {appname} {CVS tag}
I am not a Windows user myself (just the people using the app are), so
the less often I have to go to a Windows machine to compile an EXE the
better, IMHO. The actual version checking does almost the exact same
thing your code below does, except I use cURL instead of fsockopen. My
version, similar to yours, does not download the php.exe or the .dll's
unless it needs to for whatever reason, so my average update size is
around 50-100kb (files are compressed).
-Jeremy
On Tue, 16 Nov 2004 20:10:17 -0800, Benjamin Smith
<bens@effortlessis.com> wrote:
> On Sunday 14 November 2004 05:00, Jeremy Johnstone wrote:
> > > > 1.) Automatic Live Update via Internet. This allows the application to
> > > > be updated via the web similar to how WindowsUpdate does for Windows.
> > > > I also have a PHP shell script which automates the transfer of files
> > > > from CVS, builds the update information package, and stores them on
> > > > the update server for usage by the app.
> > >
> > > Which protocol do you use resp. which file format to discover if new
> > > versions are available and where to download them?
>
> Geez - I did it stupid-simple. I wrote two NSIS installers, a
> "software-version.exe" and a "software-version-update.exe".
>
> In the PHP code is a simple variable, called $version. EG:
> $version="4.1.27";
>
> I have a stupid-simple web-page of just the version number. A few lines of
> code is all it takes to download the 8-byte webpage (or fail quietly) and
> prompt to update if appropriate.
>
> Something like
>
> If
> (!$fp=fsockopen("http://server.com/path/to/webpage.html"))
> return true;
> $serverversion=trim(fgets($fp, 1024));
> if ($serverversion && $serverversion!=$version)
> return Prompt2update();
>
> When it updates, it downloads the "update" installer from the same website.
> The update script ONLY contains the PHP code, not the php.exe binary or dll
> files, all of which rarely change. This makes an average update take around a
> MB.
>
> -Ben
>
>
>
> --
> "I kept looking around for somebody to solve the problem.
> Then I realized I am somebody"
> -Anonymous
>
>
--
---------------------------
Jeremy Johnstone
http://www.jeremyjohnstone.com
jsjohnst@php.net