Upd GUI - GUI for creating auto updating compiled scripts
- patched to restore functionality (hopefully...)
- an update with additional features and various improvements should be available soon...
Upd - GUI Version (1.2) - download (previous version - April 3, 2005)
Upd - GUI Version (1.1) - download (previous version)
- File sizes of Upd generated, compiled scripts are now only approx. 1kb larger
than standard AutoHotkey compiled scripts!!, added Help and more...
Note: Running the previous version (1.2) will give the option to upgrade to the latest version . Please scroll down for updates...
Here' s a script I've been playing with to allow compiled scripts to auto update when run. If an update is available the user will be asked if they would like to update to the latest version. This is done by placing a small file on a webserver that lists the available scripts and their current version numbers. The script looks up the script in the update file and prompts for an update if the version does not match. If the user decides to update the current version will be downloaded, replace the existing version and run.
There are 2 parts to creating an auto updating script with this method:
Creating/updating the update file:
& Creating a file for distribution:
note: Upd GUI uses Ahk2Exe.exe
Version 1.2/1.3 Instructions:
1.) Download the .exe file above and save to a directory of your choice
2.) Browse to that directory and run saved file (running the saved file will change the name of the file to Upd_GUI.exe and start Upd GUI)
3.) fill in the required fields in the "Create Update" tab
4.) click the "Create Update" button
5.) Upload the new .exe file to your web server
6.) click the "Edit Update File" tab
7.) Click the New button to create a new file and use the Add button or open an existing file to add/edit the names and version numbers of the programs that you would like to have auto update. (Double-click to edit an entry in the list)
8.) Upload the file you created/modified with the Upd Editor to your web server
Version 1.1 Instructions:
1.) Download the zip file above and extract to a directory of your choice.
2.) Browse to that directory and run the file: Upd_GUI.exe
3.) fill in the required fields
4.) click the "Create Update" button
5.) Upload the new .exe file to your web server
6.) run the file: UPD_Editor.exe
7.) Click the New button to create a new file and use the Add button or open an existing file to add/edit the names and version numbers of the programs that you would like to have auto update. (Double-click to edit an entry in the list)
8.) Upload the file you created/modified with the Upd Editor to your web server
Upd GUI fields:
Application Name - This should match (exactly) the name used in the Upd Editor
AHK File - Full path to your AHK script
Current Version- This should match (exactly) the version entered in the Upd Editor
Custom Icon- (optional) full path to a custom .ico file
Original Filename- file to be replaced
Passphrase- (optional) Same as when using AHK2Exe
Upd File URL- Url to the file created using Upd Editor (on webserver)
Download URL- Path where file updates are stored on webserver (no forward slash at the end)
Comments, suggestions, etc... welcome...
Updates:
Version 1.2
- patched to restore functionality (hopefully...)
Version 1.2
- File sizes of Upd generated, compiled scripts are now only approx. 1kb larger
than standard AutoHotkey compiled scripts!! (approx. 50% smaller than with
previous versions of Upd GUI).
- Upd temporary variables are now cleared before starting regular script
- Tested & designed for use with Ahk2Exe v1.0.30.04 -- Script to EXE converter
- Help Tab Created & a bit of help added (more to be added later...)
- Upd Editor merged into Upd GUI
Version 1.1
- fixed - update process
- fixed - long filenames were causing problems with compiler
Source not currently available but will likely be made available with the next release...
I'm currently working on a way to bring the file size down a bit. Currently the file size of an update is at least 2 x the size of a compiled script. This is because the generated compiled script is currently placed in a second compiled script that uses FileInstall to allow the original script to be overwritten then run. Once the update has completed the size is no longer an issue (since the extra bits are deleted) but the extra space is taken up on the webserver. Time to play with the compiler a bit I think ...
So, to recap:
1) Have working source AHK
2) Have a .DAT file that only contains one line - 'apprun=1.1'
3) Got the .DAT file on my webserver, like http://myserver/update.dat
All values and forms seem to be filled in..... I am slightly confused about the "EDIT UPDATE FILE" tab, but I have the 'apprun=1.1' in there.
The problem is, when I run the .EXE file, I get message: "ERROR: UPDATE NOT AVAILABLE". That is a strange message, and no mater what version i list in the .DAT file stored on the webserver, or what version apprun1.2.exe, or whatever, doesn't change that message. The app then runs just fine after clicking OK..... so I don't know..... any ideas or suggestions? I really need something like this to work, and understand in principle how this is *supposed* to work ) Thank you so much! I feel like it is something very small that is holding me up. Thanks, %A%
The error that you are receiving is likely due to the .dat file location and/or program name. The name that you specify for the program in the Application Name section of the Create Update tab must exactly match the Applcation Name specified in the Edit Update File tab. If the names don't match and/or the .dat file could not be downloaded from the url specified in the Create Update tab then you will receive this error. These errors probably shouldn't be displayed to users but the error messages were left in to help debug the script at the time. Once the Application names match and the .dat file can be read from the url specified, the error message shouldn't be displayed.
There is currently an issue with the update process though that will prevent a script from being updated after a user clicks Ok to update to a new version, once a new version is available. The update will fail and leave the user with the same version. If I remember correctly, a fix should be possible for the current version that will allow previous versions to be updated correctly without having to ask a user to download a new version manually. I'll have a look and post an updated version soon if you're still interested .
I have
Application Name: ChrtrShrtHnd
App File: C:/Filelocation/ChrtShrtHnd.ahk
Current Version: 7-1-5
Custome Icon C:/Filelocation/ChrtrShrthndCustIco.ico
Original File Name: chrtrShrtHnd.exe
UPDFileurl: http://mywebpage/CSH...hrtHnd7-1-5.exe
DownloadURL: http://mywebpage/CSH...hrtHnd7-1-5.exe
When I hit compile it generates my .exe as : ChrtShrtHnd7-1-5.exe
So how does it work? When I run that version of the .exe is this gui implanting a script to check my UPD FileUrl?
What am I doing wrong and how will it know to look for ChrtrShrtHnd7-1-8.exe?
There is currently a bug that will prevent the update process from completing sucessfully though. An update is planned but has been temporarily delayed unfortunately.
And if its looking for ProgramVersion1.exe per the UPD File URL and I upload my website with ProgramVersion2.exe Is it actually looking for ProgramVersion%X%.exe Where X is > 1? Or am I way off base?
And what about Until it gets patched making it download new vers of program to same directory and prompting you with: Would you like to delete old version?
The .dat file gets created when you fill out the information for the update file. You then need to place the .dat file that gets created on your webserver. As this method is designed to allow someone to distribute their scripts and allow users to receive semi-automated updates, you typically won't want a user to be able to modify the script otherwise their changes would be lost if they decided to update to a new version. This is the main reason for compiling to .exeYes but what is the .dat file and why is my program only becoming .exe
It only checks to see if the version on the website matches the current version installed. If the 2 versions do not match it will inform the user that another version is available, and ask them if they would like to update to the version on the website (it will mention the version number from the website).And if its looking for ProgramVersion1.exe per the UPD File URL and I upload my website with ProgramVersion2.exe Is it actually looking for ProgramVersion%X%.exe Where X is > 1? Or am I way off base?
As that would still consist of creating a patched version, I would prefer to release a new version with the intended functionality instead. The next version will be restructured internally to take advantage of many of the new features that have been added to AHK since this script was put together. Another reason for restructuring is that the code for this script is a bit of a pain to work on in its current state. There are actually a few scripts that modify themselves and merge together which then modifies itself and gets compiled to form a compiled script that can also update itself (semi automatic - it will prompt and ask). Once I restructure most of the self modifying code it will hopefully be easier to work with...And what about Until it gets patched making it download new vers of program to same directory and prompting you with: Would you like to delete old version?
The tab where you entered your information is for creating a .exe to distribute. The information is used to tell the program where the .dat file is, where to download updates, current version, etc... The "Edit Update File" tab can be used to create a .dat file to place on your webserver.I get an .exe instead of a .dat, Plz see above for what I'm putting in.
Your Program doesn't explain this or its usage at all. Where is this in the help file? I still have no idea how to use it. Not trying to complain just want to help you add value here, I feel like a play-by-play would be useful information to use. The help tab just saysThe "Edit Update File" tab can be used to create a .dat file to place on your webserver.
With no clues as to how to create it. In the SelectFile Box it just says Select new file name. Do I create a txt document and rename .dat (if so what syntax do i use). Do I browse to the .ahk or the .exe of my program? What does it want?To accomplish this an Update file needs to first be created/modified. This file can be
created/modified using the Edit Update File tab. Once the file has been
created/modified it can then be uploaded to a web server.