[Xotcl] NX on windows

Jonathan Kelly jonkelly at fastmail.fm
Sun Jul 29 01:38:21 CEST 2012


Stephan and others,

thanks for the input. I actually spent some hours yesterday having 
another go on my laptop at home (which is Windows 7).

Before I got started I thought I should make my cygwin was up to date, 
and as I was having a look at the setup, I noticed a set of packages 
mingw-cc-* in development. After a little googling these looked like new 
packages... so always one to do things the difficult way, I thought I'd 
give it a go, seeing as I'm already using cygwin.

So I installed the mingw-gcc-{core,binutils,g++,pthreads,runtime} 
packages in cygwin. (I don't know that I needed all those packages, I 
just took a guess).

I downloaded TCL and TK source which was the new 8.5.12 release.

Setup my destination directory
mkdir /cygdrive/c/Tcl
mkdir /Tcl
mount c:/Tcl /Tcl

I ran configure:

./configure --build=i686-pc-mingw32 --host=i686-pc-mingw --prefix=/Tcl

make test  came out with

all.tcl:        Total   27048   Passed  26164   Skipped 870 Failed  14

and that seemed like a good result. From what I could see the failures 
were about linking (to be expected) and some stuff about character 
encoding and unicode.

So I compiled TK and ran the demo test. All good.

Now onto NX.

I got the source from git, and tried a configure ... and then my head 
started to hurt. Eventually I worked out this is the configure I needed

  ./configure --build=i686-pc-mingw32 --build=i686-pc-mingw32 
--host=i686-pc-mingw32 --prefix=/Tcl 
--with-tcl=/cygdrive/c/tcl8.5.12/win 
--with-tclinclude=/cygdrive/c/tcl8.5.12/generic

I did have to tweak the configure script and Makefile.in to get it all 
working though.

The issue is that configure wasn't working out that it needed to use 
cygpath when it was "checking for cygwin variant". It was looking for  
*-mwin32*|*-mno-cygwin* in TCL_EXTRA_CFLAGS but that is not used in this 
build. So this is what I came up with - My addition is the case 
${TCL_CC} bit ...

     case "`uname -s`" in
     *CYGWIN_*)
         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin 
variant" >&5
$as_echo_n "checking for cygwin variant... " >&6; }
         case ${TCL_EXTRA_CFLAGS} in
         *-mwin32*|*-mno-cygwin*)
             TEA_PLATFORM="windows"
             CFLAGS="$CFLAGS -mwin32"
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: win32" >&5
$as_echo "win32" >&6; }
             ;;
         *)
           case ${TCL_CC} in
             *mingw*)
             TEA_PLATFORM="windows"
             ac_cv_prog_CYGPATH="cygpath -w"
             CYGPATH=$ac_cv_prog_CYGPATH
             ;;
             *)
             TEA_PLATFORM="unix"
             ;;
           esac
             { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix" >&5
$as_echo "unix" >&6; }
             ;;
         esac
         EXEEXT=".exe"
         ;;
     *)
         ;;
     esac


Also, in the Makefile.in ... I changed the genstubs rule to use the 
CYGPATH ... as the build is using the new Windows executable to run the 
getStubs.tcl .. but the new build doesn't know about cygwin paths...

genstubs:
     $(TCLSH) `@CYGPATH@ $(TCL_SRC_DIR)/tools/genStubs.tcl` \
         `@CYGPATH@ $(src_generic_dir)` \
         `@CYGPATH@ $(src_generic_dir)/nsf.decls` \
         `@CYGPATH@ $(src_generic_dir)/nsfInt.decls`

so make ran through OK, and a make test *seemed* to work ... though i 
couldn't see any stats ... but nothing that looked like errors either.

I did a make install ... and fired up the new shell and  the Greeter 
test and it worked! Ta Dah!

Again, I'm happy to be the guinea pig if you want to get this working 
"officially".

Now, have to get onto learning nx.
next

Jonathan.


More information about the Xotcl mailing list