Jump to content
Sign in to follow this  
Jon

Who wants to write an AutoIt Updater?

Recommended Posts

Jon

I've placed a file at http://www.autoitscript.com/autoit3/update.dat and the contents are:

AutoIt
3.0.102.0
http://www.autoitscript.com/autoit3/downloads.php
http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe
AutoItBeta
3.0.103.156
http://www.autoitscript.com/autoit3/files/beta/autoit/
http://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.0.103.exe

The first URL is the "download page" and the second is the URL for downloading the installer directly.

I would like someone (or group effort) to write a whizzy GUI that allows people to download the current release or beta installer (or if that is not what they want to just take them to the download page). It should do a check of the version of AutoIt3.exe in the install directory (not @AutoItExe) and compare it to the version number in update.dat.

The download should be done with InetGet in background mode and a snazzy animation or progress bar type thing.

The code should be neat and commented too, this would be a good script to learn from.

Who's game?

Share this post


Link to post
Share on other sites
Josbe

Interesting. :idiot:

Jon, about the DAT file, I think that would be more easy to read from a file like the INI format. What do you think?

[AutoIt]version=3.0.102.0

index=http://www.autoitscript.com/autoit3/downloads.php

setup=http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe

[AutoItBeta]

version=3.0.103.156

index=http://www.autoitscript.com/autoit3/files/beta/autoit/

setup=http://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.0.103.exe

Share this post


Link to post
Share on other sites
Valik

josbe is right, downloading the "dat" file and having it in INI format would simplify processing a bunch.

Incidentally, I use a date-based approach. I have stuff to parse the page where the downloads are kept and extract the date and then compare it to determine when an update is available. However, I'm afraid none of my updater fits your needs, its a totally different implementation and more suited for automation (No GUI, INI driven, et cetera).

Share this post


Link to post
Share on other sites
layer

how much bytes is 1.4M???


FootbaG

Share this post


Link to post
Share on other sites
MHz

how much bytes is 1.4M???

<{POST_SNAPBACK}>

Roughly 1.44Mb = 1509949.44 Bytes

:idiot:

Share this post


Link to post
Share on other sites
ryeguy

everything is x1024 the size behind it

ie

1mb=1024 kb

1mb=1024*1024 bytes

1.4mb is 1468006.4 bytes

Edited by ryeguy

Share this post


Link to post
Share on other sites
therks

...And 1 GB = 1000 KB

This post for Jon :D

<{POST_SNAPBACK}>

1000 KB??? Damn! Now you're really ripping us off! :idiot:

Share this post


Link to post
Share on other sites
Jon

josbe is right, downloading the "dat" file and having it in INI format would simplify processing a bunch.

Incidentally, I use a date-based approach.  I have stuff to parse the page where the downloads are kept and extract the date and then compare it to determine when an update is available.  However, I'm afraid none of my updater fits your needs, its a totally different implementation and more suited for automation (No GUI, INI driven, et cetera).

I was going to use an .ini but I wasn;'t sure if all the characters in a URL were OK (i remember some posts about certain things not working). But if there doesn't seem to be a problem I'll replace the contents with an ini file format.

OK. Done.

I can imagine the sort of script you have, Valik ;p. But this is just for the casual updaters who want to get the latest version and saves us telling everyone the url every 10 seconds :idiot: I've decided on a dat file as it's only 300 bytes so it doesn't matter if it gets checked via the internet a lot and is easy on the server too.

Share this post


Link to post
Share on other sites
JSThePatriot

I'm game. I would love to do this. I can do it myself or if someone else is interested then we shall talk.

Today is my last day at my day job so I will have plenty of free time soonish. I'll post my progress here if you dont mind my taking this on.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites
Chris_1013

I'm willing to give a hand if needed... doesn't sound terribly complex, although I usually can't be arsed to write whizzy GUI side of things...

Share this post


Link to post
Share on other sites
ioliver

@JS, I'm willing to help to. Let me know if there is anything I can work on. My knowledge of AutoIt is limited, but I'm willing to give it a shot.

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites
Nova

@ JSThePatriot, you bet me 2 it,

I love writing gui's. But theres no need for more that one person to work on a script like this.

It should be fairly simple, plus I dont want to turn this into a compidition :idiot:

Share this post


Link to post
Share on other sites
JSThePatriot

@ JSThePatriot, you bet me 2 it,

I love writing gui's. But theres no need for more that one person to work on a script like this.

It should be fairly simple, plus I dont want to turn this into a compidition :idiot:

<{POST_SNAPBACK}>

Nah no competition for sure. I like writing GUI's. What I would say is.. You make one, I make one and the other people can input ideas. We will see how our scripts differ dicuss it and implement the good points of both.

I am not one to say that what I design will be the best. My favorite thing is to learn something new everyday.

So long as you are willing to do the above then there will be no competition and I dont mind sharing credit for this. I just want to help AutoIt advance.

Have at it.

@IOliver & @Chris_1013

As we post our code give us ideas, suggestions. Let us know if our code is commented well enough.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites
ioliver

We will see how our scripts differ dicuss it and implement the good points of both.

