PDA

View Full Version : Updating client software


abarros
09-07-2005, 03:26 PM
I am running TrueUpdate 2.0.2.0. I published my server files to an ftp location and my client files (update.exe and update.dat) to a LAN location. If I run update.exe from my machine it says that the update application has been updated and needs to be restarted (it does that 5 times and then dies). If I run from another machine in the office, the LiveUpdate runs ok (without trying to update the client software). Both machines are running Windows XP and executing update.exe from the same location. Any hint why I have that discrepancy ?
Thanks,
Alex

bnkrazy
09-08-2005, 10:16 PM
Are you sure that both machines (or user accounts) have permissions on the shared drive? Maybe one has modify and the other only read access. More often than not it is a permissions issue when these types of issues arise.

I personally have never tried to run the update from a network share so my response is speculation at best.


Forgot to mention that there is an excellent logging ability in this version so I suggest spitting out a bunch of log messages and that should point you in the right direction rather quickly.

Mark
09-09-2005, 08:35 AM
bnkrazy is right, it may be a difference in the permission on the two computers, check to make sure that they are the same or note what the differences are.

He is also right to suggest checking the log file. Log files in TureUpdate 2.0 are very detailed and should be able to help us figure out what the issues is.

You may also want to check what your settings are under Project | Advanced if it turns out to be a permissions issue.

abarros
09-09-2005, 10:40 AM
I do have permission on the LAN drive...In fact, I tried to copy it to my machine and run, with the same results.... This is what the log file gives me:

[09/09/2005 10:29:08] Success Update started: C:\PROGRA~1\SOLUTI~1\Update.exe
[09/09/2005 10:29:08] Notice Update engine version: 2.0.0.0
[09/09/2005 10:29:08] Notice Product: Solutions Console, version %ProductVer%
[09/09/2005 10:29:08] Success Language set: Primary = 9, Secondary = 1
[09/09/2005 10:29:09] Success Load plugin: C:\WINDOWS\TEMP\_ir_tu2_temp_6\IRZip.lmd
[09/09/2005 10:29:09] Success Load plugin: C:\WINDOWS\TEMP\_ir_tu2_temp_6\IRZip.lmd
[09/09/2005 10:29:09] Success Load plugin: C:\WINDOWS\TEMP\_ir_tu2_temp_6\IRZip.lmd
[09/09/2005 10:29:09] Success Include script: _TU20_Global_Functions.lua
[09/09/2005 10:29:09] Success Language set: Primary = 9, Secondary = 1
[09/09/2005 10:29:09] Success Display screen: Welcome
[09/09/2005 10:29:11] Success Display screen: Already At Target
[09/09/2005 10:29:57] Success Run client data event: Client Script

It says that I am already at target, but I am not ! My update.exe and .dat are older than the .ts* files on the ftp location...
Is there any way to produce more trace ? What is the process checking to determine I need to update the client ? Date/Time of the files ?

Thanks,
Alex

Mark
09-09-2005, 11:00 AM
Hi Alex,

I notice three things when looking at your logfile:

It says that you are running TrueUpdate 2.0.0.0 not 2.0.2.0, but this may be a result of your updating problem.
You do not seem to be loading a Server File to determine if you are running the latest version? How are you checking to see if you are running the latest version? In general this code should be located in the Server File since that is what changes and not in the client.
The update does not seem to be restarting, is this still an issue?


To answer your question about how the update works, here is the update process (taken from the help file)

The Update Process
Here is a description of a typical update process in detail.

The TrueUpdate Client welcomes the user to the update by displaying an appropriate screen or popup dialog box.

The client then attempts to download the server configuration files from the first server in its list of TrueUpdate Servers. (By default, it will attempt to connect to each server location in the list until it succeeds.)

Once it connects to a server location, it checks to see if the location contains a newer version of the client data or client executable file. If it does, the client downloads the appropriate server configuration files (e.g. the .ts2 or .ts3 file, or both), and then restarts in order to use the new version of itself.

Assured that it is up to date, the client next downloads the server script and screens, which are contained in the .ts1 server configuration file.

After loading the server screens into memory, the TrueUpdate Client runs the server script.

