PDA

View Full Version : Disc Updates check


Maggi
08-09-2005, 12:56 PM
I want to try made updates check buttion
then i click the buttion (if internet connection alive) i see dialog window or text label with my current version of DVD and last alive version form website...
at the website all data(last version) will be in txt file for example in first line.
current disc version will be save in action i think....

some can make for me example or write what is fuction need use?
readtxtfile function, http connection function...maybe some other?
and if not hard write for me small example please...

eric_darling
08-09-2005, 01:25 PM
The best solution for doing updates in your software is to use TrueUpdate. I wouldn't put it past AMS to do what you're talking about, but TrueUpdate is definitely designed to do exactly what you're talking about. You know what they say... The right tool for the right job...

markstaylor
08-09-2005, 06:02 PM
Maggie,

Although I would agree with eric_darling about True Update being a better choice for the job I would like to offer the following information.

I made a simular program that would check the web for any updates to the current program. What it would do was...

1. Check for internet connectivity
2. Get the current version of my program (example 1.0)
3. Download a text file that is entitled the current version of the program I'm updating. for example "Myprogram_1.0.txt".
Note: In this file I have the version to upgrade to and any message that I might want to display. Maybe added features or special requirements.
If there was no update the file would have the same version as the current.

example
1.2

Updated GUI
Fixed problem with Windows 98 OS
...
...


4. Compare the versions to determine if an upgrade was available.
5. Download the upgrade
6. Run the upgrade (which changes the current version info in the registry for example)

Now when you check for upgrades again you may or may not have additional upgrades to install. Based on the way I was doing this I would include all the minor upgrades in my major upgrades so you can just download one. This may be a larger size.

You may want to add file CRC checking and ensure the user has enough space on the harddrive. Hope this helps a little.

Mark

Maggi
08-10-2005, 01:52 AM
Thank you
markstaylor and eric_darling
but TrueUpdate is shareware software and need pay again for this...better(if simply) use action for media studio i think...
i will try today write something...

markstaylor
08-10-2005, 12:22 PM
Here is a snippet of code from my project.

--Set vars
storage_path = "C:\\MyProgram";
CurrentVer = "1.0";
WebAddress = "www.indigorose.com";

-- Check to see if the user is connected to the internet
connected = HTTP.TestConnection(WebAddress, 20, 80, nil, nil);

-- If they are connected.
if connected then
Paragraph.SetText("Paragraph5","Checking for newer version...");
HTTP.Download(WebAddress .."/Downloads/MyProgram_"..CurrentVer ..".txt", storage_path .."\\version.txt", MODE_TEXT, 20, 80, nil, nil, nil);
--open version file from web and compare to current version
version = TextFile.ReadToString(storage_path .."\\version.txt");
isBigger = String.CompareFileVersions(version, CurrentVer)

if isBigger == 1 then
--Get updated message file from web
HTTP.Download(WebAddress .."/Downloads/MyProgram_" ..version .."msg.txt", storage_path .."\\" ..version .."msg.txt", MODE_TEXT, 20, 80, nil, nil, nil);
newMessage = TextFile.ReadToString(storage_path .."\\" ..version .."msg.txt");
--display message or features
Paragraph.SetText("Paragraph3",newMessage);
Paragraph.SetText("Paragraph5","A newer version is available.");
--Enable the continue button
Plugin.SetEnabled("Plugin1", true);
Page.SetFocus("Plugin1");
else
Paragraph.SetText("Paragraph5","You have the newest version.");
end
else
-- if they are not connected
Paragraph.SetText("Paragraph3","Unable to connected to the Host Server. Please check your connection or try again later.");
end

in the continue button download the actual update and run it.

Maggi
08-11-2005, 04:12 AM
markstaylor
thank you
i think its helped me
and tomorrow i think i post here is my version :) maybe its help someone