Merge branch 'master' into jgrpp

# Conflicts:
#	src/os/macosx/macos.mm
#	src/video/cocoa/cocoa_v.mm
#	src/video/cocoa/fullscreen.mm
#	src/video/cocoa/wnd_quartz.mm
#	src/video/cocoa/wnd_quickdraw.mm
This commit is contained in:
Jonathan G Rennison
2020-04-30 23:59:06 +01:00
22 changed files with 218 additions and 2157 deletions

View File

@@ -59,7 +59,6 @@ set_default() {
enable_universal="0"
enable_osx_g5="0"
enable_cocoa_quartz="1"
enable_cocoa_quickdraw="1"
with_osx_sysroot="1"
with_application_bundle="1"
with_menu_entry="1"
@@ -142,7 +141,6 @@ set_default() {
enable_universal
enable_osx_g5
enable_cocoa_quartz
enable_cocoa_quickdraw
with_osx_sysroot
with_application_bundle
with_allegro
@@ -325,9 +323,6 @@ detect_params() {
--disable-cocoa-quartz) enable_cocoa_quartz="0";;
--enable-cocoa-quartz) enable_cocoa_quartz="2";;
--enable-cocoa-quartz=*) enable_cocoa_quartz="$optarg";;
--disable-cocoa-quickdraw) enable_cocoa_quickdraw="0";;
--enable-cocoa-quickdraw) enable_cocoa_quickdraw="2";;
--enable-cocoa-quickdraw=*) enable_cocoa_quickdraw="$optarg";;
--with-allegro) with_allegro="2";;
--without-allegro) with_allegro="0";;
@@ -1972,12 +1967,6 @@ EOL
# Add macports include dir which is not always set a default system dir. This avoids zillions of bogus warnings.
CFLAGS="$CFLAGS -isystem/opt/local/include"
if [ "$enable_dedicated" = "0" ] && ([ "$cpu_type" = "32" ] || [ "$enable_universal" != "0" ]); then
LIBS="$LIBS -framework QuickTime"
else
CFLAGS="$CFLAGS -DNO_QUICKTIME"
fi
if [ "$enable_universal" = "0" ]; then
# Universal builds set this elsewhere
CFLAGS="$OSX_SYSROOT $CFLAGS"
@@ -2074,15 +2063,11 @@ EOL
if [ "$with_cocoa" != "0" ]; then
CFLAGS="$CFLAGS -DWITH_COCOA"
LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox"
LIBS="$LIBS -F$osx_sdk_path/System/Library/Frameworks -framework Cocoa -framework AudioUnit -framework AudioToolbox"
if [ "$enable_cocoa_quartz" != "0" ]; then
CFLAGS="$CFLAGS -DENABLE_COCOA_QUARTZ"
fi
if [ "$enable_cocoa_quickdraw" != "0" ]; then
CFLAGS="$CFLAGS -DENABLE_COCOA_QUICKDRAW"
fi
fi
if [ "$with_zlib" != "0" ]; then
@@ -3016,56 +3001,6 @@ detect_cocoa() {
else
log 1 "checking whether to enable the Quartz window subdriver... no"
fi
detect_quickdraw
}
detect_quickdraw() {
# 0 means no, 1 is auto-detect, 2 is force
if [ "$enable_cocoa_quickdraw" = "0" ]; then
log 1 "checking Quickdraw window subdriver... disabled"
return 0
fi
# Assume QuickDraw is available when doing an universal build
if [ "$enable_universal" != "0" ]; then
log 1 "checking Quickdraw window subdriver... found"
return 0
fi
# 64 bits doesn't have quickdraw
if [ "$cpu_type" = "64" ]; then
enable_cocoa_quickdraw="0"
log 1 "checking Quickdraw window subdriver... disabled (64 bits)"
return 0
fi
cat > tmp.osx.mm << EOF
#include <AvailabilityMacros.h>
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[]) { SetEmptyRgn(NULL); return 0; }
EOF
execute="$cxx_host $OSX_SYSROOT $OSX_LD_SYSROOT $CFLAGS -mmacosx-version-min=10.3 tmp.osx.mm -framework Cocoa -o tmp.osx 2>&1"
eval $execute > /dev/null
ret=$?
log 2 "executing $execute"
log 2 " exit code $ret"
rm -f tmp.osx.mm tmp.osx
if [ "$ret" != "0" ]; then
log 1 "checking Quickdraw window subdriver... not found"
# It was forced, so it should be found.
if [ "$enable_cocoa_quickdraw" != "1" ]; then
log 1 "configure: error: Quickdraw window driver could not be found"
exit 1
fi
enable_cocoa_quickdraw=0
return 0
fi
enable_cocoa_quickdraw=1
log 1 "checking Quickdraw window subdriver... found"
}
detect_library() {
@@ -3918,8 +3853,7 @@ generate_src_osx() {
CFLAGS="-isysroot $osx_sdk_path $CFLAGS_orig"
LDFLAGS="-Wl,-syslibroot,$osx_sdk_path $LDFLAGS_orig"
fi
CFLAGS="$CFLAGS -D_SQ64 -DNO_QUICKTIME -UENABLE_COCOA_QUICKDRAW"
LIBS="`echo $LIBS | sed 's/-framework QuickTime//'`"
CFLAGS="$CFLAGS -D_SQ64"
fi
case $type in
@@ -4034,7 +3968,6 @@ showhelp() {
echo " Default architectures are: i386 ppc"
echo " --enable-osx-g5 enables optimizations for ppc970 (G5) (OSX ONLY)"
echo " --disable-cocoa-quartz disable the quartz window mode driver for Cocoa (OSX ONLY)"
echo " --disable-cocoa-quickdraw disable the quickdraw window mode driver for Cocoa (OSX ONLY)"
echo " --disable-unicode disable unicode support to build win9x"
echo " version (Win32 ONLY)"
echo " --enable-console compile as a console application instead of as a GUI application."