Skip to content

Commit

Permalink
Add the B3DAcceleratorPlugin (OpenGL interface) to the 32-bit Mac bui…
Browse files Browse the repository at this point in the history
…lds.

These link against the Carbon fwk so make it an external plugin.
Modify debug log printing to be simpler.  Use varargs to avoid calling fprintf
with the logfile as an argument.  Close the log file via an atexit call.

Make sure all the Mac plugins.int and plugins.ext are in the right format (all
lines except the first and last should be escaped with a trailing backslash).

Make the Squea builds build Squeak.app, SqueakAssert.app and SqueakDebug.app
as per the Pharo builds.  CocoaFast et al are descriptive but require an
additional packaging step that requires work on bintray.  So less is more.

Make sure the files filed into the VMMaker image have CR line endings.
  • Loading branch information
eliotmiranda committed May 1, 2017
1 parent 845ae19 commit 995e7ae
Show file tree
Hide file tree
Showing 51 changed files with 786 additions and 860 deletions.
4 changes: 4 additions & 0 deletions build.macos32x86/common/Makefile.app.squeak.cog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# The caller should set VMSRCDIR to point to the relevant VM source
# e.g. VMSRCDIR:= ../../spursrc/vm

# Produce Squeak.app, SqueakAssert.app & SqueakDebug.app
APPNAME:=Squeak
APPNAMEDEF:=$(APPNAME)

APPPOST:=overwriteSqueakIcon

# Now include the Makefile proper, which is common to all Mac OS builds.
Expand Down
20 changes: 12 additions & 8 deletions build.macos32x86/common/Makefile.flags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################################################
# Compilations flags & paths for Mac OS X
# Compilation flags & paths for Mac OS X
#
# These are derived from Xcode v 6.2 for Apple LLVM version 6.0 (clang-600.0.57)

Expand Down Expand Up @@ -37,13 +37,8 @@ CFLAGS:=$(CFLAGS) -DBUILD_FOR_OSX=1 \
-isysroot $(SDK) \
-include $(PLATDIR)/iOS/vm/SqueakPureObjc_Prefix.pch

BFLAGS:=-arch $(TARGET_ARCH) \
-bundle \
-isysroot $(SDK)

DYFLAGS:=-arch $(TARGET_ARCH) \
-shared \
-isysroot $(SDK)
BFLAGS:=-arch $(TARGET_ARCH) -bundle -isysroot $(SDK) $(EXTRABFLAGS)
DYFLAGS:=-arch $(TARGET_ARCH) -shared -isysroot $(SDK) $(EXTRADYFLAGS)

WARNINGS:= -Wno-missing-field-initializers -Wno-missing-prototypes \
-Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function \
Expand All @@ -54,9 +49,18 @@ WARNINGS:= -Wno-missing-field-initializers -Wno-missing-prototypes \
-Wno-sign-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof \
-Wno-trigraphs -Wdeprecated-declarations

ifeq ($(CARBON),)
FRAMEWORKS:=-fobjc-link-runtime \
-framework Foundation -framework OpenGL -framework Cocoa \
-framework AudioToolbox -framework CoreAudio -framework QuickTime \
-framework SystemConfiguration \
-framework ApplicationServices -framework Security \
-framework QuartzCore
else
FRAMEWORKS:= \
-framework Foundation -framework OpenGL -framework Carbon \
-framework AudioToolbox -framework CoreAudio -framework QuickTime \
-framework SystemConfiguration \
-framework ApplicationServices -framework Security \
-framework QuartzCore
endif
21 changes: 11 additions & 10 deletions build.macos32x86/common/Makefile.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
# platforms/iOS/plugins/AioPlugin/Makefile. Look at
# platforms/iOS/plugins/*/Makefile for examples.
#
# CFLAGS adds additional compilation flags to source file compilation
# XCFLAGS adds additional compilation flags after all other flags
# EXCLUDESRC defines patterns of source files to not compile, e.g. %/dump.c
# EXTRALIBS defines additional libraries to link into an external plugin bundle
# INCDIRS defines additonal directories in which to search for includes
# LIBSRC overrides the set of files to compile (if EXCLUDESRC inconvenient)
# LINK_WITH_CPP set to non-empty to link external plugin bundle with c++ runtime
# SRCDIRS supplies additional directories containing files to compile.
# PREREQUISITES supplies names of files that must exist to make lib or bundle
# THIRDPARTYLIBS supplies names for third-party libraries that needs to be built
# CFLAGS adds additional compilation flags to source file compilation
# CARBON links against the Carbon framework instead of the default Cocoa
# XCFLAGS adds additional compilation flags after all other flags
# EXCLUDESRC defines patterns of source files to not compile, e.g. %/dump.c
# EXTRALIBS defines additional libraries to link into an external plugin bundle
# INCDIRS defines additonal directories in which to search for includes
# LIBSRC overrides the set of files to compile (if EXCLUDESRC inconvenient)
# LINK_WITH_CPP set to non-empty to link external plugin bundle with c++ runtime
# SRCDIRS supplies additional directories containing files to compile.
# PREREQUISITES supplies names of files that must exist to make lib or bundle
# THIRDPARTYLIBS supplies names for third-party libraries that needs to be built

$(info $$(LIBNAME): $(LIBNAME))

Expand Down
4 changes: 2 additions & 2 deletions build.macos32x86/pharo.cog.spur.lowcode/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
ClipboardExtendedPlugin \
CroquetPlugin \
FT2Plugin \
Expand All @@ -21,5 +22,4 @@ EventsHandlerPlugin \
# not working (because of Cocoa vs Carbon):
# MIDIPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
3 changes: 1 addition & 2 deletions build.macos32x86/pharo.cog.spur.lowcode/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ SqueakFFIPrims \
StarSqueakPlugin \
UnixOSProcessPlugin \
ZipPlugin \
# IA32FFIPlugin \
# Klatt \
# Klatt
4 changes: 2 additions & 2 deletions build.macos32x86/pharo.cog.spur/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
ClipboardExtendedPlugin \
CroquetPlugin \
FT2Plugin \
Expand All @@ -21,5 +22,4 @@ EventsHandlerPlugin \
# not working (because of Cocoa vs Carbon):
# MIDIPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
3 changes: 1 addition & 2 deletions build.macos32x86/pharo.cog.spur/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ SqueakFFIPrims \
StarSqueakPlugin \
UnixOSProcessPlugin \
ZipPlugin \
# IA32FFIPlugin \
# Klatt \
# Klatt
4 changes: 2 additions & 2 deletions build.macos32x86/pharo.stack.spur.lowcode/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
ClipboardExtendedPlugin \
CroquetPlugin \
FT2Plugin \
Expand All @@ -21,5 +22,4 @@ EventsHandlerPlugin \
# not working (because of Cocoa vs Carbon):
# MIDIPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
3 changes: 1 addition & 2 deletions build.macos32x86/pharo.stack.spur.lowcode/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ SqueakFFIPrims \
StarSqueakPlugin \
UnixOSProcessPlugin \
ZipPlugin \
# IA32FFIPlugin \
# Klatt \
# Klatt
4 changes: 2 additions & 2 deletions build.macos32x86/pharo.stack.spur/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
ClipboardExtendedPlugin \
CroquetPlugin \
FT2Plugin \
Expand All @@ -21,5 +22,4 @@ EventsHandlerPlugin \
# not working (because of Cocoa vs Carbon):
# MIDIPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
3 changes: 1 addition & 2 deletions build.macos32x86/pharo.stack.spur/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ SqueakFFIPrims \
StarSqueakPlugin \
UnixOSProcessPlugin \
ZipPlugin \
# IA32FFIPlugin \
# Klatt \
# Klatt
3 changes: 3 additions & 0 deletions build.macos32x86/squeak.cog.spur+immutability/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
# N.B. B3DAcceleratorPlugin needs QuickTime which is 32-bits only.
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
BochsIA32Plugin \
BochsX64Plugin \
CameraPlugin \
GdbARMPlugin \
CroquetPlugin \
Mpeg3Plugin \
Expand Down
1 change: 0 additions & 1 deletion build.macos32x86/squeak.cog.spur+immutability/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ StarSqueakPlugin \
SurfacePlugin \
UUIDPlugin \
VMProfileMacSupportPlugin \
# B3DAcceleratorPlugin \
# InternetConfigPlugin \
# JoystickTabletPlugin \
# MacMenubarPlugin # Does not work under Cocoa
2 changes: 2 additions & 0 deletions build.macos32x86/squeak.cog.spur/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
# N.B. B3DAcceleratorPlugin needs QuickTime which is 32-bits only.
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
BochsIA32Plugin \
BochsX64Plugin \
CameraPlugin \
Expand Down
1 change: 0 additions & 1 deletion build.macos32x86/squeak.cog.spur/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ StarSqueakPlugin \
SurfacePlugin \
UUIDPlugin \
VMProfileMacSupportPlugin \
# B3DAcceleratorPlugin \
# InternetConfigPlugin \
# JoystickTabletPlugin \
# MacMenubarPlugin # Does not work under Cocoa
3 changes: 3 additions & 0 deletions build.macos32x86/squeak.cog.v3/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
# N.B. B3DAcceleratorPlugin needs QuickTime which is 32-bits only.
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
BochsIA32Plugin \
BochsX64Plugin \
CameraPlugin \
GdbARMPlugin \
CroquetPlugin \
Mpeg3Plugin \
Expand Down
1 change: 0 additions & 1 deletion build.macos32x86/squeak.cog.v3/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ StarSqueakPlugin \
SurfacePlugin \
UUIDPlugin \
VMProfileMacSupportPlugin \
# B3DAcceleratorPlugin \
# InternetConfigPlugin \
# JoystickTabletPlugin \
# MacMenubarPlugin # Does not work under Cocoa
3 changes: 3 additions & 0 deletions build.macos32x86/squeak.sista.spur/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
# N.B. B3DAcceleratorPlugin needs QuickTime which is 32-bits only.
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
BochsIA32Plugin \
BochsX64Plugin \
CameraPlugin \
GdbARMPlugin \
CroquetPlugin \
Mpeg3Plugin \
Expand Down
1 change: 0 additions & 1 deletion build.macos32x86/squeak.sista.spur/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ StarSqueakPlugin \
SurfacePlugin \
UUIDPlugin \
VMProfileMacSupportPlugin \
# B3DAcceleratorPlugin \
# InternetConfigPlugin \
# JoystickTabletPlugin \
# MacMenubarPlugin # Does not work under Cocoa
6 changes: 3 additions & 3 deletions build.macos32x86/squeak.stack.spur/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
# N.B. B3DAcceleratorPlugin needs QuickTime which is 32-bits only.
EXTERNAL_PLUGINS = \
BochsIA32Plugin \
BochsX64Plugin \
GdbARMPlugin \
B3DAcceleratorPlugin \
CameraPlugin \
CroquetPlugin \
Mpeg3Plugin \
SqueakFFIPrims \
Expand Down
1 change: 0 additions & 1 deletion build.macos32x86/squeak.stack.spur/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ StarSqueakPlugin \
SurfacePlugin \
UUIDPlugin \
VMProfileMacSupportPlugin \
# B3DAcceleratorPlugin \
# InternetConfigPlugin \
# JoystickTabletPlugin \
# MacMenubarPlugin # Does not work under Cocoa
3 changes: 3 additions & 0 deletions build.macos32x86/squeak.stack.v3/plugins.ext
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Copied, perhaps edited, from ../src/examplePlugins.ext
# N.B. B3DAcceleratorPlugin needs QuickTime which is 32-bits only.
EXTERNAL_PLUGINS = \
B3DAcceleratorPlugin \
CameraPlugin \
CroquetPlugin \
Mpeg3Plugin \
SqueakFFIPrims \
Expand Down
1 change: 0 additions & 1 deletion build.macos32x86/squeak.stack.v3/plugins.int
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ StarSqueakPlugin \
SurfacePlugin \
UUIDPlugin \
VMProfileMacSupportPlugin \
# B3DAcceleratorPlugin \
# InternetConfigPlugin \
# JoystickTabletPlugin \
# MacMenubarPlugin # Does not work under Cocoa
4 changes: 4 additions & 0 deletions build.macos64x64/common/Makefile.app.squeak.cog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
# The caller should set VMSRCDIR to point to the relevant VM source
# e.g. VMSRCDIR:= ../../spursrc/vm

# Produce Squeak.app, SqueakAssert.app & SqueakDebug.app
APPNAME:=Squeak
APPNAMEDEF:=$(APPNAME)

APPPOST:=overwriteSqueakIcon

# Now include the Makefile proper, which is common to all Mac OS builds.
Expand Down
2 changes: 1 addition & 1 deletion build.macos64x64/common/Makefile.flags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#############################################################################
# Compilations flags & paths for Mac OS X
# Compilation flags & paths for Mac OS X
#
# These are derived from Xcode v 6.2 for Apple LLVM version 6.0 (clang-600.0.57)

Expand Down
21 changes: 11 additions & 10 deletions build.macos64x64/common/Makefile.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
# platforms/iOS/plugins/AioPlugin/Makefile. Look at
# platforms/iOS/plugins/*/Makefile for examples.
#
# CFLAGS adds additional compilation flags to source file compilation
# XCFLAGS adds additional compilation flags after all other flags
# EXCLUDESRC defines patterns of source files to not compile, e.g. %/dump.c
# EXTRALIBS defines additional libraries to link into an external plugin bundle
# INCDIRS defines additonal directories in which to search for includes
# LIBSRC overrides the set of files to compile (if EXCLUDESRC inconvenient)
# LINK_WITH_CPP set to non-empty to link external plugin bundle with c++ runtime
# SRCDIRS supplies additional directories containing files to compile.
# PREREQUISITES supplies names of files that must exist to make lib or bundle
# THIRDPARTYLIBS supplies names for third-party libraries that needs to be built
# CFLAGS adds additional compilation flags to source file compilation
# CARBON links against the Carbon framework instead of the default Cocoa
# XCFLAGS adds additional compilation flags after all other flags
# EXCLUDESRC defines patterns of source files to not compile, e.g. %/dump.c
# EXTRALIBS defines additional libraries to link into an external plugin bundle
# INCDIRS defines additonal directories in which to search for includes
# LIBSRC overrides the set of files to compile (if EXCLUDESRC inconvenient)
# LINK_WITH_CPP set to non-empty to link external plugin bundle with c++ runtime
# SRCDIRS supplies additional directories containing files to compile.
# PREREQUISITES supplies names of files that must exist to make lib or bundle
# THIRDPARTYLIBS supplies names for third-party libraries that needs to be built

