Simple Tool for Installing CHDK (STICK)
for Windows, OSX and Linux (Ubuntu)
STICK is a Java application designed to make the process of installing CHDK on your Canon camera as simple as possible. It does for CHDK what my ASSIST app does for SDM. If you don't have Java installed, here is the official download site (for Mac OSX, Windows and Linux).
All you have to do is drop a photo taken by your camera on the STICK window and it will:
- download the appropriate build,
- prepare an SD card (partition, formatting and making bootable as necessary),
- and copy the appropriate files to the card.
It runs under Windows (from XP to WIndows 8), Mac OSX (from 10.3 onwards) and Linux (Ubuntu 11.x and 12.x at least).
To make things as easy as possible all you have to do is press a button to make STICK continue to the next step and on-line help
is just a button-click away.
Here's a picture of STICK just after a photo has been dropped.
Downloading and Installing STICK
Download the STICK zip file and unzip it. You'll get a folder called 'stick' which you can relocate anywhere you fancy. Inside the folder are the following files:
- 'stick.jar' - the java executable
- 'stick.bat' - a bat file for Windows XP and Vista
- 'stickx.cmd', 'elevate.cmd' and elevate.vbs' - command files and script for Windows 7 and 8 (see below)
- 'stick.command' - a shell script for OSX
- 'stickx.sh' - a shell script for Linux (see below)
- 'asseng32.dll' and 'asseng64.dll' - dynamic link libraries containing java native methods for Windows (32-bit and 64-bit versions).
Double-click the appropriate script file (bat, cmd, command or sh file), depending on your Operating System. For OSX or Windows XP, double-clicking the jar file should work.
STICK will look for a valid build in 4 places in turn, downloading the first one it finds:
- the 'stable' CHDK site
- the 'trunk' CHDK site
- the 'stabiles' CHDK-DE site
- the 'experimentelle' CHDK-DE site
The default search order is '1234' but you can make STICK search these sites in a different order by adding a line to the stick.properties file (see "Extra Features" below).
STICK copies all the necessary files to the card - DISKBOOT.BIN, PS.FIR and the contents of the CHDK folder. After running STICK the downloaded files are in a sub-folder of the stick folder whose name is the model name and build of the camera (e.g. "a570-101a).
Note for Mountain Lion (10.8) Users
Mountain Lion requires root access to make changes to cards. As a result, STICK will fail with a "permission refused" message unless it has root access. To run STICK under Mountain Lion, use the stickML.command script. Double-clicking the script will bring up a terminal window and sudo will ask you to type your logon password so STICK can get root access. STICK will run when you press return.
Note for Windows 7 and 8 Users
Under the covers STICK issues commands and makes API calls that require administrator privileges under Windows 7 and 8. If you run STICK when logged on as a general user, without admin permission, STICK will diagnose the problem and display the message:
STICK needs Administrator permission - start it by double-clicking STICKX.CMD
On a 64-bit system, even if you are logged on as an Admin, you will have to start STICK using STICKX.CMD, otherwise STICK will fail to find your card.
If you see this message, or are running a 64-bit Windows system, terminate STICK and double-click the STICKX.CMD file. This will display a dialog allowing you to temporarily 'elevate' yourself to Admin level by selecting a user account with these privileges. STICK will then run properly.
Unfortunately this temporary elevation breaks drag-and-drop (it's a known Windows problem) so you will have to use the Browse button to locate a photo.
Note for Linux Users
STICK needs sudo permission for some of the commands it issues. Currently that means you need to run it from a terminal window, setting the current directory to the folder containing the jar file and typing:
sudo java -jar stick.jar or ./stickx.sh
When you run it it will ask you to type in your admin (logon) password and then run STICK
Pressing the 'Help' button when STICK is running will display one of the following pages in your default browser:
- the 'startup' page - showing STICK when it's just been started
- the 'download' page - showing STICK when a photo has been dropped on the window and suitable CHDK build is available
- the 'build not found' page - what to do if there's no build for your camera
- the 'downloading' page - while a build is being downloaded
- the 'build downloaded' page - after a build has been successfully downloaded
- the 'download failed' page - what to do if downloading failed
- the 'scanning' page - while STICK is scanning your computer for attached cards
- the 'scan completed' page - when STICK has finished scanning your computer for attached cards
- the 'back to scan' page - when you've asked STICK to return to the 'scan' step
- the 'prepare' page - showing what STICK will do to the card if you give permission
- the 'preparation' page - while STICK is preparing the card
- the 'prepared' page - when STICK has prepared the card
- the 'ejected' page - when STICK has ejected the card that is now ready for use
STICK has some extra features that can be enabled by changing its properties file, "stick.properties", (which you will find in the same folder as the app once you've run it). These features are:
- the ability to specify the maximum size card the app will handle via the 'maxsize'
property. By default the properties file contains the line:
which sets the limit at 64000MB or 64GB. Changing it to 32000 would make the limit 32GB.
- the ability to specify the maximum size card on which to allow one partition via the 'max1size'
property. By default the properties file contains the line:
which sets the limit at 4GB cards. Changing it to 2000 would make the upper limit 2GB, so that 4GB cards would have to be formatted as two partitions.
- the ability to specify the size of the small partition when two partitions are to be created.
By default the properties file contains the line:
which sets the size to 16 MB (plenty large enough to hold DISKBOOT.BIN). Changing it to "1G" would make the small partition 1GB in size.
- the font name, size and boldness used for text.
By default the properties file contains the lines:
fontname=SansSerif fontsize=12 fontbold=NO
but fontname can be set to "Serif", "Monospaced", or the name of any of the installed fonts, such as "Century Schoolbook". You can see the names of fonts by selecting the Font menu option in a Text Editor.
- the ability to switch on debug mode, which causes STICK to write a lot more information
to the log by adding the line:
Note that the log is written to a file ('sticklog.txt') when STICK terminates.
- the ability to search the download sites in a different order by adding the line
where 'nnnn' consists of one or more of the digits '1', '2', '3' and '4'. The default order is '1234' but '24' would make STICK search just for 'trunk/experimental' builds (CHDK first, then CHDK-DE) while '31' would restrict the search to the 'stable' builds (CHDK-DE first, then CHDK).
- The properties file also remembers the size and position of the window ('height=...', 'width=...', 'xpos=...' and 'ypos=...').
- 1.04A - fix search bug when looking for DE builds
- 1.04 - improve diagnostics when launching on 64-bit Win7/8 machines
- 1.03 - fix Linux mount bug when partitioning large cards
- 1.02 - added a Browse button and option to search CHDK-DE sites before CHDK sites
- 1.01 - January 2013 - added Linux (Ubuntu) support
- 1.00 - December 2012 - initial release (Windows and OSX only)
There's a companion app, ASSIST, which will install SDM in just the same way.
Comments, suggestions and bug reports welcome. Dave@zenoshrdlu.com.
For other SDM and CHDK-related stuff of mine, see here