mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-05 22:09:59 +03:00
1
This commit is contained in:
2996
utils/vtex/vtex.cpp
Normal file
2996
utils/vtex/vtex.cpp
Normal file
File diff suppressed because it is too large
Load Diff
68
utils/vtex/vtex_dll.vpc
Normal file
68
utils/vtex/vtex_dll.vpc
Normal file
@@ -0,0 +1,68 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// VTEX_DLL.VPC
|
||||
//
|
||||
// Project Script
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Macro SRCDIR "..\.."
|
||||
$Macro OUTBINDIR "$SRCDIR\..\game\bin"
|
||||
|
||||
$Include "$SRCDIR\vpc_scripts\source_dll_base.vpc"
|
||||
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE,..\common"
|
||||
$PreprocessorDefinitions "$BASE;VTEX_DLL;VTEX_DLL_EXPORTS;PROTECTED_THINGS_DISABLE"
|
||||
}
|
||||
|
||||
$Linker
|
||||
{
|
||||
$SystemLibraries "iconv" [$OSXALL]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$Configuration "Debug"
|
||||
{
|
||||
$General
|
||||
{
|
||||
$OutputDirectory ".\Debug_dll" [$WINDOWS]
|
||||
$IntermediateDirectory ".\Debug_dll" [$WINDOWS]
|
||||
}
|
||||
}
|
||||
|
||||
$Configuration "Release"
|
||||
{
|
||||
$General
|
||||
{
|
||||
$OutputDirectory ".\Release_dll" [$WINDOWS]
|
||||
$IntermediateDirectory ".\Release_dll" [$WINDOWS]
|
||||
}
|
||||
}
|
||||
|
||||
$Project "Vtex_dll"
|
||||
{
|
||||
$Folder "Source Files"
|
||||
{
|
||||
$File "..\common\cmdlib.cpp"
|
||||
$File "$SRCDIR\public\filesystem_helpers.cpp"
|
||||
$File "$SRCDIR\public\filesystem_init.cpp"
|
||||
$File "..\common\filesystem_tools.cpp"
|
||||
$File "vtex.cpp"
|
||||
}
|
||||
|
||||
$Folder "Header Files"
|
||||
{
|
||||
$File "$SRCDIR\public\ivtex.h"
|
||||
}
|
||||
|
||||
$Folder "Link Libraries"
|
||||
{
|
||||
$Lib bitmap
|
||||
$Lib mathlib
|
||||
$Lib tier2
|
||||
$Lib vtf
|
||||
}
|
||||
}
|
||||
46
utils/vtex/vtex_launcher.cpp
Normal file
46
utils/vtex/vtex_launcher.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
|
||||
#include <stdio.h>
|
||||
#include "tier1/interface.h"
|
||||
#include "ilaunchabledll.h"
|
||||
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
const char *pModuleName = "vtex_dll.dll";
|
||||
|
||||
CSysModule *pModule = Sys_LoadModule( pModuleName );
|
||||
if ( !pModule )
|
||||
{
|
||||
printf( "Can't load %s.", pModuleName );
|
||||
return 1;
|
||||
}
|
||||
|
||||
CreateInterfaceFn fn = Sys_GetFactory( pModule );
|
||||
if ( !fn )
|
||||
{
|
||||
printf( "Can't get factory from %s.", pModuleName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 1;
|
||||
}
|
||||
|
||||
ILaunchableDLL *pInterface = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, NULL );
|
||||
if ( !pInterface )
|
||||
{
|
||||
printf( "Can't get '%s' interface from %s.", LAUNCHABLE_DLL_INTERFACE_VERSION, pModuleName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 1;
|
||||
}
|
||||
|
||||
int iRet = pInterface->main( argc, argv );
|
||||
Sys_UnloadModule( pModule );
|
||||
return iRet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
44
utils/vtex/vtex_launcher.vpc
Normal file
44
utils/vtex/vtex_launcher.vpc
Normal file
@@ -0,0 +1,44 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// VTEX_LAUNCHER.VPC
|
||||
//
|
||||
// Project Script
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Macro SRCDIR "..\.."
|
||||
$Macro OUTBINDIR "$SRCDIR\..\game\bin"
|
||||
$Macro OUTBINNAME "vtex"
|
||||
|
||||
$Include "$SRCDIR\vpc_scripts\source_exe_con_base.vpc"
|
||||
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE;..\common"
|
||||
$PreprocessorDefinitions "$BASE;PROTECTED_THINGS_DISABLE"
|
||||
}
|
||||
|
||||
$Linker
|
||||
{
|
||||
$AdditionalDependencies "$BASE odbc32.lib odbccp32.lib"
|
||||
}
|
||||
}
|
||||
|
||||
$Project "Vtex_launcher"
|
||||
{
|
||||
$Folder "Source Files"
|
||||
{
|
||||
$File "vtex_launcher.cpp"
|
||||
}
|
||||
|
||||
$Folder "Header Files"
|
||||
{
|
||||
$File "$SRCDIR\public\ilaunchabledll.h"
|
||||
$File "$SRCDIR\public\tier1\interface.h"
|
||||
}
|
||||
|
||||
$Folder "Link Libraries"
|
||||
{
|
||||
$Lib tier2
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user