@JS, great example of Sinergy. 1 + 1 = 3 or more.

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites
layer

maybe ill write one too, but im not good with cool looking gui's..


FootbaG

Share this post


Link to post
Share on other sites
ioliver

Ok, here's my first try. It's very simple, and not really complete. I just posting, because it may give someone else a starting point.

#Include <GUIConstants.au3>

$path = InputBox("AutoIt 3 Installation Path", "Enter the Full Path " &_
                 "to your AutoIt 3 Installation:", "C:\Program Files\AutoIt3")
$cver = FileGetVersion($path & "\autoit3.exe")
InetGet("http://www.autoitscript.com/autoit3/update.dat", $path & "\autoitupdate.ini")

$aver = IniRead($path & "\autoitupdate.ini", "AutoIt", "version", "0")
$aindex = IniRead($path & "\autoitupdate.ini", "AutoIt", "index", "0")
$asetup = IniRead($path & "\autoitupdate.ini", "AutoIt", "setup", "0")
$abver = IniRead($path & "\autoitupdate.ini", "AutoItBeta", "version", "0")
$abindex = IniRead($path & "\autoitupdate.ini", "AutoItBeta", "index", "0")
$absetup = IniRead($path & "\autoitupdate.ini", "AutoItBeta", "setup", "0")

GuiCreate("AutoUpdateIt", 300, 300, 100, 100)
  GUICtrlCreateLabel("Your Current AutoIt 3 Installation Details:", 10, 10)
  GUICtrlCreateLabel("AutoIt 3 Installation Path: " & $path, 10, 25)
  GUICtrlCreateLabel("AutoIt3.exe Version: " & $cver, 10, 40)
  GUICtrlCreateLabel("Latest AutoIt 3 Version: " & $aver, 10, 65)
  GUICtrlCreateLabel("Latest AutoIt 3 Beta Version: " & $abver, 10, 80)
  Guictrlcreatelabel("Click to download the latest version of", 10, 105)
  GUICtrlCreateLabel("AutoIt 3 or AutoIt 3 Beta", 10, 120)
  $dla = GUICtrlCreateButton("AutoIt 3", 10, 150, 100)
  $dlab = GUICtrlCreateButton("AutoIt 3 Beta", 145, 150, 100)
 ;GUICtrlCreatePic("autoit.jpg", 10, 185, 250, 100)
    
GUISetState (@SW_SHOW)

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    If $msg = $dla Then
       Run("C:\Program Files\Internet Explorer\iexplore.exe " & $aindex)
    EndIf

    If $msg = $dlab Then
       Run("C:\Program Files\Internet Explorer\iexplore.exe " & $abindex)
    EndIf
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

I rem'ed out the GUICtrlCreatePic(), all it did was put the AutoIt logo at the bottom of the window.

Thanks for reading,

Ian


"Blessed be the name of the Lord" - Job 1:21Check out Search IMF

Share this post


Link to post
Share on other sites
BasicOs

It is fine joining you to make one updater, but I should think that you could make without gui every time, more a batch style :lol: . So to leave in autoboot.

at first time ask some questions of the type of update(full) (partial) and may be keep the old files in case some problem, to roll them back, directory, ...save it in (by example) a inifile,

the second time it starts:

it starts and it looks in the ini for the stored setup, and performs everything, only to say at the end, if it was updated OK or not. and the two versions.

if you want to change config. then delete ini file or change one variable.

If somebody knows exactly and deeply what is every file in autoit used for and what happens when they dont fit.

If some of you want to betatest it, tell me. :D;)

I realized the autoit files are not changed at the same time. I mean a more file to file update, than whole version update. :idiot:

Thanks

DIFERENT DATES OF FILES:

Index of /autoit3/files/beta/autoit

Name Last modified Size Description

--------------------------------------------------------------------------------

Parent Directory 03-Jan-2005 04:40 -

AU3Info.exe 13-Jan-2005 05:16 20k

Aut2Exe.exe 28-Nov-2004 11:18 73k

AutoIt.chm 13-Jan-2005 05:16 715k

AutoIt3.exe 13-Jan-2005 05:17 114k

AutoItSC.bin 13-Jan-2005 05:17 245k

GUIConstants.au3 10-Jan-2005 13:16 9k

multi_gui.au3 28-Sep-2004 07:22 2k


Autoit.es - Foro Autoit en Español Word visitors Image Clustrmap image: - Football Spanish team - Spanish team: Casillas, Iniesta, Villa, Xavi, Puyol, Campdevilla, etc..Programando en Autoit+Html - Coding Autoit-Html - Arranca programas desde Internet - Preprocesador de Autoit a http

Share this post


Link to post
Share on other sites
magicboy

Along the lines of what BasicOs said. If you want a script to learn from throw in some command line arguments for automating the download.

Share this post


Link to post
Share on other sites
JSThePatriot

Along the lines of what BasicOs said.  If you want a script to learn from throw in some command line arguments for automating the download.

<{POST_SNAPBACK}>

Okay... I will think about this when I complete my script. I had already thought about this option though not in the way you have suggested.

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×