
1: A note on Windows/MinGW support 2: 3: Now you can compile Gauche to use MinGW runtime library 4: (see http://www.mingw.org/ ), so that the produced binary can 5: be easily distributed. Although many system-related functions 6: don't work because MinGW is not quite POSIX, it may be useful 7: for Windows users to try out Gauche without installing the pile 8: of other libraries. 9: 10: The quality is experimental. Tests fail miserably. We'll 11: gradually add support layer to emulate the features MinGW lacks. 12: 13: 14: [Compilation] 15: 16: Although you can run pre-compiled Gauche/mingw stand-alone, 17: you need cygwin enviroment to compile it. (I haven't tried 18: MSYS. It may work, too). 19: 20: First, set PATH so that MinGW's gcc comes before Cygwin gcc. 21: For example, if you installed MinGW environment under C:/mingw, say: 22: 23: $ PATH=/cygdrive/c/mingw/bin:${PATH} 24: 25: Now you can run configure with --build option to tell you'll 26: configure for mingw. It is better to set the encoding utf8, 27: to deal with multibyte file names. 28: 29: $ ./configure --build=i386-pc-mingw32 \ 30: --enable-multibyte=utf8 \ 31: --prefix=/path/to/install 32: 33: (You can use 'i586' or 'i686', depending on which processor 34: you have). 35: 36: Then you can make it. (Make sure you start from a clean source 37: tree; if you have remaining stuff from cygwin build, for example, 38: you'll fail. Good way to make sure of it is to run 'make distclean' 39: before configure.) 40: 41: You need a bit of trick for installation, though. Give the 42: Cygwin version of gosh as GOSH parameter. You also have to run 43: install-mingw target. 44: 45: $ make 46: $ make GOSH=/path/to/cygwin/gosh install 47: $ (cd src; make GOSH=/path/to/cygwin/gosh install-mingw) 48: 49: If you want to specify the installation directory by --prefix, 50: you should give it a Cygwin pathname. Unlike the normal Gauche, 51: however, the installation path won't be embedded in the Gauche 52: library; gosh and gauche-config will know its installed 53: location at runtime. So you can move the installed Gauche tree 54: afterwards. 55: 56: In the src/ directory, there's a shell script mingw-dist.sh 57: which configures, builds and creates a zip archive of MinGW 58: distribution. 59: 60: 61: [Building extensions] 62: 63: We checked at least Gauche-gl works with MinGW version of gosh. 64: Again, you need Cygwin environment to build the extension 65: (you have to run ./configure after all). 66: However, you no longer need Cygwin version of gosh; actually, 67: you have to set a path so that the ./configure script finds 68: MinGW version of gosh, gauche-config and other gauche-* tools. 69: 70: Just ./configure, make, and make install should work. 71: 72: 73: 74: