supplierdeeply

STICK and ASSIST - new tools to install CHDK and SDM

  • 25 Replies
  • 7138 Views
*

Offline zeno

  • *****
  • 884
STICK and ASSIST - new tools to install CHDK and SDM
« on: 02 / January / 2013, 14:56:55 »
Advertisements
My ACID app has proved a popular way to download a CHDK or SDM build and my SDMINst, WICKS and LICKS apps for installing a build. However the process is still tricky and many users find the installation choices confusing.

Accordingly I've combine all four apps into two much simpler croos-platform apps:
   ASSIST which installs SDM
and
   STICK which installs CHDK

Both apps run under OSX, Windows or Linux (Ubunto at least).

In both cases all the user has to do is drop a photo on the app window and press a button to advance through the install process.

Because ASSIST and STICK know what camera you're using, they make the right decisions about whether a FAT16 partition is needed, and they both check the card to see if it needs formatting or made bootable.

I've done a fair bit of testing, but would welcome feedback.

Dave
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #1 on: 02 / January / 2013, 18:27:25 »
Kubuntu 12.04.1, KDE 4.8.5, Linux 3.2.0-35-generic, 64 bit.

I've got this:

Code: [Select]
[email protected]:/media/green/Programy/stick/stick$ sudo java -jar stick.jar
[sudo] password for pawel:
Exception in thread "main" java.lang.UnsupportedOperationException: Desktop API is not supported on the current platform
        at java.awt.Desktop.getDesktop(Unknown Source)
        at Stick.<init>(Stick.java:534)
        at Stick.main(Stick.java:2603)

if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

*

Offline ahull

  • *****
  • 634
Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #2 on: 02 / January / 2013, 19:02:46 »
Well, it sorta works under Unbuntu 12.04, but I am not sure quite what this line in sticksx.sh is meant to do
(as it stands, it spits an error)

Quote
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

I suspect it is trying to figure out the dirname of $0

Perhaps this might be a good approach ..

Quote
#!/bin/bash
BIN_FOLDER=$(dirname $0)
sudo java -jar $BIN_FOLDER/stick.jar

This assumes you have copied both the bash script and the jar file to a location in your PATH.
« Last Edit: 02 / January / 2013, 19:04:20 by ahull »

*

Offline zeno

  • *****
  • 884
Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #3 on: 03 / January / 2013, 04:17:20 »
@outslider - I was worried that some Linux distro's might produce that error. The desktop API is used to launch the default browser when the Help button is pressed. It works fine on OSX and Windows but there are notes on the web about it not being available on some Linux versions. I'll trap the error and produce a diagnostic message - you'll have to invoke help by manually going to the STICK/ASSIST website.

@ahull - that stuff is meant to set the current dir to the one containing the script. I've had problems with it myself but thought it was now working. Will investigate.

Dave
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit


*

Offline zeno

  • *****
  • 884
Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #4 on: 03 / January / 2013, 04:47:07 »
I've just updated the stick.zip so the stickx.sh script should now work.
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #5 on: 03 / January / 2013, 08:21:12 »
Hi Dave.   Looks really nice.

A couple of questions before I update the wiki page ?

1) Does it know pre-2011 cameras from post_2010 cameras ?  And will it format a bootable FAT32 for newer cameras automatically

2) Can you add something to let the user which versions gets downloaded ?  Somepeople might prefer the DE version for example.

WW

Update : 
1) running under Win7 its will sometimes not accept a dragged .JPG file - the circle with a slash thing displays as you pull the mouse across the Stick window.   Sometimes it works, sometime not.  Strange.
2) once it does recognize an image, it downloads the correct zip file but does not recognize my SD card (windows explorer sees it as drive I: - Stick thinks there is a small read-only card in drive A.  The drive A card that Stick sees goes away when I eject the card).

« Last Edit: 03 / January / 2013, 08:37:46 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline zeno

  • *****
  • 884
Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #6 on: 03 / January / 2013, 12:57:05 »
Hi Waterwingz - some answers:

1. it does know about 2011 cameras - the first (oldest) one it treats that way is the A3300 - each Canon camera has a unique Model ID that's always been increasing - the A3300 id is 0x02980000. All later cameras are assumed to support FAT32 (which is true for all those ported to CHDK so far). For such cameras if the card is currently FAT32 then it gets made bootable FAT32 (if it's FAT16 then it gets made bootable FAT16). If it's an older camera and the card is bigger than 4GB, Stick will ask the user if it's OK to partition the card.

2. it does tell the user which build has been selected - normally it will be the stable CHDK build (since there's little delay these days in builds moving from trunk to stable or CHDK-DE to CHDK). I decided not to tell the user which other builds are available - I'm trying to keep the UI as simple as possible (they can always use ACID and then WICKS or LICKS or SDMInst if they want more flexibility). If you think it's important enough I could add a new option to the properties file that let people specify the search order).

3. don't have Win7 (or 8 or even Vista) but I know there are occasional problems with drag-n-drop. I could add a browse button but as I said above, I really want the UI to be simple.

4. I have had occasional problems with card recognition during testing, but nothing repeatable. Could you turn on debug (via debug=yes in the properties file) and see if the resulting sticklog.txt file contains any useful clues as to what's going wrong?

Dave
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #7 on: 03 / January / 2013, 14:51:54 »
1. it does know about 2011 cameras
Excellent !

Quote
(since there's little delay these days in builds moving from trunk to stable or CHDK-DE to CHDK).
Little delay in the introduction of new cameras but the feature sets are different and can take 18-24 months to migrate across

Quote
I decided not to tell the user which other builds are available - I'm trying to keep the UI as simple as possible (they can always use ACID and then WICKS or LICKS or SDMInst if they want more flexibility). If you think it's important enough I could add a new option to the properties file that let people specify the search order).
Makes sense for newbies but it will be hard to explain in the wiki about how to use other versions.  Being able to edit the properties file would be just fine as an "advanced" option.

Quote
3. don't have Win7 (or 8 or even Vista) but I know there are occasional problems with drag-n-drop. I could add a browse button but as I said above, I really want the UI to be simple.
My preference would be a browse button whether the d&d works or not.  But its not my software.

Quote
4. I have had occasional problems with card recognition during testing, but nothing repeatable. Could you turn on debug (via debug=yes in the properties file) and see if the resulting sticklog.txt file contains any useful clues as to what's going wrong?
Will do tonight.
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline ahull

  • *****
  • 634
Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #8 on: 03 / January / 2013, 16:50:43 »
I've just updated the stick.zip so the stickx.sh script should now work.

I just downloaded and I don't see any difference between this stickx.sh and the previous one.
BTW it is good practice to add the "shebang" line to the start of any script file in Unix/Linux, as this will force the script to be run by the correct interpreter. For example #!/bin/bash as the first line of a bash script or #!/bin/sh if you require it to be run by sh.

Without this *strange* things can happen (and often do) when you run a bash script with the default shell set to sh and vice versa. 

*

Offline zeno

  • *****
  • 884
Re: STICK and ASSIST - new tools to install CHDK and SDM
« Reply #9 on: 03 / January / 2013, 18:29:24 »
@ahull
I've added that  shebang line (for bash) at the start and the script definitely works on my Ubuntu (12.04.1) system. Zip file on the website updated accordingly.

@waterwingz
will look at adding the browse button and the build site preference
A570, S100, Ixus 127
Author of ASSIST, STICK, WASP, ACID, SDMInst, LICKS, WICKS, MacBoot, UBDB, CFGEdit

 

Related Topics