]> gitweb.factorcode.org Git - factor.git/commitdiff
Officially support running the X11 UI on Mac OS X
authorslava <slava@factorcode.org>
Sat, 14 Oct 2006 04:48:59 +0000 (04:48 +0000)
committerslava <slava@factorcode.org>
Sat, 14 Oct 2006 04:48:59 +0000 (04:48 +0000)
Makefile
README.txt
vm/Config.macosx
vm/Config.unix

index ddf59c29c55117898f8478624f8d85e529cf392f..3d81527fc50c857a0f51c8c552c2c9f8b63ac8d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -15,12 +15,6 @@ else
        STRIP = strip
 endif
 
-ifdef NO_UI
-       X11_UI_LIBS =
-else
-       X11_UI_LIBS = -lfreetype -lGL -lGLU -L/usr/X11R6/lib -lX11
-endif
-
 ifdef CONFIG
        include $(CONFIG)
 endif
@@ -56,6 +50,10 @@ default:
        @echo ""
        @echo "On Unix, pass NO_UI=1 if you don't want to link with the"
        @echo "X11 and OpenGL libraries."
+       @echo ""
+       @echo "On Mac OS X, pass X11=1 if you want to link with the"
+       @echo "X11 library instead of Cocoa. You will also need to bootstrap"
+       @echo "Factor with the -no-cocoa -x11 switches."
        @echo
        @echo "Also, you might want to set the SITE_CFLAGS environment"
        @echo "variable to enable some CPU-specific optimizations; this"
index 3d7042bcacbb17f65bdde49c4778a8045d3b564d..65469f87dc7fa7d732699f8871b446b1c43d168a 100644 (file)
@@ -10,7 +10,8 @@ implementation. It is not an introduction to the language itself.
 - Compiling Factor
 - Building Factor
 - Running Factor on Unix with X11
-- Running Factor on Mac OS X
+- Running Factor on Mac OS X - Cocoa UI
+- Running Factor on Mac OS X - X11 UI
 - Running Factor on Windows
 - Source organization
 - Community
@@ -119,10 +120,11 @@ the following two commands:
   
 The latter keeps the terminal listener running.
 
-* Running Factor on Mac OS X
+* Running Factor on Mac OS X - Cocoa UI
 
-On Mac OS X, a Cocoa UI is available in addition to the terminal
-listener.
+On Mac OS X 10.4 and later, a Cocoa UI is available in addition to the
+terminal listener. If you are using Mac OS X 10.3, you can only run the
+X11 UI, as documented in the next section.
 
 The 'f' executable runs the terminal listener:
 
@@ -139,6 +141,22 @@ this point), and the library source into a self-contained Factor.app.
 Factor.app runs the UI when double-clicked and can be transported
 between PowerPC Macs.
 
+* Running Factor on Mac OS X - X11 UI
+
+The X11 UI is available on Mac OS X, however its use is not recommended
+since it does not integrate with the host OS. However, if you are
+running Mac OS X 10.3, it is your only choice.
+
+When compiling Factor, pass the X11=1 parameter:
+
+  make macosx-ppc X11=1
+
+Then bootstrap with the following pair of switches:
+
+  ./f boot.image.ppc -no-cocoa -x11
+
+Now if $DISPLAY is set, running ./f will start the UI.
+
 * Running Factor on Windows
 
 If you did not download the binary package, you can bootstrap Factor in
index 8e35a3a06a318bf526f3cfb5bf9df6546dc9facb..aa65af4ecfd2c226901b4ecd2e8b5069be428994 100644 (file)
@@ -1,3 +1,8 @@
 include vm/Config.unix
 PLAF_OBJS += vm/os-macosx.o vm/mach_signal.o
-LIBS= -lm -framework Cocoa -framework OpenGL -framework AppKit -L/usr/X11R6/lib -lfreetype
+
+ifdef X11
+       LIBS = -lm -framework Foundation $(X11_UI_LIBS)
+else
+       LIBS = -lm -framework Cocoa -framework OpenGL -framework AppKit -L/usr/X11R6/lib -lfreetype
+endif
index 821ea8394f1e7362b2c61e1491d5a49c2c9b2636..0fca1bf1da75f2f78480435ce9e0991361c8109e 100644 (file)
@@ -1 +1,7 @@
 PLAF_OBJS = vm/os-unix.o
+
+ifdef NO_UI
+       X11_UI_LIBS =
+else
+       X11_UI_LIBS = -lfreetype -lGL -lGLU -L/usr/X11R6/lib -lX11
+endif