Thread: [Pentagram-cvs] SF.net SVN: pentagram:[2389] pentagram/trunk
Status: Pre-Alpha
Brought to you by:
wjpalenstijn
From: <wjp...@us...> - 2008-07-17 00:17:27
|
Revision: 2389 http://pentagram.svn.sourceforge.net/pentagram/?rev=2389&view=rev Author: wjpalenstijn Date: 2008-07-17 00:17:36 +0000 (Thu, 17 Jul 2008) Log Message: ----------- add contents to fastarea when opening container. This code was (accidentally?) removed in r1546. (Fixes #2019042) Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/gumps/ContainerGump.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-16 02:27:28 UTC (rev 2388) +++ pentagram/trunk/ChangeLog 2008-07-17 00:17:36 UTC (rev 2389) @@ -1,3 +1,7 @@ +2008-07-16 Willem Jan Palenstijn <wjp...@us...> + * gumps/ContainerGump.cpp: add contents to fastarea when opening container. + This code was (accidentally?) removed in r1546. (Fixes #2019042) + 2008-07-15 Matthew Jimenez <mji...@us...> * kernel/GUIApp.cpp: Send release events to all down keys when entering a textmode gump (fixes #2019034) Modified: pentagram/trunk/gumps/ContainerGump.cpp =================================================================== --- pentagram/trunk/gumps/ContainerGump.cpp 2008-07-16 02:27:28 UTC (rev 2388) +++ pentagram/trunk/gumps/ContainerGump.cpp 2008-07-17 00:17:36 UTC (rev 2389) @@ -78,6 +78,13 @@ if (!c) return; // Container gone!? + std::list<Item*>& contents = c->contents; + std::list<Item*>::iterator iter; + for (iter = contents.begin(); iter != contents.end(); ++iter) { + (*iter)->enterFastArea(); + } + + // Position isn't like in the original // U8 puts a container gump slightly to the left of an object } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-07-17 00:19:40
|
Revision: 2390 http://pentagram.svn.sourceforge.net/pentagram/?rev=2390&view=rev Author: wjpalenstijn Date: 2008-07-17 00:19:50 +0000 (Thu, 17 Jul 2008) Log Message: ----------- prevent idle anims while quickmoving Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/world/actors/AvatarMoverProcess.h pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-17 00:17:36 UTC (rev 2389) +++ pentagram/trunk/ChangeLog 2008-07-17 00:19:50 UTC (rev 2390) @@ -1,6 +1,7 @@ 2008-07-16 Willem Jan Palenstijn <wjp...@us...> * gumps/ContainerGump.cpp: add contents to fastarea when opening container. This code was (accidentally?) removed in r1546. (Fixes #2019042) + * world/actors/*AvatarMoverProcess: prevent idle anims while quickmoving 2008-07-15 Matthew Jimenez <mji...@us...> * kernel/GUIApp.cpp: Send release events to all down keys when entering a Modified: pentagram/trunk/world/actors/AvatarMoverProcess.h =================================================================== --- pentagram/trunk/world/actors/AvatarMoverProcess.h 2008-07-17 00:17:36 UTC (rev 2389) +++ pentagram/trunk/world/actors/AvatarMoverProcess.h 2008-07-17 00:19:50 UTC (rev 2390) @@ -37,6 +37,8 @@ void OnMouseDown(int button, int mx, int my); void OnMouseUp(int button); + void resetIdleTime() { idleTime = 0; } + bool loadData(IDataSource* ids, uint32 version); protected: virtual void saveData(ODataSource* ods); Modified: pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp =================================================================== --- pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp 2008-07-17 00:17:36 UTC (rev 2389) +++ pentagram/trunk/world/actors/QuickAvatarMoverProcess.cpp 2008-07-17 00:19:50 UTC (rev 2390) @@ -26,6 +26,7 @@ #include "GUIApp.h" #include "ShapeInfo.h" #include "getObject.h" +#include "AvatarMoverProcess.h" #include "IDataSource.h" #include "ODataSource.h" @@ -136,6 +137,10 @@ // Yes, i know, not entirely correct avatar->collideMove(x+dx,y+dy,z+dz, false, true); + + + // Prevent avatar from running an idle animation while moving around + GUIApp::get_instance()->getAvatarMoverProcess()->resetIdleTime(); } void QuickAvatarMoverProcess::terminate() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-07-17 00:21:14
|
Revision: 2391 http://pentagram.svn.sourceforge.net/pentagram/?rev=2391&view=rev Author: wjpalenstijn Date: 2008-07-17 00:21:23 +0000 (Thu, 17 Jul 2008) Log Message: ----------- don't fade screen when opening TargetGump Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/gumps/DesktopGump.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-17 00:19:50 UTC (rev 2390) +++ pentagram/trunk/ChangeLog 2008-07-17 00:21:23 UTC (rev 2391) @@ -2,6 +2,7 @@ * gumps/ContainerGump.cpp: add contents to fastarea when opening container. This code was (accidentally?) removed in r1546. (Fixes #2019042) * world/actors/*AvatarMoverProcess: prevent idle anims while quickmoving + * gumps/DesktopGump.cpp: don't fade screen when opening TargetGump 2008-07-15 Matthew Jimenez <mji...@us...> * kernel/GUIApp.cpp: Send release events to all down keys when entering a Modified: pentagram/trunk/gumps/DesktopGump.cpp =================================================================== --- pentagram/trunk/gumps/DesktopGump.cpp 2008-07-17 00:19:50 UTC (rev 2390) +++ pentagram/trunk/gumps/DesktopGump.cpp 2008-07-17 00:21:23 UTC (rev 2391) @@ -24,6 +24,7 @@ #include "ODataSource.h" #include "ConsoleGump.h" #include "ModalGump.h" +#include "TargetGump.h" DEFINE_RUNTIME_CLASSTYPE_CODE(DesktopGump,Gump); @@ -71,7 +72,8 @@ { // If background blanking on modal is enabled... // Background is partially transparent - if (faded_modal && g->IsOfType<ModalGump>() && !g->IsHidden()) + if (faded_modal && g->IsOfType<ModalGump>() && + !g->IsOfType<TargetGump>() && !g->IsHidden()) surf->FillBlended(0x7F000000,0,0,dims.w,dims.h); g->Paint(surf, lerp_factor, scaled); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-07-20 12:58:54
|
Revision: 2392 http://pentagram.svn.sourceforge.net/pentagram/?rev=2392&view=rev Author: wjpalenstijn Date: 2008-07-20 12:58:50 +0000 (Sun, 20 Jul 2008) Log Message: ----------- require entire item to be inside itemarea Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/gumps/ContainerGump.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-17 00:21:23 UTC (rev 2391) +++ pentagram/trunk/ChangeLog 2008-07-20 12:58:50 UTC (rev 2392) @@ -1,3 +1,6 @@ +2008-07-20 Willem Jan Palenstijn <wjp...@us...> + * gumps/ContainerGump.cpp: require entire item to be inside itemarea + 2008-07-16 Willem Jan Palenstijn <wjp...@us...> * gumps/ContainerGump.cpp: add contents to fastarea when opening container. This code was (accidentally?) removed in r1546. (Fixes #2019042) Modified: pentagram/trunk/gumps/ContainerGump.cpp =================================================================== --- pentagram/trunk/gumps/ContainerGump.cpp 2008-07-17 00:21:23 UTC (rev 2391) +++ pentagram/trunk/gumps/ContainerGump.cpp 2008-07-20 12:58:50 UTC (rev 2392) @@ -419,8 +419,16 @@ dragging_x = mx - itemarea.x - dox; dragging_y = my - itemarea.y - doy; - if (dragging_x < 0 || dragging_x >= itemarea.w || - dragging_y < 0 || dragging_y >= itemarea.h) { + Shape* sh = item->getShapeObject(); + assert(sh); + ShapeFrame* fr = sh->getFrame(dragging_frame); + assert(fr); + + if (dragging_x - fr->xoff < 0 || + dragging_x - fr->xoff + fr->width > itemarea.w || + dragging_y - fr->yoff < 0 || + dragging_y - fr->yoff + fr->height > itemarea.h) + { display_dragging = false; return false; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-07-21 21:07:08
|
Revision: 2394 http://pentagram.svn.sourceforge.net/pentagram/?rev=2394&view=rev Author: wjpalenstijn Date: 2008-07-21 21:07:16 +0000 (Mon, 21 Jul 2008) Log Message: ----------- don't adjust position for tiny actors Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/world/actors/AnimationTracker.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-21 05:46:30 UTC (rev 2393) +++ pentagram/trunk/ChangeLog 2008-07-21 21:07:16 UTC (rev 2394) @@ -1,3 +1,6 @@ +2008-07-21 Willem Jan Palenstijn <wjp...@us...> + * world/actors/AnimationTracker.cpp: don't adjust position for tiny actors + 2008-07-20 Willem Jan Palenstijn <wjp...@us...> * gumps/ContainerGump.cpp: require entire item to be inside itemarea Modified: pentagram/trunk/world/actors/AnimationTracker.cpp =================================================================== --- pentagram/trunk/world/actors/AnimationTracker.cpp 2008-07-21 05:46:30 UTC (rev 2393) +++ pentagram/trunk/world/actors/AnimationTracker.cpp 2008-07-21 21:07:16 UTC (rev 2394) @@ -304,7 +304,7 @@ // TODO: Profile the effect of disabling this for pathfinding. // It shouldn't be necessary in that case, and may provide a // worthwhile speed-up. - if (f.flags & AnimFrame::AFF_ONGROUND) { + if ((f.flags & AnimFrame::AFF_ONGROUND) && zd > 8) { targetok = cm->scanForValidPosition(tx,ty,tz, a, dir, true, tx,ty,tz); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-07-23 21:02:51
|
Revision: 2395 http://pentagram.svn.sourceforge.net/pentagram/?rev=2395&view=rev Author: wjpalenstijn Date: 2008-07-23 21:02:59 +0000 (Wed, 23 Jul 2008) Log Message: ----------- work around bug in german usecode Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/docs/u8bugs.txt pentagram/trunk/usecode/UCMachine.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-21 21:07:16 UTC (rev 2394) +++ pentagram/trunk/ChangeLog 2008-07-23 21:02:59 UTC (rev 2395) @@ -1,3 +1,6 @@ +2008-07-23 Willem Jan Palenstijn <wjp...@us...> + * usecode/UCMachine.cpp, docs/u8bugs.txt: work around bug in german usecode + 2008-07-21 Willem Jan Palenstijn <wjp...@us...> * world/actors/AnimationTracker.cpp: don't adjust position for tiny actors Modified: pentagram/trunk/docs/u8bugs.txt =================================================================== --- pentagram/trunk/docs/u8bugs.txt 2008-07-21 21:07:16 UTC (rev 2394) +++ pentagram/trunk/docs/u8bugs.txt 2008-07-23 21:02:59 UTC (rev 2395) @@ -77,6 +77,22 @@ +[German 2.12] Wrong sorcery candle placement not properly detected: + +Pentagram can crash when the sorcery candles are places incorrectly. +This is a bug in the German 2.12 usecode, where it uses the strings +" Irgendetwas stimmt nicht!" and " Irgendetwas stimmt nicht." +(note the punctuation). + +FIX: +Patch usecode to make the strings equal + +WORKAROUND: +Serious hack in UCMachine changes the '!' to a '.' (only in the string +" Irgendetwas stimmt nicht!" in usecode class 0x7C). + + + TYPOS: ------- @@ -134,10 +150,11 @@ Map 25: (Lava river, after Carthax lake) -Missing ground/wall tiles around (17547,30275) and (17715,30307) +Missing ground/wall tiles around the entire southern wall, e.g., +(21920,29736,8). WORKAROUND: -None yet +None yet. Modified: pentagram/trunk/usecode/UCMachine.cpp =================================================================== --- pentagram/trunk/usecode/UCMachine.cpp 2008-07-21 21:07:16 UTC (rev 2394) +++ pentagram/trunk/usecode/UCMachine.cpp 2008-07-23 21:02:59 UTC (rev 2395) @@ -316,6 +316,17 @@ char *str = new char[ui16a+1]; cs.read(str, ui16a); str[ui16a] = 0; + + // REALLY MAJOR HACK: + // see docs/u8bugs.txt and + // http://sourceforge.net/tracker/index.php?func=detail&aid=2025145&group_id=53819&atid=471706 + if (GAME_IS_U8 && p->classid == 0x7C) { + if (!strcmp(str, " Irgendetwas stimmt nicht!")) { + str[25] = '.'; // ! to . + } + } + + LOGPF(("push string\t\"%s\"\n", str)); ui16b = cs.read1(); if (ui16b != 0) error = true; @@ -536,7 +547,7 @@ freeStringList(ui16a); p->stack.push2(ui16b); LOGPF(("remove slist\t(%02X)\n", ui32a)); - break; + break; case 0x1B: // 1B xx This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-07-25 00:04:51
|
Revision: 2396 http://pentagram.svn.sourceforge.net/pentagram/?rev=2396&view=rev Author: mjimenez Date: 2008-07-25 00:04:58 +0000 (Fri, 25 Jul 2008) Log Message: ----------- 2008-07-24 Matthew Jimenez <mji...@us...> * system/macosx, */module.mk, objects.mk, bootstrap, configure.ac, Makefile.in: improve support for building on macosx using make Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/Makefile.in pentagram/trunk/bootstrap pentagram/trunk/configure.ac pentagram/trunk/module.mk pentagram/trunk/objects.mk pentagram/trunk/tools/disasm/module.mk pentagram/trunk/tools/flexpack/module.mk pentagram/trunk/tools/fold/module.mk pentagram/trunk/tools/shapeconv/module.mk Added Paths: ----------- pentagram/trunk/system/macosx/ pentagram/trunk/system/macosx/macosx_include.h pentagram/trunk/system/macosx/macosx_utils.m pentagram/trunk/system/macosx/module.mk pentagram/trunk/system/module.mk Property Changed: ---------------- pentagram/trunk/system/ Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/ChangeLog 2008-07-25 00:04:58 UTC (rev 2396) @@ -1,3 +1,7 @@ +2008-07-24 Matthew Jimenez <mji...@us...> + * system/macosx, */module.mk, objects.mk, bootstrap, configure.ac, + Makefile.in: improve support for building on macosx using make + 2008-07-23 Willem Jan Palenstijn <wjp...@us...> * usecode/UCMachine.cpp, docs/u8bugs.txt: work around bug in german usecode Modified: pentagram/trunk/Makefile.in =================================================================== --- pentagram/trunk/Makefile.in 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/Makefile.in 2008-07-25 00:04:58 UTC (rev 2396) @@ -39,6 +39,7 @@ CP := cp CXX := @CXX@ +CC := @CC@ MKDIR := @MKDIR@ RM := @RM@ EXEEXT := @EXEEXT@ @@ -50,6 +51,7 @@ SDL_CFLAGS := @SDL_CFLAGS@ CPPFLAGS := @CPPFLAGS@ @DEFS@ -DDATA_PATH=\"@DATAPATH@\" CXXFLAGS := -g @CXXFLAGS@ @PROFILE@ +CFLAGS := -g @CFLAGS@ @PROFILE@ LDFLAGS := @LDFLAGS@ @PROFILE@ SYS_LIBS := @SYS_LIBS@ CON_LIBS := @CON_LIBS@ @@ -66,7 +68,14 @@ USE_BUILTIN_DATA := @USE_BUILTIN_DATA@ +SYSTEM := +SYSTEM_MODULES := +ifeq (@HOST_SYSTEM@,MACOSX) +SYSTEM = ${SYSTEM_MACOSX} +SYSTEM_MODULES := system/macosx +endif + # List of all submodules # The order is important, be careful if you change it MODULES := tools/data2c convert convert/u8 convert/crusader misc \ @@ -75,7 +84,7 @@ tools/shapeconv $(GIMP_PLUGIN_MODULES)\ kernel games graphics graphics/fonts graphics/scalers audio \ audio/midi audio/midi/timidity usecode world world/actors gumps \ - gumps/widgets conf . + gumps/widgets conf system ${SYSTEM_MODULES} . # Default target. The other dependencies are added by the module.mk files all: misc/config.h @@ -123,6 +132,7 @@ # Include list of objects include $(top_srcdir)/objects.mk + # Include additional rules for each module include $(patsubst %,$(top_srcdir)/%/module.mk,$(MODULES)) @@ -134,6 +144,14 @@ @$(MKDIR) $(*D)/$(DEPDIR) $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(WARNINGS) $(CPPFLAGS) $(CXXFLAGS) $(SDL_CFLAGS) -c -o $@ $< +# cancel any built-in .m->.o rules +%.o: %.m + +# custom compile rule which calculates dependencies +%.o: %.m $(PCHEADER) + @$(MKDIR) $(*D)/$(DEPDIR) + $(CC) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(WARNINGS) $(CPPFLAGS) $(CFLAGS) $(SDL_CFLAGS) -c -o $@ $< + # custom compile rule for the precompiled header %.h.gch: %.h @$(MKDIR) $(*D)/$(DEPDIR) Modified: pentagram/trunk/bootstrap =================================================================== --- pentagram/trunk/bootstrap 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/bootstrap 2008-07-25 00:04:58 UTC (rev 2396) @@ -27,7 +27,7 @@ echo "Writing Makefiles:" # Note: do _NOT_ include '.' here -MODULES="tools tools/disasm tools/compile tools/shapeconv tools/fold tools/flexpack tools/gimp-plugin tools/data2c misc convert convert/u8 convert/crusader filesys filesys/zip kernel games graphics graphics/fonts graphics/scalers audio audio/midi audio/midi/timidity world world/actors usecode gumps gumps/widgets conf" +MODULES="tools tools/disasm tools/compile tools/shapeconv tools/fold tools/flexpack tools/gimp-plugin tools/data2c misc convert convert/u8 convert/crusader filesys filesys/zip kernel games graphics graphics/fonts graphics/scalers audio audio/midi audio/midi/timidity world world/actors usecode gumps gumps/widgets conf system system/macosx" for subdir in $MODULES; do rm -f $subdir/Makefile Modified: pentagram/trunk/configure.ac =================================================================== --- pentagram/trunk/configure.ac 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/configure.ac 2008-07-25 00:04:58 UTC (rev 2396) @@ -110,8 +110,9 @@ dnl For now I am lazy and do not add proper detection code. AC_DEFINE(MACOSX, 1, [Mac OS X]) AC_MSG_RESULT(Mac OS X) - GUI_LIBS="$GUI_LIBS -framework AudioUnit -framework CoreMIDI" - DATAPATH="data" + GUI_LIBS="$GUI_LIBS -framework Cocoa -framework AudioUnit -framework CoreMIDI" + CON_LIBS="$CON_LIBS -framework Cocoa" + HOST_SYSTEM=MACOSX ;; *) AC_DEFINE(UNIX, 1, [UNIX-variant]) @@ -494,6 +495,7 @@ AC_SUBST(SYS_LIBS) AC_SUBST(GUI_LIBS) AC_SUBST(CON_LIBS) +AC_SUBST(HOST_SYSTEM) AC_CONFIG_FILES([ Makefile Modified: pentagram/trunk/module.mk =================================================================== --- pentagram/trunk/module.mk 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -26,6 +26,7 @@ $(AUDIO) \ $(MIDI) \ $(TIMIDITY) \ + $(SYSTEM) \ kernel/GUIApp.o \ misc/version.o \ pentagram.o Modified: pentagram/trunk/objects.mk =================================================================== --- pentagram/trunk/objects.mk 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/objects.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -270,6 +270,9 @@ audio/midi/timidity/timidity_sdl_c.o \ audio/midi/timidity/timidity_tables.o +SYSTEM_MACOSX = \ + system/macosx/macosx_utils.o + DATA_FILES = \ data/fixedfont.ini \ data/fixedfont.tga \ Property changes on: pentagram/trunk/system ___________________________________________________________________ Added: svn:ignore + Makefile Property changes on: pentagram/trunk/system/macosx ___________________________________________________________________ Added: svn:ignore + Makefile Added: pentagram/trunk/system/macosx/macosx_include.h =================================================================== --- pentagram/trunk/system/macosx/macosx_include.h (rev 0) +++ pentagram/trunk/system/macosx/macosx_include.h 2008-07-25 00:04:58 UTC (rev 2396) @@ -0,0 +1,41 @@ +/* + * macosx_include.h + * + * Copyright (C) 2006-2008 The Pentagram Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef MACOSX_INCLUDE_H +#define MACOSX_INCLUDE_H + +#ifndef MACOSX +#define MACOSX +#endif + +#undef DATA_PATH + +#ifdef __cplusplus +extern "C" { +#endif + +const char * macosxResourcePath(); +const char * macosxPasteboardText(); + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file Property changes on: pentagram/trunk/system/macosx/macosx_include.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: pentagram/trunk/system/macosx/macosx_utils.m =================================================================== --- pentagram/trunk/system/macosx/macosx_utils.m (rev 0) +++ pentagram/trunk/system/macosx/macosx_utils.m 2008-07-25 00:04:58 UTC (rev 2396) @@ -0,0 +1,37 @@ +/* + * macosx_utils.m + * + * Copyright (C) 2006-2008 The Pentagram Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#import <Foundation/NSBundle.h> +#import <Foundation/NSString.h> +#import <AppKit/NSPasteboard.h> + +const char * macosxResourcePath() +{ + NSString * path = [[NSBundle mainBundle] resourcePath]; + if (path) + return [path UTF8String]; + return "data"; +} + +const char * macosxPasteboardText() +{ + NSPasteboard *pb = [NSPasteboard generalPasteboard]; + return [[pb stringForType: NSStringPboardType] UTF8String]; +} \ No newline at end of file Property changes on: pentagram/trunk/system/macosx/macosx_utils.m ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: pentagram/trunk/system/macosx/module.mk =================================================================== --- pentagram/trunk/system/macosx/module.mk (rev 0) +++ pentagram/trunk/system/macosx/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -0,0 +1,8 @@ +# TODO - it would be nice if LPATH could be set by the Makefile that +# includes us, since that has to know our path anyway. +LPATH := system/macosx + +LSRC := $(wildcard $(srcdir)/$(LPATH)/*.m) $(wildcard $(srcdir)/$(LPATH)/*.cpp) + +# Common rules +include $(srcdir)/common.mk Property changes on: pentagram/trunk/system/macosx/module.mk ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: pentagram/trunk/system/module.mk =================================================================== --- pentagram/trunk/system/module.mk (rev 0) +++ pentagram/trunk/system/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -0,0 +1,8 @@ +# TODO - it would be nice if LPATH could be set by the Makefile that +# includes us, since that has to know our path anyway. +LPATH := tools + +LSRC := $(wildcard $(srcdir)/$(LPATH)/*.cpp) + +# Common rules +include $(srcdir)/common.mk Property changes on: pentagram/trunk/system/module.mk ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: pentagram/trunk/tools/disasm/module.mk =================================================================== --- pentagram/trunk/tools/disasm/module.mk 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/tools/disasm/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -13,6 +13,7 @@ $(CONF) \ $(GAMES) \ $(FILESYS) \ + $(SYSTEM) \ kernel/CoreApp.o \ tools/disasm/Disasm.o \ tools/fold/Type.o \ Modified: pentagram/trunk/tools/flexpack/module.mk =================================================================== --- pentagram/trunk/tools/flexpack/module.mk 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/tools/flexpack/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -13,6 +13,7 @@ $(CONF) \ $(GAMES) \ $(FILESYS) \ + $(SYSTEM) \ kernel/CoreApp.o \ tools/flexpack/FlexWriter.o \ tools/flexpack/FlexPack.o Modified: pentagram/trunk/tools/fold/module.mk =================================================================== --- pentagram/trunk/tools/fold/module.mk 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/tools/fold/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -10,6 +10,7 @@ $(MISC) \ $(CONF) \ $(GAMES) \ + $(SYSTEM) \ kernel/CoreApp.o \ filesys/FileSystem.o \ filesys/RawArchive.o \ Modified: pentagram/trunk/tools/shapeconv/module.mk =================================================================== --- pentagram/trunk/tools/shapeconv/module.mk 2008-07-23 21:02:59 UTC (rev 2395) +++ pentagram/trunk/tools/shapeconv/module.mk 2008-07-25 00:04:58 UTC (rev 2396) @@ -13,6 +13,7 @@ $(CONF) \ $(ARGS) \ $(CONVERT) \ + $(SYSTEM) \ kernel/CoreApp.o # Common rules This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-07-28 05:44:02
|
Revision: 2397 http://pentagram.svn.sourceforge.net/pentagram/?rev=2397&view=rev Author: mjimenez Date: 2008-07-28 05:44:11 +0000 (Mon, 28 Jul 2008) Log Message: ----------- 2008-07-28 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk: add makefile to help ease building of universal binaries of pentagram and dependencies Modified Paths: -------------- pentagram/trunk/ChangeLog Added Paths: ----------- pentagram/trunk/system/macosx/archs.mk Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-25 00:04:58 UTC (rev 2396) +++ pentagram/trunk/ChangeLog 2008-07-28 05:44:11 UTC (rev 2397) @@ -1,3 +1,7 @@ +2008-07-28 Matthew Jimenez <mji...@us...> + * system/macosx/archs.mk: add makefile to help ease building of + universal binaries of pentagram and dependencies + 2008-07-24 Matthew Jimenez <mji...@us...> * system/macosx, */module.mk, objects.mk, bootstrap, configure.ac, Makefile.in: improve support for building on macosx using make Added: pentagram/trunk/system/macosx/archs.mk =================================================================== --- pentagram/trunk/system/macosx/archs.mk (rev 0) +++ pentagram/trunk/system/macosx/archs.mk 2008-07-28 05:44:11 UTC (rev 2397) @@ -0,0 +1,47 @@ +ARCHS=i386 ppc +BUILD_HOST=${shell uname -p}-apple-darwin + +CFLAGS_i386=-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 +LDFLAGS_i386=-arch i386 +CONFIG_i386=--build=${BUILD_HOST} --host=i386-apple-darwin + +CFLAGS_ppc=-O2 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3 -arch ppc +LDFLAGS_ppc=-arch ppc +CONFIG_ppc=--build=${BUILD_HOST} --host=powerpc-apple-darwin + +# These are off for the moment +# 10.5 required to link Foundation in 64-bit +CFLAGS_x86_64=-O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch x86_64 +LDFLAGS_x86_64=-arch x86_64 +CONFIG_x86_64=--build=${BUILD_HOST} --host=i386-apple-darwin + +CFLAGS_ppc64=-O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch ppc64 +LDFLAGS_ppc64=-arch ppc64 +CONFIG_ppc64=--build=${BUILD_HOST} --host=powerpc-apple-darwin + +define arch_template +_arch_${1}_%: ARCH=${1} +_arch_${1}_%: export CFLAGS:=${CFLAGS_${1}} ${ADDITIONAL_CFLAGS} +_arch_${1}_%: export LDFLAGS:=${LDFLAGS_${1}} ${ADDITIONAL_LDFLAGS} +_arch_${1}_%: export CXXFLAGS:=${CFLAGS_${1}} ${ADDITIONAL_CFLAGS} +_arch_${1}_%: ARCH_CONFIG:=${CONFIG_${1}} +_arch_${1}_%: %_${1}; +endef + +ifdef ARCH +arch_targets=_arch_${ARCH}_${1} +${eval ${call arch_template,${ARCH}}} +else +arch_targets=${foreach ARCH,${ARCHS},_arch_${ARCH}_${1}} +${foreach ARCH,${ARCHS},${eval ${call arch_template,${ARCH}}}} +endif + +arch_test: ${call arch_targets,arch_test} + @echo target: $@ dependencies: $^ + +arch_test_%: + @echo target: $@ dependencies: $^ arch: ${ARCH} + @echo CFLAGS: $$CFLAGS + @echo LDFLAGS: $$LDFLAGS + @echo CXXFLAGS: $$CXXFLAGS + Property changes on: pentagram/trunk/system/macosx/archs.mk ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-07-29 04:20:59
|
Revision: 2398 http://pentagram.svn.sourceforge.net/pentagram/?rev=2398&view=rev Author: mjimenez Date: 2008-07-29 04:21:08 +0000 (Tue, 29 Jul 2008) Log Message: ----------- 2008-07-28 Matthew Jimenez <mji...@us...> * system/macosx/deps.mk: add makefile to build pentagram's dependencies under multiple architectures Modified Paths: -------------- pentagram/trunk/ChangeLog Added Paths: ----------- pentagram/trunk/system/macosx/deps.mk Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-28 05:44:11 UTC (rev 2397) +++ pentagram/trunk/ChangeLog 2008-07-29 04:21:08 UTC (rev 2398) @@ -1,6 +1,8 @@ 2008-07-28 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk: add makefile to help ease building of universal binaries of pentagram and dependencies + * system/macosx/deps.mk: add makefile to build pentagram's + dependencies under multiple architectures 2008-07-24 Matthew Jimenez <mji...@us...> * system/macosx, */module.mk, objects.mk, bootstrap, configure.ac, Added: pentagram/trunk/system/macosx/deps.mk =================================================================== --- pentagram/trunk/system/macosx/deps.mk (rev 0) +++ pentagram/trunk/system/macosx/deps.mk 2008-07-29 04:21:08 UTC (rev 2398) @@ -0,0 +1,102 @@ +TARGET_PREFIX=${realpath ./} +ROOT_DIRECTORY=${realpath ../../} + +ADDITIONAL_CFLAGS=-I${TARGET_PREFIX}/${ARCH}/include +ADDITIONAL_LDFLAGS=-L${TARGET_PREFIX}/${ARCH}/lib + +include ${TARGET_PREFIX}/archs.mk + +DEPS=zlib libpng SDL SDL_ttf + +all: extract configure build install +distclean: clean + rm -fr ${ARCHS} build + +define dep_template +_dep_${1}_%: DEP=${1} +_dep_${1}_%: %_${1}; +endef + +dep_targets=${foreach DEP,${DEPS},_dep_${DEP}_${1}} +${foreach DEP,${DEPS},${eval ${call dep_template,${DEP}}}} +${DEPS}: %: _dep_%_install; + +extract: ${call dep_targets,extract}; +configure: ${call dep_targets,configure}; +build: ${call dep_targets,build}; +install: ${call dep_targets,install}; +clean: ${call dep_targets,clean}; + +extract_%: ${call arch_targets,.extract_%}; +configure_%: extract_% ${call arch_targets,.configure_%}; +build_%: configure_% ${call arch_targets,.build_%}; +install_%: build_% ${call arch_targets,.install_%}; +clean_%: ${call arch_targets,.clean_%}; + +# This seems to prevent my stub files from being deleted +.SECONDARY: + +.extract_zlib_%: ${TARGET_PREFIX}/zlib-1.2.3.tar.gz + -mkdir build + -mkdir build/${ARCH} + -rm -fr build/${ARCH}/${DEP} + -mkdir build/${ARCH}/${DEP} + cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< + touch $@ + +.extract_libpng_%: ${TARGET_PREFIX}/libpng-1.2.29.tar.gz + -mkdir build + -mkdir build/${ARCH} + -rm -fr build/${ARCH}/${DEP} + -mkdir build/${ARCH}/${DEP} + cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< + touch $@ + +.extract_SDL_%: ${TARGET_PREFIX}/SDL-1.2.13.tar.gz + -mkdir build + -mkdir build/${ARCH} + -rm -fr build/${ARCH}/${DEP} + -mkdir build/${ARCH}/${DEP} + cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< + touch $@ + +.extract_SDL_ttf_%: ${TARGET_PREFIX}/SDL_ttf-2.0.9.tar.gz + -mkdir build + -mkdir build/${ARCH} + -rm -fr build/${ARCH}/${DEP} + -mkdir build/${ARCH}/${DEP} + cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< + touch $@ + +.configure_zlib_%: + cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} + touch $@ + +.configure_libpng_%: zlib + cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} \ + ${ARCH_CONFIG} --disable-dependency-tracking + touch $@ + +.configure_SDL_%: libpng + cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} \ + ${ARCH_CONFIG} --disable-dependency-tracking --enable-video-x11=no \ + --enable-video-carbon=no --enable-video-cocoa=yes + touch $@ + +.configure_SDL_ttf_%: SDL + cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} \ + ${ARCH_CONFIG} --disable-dependency-tracking + touch $@ + +.build_%: + cd build/${ARCH}/${DEP} && make + @touch $@ + +.install_%: + cd build/${ARCH}/${DEP} && make install + @touch $@ + +.clean_%: + rm -fr build/${ARCH}/${DEP} + rm -fr .*_${DEP}_${ARCH} + Property changes on: pentagram/trunk/system/macosx/deps.mk ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-07-30 05:29:18
|
Revision: 2399 http://pentagram.svn.sourceforge.net/pentagram/?rev=2399&view=rev Author: mjimenez Date: 2008-07-30 05:29:28 +0000 (Wed, 30 Jul 2008) Log Message: ----------- 2008-07-30 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk, system/macosx/deps.mk: improve building of dependencies Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/system/macosx/archs.mk pentagram/trunk/system/macosx/deps.mk Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-29 04:21:08 UTC (rev 2398) +++ pentagram/trunk/ChangeLog 2008-07-30 05:29:28 UTC (rev 2399) @@ -1,3 +1,7 @@ +2008-07-30 Matthew Jimenez <mji...@us...> + * system/macosx/archs.mk, system/macosx/deps.mk: improve building of + dependencies + 2008-07-28 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk: add makefile to help ease building of universal binaries of pentagram and dependencies Modified: pentagram/trunk/system/macosx/archs.mk =================================================================== --- pentagram/trunk/system/macosx/archs.mk 2008-07-29 04:21:08 UTC (rev 2398) +++ pentagram/trunk/system/macosx/archs.mk 2008-07-30 05:29:28 UTC (rev 2399) @@ -1,5 +1,6 @@ ARCHS=i386 ppc BUILD_HOST=${shell uname -p}-apple-darwin +TARGET_PREFIX=${realpath ./} CFLAGS_i386=-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 LDFLAGS_i386=-arch i386 @@ -19,29 +20,42 @@ LDFLAGS_ppc64=-arch ppc64 CONFIG_ppc64=--build=${BUILD_HOST} --host=powerpc-apple-darwin + +# Weird thing: if the stamp is foo_${2}.stamp, we won't match here due to the +# matches to foo_% - see make manual 10.8 Implicit Rule Search Algorithm + define arch_template -_arch_${1}_%: ARCH=${1} -_arch_${1}_%: export CFLAGS:=${CFLAGS_${1}} ${ADDITIONAL_CFLAGS} -_arch_${1}_%: export LDFLAGS:=${LDFLAGS_${1}} ${ADDITIONAL_LDFLAGS} -_arch_${1}_%: export CXXFLAGS:=${CFLAGS_${1}} ${ADDITIONAL_CFLAGS} -_arch_${1}_%: ARCH_CONFIG:=${CONFIG_${1}} -_arch_${1}_%: %_${1}; +build/${1}.build/${2}_%.stamp: ARCH=${2} +build/${1}.build/${2}_%.stamp: PROJECT=${1} +build/${1}.build/${2}_%.stamp: PREFIX_DIR=${TARGET_PREFIX}/build/${2} +build/${1}.build/${2}_%.stamp: BUILD_DIR=${TARGET_PREFIX}/build/${1}.build/${2} +build/${1}.build/${2}_%.stamp: export CFLAGS:=${CFLAGS_${2}} -I${TARGET_PREFIX}/build/${2}/include +build/${1}.build/${2}_%.stamp: export LDFLAGS:=${LDFLAGS_${2}} -L${TARGET_PREFIX}/build/${2}/lib +build/${1}.build/${2}_%.stamp: export CXXFLAGS:=${CFLAGS_${2}} -I${TARGET_PREFIX}/build/${2}/include +build/${1}.build/${2}_%.stamp: ARCH_CONFIG:=${CONFIG_${2}} +build/${1}.build/${2}_%.stamp: build/${1}.build/${2} %_${1}.${2} + @touch $$@ + +build/${1}.build/${2}: + @-mkdir build + @-mkdir build/${1}.build + @-mkdir build/${1}.build/${2} endef ifdef ARCH -arch_targets=_arch_${ARCH}_${1} -${eval ${call arch_template,${ARCH}}} +arch_targets=build/${1}.build/${ARCH}_${2}.stamp +create_arch_targets=${eval ${call arch_template,${1},${ARCH}}} else -arch_targets=${foreach ARCH,${ARCHS},_arch_${ARCH}_${1}} -${foreach ARCH,${ARCHS},${eval ${call arch_template,${ARCH}}}} +arch_targets=${foreach ARCH,${ARCHS},build/${1}.build/${ARCH}_${2}.stamp} +create_arch_targets=${foreach ARCH,${ARCHS},${eval ${call arch_template,${1},${ARCH}}}} endif -arch_test: ${call arch_targets,arch_test} - @echo target: $@ dependencies: $^ +#${call create_arch_targets,test}; +#arch_test: ${call arch_targets,test,arch_test} +# @echo target: $@ dependencies: $^ -arch_test_%: - @echo target: $@ dependencies: $^ arch: ${ARCH} - @echo CFLAGS: $$CFLAGS - @echo LDFLAGS: $$LDFLAGS - @echo CXXFLAGS: $$CXXFLAGS - +#arch_test_%: +# @echo target: $@ dependencies: $^ arch: ${ARCH} +# @echo CFLAGS: $$CFLAGS +# @echo LDFLAGS: $$LDFLAGS +# @echo CXXFLAGS: $$CXXFLAGS Modified: pentagram/trunk/system/macosx/deps.mk =================================================================== --- pentagram/trunk/system/macosx/deps.mk 2008-07-29 04:21:08 UTC (rev 2398) +++ pentagram/trunk/system/macosx/deps.mk 2008-07-30 05:29:28 UTC (rev 2399) @@ -1,102 +1,71 @@ -TARGET_PREFIX=${realpath ./} -ROOT_DIRECTORY=${realpath ../../} +ROOT_DIRECTORY=${realpath ./} -ADDITIONAL_CFLAGS=-I${TARGET_PREFIX}/${ARCH}/include -ADDITIONAL_LDFLAGS=-L${TARGET_PREFIX}/${ARCH}/lib +include ${ROOT_DIRECTORY}/archs.mk -include ${TARGET_PREFIX}/archs.mk - DEPS=zlib libpng SDL SDL_ttf all: extract configure build install distclean: clean - rm -fr ${ARCHS} build + rm -fr build define dep_template _dep_${1}_%: DEP=${1} _dep_${1}_%: %_${1}; endef -dep_targets=${foreach DEP,${DEPS},_dep_${DEP}_${1}} -${foreach DEP,${DEPS},${eval ${call dep_template,${DEP}}}} -${DEPS}: %: _dep_%_install; +${foreach DEP,${DEPS},${eval ${call create_arch_targets,${DEP}}}} +${DEPS}: %: dep_install_% -extract: ${call dep_targets,extract}; -configure: ${call dep_targets,configure}; -build: ${call dep_targets,build}; -install: ${call dep_targets,install}; -clean: ${call dep_targets,clean}; +extract: ${foreach DEP,${DEPS},dep_extract_${DEP}}; +configure: ${foreach DEP,${DEPS},dep_configure_${DEP}}; +build: ${foreach DEP,${DEPS},dep_build_${DEP}}; +install: ${foreach DEP,${DEPS},dep_install_${DEP}}; +clean: ${foreach DEP,${DEPS},dep_clean_${DEP}}; -extract_%: ${call arch_targets,.extract_%}; -configure_%: extract_% ${call arch_targets,.configure_%}; -build_%: configure_% ${call arch_targets,.build_%}; -install_%: build_% ${call arch_targets,.install_%}; -clean_%: ${call arch_targets,.clean_%}; +dep_extract_%: ${call arch_targets,%,extract}; +dep_configure_%: dep_extract_% ${call arch_targets,%,configure}; +dep_build_%: dep_configure_% ${call arch_targets,%,build}; +dep_install_%: dep_build_% ${call arch_targets,%,install}; +dep_clean_%: ${call arch_targets,%,clean}; # This seems to prevent my stub files from being deleted .SECONDARY: -.extract_zlib_%: ${TARGET_PREFIX}/zlib-1.2.3.tar.gz - -mkdir build - -mkdir build/${ARCH} - -rm -fr build/${ARCH}/${DEP} - -mkdir build/${ARCH}/${DEP} - cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< - touch $@ +extract_zlib.%: ${ROOT_DIRECTORY}/zlib-1.2.3.tar.gz + cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -.extract_libpng_%: ${TARGET_PREFIX}/libpng-1.2.29.tar.gz - -mkdir build - -mkdir build/${ARCH} - -rm -fr build/${ARCH}/${DEP} - -mkdir build/${ARCH}/${DEP} - cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< - touch $@ +extract_libpng.%: ${ROOT_DIRECTORY}/libpng-1.2.29.tar.gz + cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -.extract_SDL_%: ${TARGET_PREFIX}/SDL-1.2.13.tar.gz - -mkdir build - -mkdir build/${ARCH} - -rm -fr build/${ARCH}/${DEP} - -mkdir build/${ARCH}/${DEP} - cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< - touch $@ +extract_SDL.%: ${ROOT_DIRECTORY}/SDL-1.2.13.tar.gz + cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -.extract_SDL_ttf_%: ${TARGET_PREFIX}/SDL_ttf-2.0.9.tar.gz - -mkdir build - -mkdir build/${ARCH} - -rm -fr build/${ARCH}/${DEP} - -mkdir build/${ARCH}/${DEP} - cd build/${ARCH}/${DEP} && tar --strip-components=1 -xzf $< - touch $@ +extract_SDL_ttf.%: ${ROOT_DIRECTORY}/SDL_ttf-2.0.9.tar.gz + cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -.configure_zlib_%: - cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} - touch $@ +configure_zlib.%: + cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} -.configure_libpng_%: zlib - cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} \ +configure_libpng.%: zlib + cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} \ ${ARCH_CONFIG} --disable-dependency-tracking - touch $@ -.configure_SDL_%: libpng - cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} \ +configure_SDL.%: libpng + cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} \ ${ARCH_CONFIG} --disable-dependency-tracking --enable-video-x11=no \ --enable-video-carbon=no --enable-video-cocoa=yes - touch $@ -.configure_SDL_ttf_%: SDL - cd build/${ARCH}/${DEP} && ./configure --prefix=${TARGET_PREFIX}/${ARCH} \ +configure_SDL_ttf.%: SDL + cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} \ ${ARCH_CONFIG} --disable-dependency-tracking - touch $@ -.build_%: - cd build/${ARCH}/${DEP} && make - @touch $@ +build_%: + cd ${BUILD_DIR} && make -.install_%: - cd build/${ARCH}/${DEP} && make install - @touch $@ +install_%: + cd ${BUILD_DIR} && make install -.clean_%: - rm -fr build/${ARCH}/${DEP} - rm -fr .*_${DEP}_${ARCH} +clean_%: + rm -fr ${BUILD_DIR} + rm -fr build/${PROJECT}.build/${ARCH}_*.stamp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-08-01 01:23:25
|
Revision: 2400 http://pentagram.svn.sourceforge.net/pentagram/?rev=2400&view=rev Author: mjimenez Date: 2008-08-01 01:23:33 +0000 (Fri, 01 Aug 2008) Log Message: ----------- 2008-07-31 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk, system/macosx/deps.mk: adjust makefiles to make builds occur at toplevel source directory * Makefile.in: add datarootdir for autoconf 2.6x compatibility * Makefile.macosx: add makefile to build pentagram for multiple architextures - uses normal configure/make builds in separate directories. Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/Makefile.in pentagram/trunk/system/macosx/archs.mk pentagram/trunk/system/macosx/deps.mk Added Paths: ----------- pentagram/trunk/Makefile.macosx Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-07-30 05:29:28 UTC (rev 2399) +++ pentagram/trunk/ChangeLog 2008-08-01 01:23:33 UTC (rev 2400) @@ -1,3 +1,11 @@ +2008-07-31 Matthew Jimenez <mji...@us...> + * system/macosx/archs.mk, system/macosx/deps.mk: adjust makefiles to + make builds occur at toplevel source directory + * Makefile.in: add datarootdir for autoconf 2.6x compatibility + * Makefile.macosx: add makefile to build pentagram for multiple + architextures - uses normal configure/make builds in separate + directories. + 2008-07-30 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk, system/macosx/deps.mk: improve building of dependencies Modified: pentagram/trunk/Makefile.in =================================================================== --- pentagram/trunk/Makefile.in 2008-07-30 05:29:28 UTC (rev 2399) +++ pentagram/trunk/Makefile.in 2008-08-01 01:23:33 UTC (rev 2400) @@ -9,6 +9,7 @@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ +datarootdir = @datarootdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ Added: pentagram/trunk/Makefile.macosx =================================================================== --- pentagram/trunk/Makefile.macosx (rev 0) +++ pentagram/trunk/Makefile.macosx 2008-08-01 01:23:33 UTC (rev 2400) @@ -0,0 +1,66 @@ +ROOT_DIRECTORY=${realpath ./} +BUNDLE_DIRECTORY=${ROOT_DIRECTORY}/build/Pentagram.app + +include ${ROOT_DIRECTORY}/system/macosx/archs.mk + +all: configure build install + +deps: + ${MAKE} -f system/macosx/deps.mk ROOT_DIRECTORY=${ROOT_DIRECTORY} all + +${eval ${call create_arch_targets,pentagram}} + +configure: ${call arch_targets,pentagram,configure}; +build: configure ${call arch_targets,pentagram,build}; +install: build ${call arch_targets,pentagram,install}; +clean: ${call arch_targets,pentagram,clean} + -rm -fr ${BUNDLE_DIRECTORY} + -rm -f ${ROOT_DIRECTORY}/build/Pentagram.dmg + +configure_%: + cd ${BUILD_DIR} && ${ROOT_DIRECTORY}/configure \ + --prefix=${PREFIX_DIR} ${ARCH_CONFIG} \ + --with-sdl-prefix=${PREFIX_DIR} \ + --enable-hq2x=no --enable-gc-scalers=yes --enable-all-bilinear=yes \ + --enable-timidity-midi=no --enable-fmopl-midi=no \ + --enable-builtin-data=no + +build_%: + cd ${BUILD_DIR} && make + +install_%: + cd ${BUILD_DIR} && make install + +clean_%: + rm -fr ${BUILD_DIR} + rm -fr ${ROOT_DIRECTORY}/build/${PROJECT}.build/${ARCH}_*.stamp + +# Still need InfoPlist.strings and menu nibs +bundle: + -rm -fr ${BUNDLE_DIRECTORY} + mkdir -p ${BUNDLE_DIRECTORY}/Contents/MacOS + mkdir -p ${BUNDLE_DIRECTORY}/Contents/Resources + mkdir -p ${BUNDLE_DIRECTORY}/Contents/Resources/English.lproj + echo "APPL????" > ${BUNDLE_DIRECTORY}/Contents/PkgInfo + install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/Info.plist ${BUNDLE_DIRECTORY}/Contents/ + install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/English.lproj/* ${BUNDLE_DIRECTORY}/Contents/Resources/English.lproj/ + install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/desktop/pentagram.* ${BUNDLE_DIRECTORY}/Contents/Resources/ + install -c -m 644 -g admin ${ROOT_DIRECTORY}/build/*/share/pentagram/* ${BUNDLE_DIRECTORY}/Contents/Resources/ + lipo -create ${ROOT_DIRECTORY}/build/*/bin/pentagram -output ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram + chown :admin ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram +# strip ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram + + +# Not ready yet - just copied out of xcode project +image: + -rm -f ${ROOT_DIRECTORY}/build/Pentagram.dmg + -rm -fr ${ROOT_DIRECTORY}/build/image + mkdir -p ${ROOT_DIRECTORY}/build/image + cp -R ${BUNDLE_DIRECTORY} ${ROOT_DIRECTORY}/build/image/ + install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/pentagram.ini ${ROOT_DIRECTORY}/build/image/ + install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/README.rtf ${ROOT_DIRECTORY}/build/image/ + hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \ + -srcfolder ${ROOT_DIRECTORY}/build/image \ + -volname "Pentagram snapshot" ${ROOT_DIRECTORY}/build/Pentagram.dmg + -rm -fr ${ROOT_DIRECTORY}/build/image + Property changes on: pentagram/trunk/Makefile.macosx ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Modified: pentagram/trunk/system/macosx/archs.mk =================================================================== --- pentagram/trunk/system/macosx/archs.mk 2008-07-30 05:29:28 UTC (rev 2399) +++ pentagram/trunk/system/macosx/archs.mk 2008-08-01 01:23:33 UTC (rev 2400) @@ -1,7 +1,11 @@ ARCHS=i386 ppc BUILD_HOST=${shell uname -p}-apple-darwin -TARGET_PREFIX=${realpath ./} +ifndef ROOT_DIRECTORY +ROOT_DIRECTORY=${realpath ../../} +endif + + CFLAGS_i386=-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 LDFLAGS_i386=-arch i386 CONFIG_i386=--build=${BUILD_HOST} --host=i386-apple-darwin @@ -25,28 +29,26 @@ # matches to foo_% - see make manual 10.8 Implicit Rule Search Algorithm define arch_template -build/${1}.build/${2}_%.stamp: ARCH=${2} -build/${1}.build/${2}_%.stamp: PROJECT=${1} -build/${1}.build/${2}_%.stamp: PREFIX_DIR=${TARGET_PREFIX}/build/${2} -build/${1}.build/${2}_%.stamp: BUILD_DIR=${TARGET_PREFIX}/build/${1}.build/${2} -build/${1}.build/${2}_%.stamp: export CFLAGS:=${CFLAGS_${2}} -I${TARGET_PREFIX}/build/${2}/include -build/${1}.build/${2}_%.stamp: export LDFLAGS:=${LDFLAGS_${2}} -L${TARGET_PREFIX}/build/${2}/lib -build/${1}.build/${2}_%.stamp: export CXXFLAGS:=${CFLAGS_${2}} -I${TARGET_PREFIX}/build/${2}/include -build/${1}.build/${2}_%.stamp: ARCH_CONFIG:=${CONFIG_${2}} -build/${1}.build/${2}_%.stamp: build/${1}.build/${2} %_${1}.${2} +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: ARCH=${2} +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: PROJECT=${1} +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: PREFIX_DIR=${ROOT_DIRECTORY}/build/${2} +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: BUILD_DIR=${ROOT_DIRECTORY}/build/${1}.build/${2} +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: export CFLAGS:=${CFLAGS_${2}} -I${ROOT_DIRECTORY}/build/${2}/include +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: export LDFLAGS:=${LDFLAGS_${2}} -L${ROOT_DIRECTORY}/build/${2}/lib +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: export CXXFLAGS:=${CFLAGS_${2}} -I${ROOT_DIRECTORY}/build/${2}/include +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: ARCH_CONFIG:=${CONFIG_${2}} +${ROOT_DIRECTORY}/build/${1}.build/${2}_%.stamp: ${ROOT_DIRECTORY}/build/${1}.build/${2} %_${1}.${2} @touch $$@ -build/${1}.build/${2}: - @-mkdir build - @-mkdir build/${1}.build - @-mkdir build/${1}.build/${2} +${ROOT_DIRECTORY}/build/${1}.build/${2}: + @-mkdir -p ${ROOT_DIRECTORY}/build/${1}.build/${2} endef ifdef ARCH -arch_targets=build/${1}.build/${ARCH}_${2}.stamp +arch_targets=${ROOT_DIRECTORY}/build/${1}.build/${ARCH}_${2}.stamp create_arch_targets=${eval ${call arch_template,${1},${ARCH}}} else -arch_targets=${foreach ARCH,${ARCHS},build/${1}.build/${ARCH}_${2}.stamp} +arch_targets=${foreach ARCH,${ARCHS},${ROOT_DIRECTORY}/build/${1}.build/${ARCH}_${2}.stamp} create_arch_targets=${foreach ARCH,${ARCHS},${eval ${call arch_template,${1},${ARCH}}}} endif Modified: pentagram/trunk/system/macosx/deps.mk =================================================================== --- pentagram/trunk/system/macosx/deps.mk 2008-07-30 05:29:28 UTC (rev 2399) +++ pentagram/trunk/system/macosx/deps.mk 2008-08-01 01:23:33 UTC (rev 2400) @@ -1,6 +1,8 @@ -ROOT_DIRECTORY=${realpath ./} +ifndef ROOT_DIRECTORY +ROOT_DIRECTORY=${realpath ../../} +endif -include ${ROOT_DIRECTORY}/archs.mk +include ${ROOT_DIRECTORY}/system/macosx/archs.mk DEPS=zlib libpng SDL SDL_ttf @@ -8,11 +10,6 @@ distclean: clean rm -fr build -define dep_template -_dep_${1}_%: DEP=${1} -_dep_${1}_%: %_${1}; -endef - ${foreach DEP,${DEPS},${eval ${call create_arch_targets,${DEP}}}} ${DEPS}: %: dep_install_% @@ -67,5 +64,5 @@ clean_%: rm -fr ${BUILD_DIR} - rm -fr build/${PROJECT}.build/${ARCH}_*.stamp + rm -fr ${ROOT_DIRECTORY}/build/${PROJECT}.build/${ARCH}_*.stamp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-08-03 00:29:10
|
Revision: 2401 http://pentagram.svn.sourceforge.net/pentagram/?rev=2401&view=rev Author: mjimenez Date: 2008-08-03 00:29:19 +0000 (Sun, 03 Aug 2008) Log Message: ----------- 2008-08-02 Matthew Jimenez <mji...@us...> * system/macosx/README.rtf, system/macosx/pentagram.ini: copied files from xcode build for use in new mac builds * system/macosx/Info.plist.in: used to generate Info.plist by configure script to contain version info for mac application bundle * configure.ac: adjustments to handle building of Info.plist * Makefile.macosx: improve building of application bundle and disk image Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/Makefile.macosx pentagram/trunk/configure.ac Added Paths: ----------- pentagram/trunk/system/macosx/Info.plist.in pentagram/trunk/system/macosx/README.rtf pentagram/trunk/system/macosx/pentagram.ini Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-08-01 01:23:33 UTC (rev 2400) +++ pentagram/trunk/ChangeLog 2008-08-03 00:29:19 UTC (rev 2401) @@ -1,3 +1,11 @@ +2008-08-02 Matthew Jimenez <mji...@us...> + * system/macosx/README.rtf, system/macosx/pentagram.ini: copied files + from xcode build for use in new mac builds + * system/macosx/Info.plist.in: used to generate Info.plist by configure + script to contain version info for mac application bundle + * configure.ac: adjustments to handle building of Info.plist + * Makefile.macosx: improve building of application bundle and disk image + 2008-07-31 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk, system/macosx/deps.mk: adjust makefiles to make builds occur at toplevel source directory Modified: pentagram/trunk/Makefile.macosx =================================================================== --- pentagram/trunk/Makefile.macosx 2008-08-01 01:23:33 UTC (rev 2400) +++ pentagram/trunk/Makefile.macosx 2008-08-03 00:29:19 UTC (rev 2401) @@ -3,6 +3,9 @@ include ${ROOT_DIRECTORY}/system/macosx/archs.mk +INSTALL := /usr/bin/install -c +INSTALL_DATA := ${INSTALL} -m 644 -g admin + all: configure build install deps: @@ -40,12 +43,10 @@ -rm -fr ${BUNDLE_DIRECTORY} mkdir -p ${BUNDLE_DIRECTORY}/Contents/MacOS mkdir -p ${BUNDLE_DIRECTORY}/Contents/Resources - mkdir -p ${BUNDLE_DIRECTORY}/Contents/Resources/English.lproj echo "APPL????" > ${BUNDLE_DIRECTORY}/Contents/PkgInfo - install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/Info.plist ${BUNDLE_DIRECTORY}/Contents/ - install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/English.lproj/* ${BUNDLE_DIRECTORY}/Contents/Resources/English.lproj/ - install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/desktop/pentagram.* ${BUNDLE_DIRECTORY}/Contents/Resources/ - install -c -m 644 -g admin ${ROOT_DIRECTORY}/build/*/share/pentagram/* ${BUNDLE_DIRECTORY}/Contents/Resources/ + ${INSTALL_DATA} ${ROOT_DIRECTORY}/build/pentagram.build/*/system/macosx/Info.plist ${BUNDLE_DIRECTORY}/Contents/ + ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/desktop/pentagram.* ${BUNDLE_DIRECTORY}/Contents/Resources/ + ${INSTALL_DATA} ${ROOT_DIRECTORY}/build/*/share/pentagram/* ${BUNDLE_DIRECTORY}/Contents/Resources/ lipo -create ${ROOT_DIRECTORY}/build/*/bin/pentagram -output ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram chown :admin ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram # strip ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram @@ -57,8 +58,8 @@ -rm -fr ${ROOT_DIRECTORY}/build/image mkdir -p ${ROOT_DIRECTORY}/build/image cp -R ${BUNDLE_DIRECTORY} ${ROOT_DIRECTORY}/build/image/ - install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/pentagram.ini ${ROOT_DIRECTORY}/build/image/ - install -c -m 644 -g admin ${ROOT_DIRECTORY}/system/macosx/README.rtf ${ROOT_DIRECTORY}/build/image/ + ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/macosx/pentagram.ini ${ROOT_DIRECTORY}/build/image/ + ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/macosx/README.rtf ${ROOT_DIRECTORY}/build/image/ hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \ -srcfolder ${ROOT_DIRECTORY}/build/image \ -volname "Pentagram snapshot" ${ROOT_DIRECTORY}/build/Pentagram.dmg Modified: pentagram/trunk/configure.ac =================================================================== --- pentagram/trunk/configure.ac 2008-08-01 01:23:33 UTC (rev 2400) +++ pentagram/trunk/configure.ac 2008-08-03 00:29:19 UTC (rev 2401) @@ -113,6 +113,7 @@ GUI_LIBS="$GUI_LIBS -framework Cocoa -framework AudioUnit -framework CoreMIDI" CON_LIBS="$CON_LIBS -framework Cocoa" HOST_SYSTEM=MACOSX + ADDITIONAL_CONFIG_FILES=system/macosx/Info.plist ;; *) AC_DEFINE(UNIX, 1, [UNIX-variant]) @@ -488,6 +489,9 @@ AC_SUBST(WARNINGS) AC_SUBST(PACKAGE) AC_SUBST(VERSION) +AC_SUBST(VER_MAJOR) +AC_SUBST(VER_MINOR) +AC_SUBST(VER_EXTRA) AC_SUBST(PROFILE) AC_SUBST(DATAPATH) AC_SUBST(USE_PCH) @@ -498,7 +502,7 @@ AC_SUBST(HOST_SYSTEM) AC_CONFIG_FILES([ -Makefile +Makefile $ADDITIONAL_CONFIG_FILES ]) AC_OUTPUT Added: pentagram/trunk/system/macosx/Info.plist.in =================================================================== --- pentagram/trunk/system/macosx/Info.plist.in (rev 0) +++ pentagram/trunk/system/macosx/Info.plist.in 2008-08-03 00:29:19 UTC (rev 2401) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>pentagram</string> + <key>CFBundleGetInfoString</key> + <string>Pentagram @VERSION@; Copyright © 2008, The Pentagram Team</string> + <key>CFBundleIconFile</key> + <string>pentagram</string> + <key>CFBundleIdentifier</key> + <string>net.sourceforge.pentagram</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>Pentagram</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>@VER_MAJOR@.@VER_MINOR@</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>@VER_EXTRA@</string> + <key>NSHumanReadableCopyright</key> + <string>Copyright © 2008, The Pentagram Team</string> + <key>NSMainNibFile</key> + <string>SDLMain</string> + <key>NSPrincipalClass</key> + <string>NSApplication</string> +</dict> +</plist> Property changes on: pentagram/trunk/system/macosx/Info.plist.in ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Property changes on: pentagram/trunk/system/macosx/README.rtf ___________________________________________________________________ Added: svn:mime-type + application/rtf Added: svn:eol-style + native Added: pentagram/trunk/system/macosx/pentagram.ini =================================================================== --- pentagram/trunk/system/macosx/pentagram.ini (rev 0) +++ pentagram/trunk/system/macosx/pentagram.ini 2008-08-03 00:29:19 UTC (rev 2401) @@ -0,0 +1,18 @@ +[pentagram] +defaultgame=pentagram +fullscreen=no +scalex=320 +scaley=240 +# Select the scaler you want to use. Currently you can choose between +# point, bilinear, scale2x, 2xSaI, hq2x. +scaler=2xSaI +width=640 +height=480 +bpp=32 +ttf=yes +midi_driver=coreaudio +# Enable this to skip the intro of U8 and initial conversation with Devon. +skipstart=no +[u8] +# replace 'path to U8 directory' with the directory containing 'u8.exe' +path=@home/ultima8 Property changes on: pentagram/trunk/system/macosx/pentagram.ini ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-08-06 15:10:29
|
Revision: 2402 http://pentagram.svn.sourceforge.net/pentagram/?rev=2402&view=rev Author: mjimenez Date: 2008-08-06 15:10:38 +0000 (Wed, 06 Aug 2008) Log Message: ----------- 2008-08-06 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk, system/macosx/deps.mk: include freetype as a dependency Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/system/macosx/archs.mk pentagram/trunk/system/macosx/deps.mk Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-08-03 00:29:19 UTC (rev 2401) +++ pentagram/trunk/ChangeLog 2008-08-06 15:10:38 UTC (rev 2402) @@ -1,3 +1,7 @@ +2008-08-06 Matthew Jimenez <mji...@us...> + * system/macosx/archs.mk, system/macosx/deps.mk: include freetype as a + dependency + 2008-08-02 Matthew Jimenez <mji...@us...> * system/macosx/README.rtf, system/macosx/pentagram.ini: copied files from xcode build for use in new mac builds Modified: pentagram/trunk/system/macosx/archs.mk =================================================================== --- pentagram/trunk/system/macosx/archs.mk 2008-08-03 00:29:19 UTC (rev 2401) +++ pentagram/trunk/system/macosx/archs.mk 2008-08-06 15:10:38 UTC (rev 2402) @@ -7,21 +7,21 @@ CFLAGS_i386=-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 -LDFLAGS_i386=-arch i386 +LDFLAGS_i386=-O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386 CONFIG_i386=--build=${BUILD_HOST} --host=i386-apple-darwin CFLAGS_ppc=-O2 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3 -arch ppc -LDFLAGS_ppc=-arch ppc +LDFLAGS_ppc=-O2 -isysroot /Developer/SDKs/MacOSX10.3.9.sdk -mmacosx-version-min=10.3 -arch ppc CONFIG_ppc=--build=${BUILD_HOST} --host=powerpc-apple-darwin # These are off for the moment # 10.5 required to link Foundation in 64-bit CFLAGS_x86_64=-O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch x86_64 -LDFLAGS_x86_64=-arch x86_64 +LDFLAGS_x86_64=-O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch x86_64 CONFIG_x86_64=--build=${BUILD_HOST} --host=i386-apple-darwin CFLAGS_ppc64=-O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch ppc64 -LDFLAGS_ppc64=-arch ppc64 +LDFLAGS_ppc64=-O2 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -arch ppc64 CONFIG_ppc64=--build=${BUILD_HOST} --host=powerpc-apple-darwin Modified: pentagram/trunk/system/macosx/deps.mk =================================================================== --- pentagram/trunk/system/macosx/deps.mk 2008-08-03 00:29:19 UTC (rev 2401) +++ pentagram/trunk/system/macosx/deps.mk 2008-08-06 15:10:38 UTC (rev 2402) @@ -4,7 +4,7 @@ include ${ROOT_DIRECTORY}/system/macosx/archs.mk -DEPS=zlib libpng SDL SDL_ttf +DEPS=zlib libpng SDL freetype SDL_ttf all: extract configure build install distclean: clean @@ -37,6 +37,9 @@ extract_SDL.%: ${ROOT_DIRECTORY}/SDL-1.2.13.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< +extract_freetype.%: ${ROOT_DIRECTORY}/freetype-2.3.7.tar.gz + cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< + extract_SDL_ttf.%: ${ROOT_DIRECTORY}/SDL_ttf-2.0.9.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< @@ -52,8 +55,12 @@ ${ARCH_CONFIG} --disable-dependency-tracking --enable-video-x11=no \ --enable-video-carbon=no --enable-video-cocoa=yes -configure_SDL_ttf.%: SDL +configure_freetype.%: zlib cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} \ + ${ARCH_CONFIG} --with-old-mac-fonts + +configure_SDL_ttf.%: SDL freetype + cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} \ ${ARCH_CONFIG} --disable-dependency-tracking build_%: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-08-12 04:30:20
|
Revision: 2403 http://pentagram.svn.sourceforge.net/pentagram/?rev=2403&view=rev Author: mjimenez Date: 2008-08-12 04:30:29 +0000 (Tue, 12 Aug 2008) Log Message: ----------- 2008-08-11 Matthew Jimenez <mji...@us...> * system/macosx/deps.mk: build zlib as shared lib instead of static Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/system/macosx/deps.mk Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-08-06 15:10:38 UTC (rev 2402) +++ pentagram/trunk/ChangeLog 2008-08-12 04:30:29 UTC (rev 2403) @@ -1,3 +1,6 @@ +2008-08-11 Matthew Jimenez <mji...@us...> + * system/macosx/deps.mk: build zlib as shared lib instead of static + 2008-08-06 Matthew Jimenez <mji...@us...> * system/macosx/archs.mk, system/macosx/deps.mk: include freetype as a dependency Modified: pentagram/trunk/system/macosx/deps.mk =================================================================== --- pentagram/trunk/system/macosx/deps.mk 2008-08-06 15:10:38 UTC (rev 2402) +++ pentagram/trunk/system/macosx/deps.mk 2008-08-12 04:30:29 UTC (rev 2403) @@ -44,7 +44,10 @@ cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< configure_zlib.%: - cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} + cd ${BUILD_DIR} && LDSHARED="gcc ${LDFLAGS} -dynamiclib \ + -install_name ${PREFIX_DIR}/lib/libz.1.dylib \ + -compatibility_version 1 -current_version 1.2.3" \ + ./configure --prefix=${PREFIX_DIR} --shared configure_libpng.%: zlib cd ${BUILD_DIR} && ./configure --prefix=${PREFIX_DIR} \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-08-26 13:50:42
|
Revision: 2404 http://pentagram.svn.sourceforge.net/pentagram/?rev=2404&view=rev Author: mjimenez Date: 2008-08-26 13:50:51 +0000 (Tue, 26 Aug 2008) Log Message: ----------- 2008-08-26 Matthew Jimenez <mji...@us...> * Makefile.macosx: complete building of application bundles and finish target to create disk image * system/macosx/uberlipo: script added that creates universal application bundles from architecture-dependent application bundles Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/Makefile.macosx Added Paths: ----------- pentagram/trunk/system/macosx/uberlipo Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-08-12 04:30:29 UTC (rev 2403) +++ pentagram/trunk/ChangeLog 2008-08-26 13:50:51 UTC (rev 2404) @@ -1,3 +1,10 @@ +2008-08-26 Matthew Jimenez <mji...@us...> + * Makefile.macosx: complete building of application bundles + and finish target to create disk image + * system/macosx/uberlipo: script added that creates universal + application bundles from architecture-dependent application + bundles + 2008-08-11 Matthew Jimenez <mji...@us...> * system/macosx/deps.mk: build zlib as shared lib instead of static Modified: pentagram/trunk/Makefile.macosx =================================================================== --- pentagram/trunk/Makefile.macosx 2008-08-12 04:30:29 UTC (rev 2403) +++ pentagram/trunk/Makefile.macosx 2008-08-26 13:50:51 UTC (rev 2404) @@ -1,11 +1,44 @@ ROOT_DIRECTORY=${realpath ./} -BUNDLE_DIRECTORY=${ROOT_DIRECTORY}/build/Pentagram.app +BUNDLE_NAME=Pentagram.app include ${ROOT_DIRECTORY}/system/macosx/archs.mk INSTALL := /usr/bin/install -c INSTALL_DATA := ${INSTALL} -m 644 -g admin +INSTALL_PROGRAM := ${INSTALL} -m 755 -g admin +define BUNDLE_LIBRARY + ${INSTALL_PROGRAM} ${PREFIX_DIR}/lib/lib${1}.dylib ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Libraries/ + otool -L ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Libraries/lib${1}.dylib | \ + awk '/${subst /,\/,${PREFIX_DIR}}\/lib\/lib${1}.*dylib/ \ + { lib = $$1; \ + sub(/.*\/lib\//, "@executable_path/../Libraries/", lib); \ + sub(/[^a-zA-Z]*.dylib/, ".dylib", lib); \ + print lib, "${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Libraries/lib${1}.dylib"; \ + }' | \ + xargs -n 3 install_name_tool -id + otool -L ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Libraries/lib${1}.dylib | \ + awk '/${subst /,\/,${PREFIX_DIR}}\/lib\/lib.*dylib/ \ + { lib = $$1; \ + sub(/.*\/lib\//, "@executable_path/../Libraries/", lib); \ + sub(/[^a-zA-Z]*.dylib/, ".dylib", lib); \ + print $$1, lib, "${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Libraries/lib${1}.dylib"; \ + }' | \ + xargs -n 3 install_name_tool -change +endef + +define BUNDLE_PROGRAM + ${INSTALL_PROGRAM} ${PREFIX_DIR}/bin/${1} ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/MacOS/ + otool -L ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/MacOS/${1} | \ + awk '/${subst /,\/,${PREFIX_DIR}}\/lib\/lib.*dylib/ \ + { lib = $$1; \ + sub(/.*\/lib\//, "@executable_path/../Libraries/", lib); \ + sub(/[^a-zA-Z]*.dylib/, ".dylib", lib); \ + print $$1, lib, "${PREFIX_DIR}/${BUNDLE_NAME}/Contents/MacOS/${1}"; \ + }' | \ + xargs -n 3 install_name_tool -change +endef + all: configure build install deps: @@ -16,9 +49,10 @@ configure: ${call arch_targets,pentagram,configure}; build: configure ${call arch_targets,pentagram,build}; install: build ${call arch_targets,pentagram,install}; +bundle: install ${call arch_targets,pentagram,bundle} + clean: ${call arch_targets,pentagram,clean} - -rm -fr ${BUNDLE_DIRECTORY} - -rm -f ${ROOT_DIRECTORY}/build/Pentagram.dmg + rm -f ${ROOT_DIRECTORY}/build/Pentagram.dmg configure_%: cd ${BUILD_DIR} && ${ROOT_DIRECTORY}/configure \ @@ -34,34 +68,36 @@ install_%: cd ${BUILD_DIR} && make install +bundle_%: + rm -fr ${PREFIX_DIR}/${BUNDLE_NAME} + mkdir -p ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/MacOS + mkdir -p ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Resources + mkdir -p ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Libraries + echo "APPL????" > ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/PkgInfo + ${INSTALL_DATA} ${BUILD_DIR}/system/macosx/Info.plist ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/ + ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/desktop/pentagram.* ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Resources/ + ${INSTALL_DATA} ${PREFIX_DIR}/share/pentagram/* ${PREFIX_DIR}/${BUNDLE_NAME}/Contents/Resources/ + ${call BUNDLE_LIBRARY,z} + ${call BUNDLE_LIBRARY,png} + ${call BUNDLE_LIBRARY,freetype} + ${call BUNDLE_LIBRARY,SDL} + ${call BUNDLE_LIBRARY,SDL_ttf} + ${call BUNDLE_PROGRAM,pentagram} + clean_%: rm -fr ${BUILD_DIR} rm -fr ${ROOT_DIRECTORY}/build/${PROJECT}.build/${ARCH}_*.stamp + rm -fr ${PREFIX_DIR}/${BUNDLE_NAME} -# Still need InfoPlist.strings and menu nibs -bundle: - -rm -fr ${BUNDLE_DIRECTORY} - mkdir -p ${BUNDLE_DIRECTORY}/Contents/MacOS - mkdir -p ${BUNDLE_DIRECTORY}/Contents/Resources - echo "APPL????" > ${BUNDLE_DIRECTORY}/Contents/PkgInfo - ${INSTALL_DATA} ${ROOT_DIRECTORY}/build/pentagram.build/*/system/macosx/Info.plist ${BUNDLE_DIRECTORY}/Contents/ - ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/desktop/pentagram.* ${BUNDLE_DIRECTORY}/Contents/Resources/ - ${INSTALL_DATA} ${ROOT_DIRECTORY}/build/*/share/pentagram/* ${BUNDLE_DIRECTORY}/Contents/Resources/ - lipo -create ${ROOT_DIRECTORY}/build/*/bin/pentagram -output ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram - chown :admin ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram -# strip ${BUNDLE_DIRECTORY}/Contents/MacOS/pentagram - - -# Not ready yet - just copied out of xcode project image: - -rm -f ${ROOT_DIRECTORY}/build/Pentagram.dmg - -rm -fr ${ROOT_DIRECTORY}/build/image + rm -f ${ROOT_DIRECTORY}/build/Pentagram.dmg + rm -fr ${ROOT_DIRECTORY}/build/image mkdir -p ${ROOT_DIRECTORY}/build/image - cp -R ${BUNDLE_DIRECTORY} ${ROOT_DIRECTORY}/build/image/ + ${ROOT_DIRECTORY}/system/macosx/uberlipo -create \ + -output ${ROOT_DIRECTORY}/build/image/${BUNDLE_NAME} \ + ${foreach ARCH,${ARCHS},${ROOT_DIRECTORY}/build/${ARCH}/${BUNDLE_NAME}} ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/macosx/pentagram.ini ${ROOT_DIRECTORY}/build/image/ ${INSTALL_DATA} ${ROOT_DIRECTORY}/system/macosx/README.rtf ${ROOT_DIRECTORY}/build/image/ hdiutil create -ov -format UDZO -imagekey zlib-level=9 -fs HFS+ \ -srcfolder ${ROOT_DIRECTORY}/build/image \ -volname "Pentagram snapshot" ${ROOT_DIRECTORY}/build/Pentagram.dmg - -rm -fr ${ROOT_DIRECTORY}/build/image - Added: pentagram/trunk/system/macosx/uberlipo =================================================================== --- pentagram/trunk/system/macosx/uberlipo (rev 0) +++ pentagram/trunk/system/macosx/uberlipo 2008-08-26 13:50:51 UTC (rev 2404) @@ -0,0 +1,239 @@ +#!/bin/bash +# uberlipo - create, manipulate, or inspect universal bundles. +# Version 1.0 + +# Copyright (C) 2008, Matthew Jimenez +# All rights reserved. +# +# Redistribution and use, with or without modification, are permitted +# provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * The names of contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +let verbose=1; + +# Options are limited to what I needed to accomplish my goal +# I'll want to add other like those in lipo when I get the chance +while test $# -ge 1; do + case "$1" in + -v | -version | --version) + echo "uberlipo 1.0" + echo "Copyright (C) 2008, Matthew Jimenez" + exit 0; + ;; + -h | -help | --help) + echo "Usage: `basename $0` [-info] [-detailed_info] [-create] [-output bundle] [bundle ...]"; + echo " -v, -version Print the version information and exit."; + echo " -h, -help Print the usage information and exit."; + echo " -n, -noisy Increase the logging level."; + echo " -q, -quiet Decrease the logging level."; + echo " -info Show information for each input bundle."; + echo " -detailed_info Same as \"-info -noisy\""; + echo " -create Create a universal bundle from the input bundles."; + echo " -output Specify the name for the new bundle used by -create."; + exit 0; + ;; + -create) operation="$1"; shift;; + -output) output_bundle="$2"; shift; shift;; + -info) operation="$1"; shift;; + -detailed_info) operation="-info"; let verbose++; shift;; + -n | -noisy) let verbose++; shift;; + -q | -quiet) + if test ${verbose} -gt 0; then + let verbose--; + fi + shift;; + *) + bundle="${1%/}"; + if ! test -d "${bundle}"; then + echo "$1: input bundle not a directory"; + exit 1; + fi + input_bundle[bundle_cnt++]=${bundle}; + shift; + ;; + esac +done + +if test ${#input_bundle[*]} -eq 0; then + echo "$0: no input bundles specified"; + exit 1; +fi + +case "${operation}" in + -create) + if test "${output_bundle}" == ""; then + echo "$0: no output bundle specified"; + exit 1; + fi + rm -fr "${output_bundle}" + mkdir -p "${output_bundle}" + # get file lists into temp files + let i=0; + while test $i -lt ${#input_bundle[*]}; do + bundle=${input_bundle[i]}; + find "${bundle}" | sed -e "s#^${bundle}/*##" > ${TMPDIR}/$$.files_$i; + let i++; + done + #build unique file list + awk '! /^$/ {print}' ${TMPDIR}/$$.files_* | sort | uniq > ${TMPDIR}/$$.files; + + # create bundle + if test ${verbose} -gt 0; then + echo "Creating univeral bundle: ${output_bundle}" + fi + for file in `cat ${TMPDIR}/$$.files`; do + let i=0; + let merge=1; + merge_cmd="lipo -create -output ${output_bundle}/${file}"; + unset first; + + while test $i -lt ${#input_bundle[*]}; do + bundle=${input_bundle[i]}; + if ! test -d "${output_bundle}/${file}" && test -d "${bundle}/${file}"; then + let merge=0; + if test ${verbose} -gt 0; then + echo "Creating directory: ${output_bundle}/${file}" + fi + mkdir -p "${output_bundle}/${file}"; + let rc=$?; + if test ${rc} -ne 0; then + echo "$0: Failure"; + exit ${rc}; + fi + elif ! test -L "${output_bundle}/${file}" && test -L "${bundle}/${file}"; then + let merge=0; + realfile=`readlink "${bundle}/${file}"`; + if test ${verbose} -gt 0; then + echo "Creating symlink: ${output_bundle}/${file} -> ${realfile}" + fi + ln -s "${realfile}" "${output_bundle}/${file}"; + let rc=$?; + if test ${rc} -ne 0; then + echo "$0: Failure"; + exit ${rc}; + fi + elif test -f "${bundle}/${file}"; then + if file -b "${bundle}/${file}" | grep -q "Mach-O"; then + merge_cmd="${merge_cmd} ${bundle}/${file}"; + elif file -b "${bundle}/${file}" | grep -q "archive.*library"; then + merge_cmd="${merge_cmd} ${bundle}/${file}"; + else + let merge=0; + if test "${first}" == ""; then + first="${bundle}/${file}"; + fi + + message=`diff -q "${first}" "${bundle}/${file}"`; + if test $? -ne 0; then + echo "WARNING: ${message}." + echo " Choosing ${first} for universal bundle" + fi + fi + fi + let i++; + done + + if test ${merge} -ne 0; then + if test ${verbose} -gt 0; then + echo "Creating uninversal binary: ${output_bundle}/${file}"; + fi + ${merge_cmd}; + let rc=$?; + if test ${rc} -ne 0; then + echo "$0: Failure"; + exit ${rc}; + fi + fi + + if test "${first}" != ""; then + if test ${verbose} -gt 0; then + echo "Adding file: ${output_bundle}/${file}"; + fi + install -c "${first}" "${output_bundle}/${file}"; + let rc=$?; + if test ${rc} -ne 0; then + echo "$0: Failure"; + exit ${rc}; + fi + fi + done + ;; + -info) + if test ${verbose} -eq 0; then + exit 0; + fi + + let i=0; + while test $i -lt ${#input_bundle[*]}; do + bundle=${input_bundle[i]}; + echo "Information for bundle: ${bundle}"; + + # get file lists into temp files + find "${bundle}" | sed -e "s#^${bundle}/*##" > ${TMPDIR}/$$.files_$i; + + if test ${verbose} -gt 1; then + echo " entries: `wc -l ${TMPDIR}/$$.files_$i | awk '{print $1}'`"; + echo; + fi + + for file in `cat ${TMPDIR}/$$.files_$i`; do + if test -d "${bundle}/${file}"; then + let entries=`ls -1 ${bundle}/${file} | wc -l | awk '{print $1}'`; + printf "%-32s\tdirectory (entries: ${entries})\n" "${file}:"; + elif test -L "${bundle}/${file}"; then + realfile=`readlink "${bundle}/${file}"`; + basefile=`basename "${bundle}/${file}"`; + printf "%-32s\tsymbolic link (${basefile} -> ${realfile})\n" "${file}:"; + elif test -f "${bundle}/${file}"; then + if file -b "${bundle}/${file}" | grep -q "Mach-O universal"; then + file_info=`file -b "${bundle}/${file}" | head -n 1`; + file_archs=`lipo -info "${bundle}/${file}" | sed -e 's/^.*: //' -e 's/ *$//'`; + printf "%-32s\t${file_info} (${file_archs})\n" "${file}:"; + if test ${verbose} -gt 1; then + if file -b "${bundle}/${file}" | grep -q "Mach-O \(executable\|dynamically\)"; then + for arch in ${file_archs}; do + echo " shared libraries (${arch}):"; + otool -arch ${arch} -L "${bundle}/${file}" | awk '! /:$/ {print}'; + done + echo; + fi + fi + elif file -b "${bundle}/${file}" | grep -q "Mach-O"; then + file_info=`file -b "${bundle}/${file}" | head -n 1`; + printf "%-32s\t${file_info}\n" "${file}:"; + if test ${verbose} -gt 1; then + if file -b "${bundle}/${file}" | grep -q "Mach-O \(executable\|dynamically\)"; then + echo " shared libraries:"; + otool -L "${bundle}/${file}" | awk '! /:$/ {print}'; + echo; + fi + fi + else + file_info=`file -b "${bundle}/${file}" | head -n 1`; + file_mime=`file -bI "${bundle}/${file}" | head -n 1`; + printf "%-32s\t${file_info} (${file_mime})\n" "${file}:"; + fi + fi + done + let i++; + done + ;; +esac Property changes on: pentagram/trunk/system/macosx/uberlipo ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + text/plain Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-08-30 22:07:21
|
Revision: 2405 http://pentagram.svn.sourceforge.net/pentagram/?rev=2405&view=rev Author: wjpalenstijn Date: 2008-08-30 22:07:31 +0000 (Sat, 30 Aug 2008) Log Message: ----------- copy sanity checks from SDL_sound Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/audio/midi/timidity/timidity.h pentagram/trunk/audio/midi/timidity/timidity_resample.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-08-26 13:50:51 UTC (rev 2404) +++ pentagram/trunk/ChangeLog 2008-08-30 22:07:31 UTC (rev 2405) @@ -1,3 +1,6 @@ +2008-08-30 Willem Jan Palenstijn <wjp...@us...> + * audio/midi/timidity/: copy sanity checks from SDL_sound + 2008-08-26 Matthew Jimenez <mji...@us...> * Makefile.macosx: complete building of application bundles and finish target to create disk image Modified: pentagram/trunk/audio/midi/timidity/timidity.h =================================================================== --- pentagram/trunk/audio/midi/timidity/timidity.h 2008-08-26 13:50:51 UTC (rev 2404) +++ pentagram/trunk/audio/midi/timidity/timidity.h 2008-08-30 22:07:31 UTC (rev 2405) @@ -131,6 +131,8 @@ "The GUS does not SUCK!!!" -- a happy user :) */ #define FRACTION_BITS 12 +#define MAX_SAMPLE_SIZE (1 << (32-FRACTION_BITS)) + /* For some reason the sample volume is always set to maximum in all patch files. Define this for a crude adjustment that may help equalize instrument volumes. */ Modified: pentagram/trunk/audio/midi/timidity/timidity_resample.cpp =================================================================== --- pentagram/trunk/audio/midi/timidity/timidity_resample.cpp 2008-08-26 13:50:51 UTC (rev 2404) +++ pentagram/trunk/audio/midi/timidity/timidity_resample.cpp 2008-08-30 22:07:31 UTC (rev 2405) @@ -702,7 +702,9 @@ a = ((double) (sp->sample_rate) * freq_table[(int) (sp->note_to_use)]) / ((double) (sp->root_freq) * play_mode->rate); + if (a <= 0) return; newlen = (sint32)(sp->data_length / a); + if (newlen < 0 || (newlen >> FRACTION_BITS) > MAX_SAMPLE_SIZE) return; dest = newdata = safe_Malloc<sint16>(newlen >> FRACTION_BITS); count = (newlen >> FRACTION_BITS) - 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-09-04 13:52:25
|
Revision: 2406 http://pentagram.svn.sourceforge.net/pentagram/?rev=2406&view=rev Author: mjimenez Date: 2008-09-04 13:52:34 +0000 (Thu, 04 Sep 2008) Log Message: ----------- 2008-09-04 Matthew Jimenez <mji...@us...> * system/macosx/deps.mk: dependency building now downloads the source tarballs from the appropriate sites. Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/system/macosx/deps.mk Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-08-30 22:07:31 UTC (rev 2405) +++ pentagram/trunk/ChangeLog 2008-09-04 13:52:34 UTC (rev 2406) @@ -1,3 +1,7 @@ +2008-09-04 Matthew Jimenez <mji...@us...> + * system/macosx/deps.mk: dependency building now downloads the source + tarballs from the appropriate sites. + 2008-08-30 Willem Jan Palenstijn <wjp...@us...> * audio/midi/timidity/: copy sanity checks from SDL_sound Modified: pentagram/trunk/system/macosx/deps.mk =================================================================== --- pentagram/trunk/system/macosx/deps.mk 2008-08-30 22:07:31 UTC (rev 2405) +++ pentagram/trunk/system/macosx/deps.mk 2008-09-04 13:52:34 UTC (rev 2406) @@ -28,19 +28,34 @@ # This seems to prevent my stub files from being deleted .SECONDARY: -extract_zlib.%: ${ROOT_DIRECTORY}/zlib-1.2.3.tar.gz +${ROOT_DIRECTORY}/build/zlib.tar.gz: + curl -o $@ -L -S http://www.zlib.net/zlib-1.2.3.tar.gz + +${ROOT_DIRECTORY}/build/libpng.tar.gz: + curl -o $@ -L -S http://prdownloads.sourceforge.net/libpng/libpng-1.2.31.tar.gz + +${ROOT_DIRECTORY}/build/SDL.tar.gz: + curl -o $@ -L -S http://libsdl.org/release/SDL-1.2.13.tar.gz + +${ROOT_DIRECTORY}/build/freetype.tar.gz: + curl -o $@ -L -S http://prdownloads.sourceforge.net/freetype/freetype-2.3.7.tar.gz + +${ROOT_DIRECTORY}/build/SDL_ttf.tar.gz: + curl -o $@ -L -S http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.9.tar.gz + +extract_zlib.%: ${ROOT_DIRECTORY}/build/zlib.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -extract_libpng.%: ${ROOT_DIRECTORY}/libpng-1.2.29.tar.gz +extract_libpng.%: ${ROOT_DIRECTORY}/build/libpng.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -extract_SDL.%: ${ROOT_DIRECTORY}/SDL-1.2.13.tar.gz +extract_SDL.%: ${ROOT_DIRECTORY}/build/SDL.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -extract_freetype.%: ${ROOT_DIRECTORY}/freetype-2.3.7.tar.gz +extract_freetype.%: ${ROOT_DIRECTORY}/build/freetype.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< -extract_SDL_ttf.%: ${ROOT_DIRECTORY}/SDL_ttf-2.0.9.tar.gz +extract_SDL_ttf.%: ${ROOT_DIRECTORY}/build/SDL_ttf.tar.gz cd ${BUILD_DIR} && tar --strip-components=1 -xzf $< configure_zlib.%: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-09-10 21:33:35
|
Revision: 2408 http://pentagram.svn.sourceforge.net/pentagram/?rev=2408&view=rev Author: wjpalenstijn Date: 2008-09-10 21:33:45 +0000 (Wed, 10 Sep 2008) Log Message: ----------- move toggleStasis from S to F10 Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/data/u8bindings.ini Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-09-10 17:45:52 UTC (rev 2407) +++ pentagram/trunk/ChangeLog 2008-09-10 21:33:45 UTC (rev 2408) @@ -1,3 +1,6 @@ +2008-09-10 Willem Jan Palenstijn <wjp...@us...> + * data/u8bindings.ini: move toggleStasis from S to F10 + 2008-09-04 Matthew Jimenez <mji...@us...> * system/macosx/deps.mk: dependency building now downloads the source tarballs from the appropriate sites. Modified: pentagram/trunk/data/u8bindings.ini =================================================================== --- pentagram/trunk/data/u8bindings.ini 2008-09-10 17:45:52 UTC (rev 2407) +++ pentagram/trunk/data/u8bindings.ini 2008-09-10 21:33:45 UTC (rev 2408) @@ -8,11 +8,11 @@ r=MainActor::useRecall k=MainActor::useKeyring b=MainActor::useBedroll -s=GUIApp::toggleAvatarInStasis t=GUIApp::engineStats z=MainActor::useInventory f7=GUIApp::saveGame quicksave f8=GUIApp::loadGame quicksave +f10=GUIApp::toggleAvatarInStasis f11=ShapeViewerGump::U8ShapeViewer f12=Kernel::toggleFrameByFrame space=Kernel::advanceFrame This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-09-11 02:50:33
|
Revision: 2409 http://pentagram.svn.sourceforge.net/pentagram/?rev=2409&view=rev Author: mjimenez Date: 2008-09-11 02:50:43 +0000 (Thu, 11 Sep 2008) Log Message: ----------- 2008-09-10 Matthew Jimenez <mji...@us...> * README, docs/xml/readme.xml: update OS X build instructions Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/README pentagram/trunk/docs/xml/readme.xml Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-09-10 21:33:45 UTC (rev 2408) +++ pentagram/trunk/ChangeLog 2008-09-11 02:50:43 UTC (rev 2409) @@ -1,3 +1,6 @@ +2008-09-10 Matthew Jimenez <mji...@us...> + * README, docs/xml/readme.xml: update OS X build instructions + 2008-09-10 Willem Jan Palenstijn <wjp...@us...> * data/u8bindings.ini: move toggleStasis from S to F10 Modified: pentagram/trunk/README =================================================================== --- pentagram/trunk/README 2008-09-10 21:33:45 UTC (rev 2408) +++ pentagram/trunk/README 2008-09-11 02:50:43 UTC (rev 2409) @@ -24,11 +24,12 @@ 4.2. Supported games and versions 5. Changes to the Documentation -5.1. - 3 August 2007 -5.2. - 19 February 2006 -5.3. - 22 May 2005 -5.4. - 21 May 2005 -5.5. - 14 October 2004 +5.1. - 4 September 2008 +5.2. - 3 August 2007 +5.3. - 19 February 2006 +5.4. - 22 May 2005 +5.5. - 21 May 2005 +5.6. - 14 October 2004 -------------------------------------------------------------------------------- @@ -56,10 +57,13 @@ 1.4. Mac OS X -Under OS X, the dependencies are built into the application bundle as embedded frameworks, with the exception of zlib, which is already provided by OS X. SDL.framwork and SDL_ttf.framework can be obtained from libsdl.org. libpng.framework can be obtained the download page or built from source using the Xcode project files also available on the download page. -1. Place all three frameworks in system/xcode/Frameworks -2. Build from within Xcode using the Pentagram.xcodeproj project under system/xcode/Pentagram or from a terminal run xcodebuild: xcodebuild -configuration Release -3. The application bundle will be located at system/xcode/Pentagram/build/Release/Pentagram.app +Under OS X, the dependencies are built into the application bundle as embedded libraries. Pentagram provides makefiles to build the dependencies appropriately. Internally, the OS X specific makefiles use normal unix-style configure & make to build Pentagram and all dependencies. +1. Run the "bootstrap" script to create the "configure" script: ./bootstrap +2. Build all dependencies: make -f Makefile.macosx deps +3. Build Pentagram: make -f Makefile.macosx build +4. Build Pentagram.app: make -f Makefile.macosx bundle +5. Build disk image: make -f Makefile.macosx image +6. The disk image is located in the build directory and contains the universal binary @@ -207,23 +211,27 @@ -------------------------------------------------------------------------------- 5. Changes to the Documentation -5.1. - 3 August 2007 +5.1. - 4 September 2008 +1.4. Mac OS X: replaced old build instructions. + + +5.2. - 3 August 2007 4.1. Console commands: added (short) list of console commands. -5.2. - 19 February 2006 +5.3. - 19 February 2006 4.2. Supported games and versions: updated status of non-English U8. -5.3. - 22 May 2005 +5.4. - 22 May 2005 2.2. Advanced Configuration some more configurations added. 2.3. Optional MIDI settings for Linux added. -5.4. - 21 May 2005 +5.5. - 21 May 2005 cleaned up outdated sections -5.5. - 14 October 2004 +5.6. - 14 October 2004 2.2. Advanced Configuration enable font replacement. Modified: pentagram/trunk/docs/xml/readme.xml =================================================================== --- pentagram/trunk/docs/xml/readme.xml 2008-09-10 21:33:45 UTC (rev 2408) +++ pentagram/trunk/docs/xml/readme.xml 2008-09-11 02:50:43 UTC (rev 2409) @@ -21,7 +21,7 @@ <header>Linux/Unix</header> <body> <ol> - <li> Run the "bootstrap" script to create the "configure" script:<br/> + <li> Run the "bootstrap" script to create the "configure" script:<br/> <kbd>./bootstrap</kbd></li> <li>Now run configure:<br/> <kbd>./configure</kbd></li> @@ -38,17 +38,27 @@ </para> </body> </sub> - <sub name="building-macosx"> + <sub name="building_macosx"> <header>Mac OS X</header> <body> <para> - Under OS X, the dependencies are built into the application bundle as embedded frameworks, with the exception of zlib, which is already provided by OS X. SDL.framwork and SDL_ttf.framework can be obtained from libsdl.org. libpng.framework can be obtained the download page or built from source using the Xcode project files also available on the download page. + Under OS X, the dependencies are built into the application bundle as embedded libraries. + Pentagram provides makefiles to build the dependencies appropriately. + Internally, the OS X specific makefiles use normal unix-style configure & make to + build Pentagram and all dependencies. </para> <ol> - <li>Place all three frameworks in <kbd>system/xcode/Frameworks</kbd></li> - <li>Build from within Xcode using the Pentagram.xcodeproj project under <kbd>system/xcode/Pentagram</kbd> or from a terminal run xcodebuild:<br/> - <kbd>xcodebuild -configuration Release</kbd></li> - <li>The application bundle will be located at <kbd>system/xcode/Pentagram/build/Release/Pentagram.app</kbd></li> + <li> Run the "bootstrap" script to create the "configure" script:<br/> + <kbd>./bootstrap</kbd></li> + <li>Build all dependencies:<br/> + <kbd>make -f Makefile.macosx deps</kbd></li> + <li>Build Pentagram:<br/> + <kbd>make -f Makefile.macosx build</kbd></li> + <li>Build Pentagram.app:<br/> + <kbd>make -f Makefile.macosx bundle</kbd></li> + <li>Build disk image:<br/> + <kbd>make -f Makefile.macosx image</kbd></li> + <li>The disk image is located in the build directory and contains the universal binary</li> </ol> </body> </sub> @@ -285,6 +295,14 @@ </section> <section title="Changes to the Documentation"> <sub name="03082007"> + <header>- 4 September 2008</header> + <body> + <para> + <ref1 target="building_macosx"/>: replaced old build instructions.<br/> + </para> + </body> + </sub> + <sub name="03082007"> <header>- 3 August 2007</header> <body> <para> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mji...@us...> - 2008-09-12 04:45:09
|
Revision: 2413 http://pentagram.svn.sourceforge.net/pentagram/?rev=2413&view=rev Author: mjimenez Date: 2008-09-12 04:45:20 +0000 (Fri, 12 Sep 2008) Log Message: ----------- 2008-09-12 Matthew Jimenez <mji...@us...> * system/xcode: removed XCode project, replaced by makefile system Modified Paths: -------------- pentagram/trunk/ChangeLog Removed Paths: ------------- pentagram/trunk/system/xcode/ Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-09-12 04:35:12 UTC (rev 2412) +++ pentagram/trunk/ChangeLog 2008-09-12 04:45:20 UTC (rev 2413) @@ -1,3 +1,7 @@ +2008-09-12 Matthew Jimenez <mji...@us...> + * system/xcode: removed XCode project, replaced by makefile + system + 2008-09-10 Matthew Jimenez <mji...@us...> * README, docs/xml/readme.xml: update OS X build instructions This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-11-02 12:33:27
|
Revision: 2414 http://pentagram.svn.sourceforge.net/pentagram/?rev=2414&view=rev Author: wjpalenstijn Date: 2008-11-02 12:33:24 +0000 (Sun, 02 Nov 2008) Log Message: ----------- add parentheses Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/convert/ConvertShape.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-09-12 04:45:20 UTC (rev 2413) +++ pentagram/trunk/ChangeLog 2008-11-02 12:33:24 UTC (rev 2414) @@ -1,3 +1,6 @@ +2008-11-02 Willem Jan Palenstijn <wjp...@us...> + * convert/ConvertShape.cpp: add parentheses + 2008-09-12 Matthew Jimenez <mji...@us...> * system/xcode: removed XCode project, replaced by makefile system Modified: pentagram/trunk/convert/ConvertShape.cpp =================================================================== --- pentagram/trunk/convert/ConvertShape.cpp 2008-09-12 04:45:20 UTC (rev 2413) +++ pentagram/trunk/convert/ConvertShape.cpp 2008-11-02 12:33:24 UTC (rev 2414) @@ -487,7 +487,7 @@ frame->xoff = source->readXS(csf->bytes_frame_xoff); frame->yoff = source->readXS(csf->bytes_frame_yoff); - if (frame->compression != 0 && frame->compression != 1 || frame->width < 0 || frame->height < 0) + if ((frame->compression != 0 && frame->compression != 1) || frame->width < 0 || frame->height < 0) { frame->compression = 0; frame->width = 0; @@ -677,7 +677,7 @@ frame->xoff = source->readXS(csf->bytes_frame_xoff); frame->yoff = source->readXS(csf->bytes_frame_yoff); - if (frame->compression != 0 && frame->compression != 1 || frame->width < 0 || frame->height < 0) + if ((frame->compression != 0 && frame->compression != 1) || frame->width < 0 || frame->height < 0) { frame->compression = 0; frame->width = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-11-04 22:31:43
|
Revision: 2415 http://pentagram.svn.sourceforge.net/pentagram/?rev=2415&view=rev Author: wjpalenstijn Date: 2008-11-04 22:31:32 +0000 (Tue, 04 Nov 2008) Log Message: ----------- always include cstdlib Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/misc/pent_include.h Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-11-02 12:33:24 UTC (rev 2414) +++ pentagram/trunk/ChangeLog 2008-11-04 22:31:32 UTC (rev 2415) @@ -1,3 +1,6 @@ +2008-11-04 Willem Jan Palenstijn <wjp...@us...> + * misc/pent_include.h: always include cstdlib + 2008-11-02 Willem Jan Palenstijn <wjp...@us...> * convert/ConvertShape.cpp: add parentheses Modified: pentagram/trunk/misc/pent_include.h =================================================================== --- pentagram/trunk/misc/pent_include.h 2008-11-02 12:33:24 UTC (rev 2414) +++ pentagram/trunk/misc/pent_include.h 2008-11-04 22:31:32 UTC (rev 2415) @@ -65,6 +65,7 @@ // #include <string> #include <cstring> +#include <cstdlib> #include "istring.h" // Empty string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wjp...@us...> - 2008-11-04 22:34:52
|
Revision: 2416 http://pentagram.svn.sourceforge.net/pentagram/?rev=2416&view=rev Author: wjpalenstijn Date: 2008-11-04 22:34:46 +0000 (Tue, 04 Nov 2008) Log Message: ----------- include climits for gcc 4.3 Modified Paths: -------------- pentagram/trunk/ChangeLog pentagram/trunk/world/CurrentMap.cpp Modified: pentagram/trunk/ChangeLog =================================================================== --- pentagram/trunk/ChangeLog 2008-11-04 22:31:32 UTC (rev 2415) +++ pentagram/trunk/ChangeLog 2008-11-04 22:34:46 UTC (rev 2416) @@ -1,5 +1,6 @@ 2008-11-04 Willem Jan Palenstijn <wjp...@us...> * misc/pent_include.h: always include cstdlib + * world/CurrentMap.cpp: include climits for gcc 4.3 2008-11-02 Willem Jan Palenstijn <wjp...@us...> * convert/ConvertShape.cpp: add parentheses Modified: pentagram/trunk/world/CurrentMap.cpp =================================================================== --- pentagram/trunk/world/CurrentMap.cpp 2008-11-04 22:31:32 UTC (rev 2415) +++ pentagram/trunk/world/CurrentMap.cpp 2008-11-04 22:34:46 UTC (rev 2416) @@ -18,6 +18,8 @@ #include "pent_include.h" +#include <climits> + #include "CurrentMap.h" #include "Map.h" #include "Item.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2009-08-28 02:58:26
|
Revision: 2422 http://pentagram.svn.sourceforge.net/pentagram/?rev=2422&view=rev Author: shadowchaser Date: 2009-08-28 02:58:17 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Casting away size_t when used in save/load operations. Visual C++ barks about it, since the Ansi C++ specification states uint32 != size_t. Modified Paths: -------------- pentagram/trunk/gumps/BarkGump.cpp pentagram/trunk/kernel/Process.cpp pentagram/trunk/usecode/UCMachine.cpp pentagram/trunk/usecode/UCProcess.cpp pentagram/trunk/world/Container.cpp pentagram/trunk/world/Map.cpp pentagram/trunk/world/World.cpp Modified: pentagram/trunk/gumps/BarkGump.cpp =================================================================== --- pentagram/trunk/gumps/BarkGump.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/gumps/BarkGump.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -190,7 +190,7 @@ ods->write4(speechshapenum); ods->write4(speechlength); ods->write4(totaltextheight); - ods->write4(barked.size()); + ods->write4(static_cast<uint32>(barked.size())); ods->write(barked.c_str(), barked.size()); } Modified: pentagram/trunk/kernel/Process.cpp =================================================================== --- pentagram/trunk/kernel/Process.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/kernel/Process.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -142,7 +142,7 @@ ods->write2(item_num); ods->write2(type); ods->write4(result); - ods->write4(waiting.size()); + ods->write4(static_cast<uint32>(waiting.size())); for (unsigned int i = 0; i < waiting.size(); ++i) ods->write2(waiting[i]); } Modified: pentagram/trunk/usecode/UCMachine.cpp =================================================================== --- pentagram/trunk/usecode/UCMachine.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/usecode/UCMachine.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -2267,7 +2267,7 @@ void UCMachine::saveStrings(ODataSource* ods) { stringIDs->save(ods); - ods->write4(stringHeap.size()); + ods->write4(static_cast<uint32>(stringHeap.size())); std::map<uint16, std::string>::iterator iter; for (iter = stringHeap.begin(); iter != stringHeap.end(); ++iter) Modified: pentagram/trunk/usecode/UCProcess.cpp =================================================================== --- pentagram/trunk/usecode/UCProcess.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/usecode/UCProcess.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -173,7 +173,7 @@ ods->write2(classid); ods->write2(ip); ods->write4(temp32); - ods->write4(freeonterminate.size()); + ods->write4(static_cast<uint32>(freeonterminate.size())); std::list<std::pair<uint16, int> >::iterator iter; for (iter = freeonterminate.begin(); iter != freeonterminate.end(); ++iter) { Modified: pentagram/trunk/world/Container.cpp =================================================================== --- pentagram/trunk/world/Container.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/world/Container.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -320,7 +320,7 @@ void Container::saveData(ODataSource* ods) { Item::saveData(ods); - ods->write4(contents.size()); + ods->write4(static_cast<uint32>(contents.size())); std::list<Item*>::iterator iter; for (iter = contents.begin(); iter != contents.end(); ++iter) { (*iter)->save(ods); Modified: pentagram/trunk/world/Map.cpp =================================================================== --- pentagram/trunk/world/Map.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/world/Map.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -263,7 +263,7 @@ void Map::save(ODataSource* ods) { - ods->write4(dynamicitems.size()); + ods->write4(static_cast<uint32>(dynamicitems.size())); std::list<Item*>::iterator iter; for (iter = dynamicitems.begin(); iter != dynamicitems.end(); ++iter) { Modified: pentagram/trunk/world/World.cpp =================================================================== --- pentagram/trunk/world/World.cpp 2009-08-28 01:37:52 UTC (rev 2421) +++ pentagram/trunk/world/World.cpp 2009-08-28 02:58:17 UTC (rev 2422) @@ -348,7 +348,7 @@ ods->write2(currentmap->egghatcher); - uint16 es = ethereal.size(); + uint16 es = static_cast<uint16>(ethereal.size()); ods->write4(es); // empty stack and refill it again @@ -384,7 +384,7 @@ void World::saveMaps(ODataSource* ods) { - ods->write4(maps.size()); + ods->write4(static_cast<uint32>(maps.size())); for (unsigned int i = 0; i < maps.size(); ++i) { maps[i]->save(ods); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sha...@us...> - 2009-08-28 16:44:56
|
Revision: 2427 http://pentagram.svn.sourceforge.net/pentagram/?rev=2427&view=rev Author: shadowchaser Date: 2009-08-28 16:44:44 +0000 (Fri, 28 Aug 2009) Log Message: ----------- Added a number of explicit casts to correct MSVC++ level 3 compiler warnings Modified Paths: -------------- pentagram/trunk/audio/AudioProcess.cpp pentagram/trunk/kernel/Kernel.cpp pentagram/trunk/kernel/ObjectManager.cpp pentagram/trunk/usecode/UCMachine.cpp Modified: pentagram/trunk/audio/AudioProcess.cpp =================================================================== --- pentagram/trunk/audio/AudioProcess.cpp 2009-08-28 15:10:41 UTC (rev 2426) +++ pentagram/trunk/audio/AudioProcess.cpp 2009-08-28 16:44:44 UTC (rev 2427) @@ -590,40 +590,41 @@ void AudioProcess::ConCmd_stopSFX(const Console::ArgvType &argv) { AudioProcess *ap = AudioProcess::get_instance(); - if (!ap) { + if (!ap) + { perr << "Error: No AudioProcess" << std::endl; return; } - switch (argv.size() - 1) { - case 1: - ap->stopSFX(strtol(argv[1].c_str(), 0, 0), 0); - break; - case 2: - ap->stopSFX(strtol(argv[1].c_str(), 0, 0), - strtol(argv[2].c_str(), 0, 0)); - break; - default: + if (argv.size() < 2) + { pout << "usage: stopSFX <sfxnum> [<objid>]" << std::endl; - break; + return; } + + int sfxnum = static_cast<int>(strtol(argv[1].c_str(), 0, 0)); + ObjId objid = (argv.size() >= 3) ? static_cast<ObjId>(strtol(argv[2].c_str(), 0, 0)) : 0; + + ap->stopSFX(sfxnum, objid); } // static void AudioProcess::ConCmd_playSFX(const Console::ArgvType &argv) { AudioProcess *ap = AudioProcess::get_instance(); - if (!ap) { + if (!ap) + { perr << "Error: No AudioProcess" << std::endl; return; } - switch (argv.size() - 1) { - case 1: - ap->playSFX(strtol(argv[1].c_str(), 0, 0), 0x60, 0, 0); - break; - default: + if (argv.size() < 2) + { pout << "usage: playSFX <sfxnum>" << std::endl; - break; + return; } + + int sfxnum = static_cast<int>(strtol(argv[1].c_str(), 0, 0)); + + ap->playSFX(sfxnum, 0x60, 0, 0); } Modified: pentagram/trunk/kernel/Kernel.cpp =================================================================== --- pentagram/trunk/kernel/Kernel.cpp 2009-08-28 15:10:41 UTC (rev 2426) +++ pentagram/trunk/kernel/Kernel.cpp 2009-08-28 16:44:44 UTC (rev 2427) @@ -280,7 +280,7 @@ Kernel* kernel = Kernel::get_instance(); ObjId item = 0; if (argv.size() == 2) { - item = strtol(argv[1].c_str(), 0, 0); + item = static_cast<ObjId>(strtol(argv[1].c_str(), 0, 0)); pout << "Processes for item " << item << ":" << std::endl; } else { pout << "Processes:" << std::endl; @@ -304,7 +304,7 @@ Kernel* kernel = Kernel::get_instance(); - ProcId procid = strtol(argv[1].c_str(), 0, 0); + ProcId procid = static_cast<ProcId>(strtol(argv[1].c_str(), 0, 0)); Process* p = kernel->getProcess(procid); if (p == 0) { Modified: pentagram/trunk/kernel/ObjectManager.cpp =================================================================== --- pentagram/trunk/kernel/ObjectManager.cpp 2009-08-28 15:10:41 UTC (rev 2426) +++ pentagram/trunk/kernel/ObjectManager.cpp 2009-08-28 16:44:44 UTC (rev 2427) @@ -172,7 +172,7 @@ ObjectManager* objman = ObjectManager::get_instance(); - ObjId objid = strtol(argv[1].c_str(), 0, 0); + ObjId objid = static_cast<ObjId>(strtol(argv[1].c_str(), 0, 0)); Object* obj = objman->getObject(objid); if (obj == 0) { Modified: pentagram/trunk/usecode/UCMachine.cpp =================================================================== --- pentagram/trunk/usecode/UCMachine.cpp 2009-08-28 15:10:41 UTC (rev 2426) +++ pentagram/trunk/usecode/UCMachine.cpp 2009-08-28 16:44:44 UTC (rev 2427) @@ -2430,7 +2430,7 @@ return; } - uint16 pid = strtol(argv[1].c_str(), 0, 0); + uint16 pid = static_cast<uint16>(strtol(argv[1].c_str(), 0, 0)); UCMachine *uc = UCMachine::get_instance(); uc->tracing_enabled = true; @@ -2446,7 +2446,7 @@ return; } - uint16 objid = strtol(argv[1].c_str(), 0, 0); + uint16 objid = static_cast<uint16>(strtol(argv[1].c_str(), 0, 0)); UCMachine *uc = UCMachine::get_instance(); uc->tracing_enabled = true; @@ -2462,7 +2462,7 @@ return; } - uint16 ucclass = strtol(argv[1].c_str(), 0, 0); + uint16 ucclass = static_cast<uint16>(strtol(argv[1].c_str(), 0, 0)); UCMachine *uc = UCMachine::get_instance(); uc->tracing_enabled = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |