Announcement
Collapse
No announcement yet.
How to build a simple "CHECK FOR UPDATE"?
Collapse
X
-
PHP Code:version=1000
HTTP.Download("http://www.mydomain.com/version.txt", _TempFolder.."\\version.txt", MODE_BINARY, 20, 80, nil, nil, nil);
if (TextFile.ReadToString(_TempFolder.."\\version.txt")>version) then
-- Download a file to their temporary directory.
StatusDlg.Show(MB_ICONNONE, false);
HTTP.Download("http://www.mydomain.com/setup.exe", _TempFolder.."\\setup.exe", MODE_BINARY, 20, 80, nil, nil, nil);
-- Get any error codes that may have been returned by the download action.
error = Application.GetLastError();
StatusDlg.Hide();
-- If there was an error during the download, display the error message.
if error ~= 0 then
result = Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
-- If there was no error during the download.
else
--Get the CRC value of the downloaded file.
crc_value = File.GetCRC(_TempFolder.."\\setup.exe");
-- Check to see if the CRC value matches it's expected value.
if crc_value == 824907888 then
-- Run the exectuable that was downloaded.
File.Run(_TempFolder.."\\setup.exe", "", "", SW_SHOWNORMAL, true);
-- The CRC value does not match. Display an error message to the user.
else
result = Dialog.Message("Error", "The downloaded file is incomplete. Please try downloading again.", MB_OK, MB_ICONSTOP, MB_DEFBUTTON1);
end
File.Open(_TempFolder.."\\setup.exe", "", SW_SHOWNORMAL);
Application.Exit(0);
end
end
Leave a comment:
-
I am still confuse. Maybe a little script sample would be me understand a little bit more please.Originally posted by rexzooly View Postlook at Shadows Box via FTP app it is the best one i would say i seen for it
get your app to download that file and then check it with with its own build version and then if the versions is older then download the new verison.
that any better lol

Leave a comment:
-
Ok have a file on a server with the app like systemver.txt or .lua what as a version number and maybe build number and maybe little details on that updateOriginally posted by jpdragon View PostRexzooly,
Sorry that I am being idiot but I am still confuse.
look at Shadows Box via FTP app it is the best one i would say i seen for it
get your app to download that file and then check it with with its own build version and then if the versions is older then download the new verison.
that any better lol
Leave a comment:
-
like you do with that other file just read the file so have it download the version file of your online server and if version == version then wont download new if version ~= version then downloads.:yesOriginally posted by jpdragon View PostCan someone help me on how to build a simple check for update button or notification when they launch the .exe file?
My ideal is to release an update every month and store it on the web server address like http://www.myapp.com/update. When a user launch their tool, the notification pop up and said "new version xxx" is available click here to update. (Assumming they're using version 1.0 and I have version 2.0 on the server).
I am looking for a painless way to do it instead of using trueupdate. I have try trueupdate and does not want to bundle additional .exe file.
Greatly appreciate for reading this post.
Regards,
John

Leave a comment:
-
How to build a simple "CHECK FOR UPDATE"?
Can someone help me on how to build a simple check for update button or notification when they launch the .exe file?
My ideal is to release an update every month and store it on the web server address like http://www.myapp.com/update. When a user launch their tool, the notification pop up and said "new version xxx" is available click here to update. (Assumming they're using version 1.0 and I have version 2.0 on the server).
I am looking for a painless way to do it instead of using trueupdate. I have try trueupdate and does not want to bundle additional .exe file.
Greatly appreciate for reading this post.
Regards,
John
Tags: None
Leave a comment: