PDA

View Full Version : Web update - multiple versions



NewsArchive
01-07-2009, 02:57 AM
Hi Friedrich,

I seem to recall I asked this before but I can't find it and can't remember
it.

In a SB web update project I need to be able to specify that updates must be
downloaded in sync. I.e. I need to be able to upload version 1.0.1, 1.0.2,
1.2.0, 1.2.1 etc. and then a user on 1.0.0 would first download 1.0.1, then
1.0.2, etc. and a user on 1.0.2 would download 1.2.0 etc. I.e. they MUST
download EACH build.

How is this best accomplished with SB and WebUpdate?

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
01-07-2009, 03:09 AM
Hi Arnór,

> I seem to recall I asked this before but I can't find it and can't
> remember it.
>
> In a SB web update project I need to be able to specify that updates
> must be downloaded in sync. I.e. I need to be able to upload version
> 1.0.1, 1.0.2, 1.2.0, 1.2.1 etc. and then a user on 1.0.0 would first
> download 1.0.1, then 1.0.2, etc. and a user on 1.0.2 would download
> 1.2.0 etc. I.e. they MUST download EACH build.
>
> How is this best accomplished with SB and WebUpdate?

Good question. To accomplish the above, you need some kind of web update
"helper" application. This "helper" has to manage the version
"synchronization".

Let us assume, the user is on version 1.0.0. Your latest version on the
server is 1.2.1. You have released the following four updates and you need
to be able to download the following builds:

1.0.1
1.0.2
1.2.0
1.2.1

The standard wupdate.exe checks for an update and a new version is detected
(your server says 1.2.1).

The "helper" comes into play now -- let's name it "whelper.exe". Okay,
wupdate.exe automatically downloads the small "whelper.exe" (developed with
SetupBuilder). This application has information about all released
versions. It detects that the machine is on 1.0.0 and based on this
information it knows that 1.0.1, 1.0.2, 1.2.0 and 1.2.1 are required to
bring the user to the latest version. "whelper.exe" downloads all these
updates from your server and after that, executes the updates.

Pseudo code for the latest 1.2.1 "whelper.exe":

- Read client version
- Read server version
- If client < 1.0.1 then download 1.0.1
- If client < 1.0.2 then download 1.0.2
- If client < 1.2.0 then download 1.2.0
- If client < 1.2.1 then download 1.2.1
- If 1.0.1 downloaded then execute 1.0.1 (and wait)
- If 1.0.2 downloaded then execute 1.0.2 (and wait)
- If 1.2.0 downloaded then execute 1.2.0 (and wait)
- If 1.2.1 downloaded then execute 1.2.1 (and wait)

What if you make 1.2.2 available? You only have to create the 1.2.2
installer and update the "whelper".

Pseudo code for the next 1.2.2 "whelper.exe":

- Read client version
- Read server version
- If client < 1.0.1 then download 1.0.1
- If client < 1.0.2 then download 1.0.2
- If client < 1.2.0 then download 1.2.0
- If client < 1.2.1 then download 1.2.1
- If client < 1.2.2 then download 1.2.2
- If 1.0.1 downloaded then execute 1.0.1 (and wait)
- If 1.0.2 downloaded then execute 1.0.2 (and wait)
- If 1.2.0 downloaded then execute 1.2.0 (and wait)
- If 1.2.1 downloaded then execute 1.2.1 (and wait)
- If 1.2.2 downloaded then execute 1.2.2 (and wait)

Then upload the new whelper and the 1.2.2 update. That's it.

What do you think?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-08-2009, 02:22 AM
Hi Friedrich,

> Pseudo code for the next 1.2.2 "whelper.exe":
>
> - Read client version
> - Read server version
> - If client < 1.0.1 then download 1.0.1
> - If client < 1.0.2 then download 1.0.2
> - If client < 1.2.0 then download 1.2.0
> - If client < 1.2.1 then download 1.2.1
> - If client < 1.2.2 then download 1.2.2
> - If 1.0.1 downloaded then execute 1.0.1 (and wait)
> - If 1.0.2 downloaded then execute 1.0.2 (and wait)
> - If 1.2.0 downloaded then execute 1.2.0 (and wait)
> - If 1.2.1 downloaded then execute 1.2.1 (and wait)
> - If 1.2.2 downloaded then execute 1.2.2 (and wait)
>
> Then upload the new whelper and the 1.2.2 update. That's it.
>
> What do you think?

Sounds reasonable. What I'm trying to accomplish is an install where I can
force installation of a certain build. Hence my question about adding into
the manifest, something like:

forceinstall=1

But then I got thinking that if a NEW build comes out after a forced one
that is not forced? Well, then my idea fails<g>

My idea was that I would (inside wupdate.exe) download the manifest and
check if forceinstall=1 is there. If it is the user can no longer run the
program without running the update - i.e. the user is forced to update.
This should work fine, but I realized the it had a limitation with multiple
builds with mixed forced and not forced.

If you have better ideas, I'm all ears:)

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php

NewsArchive
01-08-2009, 04:48 AM
Hi Arnór,

>> What do you think?
>
> Sounds reasonable. What I'm trying to accomplish is an install where
> I can force installation of a certain build. Hence my question about
> adding into the manifest, something like:
>
> forceinstall=1
>
> But then I got thinking that if a NEW build comes out after a forced one
> that is not forced? Well, then my idea fails<g>
>
> My idea was that I would (inside wupdate.exe) download the manifest and
> check if forceinstall=1 is there. If it is the user can no longer run the
> program without running the update - i.e. the user is forced to update.
> This should work fine, but I realized the it had a limitation with
> multiple
> builds with mixed forced and not forced.
>
> If you have better ideas, I'm all ears:)

What about the following manifest:

[SB5UPDATE]
Version=1.50.1212
Setup=BuildAutomatorInstall.exe

[FORCE]
ForceBuilds=2
1=1.40.1000
2=1.45.1111

The above would allow to "force" an update for specific versions.

-OR-

[SB5UPDATE]
Version=1.50.1212
Setup=BuildAutomatorInstall.exe
ForceBuild=1.40.1000

If the installed version is <= ForceBuild then update is required.

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
01-09-2009, 02:30 AM
Hi Friedrich,

> [SB5UPDATE]
> Version=1.50.1212
> Setup=BuildAutomatorInstall.exe
> ForceBuild=1.40.1000
>
> If the installed version is <= ForceBuild then update is required.

I _like_ that one! That's the simple one that I've been looking for:) This
will work great! Anything that is lower that the latest "forcebuild" will
force the update. Excellent!

Best regards,

--
Arnór Baldvinsson - Icetips Creative, Inc.
Port Angeles, Washington
www.icetips.com - www.buildautomator.com

Icetips product subscriptions at http://www.icetips.com/subscribe.php