RE: Way to cache stacks from web and update when changes?

2003-08-20 Thread Edwin Gore
Chipp,

Thanks a lot for the excellent tutorial - this is going to be very helpful in building 
my auto-update feature (Which is pretty critical, considering that I suck and need to 
put out constant updates...)

I'm wondering though if there would not be some value in having everything done in the 
startup app, and having a hidden field or a custom property that has all the info 
about where to look for updates and what to update. Just thinking from a reusability 
standpoint - much easier to maintain it all in one plce, I mean.

After a
>considerable amount of evolution, this is the
>process I've finally settled
>on:
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Way to cache stacks from web and update when changes?

2003-08-20 Thread Chipp Walters
-->I'm trying to figure out a way to write an app that automatically updates
itself from the web when it determines that a stack on the web-site changes.
Has anyone done this before?

I pretty much develop all my projects to be self-updating. After a
considerable amount of evolution, this is the process I've finally settled
on:

I first create a startup "splash screen" stack. This stack is minimal and
ONLY has the following functions:

1) Builds and checks the correct folder paths (like one for Plugins,
Tempfiles, etc..). I typically use:

put specialFolderPath(35) into tPath

On Windows, this sets tPath to:
C:\Documents and Settings\All Users\Application Data
which is accessible to all users regardless of permissions. Sometimes, a
user cannot install an executable in the C:/ProgramFiles folder. Also, this
assures all *other* RR files downloaded by my app end up in the *same*
place. I will of course append tPath with "/myCompany/appName" before
installing any files.

2) Checks and verifies internet connection
3) Then checks against a server page (or can be a text file on a server) the
latest version of itself. If it finds there is a newer version, it asks if
the user wishes to update. If "Yes", it issues a:

revGoURL "http://.mydomain.com/myNewSplashScreenInstall.exe";

and quits itself. This will launch a web browser, go to a web page and begin
downloading the new version of the executable. The reason I use a web page
in this instance (instead of having RR do it) is because I want to be
absolutely positive I can download the correct executable and have it
installed over the recent version. Plus, it's a lot simpler. The idea, is
that the Spash Screen stack should be very simple AND reliable. It should
not change much, so this rare event shouldn't be too much problem. All the
other downloads are 'live' and done by RunRev.

4) If the Splash Screen is the latest version, then it checks to see if the
"Main Stack" is already downloaded. It checks the folder the "Main Stack" is
supposed to be in, if it's not there, then it proceeds to automatically
download it 'Live':

put URL "http://www.mydomain.com/mainstack.rev"; into URL (binfile: & the
defaultFolder)

where the defaultFolder has already been set up to point to the correct
folder.

5) If the Main Stack already exists:

if exists(stack "Main.rev") then..

then check the version number of it (could be a field or custom prop)
against a version list previously downloaded. If there is a newer version,
prompt the user and then if 'OK', download it.

delete stack "Main.rev" --removes from memory
put URL "http://www.mydomain.com/mainstack.rev"; into URL (binfile: & the
defaultFolder)

6.) Once the current version of the Main stack is downloaded, launch it. It
may also have plugins and can manage the plugin downloads itself. I prefer
the Main stack managing all other downloads because it is important to keep
the 'Splash Screen' as simple as possible, so as not to change it very
often. The Main stack can be changed and updated much easier.

I hope this helps...

-Chipp


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: Way to cache stacks from web and update when changes?

2003-08-20 Thread Richard K. Herz
Rob Gould wrote:

> I'm trying to figure out a way to write an app that automatically updates
> itself from the web when it determines that a stack on the web-site
changes.
> Has anyone done this before?

I do something related in the new "net" version at www.reactorlab.net.
The approach is described at http://reactorlab.net/intro/tools.htm (link
"Building a "Rich Client" or "Internet App" in Revolution).

Version info is kept in text files on the server and client, rather than
using a script to get file info automatically.  Disadvantage is that you
have to hand-edit list on server when a new stack is posted, advantage is
that you can keep drafts or backup stacks in the directories and not have
them presented to client.

Rich Herz
[EMAIL PROTECTED]


___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: Re: Way to cache stacks from web and update when changes?

2003-08-20 Thread Edwin Gore
Is it impossible to check the properties of an unopened standalone from another 
standalone? 

I was thinking that maybe I could get around some of the issues with standalones 
writing to themselves by using a seperate standalone to do the updating. User selects 
update, if there is anything new then the main application launches the updater 
standalone, and quits, the updater waits a few seconds (to allow time for the main app 
to finish quitting) then downloads the updates and overwrites the old files.

The only problem I have run into is that the main app can't check to see if the 
UPDATER app needs to be updated, because I can't seem to check the properties of an 
unopened standalone, and if I open the standalone, well, it's in its own memory space.

I can think of a bunch of ways to get around this, but I am curious about the original 
question.



>- --- Original Message --- -
>From: Richard Gaskin

>One thing to keep in mind about apps is that they
>can't write to themselves.
>But if you keep most of your likely-to-be-updated
>parts as separate stack
>files outside of the exe it's a snap to overwrite
>them.
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution