diff options
Diffstat (limited to 'build')
39 files changed, 9640 insertions, 0 deletions
diff --git a/build/msvc6/AbxDecoder.dsp b/build/msvc6/AbxDecoder.dsp new file mode 100644 index 0000000..0818bc6 --- /dev/null +++ b/build/msvc6/AbxDecoder.dsp @@ -0,0 +1,105 @@ +# Microsoft Developer Studio Project File - Name="AbxDecoder" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=AbxDecoder - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "AbxDecoder.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "AbxDecoder.mak" CFG="AbxDecoder - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "AbxDecoder - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "AbxDecoder - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=xicl6.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "AbxDecoder - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "AbxDecoder___Win32_Release"
+# PROP BASE Intermediate_Dir "AbxDecoder___Win32_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "AbxDecoder_Release"
+# PROP Intermediate_Dir "AbxDecoder_Release"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=xilink6.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
+# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1d000000" /subsystem:windows /dll /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"../../content/cdps/abxadec.dll"
+
+!ELSEIF "$(CFG)" == "AbxDecoder - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "AbxDecoder___Win32_Debug"
+# PROP BASE Intermediate_Dir "AbxDecoder___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "AbxDecoder_Debug"
+# PROP Intermediate_Dir "AbxDecoder_Debug"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "." /I ".." /I "..\sc2code" /I "..\sc2code\libs" /I "..\sc2code\ships" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=xilink6.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib /nologo /base:"0x1d000000" /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../content/cdps/abxadec.dll" /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "AbxDecoder - Win32 Release"
+# Name "AbxDecoder - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=../abxadec/abxaud.c
+# End Source File
+# Begin Source File
+
+SOURCE=../abxadec/abxaud.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/msvc6/UrQuanMasters.dsp b/build/msvc6/UrQuanMasters.dsp new file mode 100644 index 0000000..8bf05f8 --- /dev/null +++ b/build/msvc6/UrQuanMasters.dsp @@ -0,0 +1,3786 @@ +# Microsoft Developer Studio Project File - Name="UrQuanMasters" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=UrQuanMasters - Win32 Debug NoAccel
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "UrQuanMasters.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "UrQuanMasters.mak" CFG="UrQuanMasters - Win32 Debug NoAccel"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "UrQuanMasters - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "UrQuanMasters - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "UrQuanMasters - Win32 Debug NoAccel" (based on "Win32 (x86) Console Application")
+!MESSAGE "UrQuanMasters - Win32 Release NoAccel" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "UrQuanMasters - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W2 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib SDL.lib SDLmain.lib SDL_image.lib zdll.lib ws2_32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"../../uqm.exe"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Stripping debug info...
+PostBuild_Cmds=rebase -b 0x400000 -x . "../../uqm.exe"
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "DEBUG_DCQ_THREADS" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /D "USE_PLATFORM_ACCEL" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo /o"UrQuanMasters.bsc"
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib SDL.lib SDLmain.lib SDL_image.lib zdll.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../uqmdebug.exe" /pdbtype:sept
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug NoAccel"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug_NoAccel"
+# PROP BASE Intermediate_Dir "Debug_NoAccel"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug_NoAccel"
+# PROP Intermediate_Dir "Debug_NoAccel"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /GX /Zi /Od /I "..\..\src" /I "..\..\src\regex" /D "DEBUG" /D "_DEBUG" /D "DEBUG_TRACK_SEM" /D "DEBUG_DCQ_THREADS" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FR /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo /o"UrQuanMasters.bsc"
+# ADD BSC32 /nologo /o"UrQuanMasters.bsc"
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib SDL.lib SDLmain.lib SDL_image.lib zdll.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../uqmdebug.exe" /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib SDL.lib SDLmain.lib SDL_image.lib zdll.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"msvcrt.lib" /out:"../../uqmdebug.exe" /pdbtype:sept
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Release NoAccel"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release_NoAccel"
+# PROP BASE Intermediate_Dir "Release_NoAccel"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release_NoAccel"
+# PROP Intermediate_Dir "Release_NoAccel"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W2 /GX /Zi /O2 /I "..\..\src" /I "..\..\src\regex" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "_MBCS" /D _VW=320 /D _VH=240 /D "HAVE_OPENGL" /D "GFXMODULE_SDL" /D "THREADLIB_SDL" /D "HAVE_OPENAL" /D "HAVE_ZIP" /D "HAVE_JOYSTICK" /D "NETPLAY" /D "ZLIB_DLL" /D "USE_INTERNAL_MIKMOD" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib SDL.lib SDLmain.lib SDL_image.lib zdll.lib ws2_32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"../../uqm.exe"
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib SDL.lib SDLmain.lib SDL_image.lib zdll.lib ws2_32.lib /nologo /subsystem:windows /pdb:none /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"../../uqm.exe"
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Stripping debug info...
+PostBuild_Cmds=rebase -b 0x400000 -x . "../../uqm.exe"
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "UrQuanMasters - Win32 Release"
+# Name "UrQuanMasters - Win32 Debug"
+# Name "UrQuanMasters - Win32 Debug NoAccel"
+# Name "UrQuanMasters - Win32 Release NoAccel"
+# Begin Group "Source Files"
+
+# PROP Default_Filter ""
+# Begin Group "getopt"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\getopt\getopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\getopt\getopt.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\getopt\getopt1.c
+# End Source File
+# End Group
+# Begin Group "regex"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\regex\regcomp.ci
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\regex\regex.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\regex\regex.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\regex\regex_internal.ci
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\regex\regex_internal.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\regex\regexec.ci
+# End Source File
+# End Group
+# Begin Group "libs"
+
+# PROP Default_Filter ""
+# Begin Group "callback"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback\alarm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback\alarm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback\async.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback\async.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback\callback.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback\callback.h
+# End Source File
+# End Group
+# Begin Group "decomp"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\decomp\lzdecode.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\decomp\lzencode.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\decomp\lzh.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\decomp\update.c
+# End Source File
+# End Group
+# Begin Group "file"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\file\dirs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\file\files.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\file\filintrn.h
+# End Source File
+# End Group
+# Begin Group "graphics"
+
+# PROP Default_Filter ""
+# Begin Group "sdl"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\2xscalers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\2xscalers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\2xscalers_3dnow.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\2xscalers_mmx.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\2xscalers_mmx.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\2xscalers_sse.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\biadv2x.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\bilinear2x.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\canvas.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\hq2x.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\nearest2x.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\opengl.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\opengl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\palette.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\palette.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\png2sdl.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\png2sdl.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\primitives.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\primitives.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\pure.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\pure.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\rotozoom.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\rotozoom.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\scaleint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\scalemmx.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\scalers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\scalers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdl1_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdl2_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdl2_pure.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdl_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdl_common.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdluio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\sdluio.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\sdl\triscan2x.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\bbox.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\bbox.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\boxint.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\clipline.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\cmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\cmap.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\context.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\context.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\dcqueue.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\dcqueue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\drawable.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\drawable.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\drawcmd.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\filegfx.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\font.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\font.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\frame.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\gfx_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\gfx_common.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\gfxintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\gfxload.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\intersec.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\loaddisp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\pixmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\prim.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\resgfx.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\tfb_draw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\tfb_draw.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\tfb_prim.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\tfb_prim.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\widgets.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\graphics\widgets.h
+# End Source File
+# End Group
+# Begin Group "heap"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\heap\heap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\heap\heap.h
+# End Source File
+# End Group
+# Begin Group "input"
+
+# PROP Default_Filter ""
+# Begin Group "sdl No. 1"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\input.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\input.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\keynames.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\keynames.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\vcontrol.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\vcontrol.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\sdl\vcontrol_malloc.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\inpintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\input_common.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\input\input_common.h
+# End Source File
+# End Group
+# Begin Group "list"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\list\list.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\list\list.h
+# End Source File
+# End Group
+# Begin Group "log"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\log\loginternal.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\log\msgbox.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\log\msgbox_win.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\log\uqmlog.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\log\uqmlog.h
+# End Source File
+# End Group
+# Begin Group "math"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\math\mthintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\math\random.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\math\random.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\math\random2.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\math\sqrt.c
+# End Source File
+# End Group
+# Begin Group "md5"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\md5\md5.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\md5\md5.h
+# End Source File
+# End Group
+# Begin Group "memory"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\memory\w_memlib.c
+# End Source File
+# End Group
+# Begin Group "resource"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\direct.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\filecntl.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\getres.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\index.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\loadres.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\propfile.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\propfile.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\resinit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\resintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\stringbank.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\resource\stringbank.h
+# End Source File
+# End Group
+# Begin Group "sound"
+
+# PROP Default_Filter ""
+# Begin Group "openal"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\openal\audiodrv_openal.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\openal\audiodrv_openal.h
+# End Source File
+# End Group
+# Begin Group "decoders"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\aiffaud.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\aiffaud.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\decoder.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\decoder.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\dukaud.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\dukaud.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\modaud.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\modaud.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\oggaud.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\oggaud.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\wav.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\decoders\wav.h
+# End Source File
+# End Group
+# Begin Group "mixer"
+
+# PROP Default_Filter ""
+# Begin Group "mixsdl"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\sdl\audiodrv_sdl.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\sdl\audiodrv_sdl.h
+# End Source File
+# End Group
+# Begin Group "nosound"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\nosound\audiodrv_nosound.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\nosound\audiodrv_nosound.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\mixer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\mixer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\mixer\mixerint.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\audiocore.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\audiocore.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\fileinst.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\music.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\resinst.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\sfx.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\sndintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\sound.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\sound.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\stream.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\stream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\trackint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\trackplayer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sound\trackplayer.h
+# End Source File
+# End Group
+# Begin Group "strings"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\strings\getstr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\strings\sfileins.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\strings\sresins.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\strings\strings.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\strings\strintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\strings\unicode.c
+# End Source File
+# End Group
+# Begin Group "video"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\dukvid.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\dukvid.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\legacyplayer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\vfileins.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\video.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\video.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\videodec.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\videodec.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\vidintrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\vidplayer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\vidplayer.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\video\vresins.c
+# End Source File
+# End Group
+# Begin Group "threads"
+
+# PROP Default_Filter ""
+# Begin Group "sdl No. 3"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\threads\sdl\sdlthreads.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\threads\sdl\sdlthreads.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\threads\thrcommon.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\threads\thrcommon.h
+# End Source File
+# End Group
+# Begin Group "time"
+
+# PROP Default_Filter ""
+# Begin Group "sdl No. 4"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\time\sdl\sdltime.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\time\sdl\sdltime.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\time\timecommon.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\time\timecommon.h
+# End Source File
+# End Group
+# Begin Group "task"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\task\tasklib.c
+# End Source File
+# End Group
+# Begin Group "uio"
+
+# PROP Default_Filter ""
+# Begin Group "stdio"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\stdio\stdio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\stdio\stdio.h
+# End Source File
+# End Group
+# Begin Group "zip"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\zip\zip.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\zip\zip.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\charhashtable.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\charhashtable.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\debug.c
+
+!IF "$(CFG)" == "UrQuanMasters - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug NoAccel"
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Release NoAccel"
+
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\debug.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\defaultfs.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\defaultfs.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\fileblock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\fileblock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\fstypes.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\fstypes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\getint.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\gphys.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\gphys.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\hashtable.c
+
+!IF "$(CFG)" == "UrQuanMasters - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug NoAccel"
+
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Release NoAccel"
+
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\hashtable.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\io.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\io.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\ioaux.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\ioaux.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\iointrn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\match.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\match.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\mem.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\memdebug.c
+
+!IF "$(CFG)" == "UrQuanMasters - Win32 Release"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Debug NoAccel"
+
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+
+!ELSEIF "$(CFG)" == "UrQuanMasters - Win32 Release NoAccel"
+
+# PROP BASE Exclude_From_Build 1
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\memdebug.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\mount.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\mount.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\mounttree.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\mounttree.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\paths.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\paths.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\physical.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\physical.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\uioport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\uiostream.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\uiostream.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\uioutils.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\uioutils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\utils.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio\utils.h
+# End Source File
+# End Group
+# Begin Group "mikmod"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\drv_nos.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\load_it.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\load_mod.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\load_s3m.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\load_stm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\load_xm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mdreg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mdriver.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mikmod.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mikmod_build.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mikmod_internals.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mloader.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mlreg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mlutil.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mmalloc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mmerror.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mmio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mplayer.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\munitrk.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\mwav.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\npertab.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\sloader.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\virtch.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\virtch2.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mikmod\virtch_common.c
+# End Source File
+# End Group
+# Begin Group "network"
+
+# PROP Default_Filter ""
+# Begin Group "connect"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\connect\connect.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\connect\connect.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\connect\listen.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\connect\listen.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\connect\resolve.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\connect\resolve.h
+# End Source File
+# End Group
+# Begin Group "netmanager"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\ndesc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\ndesc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\ndindex.ci
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\netmanager.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\netmanager_common.ci
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\netmanager_win.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netmanager\netmanager_win.h
+# End Source File
+# End Group
+# Begin Group "socket"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\socket\socket.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\socket\socket.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\socket\socket_win.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\socket\socket_win.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\bytesex.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netport.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\netport.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\network.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\network_win.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\network\wspiapiwrap.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\libs\alarm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\async.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\callback.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\compiler.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\declib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\file.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\gfxlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\heap.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\inplib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\list.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\log.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\mathlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\md5.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\memlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\misc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\net.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\platform.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\reslib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\sndlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\strlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\tasklib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\threadlib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\timelib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\uio.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\unicode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\libs\vidlib.h
+# End Source File
+# End Group
+# Begin Group "uqm"
+
+# PROP Default_Filter ""
+# Begin Group "comm"
+
+# PROP Default_Filter ""
+# Begin Group "arilou.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\arilou\arilouc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\arilou\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\arilou\strings.h
+# End Source File
+# End Group
+# Begin Group "blackur.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\blackur\blackurc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\blackur\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\blackur\strings.h
+# End Source File
+# End Group
+# Begin Group "chmmr.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\chmmr\chmmrc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\chmmr\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\chmmr\strings.h
+# End Source File
+# End Group
+# Begin Group "comandr.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\comandr\comandr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\comandr\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\comandr\strings.h
+# End Source File
+# End Group
+# Begin Group "druuge.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\druuge\druugec.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\druuge\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\druuge\strings.h
+# End Source File
+# End Group
+# Begin Group "ilwrath.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\ilwrath\ilwrathc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\ilwrath\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\ilwrath\strings.h
+# End Source File
+# End Group
+# Begin Group "melnorm.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\melnorm\melnorm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\melnorm\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\melnorm\strings.h
+# End Source File
+# End Group
+# Begin Group "mycon.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\mycon\myconc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\mycon\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\mycon\strings.h
+# End Source File
+# End Group
+# Begin Group "orz.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\orz\orzc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\orz\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\orz\strings.h
+# End Source File
+# End Group
+# Begin Group "pkunk.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\pkunk\pkunkc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\pkunk\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\pkunk\strings.h
+# End Source File
+# End Group
+# Begin Group "rebel.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\rebel\rebel.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\rebel\strings.h
+# End Source File
+# End Group
+# Begin Group "shofixt.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\shofixt\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\shofixt\shofixt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\shofixt\strings.h
+# End Source File
+# End Group
+# Begin Group "slyhome.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\slyhome\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\slyhome\slyhome.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\slyhome\strings.h
+# End Source File
+# End Group
+# Begin Group "slyland.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\slyland\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\slyland\slyland.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\slyland\strings.h
+# End Source File
+# End Group
+# Begin Group "spahome.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\spahome\spahome.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\spahome\strings.h
+# End Source File
+# End Group
+# Begin Group "spathi.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\spathi\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\spathi\spathic.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\spathi\strings.h
+# End Source File
+# End Group
+# Begin Group "starbas.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\starbas\starbas.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\starbas\strings.h
+# End Source File
+# End Group
+# Begin Group "supox.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\supox\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\supox\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\supox\supoxc.c
+# End Source File
+# End Group
+# Begin Group "syreen.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\syreen\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\syreen\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\syreen\syreenc.c
+# End Source File
+# End Group
+# Begin Group "talkpet.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\talkpet\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\talkpet\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\talkpet\talkpet.c
+# End Source File
+# End Group
+# Begin Group "thradd.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\thradd\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\thradd\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\thradd\thraddc.c
+# End Source File
+# End Group
+# Begin Group "umgah.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\umgah\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\umgah\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\umgah\umgahc.c
+# End Source File
+# End Group
+# Begin Group "urquan.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\urquan\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\urquan\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\urquan\urquanc.c
+# End Source File
+# End Group
+# Begin Group "utwig.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\utwig\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\utwig\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\utwig\utwigc.c
+# End Source File
+# End Group
+# Begin Group "vux.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\vux\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\vux\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\vux\vuxc.c
+# End Source File
+# End Group
+# Begin Group "yehat.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\yehat\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\yehat\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\yehat\yehatc.c
+# End Source File
+# End Group
+# Begin Group "zoqfot.comm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\zoqfot\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\zoqfot\strings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\zoqfot\zoqfotc.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm\commall.h
+# End Source File
+# End Group
+# Begin Group "planets"
+
+# PROP Default_Filter ""
+# Begin Group "generate"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genall.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genand.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genburv.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genchmmr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gencol.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gendefault.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gendefault.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gendru.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genilw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genmel.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genmyc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genorz.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genpet.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genpku.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genrain.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gensam.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genshof.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gensly.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gensol.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genspa.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gensup.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gensyr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genthrad.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\gentrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genutw.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genvault.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genvux.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genwreck.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genyeh.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genzfpscout.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate\genzoq.c
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\calc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\cargo.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\devices.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\elemdata.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\generate.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\gentopo.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\lander.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\lander.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\lifeform.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\orbits.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\oval.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\pl_stuff.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\plandata.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\planets.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\planets.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\plangen.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\pstarmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\report.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\roster.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\scan.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\scan.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\solarsys.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\solarsys.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\sundata.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\planets\surface.c
+# End Source File
+# End Group
+# Begin Group "ships"
+
+# PROP Default_Filter ""
+# Begin Group "androsyn"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\androsyn\androsyn.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\androsyn\androsyn.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\androsyn\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\androsyn\resinst.h
+# End Source File
+# End Group
+# Begin Group "arilou"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\arilou\arilou.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\arilou\arilou.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\arilou\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\arilou\resinst.h
+# End Source File
+# End Group
+# Begin Group "blackurq"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\blackurq\blackurq.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\blackurq\blackurq.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\blackurq\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\blackurq\resinst.h
+# End Source File
+# End Group
+# Begin Group "chenjesu"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chenjesu\chenjesu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chenjesu\chenjesu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chenjesu\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chenjesu\resinst.h
+# End Source File
+# End Group
+# Begin Group "chmmr"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chmmr\chmmr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chmmr\chmmr.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chmmr\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\chmmr\resinst.h
+# End Source File
+# End Group
+# Begin Group "druuge"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\druuge\druuge.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\druuge\druuge.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\druuge\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\druuge\resinst.h
+# End Source File
+# End Group
+# Begin Group "human"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\human\human.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\human\human.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\human\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\human\resinst.h
+# End Source File
+# End Group
+# Begin Group "ilwrath"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\ilwrath\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\ilwrath\ilwrath.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\ilwrath\ilwrath.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\ilwrath\resinst.h
+# End Source File
+# End Group
+# Begin Group "lastbat"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\lastbat\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\lastbat\lastbat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\lastbat\lastbat.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\lastbat\resinst.h
+# End Source File
+# End Group
+# Begin Group "melnorme"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\melnorme\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\melnorme\melnorme.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\melnorme\melnorme.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\melnorme\resinst.h
+# End Source File
+# End Group
+# Begin Group "mmrnmhrm"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mmrnmhrm\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mmrnmhrm\mmrnmhrm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mmrnmhrm\mmrnmhrm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mmrnmhrm\resinst.h
+# End Source File
+# End Group
+# Begin Group "mycon"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mycon\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mycon\mycon.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mycon\mycon.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\mycon\resinst.h
+# End Source File
+# End Group
+# Begin Group "orz"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\orz\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\orz\orz.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\orz\orz.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\orz\resinst.h
+# End Source File
+# End Group
+# Begin Group "pkunk"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\pkunk\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\pkunk\pkunk.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\pkunk\pkunk.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\pkunk\resinst.h
+# End Source File
+# End Group
+# Begin Group "probe"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\probe\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\probe\probe.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\probe\probe.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\probe\resinst.h
+# End Source File
+# End Group
+# Begin Group "shofixti"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\shofixti\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\shofixti\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\shofixti\shofixti.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\shofixti\shofixti.h
+# End Source File
+# End Group
+# Begin Group "sis_ship"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\sis_ship\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\sis_ship\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\sis_ship\sis_ship.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\sis_ship\sis_ship.h
+# End Source File
+# End Group
+# Begin Group "slylandr"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\slylandr\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\slylandr\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\slylandr\slylandr.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\slylandr\slylandr.h
+# End Source File
+# End Group
+# Begin Group "spathi"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\spathi\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\spathi\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\spathi\spathi.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\spathi\spathi.h
+# End Source File
+# End Group
+# Begin Group "supox"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\supox\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\supox\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\supox\supox.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\supox\supox.h
+# End Source File
+# End Group
+# Begin Group "syreen"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\syreen\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\syreen\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\syreen\syreen.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\syreen\syreen.h
+# End Source File
+# End Group
+# Begin Group "thradd"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\thradd\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\thradd\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\thradd\thradd.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\thradd\thradd.h
+# End Source File
+# End Group
+# Begin Group "umgah"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\umgah\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\umgah\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\umgah\umgah.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\umgah\umgah.h
+# End Source File
+# End Group
+# Begin Group "urquan"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\urquan\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\urquan\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\urquan\urquan.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\urquan\urquan.h
+# End Source File
+# End Group
+# Begin Group "utwig"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\utwig\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\utwig\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\utwig\utwig.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\utwig\utwig.h
+# End Source File
+# End Group
+# Begin Group "vux"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\vux\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\vux\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\vux\vux.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\vux\vux.h
+# End Source File
+# End Group
+# Begin Group "yehat"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\yehat\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\yehat\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\yehat\yehat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\yehat\yehat.h
+# End Source File
+# End Group
+# Begin Group "zoqfot"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\zoqfot\icode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\zoqfot\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\zoqfot\zoqfot.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\zoqfot\zoqfot.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ships\ship.h
+# End Source File
+# End Group
+# Begin Group "supermelee"
+
+# PROP Default_Filter ""
+# Begin Group "netplay"
+
+# PROP Default_Filter ""
+# Begin Group "proto"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\proto\npconfirm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\proto\npconfirm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\proto\ready.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\proto\ready.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\proto\reset.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\proto\reset.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\checkbuf.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\checkbuf.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\checksum.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\checksum.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\crc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\crc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\nc_connect.ci
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netconnection.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netconnection.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netinput.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netinput.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netmelee.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netmelee.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netmisc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netmisc.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netoptions.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netoptions.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netplay.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netrcv.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netrcv.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netsend.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netsend.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netstate.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\netstate.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\notify.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\notify.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\notifyall.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\notifyall.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packet.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packet.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packethandlers.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packethandlers.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packetq.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packetq.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packetsenders.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\netplay\packetsenders.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\buildpick.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\buildpick.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\loadmele.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\loadmele.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\melee.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\melee.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\meleesetup.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\meleesetup.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\pickmele.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\supermelee\pickmele.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\uqm\battle.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\battle.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\battlecontrols.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\battlecontrols.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\border.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\build.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\build.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\cleanup.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\clock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\clock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\cnctdlg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\cnctdlg.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\coderes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\collide.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\collide.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\colors.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\comm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\commanim.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\commanim.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\commglue.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\commglue.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\confirm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\cons_res.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\cons_res.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\controls.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\corecode.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\credits.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\credits.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\cyborg.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\demo.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\displist.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\displist.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\dummy.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\dummy.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\element.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\encount.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\encount.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\flash.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\flash.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\fmv.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\fmv.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\galaxy.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gameev.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gameev.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gameinp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gameopt.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gameopt.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gamestr.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gendef.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gendef.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\getchar.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\globdata.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\globdata.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\gravity.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\grpinfo.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\grpinfo.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\hyper.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\hyper.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ifontres.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\igfxres.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ikey_con.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\imusicre.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\init.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\init.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\intel.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\intel.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\intro.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ipdisp.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ipdisp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\isndres.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\istrtab.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\load.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\load.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\loadship.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\master.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\master.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\menu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\menustat.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\misc.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\nameref.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\oscill.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\oscill.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\outfit.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\pickship.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\pickship.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\plandata.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\process.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\process.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\races.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\resinst.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\restart.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\restart.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\restypes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\save.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\save.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\settings.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\settings.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\setup.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\setup.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\setupmenu.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\setupmenu.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ship.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\ship.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\shipcont.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\shipstat.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\shipyard.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\sis.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\sis.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\sounds.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\sounds.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\starbase.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\starbase.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\starcon.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\starcon.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\starmap.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\starmap.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\state.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\state.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\status.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\status.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\tactrans.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\tactrans.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\trans.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\units.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\uqmdebug.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\uqmdebug.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\util.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\velocity.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\velocity.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\weapon.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm\weapon.h
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\src\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\config_vc6.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\endian_uqm.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\options.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\options.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\port.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\port.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\types.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqm.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\uqmversion.h
+# End Source File
+# End Group
+# Begin Group "Doc"
+
+# PROP Default_Filter ""
+# Begin Group "Devel"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\doc\devel\aniformat
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\checklist
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\debug
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\dialogs
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\files
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\fontres
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\generate
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\gfxlib
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\gfxres
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\gfxversions
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\glossary
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\input
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\musicres
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\pkgformat
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\planetrender
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\planetrotate
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\plugins
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\resources
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\script
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\sfx
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\strtab
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\threads
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\devel\timing
+# End Source File
+# End Group
+# Begin Group "Users"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\doc\users\manual.txt
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\doc\users\unixinstall
+# End Source File
+# End Group
+# Begin Source File
+
+SOURCE=..\..\BUGS
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\ChangeLog
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\TODO
+# End Source File
+# End Group
+# Begin Group "Resources"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE="..\..\src\res\kohr-ah1.ico"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\res\sis1.ico
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\res\starcon2.ico
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\res\ur-quan-icon-alpha.ico"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\res\ur-quan-icon-std.ico"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\res\ur-quan1.ico"
+# End Source File
+# Begin Source File
+
+SOURCE="..\..\src\res\ur-quan2.ico"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\res\UrQuanMasters.rc
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/msvc6/UrQuanMasters.dsw b/build/msvc6/UrQuanMasters.dsw new file mode 100644 index 0000000..7d42e80 --- /dev/null +++ b/build/msvc6/UrQuanMasters.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "UrQuanMasters"=".\UrQuanMasters.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/build/unix/README b/build/unix/README new file mode 100644 index 0000000..0cad7d9 --- /dev/null +++ b/build/unix/README @@ -0,0 +1,5 @@ +This directory contains files used for building and installing +on unix-like environments. +There's no need to use any of those directly; type './build.sh' from +the top dir to get started. + diff --git a/build/unix/README.crossbuild b/build/unix/README.crossbuild new file mode 100644 index 0000000..3992087 --- /dev/null +++ b/build/unix/README.crossbuild @@ -0,0 +1,49 @@ +-= Instructions for cross-building UQM =- + + +Terminology: + Build system + The system on which the code is being built. + Host system + The system on which the code is supposed to run on. + + +Set the environment variable 'CROSS_ROOT' to the root of your cross building +environment. This is not necessary for the build scripts, but it will +simplify what you type in the following steps. + +Make sure your cross-building tools (gcc, ld, etc) are in the path. + export PATH=$CROSS_ROOT/bin:$PATH +Make sure that it isn't being reset by subshells that are started. + unset ENV BASH_ENV + +Set the environment variable 'BUILD_HOST' to the host system. +This is whatever 'uname -s' returns on such a system (like "MINGW32"). +When building for Windows CE, using the cegcc tools, you should use "cegcc". + +If your host system is big-endian, set the environment variable +'BUILD_HOST_ENDIAN' to "big". For a little-endian system, you don't +have to do anything. + export BUILD_HOST_ENDIAN=little + +If you're using pkg-config (advised), set the environment variable +PKG_CONFIG_PATH' to the pkgconfig directory of the cross environment. +This dir normally resides in the 'lib/' directory. + export PKG_CONFIG_PATH=$CROSS_ROOT/lib/pkgconfig + +For any libraries that can't be detected - which will be a lot if you +don't use pkg-config - set the corresponding include dirs in CFLAGS and +library dirs in LDFLAGS. + export CFLAGS="-I$CROSS_ROOT/include" + export LDFLAGS="-L$CROSS_ROOT/lib" + +Run configure: + ./build.sh uqm config +This will produce the file 'build.vars' and 'config_unix.h' (or config_win.h +on MinGW or Cygwin). If there are any problems during the build, you can +usually easilly solve them by editing these files manually. + +Start the compilation: + ./build.sh uqm + + diff --git a/build/unix/README.packages b/build/unix/README.packages new file mode 100644 index 0000000..68acfaf --- /dev/null +++ b/build/unix/README.packages @@ -0,0 +1,31 @@ +This file describes the easiest way to use this build system from +a packaging system such as rpm. + +If you want an interactive configuration, you can start the build process +like you would do manually: + ./build.sh uqm +to build the game, and + ./build.sh uqm install +to install it. + + +If you want the configuration to be non-interactive, you'll want to do +the following: execute + ./build.sh uqm config +once. This will generate a 'config.vars' file, which you can then +include in your package. Then when you want to build the game, put this +file the directory pointed to by $BUILD_WORK (default is the current +directory), and do + ./build.sh uqm reprocess_config +to generate all the configuration information for the build, and then + ./build.sh uqm +to build the game, and + ./build.sh uqm install +to install it. + +You may wish to set the environment variable BUILD_WORK to a directory +where the files created in the configuration and build process should be +stored. That way, the source tree will remain clean and no write access +to it is required. + + diff --git a/build/unix/ansi b/build/unix/ansi new file mode 100644 index 0000000..ac5b97f --- /dev/null +++ b/build/unix/ansi @@ -0,0 +1,21 @@ +ESC=`printf '\033'` +ANSI_BOLD="${ESC}[1m" +ANSI_NORMAL="${ESC}[0m" + +ANSI_BLK="${ESC}[30m" +ANSI_RED="${ESC}[31m" +ANSI_GRN="${ESC}[32m" +ANSI_YLW="${ESC}[33m" +ANSI_BLU="${ESC}[34m" +ANSI_MGN="${ESC}[35m" +ANSI_CYN="${ESC}[36m" +ANSI_WHT="${ESC}[37m" +ANSI_LBLK="${ESC}[1;30m" +ANSI_LRED="${ESC}[1;31m" +ANSI_LGRN="${ESC}[1;32m" +ANSI_LYLW="${ESC}[1;33m" +ANSI_LBLU="${ESC}[1;34m" +ANSI_LMGN="${ESC}[1;35m" +ANSI_LCYN="${ESC}[1;36m" +ANSI_LWHT="${ESC}[1;37m" + diff --git a/build/unix/build.config b/build/unix/build.config new file mode 100644 index 0000000..4b4ef3c --- /dev/null +++ b/build/unix/build.config @@ -0,0 +1,780 @@ +# This file is sourced by build.sh + +# Include build functions used here +. build/unix/config_functions +. build/unix/menu_functions +. build/unix/ansi + + +uqm_requirements() +{ + # Some requirements: + have_build_tools_language C || exit 1 + have_build_tools_language CXX || exit 1 + have_build_tool LINK || exit 1 + case "$HOST_SYSTEM" in + MINGW32*|cegcc) + have_build_tool WINDRES || exit 1 + ;; + Darwin) + have_build_tools_language OBJC || exit 1 + have_build_tool REZ || exit 1 + ;; + esac + + + # Define WORDS_BIGENDIAN on bigendian machines + check_endianness + + + # Libraries always used + have_library SDL 1.2.8 + have_library SDL2 + have_library SDL 1.2.8 || have_library SDL2 || exit 1 + use_library libpng || exit 1 + + case "$HOST_SYSTEM" in + WINSCW|ARMV5|GCCE) + # Symbian does not use dynamically generated config.h + return + ;; + esac + + # Add defines for HAVE_READDIR_R, HAVE_SETENV, HAVE_STRUPR, + # HAVE_STRCASECMP, and HAVE_STRICMP + define_have_symbol readdir_r + define_have_symbol setenv + define_have_symbol strupr + define_have_symbol strcasecmp + define_have_symbol stricmp + + # Check to see whether math functions are available for free. + define_have_symbol acos + + # Require either strcasecmp or stricmp. + if not have_symbol strcasecmp && not have_symbol stricmp; then + echo "Fatal: Your system defines neither strcasecmp() nor stricmp()." + exit 1 + fi + + # If we don't have math for free, add -lm to LDFLAGS. + if not have_symbol acos; then + LDFLAGS="$LDFLAGS -lm" + fi + + # Add defines for HAVE_ISWGRAPH, HAVE_WCHAR_T, and HAVE_WINT_T + define_have_symbol iswgraph + define_have_type wchar_t + define_have_type wint_t + + # Add defines for HAVE_GETOPT_LONG and HAVE_REGEX_H + define_have_symbol getopt_long + define_have_header regex.h + + # If we have the regex header, see if we need to link it specially + case "$HOST_SYSTEM" in + MINGW32*) + LDFLAGS="$LDFLAGS -lregex" + ;; + esac + + # Add define for HAVE__BOOL + define_have_type _Bool + + # Add an environment variable for MACRO_WIN32 and MACRO___MINGW32__ + define_have_macro WIN32 + define_have_macro __MINGW32__ + + if [ -n "$MACRO___MINGW32__" ]; then + USE_WINSOCK=1 + fi +} + +uqm_prepare_config() +{ + # Describe the menu: + MENU_main_ITEMS="debug graphics sound mikmod ovcodec netplay joystick \ + ioformat accel threadlib" + case "$HOST_SYSTEM" in + Darwin|WINSCW|ARMV5|GCCE) + # Installation directory not modifiable + ;; + MINGW32*|cegcc) + # No install procedure available for MinGW + ;; + *) + MENU_main_ITEMS="$MENU_main_ITEMS install_path" + ;; + esac + MENU_main_TITLE="Main menu" + MENU_main_ITEM_debug_TYPE=CHOICE + MENU_main_ITEM_graphics_TYPE=CHOICE + MENU_main_ITEM_sound_TYPE=CHOICE + MENU_main_ITEM_mikmod_TYPE=CHOICE + MENU_main_ITEM_ovcodec_TYPE=CHOICE + MENU_main_ITEM_netplay_TYPE=CHOICE + MENU_main_ITEM_joystick_TYPE=CHOICE + MENU_main_ITEM_ioformat_TYPE=CHOICE + MENU_main_ITEM_accel_TYPE=CHOICE + MENU_main_ITEM_threadlib_TYPE=CHOICE + MENU_main_ITEM_install_path_TYPE=MENU + + CHOICE_debug_OPTIONS="nodebug debug strictdebug" + CHOICE_debug_TITLE="Type of build" + CHOICE_debug_OPTION_nodebug_TITLE="Optimised release build" + CHOICE_debug_OPTION_nodebug_ACTION='nodebug_action' + nodebug_action() { + case "$HOST_SYSTEM" in + WINSCW) + CCOMMONFLAGS="$CCOMMONFLAGS -O2 -d NDEBUG" + ;; + ARMV5) + CCOMMONFLAGS="$CCOMMONFLAGS -O3 -Otime -DNDEBUG" + ;; + GCCE) + CCOMMONFLAGS="$CCOMMONFLAGS -O3 -DNDEBUG" + ;; + *) + CCOMMONFLAGS="$CCOMMONFLAGS -O3 -DNDEBUG" + ;; + esac + DEBUG=0 + } + CHOICE_debug_OPTION_debug_TITLE="Debugging build" + CHOICE_debug_OPTION_debug_ACTION='debug_action' + debug_action() { + case "$HOST_SYSTEM" in + WINSCW) + CCOMMONFLAGS="$CCOMMONFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" + ;; + ARMV5|GCCE) + CCOMMONFLAGS="$CCOMMONFLAGS -g -O0 -DDEBUG -D_DEBUG" + ;; + *) + CCOMMONFLAGS="$CCOMMONFLAGS -g -O0 -W -Wall -DDEBUG" + LDFLAGS="$LDFLAGS -O0" + ;; + esac + DEBUG=1 + } + CHOICE_debug_OPTION_strictdebug_TITLE="Debug + strict compile checks" + CHOICE_debug_OPTION_strictdebug_ACTION='strictdebug_action' + strictdebug_action() { + case "$HOST_SYSTEM" in + WINSCW) + CCOMMONFLAGS="$CCOMMONFLAGS -g -O0 -W all -d DEBUG -d _DEBUG" + ;; + ARMV5|GCCE) + CCOMMONFLAGS="$CCOMMONFLAGS -g -O0 -DDEBUG -D_DEBUG" + ;; + *) + CCOMMONFLAGS="$CCOMMONFLAGS -g -O0 -DDEBUG -W -Wall" +# CCOMMONFLAGS="$CCOMMONFLAGS -O1" + # This is needed for -Wunitialized with gcc 3.4 + CCOMMONFLAGS="$CCOMMONFLAGS -Wcast-qual -Wmissing-declarations \ + -Wwrite-strings -Wimplicit -Wreturn-type -Wformat \ + -Wswitch -Wcomment -Wchar-subscripts \ + -Wparentheses -Wcast-align -Wuninitialized" + CFLAGS="$CFLAGS -Wbad-function-cast -Wmissing-prototypes \ + -Wstrict-prototypes" + # CFLAGS is for flags not valid in C++. + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + # Until we abandon MSVC 6 +# CCOMMONFLAGS="$CCOMMONFLAGS -Waggregate-return" + # It's not unreasonable to return structs at times. +# CCOMMONFLAGS="$CCOMMONFLAGS "-Wpointer-arith" + # Some standard header won't even compile with this on +# CCOMMONFLAGS="$CCOMMONFLAGS -Wshadow" + # This gives absurd conflicts with standard files, + # like from 'y0 and y1' +# CCOMMONFLAGS="$CCOMMONFLAGS -Werror" + # We shouldn't do this until we actually nail them + # all in the original code. Then we can enforce them + # on ourselves. +# CCOMMONFLAGS="$CCOMMONFLAGS -pedantic-errors -ansi -trigraphs" # ANSI +# CCOMMONFLAGS="$CCOMMONFLAGS -Wnested-externs" + # We know they're in the code, and though we'd like to + # get rid of them, they're not bugs. +# CCOMMONFLAGS="$CCOMMONFLAGS -Winline" + # This gives too many warnings which we can do nothing + # about, obscuring legitimate warnings. + CFLAGS=`echo $CFLAGS` + CXXFLAGS=`echo $CXXFLAGS` + CCOMMONFLAGS=`echo $CCOMMONFLAGS` + # Remove all the unnecessary spaces from the flags vars + # for more readable messages. + LDFLAGS="$LDFLAGS -O0" + ;; + esac + DEBUG=1 + } + case "$HOST_SYSTEM" in + ARMV5|WINSCW|GCCE) + CHOICE_debug_DEFAULT=nodebug + ;; + *) + CHOICE_debug_DEFAULT=debug + ;; + esac + + + CHOICE_graphics_OPTIONS="pure opengl sdl2" + CHOICE_graphics_TITLE="Graphics Engine" + CHOICE_graphics_OPTION_pure_TITLE="SDL1 without OpenGL graphics support" + CHOICE_graphics_OPTION_pure_ACTION='graphics_pure_action' + CHOICE_graphics_OPTION_pure_PRECOND='have_library SDL 1.2.8' + graphics_pure_action() { + CFLAGS="$CFLAGS -DGFXMODULE_SDL -DSDL_DIR=SDL" + CCOMMONFLAGS="$CCOMMONFLAGS -DGFXMODULE_SDL" + GFXMODULE=sdl + HAVE_OPENGL=0 + use_library SDL 1.2.8 + } + CHOICE_graphics_OPTION_opengl_TITLE="SDL1 with OpenGL graphics support" + CHOICE_graphics_OPTION_opengl_ACTION='graphics_opengl_action' + CHOICE_graphics_OPTION_opengl_PRECOND="have_library SDL 1.2.8 && have_library opengl" + graphics_opengl_action() { + CFLAGS="$CFLAGS -DGFXMODULE_SDL -DHAVE_OPENGL -DSDL_DIR=SDL" + GFXMODULE=sdl + HAVE_OPENGL=1 + use_library SDL 1.2.8 && use_library opengl + } + CHOICE_graphics_OPTION_sdl2_TITLE="SDL2 with modern graphics support" + CHOICE_graphics_OPTION_sdl2_ACTION='graphics_sdl2_action' + CHOICE_graphics_OPTION_sdl2_PRECOND='have_library SDL2' + graphics_sdl2_action() { + CFLAGS="$CFLAGS -DGFXMODULE_SDL -DSDL_DIR=SDL2" + GFXMODULE=sdl + HAVE_OPENGL=0 + use_library SDL2 + } + if have_library SDL2; then + CHOICE_graphics_DEFAULT=sdl2 + elif have_library opengl; then + CHOICE_graphics_DEFAULT=opengl + else + CHOICE_graphics_DEFAULT=pure + fi + + CHOICE_sound_OPTIONS="mixsdl openal" + CHOICE_sound_TITLE="Sound backend" + CHOICE_sound_OPTION_mixsdl_TITLE="Use MixSDL for sound (internal)" + CHOICE_sound_OPTION_mixsdl_ACTION=sound_mixsdl_action + sound_mixsdl_action() { + SOUNDMODULE=mixsdl + } + CHOICE_sound_OPTION_openal_TITLE="Include OpenAL support (experimental)" + CHOICE_sound_OPTION_openal_PRECOND="have_library openal" + CHOICE_sound_OPTION_openal_ACTION=sound_openal_action + sound_openal_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DHAVE_OPENAL" + SOUNDMODULE=openal + use_library openal + } + CHOICE_sound_DEFAULT=mixsdl + + CHOICE_ovcodec_OPTIONS="standard tremor none" + CHOICE_ovcodec_TITLE="Ogg Vorbis codec" + CHOICE_ovcodec_OPTION_standard_TITLE="Xiph libogg + libvorbis" + CHOICE_ovcodec_OPTION_standard_PRECOND="have_library vorbisfile" + CHOICE_ovcodec_OPTION_standard_ACTION=ovcodec_standard_action + ovcodec_standard_action() { + use_library vorbisfile + OGGVORBIS=vorbisfile + } + CHOICE_ovcodec_OPTION_tremor_TITLE="Tremor (avoids floating point math)" + CHOICE_ovcodec_OPTION_tremor_PRECOND="have_library tremor" + CHOICE_ovcodec_OPTION_tremor_ACTION=ovcodec_tremor_action + ovcodec_tremor_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DOVCODEC_TREMOR" + OGGVORBIS=tremor + use_library tremor + } + CHOICE_ovcodec_OPTION_none_TITLE="No Ogg Vorbis support" + CHOICE_ovcodec_OPTION_none_ACTION=ovcodec_none_action + ovcodec_none_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DOVCODEC_NONE" + OGGVORBIS=none + } + CHOICE_ovcodec_DEFAULT=standard + + CHOICE_mikmod_OPTIONS="internal external" + CHOICE_mikmod_TITLE="Tracker music support" + CHOICE_mikmod_OPTION_internal_TITLE="Included libmikmod" + CHOICE_mikmod_OPTION_internal_ACTION=mikmod_internal_action + mikmod_internal_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DUSE_INTERNAL_MIKMOD" + USE_INTERNAL_MIKMOD=1 + } + CHOICE_mikmod_OPTION_external_TITLE="System libmikmod" + CHOICE_mikmod_OPTION_external_PRECOND="have_library libmikmod" + CHOICE_mikmod_OPTION_external_ACTION=mikmod_external_action + mikmod_external_action() { + USE_INTERNAL_MIKMOD="" + use_library libmikmod + } + CHOICE_mikmod_DEFAULT=internal + + CHOICE_joystick_OPTIONS="enabled disabled" + CHOICE_joystick_TITLE="Joystick support" + CHOICE_joystick_OPTION_enabled_TITLE="enabled" + #CHOICE_joystick_OPTION_enabled_PRECOND="have_symbol SDL_Joystick" + # TODO: Check whether SDL has joystick support. + CHOICE_joystick_OPTION_enabled_ACTION=joystick_enabled_action + joystick_enabled_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DHAVE_JOYSTICK" + } + CHOICE_joystick_OPTION_disabled_TITLE="disabled" + case "$HOST_SYSTEM" in + ARMV5|WINSCW|GCCE) + CHOICE_joystick_DEFAULT=disabled + ;; + *) + CHOICE_joystick_DEFAULT=enabled + ;; + esac + + + CHOICE_netplay_OPTIONS="none full ipv4" + CHOICE_netplay_TITLE="Network Supermelee support" + CHOICE_netplay_OPTION_none_TITLE="disabled" + CHOICE_netplay_OPTION_none_ACTION=netplay_none_action + netplay_none_action() { + NETPLAY="" + } + CHOICE_netplay_OPTION_full_TITLE="IPv4 and IPv6" + CHOICE_netplay_OPTION_full_PRECOND="have_library netlibs" + CHOICE_netplay_OPTION_full_ACTION=netplay_full_action + netplay_full_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DNETPLAY=NETPLAY_FULL" + if [ -n "$MACRO_WIN32" ]; then + LDFLAGS="$LDFLAGS -lws2_32" + fi + NETPLAY="FULL" + use_library netlibs + } + CHOICE_netplay_OPTION_ipv4_TITLE="IPv4; no IPv6" + CHOICE_netplay_OPTION_ipv4_PRECOND="have_library netlibs" + CHOICE_netplay_OPTION_ipv4_ACTION=netplay_ipv4_action + netplay_ipv4_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DNETPLAY=NETPLAY_IPV4" + NETPLAY="IPV4" + use_library netlibs + } + CHOICE_netplay_DEFAULT=full + + CHOICE_ioformat_OPTIONS="stdio stdio_zip" + CHOICE_ioformat_TITLE="Supported file i/o methods" + CHOICE_ioformat_OPTION_stdio_TITLE="Only direct file i/o" + CHOICE_ioformat_OPTION_stdio_zip_TITLE="Direct & .zip file i/o" + CHOICE_ioformat_OPTION_stdio_zip_PRECOND="have_library zlib" + CHOICE_ioformat_OPTION_stdio_zip_ACTION="ioformat_stdio_zip_action" + ioformat_stdio_zip_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DHAVE_ZIP=1" + USE_ZIP_IO=1 + use_library zlib + } + CHOICE_ioformat_DEFAULT=stdio_zip + + CHOICE_accel_OPTIONS="asm plainc" + CHOICE_accel_TITLE="Graphics/Sound optimizations" + CHOICE_accel_OPTION_asm_TITLE="Platform acceleration (asm, etc.)" + CHOICE_accel_OPTION_asm_ACTION="accel_asm_action" + accel_asm_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DUSE_PLATFORM_ACCEL" + USE_PLATFORM_ACCEL=1 + } + CHOICE_accel_OPTION_plainc_TITLE="Only plain C code" + CHOICE_accel_OPTION_plainc_ACTION="accel_plainc_action" + accel_plainc_action() { + USE_PLATFORM_ACCEL=0 + } + CHOICE_accel_DEFAULT=asm + + CHOICE_threadlib_OPTIONS="sdl pthread" + CHOICE_threadlib_TITLE="Thread library" + CHOICE_threadlib_OPTION_sdl_TITLE="SDL-controlled thread library" + CHOICE_threadlib_OPTION_sdl_ACTION="threadlib_sdl_action" + threadlib_sdl_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DTHREADLIB_SDL" + THREADLIB="SDL" + } + CHOICE_threadlib_OPTION_pthread_TITLE="Pthread thread library" + CHOICE_threadlib_OPTION_pthread_PRECOND="have_library pthread" + CHOICE_threadlib_OPTION_pthread_ACTION="threadlib_pthread_action" + threadlib_pthread_action() { + CCOMMONFLAGS="$CCOMMONFLAGS -DTHREADLIB_PTHREAD" + THREADLIB="PTHREAD" + use_library pthread + } + CHOICE_threadlib_DEFAULT=sdl + + MENU_install_path_ITEMS="install_prefix install_bindir install_libdir \ + install_sharedir" + MENU_install_path_TITLE="Installation paths" + MENU_install_path_ITEM_install_prefix_TYPE=INPUT + MENU_install_path_ITEM_install_bindir_TYPE=INPUT + MENU_install_path_ITEM_install_libdir_TYPE=INPUT + MENU_install_path_ITEM_install_sharedir_TYPE=INPUT + + INPUT_install_prefix_DEFAULT="/usr/local/games" + INPUT_install_prefix_TITLE="Installation prefix" + INPUT_install_prefix_VALIDATOR=validate_path + INPUT_install_prefix_ACTION='eval INSTALL_PREFIX=$MENU_install_prefix_VALUE' + + INPUT_install_bindir_DEFAULT='$prefix/bin' + INPUT_install_bindir_TITLE="Location for binaries" + INPUT_install_bindir_VALIDATOR=validate_path + + INPUT_install_libdir_DEFAULT='$prefix/lib' + INPUT_install_libdir_TITLE="Location for non-sharable data" + INPUT_install_libdir_VALIDATOR=validate_path + + INPUT_install_sharedir_DEFAULT='$prefix/share' + INPUT_install_sharedir_TITLE="Location for sharable data" + INPUT_install_sharedir_VALIDATOR=validate_path +} + +uqm_do_config() +{ + # Show the menu and let people set things + do_menu MENU main "$BUILD_WORK/config.state" + echo "Configuration complete." +} + +uqm_process_config() { + menu_process MENU main + + # Set INSTALL_LIBDIR, INSTALL_BINDIR, and INSTALL_SHAREDIR to the specified + # values, replacing '$prefix' to the prefix set. + local prefix + prefix="$INPUT_install_prefix_VALUE" + eval INSTALL_BINDIR="${INPUT_install_bindir_VALUE%/}/" + eval INSTALL_LIBDIR="${INPUT_install_libdir_VALUE%/}/" + eval INSTALL_SHAREDIR="${INPUT_install_sharedir_VALUE%/}/" + + # Set the content dir + CONTENTDIR="${INSTALL_SHAREDIR}uqm/content" + + CCOMMONFLAGS="$CCOMMONFLAGS -I\"$BUILD_WORK\"" + + # Set C++ only flags + # These allow use of C++ without the standard library + CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -nostdinc++" + + # At this point, all the compiler flags must be set. + CFLAGS="$CFLAGS $CCOMMONFLAGS" + CXXFLAGS="$CXXFLAGS $CCOMMONFLAGS" + CCOMMONFLAGS="" + + # Export the HAVE_ symbols to config_unix.h, using config_unix.h.in + # as template (or config_win.h/config_win.h.in). + SUBSTITUTE_VARS="$HAVE_SYMBOLS CONTENTDIR" + case "$HOST_SYSTEM" in + MINGW32*|CYGWIN*) + SUBSTITUTE_FILES="config_win.h" + ;; + *) + SUBSTITUTE_FILES="config_unix.h" + ;; + esac + substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES src "$BUILD_WORK" + + # Make build.vars from build.vars.in, substituting variables. + SUBSTITUTE_VARS="BUILD_SYSTEM HOST_SYSTEM CFLAGS CXXFLAGS LDFLAGS LINK \ + PREPROC_C MKDEP_C COMPILE_C \ + PREPROC_CXX MKDEP_CXX COMPILE_CXX \ + PREPROC_OBJC MKDEP_OBJC COMPILE_OBJC \ + MAKE ECHON SED DEBUG JOYSTICK NETPLAY \ + OGGVORBIS SOUNDMODULE USE_INTERNAL_MIKMOD \ + GFXMODULE HAVE_OPENGL \ + HAVE_GETOPT_LONG HAVE_REGEX_H_FLAG \ + USE_ZIP_IO USE_PLATFORM_ACCEL THREADLIB USE_WINSOCK \ + INSTALL_LIBDIR INSTALL_BINDIR INSTALL_SHAREDIR \ + REZ WINDRES $HAVE_SYMBOLS" + SUBSTITUTE_FILES="build.vars" + substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES . "$BUILD_WORK" + + # Make 'uqm' shell script from uqm-wrapper.in, substituting variables. + SUBSTITUTE_VARS="INSTALL_LIBDIR INSTALL_BINDIR INSTALL_SHAREDIR uqm_NAME" + SUBSTITUTE_FILES="uqm-wrapper" + substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES build/unix "$BUILD_WORK" +} + +uqm_load_config() +{ + do_menu_load MENU main "$BUILD_WORK/config.state" +} + +uqm_save_config() +{ + do_menu_save MENU main "$BUILD_WORK/config.state" +} + +uqm_pre_build() { + : # Nothing to do +} + +uqm_post_build() { + local TARGET_FILE + local RFORK + eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" + RFORK="src/res/darwin/${BUILD_PROJECT}.r" + + test -f "$TARGET_FILE" || return + + # If run from the command-line on OSX, the Window Manager + # will refuse to recognize the window unless the program has + # a resource fork; so we give it a small one here. When + # run from inside an application package, this step is useless + # (the cp command in the install step implicitly strips off + # the resource fork, in fact) + case "$HOST_SYSTEM" in + Darwin) + $REZ "$RFORK" -o "$TARGET_FILE" + ;; + ARMV5) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" + cd src/symbian + cmd \\/C bldmake bldfiles + cmd \\/C abld build armv5 urel + cd ../.. + ;; + WINSCW) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/" + cd src/symbian + cmd \\/C bldmake bldfiles + cmd \\/C abld build winscw udeb + cd ../.. + ;; + GCCE) + cp "$TARGET_FILE" "$BUILD_EPOCROOT/epoc32/release/armv5/urel/" + cd src/symbian + cmd \\/C bldmake bldfiles + cmd \\/C abld build gcce urel + cd ../.. + ;; + esac +} + +uqm_pre_install() { + : # Nothing to do +} + +uqm_install() { + case "$HOST_SYSTEM" in + Darwin) + uqm_install_osx + ;; + MINGW32*) + echo "No installation procedure available for MinGW." + echo "Read the manual for more information." + ;; + cegcc*) + echo "No installation procedure available for Windows CE." + echo "Read the manual for more information." + ;; + WINSCW) + uqm_install_winscw + ;; + ARMV5) + uqm_install_armv5 + ;; + GCCE) + uqm_install_gcce + ;; + *) + generic_install + ;; + esac +} + +uqm_post_install() { + : # Nothing to do +} + +uqm_install_osx() { + local VERSION HEADERS HEADER HEADER_FILE FRAMEWORK + + VERSION=`head -1 content/version` + + INSTROOT="$BUILD_WORK/The Ur-Quan Masters.app/Contents" + + # Make directory structure + echo "Creating directory structure..." >&2 + mkdirhier "$INSTROOT/MacOS" 0755 + mkdirhier "$INSTROOT/Frameworks" 0755 + mkdirhier "$INSTROOT/Resources/content/addons" 0755 + mkdirhier "$INSTROOT/Resources/content/packages" 0755 + + # Install misc. resources, icons, etc. + echo "Installing miscellaneous resources..." >&2 + $SED "s/@@VERSION@@/$VERSION/g" src/res/darwin/Info.plist > \ + "$INSTROOT/Info.plist" + cp src/res/darwin/PkgInfo "$INSTROOT" + cp "src/res/darwin/The Ur-Quan Masters.icns" "$INSTROOT/Resources" + + # Find Frameworks and copy them into the application. + echo "Copying dependancy Frameworks..." >&2 + HEADERS="Ogg/Ogg.h SDL/SDL.h SDL_image/SDL_image.h Vorbis/vorbisfile.h" + if [ "$uqm_SOUNDMODULE" = openal ]; then + HEADERS="$HEADERS OpenAL/al.h" + fi + for HEADER in $HEADERS; do + HEADER_FILE=`basename $HEADER` + eval FRAMEWORK=`echo '' | \ + $PREPROC_C -D__MACOSX__ -include $HEADER - | \ + awk '(/'$HEADER_FILE'/ && $2 == 1) { print $3; exit }' | \ + $SED 's/.Headers.*$/"/'` + cp -a "$FRAMEWORK" "$INSTROOT/Frameworks" + done + + # Install game content (it should probably make a zipfile) + echo "Creating base content package..." >&2 + cp content/version "$INSTROOT/Resources/content/" + (cd content && \ + find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path '*/addons*' -print | \ + $SED 's/^..//' | zip -X -q -n .ogg -8 -@ uqm-${VERSION}-prv-content.uqm) + mv content/uqm-$VERSION-prv-content.uqm "$INSTROOT/Resources/content/packages" + + echo "Creating voice content package..." >&2 + (cd content/addons && \ + find 3dovoice -type f -not -path '*/CVS*' -not -path '*/.svn*' -print | \ + zip -X -q -n .ogg -8 -@ ../uqm-${VERSION}-prv-voice.uqm) + mv content/uqm-$VERSION-prv-voice.uqm "$INSTROOT/Resources/content/addons" + + echo "Creating 3do music content package..." >&2 + (cd content/addons && \ + find 3domusic -type f -not -path '*/CVS*' -not -path '*/.svn*' -print | \ + zip -X -q -n .ogg -8 -@ ../uqm-${VERSION}-prv-3domusic.uqm) + mv content/uqm-$VERSION-prv-3domusic.uqm "$INSTROOT/Resources/content/addons" + + # Install game binary (and rename it) + echo "Installing executable..." >&2 + cp $uqm_NAME "$INSTROOT/MacOS/The Ur-Quan Masters" +} + +uqm_install_winscw() { + local PRIVATE_DIR + + PRIVATE_DIR="$BUILD_EPOCROOT/epoc32/winscw/c/private/A000A0C3" + + uqm_create_symbian_content_package + + echo "Creating directory structure to $PRIVATE_DIR ..." + mkdir "$PRIVATE_DIR" + mkdir "$PRIVATE_DIR/content" + mkdir "$PRIVATE_DIR/content/packages" + mkdir "$PRIVATE_DIR/userdata" + + echo "Copying data to $PRIVATE_DIR ..." + cp content/version "$PRIVATE_DIR/content" + cp content.uqm "$PRIVATE_DIR/content/packages" + cp src/symbian/uqm.cfg "$PRIVATE_DIR/userdata" +} + +uqm_install_armv5() { + uqm_create_symbian_content_package + + cd src/symbian + cmd \\/C makekeys -cert -expdays 9999 -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer + cmd \\/C makesis uqm-armv5.pkg uqm.sis + cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh + mv uqm.sisx ../.. + cd ../.. +} + +uqm_install_gcce() { + uqm_create_symbian_content_package + + cd src/symbian + cmd \\/C makekeys -cert -expdays 9999 -password asdfgh -len 2048 -dname "CN=UQM OR=Ur-Quan Masters CO=FI" uqm.key uqm.cer + cmd \\/C makesis uqm-gcce.pkg uqm.sis + cmd \\/C signsis -v uqm.sis uqm.sisx uqm.cer uqm.key asdfgh + mv uqm.sisx ../.. + cd ../.. +} + +uqm_create_symbian_content_package() { + if [ -e "content.uqm" ]; then + echo "Content package already exists, skipping" + return + fi + + local ANIFILE ANIFILES DNAME ESC_DNAME FONTDIR FONTDIRS FONTFILES + + echo "Building temporary content directory..." + cd content + find . -type f -not -path '*/CVS*' -not -path '*/.svn*' -not -path './addons*' -not -name "version" -not -name '*.png' -not -name '*.ani' -not -name '*.sml' -not -name '*.med' -not -name '*.mid' -not -name '*.big' >../content.lst + tar cf ../tmp1.tar -T ../content.lst + rm ../content.lst + mkdir ../tmpcontent + cd ../tmpcontent + tar xf ../tmp1.tar + rm ../tmp1.tar + cd ../content + + echo "Packing ani files..." + ANIFILES=`find . -regex ".*\(sml\|med\|mid\|big\|ani\)$"` + for ANIFILE in $ANIFILES; do + DNAME=`dirname $ANIFILE`/ + ESC_DNAME=`echo $DNAME|sed "s/\//\\\\\\\\\//g"` + mkdirhier ../tmpcontent/$DNAME 0755 + zip -q -j -0 ../tmpcontent/$ANIFILE $ANIFILE `cat $ANIFILE|cut -d " " -f 1|sed s/^/$ESC_DNAME/` + done + + echo "Packing font files..." + FONTDIRS=`find . -name '*.fon'` + for FONTDIR in $FONTDIRS; do + FONTFILES=`find $FONTDIR -name '*.png'|sort -t. +2.4 -n` + zip -q -j -0 ../tmpcontent/$FONTDIR $FONTFILES + done + + cd ../tmpcontent + echo "Building content package..." + zip -q -r ../content.uqm . + + cd .. + echo "Removing temporary content directory..." + rm -rf tmpcontent +} + +uqm_clean() { + case "$HOST_SYSTEM" in + MINGW32*|CYGWIN*) + rm -f "$BUILD_WORK/config_win.h" + ;; + ARMV5|GCCE) + local TARGET_FILE + eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" + + rm -f "$BUILD_WORK/config_unix.h" + rm -f "$BUILD_EPOCROOT/epoc32/release/armv5/urel/$TARGET_FILE" + rm -f $TARGET_FILE uqm.sisx content.uqm + + cd src/symbian + cmd \\/C abld reallyclean + cmd \\/C bldmake clean + rm -f uqm.sis uqm.key uqm.cer + cd ../.. + ;; + WINSCW) + local TARGET_FILE + eval TARGET_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}" + + rm -f "$BUILD_WORK/config_unix.h" + rm -f "$BUILD_EPOCROOT/epoc32/release/winscw/udeb/$TARGET_FILE" + rm -f $TARGET_FILE content.uqm + + cd src/symbian + cmd \\/C abld reallyclean + cmd \\/C bldmake clean + cd ../.. + ;; + *) + rm -f "$BUILD_WORK/config_unix.h" + ;; + esac +} + + diff --git a/build/unix/build.docs b/build/unix/build.docs new file mode 100644 index 0000000..d24620b --- /dev/null +++ b/build/unix/build.docs @@ -0,0 +1,205 @@ +I've made this build system as a replacement for autoconf, autoheader, +automake, and aclocal as I found them to be too limiting and too slow. +This build system is not as complete as the auto* tools, but it's very +easy to extend. + +Some of the most important differences between this system and autoconf: +- it has a menu-driven configuration +- when compiling, the current directory will never change +- the object files are stored in a seperate tree from the source files, + leaving the latter clean, and easier grep-able. +- multiple object trees can be used, so you can have for instance a + debugging tree and a release tree side by side. +- it builds faster, mostly because libtool isn't used. + + +The files +--------- + +These are the files in the directory with the build script. +Of these files only build.config should be modified for a specific build. +For unknown dependencies, additions to config_proginfo_build or +config_proginfo_host might need to be made. The other files should not +be modified. +Only build.sh is to be called directly. + +ansi ansi colour definitions. +build.config configuration options for the program to build. + It contains the description of the configuration + menu, and specifies the dependencies. + The format of the menu description is listed briefly + below. +build.sh the sh script that is to be called for configuration, + building, and installation. +build_functions auxiliary functions to build.sh for building. +config_functions auxiliary functions to build.sh for configuration. +config_proginfo_build contains descriptions of dependencies for the + system where the code is being built. + The information in this file is used in particular + for detecting if those libraries and other external + programs are present. +config_proginfo_host contains descriptions of dependencies for the + system where the software will eventually be run. + The information in this file is used in particular + for detecting if those libraries and other external + programs are present. +menu_functions auxiliary functions to build.sh for menus. + + +The menu (from build.config) +---------------------------- + +There are three types of menu items. + +- Type MENU + A menu with menu items. + - Variables: + - MENU_${NAME}_TITLE + The title of the menu. + - MENU_${NAME}_TEXT (optional) + The text to show with the menu. + - MENU_${NAME}_ITEMS + The names of the menu items (space-seperated). + - MENU_${NAME}_ITEM_${ITEMNAME}_TYPE + The type of a menu item. +- Type CHOICE: + A choice between several options. + - Variables: + - CHOICE_${NAME}_TITLE + The title of the choice menu. + - CHOICE_${NAME}_TEXT (optional) + The text to show with the choice menu. + - CHOICE_${NAME}_OPTIONS + The names of the options (space-seperated). + - CHOICE_${NAME}_OPTION_${OPTIONNAME}_TITLE + The title of a menu option. + - CHOICE_${NAME}_OPTION_${OPTIONNAME}_ACTION + A command to be evaluated if this option is used. + - CHOICE_${NAME}_OPTION_${OPTIONNAME}_VALID (set by the config program) + 0 if the choice has been verified to be a valid choice + 1 if the choice has been verified to be not a valid choice + <empty> if the choice hasn't been verified to be valid + - CHOICE_${NAME}_DEFAULT (optional) + The default choice. + - CHOICE_${NAME}_VALUE (set by the config program) + The current choice. +- Type INPUT: + A string that is user-definable. + - Variables: + - INPUT_${NAME}_TITLE + The title of the input field. + - INPUT_${NAME}_TEXT (optional) + The text to show with the input field. + - INPUT_${NAME}_VALIDATOR (optional) + A function to call after the user supplied a new value which + checks if the value is allowed. It should accept the new value as + an argument, and return 1 if the value is not allowed, or return 0 + and output the (possibly modified) value, to accept it. + - INPUT_${NAME}_DEFAULT (optional) + The default value. + - INPUT_${NAME}_VALUE (set by the config program) + The current value. + - INPUT_${NAME}_OLD_VALUE (set by the config program) + The value as it was at the start of the config program. +- Type CHECK: + An option that can either be on or off, like a checkbox. + - Variables: + - CHECK_${NAME}_TITLE + The title of the input field. + - CHECK_${NAME}_DEFAULT (optional) + The default value, either 'CHECKED' or 'UNCHECKED'. + - CHECK_${NAME}_VALUE (set by the config program) + The current value, either 'CHECKED' or 'UNCHECKED'. + - CHECK_${NAME}_FIXED (optional) + A string that evaluates to 0 if this checkbox may not be changed. + + + +Program info (from config_proginfo_build) +----------------------------------------- + +Information about programs used should be supplied in the following form: + - PROG_${PROGRAM}_NAME + A string describing the program. + - PROG_${PROGRAM}_FILE + A string that evaluates to the executable that should be present if + this program is used. + - PROG_${PROGRAM}_ACTION (optional) + A command to be executed if this program is used, after the user is + done configuring. + - PROG_${PROGRAM}_DETECT (optional) + A command to be executed which should return 0 if the program is present + on the system, 1 if it is not present, or 2 to fallback to the default + detection. If no detect function was set, or it returned 2, 'type' is + used to check for the program in the path. + This command may include a shell command that modifies any of the + variables PROG_${PROGRAM}_FILE, PROG_${PROGRAM}_ACTION, or + PROG_${PROGRAM}_VERSION. + - PROG_${LIB}_DEPEND_DETECT_BIN (optional) + A list of space-separated binaries the detection of this program + depends on. + - PROG_${LIB}_DEPEND_DETECT_LIB (optional) + A list of space-separated libraries the detection of this program + depends on. + - PROG_${PROGRAM}_VERSION (optional) + A string that evaluates to the version of the executable that is + present, if it is present. + - PROG_${PROGRAM}_PRESENT (set by the configuration program) + 0 if the program has been verified to be present + 1 if the program has been verified to be not present + <empty> if presence of the program hasn't been verified + +Information about build tools in general (say "a C compiler"), where you're +not interested in what program is actually called, should be supplied in +the following corm: + - BUILDTOOL_${TOOL}_NAME + A string describing the build tool. + - BUILDTOOL_${TOOL}_COMMAND + The command, with arguments, that is to be executed to run this tool. + - BUILDTOOL_${TOOL}_DEPEND + A whitespace separated list of programs (as described above) + that this tool depends on. + - BUILDTOOL_${TOOL}_PRESENT (set by the configuration program) + 0 if the tool has been verified to be present + 1 if the tool has been verified to be not present + <empty> if presence of the tool hasn't been verified +Each tool described, once detected, will be available through the environment +variable with the name as specified in $TOOL. + + +Library info (from config_proginfo_host) +----------------------------------------- + +Information about libraries used should be supplied in the following form: + - LIB_${LIB}_NAME + A string describing the program. + - LIB_${LIB}_CFLAGS + A string which evaluates to the string to add to CFLAGS if this library + is used. + - LIB_${LIB}_LDLAGS + A string which evaluates to the string to add to LDLAGS if this library + is used. + - PROG_${LIB}_DETECT (optional) + A command to be executed which should return 0 if the library is present + on the system, 1 if it is not present, or 2 to fallback to the default + detection. If no detect function was set, or it returned 2, + an attempt is made to compile and link an empty C program with + the flags as in LIB_${LIB}_CFLAGS and LIB_${LIB}_LDFLAGS. + This command may include a shell command that modifies any of the + variables PROG_${LIB}_CFLAGS, PROG_${LIB}_LDFLAGS, or + PROG_${LIB}_VERSION. + - LIB_${LIB}_DEPEND_DETECT_BIN (optional) + A list of space-separated binaries the detection of this library depends + on. + - LIB_${LIB}_DEPEND_DETECT_LIB (optional) + A list of space-separated libraries the detection of this library depends + on. + - LIB_${LIB}_VERSION (optional) + A string that evaluates to the version of the library that is + present, if it is present. + - LIB_${LIB}_PRESENT (set by the configuration program) + 0 if the library has been verified to be present + 1 if the library has been verified to be not present + <empty> if presence of the library hasn't been verified + + diff --git a/build/unix/build.sh b/build/unix/build.sh new file mode 100644 index 0000000..002ce6a --- /dev/null +++ b/build/unix/build.sh @@ -0,0 +1,143 @@ +#!/bin/sh +# Build script +# Copyright (c) 2002 Serge van den Boom +# +# 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 + +# This file contains functions for the general building procedure. +# You shouldn't need to change this file if your project changes. + +# Read in the functions we need +. build/unix/build_functions + +if [ -z "$BUILD_WORK" ]; then + BUILD_WORK=. + export BUILD_WORK +fi + +# Read in the config settings that affect the build, if present. +# Don't reread for every dir when recursing. +if [ -r "$BUILD_WORK/build.vars" ]; then + . "$BUILD_WORK/build.vars" +fi + +# Read in the Makeproject file +. ./Makeproject + +for VAR in TARGETS "$BUILD_PROJECT_NAME" "$BUILD_PROJECT_OBJS"; do + eval VALUE="\$$VAR" + if [ -z "$VALUE" ]; then + echo "$VAR needs to be defined in the top Makeproject file" + exit 1 + fi +done + +############################################## +### Everything below is parsing user input ### + +TOPDIR="$PWD" +export TOPDIR + +if [ $# -lt 1 ]; then + usage 1>&2 + exit 1; +fi + +# Load the configuration functions +. build/unix/build.config + +BUILD_THREADS="" +for i in "$@"; do + shift + if [ "`printf "%s" "$i" | cut -c1-2`" = "-j" ]; then + num="`printf "%s" "$i" | cut -c3-`" + if [ -z "$num" ] || [ "$num" -gt 0 ] 2>/dev/null; then + BUILD_THREADS="-j$num" + else + usage 1>&2 + exit 1 + fi + else + set -- "$@" "$i" + fi +done + +case "$1" in + cleanall) + build_cleanall + exit $? + ;; + distclean) + build_distclean + exit $? + ;; +esac + +unset TARGET +for TEMP in $TARGETS; do + if [ "$1" = "$TEMP" ]; then + TARGET="$1" + break + fi +done +if [ -z "$TARGET" ]; then + echo "Invalid target; choose one from:" + echo " $TARGETS" + exit 1 +fi +BUILD_PROJECT="$TARGET" +export TARGET BUILD_PROJECT ECHON +export PREPROC_C MKDEP_C COMPILE_C PREPROC_CXX MKDEP_CXX COMPILE_CXX PREPROC_OBJC MKDEP_OBJC COMPILE_OBJC WINDRES LINK +export "${BUILD_PROJECT}_CFLAGS" "${BUILD_PROJECT}_CXXFLAGS" "${BUILD_PROJECT}_LDFLAGS" + +# Add trailing / from objs dir +eval ${BUILD_PROJECT}_OBJS=\${${BUILD_PROJECT}_OBJS%/}/ +export "${BUILD_PROJECT}_OBJS" + +if [ $# -lt 2 ]; then + build_check_config + build_check_dependencies + build_compile $BUILD_THREADS + exit $? +fi + +case "$2" in + clean) + build_clean + ;; + config) + build_config + build_process_config + ;; + reprocess_config) + build_reconfig + ;; + depend) + build_check_config + build_depend + ;; + install) + build_check_config + build_check_dependencies + build_check_compile $BUILD_THREADS + build_install + ;; + *) + usage 1>&2 + exit 1; + ;; +esac + + diff --git a/build/unix/build_clean b/build/unix/build_clean new file mode 100644 index 0000000..ffc7440 --- /dev/null +++ b/build/unix/build_clean @@ -0,0 +1,29 @@ +#!/bin/sh + +# Find all the .c, .cpp, .m, and .rc files which are relevant for the project, +# and remove their respective object files in the work directory. + +# Expected to be passed from the environment: +# BUILD_PROJECT - the name of the project +# BUILD_ROOT - The root of the source files. +# BUILD_WORK - The root of the work directory. + +BUILD_ROOT=${BUILD_ROOT%/}/ +BUILD_WORK=${BUILD_WORK%/}/ +eval OBJDIR=\"${BUILD_WORK}\${${BUILD_PROJECT}_OBJS}\" + +. "${BUILD_ROOT}Makeproject" + +build/unix/recurse "$BUILD_PROJECT" "$BUILD_ROOT" | \ + while read TYPE FILE; do + case "$TYPE" in + C|CXX|M|RC) + rm -f -- "${OBJDIR}${REC_PREFIX}$FILE.d" \ + "${OBJDIR}${FILE}.o" + ;; + DIROUT) + rmdir -- "${OBJDIR}${FILE}" 2> /dev/null + ;; + esac +done + diff --git a/build/unix/build_collect b/build/unix/build_collect new file mode 100644 index 0000000..7a5dcb9 --- /dev/null +++ b/build/unix/build_collect @@ -0,0 +1,26 @@ +#!/bin/sh + +# Find all the .c, .cpp, .m, and .rc files which are relevant for the project, +# and map them to the work directory. + +# Expected to be passed from the environment: +# BUILD_PROJECT - the name of the project +# BUILD_ROOT - The root of the source files. +# BUILD_WORK - The root of the work directory. + +BUILD_ROOT=${BUILD_ROOT%/}/ +BUILD_WORK=${BUILD_WORK%/}/ +eval OBJDIR=\"${BUILD_WORK}\${${BUILD_PROJECT}_OBJS}\" + +. "${BUILD_ROOT}Makeproject" +. "${BUILD_WORK}build.vars" + +build/unix/recurse "$BUILD_PROJECT" "$BUILD_ROOT" | \ + while read TYPE FILE; do + case "$TYPE" in + C|CXX|M|RC) + echo "$OBJDIR$FILE" + ;; + esac +done + diff --git a/build/unix/build_functions b/build/unix/build_functions new file mode 100644 index 0000000..5f5d20b --- /dev/null +++ b/build/unix/build_functions @@ -0,0 +1,311 @@ +# Auxiliary functions for build.sh +# Copyright (c) 2002 Serge van den Boom +# +# 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 + +DEPEND_NAME=make.depend + +# Show usage information +usage() { + echo "Main build script" + echo + echo "Syntax:" + echo " ./build.sh [-j[#JOBS]] <target>" + echo " ./build.sh <target> config" + echo " ./build.sh <target> depend" + echo " ./build.sh <target> clean" + echo " ./build.sh [-j[#JOBS]] <target> install" + echo " ./build.sh cleanall" + echo " ./build.sh distclean" + echo + echo "Valid targets:" + for TARGET in $TARGETS; do + echo " $TARGET" + done + echo +} + +escape_string() { + $SED -e s,[\\\'\"\`\ \ \$\&\\\*\\\?\#\!],\\\\\&,g << EOF +$1 +EOF +} + +# Start the configure program. +# $1 = target +build_config() { + set_system + prepare_build_system + config_requirements + prepare_host_system + if [ "$BUILD_SYSTEM" '!=' "$HOST_SYSTEM" ]; then + build_message "Cross-compiling to $HOST_SYSTEM." + fi + eval "${TARGET}_requirements" + eval "${TARGET}_prepare_config" + eval "${TARGET}_load_config" + eval "${TARGET}_do_config" + eval "${TARGET}_save_config" +} + +build_reconfig() { + if [ ! -e "$BUILD_WORK/config.state" ]; then + echo "*** Warning: file 'config.state' not found - using defaults." + fi + + prepare_build_system + config_requirements + prepare_host_system + if [ "$BUILD_SYSTEM" '!=' "$HOST_SYSTEM" ]; then + build_message "Cross-compiling to $HOST_SYSTEM." + fi + eval "${TARGET}_requirements" + eval "${TARGET}_prepare_config" + eval "${TARGET}_load_config" + build_process_config + + echo "Reconfiguring complete..." >&2 +} + +# Process the configuration information +build_process_config() { + eval "${TARGET}_process_config" +} + +# Recursively build dependency index +build_depend() { + local DEPEND_FILE EXTRA_OFILES + + echo "Building file dependency index..." >&2 + + eval mkdir -p "\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}" + eval DEPEND_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}\$DEPEND_NAME" + + # Remove the old dependency file, if it exists. + # The .tmp file is used to detect interrupted dependency builds. + rm -f -- "$DEPEND_FILE".tmp "$DEPEND_FILE" + + BUILD_ROOT=./ $SH ./build/unix/build_collect > "$DEPEND_FILE".tmp + mv -f -- "$DEPEND_FILE".tmp "$DEPEND_FILE" +} + +# Compile the lot. +# With the depend info set up, we can leave everything to make. +# $1 - additional arguments to pass to make (at the moment just +# an optional -j arg for parallel builds). +build_compile() { + local CFLAGS CXXFLAGS LDFLAGS TARGET_FILE DEPEND_FILE OBJDIR + + eval CFLAGS="\${${BUILD_PROJECT}_CFLAGS}" + eval CXXFLAGS="\${${BUILD_PROJECT}_CXXFLAGS}" + eval LDFLAGS="\${${BUILD_PROJECT}_LDFLAGS}" + eval OBJDIR=\""\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}"\" + eval TARGET_FILE=\""\$BUILD_WORK/\${${BUILD_PROJECT}_NAME}"\" + DEPEND_FILE=$OBJDIR$DEPEND_NAME + + eval "${TARGET}_pre_build" + + CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS \ + OBJDIR=$OBJDIR \ + BUILD_ROOT= \ + TARGET_FILE=$TARGET_FILE DEPEND_FILE=$DEPEND_FILE \ + SED=$SED \ + $MAKE $1 -f Makefile.build "$TARGET_FILE" + + eval "${TARGET}_post_build" +} + +build_clean() { + local DEPEND_FILE + + BUILD_ROOT=./ $SH ./build/unix/build_clean + + eval DEPEND_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}${DEPEND_NAME}" + rm -f "$DEPEND_FILE" "$BUILD_WORK/build.vars" \ + "$BUILD_WORK/uqm-wrapper" \ + "$BUILD_WORK/config.state" + eval "${TARGET}_clean" +} + +build_cleanall() { + export BUILD_PROJECT + for TARGET in $TARGETS; do + BUILD_PROJECT="$TARGET" + build_clean + done + BUILD_PROJECT="" +} + +build_distclean() { + build_cleanall +} + + +# Description: check if the config files are present and load them. +# If they're not present, remake them. +build_check_config() { + if [ ! -e "$BUILD_WORK/build.vars" ]; then + build_config || exit $? + build_process_config + fi + . "$BUILD_WORK/build.vars" + . "${BUILD_REC_PATH:=./}Makeproject" +} + +# Description: check if the necessary depend file is present, +# if not, build it. +build_check_dependencies() { + eval DEPEND_FILE="\$BUILD_WORK/\${${BUILD_PROJECT}_OBJS}${DEPEND_NAME}" + [ ! -e "$DEPEND_FILE" -o -n "$BUILD_RUN_DEPEND" ] || return + + build_depend || exit $? +} + +# Description: check if the program is compiled, and otherwise compile +# $1 - additional arguments to pass to make (at the moment just +# an optional -j arg for parallel builds). +build_check_compile() { + local NAME + eval NAME="\${${BUILD_PROJECT}_NAME}" + [ ! -e "$NAME" ] || return + + build_compile "$1" || exit $? +} + +# Make a directory path, with mode and owner specified. +# $1 - name of directory path +# $2 - mode of the directories (may be empty) +# $3 - owner of the directories (may be empty) +mkdirhier() { + local REST DIR MODE OWNER + REST="$1" + MODE="$2" + OWNER="$3" + case "$REST" in + /*) + REST="${REST%/}" + DIR="/" + ;; + *) + DIR="" + ;; + esac + case "$REST" in + */) + ;; + *) + REST="${REST}/" + ;; + esac + while [ -n "$REST" ]; do + DIR="$DIR${REST%%/*}" + REST="${REST#*/}" + if [ ! -d "$DIR" ]; then + mkdir "$DIR" + [ -n "$MODE" ] && chmod "$MODE" "$DIR" + [ -n "$OWNER" ] && chown "$OWNER" "$DIR" + fi + DIR="${DIR}/" + done +} + +# Install a file or directory +# $1 - Source file/directory +# $2 - Destination directory/file +# $3 - Mode of destination file/directory +# $4 - Owner of destination file/directory +installsome() { + local SRC DEST MODE OWNDER DESTDIR SRCNAME + SRC="$1" + DEST="$2" + MODE="$3" + OWNDER="$4" + + DESTDIR="${DEST%/*}" + if [ ! -d "$DESTDIR" ]; then + mkdirhier "$DESTDIR" 0755 + fi + SRCNAME="${SRC##*/}" + cp -pr -- "$SRC" "$DEST" + if [ -n "$MODE" ]; then + if [ -d "$DEST" ]; then + chmod -R "$MODE" "${DEST}${SRCNAME}" + else + chmod "$MODE" "$DEST" + fi + fi + if [ -n "$OWNER" ]; then + if [ -d "$DEST" ]; then + chown -R "$OWNER" "${DEST}${SRCNAME}" + else + chown "$OWNER" "$DEST" + fi + fi +} + +# Install the program +build_install() { + eval "${TARGET}_install" +} + +# Generic installation routine +generic_install() { + local SRC DEST MODE OWNER + + eval "${TARGET}_pre_install" + + local LIB LIBS LIBDIR + echo "Installing system-dependent data..." >&2 + eval LIBS="\${${BUILD_PROJECT}_INSTALL_LIBS}" + eval LIBDIR="\${${BUILD_PROJECT}_INSTALL_LIBDIR%/}/" + mkdirhier "$LIBDIR" 0755 + for LIB in $LIBS; do + eval SRC="\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_SRC%/}" + eval DEST="\$LIBDIR\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_DEST}" + eval MODE="\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_MODE}" + eval OWNER="\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_OWNER}" + installsome "$SRC" "$DEST" "$MODE" "$OWNER" + done + + local SHARE SHARED SHAREDIR + echo "Installing system-independent data..." >&2 + eval SHARED="\${${BUILD_PROJECT}_INSTALL_SHARED}" + eval SHAREDIR="\${${BUILD_PROJECT}_INSTALL_SHAREDIR%/}/" + mkdirhier "$SHAREDIR" 0755 + for SHARE in $SHARED; do + eval SRC="\${${BUILD_PROJECT}_INSTALL_SHARED_${SHARE}_SRC%/}" + eval DEST="\$SHAREDIR\${${BUILD_PROJECT}_INSTALL_SHARED_${SHARE}_DEST}" + eval MODE="\${${BUILD_PROJECT}_INSTALL_SHARED_${SHARE}_MODE}" + eval OWNER="\${${BUILD_PROJECT}_INSTALL_SHARED_${SHARE}_OWNER}" + installsome "$SRC" "$DEST" "$MODE" "$OWNER" + done + + local BINS BINDIR + echo "Installing binaries..." >&2 + eval BINS="\${${BUILD_PROJECT}_INSTALL_BINS}" + eval BINDIR="\${${BUILD_PROJECT}_INSTALL_BINDIR%/}/" + mkdirhier "$BINDIR" 0755 + for BIN in $BINS; do + eval SRC="\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_SRC%/}" + eval DEST="\$BINDIR\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_DEST}" + eval MODE="\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_MODE}" + eval OWNER="\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_OWNER}" + installsome "$SRC" "$DEST" "$MODE" "$OWNER" + done + + eval "${TARGET}_post_install" +} + + diff --git a/build/unix/config_functions b/build/unix/config_functions new file mode 100644 index 0000000..23adc2d --- /dev/null +++ b/build/unix/config_functions @@ -0,0 +1,1139 @@ +# Auxiliary functions for custom build system +# Copyright (c) 2002 Serge van den Boom +# +# 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 + +BUILDLOG=/dev/null +TEMPFILE="/tmp/build.$$.tmp" +#KEEPTEMPFILES=keeptempfiles + + +# Description: perform a command, and set the exit status to the opposite. +# (true +# Arguments: $1 - the command to run +# rest - arguments to the command +not() { + local CMD + CMD=$1 + shift + "$CMD" "$@" + return "$(($? == 0))" +} + +# Description: prints a command to stdout and then executes it +# Arguments: command with arguments +# Returns: the return value of the command +echo_and_perform() { + cat << EOF +$@ +EOF + "$@" +} + +# Description: Get the contents of a variable with a specific name, +# but don't expand it. (evalVar does expand it) +# Use this instead of 'eval', so that you won't have to +# worry about escaping. +# NB. this function only works on global variables. +# Arguments: $1 - the name of the variable +# Returns: 0 +# Prints: the value of the variable +getVar() { + local RESULT + eval RESULT=\$$1 + cat << EOF +$RESULT +EOF +} + +# Description: Get the contents of a variable with a specific name, +# and expand it. (getVar doesn't expand it) +# Use this instead of 'eval', so that you won't have to +# worry about escaping. +# NB. this function only works on global variables. +# Arguments: $1 - the name of the variable +# Returns: 0 +# Prints: the value of the variable +evalVar() { + local RESULT + eval RESULT=\$$1 + eval RESULT=\""$RESULT"\" + cat << EOF +$RESULT +EOF +} + +# Description: Set the value of a variable with a specific name, +# and expand it. +# Use this instead of 'eval', so that you won't have to +# worry about escaping. +# NB. this function only works on global variables. +# Arguments: $1 - the name of the variable +# $2 - the value to assign to it (will not be expanded) +setVar() { + eval $1=\$2 +} + +# Description: delete the files passed as arguments, unless +# $KEEPTEMPFILES is set. +deleteTempFiles() { + if [ -n "$KEEPTEMPFILES" ]; then + return + fi + + rm -f -- "$@" +} + +# Description: read text from stdin to use as a c file to compile +# Arguments: $1 - CFLAGS to use for compilation (optional) +# $2 - LDFLAGS to use for linking (optional) +# Returns: 0 - if compile successful +# something else - if compile failed +try_compile_c() { + local SYSTEM_FLAGS RESULT + + if [ -z "$COMPILE_C" ]; then + echo "Fatal: Program \$COMPILE_C is not defined!" >&2 + exit 1 + fi + + SYSTEM_FLAGS="$SYSTEM_BUILD_CFLAGS $SYSTEM_BUILD_LDFLAGS $SYSTEM_HOST_CFLAGS $SYSTEM_HOST_LDFLAGS" + cat > "$TEMPFILE.c" + + echo_and_perform $COMPILE_C $SYSTEM_FLAGS $1 "$TEMPFILE.c" \ + -o "$TEMPFILE.c.o" >> "$BUILDLOG" 2>&1 + RESULT=$? + + if [ $RESULT -eq 0 ]; then + echo_and_perform $LINK $SYSTEM_FLAGS $2 "$TEMPFILE.c.o" \ + -o "$TEMPFILE.out" >> "$BUILDLOG" 2>&1 + RESULT=$? + fi + + if [ $RESULT -ne 0 ]; then + echo "Failed program was:" >> "$BUILDLOG" + echo "+++ START $TEMPFILE.c" >> "$BUILDLOG" + cat "$TEMPFILE.c" >> "$BUILDLOG" + echo "+++ END $TEMPFILE.c" >> "$BUILDLOG" + fi + + deleteTempFiles "$TEMPFILE.c $TEMPFILE.c.o $TEMPFILE.out" + + echo >> "$BUILDLOG" + return $RESULT +} + +# Description: read text from stdin to use as a c file to compile +# Arguments: $1 - CFLAGS to use for compilation (optional) +# $2 - LDFLAGS to use for linking (optional) +# Returns: 128 - if compiling or linking failed +# otherwise - exit status of the program +try_compile_and_run_c() { + local SYSTEM_FLAGS RESULT + + if [ -z "$COMPILE_C" ]; then + echo "Fatal: Program \$COMPILE_C is not defined!" >&2 + exit 1 + fi + + SYSTEM_FLAGS="$SYSTEM_BUILD_CFLAGS $SYSTEM_BUILD_LDFLAGS $SYSTEM_HOST_CFLAGS $SYSTEM_HOST_LDFLAGS" + cat > "$TEMPFILE.c" + + echo_and_perform $COMPILE_C $SYSTEM_FLAGS $1 "$TEMPFILE.c" \ + -o "$TEMPFILE.c.o" >> "$BUILDLOG" 2>&1 + RESULT=$? + + if [ $RESULT -eq 0 ]; then + echo_and_perform $LINK $SYSTEM_FLAGS $2 "$TEMPFILE.c.o" \ + -o "$TEMPFILE.out" >> "$BUILDLOG" 2>&1 + RESULT=$? + fi + + if [ $RESULT -eq 0 ]; then + "$TEMPFILE.out" + RESULT=$? + fi + + deleteTempFiles "$TEMPFILE.c $TEMPFILE.c.o $TEMPFILE.out" + + echo >> "$BUILDLOG" + return $RESULT +} + +# Description: Output a message to stderr, unless BUILD_SILENT is set +# Arguments: the message +build_message() { + if [ -z "$BUILD_SILENT" ]; then + cat >&2 << EOF +$@ +EOF + fi +} + +# Description: check if a string is lexicographically before +# another string +# Arguments: $1 - the first string +# $2 - the second string +# Returns: 0 if $1 is lexicographically before $2 +# 1 otherwise +lexlt() { + # The 'test' builtin in some sh shells can't do this. + # To execute the non-builtin 'test' you need the path, and + # that differs per system (/bin/test or /usr/bin/test). + # It says '>=' instead of '<' because expr prints '1' for true, + # and sh uses 0. + return `expr "$1" ">=" "$2"` +} + +# Description: Check if one version is sufficiently new. +# Arguments: $1 - the required version +# $2 - the available version +# Returns: 0 - if $2 is at least as new as $1 +# 1 - if $2 is older than $1, or the two strings don't compare +version_match() { + # To compare the two version strings, the numbers in the version + # compared numerically, and all string parts should be equal. + local REST1 REST2 NUM1 NUM2 STR1 STR2 CHECKNUMS + REST1=$1 + REST2=$2 + CHECKNUMS=0 + + while [ -n "$REST1" -a -n "$REST2" ]; do + NUM1=`$SED -e 's/^\([0-9]*\).*$/\1/' << EOF +$REST1 +EOF +` + NUM2=`$SED -e 's/^\([0-9]*\).*$/\1/' << EOF +$REST2 +EOF +` + REST1=`$SED -e 's/^[0-9]*//' << EOF +$REST1 +EOF +` + REST2=`$SED -e 's/^[0-9]*//' << EOF +$REST2 +EOF +` + if [ "(" -n "$NUM1" -a -z "$NUM2" ")" -o \ + "(" -z "$NUM1" -a -n "$NUM2" ")" ]; then + # Only one of the versions contains a number here. No match. + return 1 + fi + if [ "(" -n "$NUM1" -a -z "$NUM2" ")" -o \ + "(" -z "$NUM1" -a -n "$NUM2" ")" ]; then + # Only one of the versions contains a number here. No match. + return 1 + fi + + if [ "$CHECKNUMS" -eq 0 ]; then + if [ "$NUM1" -gt "$NUM2" ]; then + # Too old. + return 1 + fi + if [ "$NUM1" -lt "$NUM2" ]; then + # A major number is larger. Minor numbers may be smaller. + CHECKNUMS=1 + fi + fi + + STR1=`$SED -e 's/^\([^0-9]*\).*$/\1/' << EOF +$REST1 +EOF +` + STR2=`$SED -e 's/^\([^0-9]*\).*$/\1/' << EOF +$REST2 +EOF +` + REST1=`$SED -e 's/^[^0-9]*//' << EOF +$REST1 +EOF +` + REST2=`$SED -e 's/^[^0-9]*//' << EOF +$REST2 +EOF +` + + if [ "x$STR1" "!=" "x$STR2" ]; then + # String parts don't match + return 1 + fi + done + + if [ -n "$REST1" -o -n "$REST2" ]; then + # One version string contains extra information. No match. + return 1 + fi + + return 0 +} + +# Description: try to detect a list of program dependencies. +# This only makes sure the PROG_xxx_PRESENT flag is set. +# It does not bail out if a dependency is not found. +# This function is called for programs in +# PROG_xxx_DEPEND_DETECT_BIN or LIB_xxx_DEPEND_DETECT_BIN. +# Using have_program in the respective depend functions would +# not save the PRESENT flag, as it is executed in a subshell. +# Arguments: $1 - the list of programs +detect_dependencies_program() { + local PROGS PROG + PROGS=$1 + for PROG in $PROGS; do + have_program "$PROG" + done +} + +# Description: try to detect a list of library dependencies. +# This only makes sure the LIB_xxx_PRESENT flag is set. +# It does not bail out if a dependency is not found. +# This function is called for libraries in +# PROG_xxx_DEPEND_DETECT_LIB or LIB_xxx_DEPEND_DETECT_LIB. +# Using have_library in the respective depend functions would +# not save the PRESENT flag, as it is executed in a subshell. +# Arguments: $1 - the list of libaries +detect_dependencies_library() { + local LIBS LIB + LIBS=$1 + for LIB in $LIBS; do + have_library "$LIB" + done +} + +# Description: check if a program is present in the path or as a built-in +# command. +# Arguments: $1 - The name of the program as it is executed +# Returns: 0 - if the command is found +# 1 - if the command is not found +have_command() { + type "$1" > /dev/null 2>&1 || false + # The '|| false' is because if 'type' does not recognise the + # command, it might return a different value than 1, on some + # shells. +} + +# Description: check if a program is present in the path or as a built-in +# command. +# Arguments: $1 - The name of the program as used in config_proginfo after +# "BIN_" +have_program() { + local PROG TEMP_NAME TEMP_FILE TEMP_VERSION TEMP_PRESENT TEMP_DETECT + local TEMP_DEPEND_DETECT_BIN TEMP_DEPEND_DETECT_LIB + + PROG=$1 + TEMP_NAME=`evalVar "PROG_${PROG}_NAME"` + if [ -z "$TEMP_NAME" ]; then + echo "Fatal: Program '$PROG' is not defined!" >&2 + exit 1 + fi + + TEMP_PRESENT=`getVar "PROG_${PROG}_PRESENT"` + if [ -n "$TEMP_PRESENT" ]; then + return "$TEMP_PRESENT" + fi + + # If a detection method is specified, try that one first. + TEMP_DETECT=`evalVar "PROG_${PROG}_DETECT"` + if [ -n "$TEMP_DETECT" ]; then + TEMP_DEPEND_DETECT_BIN=`evalVar "PROG_${PROG}_DEPEND_DETECT_BIN"` + TEMP_DEPEND_DETECT_LIB=`evalVar "PROG_${PROG}_DEPEND_DETECT_LIB"` + detect_dependencies_program "$TEMP_DEPEND_DETECT_BIN" + detect_dependencies_library "$TEMP_DEPEND_DETECT_LIB" + $TEMP_DETECT + # NB. TEMP_DETECT should make sure PROG_${PROG}_VERSION and + # PROG_${PROG}_FILE are set. + case $? in + 0) # Program found + setVar "PROG_${PROG}_PRESENT" 0 + ;; + 1) # Lib not found + setVar "PROG_${PROG}_PRESENT" 1 + ;; + 2) # Use default detection + ;; + esac + fi + + # If detection via a specified detection method was inconclusive, + # or no detection method was specified, try default detection + # based on whether the command name exists. + TEMP_PRESENT=`getVar "$PROG_${PROG}_PRESENT"` + if [ -z "$TEMP_PRESENT" ]; then + TEMP_FILE=`evalVar "PROG_${PROG}_FILE"` + have_command "${TEMP_FILE%% *}" + if [ $? -eq 0 ]; then + # Program found + setVar "PROG_${PROG}_PRESENT" 0 + fi + fi + + # If detection has yielded no results so far, we're calling it + # "not found". + TEMP_PRESENT=`getVar "PROG_${PROG}_PRESENT"` + if [ -z "$TEMP_PRESENT" ]; then + setVar "PROG_${PROG}_PRESENT" 1 + fi + + TEMP_PRESENT=`getVar "PROG_${PROG}_PRESENT"` + if [ "$TEMP_PRESENT" -eq 1 ]; then + build_message "$TEMP_NAME not found." + return 1 + fi + + # We have found the program. + # Test whether the version is sufficient. + if [ $# -gt 1 ]; then + # Minimum version supplied + TEMP_VERSION=`evalVar "PROG_${PROG}_VERSION"` + if [ -z "$TEMP_VERSION" ]; then + setVar "PROG_${PROG}_PRESENT" 1 + echo "Fatal: Could not determine the version of $TEMP_NAME" >&2 + exit 1 + fi + if not version_match "$2" "$TEMP_VERSION"; then + setVar "PROG_${PROG}_PRESENT" 1 + build_message "Found version $TEMP_VERSION of $TEMP_NAME, \ +but version $2 is required!" + return 1 + fi + setVar "PROG_${PROG}_PRESENT" 0 + build_message "$TEMP_NAME version $TEMP_VERSION found." + return 0 + fi + + setVar "PROG_${PROG}_PRESENT" 0 + build_message "$TEMP_NAME found." + return 0 +} + +# Description: check if a build tool is present, and define the appropriate +# environment variable for it. +# Arguments: $1 - The type of compile tool. One of PREPROC_C, MKDEP_C, +# COMPILE_C, PREPROC_OBJC, MKDEP_OBJC, COMPILE_OBJC, +# and LINK. +have_build_tool() { + local TOOL TEMP_NAME TEMP_PRESENT DEPENDS DEPEND SUCCESS COMMAND + + TOOL=$1 + + TEMP_NAME=`evalVar "BUILDTOOL_${TOOL}_NAME"` + if [ -z "$TEMP_NAME" ]; then + echo "Fatal: Build tool '$TOOL' is not defined!" >&2 + exit 1 + fi + + TEMP_PRESENT=`getVar "BUILDTOOL_${TOOL}_PRESENT"` + if [ -n "$TEMP_PRESENT" ]; then + return "$TEMP_PRESENT" + fi + + SUCCESS=0 + DEPENDS=`getVar "BUILDTOOL_${TOOL}_DEPEND"` + for DEPEND in $DEPENDS; do + if not have_program "$DEPEND"; then + SUCCESS=1 + fi + done + + setVar "BUILDTOOL_${TOOL}_PRESENT" "$SUCCESS" + + COMMAND=`evalVar "BUILDTOOL_${TOOL}_COMMAND"` + # Environment variables in $BUILDTOOL_xxx_COMMAND are expanded. + + if [ $SUCCESS -eq 0 ]; then + build_message "We have a $TEMP_NAME." + setVar "$TOOL" "$COMMAND" + else + build_message "No $TEMP_NAME found." + fi + + return $SUCCESS +} + +have_build_tools_language() { + local LANGUAGE + + LANGUAGE=$1 + + have_build_tool "PREPROC_$LANGUAGE" || return 1 + have_build_tool "MKDEP_$LANGUAGE" || return 1 + have_build_tool "COMPILE_$LANGUAGE" || return 1 + + return 0 +} + + +# Description: check if a library is present on the system +# Arguments: $1 - The name of the library as used in config_proginfo after +# "LIB_" +# $2 - (optional) minimum version required +# Pre: variables LIB_${1}_NAME, LIB_${1}_CFLAGS, and +# LIB_${1}_LDFLAGS are expected to exist. If two arguments are +# supplied, so is LIB_${1}_VERSION. +# Returns: 0 - if the library is found +# 1 - if the library is not found +have_library() { + local LIB TEMP_NAME TEMP_PRESENT TEMP_LDFLAGS TEMP_CFLAGS \ + TEMP_VERSION TEMP_DETECT + local TEMP_DEPEND_DETECT_BIN TEMP_DEPEND_DETECT_LIB + + LIB=$1 + TEMP_NAME=`evalVar "LIB_${LIB}_NAME"` + if [ -z "$TEMP_NAME" ]; then + echo "Fatal: Library '$LIB' is not defined!" >&2 + exit 1 + fi + + TEMP_PRESENT=`getVar "LIB_${LIB}_PRESENT"` + if [ -n "$TEMP_PRESENT" ]; then + return "$TEMP_PRESENT" + fi + + # If a detection method is specified, try that one first. + TEMP_DETECT=`evalVar "LIB_${LIB}_DETECT"` + if [ -n "$TEMP_DETECT" ]; then + TEMP_DEPEND_DETECT_BIN=`evalVar "LIB_${LIB}_DEPEND_DETECT_BIN"` + TEMP_DEPEND_DETECT_LIB=`evalVar "LIB_${LIB}_DEPEND_DETECT_LIB"` + detect_dependencies_program "$TEMP_DEPEND_DETECT_BIN" + detect_dependencies_library "$TEMP_DEPEND_DETECT_LIB" + $TEMP_DETECT + # NB. TEMP_DETECT should make sure PROG_$LIB_VERSION is set. + # return value of $TEMP_DETECT is used below. + case $? in + 0) # Lib found + setVar "LIB_${LIB}_PRESENT" 0 + ;; + 1) # Lib not found + setVar "LIB_${LIB}_PRESENT" 1 + ;; + 2) # Use default detection + ;; + esac + fi + + # If detection via a specified detection method was inconclusive, + # or no detection method was specified, try default detection + # based on whether we can compile against the library. + TEMP_PRESENT=`getVar "LIB_${LIB}_PRESENT"` + if [ -z "$TEMP_PRESENT" ]; then + TEMP_CFLAGS=`evalVar "LIB_${LIB}_CFLAGS"` + TEMP_LDFLAGS=`evalVar "LIB_${LIB}_LDFLAGS"` + + try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF +int main(void) { + return 0; +} +EOF + if [ $? -eq 0 ]; then + # Build successful + setVar "LIB_${LIB}_PRESENT" 0 + fi + fi + + # If detection has yielded no results so far, we're calling it + # "not found". + TEMP_PRESENT=`getVar "LIB_${LIB}_PRESENT"` + if [ -z "$TEMP_PRESENT" ]; then + setVar "LIB_${LIB}_PRESENT" 1 + fi + + TEMP_PRESENT=`getVar "LIB_${LIB}_PRESENT"` + if [ "$TEMP_PRESENT" -eq 1 ]; then + build_message "$TEMP_NAME not found." + return 1 + fi + + # We have found the library. + # Test whether the version is sufficient. + if [ $# -gt 1 ]; then + # Minimum version supplied + TEMP_VERSION=`evalVar "LIB_${LIB}_VERSION"` + if [ -z "$TEMP_VERSION" ]; then + setVar "LIB_${LIB}_PRESENT" 1 + echo "Fatal: Could not determine the version of $TEMP_NAME" >&2 + exit 1 + fi + if not version_match "$2" "$TEMP_VERSION"; then + setVar "LIB_${LIB}_PRESENT" 1 + build_message "Found version $TEMP_VERSION of $TEMP_NAME, \ +but version $2 is required!" + return 1 + fi + setVar "LIB_${LIB}_PRESENT" 0 + build_message "$TEMP_NAME version $TEMP_VERSION found." + return 0 + fi + + setVar "LIB_${LIB}_PRESENT" 0 + build_message "$TEMP_NAME found." + return 0 +} + +# Description: check if a library is present on the system. +# If it is, add the appropriate flags to CFLAGS and LDFLAGS. +# If not, bail out. +# Arguments: $1 - The name of the library as used in config_proginfo after +# "LIB_" +# $2 - (optional) minimum version required +# Pre: variables LIB_${1}_NAME, LIB_${1}_CFLAGS, and +# LIB_${1}_LDFLAGS are expected to exist. If two arguments are +# supplied, so is LIB_${1}_VERSION. +use_library() { + local TEMP_CFLAGS TEMP_LDFLAGS + have_library "$@" + [ $? -eq 0 ] || exit 1 + + TEMP_CFLAGS=`evalVar "LIB_${1}_CFLAGS"` + TEMP_LDFLAGS=`evalVar "LIB_${1}_LDFLAGS"` + CFLAGS="$CFLAGS $TEMP_CFLAGS" + LDFLAGS="$LDFLAGS $TEMP_LDFLAGS" + return 0 +} + +# Description: check if a library are being provided by a framework outside +# of the normal system build process. +# If it is, mark it as found and add appropriate flags +# If not, do nothing. Do not even mark it as not found; it might +# be available by some other means. +# This function is currently specific to macOS builds. +# Arguments: $1 - The name of the library as used in config_proginfo +# $2 - (optional, default $1) the name of the framework +# DEPS_PATH - environment variable that if set specifies where to +# check for the framework. +# Pre: LIB_${1}_NAME is expected to exist. +have_framework() { + local TEMP_LIBNAME LIB LIBVAR FRAMEWORK_PATH + # If we aren't on a Mac, there is no framework + if [[ "x$HOST_SYSTEM" != "xDarwin" ]]; then + return 1 + fi + # If DEPS_PATH was not configured, there is no framework + if [[ -z "$DEPS_PATH" ]]; then + return 1 + fi + LIBVAR=$1 + LIB=$2 + if [[ -z "$2" ]]; then + LIB=$LIBVAR + fi + TEMP_LIBNAME=`evalVar "LIB_${LIBVAR}_NAME"` + FRAMEWORK_PATH="${DEPS_PATH}/${LIB}.framework" + if [[ -d "$FRAMEWORK_PATH" ]]; then + build_message "${TEMP_LIBNAME} found in ${DEPS_PATH}." + setVar "LIB_${LIBVAR}_PRESENT" 0 + setVar "LIB_${LIBVAR}_CFLAGS" "-F${DEPS_PATH} -I${FRAMEWORK_PATH}/Headers" + setVar "LIB_${LIBVAR}_LDFLAGS" "-F${DEPS_PATH} -framework ${LIB}" + return 0 + fi + build_message "${TEMP_LIBNAME} not found in ${DEPS_PATH}." + return 1 +} + +# Description: check if a symbol is defined +# Arguments: $1 - the name of the symbol +# $2 - the C code that does the actual checking +have_symbol_generic() { + local CODE DETECT EXTRA + + DETECT=`evalVar "SYMBOL_${1}_DETECT"` + if [ -n "$DETECT" ]; then + $DETECT + return $? + fi + + EXTRA=`evalVar "SYMBOL_${1}_EXTRA"` + CODE=`evalVar "SYMBOL_${1}_CODE"` + if [ -z "$CODE" ]; then + CODE=$2 + fi + + try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF > /dev/null 2>&1 +#include <sys/types.h> +$EXTRA + +$CODE +EOF +} + +# Description: check if a symbol is defined. +# Arguments: $1 - the name of the symbol +have_symbol() { + local SYMBOL TEMP_PRESENT CODE + SYMBOL=$1 + + TEMP_PRESENT=`getVar "SYMBOL_${SYMBOL}_PRESENT"` + if [ -n "$TEMP_PRESENT" ]; then + return "$TEMP_PRESENT" + fi + + CODE=`cat << EOF +int main(void) { + (void) $SYMBOL; + return 0; +} +EOF +` + + have_symbol_generic "$SYMBOL" "$CODE" + if [ $? -gt 0 ]; then + build_message "Symbol '$SYMBOL' not found." + setVar "SYMBOL_${SYMBOL}_PRESENT" 1 + return 1 + fi + build_message "Symbol '$SYMBOL' found." + setVar "SYMBOL_${SYMBOL}_PRESENT" 0 + return 0 +} + +# Description: check if a type is present. +# Arguments: $1 - the name of the symbol +have_type() { + local TYPE TEMP_PRESENT CODE + TYPE=$1 + + TEMP_PRESENT=`getVar "TYPE_${TYPE}_PRESENT"` + if [ -n "$TEMP_PRESENT" ]; then + return "$TEMP_PRESENT" + fi + + CODE=`cat << EOF +int main(void) { + $TYPE var; + (void) var; + return 0; +} +EOF + ` + + have_symbol_generic "$TYPE" "$CODE" + if [ $? -gt 0 ]; then + build_message "Type '$TYPE' not found." + setVar "TYPE_${TYPE}_PRESENT" 1 + return 1 + fi + build_message "Type '$TYPE' found." + setVar "TYPE_${TYPE}_PRESENT" 0 + return 0 +} + +# Description: check if a symbol is defined. +# sets HAVE_<NAME> accordingly, where <NAME> is the capitalized +# name of the symbol. +# Arguments: $1 - the name of the symbol +define_have_symbol() { + local NAME VALUE DEFNAME + + DEFNAME=`getVar "SYMBOL_${1}_DEFNAME"` + if [ -z "$DEFNAME" ]; then + # Why not "tr [:lower:] [:upper:]"? Because the capital "i" is not + # "I" in Turkish... An alternative would be setting LC_CTYPE to POSIX. + NAME=`$TR "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ + << EOF +$1 +EOF + ` + DEFNAME="HAVE_$NAME" + fi + + if have_symbol "$1"; then + add_symbol "$DEFNAME" "#define $DEFNAME" + add_symbol "${DEFNAME}_FLAG" 1 + else + add_symbol "$DEFNAME" "#undef $DEFNAME" + add_symbol "${DEFNAME}_FLAG" 0 + fi +} + +# Description: check if a type is present. +# set HAVE_<NAME> accordingly, where <NAME> is the capitalized +# name of the symbol. +# Arguments: $1 - the name of the symbol +define_have_type() { + local NAME VALUE DEFNAME + + DEFNAME=`getVar "TYPE_${1}_DEFNAME"` + if [ -z "$DEFNAME" ]; then + # Why not "tr [:lower:] [:upper:]"? Because the capital "i" is not + # "I" in Turkish... An alternative would be setting LC_CTYPE to POSIX. + NAME=`$TR "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ + << EOF +$1 +EOF + ` + DEFNAME="HAVE_$NAME" + fi + + if have_type "$1"; then + add_symbol "$DEFNAME" "#define $DEFNAME" + add_symbol "${DEFNAME}_FLAG" 1 + else + add_symbol "$DEFNAME" "#undef $DEFNAME" + add_symbol "${DEFNAME}_FLAG" 0 + fi +} + +# Description: check if a header is available. +# Arguments: $1 - the name of the header file +have_header() { + local HEADER NAME EXTRA + HEADER=$1 + + NAME=${HEADER%.h} + EXTRA=`evalVar "HEADER_${NAME}_EXTRA"` + + try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF > /dev/null 2>&1 +$EXTRA +#include <$HEADER> +int main(void) { + return 0; +} +EOF + if [ $? -gt 0 ]; then + build_message "Header '$HEADER' not found." + return 1 + fi + build_message "Header '$HEADER' found." + return 0 +} + +# Description: check if a header is available. +# sets HAVE_<NAME> accordingly, where <NAME> is the capitalized +# name of the header file. "sys/time.h" becomes "SYS_TIME_H". +# Arguments: $1 - the name of the header file +define_have_header() { + local NAME VALUE DEFNAME + + DEFNAME=`getVar "HEADER_${1%.h}_DEFNAME"` + if [ -z "$DEFNAME" ]; then + # Why not "tr [:lower:] [:upper:]"? Because the capital "i" is not + # "I" in Turkish... An alternative would be setting LC_CTYPE to POSIX. + NAME=`$TR "/.abcdefghijklmnopqrstuvwxyz" \ + "__ABCDEFGHIJKLMNOPQRSTUVWXYZ" << EOF +$1 +EOF + ` + DEFNAME="HAVE_$NAME" + fi + + if have_header "$1"; then + add_symbol "$DEFNAME" "#define $DEFNAME" + add_symbol "${DEFNAME}_FLAG" 1 + else + add_symbol "$DEFNAME" "#undef $DEFNAME" + add_symbol "${DEFNAME}_FLAG" 0 + fi +} + +# Description: check if a macro is available. +# Arguments: $1 - the name of the macro +have_macro() { + local MACRO EXTRA + MACRO=$1 + + EXTRA=`evalVar "MACRO_${NAME}_EXTRA"` + + try_compile_c "$CFLAGS $TEMP_CFLAGS" "$LDFLAGS $TEMP_LDFLAGS" << EOF > /dev/null 2>&1 +$EXTRA +#ifndef $MACRO +# error +#endif +int main(void) { + return 0; +} +EOF + if [ $? -gt 0 ]; then + build_message "Preprocessor macro '$MACRO' not found." + return 1 + fi + build_message "Preprocessor macro '$MACRO' found." + return 0 +} + +# Description: check if a macro is defined +# sets MACRO_<NAME> to a non-empty string if the macro with +# the specified name is defined, and to an empty string if it +# is not. +# Arguments: $1 - the name of the symbol +define_have_macro() { + local NAME + + NAME=$1 + + if have_macro "$1"; then + add_symbol "MACRO_$NAME" "1" + else + add_symbol "MACRO_$NAME" "" + fi +} + +# Description: Add a symbol to be replaced by substitute_vars +# $HAVE_SYMBOLS will contain the variable names of all +# symbols added by define_have_symbol and should be passed to +# substitute_vars for the file you want them in. +# Arguments: $1 - the symbol to add +# $2 - the value of the symbol +add_symbol() { + local NAME + + eval NAME="$1" + eval "$NAME"=\"\$2\" + HAVE_SYMBOLS="$HAVE_SYMBOLS $NAME" +} + +check_endianness() { + local ENDIAN + + if [ "$BUILD_SYSTEM" '!=' "$HOST_SYSTEM" ]; then + case "$BUILD_HOST_ENDIAN" in + "") + build_message "Cross-compiling - assuming little-endian host." + ENDIAN=little + ;; + big) + build_message "Cross-compiling for a big-endian host." + ENDIAN=big + ;; + little) + build_message "Cross-compiling for a little-endian host." + ENDIAN=little + ;; + *) + build_message "Bad endianness specified. Use \"little\" or \"big\"" + exit 1 + ;; + esac + else + # Detect endianness + try_compile_and_run_c "$CFLAGS" "$LDFLAGS" << EOF +int main(void) { + int i; + + i = 1; + return *((unsigned char *) &i); +} +EOF + if [ $? -eq 0 ]; then + build_message "Big-endian machine detected." + ENDIAN=big + else + build_message "Little-endian machine detected." + ENDIAN=little + fi + fi + + case "$ENDIAN" in + big) + add_symbol WORDS_BIGENDIAN "#define WORDS_BIGENDIAN" + add_symbol "WORDS_BIGENDIAN_FLAG" 1 + ;; + little) + add_symbol WORDS_BIGENDIAN "#undef WORDS_BIGENDIAN" + add_symbol "WORDS_BIGENDIAN_FLAG" 0 + ;; + esac +} + + +# Description: If pkg-config is installed, check if there's a pkg-config +# entry for some binary dependency. +# If successful, it sets the appropriate BIN_xxx_VERSION. +# Arguments: $1 - The name of the program as it is known in +# config_proginfo after "BIN_" +# $2 - The name of the dependency as it would be known to +# pkg-config. +try_pkgconfig_prog() { + have_program pkgconfig || return 1 + + local PROG PKG_NAME TEMP_NAME + PROG=$1 + PKG_NAME=$2 + + TEMP_NAME=`evalVar "PROG_${PROG}_NAME"` + if [ -z "$TEMP_NAME" ]; then + echo "Fatal: Program '$PROG' is not defined!" >&2 + exit 1 + fi + + if $PROG_pkgconfig_FILE --exists "$PKG_NAME"; then + local TEMP_VERSION + TEMP_VERSION=$($PROG_pkgconfig_FILE --modversion "$PKG_NAME") + setVar "PROG_${PROG}_VERSION" "$TEMP_VERSION" + return 0 + else + return 2 + fi +} + + +# Description: If pkg-config is installed, check if there's a pkg-config +# entry for some dependency. +# If successful, it sets the appropriate LIB_xxx_VERSION, +# LIB_xxx_CFLAGS and LIB_xxx_LDFLAGS. +# Arguments: $1 - The name of the library as it is known in +# config_proginfo after "LIB_" +# $2 - The name of the dependency as it would be known to +# pkg-config. +try_pkgconfig_lib() { + have_program pkgconfig || return 1 + + local LIB PKG_NAME TEMP_NAME + LIB=$1 + PKG_NAME=$2 + + TEMP_NAME=`evalVar "LIB_${LIB}_NAME"` + if [ -z "$TEMP_NAME" ]; then + echo "Fatal: Library '$LIB' is not defined!" >&2 + exit 1 + fi + + if $PROG_pkgconfig_FILE --exists "$PKG_NAME"; then + local TEMP_VERSION TEMP_CFLAGS TEMP_LDFLAGS + TEMP_VERSION=$($PROG_pkgconfig_FILE --modversion "$PKG_NAME") + TEMP_CFLAGS=$($PROG_pkgconfig_FILE --cflags "$PKG_NAME") + TEMP_LDFLAGS=$($PROG_pkgconfig_FILE --libs "$PKG_NAME") + setVar "LIB_${LIB}_VERSION" "$TEMP_VERSION" + setVar "LIB_${LIB}_CFLAGS" "$TEMP_CFLAGS" + setVar "LIB_${LIB}_LDFLAGS" "$TEMP_LDFLAGS" + return 2 # Force testing using the new CFLAGS and LDFLAGS + #return 0 + else + return 2 + fi +} + + +# Description: substitute variables in files. +# Every supplied variable name found between @'s in the +# supplied files, is replaced by its value. +# Arguments: $1 - The name of the variable which contains a list of +# variables to substitute in the files. +# $2 - The name of the variable which contains a list of +# files to substitute variables in. +# If a filename ends on .in, that filename is used as +# source, and the filename without .in as target. +# If a filename doesn't end on .in, that filename is used +# as target, and the filename with .in attached as source. +# $3 - A path to which the input file names are relative +# $4 - A path to which the output file names are relative +substitute_vars() { + local VARS VAR VALUE FILES FILE SRC_PATH DST_PATH + + eval VARS=\"\$$1\" + eval FILES=\"\$$2\" + SRC_PATH="$3" + DST_PATH="$4" + + for VAR in $VARS; do + # Escape all / in VAR so that we can use / as seperator char for sed + eval VALUE=\"\$$VAR\" + VALUE=$(echo "$VALUE" | $SED -e 's,\([\&/]\),\\\1,g') + cat << EOF +s/@${VAR}@/${VALUE}/g +EOF + done > "${TEMPFILE}.sed" + + for FILE in $FILES; do + FILE="${FILE%.in}" + cp -p -- "$SRC_PATH/$FILE".in "$DST_PATH/$FILE" + # The copy is done so that the file modes are equal. + $SED -f "${TEMPFILE}.sed" < "$SRC_PATH/$FILE".in > "$DST_PATH/$FILE" + done + deleteTempFiles "${TEMPFILE}.sed" +} + +# Define the build system type. +set_build_system() { + BUILD_SYSTEM=`uname -s` +} + +# Define the host system type. +set_host_system() { + local UHOST + + if [ -z "$BUILD_HOST" ]; then + HOST_SYSTEM=$BUILD_SYSTEM + else + case "$BUILD_HOST" in + *-*-*) + HOST_SYSTEM="${BUILD_HOST#*-}" + HOST_SYSTEM="${HOST_SYSTEM%-*}" + ;; + esac + + # Use a single capitalization. + # What is used is whatever 'uname -s' would give on such a platform. + case "$BUILD_HOST" in + [Ll][Ii][Nn][Uu][Xx]) + HOST_SYSTEM="Linux" ;; + [Ff][Rr][Ee][Ee][Bb][Ss][Dd]) + HOST_SYSTEM="FreeBSD" ;; + [Oo][Pp][Ee][Nn][Bb][Ss][Dd]) + HOST_SYSTEM="OpenBSD" ;; + [Mm][Ii][Nn][Gg][Ww]|[Mm][Ii][Nn][Gg][Ww]32) + HOST_SYSTEM="MINGW32" ;; + [Cc][Yy][Gg][Ww][Ii][Nn]*) + HOST_SYSTEM="CYGWIN" ;; + [Dd][Aa][Rr][Ww][Ii][Nn]) + HOST_SYSTEM="Darwin" ;; + [Ss][Uu][Nn][Oo][Ss]) + HOST_SYSTEM="SunOS" ;; + [Qq][Nn][Xx]) + HOST_SYSTEM="QNX" ;; + [Cc][Ee][Gg][Cc][Cc]) + HOST_SYSTEM="cegcc" ;; + [Ww][Ii][Nn][Ss][Cc][Ww]) + HOST_SYSTEM="WINSCW" ;; + [Aa][Rr][Mm][Vv]5) + HOST_SYSTEM="ARMV5" ;; + [Gg][Cc][Cc][Ee]) + HOST_SYSTEM="GCCE" ;; + *) + build_message "Warning: host type '$BUILD_HOST' unknown. Using defaults." + ;; + esac + fi + +} + +set_system() { + set_build_system + set_host_system +} + +prepare_build_system() { + # Include information about programs we can detect for the build system. + . build/unix/config_proginfo_build +} + +prepare_host_system() { + # Include information about programs we can detect for the host system. + . build/unix/config_proginfo_host +} + +# Some initialisations +HAVE_SYMBOLS="" + +config_requirements() { + # Requirements for the config program itself + have_program echon || exit 1 + ECHON="$PROG_echon_FILE" + have_program sed || exit 1 + SED="$PROG_sed_FILE" + have_program tr || exit 1 + TR="$PROG_tr_FILE" + have_program make || exit 1 + MAKE="$PROG_make_FILE" +} + diff --git a/build/unix/config_proginfo_build b/build/unix/config_proginfo_build new file mode 100644 index 0000000..b01cf09 --- /dev/null +++ b/build/unix/config_proginfo_build @@ -0,0 +1,336 @@ +# Set information on used programs and libraries +# This file contains the information for the programs that test the +# system on which the software is built. +# Copyright (c) 2002 Serge van den Boom +# +# 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 + + +############################################################################## +# System specific build flags # +############################################################################## + + +# CFLAGS +SYSTEM_BUILD_CFLAGS="" + +# CXXFLAGS +SYSTEM_BUILD_CXXFLAGS="" + +# LDFLAGS +SYSTEM_BUILD_LDFLAGS="" + +# Compilers etc. +BUILDTOOL_PREPROC_C_NAME="C preprocessor" +BUILDTOOL_MKDEP_C_NAME="C dependency generator" +BUILDTOOL_COMPILE_C_NAME="C compiler" +BUILDTOOL_PREPROC_CXX_NAME="C++ preprocessor" +BUILDTOOL_MKDEP_CXX_NAME="C++ dependency generator" +BUILDTOOL_COMPILE_CXX_NAME="C++ compiler" +BUILDTOOL_PREPROC_OBJC_NAME="Objective-C preprocessor" +BUILDTOOL_MKDEP_OBJC_NAME="Objective-C dependency generator" +BUILDTOOL_COMPILE_OBJC_NAME="Objective-C compiler" +BUILDTOOL_LINK_NAME="linker" +useGccBuildTools() { + # These strings will be evaluated later. + BUILDTOOL_PREPROC_C_COMMAND="\$PROG_gcc_FILE -E $EXTRA_PLATFORM_GCC_FLAGS_PREPROC_C" + BUILDTOOL_PREPROC_C_DEPEND='gcc' + + BUILDTOOL_MKDEP_C_COMMAND="\$PROG_gcc_FILE -MM $EXTRA_PLATFORM_GCC_FLAGS_MKDEP_C" + BUILDTOOL_MKDEP_C_DEPEND='gcc' + + BUILDTOOL_COMPILE_C_COMMAND="\$PROG_gcc_FILE -c $EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C" + BUILDTOOL_COMPILE_C_DEPEND='gcc' + + BUILDTOOL_PREPROC_CXX_COMMAND="\$PROG_gcc_FILE -E $EXTRA_PLATFORM_GCC_FLAGS_PREPROC_CXX" + BUILDTOOL_PREPROC_CXX_DEPEND='gcc' + + BUILDTOOL_MKDEP_CXX_COMMAND="\$PROG_gcc_FILE -MM $EXTRA_PLATFORM_GCC_FLAGS_MKDEP_CXX" + BUILDTOOL_MKDEP_CXX_DEPEND='gcc' + + BUILDTOOL_COMPILE_CXX_COMMAND="\$PROG_gcc_FILE -c $EXTRA_PLATFORM_GCC_FLAGS_COMPILE_CXX" + BUILDTOOL_COMPILE_CXX_DEPEND='gcc' + + BUILDTOOL_PREPROC_OBJC_COMMAND="\$PROG_gcc_FILE -E $EXTRA_PLATFORM_GCC_FLAGS_PREPROC_OBJC" + BUILDTOOL_PREPROC_OBJC_DEPEND='gcc' + + BUILDTOOL_MKDEP_OBJC_COMMAND="\$PROG_gcc_FILE -MM $EXTRA_PLATFORM_GCC_FLAGS_MKDEP_OBJC" + BUILDTOOL_MKDEP_OBJC_DEPEND='gcc' + + BUILDTOOL_COMPILE_OBJC_COMMAND="\$PROG_gcc_FILE -c $EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC" + BUILDTOOL_COMPILE_OBJC_DEPEND='gcc' + + BUILDTOOL_LINK_COMMAND="\$PROG_gcc_FILE $EXTRA_PLATFORM_GCC_FLAGS_LINK" + BUILDTOOL_LINK_DEPEND='gcc' +} +case "$HOST_SYSTEM" in + Darwin) + EXTRA_PLATFORM_GCC_FLAGS_COMPILE_C='-mmacosx-version-min=10.6 -arch x86_64' + EXTRA_PLATFORM_GCC_FLAGS_COMPILE_OBJC='-mmacosx-version-min=10.6 -arch x86_64' + EXTRA_PLATFORM_GCC_FLAGS_LINK='-mmacosx-version-min=10.6 -arch x86_64' + useGccBuildTools + ;; + WINSCW) + EXTRA_WINSCW_FLAGS_COMPILE="-msgstyle gcc -gccinc -dialect c99 -relax_pointers -wchar_t off -align 4 -warnings on -w nohidevirtual,nounusedexpr -enum int -str pool -exc ms -trigraphs on -nostdinc -d _UNICODE -d __SYMBIAN32__ -d __SERIES60_30__ -d __SERIES60_3X__ -d __CW32__ -d __WINS__ -d __WINSCW__ -d __EXE__ -d __SUPPORT_CPP_EXCEPTIONS__ -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant" + EXTRA_WINSCW_FLAGS_LINK='-library -msgstyle gcc -stdlib -noimplib -search' + + BUILDTOOL_PREPROC_C_COMMAND="\$PROG_mwccsym2_FILE -E $EXTRA_WINSCW_FLAGS_COMPILE" + BUILDTOOL_PREPROC_C_DEPEND='mwccsym2' + + BUILDTOOL_MKDEP_C_COMMAND="\$PROG_mwccsym2_FILE -MM -ext .o -gccdep $EXTRA_WINSCW_FLAGS_COMPILE" + BUILDTOOL_MKDEP_C_DEPEND='mwccsym2' + + BUILDTOOL_COMPILE_C_COMMAND="\$PROG_mwccsym2_FILE -c $EXTRA_WINSCW_FLAGS_COMPILE" + BUILDTOOL_COMPILE_C_DEPEND='mwccsym2' + + BUILDTOOL_PREPROC_OBJC_COMMAND="\$PROG_mwccsym2_FILE -E" + BUILDTOOL_PREPROC_OBJC_DEPEND='mwccsym2' + + BUILDTOOL_MKDEP_OBJC_COMMAND="\$PROG_mwccsym2_FILE -MM" + BUILDTOOL_MKDEP_OBJC_DEPEND='mwccsym2' + + BUILDTOOL_COMPILE_OBJC_COMMAND="\$PROG_mwccsym2_FILE -c" + BUILDTOOL_COMPILE_OBJC_DEPEND='mwccsym2' + + BUILDTOOL_LINK_COMMAND="\$PROG_mwldsym2_FILE $EXTRA_WINSCW_FLAGS_LINK" + BUILDTOOL_LINK_DEPEND='mwldsym2' + ;; + ARMV5) + EXTRA_ARMV5_FLAGS_COMPILE='--gnu --apcs //inter --diag_suppress 66,161,611,654,997,1152,1300,1464,1488,6318,6331 --diag_error 1267 --arm --cpu ARM926EJ-S --fpu softvfp --exceptions --exceptions_unwind -D__MARM_INTERWORK__ --enum_is_int -Ono_known_library --fpmode ieee_no_fenv --export_all_vtbl --no_vfe --dllimport_runtime -D_UNICODE -D__SYMBIAN32__ -D__SERIES60_30__ -D__SERIES60_3X__ -D__ARMCC__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__ARMCC_2__ -D__ARMCC_2_2__ -D__MARM_ARMV5__ -D__SUPPORT_CPP_EXCEPTIONS__ -J$BUILD_EPOCROOT/epoc32/include -J$BUILD_EPOCROOT/epoc32/include/stdapis -J$BUILD_EPOCROOT/epoc32/include/variant --preinclude $BUILD_EPOCROOT/epoc32/include/RVCT2_2/RVCT2_2.h' + EXTRA_ARMV5_FLAGS_LINK='' + + BUILDTOOL_PREPROC_C_COMMAND="\$PROG_armcc_FILE -E $EXTRA_ARMV5_FLAGS_COMPILE" + BUILDTOOL_PREPROC_C_DEPEND='armcc' + + BUILDTOOL_MKDEP_C_COMMAND="\$PROG_armcc_FILE -MM --unix_depend_format $EXTRA_ARMV5_FLAGS_COMPILE" + BUILDTOOL_MKDEP_C_DEPEND='armcc' + + BUILDTOOL_COMPILE_C_COMMAND="\$PROG_armcc_FILE -c $EXTRA_ARMV5_FLAGS_COMPILE" + BUILDTOOL_COMPILE_C_DEPEND='armcc' + + BUILDTOOL_PREPROC_OBJC_COMMAND="\$PROG_armcc_FILE -E" + BUILDTOOL_PREPROC_OBJC_DEPEND='armcc' + + BUILDTOOL_MKDEP_OBJC_COMMAND="\$PROG_armcc_FILE -MM" + BUILDTOOL_MKDEP_OBJC_DEPEND='armcc' + + BUILDTOOL_COMPILE_OBJC_COMMAND="\$PROG_armcc_FILE -c" + BUILDTOOL_COMPILE_OBJC_DEPEND='armcc' + + BUILDTOOL_LINK_COMMAND="\$PROG_armar_FILE $EXTRA_ARMV5_FLAGS_LINK" + BUILDTOOL_LINK_DEPEND='armar' + ;; + GCCE) + EXTRA_GCCE_FLAGS_COMPILE='-Wno-unknown-pragmas -march=armv5t -mapcs -pipe -nostdinc -msoft-float -D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__SERIES60_30__ -D__SERIES60_3X__ -D__GCCE__ -D__EPOC32__ -D__MARM__ -D__EABI__ -D__MARM_ARMV5__ -D __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__ -x c -include $BUILD_EPOCROOT/EPOC32/INCLUDE/GCCE/GCCE.h -I$BUILD_EPOCROOT/epoc32/include -I$BUILD_EPOCROOT/epoc32/include/stdapis -I$BUILD_EPOCROOT/epoc32/include/variant' + EXTRA_GCCE_FLAGS_LINK='' + + BUILDTOOL_PREPROC_C_COMMAND="\$PROG_gcce_FILE -E $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_PREPROC_C_DEPEND='gcce' + + BUILDTOOL_MKDEP_C_COMMAND="\$PROG_gcce_FILE -MM $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_MKDEP_C_DEPEND='gcce' + + BUILDTOOL_COMPILE_C_COMMAND="\$PROG_gcce_FILE -c $EXTRA_GCCE_FLAGS_COMPILE" + BUILDTOOL_COMPILE_C_DEPEND='gcce' + + BUILDTOOL_PREPROC_OBJC_COMMAND="\$PROG_gcce_FILE -E" + BUILDTOOL_PREPROC_OBJC_DEPEND='gcce' + + BUILDTOOL_MKDEP_OBJC_COMMAND="\$PROG_gcce_FILE -MM" + BUILDTOOL_MKDEP_OBJC_DEPEND='gcce' + + BUILDTOOL_COMPILE_OBJC_COMMAND="\$PROG_gcce_FILE -c" + BUILDTOOL_COMPILE_OBJC_DEPEND='gcce' + + BUILDTOOL_LINK_COMMAND="\$PROG_gcce_FILE $EXTRA_GCCE_FLAGS_LINK" + BUILDTOOL_LINK_DEPEND='gcce' + ;; + *) + useGccBuildTools + ;; +esac +case "$HOST_SYSTEM" in + Darwin) + BUILDTOOL_REZ_NAME="MacOS X resource compiler (Rez)" + BUILDTOOL_REZ_COMMAND='$PROG_Rez_FILE' + BUILDTOOL_REZ_DEPEND='Rez' + ;; + MINGW32*|CYGWIN*|cegcc) + BUILDTOOL_WINDRES_NAME="Windows resource linker (windres)" + BUILDTOOL_WINDRES_COMMAND='$PROG_windres_FILE' + BUILDTOOL_WINDRES_DEPEND='windres' + ;; +esac + + +############################################################################## +# Describe the programs (possibly) used: # +############################################################################## + + +### gcc ### +PROG_gcc_NAME="GNU C compiler" +PROG_gcc_FILE="gcc" +PROG_gcc_ACTION="" +PROG_gcc_VERSION='$(gcc --version)' + + +### sed ### +PROG_sed_NAME="Sed stream editor" +PROG_sed_FILE="sed" +PROG_sed_ACTION="" +PROG_sed_VERSION='' + + +### echo -n ### +PROG_echon_NAME="'echo -n' capable echo" +PROG_echon_FILE="" +PROG_echon_ACTION="" +PROG_echon_VERSION='' +PROG_echon_DETECT="echon_detect" +echon_detect() { + local TEST LOCATIONS LOCATION + + # Default echo (probably builtin) + TEST=`echo -n X` + if [ "$TEST" = X ]; then + PROG_echon_FILE="echo -n" + return 0; + fi + + # External echo + LOCATIONS="/bin/ /usr/ucb/" + for LOCATION in $LOCATIONS; do + if [ -x ${LOCATION}echo ]; then + TEST=`${LOCATION}echo -n X` + if [ "$TEST" = X ]; then + PROG_echon_FILE="${LOCATION}echo -n" + return 0; + fi + fi + done + + # Using printf as echo + TEST=`printf %s X` + if [ "$TEST" = X ]; then + PROG_echon_FILE="printf %s" + return 0; + fi + + # No good echo found + return 1 +} + + +### GNU Make ### +PROG_make_NAME="Make" +case "$BUILD_SYSTEM" in + FreeBSD|OpenBSD|SunOS) + PROG_make_FILE="gmake" + ;; + *) + PROG_make_FILE="make" + ;; +esac +PROG_make_ACTION="" +PROG_make_VERSION='' + + +### tr ### +PROG_tr_NAME="tr" +PROG_tr_FILE="tr" +PROG_tr_ACTION="" +PROG_tr_VERSION='' + + +### windres (for Windows) ### +PROG_windres_NAME=windres +PROG_windres_FILE=windres +PROG_windres_ACTION="" +PROG_windres_VERSION='windres --version' + + +### Rez resource compiler (for MacOS X) ### +PROG_Rez_NAME="Rez resource compiler (Apple Developer Tools)" +PROG_Rez_FILE="/usr/bin/Rez" +PROG_Rez_ACTION="" +PROG_Rez_VERSION='' + + +### pkg-config ### +PROG_pkgconfig_NAME="pkg-config" +PROG_pkgconfig_FILE="pkg-config" +PROG_pkgconfig_ACTION="" +PROG_pkgconfig_VERSION='$(pkg-config --version)' + + +### mwccsym2 ### +PROG_mwccsym2_NAME="Nokia CodeWarrior C/C++ Compiler for Windows/x86" +PROG_mwccsym2_FILE="mwccsym2" +PROG_mwccsym2_ACTION="" +PROG_mwccsym2_VERSION='$(mwccsym2 -version)' + + +### mwldsym2 ### +PROG_mwldsym2_NAME="Nokia CodeWarrior Linker for Windows/x86" +PROG_mwldsym2_FILE="mwldsym2" +PROG_mwldsym2_ACTION="" +PROG_mwldsym2_VERSION='$(mwldsym2 -version)' + + +### armcc ### +PROG_armcc_NAME="ARM/Thumb C/C++ Compiler" +PROG_armcc_FILE="armcc" +PROG_armcc_ACTION="" +PROG_armcc_VERSION='$(armcc --vsn)' + + +### armlink ### +PROG_armlink_NAME="ARM Linker" +PROG_armlink_FILE="armlink" +PROG_armlink_ACTION="" +PROG_armlink_VERSION='$(armlink --vsn)' + + +### armar ### +PROG_armar_NAME="ARM Archiver" +PROG_armar_FILE="armar" +PROG_armar_ACTION="" +PROG_armar_VERSION='$(armar --vsn)' + + +### gcce ### +PROG_gcce_NAME="GNU C Compiler (CodeSourcery ARM)" +PROG_gcce_FILE="arm-none-symbianelf-gcc" +PROG_gcce_ACTION="" +PROG_gcce_VERSION='$(arm-none-symbianelf-gcc --version)' + + +### mingw-gcc ### +PROG_mingw_gcc_NAME="GNU C MinGW Cross-compiler" +PROG_mingw_gcc_FILE="i686-pc-mingw32-gcc" +PROG_mingw_gcc_ACTION="" +PROG_mingw_gcc_VERSION='$(i686-pc-mingw32-gcc --version)' + + +############################################################################## +# Describe the libaries (possibly) used: # +############################################################################## + + + +############################################################################## +# Describe the symbols (possibly) used: # +############################################################################## diff --git a/build/unix/config_proginfo_host b/build/unix/config_proginfo_host new file mode 100644 index 0000000..748ffbd --- /dev/null +++ b/build/unix/config_proginfo_host @@ -0,0 +1,356 @@ +# Set information on used programs and libraries +# This file contains the information for the programs that test the +# system on which the software will be run. +# Copyright (c) 2002 Serge van den Boom +# +# 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 + + +############################################################################## +# System specific build flags # +############################################################################## + + +# CFLAGS +SYSTEM_HOST_CFLAGS="" + +# LDFLAGS +SYSTEM_HOST_LDFLAGS="" + + +############################################################################## +# Describe the programs (possibly) used: # +############################################################################## + + + +############################################################################## +# Describe the libaries (possibly) used: # +############################################################################## + + +### SDL ### +LIB_SDL_NAME="Simple DirectMedia Layer" +case "$HOST_SYSTEM" in + WINSCW|GCCE) + LIB_SDL_CFLAGS='-I$BUILD_EPOCROOT/epoc32/include/SDL' + LIB_SDL_LDFLAGS='' + LIB_SDL_VERSION='1.2.13' + LIB_SDL_DETECT="true" + ;; + ARMV5) + LIB_SDL_CFLAGS='-J$BUILD_EPOCROOT/epoc32/include/SDL' + LIB_SDL_LDFLAGS='' + LIB_SDL_VERSION='1.2.13' + LIB_SDL_DETECT="true" + ;; + Darwin) + if not have_framework SDL; then + LIB_SDL_DETECT="have_command sdl-config" + LIB_SDL_CFLAGS='$(sdl-config --cflags)' + LIB_SDL_LDFLAGS='$(sdl-config --libs)' + LIB_SDL_VERSION='$(sdl-config --version)' + fi + LIB_SDL_LDFLAGS="$LIB_SDL_LDFLAGS -lobjc -framework Cocoa" + ;; + *) + LIB_SDL_DETECT="have_command sdl-config" + LIB_SDL_CFLAGS='$(sdl-config --cflags)' + LIB_SDL_LDFLAGS='$(sdl-config --libs)' + LIB_SDL_VERSION='$(sdl-config --version)' + ;; +esac + + +### SDL2 ### +LIB_SDL2_NAME="Simple DirectMedia Layer version 2.x" +case "$HOST_SYSTEM" in + WINSCW|GCCE|ARMV5) + LIB_SDL2_DETECT="false" + ;; + Darwin) + if not have_framework SDL2; then + LIB_SDL2_DETECT="have_command sdl2-config" + LIB_SDL2_CFLAGS='$(sdl2-config --cflags)' + LIB_SDL2_LDFLAGS='$(sdl2-config --libs)' + LIB_SDL2_VERSION='$(sdl2-config --version)' + fi + LIB_SDL2_LDFLAGS="$LIB_SDL2_LDFLAGS -lobjc -framework Cocoa" + ;; + *) + LIB_SDL2_DETECT="have_command sdl2-config" + LIB_SDL2_CFLAGS='$(sdl2-config --cflags)' + LIB_SDL2_LDFLAGS='$(sdl2-config --libs)' + LIB_SDL2_VERSION='$(sdl2-config --version)' + ;; +esac + + +### libpng ### +LIB_libpng_NAME="libpng" +# libpng generally integrates with pkg-config, but that also generally +# only matters if we're building against a non-systemwide version. UQM +# should not need to do that. +# +# To link against a static libpng, set LDFLAGS with an appropriate -L +# argument before calling `build.sh uqm config`. +case "$HOST_SYSTEM" in + Darwin) + if not have_framework libpng; then + LIB_libpng_CFLAGS="" + LIB_libpng_LDFLAGS="-lpng" + fi + ;; + *) + LIB_libpng_CFLAGS="" + LIB_libpng_LDFLAGS="-lpng" + ;; +esac + + +### OpenAL ### +LIB_openal_NAME="OpenAL" +LIB_openal_CFLAGS="" +case "$HOST_SYSTEM" in + FreeBSD|OpenBSD) + LIB_openal_LDFLAGS="-L/usr/local/lib -pthread -lopenal" + ;; + MINGW32*|CYGWIN*|cegcc) + LIB_openal_LDFLAGS="-lopenal32" + ;; + Darwin) + LIB_openal_CFLAGS='' + LIB_openal_LDFLAGS="-framework OpenAL" + ;; + *) + LIB_openal_LDFLAGS="-lopenal" + ;; +esac +LIB_openal_VERSION="" +case "$HOST_SYSTEM" in + Darwin) + ## Apple does not ship pkg-config on Mac OSX + ;; + *) + LIB_openal_DETECT="try_pkgconfig_lib openal openal" + LIB_openal_DEPEND_DETECT_BIN="pkgconfig" + ;; +esac + + +### OpenGL ### +LIB_opengl_NAME="OpenGL" +case "$HOST_SYSTEM" in + FreeBSD|OpenBSD) + LIB_opengl_CFLAGS="-I/usr/X11R6/include -D_THREAD_SAFE" + LIB_opengl_LDFLAGS="-L/usr/X11R6/lib -lX11 -lXext -pthread -lGL" + ;; + MINGW32*|CYGWIN*|cegcc) + LIB_opengl_CFLAGS="" + LIB_opengl_LDFLAGS="-lopengl32" + ;; + Darwin) + LIB_opengl_CFLAGS="" + LIB_opengl_LDFLAGS="-framework OpenGL" + ;; + ARMV5|WINSCW|GCCE) + LIB_opengl_DETECT="false" + ;; + *) + LIB_opengl_CFLAGS="" + LIB_opengl_LDFLAGS="-lGL" + ;; +esac +LIB_opengl_VERSION="" + + +### Vorbisfile ### +LIB_vorbisfile_NAME="vorbisfile" +case "$HOST_SYSTEM" in + FreeBSD|OpenBSD) + LIB_vorbisfile_CFLAGS="-I/usr/local/include" + LIB_vorbisfile_LDFLAGS="-L/usr/local/lib -lvorbisfile -lvorbis" + ;; + MINGW32*|CYGWIN*|cegcc) + LIB_vorbisfile_CFLAGS="" + LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis -lm -logg" + ;; + Darwin) + if not have_framework vorbisfile Vorbis; then + LIB_vorbisfile_CFLAGS="-D__MACOSX__" + LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis" + fi + ;; + QNX) + LIB_vorbisfile_CFLAGS="" + LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis -logg -lm" + ;; + *) + LIB_vorbisfile_CFLAGS="" + LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis" + ;; +esac +LIB_vorbisfile_VERSION="" +case "$HOST_SYSTEM" in + ARMV5|WINSCW|GCCE) + LIB_vorbisfile_DETECT="false" + ;; + Darwin) + ## Apple does not ship pkg-config on Mac OSX + ;; + *) + LIB_vorbisfile_DETECT="try_pkgconfig_lib vorbisfile vorbisfile" + LIB_vorbisfile_DEPEND_DETECT_BIN="pkgconfig" + ;; +esac + + +### Tremor ### +LIB_tremor_NAME="tremor" +case "$HOST_SYSTEM" in + FreeBSD|OpenBSD) + LIB_tremor_CFLAGS="-I/usr/local/include" + LIB_tremor_LDFLAGS="-L/usr/local/lib -lvorbisidec" + ;; + Darwin) + if not have_framework tremor Tremor; then + # Assumed values - please let me know if you can verify this. + LIB_tremor_CFLAGS="" + LIB_tremor_LDFLAGS="-framework Tremor" + fi + ;; + ARMV5|WINSCW|GCCE) + LIB_tremor_DETECT="true" + ;; + *) + LIB_tremor_CFLAGS="" + LIB_tremor_LDFLAGS="-lvorbisidec" + ;; +esac +LIB_tremor_VERSION="" + + +### libmikmod ### +LIB_libmikmod_NAME="libmikmod" +case "$HOST_SYSTEM" in + ARMV5|WINSCW|GCCE) + LIB_libmikmod_DETECT="false" + ;; + *) + LIB_libmikmod_DETECT="have_command libmikmod-config" + LIB_libmikmod_CFLAGS="$(libmikmod-config --cflags)" + LIB_libmikmod_LDFLAGS="$(libmikmod-config --libs)" + LIB_libmikmod_VERSION="$(libmikmod-config --version)" + ;; +esac + + +### zlib ### +LIB_zlib_NAME="zlib" +LIB_zlib_CFLAGS="" +case "$HOST_SYSTEM" in + MINGW32*|CYGWIN*|cegcc) + LIB_zlib_LDFLAGS="-lzdll" + ;; + ARMV5|WINSCW|GCCE) + LIB_zlib_LDFLAGS="" + ;; + *) + LIB_zlib_LDFLAGS="-lz" + ;; +esac +LIB_zlib_VERSION="" +case "$HOST_SYSTEM" in + ARMV5|WINSCW|GCCE) + LIB_zlib_DETECT="true" + ;; + Darwin) + ## Apple does not ship pkg-config on Mac OSX + ;; + *) + LIB_zlib_DETECT="try_pkgconfig_lib zlib zlib" + LIB_zlib_DEPEND_DETECT_BIN="pkgconfig" + ;; +esac + + + +### pthread ### +LIB_pthread_NAME="pthread" +case "$HOST_SYSTEM" in + Linux) + LIB_pthread_CFLAGS="" + LIB_pthread_LDFLAGS="" + LIB_pthread_VERSION="" + ;; + FreeBSD|OpenBSD) + LIB_pthread_DETECT="have_command pthread-config" + LIB_pthread_CFLAGS="$(pthread-config --cflags)" + LIB_pthread_LDFLAGS="$(pthread-config --ldflags)" + LIB_pthread_VERSION="$(pthread-config --version)" + ;; + WINSCW|ARMV5|GCCE) + LIB_pthread_DETECT="true" + ;; + *) + LIB_pthread_CFLAGS="" + LIB_pthread_LDFLAGS="-lpthread" + LIB_pthread_VERSION="" + ;; +esac + + +# Additional platform-specific libraries for networking. +LIB_netlibs_NAME="Platform-specific network libraries" +case "$HOST_SYSTEM" in + SunOS) + LIB_netlibs_CFLAGS="" + LIB_netlibs_LDFLAGS="-lsocket" + LIB_netlibs_VERSION="" + ;; + ARMV5|WINSCW|GCCE) + LIB_netlibs_DETECT="false" + ;; +esac + + +############################################################################## +# Describe the symbols (possibly) used: # +############################################################################## + +HEADER_regex_EXTRA="#include <sys/types.h>" + +SYMBOL_readdir_r_EXTRA="#include <dirent.h>" + +SYMBOL_setenv_EXTRA="#include <stdlib.h>" + +SYMBOL_strcasecmp_EXTRA="#include <strings.h>" + +SYMBOL_strcasecmp_DEFNAME="HAVE_STRCASECMP_UQM" + # HAVE_STRCASECMP would conflict with SDL (SDL_config.h). + +SYMBOL_stricmp_EXTRA="#include <string.h>" + +SYMBOL_strupr_EXTRA="#include <string.h>" + +SYMBOL_wchar_t_EXTRA="#include <stddef.h>" + +SYMBOL_wint_t_EXTRA="#include <wchar.h>" + +SYMBOL_iswgraph_EXTRA="#include <wctype.h>" + +SYMBOL_getopt_long_EXTRA="#include <getopt.h>" + + diff --git a/build/unix/make/buildtools-armv5 b/build/unix/make/buildtools-armv5 new file mode 100644 index 0000000..bf73689 --- /dev/null +++ b/build/unix/make/buildtools-armv5 @@ -0,0 +1,17 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for ARM tools. + +include build/unix/make/buildtools-generic + +define act_mkdep_c + $(MKDEP_C) $(CFLAGS) -o "$(@D)/$(<F).o" "$<" --depend "$@" +endef + +define act_mkdep_cxx + $(MKDEP_CXX) $(CXXFLAGS) -o "$(@D)/$(<F).o" "$<" --depend "$@" +endef + +define act_link + $(LINK) --create "$@" $^ $(LDFLAGS) +endef + diff --git a/build/unix/make/buildtools-gcce b/build/unix/make/buildtools-gcce new file mode 100644 index 0000000..2a5b6ca --- /dev/null +++ b/build/unix/make/buildtools-gcce @@ -0,0 +1,8 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for GCCE tools. + +include build/unix/make/buildtools-generic + +define act_link + arm-none-symbianelf-ar cr "$@" $^ $(LDFLAGS) +endef diff --git a/build/unix/make/buildtools-generic b/build/unix/make/buildtools-generic new file mode 100644 index 0000000..b3ea464 --- /dev/null +++ b/build/unix/make/buildtools-generic @@ -0,0 +1,36 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for tools using a gcc-like syntax +# for arguments. + +define act_mkdep_c + $(MKDEP_C) $(CFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" +endef + +define act_mkdep_cxx + $(MKDEP_CXX) $(CXXFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" +endef + +define act_mkdep_m + $(MKDEP_OBJC) $(CFLAGS) "$<" -MT "$(@D)/$(<F).o" -MF "$@" +endef + +define act_windres + $(WINDRES) --include-dir $(dir $<) -o "$@" "$<" +endef + +define act_cc + $(COMPILE_C) -o "$@" $(CFLAGS) "$<" +endef + +define act_cxx + $(COMPILE_CXX) -o "$@" $(CXXFLAGS) "$<" +endef + +define act_objcc + $(COMPILE_OBJC) -o "$@" $(CFLAGS) "$<" +endef + +define act_link + $(LINK) -o "$@" $^ $(LDFLAGS) +endef + diff --git a/build/unix/make/buildtools-winscw b/build/unix/make/buildtools-winscw new file mode 100644 index 0000000..4a2b6bc --- /dev/null +++ b/build/unix/make/buildtools-winscw @@ -0,0 +1,19 @@ +# Definitions for build tools for the makefile used by the UQM build system. +# This file defines the build commands for Nokia CodeWarrior tools. + +include build/unix/make/buildtools-generic + +define act_mkdep_c + $(MKDEP_C) $(CFLAGS) "$<" -o "$@.tmp" + @echo -n "$(@D)/" > $@ + @cat "$@.tmp" >> $@ + @rm -f "$@.tmp" +endef + +define act_mkdep_cxx + $(MKDEP_C) $(CXXFLAGS) "$<" -o "$@.tmp" + @echo -n "$(@D)/" > $@ + @cat "$@.tmp" >> $@ + @rm -f "$@.tmp" +endef + diff --git a/build/unix/menu_functions b/build/unix/menu_functions new file mode 100644 index 0000000..8de5ff4 --- /dev/null +++ b/build/unix/menu_functions @@ -0,0 +1,662 @@ +# Auxiliary functions for menu system for custom build system +# Copyright (c) 2002 Serge van den Boom +# +# 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 + +MENU_ITEM_TYPES="MENU CHOICE INPUT CHECK" + +MENU_ITEM_TYPE_MENU_INIT=menu_init_menu +MENU_ITEM_TYPE_MENU_PRINT_VALUE=menu_print_value_menu +MENU_ITEM_TYPE_MENU_HANDLER=menu_handle_menu +MENU_ITEM_TYPE_MENU_SAVE=menu_save_menu +MENU_ITEM_TYPE_MENU_PROCESS=menu_process_menu + +MENU_ITEM_TYPE_CHOICE_INIT=menu_init_choice +MENU_ITEM_TYPE_CHOICE_PRINT_VALUE=menu_print_value_choice +MENU_ITEM_TYPE_CHOICE_HANDLER=menu_handle_choice +MENU_ITEM_TYPE_CHOICE_SAVE=menu_save_choice +MENU_ITEM_TYPE_CHOICE_PROCESS=menu_process_choice + +MENU_ITEM_TYPE_INPUT_INIT=menu_init_input +MENU_ITEM_TYPE_INPUT_PRINT_VALUE=menu_print_value_input +MENU_ITEM_TYPE_INPUT_HANDLER=menu_handle_input +MENU_ITEM_TYPE_INPUT_SAVE=menu_save_input +MENU_ITEM_TYPE_INPUT_PROCESS=menu_process_input + +MENU_ITEM_TYPE_CHECK_INIT=menu_init_check +MENU_ITEM_TYPE_CHECK_PRINT_VALUE=menu_print_value_check +MENU_ITEM_TYPE_CHECK_HANDLER=menu_handle_check +MENU_ITEM_TYPE_CHECK_SAVE=menu_save_check +MENU_ITEM_TYPE_CHECK_PROCESS=menu_process_check + +# Description: Check if a string can be used as a path. +# No checks are done if the path really exists. +# Arguments: $1 - the string to check +# Returns: 0 if the string makes a valid path +# 1 if the string doesn't make a valid path +# Outputs: the path, possibly modified +validate_path() { + if [ "$1" = "/" ]; then + echo "/" + return + fi + cat << EOF +${1%/} +EOF + return 0 +} + +# Description: Initialise a menu, setting unset values to default +# Arguments: $1 - the type of menu item +# $2 - the name of the menu item +menu_init() { + local INIT_FUN + + eval INIT_FUN="\$MENU_ITEM_TYPE_$1_INIT" + "$INIT_FUN" "$2" +} + +# Description: Initialise this menu +# Arguments: $1 - the name of the menu +menu_init_menu() { + local MENU TEMP_ITEMS ITEM TEMP_TYPE + + MENU="$1" + eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS" + for ITEM in $TEMP_ITEMS; do + eval TEMP_TYPE="\$MENU_${MENU}_ITEM_${ITEM}_TYPE" + if [ -z "$TEMP_TYPE" ]; then + echo "Fatal: \$MENU_${MENU}_ITEM_${ITEM}_TYPE is not defined!" >&2 + exit 1 + fi + menu_init "$TEMP_TYPE" "$ITEM" + done +} + +# Description: Check if this choice is available +# Arguments: $1 - the name of the choice menu +# $2 - the name of the choice +# Returns: 0 - if the choice is available +# 1 - if the choice is not available +menu_have_choice() { + local MENU CHOICE TEMP_VALID TEMP_PRECOND + MENU="$1" + CHOICE="$2" + eval TEMP_VALID="\$CHOICE_${MENU}_OPTION_${CHOICE}_VALID" + if [ -n "$TEMP_VALID" ]; then + return "$TEMP_VALID" + fi + eval TEMP_PRECOND="\$CHOICE_${MENU}_OPTION_${CHOICE}_PRECOND" + if [ -z "$TEMP_PRECOND" ] || $TEMP_PRECOND; then + eval "CHOICE_${MENU}_OPTION_${CHOICE}_VALID"=0 + return 0 + fi + eval "CHOICE_${MENU}_OPTION_${CHOICE}_VALID"=1 + return 1 +} + +# Description: Initialise this choice menu +# Arguments: $1 - the name of the choice menu +menu_init_choice() { + local MENU TEMP_VALUE TEMP_DEFAULT TEMP_OPTIONS OPTION TEMP_TITLE + MENU="$1" + eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE" + eval TEMP_DEFAULT="\$CHOICE_${MENU}_DEFAULT" + eval TEMP_OPTIONS="\$CHOICE_${MENU}_OPTIONS" + for OPTION in $TEMP_VALUE $TEMP_DEFAULT $TEMP_OPTIONS; do + if menu_have_choice "$MENU" "$OPTION"; then + eval CHOICE_${MENU}_VALUE="$OPTION" + eval CHOICE_${MENU}_OLD_VALUE="$OPTION" + return + fi + done + eval TEMP_VALUE="\$CHOICE_${MENU}_TITLE" + echo "Error: No option for '$TEMP_VALUE' is available for your system." + exit 1 +} + +# Description: Initialise this input menu +# Arguments: $1 - the name of the input menu +menu_init_input() { + local MENU TEMP_VALUE + MENU="$1" + eval TEMP_VALUE="\$INPUT_${MENU}_VALUE" + if [ -z "$TEMP_VALUE" ]; then + eval TEMP_VALUE="\$INPUT_${MENU}_DEFAULT" + eval INPUT_${MENU}_VALUE="\$TEMP_VALUE" + fi + eval INPUT_${MENU}_OLD_VALUE="\$TEMP_VALUE" +} + +# Description: Initialise this checkbox +# Arguments: $1 - the name of the checkbox +menu_init_check() { + local CHECKBOX TEMP_VALUE TEMP_DEFAULT + CHECKBOX="$1" + + eval TEMP_VALUE="\$CHECK_${CHECKBOX}_VALUE" + eval TEMP_DEFAULT="\$CHECK_${CHECKBOX}_DEFAULT" + + # Make sure the default is either 'CHECKED' or 'UNCHECKED' + case "$TEMP_DEFAULT" in + yes|Yes|YES|checked|Checked|CHECKED|1|true|True|TRUE) + TEMP_DEFAULT=CHECKED + ;; + *) + TEMP_DEFAULT=UNCHECKED + ;; + esac + eval CHECK_${CHECKBOX}_DEFAULT="\$TEMP_DEFAULT" + + if [ -z "$TEMP_VALUE" ]; then + TEMP_VALUE="$TEMP_DEFAULT" + eval CHECK_${CHECKBOX}_VALUE="\$TEMP_DEFAULT" + fi + eval CHECK_${CHECKBOX}_OLD_VALUE="\$TEMP_VALUE" +} + +# Description: Print the string describing the value of a menu item. +# Arguments: $1 - the type of menu item +# $2 - the name of the menu item +# Outputs: The string describing the value of the menu item +menu_print_value() { + local PRINT_VALUE + + eval PRINT_VALUE="\$MENU_ITEM_TYPE_$1_PRINT_VALUE" + "$PRINT_VALUE" "$2" +} + +# Description: Print the string describing the value of this menu +# Arguments: $1 - the name of the menu item +# Outputs: The string describing the value of this menu +menu_print_value_menu() { + echo "[...]" +} + +# Description: Print the string describing the value this choice menu +# Arguments: $1 - the name of the choice menu item +# Outputs: The string describing the value of this choice menu +menu_print_value_choice() { + local TEMP_VALUE TEMP_TITLE + eval TEMP_VALUE="\$CHOICE_$1_VALUE" + eval TEMP_TITLE=\"\$CHOICE_$1_OPTION_${TEMP_VALUE}_TITLE\" + cat << EOF +$TEMP_TITLE +EOF +} + +# Description: Print the value of this input menu +# Arguments: $1 - the name of the input menu item +# Outputs: The value of the given input menu +menu_print_value_input() { + local TEMP_VALUE + eval TEMP_VALUE="\$INPUT_$1_VALUE" + cat << EOF +$TEMP_VALUE +EOF +} + +# Description: Print the value of this checkbox +# Arguments: $1 - the name of the checkbox item +# Outputs: The value of the given checkbox +menu_print_value_check() { + local TEMP_VALUE TEMP_DEFAULT TEMP_FIXED RESULT EXTRA + eval TEMP_VALUE="\$CHECK_$1_VALUE" + eval TEMP_DEFAULT="\$CHECK_$1_DEFAULT" + eval TEMP_FIXED="\$CHECK_$1_FIXED" + + if [ "$TEMP_VALUE" = "CHECKED" ]; then + RESULT="Yes" + else + RESULT="No" + fi + + EXTRA="" + if [ "$TEMP_VALUE" = "$TEMP_DEFAULT" ]; then + EXTRA="default" + fi + + if [ "$TEMP_FIXED" = "TRUE" ]; then + EXTRA="${EXTRA:+$EXTRA, }unchangable" + fi + + RESULT="$RESULT${EXTRA:+ ($EXTRA)}" + echo "$RESULT" +} + +# Description: Print the string describing the value of a menu item. +# Arguments: $1 - the type of menu item +# $2 - the name of the menu item +# Outputs: The string describing the value of the menu item +menu_handle() { + local HANDLER + + eval HANDLER="\$MENU_ITEM_TYPE_$1_HANDLER" + "$HANDLER" "$2" +} + +# Description: Process a menu-type menu item +# Arguments: $1 - The name of the menu +menu_handle_menu() { + local TEMP_ITEMS I CHOICE NUM_ITEMS TEMP_TYPE MENU ITEM TEMP_TITLE \ + TEMP_TEXT + eval TEMP_ITEMS="\$MENU_$1_ITEMS" + eval TEMP_TEXT="\$MENU_$1_TEXT" + + MENU="$1" + while :; do + echo + eval TEMP_TITLE="\$MENU_${MENU}_TITLE" + cat << EOF + $ANSI_BOLD-= $TEMP_TITLE =-$ANSI_NORMAL +EOF + + if [ -n "$TEMP_TEXT" ]; then + cat << EOF +$TEMP_TEXT +EOF + fi + + # Count the number of options + I=0 + for ITEM in $TEMP_ITEMS; do + I=$(($I + 1)) + done + NUM_ITEMS="$I" + + I=0 + for ITEM in $TEMP_ITEMS; do + I=$(($I + 1)) + eval TEMP_TYPE="\$MENU_${MENU}_ITEM_${ITEM}_TYPE" + eval TEMP_TITLE="\$${TEMP_TYPE}_${ITEM}_TITLE" + printf " %${#NUM_ITEMS}i. %-36s %s\n" $I "$TEMP_TITLE" \ + "$(menu_print_value $TEMP_TYPE $ITEM)" + done + + echo + echo "Press a number plus <ENTER> if you want to change something, " + $ECHON "or just <ENTER> if everything is ok: " + read CHOICE + + # Check if the choice was empty + if [ -z "$CHOICE" ]; then + # We're done + return + fi + + # Check if what the user entered was a number + egrep '^[0-9]+$' << EOF > /dev/null +$CHOICE +EOF + if [ $? -ne 0 ]; then + echo "Invalid choice." + continue + fi + + # Check if the number the user entered if valid + if [ "$CHOICE" -lt 1 -o "$CHOICE" -gt "$NUM_ITEMS" ]; then + echo "Invalid choice." + continue + fi + + # Now look up the choice + I=0 + for ITEM in $TEMP_ITEMS; do + I=$(($I + 1)) + if [ "$I" -eq "$CHOICE" ]; then + eval TEMP_TYPE="\$MENU_${MENU}_ITEM_${ITEM}_TYPE" + menu_handle "$TEMP_TYPE" "$ITEM" + break + fi + done + done +} + +# Description: Process a choice-type menu item +# Arguments: $1 - The name of the menu +menu_handle_choice() { + local TEMP_OPTIONS I CHOICE NUM_OPTIONS TEMP_TYPE MENU OPTION \ + TEMP_VALUE TEMP_TITLE SELECTED TEMP_TEXT + eval TEMP_OPTIONS="\$CHOICE_$1_OPTIONS" + eval TEMP_TEXT="\$CHOICE_$1_TEXT" + + MENU="$1" + while :; do + echo + eval TEMP_TITLE="\$CHOICE_${MENU}_TITLE" + cat << EOF + $ANSI_BOLD-= $TEMP_TITLE =-$ANSI_NORMAL +EOF + if [ -n "$TEMP_TEXT" ]; then + cat << EOF +$TEMP_TEXT +EOF + fi + + eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE" + + # Check in advance which options are present, so that that + # is echoed before the menu is printed. + # menu_have_choice caches results. + # Also, count the number of options + I=0 + for OPTION in $TEMP_OPTIONS; do + I=$(($I + 1)) + menu_have_choice "$MENU" "$OPTION" + done + NUM_OPTIONS="$I" + + I=0 + for OPTION in $TEMP_OPTIONS; do + I=$(($I + 1)) + eval TEMP_TITLE="\$CHOICE_${MENU}_OPTION_${OPTION}_TITLE" + if [ "$TEMP_VALUE" = "$OPTION" ]; then + SELECTED="-->" + else + SELECTED=" " + fi + if menu_have_choice "$MENU" "$OPTION"; then + printf " %${#NUM_OPTIONS}i. %s %s\n" "$I" "$SELECTED" \ + "$TEMP_TITLE" + else + printf " %-${#NUM_OPTIONS}s %s (N/A) %s\n" "-" \ + "$SELECTED" "$TEMP_TITLE" + fi + done + + echo + echo "Select the option you want by typing a number plus <ENTER>" + $ECHON "or just <ENTER> if everything is ok: " + read CHOICE + echo + + # Check if the choice was empty + if [ -z "$CHOICE" ]; then + # We're done + return + fi + + # Check if what the user entered was a number + egrep '^[0-9]+$' << EOF > /dev/null +$CHOICE +EOF + if [ $? -ne 0 ]; then + echo "Invalid choice." + continue + fi + + # Check if the number the user entered if valid + if [ "$CHOICE" -lt 1 -o "$CHOICE" -gt "$NUM_ITEMS" ]; then + echo "Invalid choice." + continue + fi + + # Now look up the choice + I=0 + for OPTION in $TEMP_OPTIONS; do + I=$(($I + 1)) + if [ "$I" -eq "$CHOICE" ]; then + if menu_have_choice "$MENU" "$OPTION"; then + eval "CHOICE_${MENU}_VALUE"="$OPTION" + return + else + echo "That option is unavailable on your system." + fi + fi + done + done +} + +# Description: Process an input-type menu item +# Arguments: $1 - The name of the menu +menu_handle_input() { + local ITEM TEMP_TITLE TEMP_VALUE TEMP_DEFAULT NEW_VALUE \ + TEMP_VALIDATOR TEMP_TEXT + + ITEM="$1" + eval TEMP_TITLE="\$INPUT_${ITEM}_TITLE" + eval TEMP_TEXT="\$INPUT_${ITEM}_TEXT" + + while :; do + echo + cat << EOF + $ANSI_BOLD-= $TEMP_TITLE =-$ANSI_NORMAL +EOF + + if [ -n "$TEMP_TEXT" ]; then + cat << EOF +$TEMP_TEXT +EOF + fi + + eval TEMP_VALUE="\$INPUT_${ITEM}_VALUE" + eval TEMP_DEFAULT="\$INPUT_${ITEM}_DEFAULT" + echo " Default value: $TEMP_DEFAULT" + echo " Current value: $TEMP_VALUE" + $ECHON " New value: " + read NEW_VALUE + + # If no new value is entered, keep the old one. + if [ -z "$NEW_VALUE" ]; then + return + fi + + # If a validator function is present, validate the new value + eval TEMP_VALIDATOR="\$INPUT_${ITEM}_VALIDATOR" + if [ -n "$TEMP_VALIDATOR" ]; then + NEW_VALUE=`$TEMP_VALIDATOR "$NEW_VALUE"` + if [ $? -ne 0 ]; then + echo "Invalid value" + continue + fi + fi + break + done + eval "INPUT_${ITEM}_VALUE"=\"\$NEW_VALUE\" +} + +# Description: Process an checkbox-type menu item +# Arguments: $1 - The name of the checkbox +menu_handle_check() { + local CHECKBOX OLD_VALUE NEW_VALUE TEMP_FIXED + + CHECKBOX="$1" + eval TEMP_FIXED="\$CHECK_${CHECKBOX}_FIXED" + + if [ "$TEMP_FIXED" = "TRUE" ]; then + # Unchangable + return; + fi + + eval OLD_VALUE="\$CHECK_${CHECKBOX}_VALUE" + if [ "$OLD_VALUE" = "CHECKED" ]; then + NEW_VALUE="UNCHECKED" + else + NEW_VALUE="CHECKED" + fi + eval "CHECK_${CHECKBOX}_VALUE"=\"\$NEW_VALUE\" +} + +# Description: echo the current state of a menu item in a form that can be +# executed to restore the state. +# Arguments: $1 - the type of menu item +# $2 - the name of the menu item +# Outputs: The string describing the value of the menu item +menu_save() { + local SAVE_FUN + eval SAVE_FUN="\$MENU_ITEM_TYPE_$1_SAVE" + "$SAVE_FUN" "$2" +} + +# Description: echo the current state of a menu in a form that can be +# executed to restore the state. +# Arguments: $1 - the name of the menu +# Outputs: The string describing the value of the menu +menu_save_menu() { + local MENU TEMP_ITEMS ITEM TEMP_TYPE + + MENU="$1" + eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS" + for ITEM in $TEMP_ITEMS; do + eval TEMP_TYPE="\$MENU_${MENU}_ITEM_${ITEM}_TYPE" + menu_save "$TEMP_TYPE" "$ITEM" + done +} + +# Description: echo the current state of a choice menu in a form that can be +# executed to restore the state. +# Arguments: $1 - the name of the choice menu +# Outputs: The string describing the value of the choice menu +menu_save_choice() { + local MENU TEMP_VALUE + MENU="$1" + eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE" + cat << EOF +CHOICE_${MENU}_VALUE='$TEMP_VALUE' +EOF +} + +# Description: echo the current state of an input menu in a form that can be +# executed to restore the state. +# Arguments: $1 - the name of the input menu +# Outputs: The string describing the value of the input menu +menu_save_input() { + local MENU TEMP_VALUE + MENU="$1" + eval TEMP_VALUE="\$INPUT_${MENU}_VALUE" + cat << EOF +INPUT_${MENU}_VALUE='$TEMP_VALUE' +EOF +} + +# Description: echo the current state of an check box in a form that can be +# executed to restore the state. +# Arguments: $1 - the name of the checkbox +# Outputs: The string describing the value of the checkbox +menu_save_check() { + local CHECKBOX TEMP_VALUE + CHECKBOX="$1" + eval TEMP_VALUE="\$CHECK_${CHECKBOX}_VALUE" + cat << EOF +CHECK_${CHECKBOX}_VALUE='$TEMP_VALUE' +EOF +} + +# Description: Perform the actions associated with the choice made for a +# menu items. +# Arguments: $1 - the type of menu item +# $2 - the name of the menu item +menu_process() { + local PROCESS_FUN + eval PROCESS_FUN="\$MENU_ITEM_TYPE_$1_PROCESS" + "$PROCESS_FUN" "$2" +} + +# Description: Perform the actions associated with the chosen menu items +# for a menu. +# Arguments: $1 - the name of the menu +menu_process_menu() { + local MENU TEMP_ITEMS ITEM TEMP_TYPE + + MENU="$1" + eval TEMP_ITEMS="\$MENU_${MENU}_ITEMS" + for ITEM in $TEMP_ITEMS; do + eval TEMP_TYPE="\$MENU_${MENU}_ITEM_${ITEM}_TYPE" + menu_process "$TEMP_TYPE" "$ITEM" + done +} + +# Description: Perform the actions associated with the choice made for +# a choice menu. +# Arguments: $1 - the name of the choice menu +menu_process_choice() { + local MENU TEMP_VALUE TEMP_ACTION + MENU="$1" + eval TEMP_VALUE="\$CHOICE_${MENU}_VALUE" + eval TEMP_ACTION="\$CHOICE_${MENU}_OPTION_${TEMP_VALUE}_ACTION" + if [ -n "$TEMP_ACTION" ]; then + $TEMP_ACTION + fi +} + +# Description: Perform the actions associated with the input menu. +# Arguments: $1 - the name of the input menu +menu_process_input() { + # Nothing to do + : +} + +# Description: Perform the actions associated with the status of a +# check box. +# Arguments: $1 - the name of the check box +menu_process_check() { + local CHECKBOX TEMP_VALUE TEMP_ACTION + CHECKBOX="$1" + eval TEMP_VALUE="\$CHECK_${CHECKBOX}_VALUE" + eval TEMP_ACTION="\$CHECK_${CHECKBOX}_OPTION_${TEMP_VALUE}_ACTION" + if [ -n "$TEMP_ACTION" ]; then + $TEMP_ACTION + fi +} + +# Description: Start processing a menu +# Arguments: $1 - the type of the main menu +# $2 - the name of the main menu +do_menu() { + local MENU_TYPE START_MENU SAVE_FILE + + MENU_TYPE=$1 + START_MENU=$2 + + menu_init "$MENU_TYPE" "$START_MENU" + menu_handle "$MENU_TYPE" "$START_MENU" + echo +} + +# Description: Load the menu settings from file +# Arguments: $1 - the type of the menu (currently ignored) +# $2 - the name of the menu (currently ignored) +# $3 - the name of the file to load from +# Returns: 0 - if the file was loaded successfully +# 1 - if the file did not exist +do_menu_load() { + SAVE_FILE=$3 + + if [ ! -e "$SAVE_FILE" ]; then + return 1 + fi + + . "$SAVE_FILE" + return 0 +} + +# Description: Save the menu settings to file +# Arguments: $1 - the type of the menu +# $2 - the name of the menu +# $3 - the name of the file to save to +# Returns: 0 - if the file was saved successfully +do_menu_save() { + MENU_TYPE=$1 + START_MENU=$2 + SAVE_FILE=$3 + + echo "Saving choices..." + menu_save "$MENU_TYPE" "$START_MENU" > "$SAVE_FILE" + return 0 +} + + + + diff --git a/build/unix/recurse b/build/unix/recurse new file mode 100755 index 0000000..0d39efa --- /dev/null +++ b/build/unix/recurse @@ -0,0 +1,88 @@ +#!/bin/sh + +# Generic code for traversing the source code directory structure according to +# the Makeinfo files. + +usage() { + cat << EOF +Usage: + recurse <project> <root> + +With the parameters: + <project> + The name identifying the project, used as prefix in variables in + 'Makeproject' and 'Makeinfo'. + + <root> + The root directory, containing 'Makeproject'. +EOF +} + +if [ $# -ne 2 ]; then + usage >&2 + exit 1 +fi + +BUILD_PROJECT=$1 +BUILD_ROOT=${2%/}/ + +# $1 - The prefix up to this point +# $2 - The name of the current subdir +recurse_subdir() { + local REC_PREFIX SUBDIRS SUBDIR CFILES CXXFILES HFILES MFILES RCFILES FILE + eval local ${BUILD_PROJECT}_CFILES \ + ${BUILD_PROJECT}_CXXFILES \ + ${BUILD_PROJECT}_HFILES \ + ${BUILD_PROJECT}_MFILES \ + ${BUILD_PROJECT}_RCFILES \ + ${BUILD_PROJECT}_SUBDIRS + + REC_PREFIX="$1$2/" + if [ "$REC_PREFIX" = "/" ]; then + REC_PREFIX= + fi + + eval ${BUILD_PROJECT}_CFILES= + eval ${BUILD_PROJECT}_CXXFILES= + eval ${BUILD_PROJECT}_HFILES= + eval ${BUILD_PROJECT}_MFILES= + eval ${BUILD_PROJECT}_RCFILES= + eval ${BUILD_PROJECT}_SUBDIRS= + + . "${BUILD_ROOT}${REC_PREFIX}Makeinfo" + + eval CFILES=\$${BUILD_PROJECT}_CFILES + eval CXXFILES=\$${BUILD_PROJECT}_CXXFILES + eval HFILES=\$${BUILD_PROJECT}_HFILES + eval MFILES=\$${BUILD_PROJECT}_MFILES + eval RCFILES=\$${BUILD_PROJECT}_RCFILES + + for FILE in $CFILES; do + echo "C ${OBJDIR}${REC_PREFIX}$FILE" + done + for FILE in $CXXFILES; do + echo "CXX ${OBJDIR}${REC_PREFIX}$FILE" + done + for FILE in $HFILES; do + echo "H ${OBJDIR}${REC_PREFIX}$FILE" + done + for FILE in $MFILES; do + echo "M ${OBJDIR}${REC_PREFIX}$FILE" + done + for FILE in $RCFILES; do + echo "RC ${OBJDIR}${REC_PREFIX}$FILE" + done + + eval SUBDIRS=\$${BUILD_PROJECT}_SUBDIRS + + for SUBDIR in $SUBDIRS; do + echo "DIRIN ${OBJDIR}${REC_PREFIX}$SUBDIR" + recurse_subdir "$REC_PREFIX" "$SUBDIR" + echo "DIROUT ${OBJDIR}${REC_PREFIX}$SUBDIR" + done +} + +. "${BUILD_ROOT}Makeproject" + +recurse_subdir "" "" + diff --git a/build/unix/todo b/build/unix/todo new file mode 100644 index 0000000..d156e61 --- /dev/null +++ b/build/unix/todo @@ -0,0 +1,15 @@ +- flag for an option to set if changing it will trigger a new 'make depend' +- same for 'make clean' +- Specify files to be removed on clean. +- static compilationa (?) +- Let the dependency index depend on the Makeinfo files + (What about the internal dependencies among Makeinfo) + +some docs +- uqm_LDFLAGS etc are only relevant in the top dir +- some variables are 'inherited' from parent dir + update: this is not true anymore. The behavior was not needed and + would just complicate things. +- files are sourced (.) + + diff --git a/build/unix/uqm-wrapper.in b/build/unix/uqm-wrapper.in new file mode 100755 index 0000000..262f7f4 --- /dev/null +++ b/build/unix/uqm-wrapper.in @@ -0,0 +1,4 @@ +#!/bin/sh +# Wrapper script for starting The Ur-Quan Masters +exec "@INSTALL_LIBDIR@uqm/uqm" "--contentdir=@INSTALL_SHAREDIR@uqm/content" "$@" + diff --git a/build/unix_installer/README b/build/unix_installer/README new file mode 100644 index 0000000..23122d3 --- /dev/null +++ b/build/unix_installer/README @@ -0,0 +1,3 @@ +This directory contains files pertaining to generating self-extracting +installer files for unix-like platforms. + diff --git a/build/unix_installer/USAGE b/build/unix_installer/USAGE new file mode 100644 index 0000000..c73ca8c --- /dev/null +++ b/build/unix_installer/USAGE @@ -0,0 +1,14 @@ +Making a release binary: + +- Build the game in release mode. + +- Change build/unix_installer/template to suit your needs. + +- From the 'sc2' dir of the svn tree, run the following command, changing + the arguments if necessary. + The first one is the name of the final executable, the second + the template to use. + + build/unix_installer/buildinstaller.sh uqm-0.2-linux-dynamic.sh \ + "build/unix_installer/template" + diff --git a/build/unix_installer/buildinstaller.sh b/build/unix_installer/buildinstaller.sh new file mode 100755 index 0000000..1a14aac --- /dev/null +++ b/build/unix_installer/buildinstaller.sh @@ -0,0 +1,107 @@ +#!/bin/sh +# Script for creating self-extracting installer files for unix-like systems. +# By Serge van den Boom, 2003-02-20 + +TEMPDIR="/tmp/buildinstaller_$$" + +if [ $# -ne 2 ]; then + cat >&2 << EOF +Usage: buildinstaller.sh <installername> <template> +where 'installername' is the name you want to give the final installer +and 'template' is the template file describing the installer. +EOF + exit 1 +fi +DESTFILE="$1" +TEMPLATE="$2" + +if [ ! -d src -o ! -d build ]; then +cat >&2 << EOF +Error: The current directory should be the top of the cvs tree. + Please try again from that dir +EOF + exit 1 +fi + +if [ ! -f uqm ]; then + cat >&2 << EOF +Error: There should be an 'uqm' binary in the top of the cvs tree. + please recompile and try again. +EOF + exit 1 +fi + +mkdir "$TEMPDIR" 2> /dev/null + +if [ "$?" -ne 0 ]; then + echo "Could not create temporary dir." >&2 + exit 1 +fi + +. "$TEMPLATE" + +while read FILE DEST; do + DESTDIR="${TEMPDIR}/attach/${DEST%/*}" + if [ ! -d "$DESTDIR" ]; then + mkdir -p -- "$DESTDIR" || exit 1 + fi + cp -- "$FILE" "${TEMPDIR}/attach/$DEST" || exit 1 +done << EOF +$UQM_ATTACH_FILES +EOF + +chmod -R go+rX "${TEMPDIR}/attach" + +echo "Making tar.gz file for everything except from the content." +echo "Using maximum compression; this may take a moment." +tar -c -C "${TEMPDIR}/attach/" -f - . | gzip -9 > "${TEMPDIR}/attach.tar.gz" + +{ + cat << EOF +UQM_VERSION="$UQM_VERSION" +UQM_PACKAGES="$UQM_PACKAGES" +EOF + for PACKAGE in $UQM_PACKAGES; do + eval PACKAGE_NAME="\$UQM_PACKAGE_${PACKAGE}_NAME" + eval PACKAGE_TITLE="\$UQM_PACKAGE_${PACKAGE}_TITLE" + eval PACKAGE_LOCATION="\$UQM_PACKAGE_${PACKAGE}_LOCATION" + eval PACKAGE_OPTIONAL="\$UQM_PACKAGE_${PACKAGE}_OPTIONAL" + eval PACKAGE_DEFAULT="\$UQM_PACKAGE_${PACKAGE}_DEFAULT" + cat << EOF +UQM_PACKAGE_${PACKAGE}_NAME="$PACKAGE_NAME" +UQM_PACKAGE_${PACKAGE}_TITLE="$PACKAGE_TITLE" +UQM_PACKAGE_${PACKAGE}_LOCATION="$PACKAGE_LOCATION" +UQM_PACKAGE_${PACKAGE}_OPTIONAL="$PACKAGE_OPTIONAL" +UQM_PACKAGE_${PACKAGE}_DEFAULT="$PACKAGE_DEFAULT" +EOF + done +} > "${TEMPDIR}/packages" + +# A slow way, but a reliable way. +ATTACHLEN=`wc -c < "${TEMPDIR}/attach.tar.gz"` + +LICENSE_TEXT="$(cat $UQM_LICENSE_FILE)" + +# Now we've got all the parts, we can make the final .sh file. +echo "Making final executable." +{ + for SCRIPT in ${TEMPDIR}/packages $UQM_SCRIPT_FILES; do + echo "# --- Start ${SCRIPT##*/} ---" + # Very ugly, but I can't get sed to replace a pattern by the contents + # of a file. + FILEDATA="$(cat $SCRIPT)" + sed -e "s/@ATTACHLEN@/$ATTACHLEN/" \ + -e "s/@CONTENT_FILES@/$CONTENT_FILES/" << EOF +${FILEDATA/@LICENCE@/$LICENSE_TEXT} +EOF + echo "# --- End ${SCRIPT##*/} ---" + done + cat "${TEMPDIR}/attach.tar.gz" +} > "$DESTFILE" + +chmod 755 "$DESTFILE" + +rm -r -- "$TEMPDIR" + +echo "Done." + diff --git a/build/unix_installer/copy_mac_frameworks.pl b/build/unix_installer/copy_mac_frameworks.pl new file mode 100755 index 0000000..8ced8f0 --- /dev/null +++ b/build/unix_installer/copy_mac_frameworks.pl @@ -0,0 +1,128 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use File::Basename; +use Cwd 'abs_path'; + +my @frameworks = ( 'Ogg', 'Vorbis', 'libpng', 'SDL2' ); +my $target = 'The Ur-Quan Masters'; + +create_app_bundle_skeleton($target); +copy_with_version("src/res/darwin/Info.plist", "$target.app/Contents/Info.plist"); +copy_file("src/res/darwin/PkgInfo", "$target.app/Contents"); +copy_file("src/res/darwin/The Ur-Quan Masters.icns", "$target.app/Contents/Resources"); +copy_file("content/version", "$target.app/Contents/Resources/content"); +opendir my $packagedir, "dist-packages/" or die "Could not open dist-packages directory"; +while (readdir $packagedir) { + if (/\.uqm$/) { + copy_file("dist-packages/$_", "$target.app/Contents/Resources/content/packages"); + } +} +copy_file("uqm", "$target.app/Contents/MacOS/$target"); +copy_frameworks($target, @frameworks); +relink_frameworks($target, @frameworks); + + +sub create_app_bundle_skeleton { + my $target = shift; + mkdir("$target.app", 0755); + mkdir("$target.app/Contents", 0755); + mkdir("$target.app/Contents/Frameworks", 0755); + mkdir("$target.app/Contents/MacOS", 0755); + mkdir("$target.app/Contents/Resources", 0755); + mkdir("$target.app/Contents/Resources/content", 0755); + mkdir("$target.app/Contents/Resources/content/addons", 0755); + mkdir("$target.app/Contents/Resources/content/packages", 0755); +} + + +sub copy_frameworks { + my $target = shift; + foreach my $fw (@_) { + my $src = "/Library/Frameworks/$fw.framework"; + my $dest = "$target.app/Contents/Frameworks/$fw.framework"; + system("ditto \"$src\" \"$dest\""); + } +} + +sub resolve_symlinks { + my $file = shift; + my $origFile = $file; + my $startWd = `pwd`; + chomp($startWd); + + while (-l $file) { + my $nextPath = readlink($file); + my $origDir = dirname($file); + chdir($origDir); + $file = abs_path($nextPath); + } + chdir($startWd); + return $file; +} + +sub relink_frameworks { + my $target = shift; + my @frameworks = @_; + my $execfile = "$target.app/Contents/MacOS/$target"; + + foreach my $fw (@frameworks) { + my $src = resolve_symlinks("$target.app/Contents/Frameworks/$fw.framework/$fw"); + my $oldfwid = `otool -L '$src' | head -n 2 | tail -n 1`; + $oldfwid =~ s/^\s+//; + $oldfwid =~ s/\s.*$//g; + my $newfwid = $oldfwid; + $newfwid =~ s/^.*\/$fw.framework/\@executable_path\/..\/Frameworks\/$fw.framework/; + + system("install_name_tool -id $newfwid \"$src\""); + foreach my $fw2 (@frameworks) { + next if $fw eq $fw2; + my $src2 = resolve_symlinks("$target.app/Contents/Frameworks/$fw2.framework/$fw2"); + system("install_name_tool -change $oldfwid $newfwid \"$src2\""); + } + system("install_name_tool -change $oldfwid $newfwid \"$execfile\""); + } +} + + +sub get_uqm_version { + open(my $versionheader, "<", "src/uqmversion.h") or die "Could not find version file"; + my $major_version = 0; + my $minor_version = 0; + my $patch_version = 0; + while (<$versionheader>) { + if (/^\s*#define\s+UQM_MAJOR_VERSION\s+(\d+)/) { + $major_version = $1; + } + if (/^\s*#define\s+UQM_MINOR_VERSION\s+(\d+)/) { + $minor_version = $1; + } + if (/^\s*#define\s+UQM_PATCH_VERSION\s+(\d+)/) { + $patch_version = $1; + } + } + close($versionheader) or warn "Could not close version file"; + return "${major_version}.${minor_version}.${patch_version}"; +} + + +sub copy_file { + my $src = shift; + my $dest = shift; + system("cp \"$src\" \"$dest\""); +} + +sub copy_with_version { + my ($src, $dest) = @_; + my $uqmversion = get_uqm_version(); + open (SRCFILE, "<", $src) or die "Could not open source file '$src'"; + open (DESTFILE, ">", $dest) or die "Could not open destination file '$dest'"; + while (<SRCFILE>) { + s/\@\@VERSION\@\@/$uqmversion/g; + print DESTFILE; + } + close(DESTFILE) or warn "Could not close destination file"; + close(SRCFILE) or warn "Could not close source file"; +} diff --git a/build/unix_installer/install.sh.in b/build/unix_installer/install.sh.in new file mode 100644 index 0000000..d89ba03 --- /dev/null +++ b/build/unix_installer/install.sh.in @@ -0,0 +1,277 @@ +#!/bin/sh +# Installation program for binaries. +# By Serge van den Boom, 2002-11-26 + +quithandler() { + echo + echo "Bye." + trap INT + kill -INT $$ +} + +trap quithandler INT + +umask 022 + +cat << EOF +-== The Ur-Quan Masters installation ==- + +Hi, I'm your friendly neighbourhood installation program. +I will make you very happy, but first, we've got some business to take +care of. + +EOF + +PAGER="${PAGER:-more}" +type "$PAGER" > /dev/null 2>&1 +if [ "$?" -ne 0 ]; then + cat << EOF +I can't find a good pager. I need one. Sorry. Here's your prompt back. +EOF + exit 1 +fi + +type unzip > /dev/null 2>&1 +if [ "$?" -ne 0 ]; then + cat << EOF +I need 'unzip' for unzipping things. You don't seem to have it. +That means no unzipping for me. And no The Ur-Quan Masters for you. +And that's really not acceptable, is it? So I hope you'll install it +soon. That way we'll both be happy. +EOF + exit 1 +fi + +echo "I need to show you something. I don't want to, but I have to." +echo "Press enter when you're ready." +read TEMP + +$PAGER << "EOF" +@LICENCE@ +EOF +echo "That's hard reading, isn't it? But it's pretty important stuff. " +echo -n "Now, the big question is, do you agree to it? " +while :; do + read TEMP + case "$TEMP" in + [yY][eE][sS]|[aA][gG][rR][eE][eE]) + echo "Good. Now we can be friends." + break + ;; + [nN][oO]) + cat << EOF +No? You're sure you didn't mean 'yes'? You do realise I can't let you pass +now? Oh well, come back if you change your mind. I'm not going anywhere. +I AM not going anywere, right? +EOF + exit 0 + ;; + *) + echo -n "Hmm... Please type 'Yes' or 'No': " + ;; + esac +done +echo + +cat << EOF +Now I need somewhere to put all those Ur-Quan Masters files. +My invisible friend tells me $INPUT_install_prefix_DEFAULT is a good place. +I would put an executable there in a bin/ dir and a lot of junk together +in a subdir under share/ and a little bit in a subdir under lib/ +But you're the boss, so where shall I put them?" +EOF +while :; do + show_install_prefix_menu + echo + + PREFIX="$INPUT_install_prefix_VALUE" + if [ "$PREFIX" = "/dev/null" ]; then + echo "Ok, done. That was quick, wasn't it? Well, have fun." + echo + exit 0 + fi + + if [ ! -d "$PREFIX" ]; then +cat << EOF +There's no such directory. If you want me to stuff it all in /dev/null, +just say so. No need to toy with me. +Then again, I could create that directory for you. +EOF + echo -n "Would you like that? " + + read TEMP2 + echo + case "$TEMP2" in + y|Y|yes|Yes|YES) + mkdir -p "$PREFIX" 2> /dev/null + if [ "$?" -gt 0 ]; then + cat << EOF +I cannot do it, captain! I don't have enough power! +Erm... I mean 'permission denied'. Sorry about that. +I guess we'll need to find another place. +EOF + echo "So what shall it be?" + else + cat << EOF +Ok, I've created that dir for you, even though it isn't in my job +description. Now let's get on with the copying. +EOF + break; + fi + ;; + n|N|no|No|NO) + echo "Great! That saves me some work." + echo "Then where DO you want me to put my files?" + echo "I promise I'll handle them with care." + ;; + *) + echo "I'll take that as a 'no'." + echo -n "So, where should I put my files?" + ;; + esac + continue + fi + + if [ ! -w "$PREFIX" ]; then +cat << EOF +Ooh, a very fine place indeed. Unfortunately it's not your fine place. +You can't write there, and for some strange cosmological coincidence, +neither can I. I think we need another place." +EOF + echo "So, what shall it be?" + continue + fi + break +done +cat << EOF +$PREFIX it is. I can work with that. + +EOF + +if [ -d "${PREFIX}/share/uqm/content" ]; then + if [ -f "${PREFIX}/share/uqm/content/version" ]; then + read UQM_OLDVERSION < "${PREFIX}/share/uqm/content/version" + else + UQM_OLDVERSION=0.1 + fi + if [ `expr "$UQM_VERSION" ">" "$UQM_OLDVERSION"` = "1" ]; then + # NB: 'expr' echoes '1' for true, while sh uses '0' + echo "Hey! I see you've got an old version there." + echo "You'll be happy to know this one is even better." + echo "(yes, this is a hardcoded string in the installer)" + echo + UQM_INSTALL=UPGRADE + elif [ `expr "$UQM_VERSION" "<" "$UQM_OLDVERSION"` = "1" ]; then + UQM_INSTALL=DOWNGRADE + else + UQM_INSTALL=REINSTALL + fi +else + UQM_INSTALL=NEW +fi + +check_content_path() { + local OPTIONAL TITLE HAVE FAIL + + echo "Looking for packages to install..." + FAIL="0" + for PACKAGE in $UQM_PACKAGES; do + eval OPTIONAL="\$UQM_PACKAGE_${PACKAGE}_OPTIONAL" + eval TITLE="\$UQM_PACKAGE_${PACKAGE}_TITLE" + package_available "$PACKAGE" + HAVE="$?" + echo -n "- Package for '$TITLE'" + if [ "$OPTIONAL" = TRUE ]; then + echo -n " (optional)" + else + echo -n " (required)" + fi + + if [ "$HAVE" -eq 0 ]; then + echo " found." + continue + fi + echo " not found." + + if [ "$OPTIONAL" = FALSE ]; then + FAIL=1 + fi + done + return "$FAIL" +} + +CONTENT_PATH="$INPUT_content_path_DEFAULT" +check_content_path +if [ "$?" -ne 0 ]; then + cat << EOF +I haven't found the files I need in the $CONTENT_PATH dir. +I really can't work without them. +If you don't have them, please press CTRL-C and quickly get it, before I get +swapped out. +EOF + echo "Otherwise, please tell me where you've hidden them." + while :; do + show_content_path_menu + CONTENT_PATH="$INPUT_content_path_VALUE" + check_content_path && break + echo "That's not it. Guess again." + done + echo "Yay! Found them." + echo +fi + +set_components_menu +show_components_menu + +cat << EOF +Ok, I'm ready now to start filling your hard drive. +It might take some time though, so don't hold your breath. +On second thought, DO hold your breath, I like the colour blue. +Orange too, for that matter, but I don't think you can manage that. +EOF +echo -n "Ready? Just say the word. Any word will do: " +read TEMP +echo "A word as good as any." +echo + +echo "Making directories..." +mkdir -p -- "$PREFIX"/share/uqm/content 2> /dev/null +mkdir -p -- "$PREFIX"/bin 2> /dev/null + +echo "Unpacking packages..." +for PACKAGE in `selected_packages`; do + echo "- $COMPFILE" + COMPFILE="$(package_filename $PACKAGE)" + eval LOCATION="\$UQM_PACKAGE_${PACKAGE}_LOCATION" + unzip -od "${PREFIX}${LOCATION}" "$COMPFILE" + + # Next line is a workaround, as the content zips have files + # with the wrong permissions in them. Should be fixed for the + # next release. + chmod go+rX "${PREFIX}${LOCATION}" +done + + +echo "Unpacking other stuff..." +tail -c @ATTACHLEN@ < "$0" | gzip -dc | tar -xf - -C "$PREFIX" + +echo "Creating wrapper script..." +cat << EOF > "$PREFIX"bin/uqm +#!/bin/sh +# Wrapper script for starting The Ur-Quan Masters +"${PREFIX}lib/uqm/uqm" "--contentdir=${PREFIX}share/uqm/content" "\$@" +EOF +chmod 755 "$PREFIX"bin/uqm + +cat << EOF + +All done. Now you can play The Ur-Quan masters. +I told you I was going to make you very happy. +And if you're looking for documentation, you can find some in +${PREFIX}share/uqm/doc/. If you aren't looking for documentation, too. +But feel free to delete them. You know where to find them. +EOF + +exit 0 + + diff --git a/build/unix_installer/installer.config b/build/unix_installer/installer.config new file mode 100644 index 0000000..aeb9a03 --- /dev/null +++ b/build/unix_installer/installer.config @@ -0,0 +1,139 @@ +MENU_main_ITEMS="components install_prefix" +MENU_main_TITLE="The Ur-Quan Masters installation" +MENU_main_ITEM_components_TYPE=MENU +MENU_main_ITEM_install_prefix_TYPE=INPUT + +MENU_components_TITLE="Optional components" +MENU_components_TEXT=\ +" Here you can select which components you'd like to have installed. If you + can spare the space, you are adviced to select all, for the maximum game + experience. +" + +package_filename() { + local FILENAME PACKNAME + + eval PACKNAME="\${UQM_PACKAGE_$1_NAME}" + # Check complete package first for reinstall or downgrade. + # If they're not found, we'll settle for an upgrade package, + # maybe it will work, maybe it won't. + case "$UQM_INSTALL" in + NEW|REINSTALL|DOWNGRADE) + FILENAME="${CONTENT_PATH}uqm-${UQM_VERSION}-$PACKNAME.zip" + if [ -f "$FILENAME" ]; then + # Found complete package. + echo "$FILENAME" + return 0 + fi + ;; + esac + + # A full package is needed for a new install + if [ "$UQM_INSTALL" = NEW ]; then + return 1 + fi + + # Check for upgrade package. + FILENAME="${CONTENT_PATH}uqm-${UQM_OLDVERSION}_to_${UQM_VERSION}-$PACKNAME.zip" + if [ -f "$FILENAME" ]; then + # Found upgrade package. + echo "$FILENAME" + return 0 + fi + + # Check complete package again, as you can upgrade with a complete + # package. + if [ "$UQM_INSTALL" = UPGRADE ]; then + FILENAME="${CONTENT_PATH}uqm-${UQM_VERSION}-$PACKNAME.zip" + if [ -f "$FILENAME" ]; then + # Found complete package. + echo "$FILENAME" + return 0 + fi + fi + return 1 +} + +package_available() { + package_filename "$@" > /dev/null + return $? +} + +set_components_menu() { + local TITLE OPTIONAL DEFAULT + + MENU_install_components_TITLE="Optional components selection" + MENU_install_components_ITEMS="$UQM_PACKAGES" + for PACKAGE in $UQM_PACKAGES; do + eval TITLE="\"\${UQM_PACKAGE_${PACKAGE}_TITLE}\"" + eval OPTIONAL="\${UQM_PACKAGE_${PACKAGE}_OPTIONAL}" + eval DEFAULT="\${UQM_PACKAGE_${PACKAGE}_DEFAULT}" + eval MENU_install_components_ITEM_${PACKAGE}_TYPE=CHECK + + eval CHECK_${PACKAGE}_TITLE=\"\$TITLE\" + if [ "$DEFAULT" = "TRUE" ]; then + eval CHECK_${PACKAGE}_DEFAULT=CHECKED + else + eval CHECK_${PACKAGE}_DEFAULT=UNCHECKED + fi + if package_available "$PACKAGE"; then + if [ "$OPTIONAL" = "FALSE" ]; then + eval CHECK_${PACKAGE}_VALUE=CHECKED + eval CHECK_${PACKAGE}_FIXED=TRUE + fi + else + if [ "$OPTIONAL" = "TRUE" ]; then + eval CHECK_${PACKAGE}_VALUE=UNCHECKED + eval CHECK_${PACKAGE}_FIXED=TRUE + else + echo "Can't find '$PACKAGE' package" + return 1 + fi + fi + done + return 0 +} + +show_components_menu() { + do_menu MENU install_components "" +} + +INPUT_install_prefix_TITLE="Installation prefix" +#INPUT_install_prefix_TEXT=\ +#" This is the top directory where the game data will be installed. +# In the directory you specify directories like 'bin', 'lib' and 'share' +# will be used. +#" +if [ "$(id -u)" -eq 0 ]; then + INPUT_install_prefix_DEFAULT="/usr/local/games/" +else + INPUT_install_prefix_DEFAULT="$HOME/uqm/" +fi +INPUT_install_prefix_VALIDATOR=validate_path + +show_install_prefix_menu() { + do_menu INPUT install_prefix "" + INPUT_install_prefix_VALUE="${INPUT_install_prefix_VALUE%/}/" +} + +INPUT_content_path_TITLE="Location of content packages" +INPUT_content_path_DEFAULT="${PWD%/}/" +INPUT_content_path_VALIDATOR=validate_path +show_content_path_menu() { + do_menu INPUT content_path "" + INPUT_content_path_VALUE="${INPUT_content_path_VALUE%/}/" +} + +selected_packages() { + local RESULT PACKAGE VALUE + RESULT="" + for PACKAGE in $UQM_PACKAGES; do + eval VALUE="\$CHECK_${PACKAGE}_VALUE" + if [ "$VALUE" = CHECKED ]; then + RESULT="${RESULT:+$RESULT }$PACKAGE" + fi + done + echo "$RESULT" +} + + diff --git a/build/unix_installer/template b/build/unix_installer/template new file mode 100644 index 0000000..5261257 --- /dev/null +++ b/build/unix_installer/template @@ -0,0 +1,40 @@ +# Template file for building the UQM installer for unix Systems. +# By Serge van den Boom, 2003-02-23 + +UQM_VERSION="0.7" +UQM_LICENSE_FILE="COPYING" + +UQM_PACKAGES="content voice 3domusic" +UQM_PACKAGE_content_NAME="content" +UQM_PACKAGE_content_TITLE="General game data" +UQM_PACKAGE_content_LOCATION="share/uqm/content/packages/" +UQM_PACKAGE_content_OPTIONAL="FALSE" +UQM_PACKAGE_content_DEFAULT="TRUE" +UQM_PACKAGE_voice_NAME="voice" +UQM_PACKAGE_voice_TITLE="Spoken alien communication" +UQM_PACKAGE_voice_LOCATION="share/uqm/content/addons/" +UQM_PACKAGE_voice_OPTIONAL="TRUE" +UQM_PACKAGE_voice_DEFAULT="TRUE" +UQM_PACKAGE_3domusic_NAME="3domusic" +UQM_PACKAGE_3domusic_TITLE="Music from the 3DO version" +UQM_PACKAGE_3domusic_LOCATION="share/uqm/content/addons/" +UQM_PACKAGE_3domusic_OPTIONAL="TRUE" +UQM_PACKAGE_3domusic_DEFAULT="TRUE" + +UQM_SCRIPT_FILES=" + ${UQM_TOP}build/unix/ansi + ${UQM_TOP}build/unix/menu_functions + ${UQM_TOP}build/unix_installer/installer.config + ${UQM_TOP}build/unix_installer/install.sh.in +" + +# File destination +UQM_ATTACH_FILES=\ +"${UQM_TOP}AUTHORS share/uqm/doc/ +${UQM_TOP}COPYING share/uqm/doc/ +${UQM_TOP}ChangeLog share/uqm/doc/ +${UQM_TOP}WhatsNew share/uqm/doc/ +${UQM_TOP}README share/uqm/doc/ +${UQM_TOP}doc/users/manual.txt share/uqm/doc/ +${UQM_TOP}uqm lib/uqm/" + diff --git a/build/win32_install/build-win32-installer.sh b/build/win32_install/build-win32-installer.sh new file mode 100644 index 0000000..467d0d7 --- /dev/null +++ b/build/win32_install/build-win32-installer.sh @@ -0,0 +1,70 @@ +#!/usr/bin/sh + +for i in uqm-installer.nsi packages.nsh orzshofixti.bmp ultron.bmp \ + uqm-3do.cfg uqm-pc.cfg; do + if ! [ -f $i ]; then + echo "$i not found. Make sure you are running from sc2/build/win32_install." + exit 1 + fi +done +if ! [ -f packages.nsh ]; then + echo "packages.nsh not found. Follow the instructions in INSTALL.pkgs" + echo "to regenerate it." + exit 1 +fi +if ! [ -f ../../uqm.exe ]; then + echo "uqm.exe not found. Go build it first." + exit 1 +fi + +build_keyjam() +{ + make clean && \ + make && \ + strip keyjam.exe && \ + cp keyjam.exe ../../sc2/build/win32_install + return $? +} + +echo "Building the key-jammer application..." +cd ../../../tools/keys || exit 1 +build_keyjam +result=$? +cd ../../sc2/build/win32_install +if [ $result -ne 0 ] ; then + echo "Could not build keyjam.exe. Aborting installer creation." + exit 1 +fi +cp ../../uqm.exe . || exit +strip ./uqm.exe || exit +echo "Identifying DLL dependencies..." +DLLS=$(ntldd -R uqm.exe | awk '/\\bin\\/{print $3;}') +DLLS2=$(ntldd -R keyjam.exe | awk '/\\bin\\/{print $3;}') +DLLS="$DLLS $DLLS2" +DLLS=$(for dll in $DLLS; do echo $dll; done | sort -u) + +(echo "# Autogenerated by build-win32-installer.sh"; + echo "#" + echo " File \"uqm.exe\"" + echo " File \"keyjam.exe\"" + for dll in $DLLS; do + echo " File \"$dll\"" + done) >> dlls.nsi + +(echo "# Autogenerated by build-win32-installer.sh"; + echo "#" + echo " Delete \"\$INSTDIR\\uqm.exe\"" + echo " Delete \"\$INSTDIR\\keyjam.exe\"" + for dll in $DLLS; do + echo " Delete \"\$INSTDIR\\$(basename $dll)\"" + done) >> undlls.nsi + +echo "Preparing documentation..." +for i in AUTHORS COPYING README README-SDL WhatsNew; do + cp "../../$i" "$i.txt" && unix2dos "$i.txt" +done +cp ../../doc/users/manual.txt Manual.txt && unix2dos "Manual.txt" + +echo "Creating installer..." +makensis "-XSetCompressor /SOLID lzma" uqm-installer.nsi || exit 1 +echo "Installer has been created successfully." diff --git a/build/win32_install/orzshofixti.bmp b/build/win32_install/orzshofixti.bmp Binary files differnew file mode 100644 index 0000000..982500d --- /dev/null +++ b/build/win32_install/orzshofixti.bmp diff --git a/build/win32_install/packages.nsh b/build/win32_install/packages.nsh new file mode 100644 index 0000000..c95ca8c --- /dev/null +++ b/build/win32_install/packages.nsh @@ -0,0 +1,23 @@ +# Autogenerated by procpkgs.sh +# +!define PKG_CONTENT_FILE "uqm-0.8.0-content.uqm" +!define PKG_CONTENT_MD5SUM "6cbc9d51fa63e07c0f4d1d061136d816" +!define PKG_CONTENT_SIZE 11276 +!define PKG_3DOMUSIC_FILE "uqm-0.8.0-3domusic.uqm" +!define PKG_3DOMUSIC_MD5SUM "9e5801d45ca12028b486cdeb83568c02" +!define PKG_3DOMUSIC_SIZE 18535 +!define PKG_VOICE_FILE "uqm-0.8.0-voice.uqm" +!define PKG_VOICE_MD5SUM "fc89f77d7b66c2669abca6c157f5259a" +!define PKG_VOICE_SIZE 112465 +!define PKG_REMIX1_FILE "uqm-remix-disc1.uqm" +!define PKG_REMIX1_MD5SUM "09f242d8d72166d1d5ccbd3d99c93e7d" +!define PKG_REMIX1_SIZE 49012 +!define PKG_REMIX2_FILE "uqm-remix-disc2.uqm" +!define PKG_REMIX2_MD5SUM "fbc8bdcb709939d559d8c7216ad15cc2" +!define PKG_REMIX2_SIZE 58869 +!define PKG_REMIX3_FILE "uqm-remix-disc3.uqm" +!define PKG_REMIX3_MD5SUM "5ccc6d4ac301ae98e172ac6835dcdead" +!define PKG_REMIX3_SIZE 38989 +!define PKG_REMIX4_FILE "uqm-remix-disc4-1.uqm" +!define PKG_REMIX4_MD5SUM "3fb63f4ac514343ed4b4b5b194c413fb" +!define PKG_REMIX4_SIZE 85867 diff --git a/build/win32_install/procpkgs.sh b/build/win32_install/procpkgs.sh new file mode 100755 index 0000000..7b1817a --- /dev/null +++ b/build/win32_install/procpkgs.sh @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Generates a .nsh file for the NSIS Windows installer with MD5 checksums +# and file sizes of the UQM packages. +# +# Run this from an MSYS2 bash shell. +# +# The packages must be in the current directory. +# +# The awk, md5sum, and wc utilities must be installed, but MSYS2 +# should generally already have those in your path. + +NSH_FILE="packages.nsh" +PKG_VERSION="0.8.0" + +CONTENT_PKG="uqm-$PKG_VERSION-content.uqm" +MUSIC_PKG="uqm-$PKG_VERSION-3domusic.uqm" +VOICE_PKG="uqm-$PKG_VERSION-voice.uqm" +REMIX1_PKG="uqm-remix-disc1.uqm" +REMIX2_PKG="uqm-remix-disc2.uqm" +REMIX3_PKG="uqm-remix-disc3.uqm" +REMIX4_PKG="uqm-remix-disc4-1.uqm" + +check_pkg() { + if [ ! -f "$1" ]; then + echo "$1 not found." + exit 1 + fi +} + +process_pkg() { + echo "Processing $1..." + SUM=$(md5sum "$1" | awk '{print $1}') + SZ=$(wc -c "$1" | awk '{print $1}') + SZ=$(( SZ / 1024 )) + { + echo "!define $2_FILE \"$1\"" + echo "!define $2_MD5SUM \"$SUM\"" + echo "!define $2_SIZE $SZ" + } >> $NSH_FILE +} + +check_pkg $CONTENT_PKG +check_pkg $MUSIC_PKG +check_pkg $VOICE_PKG +check_pkg $REMIX1_PKG +check_pkg $REMIX2_PKG +check_pkg $REMIX3_PKG +check_pkg $REMIX4_PKG + +echo "# Autogenerated by procpkgs.sh" > $NSH_FILE +echo "#" >> $NSH_FILE +process_pkg $CONTENT_PKG PKG_CONTENT +process_pkg $MUSIC_PKG PKG_3DOMUSIC +process_pkg $VOICE_PKG PKG_VOICE +process_pkg $REMIX1_PKG PKG_REMIX1 +process_pkg $REMIX2_PKG PKG_REMIX2 +process_pkg $REMIX3_PKG PKG_REMIX3 +process_pkg $REMIX4_PKG PKG_REMIX4 + +echo "All packages processed. ${NSH_FILE} generated." diff --git a/build/win32_install/ultron.bmp b/build/win32_install/ultron.bmp Binary files differnew file mode 100644 index 0000000..b9d6a3a --- /dev/null +++ b/build/win32_install/ultron.bmp diff --git a/build/win32_install/uqm-3do.cfg b/build/win32_install/uqm-3do.cfg new file mode 100644 index 0000000..4e002b7 --- /dev/null +++ b/build/win32_install/uqm-3do.cfg @@ -0,0 +1,11 @@ +3domusic = BOOLEAN:true
+textmenu = BOOLEAN:false
+textgradients = BOOLEAN:false
+subtitles = BOOLEAN:false
+iconicscan = BOOLEAN:true
+3domovies = BOOLEAN:true
+speechvol = INT32:100
+pulseshield = BOOLEAN:true
+smoothmelee = BOOLEAN:true
+smoothscroll = BOOLEAN:true
+remixmusic = BOOLEAN:false
diff --git a/build/win32_install/uqm-installer.nsi b/build/win32_install/uqm-installer.nsi new file mode 100644 index 0000000..8b6783f --- /dev/null +++ b/build/win32_install/uqm-installer.nsi @@ -0,0 +1,556 @@ +; Script generated by the HM NIS Edit Script Wizard. + +Var PACKAGEDIR +Var UQMARGS +Var MAKEICON +Var UQMUSERDATA + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "The Ur-Quan Masters" +!define PRODUCT_VERSION "0.8.0" +!define PRODUCT_WEB_SITE "http://sc2.sourceforge.net" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\uqm.exe" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" +!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" + +; The INSTALLER_VERSION is a suffix to the version number for installer patches or to mark +; alpha/beta/release candidate status. In normal releases it is the empty string. +!define INSTALLER_VERSION "" + +; UQM Package definitions +!include "packages.nsh" + +; MUI 1.67 compatible ------ +!include "MUI.nsh" + +; Start using macros for block structure +!include "LogicLib.nsh" + + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" +!define MUI_WELCOMEFINISHPAGE_BITMAP "orzshofixti.bmp" +!define MUI_HEADERIMAGE +!define MUI_HEADERIMAGE_BITMAP "ultron.bmp" +!define MUI_HEADERIMAGE_RIGHT + +; UAC support +RequestExecutionLevel admin + +; Welcome page +!insertmacro MUI_PAGE_WELCOME +; License page +!define MUI_LICENSEPAGE_BUTTON "Install" +!define MUI_LICENSEPAGE_TEXT_BOTTOM "Press the Install button to continue." +!insertmacro MUI_PAGE_LICENSE "COPYING.txt" +; Components page +!define MUI_COMPONENTSPAGE_TEXT_COMPLIST "You can preconfigure the options to mimic the original platforms by selecting those install types. Note that more complete installs will need to download more packages." +!insertmacro MUI_PAGE_COMPONENTS +; Directory page +!insertmacro MUI_PAGE_DIRECTORY +; Package Dictory +!define MUI_PAGE_HEADER_TEXT "Choose Package Location" +!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder that holds packages that have already been downloaded." +!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will look for already-downloaded content packages in the following folder. To copy them from a different folder, click Browse and select another folder. If you are doing a net install, leave this field alone. Click Next to continue." +!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Source Folder" +!define MUI_DIRECTORYPAGE_VARIABLE $PACKAGEDIR +!define MUI_DIRECTORYPAGE_VERIFYONLEAVE +!insertmacro MUI_PAGE_DIRECTORY +; Start menu page +var ICONS_GROUP +!define MUI_STARTMENUPAGE_NODISABLE +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Games\The Ur-Quan Masters" +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" +!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES +; Finish page +!define MUI_FINISHPAGE_RUN_NOTCHECKED +!define MUI_FINISHPAGE_NOREBOOTSUPPORT +!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" +!define MUI_FINISHPAGE_RUN "$INSTDIR\uqm.exe" +!define MUI_FINISHPAGE_RUN_PARAMETERS $UQMARGS +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!define MUI_UNCONFIRMPAGE_TEXT_TOP "This program will now uninstall The Ur-Quan Masters entirely. If you wish to preserve content or expansion packs, select Cancel now and back them up. Otherwise, press Uninstall to continue." +!insertmacro MUI_UNPAGE_CONFIRM +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; MUI end ------ + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "uqm-${PRODUCT_VERSION}${INSTALLER_VERSION}-installer.exe" +InstallDir "$PROGRAMFILES\The Ur-Quan Masters\" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show +AllowRootDirInstall true +DirText "" "" "" "Please select a folder." +InstType "Typical" +InstType "Minimal" +InstType "Mimic PC" +InstType "Mimic 3DO" +InstType "No Content" +InstType "All Expansions" + +Function .onInit + Push $0 + StrCpy $PACKAGEDIR $EXEDIR + StrCpy $UQMARGS "" + StrCpy $MAKEICON 0 + ReadEnvStr $0 APPDATA + ${If} $0 == "" + ReadEnvStr $0 USERPROFILE + ${If} $0 == "" + StrCpy $UQMUSERDATA "$INSTDIR\userdata\uqm" + ${Else} + ExpandEnvStrings $UQMUSERDATA "%USERPROFILE%\Application Data\uqm" + ${EndIf} + ${Else} + ExpandEnvStrings $UQMUSERDATA "%APPDATA%\uqm" + ${EndIf} +FunctionEnd + +# To use: +# Push the file name. +# Push the installation location. +# It will install it from the Package Directory if necessary; otherwise it +# will download it to a temp file and install that. +Var DOWNLOADTARGET +Var MANDATORY +Var MD5SUM +Var DOWNLOADPATH +Function HandlePackage + Exch $0 # File location + Exch + Exch $1 # File name + Push $2 + Push $3 + StrCpy $R9 0 # failure count + # Check to make sure the file wasn't already installed + ${If} ${FileExists} "$0\$1" + md5dll::GetFileMD5 "$0\$1" + Pop $3 + ${If} $MD5SUM == $3 + MessageBox MB_ICONINFORMATION|MB_OK "The package $1 has already been installed." + Goto PackageDone + ${EndIf} + ${EndIf} + # It's not installed, so check if it's in the package dir. + SetOutPath "$0" + SetOverwrite ifdiff + ${If} ${FileExists} "$PACKAGEDIR\$1" + md5dll::GetFileMD5 "$PACKAGEDIR\$1" + Pop $3 + ${If} $MD5SUM != $3 + MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1 appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone + ${EndIf} + CopyFiles "$PACKAGEDIR\$1" "$0\$1" + Goto PackageDone + ${EndIf} + # It's not in the package dir, but check if it's there but an over-helpful + # browser stuck a .zip at the end + ${If} ${FileExists} "$PACKAGEDIR\$1.zip" + md5dll::GetFileMD5 "$PACKAGEDIR\$1.zip" + Pop $3 + ${If} $MD5SUM != $3 + MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1.zip appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone + ${EndIf} + CopyFiles "$PACKAGEDIR\$1.zip" "$0\$1" + Goto PackageDone + ${EndIf} + + # We're now in a loop of trying to download the file until the user gives + # up. Since the only way to iterate through the loop more than once is to + # have the user reply to a message box, this loop is still marked by a + # label instead of being part of a Do/Loop macro. +AttemptDownload: + GetTempFileName $DOWNLOADTARGET + Delete $DOWNLOADTARGET + CreateDirectory $DOWNLOADTARGET + inetc::get "https://downloads.sourceforge.net/project/sc2/$DOWNLOADPATH$1" "$DOWNLOADTARGET/$1" /END + Pop $2 + ${If} $2 == "OK" + # Download completed. Confirm the MD5 sum is OK. + md5dll::GetFileMD5 "$DOWNLOADTARGET\$1" + Pop $3 + ${If} $MD5SUM != $3 + ${If} $MANDATORY != 0 + StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." + ${Else} + StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." + ${EndIf} + MessageBox MB_ICONEXCLAMATION|MB_YESNO "The downloaded file $1 doesn't match the internal MD5 sum. This probably means the download was corrupt. $3 Do you want to retry from a different mirror? (Select NO to install the downloaded package anyway - for instance, if you know that the content pack was upgraded or modified since.)" IDYES AttemptDownload + ${EndIf} + CopyFiles "$DOWNLOADTARGET\$1" "$0\$1" + ${Else} + ${If} $2 == "Cancelled" + StrCpy $2 "Download was canceled by user." + ${Else} + StrCpy $2 "Could not install the package $1 due to the following error: $\"$2$\"." + ${EndIf} + ${If} $MANDATORY != 0 + StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." + ${Else} + StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." + ${EndIf} + MessageBox MB_ICONEXCLAMATION|MB_YESNO "$2 $3 Do you want to retry from a different mirror?" IDYES AttemptDownload + ${EndIf} + RmDir /r $DOWNLOADTARGET +PackageDone: + Pop $3 + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +# Usage: +# Push the file name, preferrably a full path. +# Push the string to be appended +# Any errors during appending will be ignored. +Function AppendToFile + Exch $0 # string to append + Exch + Exch $1 # File name + Push $2 # using $2 for file handle + FileOpen $2 $1 a + ${Unless} ${Errors} + FileSeek $2 0 END # seek to end + FileWrite $2 $0 + FileClose $2 + ${EndUnless} + Pop $2 + Pop $1 + Pop $0 +FunctionEnd + +Function EnableRemixes + # If there are errors pending AppendToFile will fail + ClearErrors + Push "$UQMUSERDATA\uqm.cfg" + Push "remixmusic = BOOLEAN:true$\r$\n" + Call AppendToFile + ClearErrors +FunctionEnd + +SectionGroup "!UQM" SECGRP01 + Section "Executable" SEC01 + SectionIn 1 2 3 4 5 6 RO + SetOutPath "$INSTDIR" + SetOverwrite try + File "AUTHORS.txt" + File "COPYING.txt" + File "Manual.txt" + File "README.txt" + File "README-SDL.txt" + File "WhatsNew.txt" +!include "dlls.nsi" + + SetOutPath $UQMUSERDATA + SetOverwrite try + File "uqm-pc.cfg" + File "uqm-3do.cfg" + + # Delete old content + Delete "$INSTDIR\content\packages\uqm-0.3-3domusic.zip" + Delete "$INSTDIR\content\packages\uqm-0.3-voice.zip" + Delete "$INSTDIR\content\packages\uqm-0.3-content.zip" + Delete "$INSTDIR\content\packages\uqm-0.4.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.4.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.4.0-content.uqm" + Delete "$INSTDIR\content\packages\uqm-0.5.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.5.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.5.0-content.uqm" + Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm" + Delete "$INSTDIR\content\packages\uqm-0.7.0-3domusic.uqm" + Delete "$INSTDIR\content\packages\uqm-0.7.0-voice.uqm" + Delete "$INSTDIR\content\packages\uqm-0.7.0-content.uqm" + # and in a case of manual install and overly helpful browsers + Delete "$INSTDIR\content\packages\uqm-0.7.0-3domusic.uqm.zip" + Delete "$INSTDIR\content\packages\uqm-0.7.0-voice.uqm.zip" + Delete "$INSTDIR\content\packages\uqm-0.7.0-content.uqm.zip" + + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Core Data" SEC02 + SectionIn 1 2 3 4 6 + CreateDirectory "$INSTDIR\content\addons" + SetOutPath "$INSTDIR\content" + SetOverwrite ifnewer + AddSize ${PKG_CONTENT_SIZE} + StrCpy $MANDATORY 1 + StrCpy $MD5SUM "${PKG_CONTENT_MD5SUM}" + File "..\..\content\version" + StrCpy $DOWNLOADPATH "UQM/0.8/" + Push "${PKG_CONTENT_FILE}" + Push "$INSTDIR\content\packages" + Call HandlePackage + + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Desktop Icon" SECICON + SectionIn 1 2 3 4 5 6 + StrCpy $MAKEICON 1 + SectionEnd +SectionGroupEnd + +SectionGroup /e "3DO Content" SECGRP02 + Section "Music" SEC03 + SectionIn 1 4 6 + AddSize ${PKG_3DOMUSIC_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_3DOMUSIC_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM/0.8/" + Push "${PKG_3DOMUSIC_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Voiceovers" SEC04 + SectionIn 1 4 6 + AddSize ${PKG_VOICE_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_VOICE_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM/0.8/" + Push "${PKG_VOICE_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd +SectionGroupEnd + +SectionGroup "Modern Remixes" SECGRP03 + Section "Pack 1" SEC05 + SectionIn 6 + AddSize ${PKG_REMIX1_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX1_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%201/" + Push "${PKG_REMIX1_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + Call EnableRemixes + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Pack 2" SEC06 + SectionIn 6 + AddSize ${PKG_REMIX2_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX2_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%202/" + Push "${PKG_REMIX2_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + Call EnableRemixes + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Pack 3" SEC07 + SectionIn 6 + AddSize ${PKG_REMIX3_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX3_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%203/" + Push "${PKG_REMIX3_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + Call EnableRemixes + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd + + Section "Pack 4" SEC08 + SectionIn 6 + AddSize ${PKG_REMIX4_SIZE} + StrCpy $MANDATORY 0 + StrCpy $MD5SUM "${PKG_REMIX4_MD5SUM}" + StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%204/" + Push "${PKG_REMIX4_FILE}" + Push "$INSTDIR\content\addons" + Call HandlePackage + Call EnableRemixes + ; Shortcuts + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END + SectionEnd +SectionGroupEnd + +Section -ShortcutsAndIcons + SetOutPath $INSTDIR + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" "$INSTDIR\uqm.exe" "-x --safe" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" "$INSTDIR\uqm.exe" "-o --safe" + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Documentation" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" "$INSTDIR\COPYING.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" "$INSTDIR\Manual.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" "$INSTDIR\README.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" "$INSTDIR\WhatsNew.txt" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" "$INSTDIR\keyjam.exe" + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" "$UQMUSERDATA\save" + ${If} $MAKEICON = 1 + CreateShortCut "$DESKTOP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS + ${EndIf} + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -Set3DOConfig + SectionIn 4 + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-3do.cfg" "$UQMUSERDATA\uqm.cfg" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -SetPCConfig + SectionIn 3 + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + SetOutPath $UQMUSERDATA + Delete "uqm.cfg" + CopyFiles "$UQMUSERDATA\uqm-pc.cfg" "$UQMUSERDATA\uqm.cfg" + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -SetRemixConfig + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application + !insertmacro MUI_STARTMENU_WRITE_END +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\uqm.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\uqm.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" +SectionEnd + +; Section descriptions +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP01} "The core executables and content libraries for The Ur-Quan Masters. All elements in this section must be installed for the game to be playable." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Includes the main program, all subsidiary libraries, and basic documentation for The Ur-Quan Masters. Required for play." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Graphics, sound, and the PC-edition music for The Ur-Quan Masters. Required for play. If this package is selected and not present in the packages directory, the installer will attempt to download it." + !insertmacro MUI_DESCRIPTION_TEXT ${SECICON} "Adds a desktop icon linking directly to The Ur-Quan Masters." + !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP02} "Optional content packages containing music and sound unique to the 1993 3DO release." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Optional package which includes the remixed songs from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Optional package containing the voiceovers from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." + !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP03} "Optional content packages containing the official UQM remixes by The Precursors. Selecting any element from this group will also enable the 'remix' addon by default in the starting configuration." + !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} `Ur-Quan Masters Remix Pack 1 - 'Super Melee!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` + !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} `Ur-Quan Masters Remix Pack 2 - 'Neutral Aliens - Don't Shoot!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` + !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} `Ur-Quan Masters Remix Pack 3 - 'The Ur-Quan Hierarchy.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` + !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} `Ur-Quan Masters Remix Pack 4 - 'The New Alliance of Free Stars.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` +!insertmacro MUI_FUNCTION_DESCRIPTION_END + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP + Delete "$INSTDIR\uninst.exe" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack4.zip" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack3.zip" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack2.zip" + Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack1.zip" + Delete "$INSTDIR\content\addons\uqm-remix-disc4-1.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc4.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc3.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc2.uqm" + Delete "$INSTDIR\content\addons\uqm-remix-disc1.uqm" + Delete "$INSTDIR\content\addons\${PKG_VOICE_FILE}" + Delete "$INSTDIR\content\addons\${PKG_3DOMUSIC_FILE}" + Delete "$INSTDIR\content\packages\${PKG_CONTENT_FILE}" + Delete "$INSTDIR\content\version" + Delete "$INSTDIR\zlib.dll" + Delete "$INSTDIR\zlib1.dll" + Delete "$INSTDIR\WhatsNew.txt" + Delete "$INSTDIR\vorbisfile.dll" + Delete "$INSTDIR\vorbis.dll" + Delete "$INSTDIR\uqm.exe" + Delete "$INSTDIR\keyjam.exe" + Delete "$INSTDIR\SDL_gfx.dll" + Delete "$INSTDIR\SDL_image.dll" + Delete "$INSTDIR\SDL.dll" + Delete "$INSTDIR\README.txt" + Delete "$INSTDIR\README-SDL.txt" + Delete "$INSTDIR\wrap_oal.dll" + Delete "$INSTDIR\OpenAL32.dll" + Delete "$INSTDIR\ogg.dll" + Delete "$INSTDIR\Manual.txt" + Delete "$INSTDIR\libpng13.dll" + Delete "$INSTDIR\libpng12.dll" + Delete "$INSTDIR\libpng12-0.dll" + Delete "$INSTDIR\COPYING.txt" + Delete "$INSTDIR\AUTHORS.txt" + Delete "$INSTDIR\stderr.txt" + +!include "undlls.nsi" + + Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Options Configuration.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Key Configuration.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" + Delete "$DESKTOP\The Ur-Quan Masters.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" + Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" + + RMDir "$SMPROGRAMS\$ICONS_GROUP\Documentation" + RMDir "$SMPROGRAMS\$ICONS_GROUP" + RMDir "$INSTDIR\content\addons" + RMDir "$INSTDIR\content\packages\addons\remix" + RMDir "$INSTDIR\content\packages\addons" + RMDir "$INSTDIR\content\packages" + RMDir "$INSTDIR\content" + RMDir "$INSTDIR" + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" + SetAutoClose true +SectionEnd diff --git a/build/win32_install/uqm-pc.cfg b/build/win32_install/uqm-pc.cfg new file mode 100644 index 0000000..09aa53a --- /dev/null +++ b/build/win32_install/uqm-pc.cfg @@ -0,0 +1,11 @@ +3domusic = BOOLEAN:false
+textmenu = BOOLEAN:true
+textgradients = BOOLEAN:true
+subtitles = BOOLEAN:true
+iconicscan = BOOLEAN:false
+3domovies = BOOLEAN:false
+positionalsfx = BOOLEAN:false
+pulseshield = BOOLEAN:false
+smoothmelee = BOOLEAN:false
+smoothscroll = BOOLEAN:false
+remixmusic = BOOLEAN:false
|