I got CHDK-Shell to work with Vista

  • 11 Replies
  • 2288 Views
  • Publish
    I got CHDK-Shell to work with Vista
    « on: 12 / August / 2009, 11:26:51 »
    Advertisements
    I finally got CHDK Shell to work with vista.  It's been 10 years since I last worked in a unix-like environment, and wow did it ever take a while to figure out what was going wrong.

    Anyway, here's what seems to work:
    1) If you've already been trying to get CHDK-Shell to work in Vista, you'll want to pull down a fresh trunk.  make clean won't get rid of the detritus in your platform/sub folder if you've previously tried to make CHDK-Shell work with vista.  I ended up nuking all of trunk788 and syncing fresh.

    2) Install a recent MSys.  I used Msys 1.0.11, which I think is currently the latest version.  (before installing MSys, I had previously installed MinGW 5.1.4.  I do not know if this is a requirement for successful installation of MSys.  sorry)

    3) Copy the contents of the Msys bin folder (for me this was C:\msys\1.0\bin) into CHDK\gcc4\bin.  This will overwrite about 60 files, including the ancient version of sh.exe that doesn't like Vista.  I don't know why, but simply replacing sh.exe by itself seemed to cause problems so, as I said,  I'd recommend copying the whole folder.

    4) At line 256 of CHDK\trunk\trunk788\makefile.inc, change this:
    Code: [Select]
        SORT := $(dir $(shell which uniq.exe | sed s/\\\\/\\\//g))/sort.exe
    to this:
    Code: [Select]
        OLDSEPARATOR = \\\\
        NEWSEPARATOR = /
        SORT  := $(dir $(shell which uniq.exe | sed 's_$(OLDSEPARATOR)_$(NEWSEPARATOR)_g'))/sort.exe   


    For some reason (new shell?  other?) the parsing for the parameter to sed gets totally messed up.  It seems to dislike the number of slashes.  The recommendation I found in a couple places online is that if you put your sed s expressions in single quotes, that will protect them from the worst of the shell's tendencies to parse slashes.  The proposed replacement seems solid, but I'm very open to guidance from someone who actually knows about gnu/make/linux.  A lot of this was trial & error



    5) also, to get CHDK-Shell to run in Vista you will  of course have to add WIN_VISTA to the list of acceptable platforms in CHDK-Shell-v219.au3.


    After this, you should be able to use CHDK-shell in Vista.  I tried it and, when compiling a720-100c, my resulting file was identical to the file produced on a machine an unmodified version of CHDK-shell on XP.  (binary compare revealed three differences - all of them recording the date and time when the file was built).


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

    I have verified that these changes do not interfere with CHDK-Shell on XP.

    I don't know if there's a possibility that these changes will make it into the official CHDK-Shell release.  Maybe Whim can comment on that?

    If you try this and have problems, let me know and I'll try to help out.

  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #1 on: 12 / August / 2009, 11:36:49 »
    If this works for me I'll post a reply again but I firstly wanted to say THANK YOU.  Thank you thank you.

    I can go back to Vista instead of Mac and xp virtual machine
    Canon Models - SD300, SD780, & SX210

  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #2 on: 14 / August / 2009, 01:14:23 »
    Works very nicely.  The awk setup for the build needs fixing but as I do that I'll post a method for that.
    Canon Models - SD300, SD780, & SX210

    *

    Offline whim

    • ******
    • 2013
    • A495/590/620/630 ixus70/115/220/230/300/870 S95
  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #3 on: 14 / August / 2009, 07:13:14 »
    @nmcconell

    CHDK-Shell-v221 should take care of points 4 & 5

    (note: it's on page 2 of the drop, scroll down and click see more files ...)

    i also allowed WIN_2008 in case anyone wants to/can try that.

    haven't tried any GCC stuff yet, no Vista around to try (still on holiday)

    cheers,

    wim

    PS ... and of course any help to get it running on more OS's is welcome, thanks !
    « Last Edit: 14 / August / 2009, 07:17:33 by whim »


    *

    Offline zfeet

    • **
    • 67
  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #4 on: 14 / August / 2009, 15:37:37 »
    Quote
    4) At line 256 of CHDK\trunk\trunk788\makefile.inc, change this:
    Code: [Select]
        SORT := $(dir $(shell which uniq.exe | sed s/\\\\/\\\//g))/sort.exe
    to this:
    Code: [Select]
        OLDSEPARATOR = \\\\
        NEWSEPARATOR = /
        SORT  := $(dir $(shell which uniq.exe | sed 's_$(OLDSEPARATOR)_$(NEWSEPARATOR)_g'))/sort.exe   


    I fixed it by replacing the whole line with:

    Code: [Select]
    SORT := sort.exe

    *

    Offline reyalp

    • ******
    • 9961
  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #5 on: 14 / August / 2009, 20:56:03 »
    I fixed it by replacing the whole line with:

    Code: [Select]
    SORT := sort.exe
    If that works for you great, but you don't want to end up picking up windows/dos sort.exe instead of the gnu one.
    Don't forget what the H stands for.

  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #6 on: 14 / August / 2009, 21:13:00 »
    @zfeet

    I'm pretty sure the thing where it's messing around with the path to uniq.exe is to try to ensure that you're picking up and linux flavored sort.exe, and not the one that lives at C:\Windows\System32\sort.exe

    It's possible that just using sort.exe without a path will work, but I was assuming that referrencing uniq.exe's path was meant to solve some specific problem.  I will admit though that I have no idea what problem that would have been.

    It is entirely possible that this is something that's more important when you're not using CHDK-shell.  CHDK-Shell sets up your search path so that gcc4/bin will always be the first thing that you hit.  So, for you, sort.exe is very likely referring to the correct executable. 



    @reyalp
    I was writing my post when you posted yours.  But yes, I agree.


    *

    Offline whim

    • ******
    • 2013
    • A495/590/620/630 ixus70/115/220/230/300/870 S95
  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #7 on: 16 / August / 2009, 04:43:11 »
    @nmcconnell

    Quote
    I have verified that these changes do not interfere with CHDK-Shell on XP.

    I don't know if there's a possibility that these changes will make it into the official CHDK-Shell release.  Maybe Whim can comment on that?

    i can confirm that this appears to work under XP ! Note that i needed to install MingW 5.1.4 with option 'Candidate' to get the latest versions, then MSYS 1.0.11. Looks like installing MinGW is an essential step, as MSYS seems to use a part of it's files to populate it's own /bin ...

    i'll continue testing, and hope to release a new 'full' version with devkits soon.

    thanks again,

    wim


    *

    Offline whim

    • ******
    • 2013
    • A495/590/620/630 ixus70/115/220/230/300/870 S95
  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #8 on: 16 / August / 2009, 06:38:59 »
    @all

    i just released a new FULL version of CHDK-Shell (2.22) which should run on
    WIN_2000, WIN_XP, WIN_2003, WIN_VISTA  & WIN_2008

    both GCCs 3.4.6 & 4.3.3 are included and compile fine on XP SP2 for me

    get it at the usual place: http://chdk.setepontos.com/index.php/topic,845.0.html

    cheers,

    wim


    *

    Offline whim

    • ******
    • 2013
    • A495/590/620/630 ixus70/115/220/230/300/870 S95
  • Publish
    Re: I got CHDK-Shell to work with Vista
    « Reply #9 on: 23 / August / 2009, 18:12:59 »
    @nmcconnell

    just a little update: did some more selective copying, CHDK-Shell 2.25 now uses an updated
    Win32 GCC, version 3.4.5.

    thanks to Darkness (WIN_7 testing) i'm now reasonably convinced that it runs on all Windows from
    2000 up, although it has not been tested on Win 2008 yet ...

    i've also finally succeeded in baking an ARM GCC 4.4.0, first tests show a reduction of ~ 4.7 kB
    in executable size (tested OK with 794 on ixus70_sd1000-101b & ixus870_sd880-101a)
    You can DL it here: http://drop.io/gcc_for_chdkshell as a selfextracting 7zip: gcc440forCHDK-sfx.exe
    (it will create a folder 'gcc440', which can replace or coexist with your current 'gcc4' folder)

    cheers,

    wim

     

    Related Topics