The first function of the server script is to determine what version of the target software is currently installed on the user’s system. This version is generally referred to as the installed version.

Once the installed version has been determined, the server script compares it to a target version. The target version represents the desired version of the software--i.e. the version that the script was designed to update the software to.

f the above test determines that the installed version is already current, the server script informs the user that they already have the latest version, and then exits.

If on the other hand the test determines that an update is required, the server script proceeds with the actual update process. While the actual update method will vary from project to project, the most common method involves downloading a single executable patch file and then running that file with appropriate command line options.

If the patch file returns a value that can be used to determine whether it succeeded, the server script will usually check this value and then inform the user of the success or failure of the update.

If the patch file doesn’t return any such information, the server script will either wait for the patch to finish and then inform the user that the update process is complete, or simply exit silently and let the patch continue on its own.

abarros
09-09-2005, 02:31 PM
I was under the impression that the update of the client portion is handled by the trueupdate software itself, like you mention in your #3:

"Once it connects to a server location, it checks to see if the location contains a newer version of the client data or client executable file. If it does, the client downloads the appropriate server configuration files (e.g. the .ts2 or .ts3 file, or both), and then restarts in order to use the new version of itself."

I do have server files, but my issue is updating the client software on that machine. As I have older update.exe and update.dat, I was expecting that it would update itself (which happens on other machines).

The only difference I see is that this machine is the one that is running the TrueUpdate software (the editor), but I don;t see how that could cause the problem.

Alex

Mark
09-09-2005, 03:27 PM
Hi abarros,

Yes that is correct, once TrueUpdate 2.0 connects to a server it will automatically update the client files.

The problem that I am seeing with your logfile is that your update doesn't appear to be connecting to any servers? Unless TrueUpdate 2.0 connects to a TrueUpdate Server, it will be unable to update the client files.

How are you handing the connection with your TrueUpdate Servers? I don't see any "Connect to Server" screens being shown in your logfile so I'm assuming that you are doing it manually? If so you could try adding some debug messages in order to figure why you are not connecting to any TrueUpdate servers.

Or if you want post your connect code to the forum so that we can look at it and perhaps spot the problem.

abarros
09-09-2005, 06:40 PM
That's my client code:

--Initialize global variables here
screen_globals = {};
screen_globals.GotServerFiles = false;

IsConnected = HTTP.TestConnection("http://www.google.com", 20, 80, nil, nil);
if (IsConnected == false) then
Dialog.Message("Notice", "No Internet connection was detected.Please check your environment and try a manual update (from inside the Console) later");
else
-- Get the list of TrueUpdate Server locations
local tableTrueUpdateServers = TrueUpdate.GetUpdateServerList();
if(tableTrueUpdateServers) then
for index, ServerName in tableTrueUpdateServers do
screen_globals.GotServerFiles = TrueUpdate.GetServerFile(ServerName, true, nil);
-- Break out of this loop if we succeeded
if(screen_globals.GotServerFiles) then
break;
end
end
end

--If we got a server file then let's run the main
--script now.
Screen.Show("Update_Client", "Welcome");
if(screen_globals.GotServerFiles) then
TrueUpdate.RunScript("Server Script");
else
--Update Failed!
Screen.Show("Update Failed");
end
end

Mark
09-13-2005, 05:10 PM
Hi abarros,

Sorry for the confusion, since you are using a LAN-based TrueUpdate server and version 2.0.0.0 nothing will be written to the logfile, this was fixed in version 2.0.2.0.

Are you sure that you have uploaded all of the necessary files to your LAN location? Check the LAN location to make sure that all three ts* files are located there: ts1, ts2, and ts3.

Then you can check the version of the ts3 file by right clicking on it and selecting properties. Is its file version 2.0.2.0?

TrueUpdate checks the version of the ts3 file and the CRC of the ts2 file to see if the client needs to be updated.

Steven Carr
09-14-2005, 05:08 AM
I have previously had some strange things occur, along the lines of the client updating multiple times.

I all cases it was due to caching on the machine.

Once i cleared the cache (and cache on the proxy) they problems went away.

This does not happen all the time, but can happen if you try an update from the older version before doing an update for your new version.