added versioning/resource file
prevented loading after new api is called --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401567
This commit is contained in:
parent
4a8f76afd9
commit
5994e3e35e
@ -68,6 +68,7 @@
|
||||
#define FILENAME_1_6_EP1 "sourcemod.2.ep1" PLATFORM_EXT
|
||||
|
||||
HINSTANCE g_hCore = NULL;
|
||||
bool load_attempted = false;
|
||||
|
||||
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
|
||||
{
|
||||
@ -140,6 +141,8 @@ bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength)
|
||||
DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, const MetamodLoaderInfo *mli)
|
||||
{
|
||||
char *filename;
|
||||
|
||||
load_attempted = true;
|
||||
|
||||
if (mvi->api_major > METAMOD_API_MAJOR)
|
||||
{
|
||||
@ -182,7 +185,15 @@ DLL_EXPORT void UnloadInterface_MMS()
|
||||
|
||||
DLL_EXPORT void *CreateInterface(const char *iface, int *ret)
|
||||
{
|
||||
if (strcmp(iface, METAMOD_PLAPI_NAME))
|
||||
/**
|
||||
* If a load has already been attempted, bail out immediately.
|
||||
*/
|
||||
if (load_attempted)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (strcmp(iface, METAMOD_PLAPI_NAME) == 0)
|
||||
{
|
||||
char thisfile[256];
|
||||
char targetfile[256];
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="8.00"
|
||||
Name="loader"
|
||||
ProjectGUID="{B3E797CF-4E77-4C9D-B8A8-7589B6902206}"
|
||||
RootNamespace="loader"
|
||||
@ -199,6 +199,10 @@
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\version.rc"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
|
46
loader/svn_version.h
Normal file
46
loader/svn_version.h
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||
* this exception to all derivative works. AlliedModders LLC defines further
|
||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||
* or <http://www.sourcemod.net/license.php>.
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Autogenerated by build scripts
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_SOURCEMOD_VERSION_H_
|
||||
#define _INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
/**
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "1.0.0.1336"
|
||||
#define SVN_FILE_VERSION 1,0,0,1336
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
46
loader/svn_version.tpl
Normal file
46
loader/svn_version.tpl
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod
|
||||
* Copyright (C) 2004-2007 AlliedModders LLC. All rights reserved.
|
||||
* =============================================================================
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, version 3.0, as published by the
|
||||
* Free Software Foundation.
|
||||
*
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* As a special exception, AlliedModders LLC gives you permission to link the
|
||||
* code of this program (as well as its derivative works) to "Half-Life 2," the
|
||||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
|
||||
* by the Valve Corporation. You must obey the GNU General Public License in
|
||||
* all respects for all other code used. Additionally, AlliedModders LLC grants
|
||||
* this exception to all derivative works. AlliedModders LLC defines further
|
||||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
|
||||
* or <http://www.sourcemod.net/license.php>.
|
||||
*
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Autogenerated by build scripts
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE_SOURCEMOD_VERSION_H_
|
||||
#define _INCLUDE_SOURCEMOD_VERSION_H_
|
||||
|
||||
/**
|
||||
* @file Contains SourceMod version information.
|
||||
*/
|
||||
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$.$GLOBAL_BUILD$"
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,$GLOBAL_BUILD$
|
||||
|
||||
#endif //_INCLUDE_SOURCEMOD_VERSION_H_
|
104
loader/version.rc
Normal file
104
loader/version.rc
Normal file
@ -0,0 +1,104 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
//#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
#include "svn_version.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION SVN_FILE_VERSION
|
||||
PRODUCTVERSION SVN_FILE_VERSION
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "000004b0"
|
||||
BEGIN
|
||||
VALUE "Comments", "SourceMod Loader"
|
||||
VALUE "FileDescription", "SourceMod Loader"
|
||||
VALUE "FileVersion", SVN_FULL_VERSION
|
||||
VALUE "InternalName", "sourcemod"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004-2007, AlliedModders LLC"
|
||||
VALUE "OriginalFilename", "sourcemod_mm.dll"
|
||||
VALUE "ProductName", "SourceMod Loader"
|
||||
VALUE "ProductVersion", SVN_FULL_VERSION
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0, 1200
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
Loading…
Reference in New Issue
Block a user