User Tag List

Results 1 to 8 of 8

Thread: Implementing auto update feature.

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Implementing auto update feature.

    Hi,
    Just wondering if anyone would be willing to share how they implement an auto-update for their application. My application has lots of subdirectories and files and I won't know which files in which subdirectory to change until the update.
    It would be useful to download, a whole folder or directory and thus maintain the structure of the subdirectories in one simple go but the webgrab object (which I think is otherwise great ) only appears to download files.

    My solution would be to upload all the update files to one folder on my webspace along with an array object that holds details of where each update file needs to be placed. Then use the file object to read the array and copy the files to where they need to be. Is there a quicker way of doing it ?

    Secondly, does the download object in MMF2 download folders or only files ?



  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    1) this is not for MMF 2 help, there is a MMF 2 forum that more people would look at. It would probably be best to check the version using a simple PHP script and MOOSock, this code would be simple enough (save it as a .php file, like `version.php` and upload it to your PHP enabled website):

    <?PHP
    $Ver = (int)$_GET["Ver"]; //Get version from MOOSock
    $Cur = 1.2; //Current version of the files
    if ($Ver <> $Cur)
    {
    //File is old
    echo "###\r\nBad";
    }
    else
    {
    //File is OK
    echo "###\r\nGood";
    }
    ?>

    and using Jeff's MOOSock HTTP example (use the VCade example) change the url to: http://blah.bleh/FILENAME.php?Ver=1.2
    and change the values accordingly. This script is not secure though, it is fast and simple, strong enough to hold off virtually any people that would use it but that is the basis, you would need to add to the MMF code that if it recieves "Good" then go to the next frame, or if it recieves "Bad" then it will download the .zip and extract it, this would require the zip object and other stuff, search for examples and then goto the next frame or display an error if neither "Good" or "Bad" is recieved.
    From what I remember, Jeff's script removes all text before the ### so you should be able to use it with ease.
    Hope this helps :P just say if you dont understand anything

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    neat_Kliker2
    I can understand what your code does but I'm not really familiar or confident with PHP scripts to use them. I will look at the example you have provided for the MMF code and then decide what options to consider.
    Thanks for help.
    ps: I didn't post here - my post was moved here !

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    yep, when i posted it was in the 1.5 section, this is the 2.0 section and from what you said I guess your using 2.0 ?
    The PHP method will work fine

  5. #5
    No Products Registered

    Join Date
    Jun 2006
    Posts
    220
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    What I did is simply put every single file and folder into a zip file, and uploaded it to my webserver. Then I wrote a HTML file that states the update version such as this:

    Code:
    <html>
    [del]2[del]
    </html>
    Then use MooSock to retrieve the webpage - add a delimeter of [del] to string parser 2 (because MooSock gives you HTML headers back which you don't want). Set the source string of string parser to the text received by MooSock, then to get the version number you just use the "Get second element" expression which will give you the version number in between the two [del]. Compare that to the current version number, if it is higher then download the update file.

    Save the zip file to the main directory using the download extension, then use the zip object to extract the zip file into the directory (and it should overwrite all the updated files and such).

    I think that should work - I used a similar way to do it in my application (although I don't think it was exactly the same way).

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    It's unfortunate that the "correct" way is so difficult with moosock.

    The headers are always separated from the content by a blank line, and the headers never have a blank line in them, so the easiest way would be to keep using "receive text line" until you get a blank. Unfortunately moosock's receive text line skips blank lines.

    Note: This was in MMF 1.5, I haven't used moosock since, but I've heard that it hasn't been fixed.

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    i use moosock for stats retrieval on my MOO server, it is absolute rubbish when acting as a server, if you send someone text and dissconnect them, they never get the text. If you have actions (on connect or is connected) then when a client joins it does nothing (this is all in 2.0, i remember it working in 1.5 ;s)

  8. #8
    No Products Registered

    Join Date
    Aug 2006
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Implementing auto update feature.

    I'm impressed by such ingenious solutions but I must confess I am using MMF 1.5. I only asked about MMF2 because an easy solution with it might have been an incentive to move up!
    All of these ideas are helpful however. I will experiment accordingly.



Similar Threads

  1. Android-App Auto Update (Q)
    By SMASHINGmedia in forum Android Export Module Version 2.0
    Replies: 5
    Last Post: 3rd April 2013, 09:12 AM
  2. Creating Auto-Update program.
    By JimJam in forum Multimedia Fusion 2 - Technical Support
    Replies: 29
    Last Post: 14th August 2011, 10:34 AM
  3. Feature Request - Edit/Auto-Size Image Templates
    By Thudo in forum Install Creator and Patch Maker
    Replies: 2
    Last Post: 20th March 2009, 07:48 PM
  4. Auto - Update System
    By Spike in forum Multimedia Fusion 2 - Technical Support
    Replies: 21
    Last Post: 18th April 2008, 01:17 PM
  5. Install Creator - Auto Launch feature not found
    By chwood01 in forum Install Creator and Patch Maker
    Replies: 1
    Last Post: 3rd April 2007, 07:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •