Re: create a patch upgrade

2005-02-04 Thread Ken Ray
On 2/2/05 11:25 PM, "Paul Salyers" <[EMAIL PROTECTED]> wrote:

> Is making a patch for a program easy or hard to change minor things on a
> program that has already been compiled into an exe?

As Derek mentioned, if your users have only downloaded an exe and you want
to patch it, you'd have to use a patching program.

However, lot can be done if the architecture of the executable is thought
about ahead of time. For example, instead of a single exe, you could deliver
an exe and a stack file. The stack file would contain the actual "guts" of
the program, while the exe was only a "stub" that would immediately open the
stack file when it was launched. So instead of:

  MyApp.exe

You have:

  MyApp.exe
  MyApp.dat  -- or whatever you want to call it

And the preopenstack handler of the MyApp.exe is simply:

  open stack "MyApp.dat"

Now suppose the primary stack (MyApp.dat) had the internal name of "MyApp".
Then add the simple ability to look for a patch (if there ever is one) and
execute it after the primary stack opens. I like to connect to an
alternative stack like this by using "start using" to make the stack's
functions and handlers accessible, and the "stop using" it when I'm done:

on preOpenStack
  open stack "MyApp.dat"
  if there is a file "MyAppPatch.dat" then
start using stack "MyAppPatch.dat"
RunPatch  -- executes the "RunPatch" handler in MyAppPatch.dat
stop using stack "MyAppPatch.dat"
delete file "MyAppPatch.dat"  -- remove it so it doesn't run next time
  end if
end preOpenStack

Then, in the "patch" stack's stack script, there would be a handler called
"RunPatch" that would make modifications to MyApp and save it. For example,
suppose you needed to change a custom property of the MyApp stack. It could
be something like:

on RunPatch
  set the uCustomProp of stack "MyApp" to "100"
  save stack "MyApp"
end RunPatch

Or, if you wanted to change the location of a field on the third card of the
MyApp stack, you could do something like:

on RunPatch
  set the loc of field "MyField" of card 3 of stack "MyApp" to 10,20,100,200
  save stack "MyApp"
end RunPatch 

Anyway, you get the idea. With a good architecture up front, you can allow
users to download a simple stack, place it in the same directory as the
executable and know that your app will be patched the next time it is run.

HTH,


Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: [EMAIL PROTECTED]


___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: create a patch upgrade

2005-02-03 Thread Sarah Reichelt
Is making a patch for a program easy or hard to change minor things on 
a program that has already been compiled into an exe?

This will be for the user to upgrade without having to dl the whole 
program.

If you have your project built into separate sub-stacks, it is quite 
easy to have a updater program download new versions of the sub-stacks 
only. It isn't exactly patching the app, but it might do what you 
wanted.

Sarah
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: create a patch upgrade

2005-02-03 Thread Derek Bump
A patch is usually a complex task when done on your own.  If you are patching a 
compiled EXE file then you need to compaire the COMPILED code of both programs 
to see what needs to be changed.

If your bold enough, you could try to do the compairison yourself, but I would 
recomend finding a patching program and just have your users download the patch 
either automatically in your software or from your web site.
 

Derek Bump
Dreamscape Software

Compress Images Easily with JPEGCompress
http://www.dreamscapesoftware.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution


create a patch upgrade

2005-02-02 Thread Paul Salyers

Is making a patch for a program easy or hard to change minor things on a 
program that has already been compiled into an exe?

This will be for the user to upgrade without having to dl the whole program.

Paul Salyers
PS1 - Senior Rep.
[EMAIL PROTECTED]
Http://ps1.SoftSeven.org  

___
use-revolution mailing list
use-revolution@lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution