Jump to content











Photo

[tutorial] How to make updates for scripts


  • Please log in to reply
10 replies to this topic

#1 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 25 July 2006 - 09:55 PM

This tutorial is a simple guide to show how script developers can make their new updated versions available to others online.

This feature is available from OpenBuilder 047 and WinBuilder.


Each script can be updated pressing the "update" button wich will look at the default updates file (updates.ini) if there is a newer version of this script, in case this is true it will download the file.



There are two ways of downloading a new script:
  • Using direct download
  • Using MD5 checksum
Using direct download:

It will use the download link available on updates.ini and will directly overwrite the older script file.
This method is fast and simple, but may also lead to some problems.. on long files the downloaded might get corrupted if the network fails, in this case the older working script is replaced by a corrupted version.



Using MD5 checksum:

It's the recommended way for publishing your works, adding a MD5 check on your updates.ini file will allow the program to download the file onto a temporary folder and compare the MD5 check from the updates.ini against the MD5 signature from the downloaded file. Only if this file passes the test it will overwrite the older version.





How to make an MD5 checksum?

Before making an MD5 checksum you should ensure that your file is ready to be uploaded and that all changes have already been made. It only takes one byte to output a completely different MD5 signature, so you should ensure that you upload an intact version of your file.

Getting the MD5 checksum is easy. Go to the options tab on the script window and press the "Calculate MD5" button. The result on the edit window is the MD5 byte signature of your script - screenshot




How to make an updates.ini?

You need to list your updated script or scripts on an "updates.ini" file to allow them to be downloaded by others.

Here's a brief description and template to make your own update host:


Open notepad, copy and paste this code:

[update]

Test.script=001,http://www.boot-land.net/scripts/Test.script

Edit the values to suit your script:

"Test.script" - is the filename of your script (it's not needed to include path)

"001" - is the version of your script, at this moment only numbers without commas are accepted, wich means that 1,1 and 1,2 will all be seen as 1 by the update service. You should use 1 or 2 or 3 or 4 or 5... to keep track of your versions.

http://www.boot-land...pts/Test.script - is the direct link to the updated script, if you wish it can be different from where updates.ini is hosted.


How to include MD5 signature?


Simply add your previously calculated MD5 on the end of the update line, like this example:

Test.script=001,http://www.boot-land.net/scripts/Test.script,7c6999e75cc2ace89132491805175c5c

ps: don't forget to add a comma to separate the web link from the MD5 signature



You can save all changes and close the updates.ini, now the uploading..


Uploading your files

You should ensure you use an account with ftp acess to make your life easier, if you don't have an account yet, you can look on google for "free ftp" and a couple of good options will appear. FTP is really the way to go if you want to update frequentely your files.

All active script developers get an ftp account hosted on boot-land.net to host all their works.


After you upload your files it's time to share them with others.

Inside the same options tab where MD5 is located, you'll notice a text box titled "Custom updates server", this is a value that customizable for each script file, wich allows for scripts to be updated from different developers - screenshot

You can add the full adress to the your updates.ini (but you don't need to add updates.ini on it) like in the example below:
http://develop.boot-land.net/updates

WinBuilder will automatically look for http://develop.boot-...tes/updates.ini this is reason it's kept outside the link.

If you have a new script and wish to keep up with all bugfixing while others are testing, you should already prepare this in the first script before publishing, this way it will make your updates work much better and make this process much easier for others.



I hope this guide is easy enough to follow, but let me know if there is any question or problem using the instructions from here.

I'll post them later on the wiki.

:P

#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 31 July 2006 - 09:49 AM

I tried with my AutoKeyBoard.script and got the correct result:
[attachment=75:attachment]
So until now everything seems to be ok.

When clicking the OK button, for a very short time there flushed a bar in the bottom of the logo.

That was all, I did not get a new AutoKeyboard.script. A search for the complete C: gave no result.

No difference when trying with and w/o MD5.

Peter

#3 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 31 July 2006 - 10:05 AM

I wonder what could be wrong? :P

Post the details:
  • Path to your updates.ini
  • The autoKeyboard script you want to update (I just need the old one to check)
I'll try it in here to see what's going wrong.. :P

#4 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 31 July 2006 - 10:35 AM

Sorry, it was my mistake. :P

I stored the old version instead of the new one :P :P

It works fine! :P

Peter

#5 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 31 July 2006 - 04:26 PM

nice tutorial.

But i still miss [major].[minor].[patch] versioning. I want to be able to signify that this release is a bugfix, while that one was a major overhaul.

just my NOK 0.02 :P

#6 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 31 July 2006 - 04:56 PM

I understand..

For most people it's easier to use versions to release their works, I will try to make this option possible soon. At this moment using single numbers is a stable way and I predict more versioning systems will be possible within next releases..

btw: finland doesn't uses cents? :P

#7 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 31 July 2006 - 06:06 PM

We'll have to agree to disagree here. Using more than one number might require a bit more thought (is this just a bugfix release, or should i up the minor version number) for devs, but to me, the added granularity is a Good Thing ™.

And, we also should settle on a versioning scheme and stick to it - especially if the script repository gets going.

//martin

and>
NOK = NOrwegian Kroner. I\m norwegian, not finnish!

#8 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 31 July 2006 - 06:14 PM

Yes, let's hope this gets a stable result soon.. :P

#9 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 31 July 2006 - 08:18 PM

I\m norwegian, not finnish!

That reminds me on a joke a friend of mine (norwegian) likes to tell:

What's the advantage the finnish, danish and swedish people have compared with norwegian people?

They have at least one sympatic neighbour!

Peter

#10 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 31 July 2006 - 08:47 PM

Sorry for the confusion... :P


It happens to me too, whenever people confuse portugal as being part of spain.. :P

Cheers for norway people :P :P

#11 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 03 August 2006 - 08:58 AM

Should be mentioned that the names at the FTP server are case sensitive.

If in updates.ini you define a .script, the update procedure will not copy a .Script!

Peter :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users