Simple Tool for Installing CHDK (STICK)
for Windows, OSX and Linux (Ubuntu)
All my apps are freeware, but if you've found them useful and would like to thank the author, you can make a donation (for example £1, €1 or $1) to show your appreciation for the many hours spent working on them!
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.6 onwards) and Linux (Ubuntu 11.x and 12.x at least).
A few cameras, currently:
- Powershot N Facebook Edition
- Ixus 135 (Elph 120)
require special treatment. See this page for more details.
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 (up to Lion)
- 'stickML.command' - a shell script for OSX Mountain Lion and Mavericks (see below)
- '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:
- the 'stable' CHDK (1.2) site
- the 'trunk' CHDK (1.3) site
- the 'stabiles' CHDK-DE (1.2) site
- the 'experimentelle' CHDK-DE (1.3) site
Which of these STICK searches first depends on which build preference choice you select on the start-up screen. For most people, the 'stable' CHDK is the right choice (it's also the default when STICK is first installed), but you may want to install the 1.3 'development' version in order to use some new feature it contains.
- once you have dropped a photo (and hence STICK has started searching) the choice boxes are disabled (greyed out). You can re-enable them by clicking the 'Restart' button which takes you back to the start-up screen.
- STICK remembers your preferred choice in the 'order' property (see "Extra Features" below) and will use it the next time it is run.
STICK will also detect if a build has been previously downloaded and if so, let you skip the download step. This can be useful if you want to prepare another card for your camera, but of course skipping the download step may mean you don't get the latest CHDK build.
Installing 'unofficial builds'
Starting with version 1.08 (December 2013) STICK will now install a downloaded unofficial build. See here for more details.
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) and Mavericks (10.9) Users
Mountain Lion and Mavericks require 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 or Mavericks, 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 Users
For cards larger than 4GB in pre-2011 cameras, STICK will create two partitions - a small FAT16 one containing DISKBOOT.BIN and a large FAT32 one for photos. Note that Windows will only let you see one partition at a time - use my WASP utility to switch between them.
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 and on some 32-bit systems, even if you are logged on as an Admin, you will have to start STICK using STICKX.CMD, otherwise STICK will not be able to analyse your card. It should display a message like this:
STICK needs permission to analyse diskand the log will contain a message like this:
Failure checking device '\\.\PHYSICALDRIVE2' - error 5If 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 'already downloaded' page - showing STICK when a photo has been dropped on the window and suitable CHDK build has been previously downloaded
- 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). STICK uses this property to remember the choice of preferred build you made on the startup screen.
- The properties file also remembers the size and position of the window ('height=...', 'width=...', 'xpos=...' and 'ypos=...').
- 1.10 - August 2014 - handle Powershot N Facebook camera
- 1.09 - January 2014 - allow selection of preferred build and improve diagnosis of Windows problems
- 1.08 - December 2013 - installed downloaded 'unofficial builds'
- 1.07 - September 2013 - ensure FAT16 cards for new cameras are made FAT16 bootable
- 1.06 - August 2013 - avoid failure if a music CD is in a CD-ROM drive
- 1.05 - August 2013 - updated to access the relocated CHDK-DE builds. Rather than download the new version, you can fix the problem just by editing the
stick.properties file with a text editor to add the lines:
chdepages = release_full.txt chdepaget = trunk_full.txt
- 1.05 - test if build already downloaded and offer to use it
- 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