Added launcher for CS:S Enhanced
This commit is contained in:
parent
4ceda5d415
commit
4954862ff0
5 changed files with 47 additions and 14 deletions
|
@ -2378,6 +2378,11 @@ bool CL_ShouldLoadBackgroundLevel( const CCommand &args )
|
||||||
bIsTF2 = true;
|
bIsTF2 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( Q_stricmp( COM_GetModDirectory(), "cstrike" ) == 0 )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( bIsTF2 && IsPC() )
|
if ( bIsTF2 && IsPC() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,11 @@ int MessageBox( HWND hWnd, const char *message, const char *header, unsigned uTy
|
||||||
// memdbgon must be the last include file in a .cpp file!!!
|
// memdbgon must be the last include file in a .cpp file!!!
|
||||||
#include "tier0/memdbgon.h"
|
#include "tier0/memdbgon.h"
|
||||||
|
|
||||||
|
#ifdef CSS_ENHANCED_EXECUTABLE
|
||||||
|
#define DEFAULT_HL2_GAMEDIR "cstrike"
|
||||||
|
#else
|
||||||
#define DEFAULT_HL2_GAMEDIR "hl2"
|
#define DEFAULT_HL2_GAMEDIR "hl2"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined( USE_SDL )
|
#if defined( USE_SDL )
|
||||||
extern void* CreateSDLMgr();
|
extern void* CreateSDLMgr();
|
||||||
|
@ -419,7 +423,7 @@ void CLogAllFiles::Init()
|
||||||
|
|
||||||
// game directory has not been established yet, must derive ourselves
|
// game directory has not been established yet, must derive ourselves
|
||||||
char path[MAX_PATH];
|
char path[MAX_PATH];
|
||||||
Q_snprintf( path, sizeof(path), "%s/%s", GetBaseDirectory(), CommandLine()->ParmValue( "-game", "hl2" ) );
|
Q_snprintf( path, sizeof(path), "%s/%s", GetBaseDirectory(), CommandLine()->ParmValue( "-game", DEFAULT_HL2_GAMEDIR ) );
|
||||||
Q_FixSlashes( path );
|
Q_FixSlashes( path );
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
Q_strlower( path );
|
Q_strlower( path );
|
||||||
|
@ -818,7 +822,7 @@ bool CSourceAppSystemGroup::PreInit()
|
||||||
if ( IsPC() )
|
if ( IsPC() )
|
||||||
{
|
{
|
||||||
// This will get called multiple times due to being here, but only the first one will do anything
|
// This will get called multiple times due to being here, but only the first one will do anything
|
||||||
reslistgenerator->Init( GetBaseDirectory(), CommandLine()->ParmValue( "-game", "hl2" ) );
|
reslistgenerator->Init( GetBaseDirectory(), CommandLine()->ParmValue( "-game", DEFAULT_HL2_GAMEDIR ) );
|
||||||
|
|
||||||
// This will also get called each time, but will actually fix up the command line as needed
|
// This will also get called each time, but will actually fix up the command line as needed
|
||||||
reslistgenerator->SetupCommandLine();
|
reslistgenerator->SetupCommandLine();
|
||||||
|
@ -1267,6 +1271,11 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
|
||||||
CommandLine()->CreateCmdLine( argc, argv );
|
CommandLine()->CreateCmdLine( argc, argv );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CSS_ENHANCED_EXECUTABLE
|
||||||
|
CommandLine()->AppendParm( "-game", DEFAULT_HL2_GAMEDIR );
|
||||||
|
CommandLine()->AppendParm( "-defaultgamedir", DEFAULT_HL2_GAMEDIR );
|
||||||
|
#endif
|
||||||
|
|
||||||
// No -dxlevel or +mat_hdr_level allowed on POSIX
|
// No -dxlevel or +mat_hdr_level allowed on POSIX
|
||||||
#ifdef POSIX
|
#ifdef POSIX
|
||||||
CommandLine()->RemoveParm( "-dxlevel" );
|
CommandLine()->RemoveParm( "-dxlevel" );
|
||||||
|
|
|
@ -48,6 +48,9 @@ def build(bld):
|
||||||
|
|
||||||
install_path = bld.env.LIBDIR
|
install_path = bld.env.LIBDIR
|
||||||
|
|
||||||
|
if 'cstrike' == bld.options.GAMES:
|
||||||
|
defines += ['CSS_ENHANCED_EXECUTABLE']
|
||||||
|
|
||||||
bld.shlib(
|
bld.shlib(
|
||||||
source = source,
|
source = source,
|
||||||
target = PROJECT_NAME,
|
target = PROJECT_NAME,
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
//
|
//
|
||||||
//=====================================================================================//
|
//=====================================================================================//
|
||||||
|
|
||||||
|
#include "tier1/strtools.h"
|
||||||
#if defined( _WIN32 ) && !defined( _X360 )
|
#if defined( _WIN32 ) && !defined( _X360 )
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -30,6 +30,21 @@ def build(bld):
|
||||||
source += ['launcher_main.rc']
|
source += ['launcher_main.rc']
|
||||||
|
|
||||||
install_path = bld.env.BINDIR
|
install_path = bld.env.BINDIR
|
||||||
|
|
||||||
|
if 'cstrike' == bld.options.GAMES:
|
||||||
|
bld(
|
||||||
|
source = source,
|
||||||
|
target = 'css_enhanced',
|
||||||
|
name = 'css_enhanced',
|
||||||
|
features = 'c cxx cxxprogram',
|
||||||
|
includes = includes,
|
||||||
|
defines = defines + ['CSS_ENHANCED_EXECUTABLE'],
|
||||||
|
use = libs,
|
||||||
|
install_path = install_path,
|
||||||
|
subsystem = bld.env.MSVC_SUBSYSTEM,
|
||||||
|
idx = bld.get_taskgen_count()
|
||||||
|
)
|
||||||
|
else:
|
||||||
bld(
|
bld(
|
||||||
source = source,
|
source = source,
|
||||||
target = PROJECT_NAME,
|
target = PROJECT_NAME,
|
||||||
|
|
Loading…
Reference in a new issue