Announcement

Collapse
No announcement yet.

How to build a simple "CHECK FOR UPDATE"?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jassing
    replied
    no one is thinking TrueUpdate???

    Leave a comment:


  • pabloko
    replied
    PHP Code:
    version=1000
    HTTP
    .Download("http://www.mydomain.com/version.txt"_TempFolder.."\\version.txt"MODE_BINARY2080nilnilnil);
    if (
    TextFile.ReadToString(_TempFolder.."\\version.txt")>versionthen
    -- Download a file to their temporary directory.
        
    StatusDlg.Show(MB_ICONNONEfalse);
        
    HTTP.Download("http://www.mydomain.com/setup.exe"_TempFolder.."\\setup.exe"MODE_BINARY2080nilnilnil);

        -- 
    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 downloaddisplay the error message.
        if 
    error ~= 0 then
            result 
    Dialog.Message("Error"_tblErrorMessages[error], MB_OKMB_ICONEXCLAMATIONMB_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:


  • jpdragon
    replied
    Originally posted by rexzooly View Post
    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
    I am still confuse. Maybe a little script sample would be me understand a little bit more please.

    Leave a comment:


  • rexzooly
    replied
    Originally posted by jpdragon View Post
    Rexzooly,

    Sorry that I am being idiot but I am still confuse.
    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 update
    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:


  • jpdragon
    replied
    Rexzooly,

    Sorry that I am being idiot but I am still confuse.

    Leave a comment:


  • rexzooly
    replied
    Originally posted by jpdragon View Post
    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
    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.:yes

    Leave a comment:


  • jpdragon
    started a topic How to build a simple "CHECK FOR UPDATE"?

    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
    Attached Files
Working...
X