Officially support running the X11 UI on Mac OS X

slava 2006-10-14 04:48:59 +00:00
parent 7e44705a01
commit c55e88356e
4 changed files with 38 additions and 11 deletions

View File

@ -15,12 +15,6 @@ else
STRIP = strip STRIP = strip
endif endif
ifdef NO_UI
X11_UI_LIBS =
else
X11_UI_LIBS = -lfreetype -lGL -lGLU -L/usr/X11R6/lib -lX11
endif
ifdef CONFIG ifdef CONFIG
include $(CONFIG) include $(CONFIG)
endif endif
@ -56,6 +50,10 @@ default:
@echo "" @echo ""
@echo "On Unix, pass NO_UI=1 if you don't want to link with the" @echo "On Unix, pass NO_UI=1 if you don't want to link with the"
@echo "X11 and OpenGL libraries." @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
@echo "Also, you might want to set the SITE_CFLAGS environment" @echo "Also, you might want to set the SITE_CFLAGS environment"
@echo "variable to enable some CPU-specific optimizations; this" @echo "variable to enable some CPU-specific optimizations; this"

View File

@ -10,7 +10,8 @@ implementation. It is not an introduction to the language itself.
- Compiling Factor - Compiling Factor
- Building Factor - Building Factor
- Running Factor on Unix with X11 - 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 - Running Factor on Windows
- Source organization - Source organization
- Community - Community
@ -119,10 +120,11 @@ the following two commands:
The latter keeps the terminal listener running. 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 On Mac OS X 10.4 and later, a Cocoa UI is available in addition to the
listener. 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: 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 Factor.app runs the UI when double-clicked and can be transported
between PowerPC Macs. 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 * Running Factor on Windows
If you did not download the binary package, you can bootstrap Factor in If you did not download the binary package, you can bootstrap Factor in

View File

@ -1,3 +1,8 @@
include vm/Config.unix include vm/Config.unix
PLAF_OBJS += vm/os-macosx.o vm/mach_signal.o PLAF_OBJS += vm/os-macosx.o vm/mach_signal.o
ifdef X11
LIBS = -lm -framework Foundation $(X11_UI_LIBS)
else
LIBS = -lm -framework Cocoa -framework OpenGL -framework AppKit -L/usr/X11R6/lib -lfreetype LIBS = -lm -framework Cocoa -framework OpenGL -framework AppKit -L/usr/X11R6/lib -lfreetype
endif

View File

@ -1 +1,7 @@
PLAF_OBJS = vm/os-unix.o 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