$(info $$(LIBNAME): $(LIBNAME))

Expand Down
8 changes: 4 additions & 4 deletions build.macos64x64/pharo.cog.spur.lowcode/plugins.ext
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ SDL2DisplayPlugin \
EventsHandlerPlugin \
# Not working in 64bits (weird)
# MIDIPlugin \
# could work, but I don't know if relevant:
# could work, but I don't know if relevant: \
# TestOSAPlugin \
# not working (because of Cocoa vs Carbon):
# not working (because of Cocoa vs Carbon): \
# B3DAcceleratorPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
8 changes: 4 additions & 4 deletions build.macos64x64/pharo.cog.spur/plugins.ext
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ SDL2DisplayPlugin \
EventsHandlerPlugin \
# Not working in 64bits (weird)
# MIDIPlugin \
# could work, but I don't know if relevant:
# could work, but I don't know if relevant: \
# TestOSAPlugin \
# not working (because of Cocoa vs Carbon):
# not working (because of Cocoa vs Carbon): \
# B3DAcceleratorPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
8 changes: 4 additions & 4 deletions build.macos64x64/pharo.stack.spur.lowcode/plugins.ext
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ SDL2DisplayPlugin \
EventsHandlerPlugin \
# Not working in 64bits (weird)
# MIDIPlugin \
# could work, but I don't know if relevant:
# could work, but I don't know if relevant: \
# TestOSAPlugin \
# not working (because of Cocoa vs Carbon):
# not working (because of Cocoa vs Carbon): \
# B3DAcceleratorPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
8 changes: 4 additions & 4 deletions build.macos64x64/pharo.stack.spur/plugins.ext
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ SDL2DisplayPlugin \
EventsHandlerPlugin \
# Not working in 64bits (weird)
# MIDIPlugin \
# could work, but I don't know if relevant:
# could work, but I don't know if relevant: \
# TestOSAPlugin \
# not working (because of Cocoa vs Carbon):
# not working (because of Cocoa vs Carbon): \
# B3DAcceleratorPlugin \
# QuicktimePlugin \
# JoystickTabletPlugin \
# B3DAcceleratorPlugin \
# JoystickTabletPlugin
Loading

0 comments on commit 995e7ae

Please sign in to comment.