2003-02-02, Svenn Are Bjerkem: The Yakumo Alpha PDA from http://www.yakumo.com is powered by a StrongArm 206MHz processor and has 64MB SDRAM and 32MB flash NVRAM. It runs Pocket PC 2002 and is ready for Tcl/Tk. After having read RS's description on his iPaq I decided to give it a try.Prerequisites:
- Yakumo Alpha running Pocket PC 2002. (Factory default installation)
- Microsoft Active Sync. (On the CD or from Microsoft)
- Windows operating system. (On the host computer)
- USB cradle or cable. (Both included with the Alpha)
- WinZip on host computer for unpacking the distributions.
- Compact Flash card
- Multimedia card
- Installing when the host computer has a different operating system than Windows.
- Installing when the PDA has a different operating system than Pocket PC 2002.
- Installing using other sync program than Microsoft Active Sync.
- Installing using other interface than USB.
- tcltk-all-platforms: http://www.rainer-keuchel.de/wince/tcltk-all-platforms.tar.gz
- tcltk-wince-arm-hpc-wce300: http://www.rainer-keuchel.de/wince/tcltk-wince-arm-hpc-wce300.tar.gz
- celib.dll: http://www.rainer-keuchel.de/wince/celib-3.13-dll-bin-all-platforms.tar.gz
- wince-desktop-tools: http://www.rainer-keuchel.de/wince/wince-desktop-tools.tar.gz
c:\temp\desktop-dist c:\temp\tcltk-all-platforms c:\temp\tcltk-wince-arm-hpc-wce300 c:\temp\wince-arm-hpc-wce300plus more (for Yakumo Alpha) uninteresting wince* directories that got unpacked from celib-3.12-dll-bin-all-platforms.tar.gzWe now take a close look at the script data near the end of Windows/CE called wince_tcltk.bat:
::- Basic System Configuration REM Make changes here for your system set basepath=\Storage Card\Program Files set wish=%basepath%\Tcl\bin\wish84d.exe set tclsh=%basepath%\Tcl\bin\tclsh84d.exe set libdir=%basepath%\Tcl\lib set bindir=%basepath%\Tcl\bin set tcllibdir=%libdir%\tcl8.4 set tklibdir=%libdir%\tk8.4 ::- TclTk file associations cereg -k "HKCR\.tk" -n "" -v "tclfile" cereg -k "HKCR\.tcl" -n "" -v "tclfile" cereg -k "HKCR\tclfile" -n "" -v "TclTk Script" cereg -k "HKCR\tclfile\DefaultIcon" -n "" -v "%wish%,0" cereg -k "HKCR\tclfile\Shell\Open\Command" -n "" -v """"%wish%""" ""%%1""" ::- Tcl file associations cereg -k "HKCR\.tsh" -n "" -v "tshfile" cereg -k "HKCR\tshfile" -n "" -v "Tcl Script" cereg -k "HKCR\tshfile\DefaultIcon" -n "" -v "%tclsh%,0" cereg -k "HKCR\tshfile\Shell\Open\Command" -n "" -v """"% tclsh%""" ""%%1""" ::- Environment Info cereg -k "HKLM\Environment" -n "TCL_LIBRARY" -v "%tcllibdir%" cereg -k "HKLM\Environment" -n "TK_LIBRARY" -v "%tklibdir%" REM Height of 10 is ok, 14 does almost full screen cereg -k "HKLM\Environment" -n "ROWS" -v "14" REM MAX Width for PPC is 29 Chars cereg -k "HKLM\Environment" -n "COLS" -v "29" REM Home cereg -k "HKLM\Environment" -n "HOME" -v "\\" REM Temp cereg -k "HKLM\Environment" -n "TEMP" -v "\Temp" cereg -k "HKLM\Environment" -n "TMP" -v "\Temp" cereg -k "HKLM\Environment" -n "TMPDIR" -v "\Temp" cereg -k "HKLM\Environment" -n "TEMPDIR" -v "\Temp" REM Path cereg -k "HKLM\Environment" -n "PATH" -v "%bindir%;" REM Username cereg -k "HKLM\Environment" -n "USER" -v "nobody" REM Debugging trace level (0 to 255) cereg -k "HKLM\Environment" -n "XCE_TRACE" -v "0" REM Debugging trace file output cereg -k "HKLM\Environment" -n "XCE_TRACE_FILE" -v "\xce_trace.txt"Here the author has chosen to install Tcl/Tk to
\Storage Card\Program Files\Tclwhich is on the PDA external storage card.Now is the time to decide on where tcltk will have its home in the Yakumo PDA. As MPJ has yet to suggest a directory structure I chose to use
\tcltkLater i discovered that I think I will suggest to use
\Tclinstead, simply because you can then reuse the wince_tcltk.bat file with simple editing.I chose to reuse the wince-reg2.bat file from the distribution, which I will explain in a moment. I will continue to use \tcltk for the rest of this tutorial.Now I create a directory as the base directory. Feel free to name it otherwise.
c:\temp\tcltkon the host pc and copy the _contents_ of the directories (not the directories themselves) of
c:\temp\tcltk-all-platforms c:\temp\tcltk-wince-arm-hpc-wce300to
c:\temp\tcltkAs suggested by Richard Suchenwirth, I also choose to copy
c:\temp\wince-arm-hpc-wce300\celib.dllto
c:\temp\tcltk\binIf I ever decide to remove tcl/tk from the PDA, I can remove the directory \tcltk and off it goes.To upload Tcl/Tk to the PDA, press the Browse button in the Active Sync to open a file browser on the PDA.Now drag the
c:\temp\tcltkdirectory and drop it into this window. If the Active Sync is connected it should now start copying the files down to the PDA. The copy process may take some minutes. Wait for it to finish.We will now set the minimum required environment variables on the PDA.On the host computer edit the file
c:\temp\tcltk\wince-reg2.batand replace the word "unix" with the word "tcltk" in the two first "set" lines.New wince-reg2.bat file:
@echo off set wish=\tcltk\bin\wish84d.exe set libdir=/tcltk/usr/lib cereg -k "HKLM\Environment" -n "TCL_LIBRARY" -v "%libdir%\tcl" cereg -k "HKLM\Environment" -n "TK_LIBRARY" -v "%libdir%\tk" cereg -k "HKCR\.tcl" -n "" -v "tclfile" cereg -k "HKCR\tclfile" -n "" -v "TclTk Script" cereg -k "HKCR\tclfile\DefaultIcon" -n "" -v "%wish%,0" cereg -k "HKCR\tclfile\Shell\open\command" -n "" -v ""%wish%" "%%1""On the host computer, copy the program
c:\temp\wince-desktop-tools\cereg.exeto
c:\temp\tcltkNow double click the wince-reg2.bat file on the host pc. You will get a black dos window showing up. Be patient, when the window is gone, configuration is finished.The setting of the environment variables on the PDA is done from the host pc, not on the PDA. Pocket PC 2002 does not recognize bat files, and cereg.exe is compiled for Intel architecture.If you have reach this far, then you can use the file browser on the PDA and enter \tcltk\samples and there should be a nice little icon in front of the tcl files here. If you tap one of them, say life.tcl, a small application show up which really load the StrongArm CPU. Tap the little X in the top right corner of the application window to close.Some more of the recommended settings on the iPaq page must be done before I am really happy with my Yakumo Alpha Tcl/Tk design environment.
Nice work!