initial
This commit is contained in:
15
utils/vvis_launcher/StdAfx.cpp
Normal file
15
utils/vvis_launcher/StdAfx.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// vvis_launcher.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
31
utils/vvis_launcher/StdAfx.h
Normal file
31
utils/vvis_launcher/StdAfx.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently, but
|
||||
// are changed infrequently
|
||||
//
|
||||
|
||||
#if !defined(AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_)
|
||||
#define AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include "interface.h"
|
||||
|
||||
// TODO: reference additional headers your program requires here
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_STDAFX_H__29316173_1244_4B6A_B361_1ADB126E69F2__INCLUDED_)
|
||||
@@ -0,0 +1,22 @@
|
||||
// ----------------------------------------- //
|
||||
// File generated by VPC //
|
||||
// ----------------------------------------- //
|
||||
|
||||
Source file: F:\csgo_64\cstrike15_src\public\tier0\memoverride.cpp
|
||||
Debug output file: F:\csgo_64\cstrike15_src\public\tier0\memoverride.cpp
|
||||
Release output file: F:\csgo_64\cstrike15_src\public\tier0\memoverride.cpp
|
||||
Containing unity file:
|
||||
PCH file:
|
||||
|
||||
Source file: F:\csgo_64\cstrike15_src\utils\vvis_launcher\StdAfx.cpp
|
||||
Debug output file: F:\csgo_64\cstrike15_src\utils\vvis_launcher\StdAfx.cpp
|
||||
Release output file: F:\csgo_64\cstrike15_src\utils\vvis_launcher\StdAfx.cpp
|
||||
Containing unity file:
|
||||
PCH file:
|
||||
|
||||
Source file: F:\csgo_64\cstrike15_src\utils\vvis_launcher\vvis_launcher.cpp
|
||||
Debug output file: F:\csgo_64\cstrike15_src\utils\vvis_launcher\vvis_launcher.cpp
|
||||
Release output file: F:\csgo_64\cstrike15_src\utils\vvis_launcher\vvis_launcher.cpp
|
||||
Containing unity file:
|
||||
PCH file:
|
||||
|
||||
79
utils/vvis_launcher/vvis_launcher.cpp
Normal file
79
utils/vvis_launcher/vvis_launcher.cpp
Normal file
@@ -0,0 +1,79 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// vvis_launcher.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <direct.h>
|
||||
#include "tier1/strtools.h"
|
||||
#include "tier0/icommandline.h"
|
||||
#include "ilaunchabledll.h"
|
||||
|
||||
|
||||
|
||||
char* GetLastErrorString()
|
||||
{
|
||||
static char err[2048];
|
||||
|
||||
LPVOID lpMsgBuf;
|
||||
FormatMessage(
|
||||
FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||
FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL,
|
||||
GetLastError(),
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
|
||||
(LPTSTR) &lpMsgBuf,
|
||||
0,
|
||||
NULL
|
||||
);
|
||||
|
||||
strncpy( err, (char*)lpMsgBuf, sizeof( err ) );
|
||||
LocalFree( lpMsgBuf );
|
||||
|
||||
err[ sizeof( err ) - 1 ] = 0;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
CommandLine()->CreateCmdLine( argc, argv );
|
||||
const char *pDLLName = "vvis_dll.dll";
|
||||
|
||||
CSysModule *pModule = Sys_LoadModule( pDLLName );
|
||||
if ( !pModule )
|
||||
{
|
||||
printf( "vvis launcher error: can't load %s\n%s", pDLLName, GetLastErrorString() );
|
||||
return 1;
|
||||
}
|
||||
|
||||
CreateInterfaceFn fn = Sys_GetFactory( pModule );
|
||||
if( !fn )
|
||||
{
|
||||
printf( "vvis launcher error: can't get factory from %s\n", pDLLName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 2;
|
||||
}
|
||||
|
||||
int retCode = 0;
|
||||
ILaunchableDLL *pDLL = (ILaunchableDLL*)fn( LAUNCHABLE_DLL_INTERFACE_VERSION, &retCode );
|
||||
if( !pDLL )
|
||||
{
|
||||
printf( "vvis launcher error: can't get IVVisDLL interface from %s\n", pDLLName );
|
||||
Sys_UnloadModule( pModule );
|
||||
return 3;
|
||||
}
|
||||
|
||||
pDLL->main( argc, argv );
|
||||
Sys_UnloadModule( pModule );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
45
utils/vvis_launcher/vvis_launcher.vpc
Normal file
45
utils/vvis_launcher/vvis_launcher.vpc
Normal file
@@ -0,0 +1,45 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// VVIS_LAUNCHER.VPC
|
||||
//
|
||||
// Project Script
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$Macro SRCDIR "..\.."
|
||||
$Macro OUTBINDIR "$SRCDIR\..\game\bin"
|
||||
$Macro OUTBINNAME "vvis"
|
||||
|
||||
$Include "$SRCDIR\vpc_scripts\source_exe_con_win32_base.vpc"
|
||||
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories "$BASE,..\common"
|
||||
$Create/UsePrecompiledHeader "Use Precompiled Header (/Yu)"
|
||||
}
|
||||
}
|
||||
|
||||
$Project "Vvis_launcher"
|
||||
{
|
||||
$Folder "Source Files"
|
||||
{
|
||||
$File "vvis_launcher.cpp"
|
||||
|
||||
$File "StdAfx.cpp"
|
||||
{
|
||||
$Configuration
|
||||
{
|
||||
$Compiler
|
||||
{
|
||||
$Create/UsePrecompiledHeader "Create Precompiled Header (/Yc)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Folder "Header Files"
|
||||
{
|
||||
$File "$SRCDIR\public\tier1\interface.h"
|
||||
$File "StdAfx.h"
|
||||
}
|
||||
}
|
||||
13
utils/vvis_launcher/vvis_launcher.vpc.vpc_cache
Normal file
13
utils/vvis_launcher/vvis_launcher.vpc.vpc_cache
Normal file
@@ -0,0 +1,13 @@
|
||||
"vpc_cache"
|
||||
{
|
||||
"CacheVersion" "1"
|
||||
"win32"
|
||||
{
|
||||
"CRCFile" "vvis_launcher.vcxproj.vpc_crc"
|
||||
"OutputFiles"
|
||||
{
|
||||
"0" "vvis_launcher.vcxproj"
|
||||
"1" "vvis_launcher.vcxproj.filters"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user