mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Merge branch 'misc/lilium_common' into game/eliteforce
Conflicts: README.md code/client/cl_main.c code/qcommon/common.c code/qcommon/q_shared.h code/sys/sys_unix.c
This commit is contained in:
commit
3521787c14
8 changed files with 115 additions and 74 deletions
17
Makefile
17
Makefile
|
@ -138,6 +138,10 @@ ifndef SERVERBIN
|
|||
endif
|
||||
endif
|
||||
|
||||
ifndef RENDERER_PREFIX
|
||||
RENDERER_PREFIX=renderer_
|
||||
endif
|
||||
|
||||
ifndef BASEGAME
|
||||
BASEGAME=baseq3
|
||||
endif
|
||||
|
@ -1008,9 +1012,10 @@ endif
|
|||
|
||||
ifneq ($(BUILD_CLIENT),0)
|
||||
ifneq ($(USE_RENDERER_DLOPEN),0)
|
||||
TARGETS += $(B)/$(CLIENTBIN)$(FULLBINEXT) $(B)/renderer_opengl1_$(SHLIBNAME)
|
||||
CLIENT_CFLAGS += -DRENDERER_PREFIX='\"'$(RENDERER_PREFIX)'\"'
|
||||
TARGETS += $(B)/$(CLIENTBIN)$(FULLBINEXT) $(B)/$(RENDERER_PREFIX)opengl1_$(SHLIBNAME)
|
||||
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
||||
TARGETS += $(B)/renderer_opengl2_$(SHLIBNAME)
|
||||
TARGETS += $(B)/$(RENDERER_PREFIX)opengl2_$(SHLIBNAME)
|
||||
endif
|
||||
else
|
||||
TARGETS += $(B)/$(CLIENTBIN)$(FULLBINEXT)
|
||||
|
@ -2255,12 +2260,12 @@ $(B)/$(CLIENTBIN)$(FULLBINEXT): $(Q3OBJ) $(LIBSDLMAIN)
|
|||
-o $@ $(Q3OBJ) \
|
||||
$(LIBSDLMAIN) $(CLIENT_LIBS) $(LIBS)
|
||||
|
||||
$(B)/renderer_opengl1_$(SHLIBNAME): $(Q3ROBJ) $(JPGOBJ)
|
||||
$(B)/$(RENDERER_PREFIX)opengl1_$(SHLIBNAME): $(Q3ROBJ) $(JPGOBJ)
|
||||
$(echo_cmd) "LD $@"
|
||||
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3ROBJ) $(JPGOBJ) \
|
||||
$(THREAD_LIBS) $(LIBSDLMAIN) $(RENDERER_LIBS) $(LIBS)
|
||||
|
||||
$(B)/renderer_opengl2_$(SHLIBNAME): $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ)
|
||||
$(B)/$(RENDERER_PREFIX)opengl2_$(SHLIBNAME): $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ)
|
||||
$(echo_cmd) "LD $@"
|
||||
$(Q)$(CC) $(CFLAGS) $(SHLIBLDFLAGS) -o $@ $(Q3R2OBJ) $(Q3R2STRINGOBJ) $(JPGOBJ) \
|
||||
$(THREAD_LIBS) $(LIBSDLMAIN) $(RENDERER_LIBS) $(LIBS)
|
||||
|
@ -2943,9 +2948,9 @@ endif
|
|||
ifneq ($(BUILD_CLIENT),0)
|
||||
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(CLIENTBIN)$(FULLBINEXT) $(COPYBINDIR)/$(CLIENTBIN)$(FULLBINEXT)
|
||||
ifneq ($(USE_RENDERER_DLOPEN),0)
|
||||
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl1_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl1_$(SHLIBNAME)
|
||||
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(RENDERER_PREFIX)opengl1_$(SHLIBNAME) $(COPYBINDIR)/$(RENDERER_PREFIX)opengl1_$(SHLIBNAME)
|
||||
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
||||
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/renderer_opengl2_$(SHLIBNAME) $(COPYBINDIR)/renderer_opengl2_$(SHLIBNAME)
|
||||
$(INSTALL) $(STRIP_FLAG) -m 0755 $(BR)/$(RENDERER_PREFIX)opengl2_$(SHLIBNAME) $(COPYBINDIR)/$(RENDERER_PREFIX)opengl2_$(SHLIBNAME)
|
||||
endif
|
||||
else
|
||||
ifneq ($(BUILD_RENDERER_OPENGL2),0)
|
||||
|
|
|
@ -3311,14 +3311,14 @@ void CL_InitRef( void ) {
|
|||
#ifdef USE_RENDERER_DLOPEN
|
||||
cl_renderer = Cvar_Get("cl_renderer", "opengl2", CVAR_ARCHIVE | CVAR_LATCH);
|
||||
|
||||
Com_sprintf(dllName, sizeof(dllName), "renderer_%s_" ARCH_STRING DLL_EXT, cl_renderer->string);
|
||||
Com_sprintf(dllName, sizeof(dllName), RENDERER_PREFIX "%s_" ARCH_STRING DLL_EXT, cl_renderer->string);
|
||||
|
||||
if(!(rendererLib = Sys_LoadDll(dllName, qfalse)) && strcmp(cl_renderer->string, cl_renderer->resetString))
|
||||
{
|
||||
Com_Printf("failed:\n\"%s\"\n", Sys_LibraryError());
|
||||
Cvar_ForceReset("cl_renderer");
|
||||
|
||||
Com_sprintf(dllName, sizeof(dllName), "renderer_opengl2_" ARCH_STRING DLL_EXT);
|
||||
Com_sprintf(dllName, sizeof(dllName), RENDERER_PREFIX "opengl2_" ARCH_STRING DLL_EXT);
|
||||
rendererLib = Sys_LoadDll(dllName, qfalse);
|
||||
}
|
||||
|
||||
|
|
|
@ -2784,7 +2784,13 @@ void Com_Init( char *commandLine ) {
|
|||
|
||||
com_standalone = Cvar_Get("com_standalone", "0", CVAR_ROM);
|
||||
com_basegame = Cvar_Get("com_basegame", BASEGAME, CVAR_INIT);
|
||||
com_homepath = Cvar_Get("com_homepath", "", CVAR_INIT|CVAR_PROTECTED);
|
||||
com_homepath = Cvar_Get("com_homepath", HOMEPATH_NAME, CVAR_INIT|CVAR_PROTECTED);
|
||||
if ( !com_homepath->string[0] ) {
|
||||
Cvar_ForceReset( "com_homepath" );
|
||||
}
|
||||
|
||||
if(!com_basegame->string[0])
|
||||
Cvar_ForceReset("com_basegame");
|
||||
|
||||
FS_InitFilesystem ();
|
||||
|
||||
|
|
|
@ -27,51 +27,58 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// A user mod should never modify this file
|
||||
|
||||
#ifdef STANDALONE
|
||||
#define PRODUCT_NAME "iofoo3"
|
||||
#define BASEGAME "foobar"
|
||||
#define CLIENT_WINDOW_TITLE "changeme"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "changeme2"
|
||||
#define HOMEPATH_NAME_UNIX ".foo"
|
||||
#define HOMEPATH_NAME_WIN "FooBar"
|
||||
#define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN
|
||||
#define PRODUCT_NAME "iofoo3"
|
||||
#define BASEGAME "foobar"
|
||||
#define CLIENT_WINDOW_TITLE "changeme"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "changeme2"
|
||||
|
||||
// GNU/Linux: $HOME/.local/share/homepath-name (lower case and spaces replaced with hyphens)
|
||||
// MacOS: $HOME/Library/Application Support/Homepath Name
|
||||
// Windows: %APPDATA%\Homepath Name
|
||||
#define HOMEPATH_NAME "FooBar"
|
||||
|
||||
// #define STEAMPATH_NAME "Foo Bar"
|
||||
// #define STEAMPATH_APPID ""
|
||||
#define GAMENAME_FOR_MASTER "foobar" // must NOT contain whitespace
|
||||
#define CINEMATICS_LOGO "foologo.roq"
|
||||
#define CINEMATICS_INTRO "intro.roq"
|
||||
// #define LEGACY_PROTOCOL // You probably don't need this for your standalone game
|
||||
#elif defined ELITEFORCE
|
||||
#define PRODUCT_NAME "Lilium Voyager HM"
|
||||
#define BASEGAME "baseEF"
|
||||
#define CLIENT_WINDOW_TITLE "Lilium Voyager Holomatch"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "liliumvoy"
|
||||
|
||||
// GNU/Linux: $HOME/.local/share/homepath-name (lower case and spaces replaced with hyphens)
|
||||
// MacOS: $HOME/Library/Application Support/Homepath Name
|
||||
// Windows: %APPDATA%\Homepath Name
|
||||
#define HOMEPATH_NAME "Lilium Voyager"
|
||||
|
||||
//#define STEAMPATH_NAME "Quake 3 Arena"
|
||||
//#define STEAMPATH_APPID "2200"
|
||||
//#define GOGPATH_ID "1441704920"
|
||||
#define GAMENAME_FOR_MASTER "EliteForce"
|
||||
//#define CINEMATICS_LOGO "eflogo.bik"
|
||||
//#define CINEMATICS_INTRO "intro.bik"
|
||||
#define LEGACY_PROTOCOL
|
||||
#else
|
||||
#ifdef ELITEFORCE
|
||||
#define PRODUCT_NAME "Lilium Voyager HM"
|
||||
#define BASEGAME "baseEF"
|
||||
#define CLIENT_WINDOW_TITLE "Lilium Voyager Holomatch"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "liliumvoy"
|
||||
#define HOMEPATH_NAME_UNIX ".stvef"
|
||||
#define HOMEPATH_NAME_WIN "STVEF"
|
||||
#define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN
|
||||
//#define STEAMPATH_NAME "Quake 3 Arena"
|
||||
//#define STEAMPATH_APPID "2200"
|
||||
//#define GOGPATH_ID "1441704920"
|
||||
#define GAMENAME_FOR_MASTER "EliteForce"
|
||||
//#define CINEMATICS_LOGO "eflogo.bik"
|
||||
//#define CINEMATICS_INTRO "intro.bik"
|
||||
#define LEGACY_PROTOCOL
|
||||
#else
|
||||
#define PRODUCT_NAME "ioq3"
|
||||
#define BASEGAME "baseq3"
|
||||
#define CLIENT_WINDOW_TITLE "ioquake3"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "ioq3"
|
||||
#define HOMEPATH_NAME_UNIX ".q3a"
|
||||
#define HOMEPATH_NAME_WIN "Quake3"
|
||||
#define HOMEPATH_NAME_MACOSX HOMEPATH_NAME_WIN
|
||||
#define STEAMPATH_NAME "Quake 3 Arena"
|
||||
#define STEAMPATH_APPID "2200"
|
||||
#define GOGPATH_ID "1441704920"
|
||||
#define GAMENAME_FOR_MASTER "Quake3Arena"
|
||||
#define CINEMATICS_LOGO "idlogo.RoQ"
|
||||
#define CINEMATICS_INTRO "intro.RoQ"
|
||||
#define LEGACY_PROTOCOL
|
||||
#endif
|
||||
#define PRODUCT_NAME "ioq3"
|
||||
#define BASEGAME "baseq3"
|
||||
#define CLIENT_WINDOW_TITLE "ioquake3"
|
||||
#define CLIENT_WINDOW_MIN_TITLE "ioq3"
|
||||
|
||||
// GNU/Linux: $HOME/.local/share/homepath-name (lower case and spaces replaced with hyphens)
|
||||
// MacOS: $HOME/Library/Application Support/Homepath Name
|
||||
// Windows: %APPDATA%\Homepath Name
|
||||
#define HOMEPATH_NAME "Lilium Quake3"
|
||||
|
||||
#define STEAMPATH_NAME "Quake 3 Arena"
|
||||
#define STEAMPATH_APPID "2200"
|
||||
#define GOGPATH_ID "1441704920"
|
||||
#define GAMENAME_FOR_MASTER "Quake3Arena"
|
||||
#define CINEMATICS_LOGO "idlogo.RoQ"
|
||||
#define CINEMATICS_INTRO "intro.RoQ"
|
||||
#define LEGACY_PROTOCOL
|
||||
#endif
|
||||
|
||||
// Heartbeat for dpmaster protocol. You shouldn't change this unless you know what you're doing
|
||||
|
@ -89,6 +96,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#define BASETA "missionpack"
|
||||
|
||||
#ifndef RENDERER_PREFIX
|
||||
#define RENDERER_PREFIX "renderer_"
|
||||
#endif
|
||||
|
||||
#ifndef PRODUCT_VERSION
|
||||
#ifdef ELITEFORCE
|
||||
#define PRODUCT_VERSION "1.39"
|
||||
|
|
|
@ -61,23 +61,46 @@ char *Sys_DefaultHomePath(void)
|
|||
|
||||
if( !*homePath && com_homepath != NULL )
|
||||
{
|
||||
if( ( p = getenv( "HOME" ) ) != NULL )
|
||||
{
|
||||
Com_sprintf(homePath, sizeof(homePath), "%s%c", p, PATH_SEP);
|
||||
#ifdef __APPLE__
|
||||
Q_strcat(homePath, sizeof(homePath),
|
||||
"Library/Application Support/");
|
||||
|
||||
if(com_homepath->string[0])
|
||||
Q_strcat(homePath, sizeof(homePath), com_homepath->string);
|
||||
else
|
||||
Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_MACOSX);
|
||||
if( ( p = getenv( "HOME" ) ) != NULL && *p != '\0' )
|
||||
{
|
||||
Com_sprintf(homePath, sizeof(homePath), "%s%cLibrary%cApplication Support%c%s", p, PATH_SEP, PATH_SEP, PATH_SEP, com_homepath->string);
|
||||
}
|
||||
#else
|
||||
if(com_homepath->string[0])
|
||||
Q_strcat(homePath, sizeof(homePath), com_homepath->string);
|
||||
char directory[MAX_OSPATH];
|
||||
char *s;
|
||||
|
||||
Q_strncpyz( directory, com_homepath->string, sizeof(directory) );
|
||||
|
||||
// convert home directory name to lower case and replace spaces with hyphens
|
||||
s = directory;
|
||||
while( *s )
|
||||
{
|
||||
if( *s == ' ' )
|
||||
{
|
||||
*s = '-';
|
||||
}
|
||||
else
|
||||
Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_UNIX);
|
||||
{
|
||||
*s = tolower(*s);
|
||||
}
|
||||
s++;
|
||||
}
|
||||
|
||||
if( ( p = getenv( "XDG_DATA_HOME" ) ) != NULL && *p != '\0' )
|
||||
{
|
||||
Com_sprintf(homePath, sizeof(homePath), "%s%c%s", p, PATH_SEP, directory);
|
||||
}
|
||||
else if( ( p = getenv( "HOME" ) ) != NULL && *p != '\0' )
|
||||
{
|
||||
Com_sprintf(homePath, sizeof(homePath), "%s%c.local%cshare%c%s", p, PATH_SEP, PATH_SEP, PATH_SEP, directory);
|
||||
}
|
||||
#endif
|
||||
|
||||
if( !*homePath )
|
||||
{
|
||||
Com_Printf("Unable to detect home path\n");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -124,12 +124,7 @@ char *Sys_DefaultHomePath( void )
|
|||
return NULL;
|
||||
}
|
||||
|
||||
Com_sprintf(homePath, sizeof(homePath), "%s%c", szPath, PATH_SEP);
|
||||
|
||||
if(com_homepath->string[0])
|
||||
Q_strcat(homePath, sizeof(homePath), com_homepath->string);
|
||||
else
|
||||
Q_strcat(homePath, sizeof(homePath), HOMEPATH_NAME_WIN);
|
||||
Com_sprintf(homePath, sizeof(homePath), "%s%c%s", szPath, PATH_SEP, com_homepath->string);
|
||||
}
|
||||
|
||||
FreeLibrary(shfolder);
|
||||
|
|
|
@ -130,6 +130,7 @@ fi
|
|||
AVAILABLE_ARCHS=""
|
||||
|
||||
IOQ3_VERSION=`grep '^VERSION=' Makefile | sed -e 's/.*=\(.*\)/\1/'`
|
||||
IOQ3_RENDERER_PREFIX=`grep '^RENDERER_PREFIX=' Makefile | sed -e 's/.*=\(.*\)/\1/'`
|
||||
IOQ3_CLIENT_ARCHS=""
|
||||
IOQ3_SERVER_ARCHS=""
|
||||
IOQ3_RENDERER_GL1_ARCHS=""
|
||||
|
@ -148,8 +149,9 @@ CGAME="cgame"
|
|||
GAME="qagame"
|
||||
UI="ui"
|
||||
|
||||
RENDERER_OPENGL="renderer_opengl"
|
||||
RENDERER_OPENGL="${IOQ3_RENDERER_PREFIX}opengl"
|
||||
|
||||
EXECUTABLE_NAME="ioquake3"
|
||||
DEDICATED_NAME="ioq3ded"
|
||||
|
||||
CGAME_NAME="${CGAME}.dylib"
|
||||
|
@ -160,18 +162,17 @@ RENDERER_OPENGL1_NAME="${RENDERER_OPENGL}1.dylib"
|
|||
RENDERER_OPENGL2_NAME="${RENDERER_OPENGL}2.dylib"
|
||||
|
||||
ICNSDIR="misc"
|
||||
ICNS="quake3_flat.icns"
|
||||
PKGINFO="APPLIOQ3"
|
||||
ICNS="lilium.icns"
|
||||
PKGINFO="APPL????"
|
||||
|
||||
OBJROOT="build"
|
||||
#BUILT_PRODUCTS_DIR="${OBJROOT}/${TARGET_NAME}-darwin-${CURRENT_ARCH}"
|
||||
PRODUCT_NAME="ioquake3"
|
||||
PRODUCT_NAME="Lilium Quake3"
|
||||
WRAPPER_EXTENSION="app"
|
||||
WRAPPER_NAME="${PRODUCT_NAME}.${WRAPPER_EXTENSION}"
|
||||
CONTENTS_FOLDER_PATH="${WRAPPER_NAME}/Contents"
|
||||
UNLOCALIZED_RESOURCES_FOLDER_PATH="${CONTENTS_FOLDER_PATH}/Resources"
|
||||
EXECUTABLE_FOLDER_PATH="${CONTENTS_FOLDER_PATH}/MacOS"
|
||||
EXECUTABLE_NAME="${PRODUCT_NAME}"
|
||||
|
||||
# loop through the architectures to build string lists for each universal binary
|
||||
for ARCH in $SEARCH_ARCHS; do
|
||||
|
@ -292,9 +293,9 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>quake3_flat</string>
|
||||
<string>lilium</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.ioquake.${PRODUCT_NAME}</string>
|
||||
<string>moe.clover.${PRODUCT_NAME}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
|
@ -312,7 +313,7 @@ echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
|
|||
<key>LSMinimumSystemVersion</key>
|
||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>QUAKE III ARENA Copyright © 1999-2000 id Software, Inc. All rights reserved.</string>
|
||||
<string>${PRODUCT_NAME} Copyright © 1999-2005 id Software, 2005-2018 ioquake3 contributors.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
|
|
BIN
misc/lilium.icns
Normal file
BIN
misc/lilium.icns
Normal file
Binary file not shown.
Loading…
Reference in a new issue