| | 1 | = Building Cocotron for use with CCL = |
| | 2 | |
| | 3 | First, install Xcode on a Macintosh. |
| | 4 | |
| | 5 | Next, install the Cocotron tools. Follow the directions found at |
| | 6 | http://www.cocotron.org/Tools/InstallCDT. |
| | 7 | |
| | 8 | With the tools installed, you are ready to build the Cocotron |
| | 9 | sources. You will need to install Mercurial. Check out the source code with |
| | 10 | {{{ |
| | 11 | hg clone http://cocotron.googlecode.com/hg/ cocotron |
| | 12 | }}} |
| | 13 | |
| | 14 | Next, apply the patch from $REPO/trunk/aux/cocotron/win32/cocotron/cocotron-r59942ee67d15.patch |
| | 15 | (This patch contains some changes to NSDocument.m and NSApplication.m.) |
| | 16 | Something like this will probably work: |
| | 17 | {{{ |
| | 18 | $ cd cocotron/AppKit |
| | 19 | $ patch -p2 </path/to/patch |
| | 20 | }}} |
| | 21 | |
| | 22 | Open cocotron/Cocoa/Cocoa.xcodeproj, and build it. |
| | 23 | |
| | 24 | Now, do the following: |
| | 25 | {{{ |
| | 26 | $ mkdir /tmp/cocotron |
| | 27 | $ cd /Developer/Cocotron/1.0/Windows/i386/Frameworks |
| | 28 | $ /Developer/Cocotron/1.0/bin/retargetBundle -F . -framework Foundation -framework AppKit -destination /tmp/cocotron |
| | 29 | }}} |
| | 30 | |
| | 31 | To build interfaces, you need an interface translator. The process is similar to that outlines in BuildFFIGEN, but you use the patches |
| | 32 | in http://svn.clozure.com/publicsvn/ffigen4/branches/ffigen-x-cocotron, and the gcc sources from the Cocotron tools. |
| | 33 | |
| | 34 | Now, assuming that on your Windows system you have a ccl:cocotron; directory, do the following steps: |
| | 35 | * tar up /tmp/cocotron and untar it into ccl:cocotron; on the Windows system |
| | 36 | * get the win32-headers directory from svn onto your Macintosh system, go into win32-headers/cocoa/C/ and run populate.sh. |
| | 37 | * tar up win32-headers/cocoa/C and move it over to the Windows system |
| | 38 | * on the Windows system, parse the ffi files in the usual way, i.e., (require 'parse-ffi) (dotimes (i 2) (parse-standard-ffi-files :cocoa)) |
| | 39 | |
| | 40 | If you're lucky, it might work. |