OS X: fix and enable startup windows; enable PPC build in osxbuild.sh.

git-svn-id: https://svn.eduke32.com/eduke32@2430 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-08 19:16:30 +00:00
parent 8c4151f8af
commit 3b89d3af08
4 changed files with 39 additions and 36 deletions

View file

@ -4,6 +4,7 @@
#define GetTime xGetTime
#include "duke3d.h"
#include "game.h"
#undef GetTime
#include "build.h"
#include "compat.h"
@ -399,7 +400,6 @@ int startwin_idle(void *v)
return 0;
}
extern char *duke3dgrp;
int startwin_run(void)
{
@ -407,16 +407,16 @@ int startwin_run(void)
if (startwin == nil) return 0;
settings.fullscreen = ScreenMode;
settings.xdim3d = ScreenWidth;
settings.ydim3d = ScreenHeight;
settings.bpp3d = ScreenBPP;
settings.samplerate = MixRate;
settings.bitspersample = NumBits;
settings.channels = NumChannels;
settings.forcesetup = ForceSetup;
settings.game = gametype;
strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
settings.fullscreen = ud.config.ScreenMode;
settings.xdim3d = ud.config.ScreenWidth;
settings.ydim3d = ud.config.ScreenHeight;
settings.bpp3d = ud.config.ScreenBPP;
settings.samplerate = ud.config.MixRate;
settings.bitspersample = ud.config.NumBits;
settings.channels = ud.config.NumChannels;
settings.forcesetup = ud.config.ForceSetup;
// settings.game = gametype;
strncpy(settings.selectedgrp, defaultduke3dgrp, BMAX_PATH);
[startwin setupRunMode];
@ -429,16 +429,16 @@ int startwin_run(void)
[startwin setupMessagesMode];
if (retval) {
ScreenMode = settings.fullscreen;
ScreenWidth = settings.xdim3d;
ScreenHeight = settings.ydim3d;
ScreenBPP = settings.bpp3d;
MixRate = settings.samplerate;
NumBits = settings.bitspersample;
NumChannels = settings.channels;
ForceSetup = settings.forcesetup;
duke3dgrp = settings.selectedgrp;
gametype = settings.game;
ud.config.ScreenMode = settings.fullscreen;
ud.config.ScreenWidth = settings.xdim3d;
ud.config.ScreenHeight = settings.ydim3d;
ud.config.ScreenBPP = settings.bpp3d;
ud.config.MixRate = settings.samplerate;
ud.config.NumBits = settings.bitspersample;
ud.config.NumChannels = settings.channels;
ud.config.ForceSetup = settings.forcesetup;
strncpy(defaultduke3dgrp, settings.selectedgrp, BMAX_PATH);
// gametype = settings.game;
}
return retval;

View file

@ -213,7 +213,7 @@ ifeq ($(PLATFORM),DARWIN)
-Wl,-framework,QuickTime -lm
endif
ifneq (0,$(OSX_STARTUPWINDOW))
EDITOROBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o
# EDITOROBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o
GAMEOBJS+=$(OBJ)/GrpFile.game.$o $(OBJ)/GameListSource.game.$o $(OBJ)/StartupWinController.game.$o
endif
NASMFLAGS += -f macho

View file

@ -34,12 +34,15 @@
#if (!defined __APPLE__ && !defined HAVE_GTK2) || (defined __APPLE__) // && defined __BIG_ENDIAN__)
#undef UNREFERENCED_PARAMETER
#define UNREFERENCED_PARAMETER(x) x=x
# ifndef OSX_STARTUPWINDOW
int32_t startwin_open(void) { return 0; }
int32_t startwin_close(void) { return 0; }
int32_t startwin_puts(const char *s) { UNREFERENCED_PARAMETER(s); return 0; }
int32_t startwin_idle(void *s) { UNREFERENCED_PARAMETER(s); return 0; }
int32_t startwin_settitle(const char *s) { UNREFERENCED_PARAMETER(s); return 0; }
# endif
#endif
/// These can be useful for debugging sometimes...
//#define SDL_WM_GrabInput(x) SDL_WM_GrabInput(SDL_GRAB_OFF)

View file

@ -47,7 +47,7 @@ if [ $onlyzip -eq 0 ]; then
# fi
make veryclean
WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3
OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=1 make -j 3
if [ $? ]; then
echo 64-bit release build succeeded.
cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.x64
@ -67,7 +67,7 @@ if [ $onlyzip -eq 0 ]; then
# fi
make veryclean
WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=1 USE_LIBVPX=0 make -j 3
OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=1 USE_LIBVPX=0 make -j 3
if [ $? ]; then
echo 32-bit release build succeeded.
cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.x86
@ -86,15 +86,15 @@ if [ $onlyzip -eq 0 ]; then
# echo PowerPC debug build failed.
# fi
# make veryclean
# ARCH='-arch ppc' WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=0 make -j 3
# if [ $? ]; then
# echo PowerPC release build succeeded.
# cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.ppc
# cp "EDuke32.app/Contents/MacOS/eduke32" eduke32.ppc
# else
# echo PowerPC release build failed.
# fi
make veryclean
ARCH='-arch ppc' OSX_STARTUPWINDOW=1 WITHOUT_GTK=1 RELEASE=1 BUILD32_ON_64=0 USE_LIBVPX=0 make -j 3
if [ $? ]; then
echo PowerPC release build succeeded.
cp "Mapster32.app/Contents/MacOS/mapster32" mapster32.ppc
cp "EDuke32.app/Contents/MacOS/eduke32" eduke32.ppc
else
echo PowerPC release build failed.
fi
fi
# clean up, clean up, everybody everywhere, clean up, clean up, everybody do your share
@ -113,16 +113,16 @@ fi
# fi
# Almost done...
if [ -f mapster32.x64 ] && [ -f eduke32.x86 ]; then # && [ -f eduke32.ppc ]; then
if [ -f mapster32.x64 ] && [ -f eduke32.x86 ] && [ -f eduke32.ppc ]; then
echo Creating fat binaries.
lipo -create mapster32.x64 mapster32.x86 -output mapster32
lipo -create mapster32.x64 mapster32.x86 mapster32.ppc -output mapster32
cp -f mapster32 "Mapster32.app/Contents/MacOS/mapster32"
# lipo -create mapster32.debug.x64 mapster32.debug.x86 -output mapster32.debug
# cp -f mapster32 "Mapster32.debug.app/Contents/MacOS/mapster32"
lipo -create eduke32.x64 eduke32.x86 -output eduke32
lipo -create eduke32.x64 eduke32.x86 mapster32.ppc -output eduke32
cp -f eduke32 "EDuke32.app/Contents/MacOS/eduke32"
# lipo -create eduke32.debug.x64 eduke32.debug.x86 -output eduke32.debug