`Pf9' is a port of some libraries and programs from `Plan9 from User Space' (http://www.swtch.com/plan9port/) to Windows using the MinGW compiler. A lot of files are used without modification, some need only slight adaptions. The actual porting has been done in lib9/mingw and libthread/mingw.c, with help of ideas from inferno and 9pm. See LICENSE file for which licenses apply to the source files. For a list of ported programs see DIRS and TARG definitions in src/cmd/mkfile. For a list of ported libraries see src/lib*. Status of some libraries: libthread: works mostly, daemonizing works not libdraw: works basically, tested with tcolors, acme and sam. Events have not been ported, so only programs using the thread-based mouse interface will run. Status of the support of various concepts: Pipes Implemented using Named Pipes. Unix Sockets Implemented using Named Pipes. You can use the same addresses as in plan9port, e.g. unix!/tmp/acme. Internet Sockets Implemented using Winsock. Unicode All programs get UTF-8 encoded streams on stdin, UTF-8 encoded environment and command line arguments. Console support Reading from the console input and writing to the console screen buffer is supported transparently. A "cat > file" from the Windows console will produce UTF-8 characters, regardless of which codepage is installed. You can also use the history feature of the console window without extra support in programs. Because the mkfile system's structure has been derived from Plan9, you can compile the libs and sources for Linux and MinGW in a similar way: On Linux, to compile for the MinGW, run cd src objtype=mingw mk Copy identical files from Plan9port --------------------------- A lot of files are used from plan9port without change. They are not distributed along with pf9. You should have a plan9port distribution installed, and the PLAN9 variable set. You can run mk pop - to populate the source directory with identical source files from p9p mk rm ... remove identical source files; this undos the effect of `mk pop' mk tkdiff ... to get a list of tkdiff commands you can click at in rc to explore the differences between p9p and pf9 mk eqdiff ... like `mk tkdiff', but this time a list showing on which files an ed script has been run. Some files will be modified slightly after copying from plan9port. This is done using one ed script per file. How to build for mingw ------------------- Download Plan9Port plan9port-20140306.tgz, sam-editor. If not have mingw32, download and install i686-w64-mingw32. Example for GNU/Linux Ubuntu: 'sudo apt-get mingw-w64' Mingw32 need for compile the sam-editor and other warez for Windows OS. # cd ~/ # wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/plan9port/plan9port-20140306.tgz # tar -zxvf plan9port-20140306.tgz # sudo mv plan9port /usr/local/plan9 *if need # chmod -R u+x /usr/local/plan9 # cd /usr/local/plan9 # ./INSTALL # cd ~/ # hg clone https://bitbucket.org/jubei85/sam-editor/ # sudo mv sam-editor /usr/local/pf9 *if need # chmod -R u+x /usr/local/pf9 # cd /usr/local/pf9 # cputype=lin386 export cputype # objtype=mingw export objtype # PF9=/usr/local/pf9 export PF9 # PLAN9=/usr/local/plan9 export PLAN9 # PATH=/usr/local/pf9/lin386/bin:$PATH export PATH # PATH=/usr/local/pf9/linux/bin:$PATH export PATH # PATH=$PATH:$PLAN9/bin export PATH *if need configure file /$PF9/mingw/configure # ./misc/enterpf9 # mk pop # cd src # mk # mk install All binary files for windos there /$PF9/mingw/bin, enjoy! Run it ----- FIXME This should be enough to get it work. Now you might generate the lookman index from a shell prompt, which is a good test of some of the functionality: $ rc % cd $PF9/sys/man % ./mkindex Debugging -------- Define FDTDEBUG=2 to get debug output from the file descriptor layer.