Initial import of new build system (bug 3977).
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# vim: set ts=2 sw=2 tw=99 noet ft=python:
|
||||
import os
|
||||
|
||||
compiler = SM.DefaultExtCompiler('extensions/sqlite')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(SM.mmsPath, 'core', 'sourcehook'))
|
||||
|
||||
compiler['CDEFINES'].extend(['SQLITE_OMIT_LOAD_EXTENSION', 'SQLITE_THREADSAFE'])
|
||||
if AMBuild.target['platform'] == 'linux':
|
||||
compiler['POSTLINKFLAGS'].extend(['-ldl', '-lpthread'])
|
||||
|
||||
extension = AMBuild.AddJob('dbi.sqlite.ext')
|
||||
binary = Cpp.LibraryBuilder('dbi.sqlite.ext', AMBuild, extension, compiler)
|
||||
files = [
|
||||
'sdk/smsdk_ext.cpp', 'sdk/sm_memtable.cpp', 'extension.cpp',
|
||||
'driver/SqDatabase.cpp', 'driver/SqDriver.cpp', 'driver/SqQuery.cpp',
|
||||
'driver/SqResults.cpp', 'sqlite-source/alter.c', 'sqlite-source/analyze.c',
|
||||
'sqlite-source/attach.c', 'sqlite-source/auth.c', 'sqlite-source/btree.c',
|
||||
'sqlite-source/build.c', 'sqlite-source/callback.c', 'sqlite-source/complete.c',
|
||||
'sqlite-source/date.c', 'sqlite-source/delete.c', 'sqlite-source/expr.c',
|
||||
'sqlite-source/func.c', 'sqlite-source/hash.c', 'sqlite-source/insert.c',
|
||||
'sqlite-source/legacy.c', 'sqlite-source/main.c', 'sqlite-source/malloc.c',
|
||||
'sqlite-source/opcodes.c', 'sqlite-source/os.c',
|
||||
'sqlite-source/pager.c', 'sqlite-source/parse.c', 'sqlite-source/pragma.c',
|
||||
'sqlite-source/prepare.c', 'sqlite-source/printf.c', 'sqlite-source/random.c',
|
||||
'sqlite-source/select.c', 'sqlite-source/table.c', 'sqlite-source/tokenize.c',
|
||||
'sqlite-source/trigger.c', 'sqlite-source/update.c', 'sqlite-source/utf.c',
|
||||
'sqlite-source/util.c', 'sqlite-source/vacuum.c', 'sqlite-source/vdbe.c',
|
||||
'sqlite-source/vdbeapi.c', 'sqlite-source/vdbeaux.c', 'sqlite-source/vdbeblob.c',
|
||||
'sqlite-source/vdbefifo.c', 'sqlite-source/vdbemem.c', 'sqlite-source/vtab.c',
|
||||
'sqlite-source/where.c', 'sqlite-source/btmutex.c', 'sqlite-source/journal.c',
|
||||
'sqlite-source/mem1.c', 'sqlite-source/mem2.c', 'sqlite-source/mutex.c'
|
||||
]
|
||||
if AMBuild.target['platform'] == 'windows':
|
||||
files.extend(['sqlite-source/mutex_w32.c', 'sqlite-source/os_win.c'])
|
||||
elif AMBuild.target['platform'] == 'linux':
|
||||
files.extend(['sqlite-source/mutex_unix.c', 'sqlite-source/os_unix.c'])
|
||||
binary.AddSourceFiles('extensions/sqlite', files)
|
||||
SM.AutoVersion('extensions/sqlite', binary)
|
||||
binary.SendToJob()
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
* Version: $Id$
|
||||
*/
|
||||
|
||||
#include <sourcemod_version.h>
|
||||
#include "extension.h"
|
||||
#include "driver/SqDriver.h"
|
||||
|
||||
@@ -70,3 +71,14 @@ size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
|
||||
return len;
|
||||
}
|
||||
}
|
||||
|
||||
const char *SqliteExt::GetVersion()
|
||||
{
|
||||
return SM_FULL_VERSION;
|
||||
}
|
||||
|
||||
const char *SqliteExt::GetDate()
|
||||
{
|
||||
return SM_BUILD_TIMESTAMP;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ public:
|
||||
*/
|
||||
virtual void SDK_OnUnload();
|
||||
|
||||
const char *GetVersion();
|
||||
const char *GetDate();
|
||||
|
||||
/**
|
||||
* @brief This is called once all known extensions have been loaded.
|
||||
* Note: It is is a good idea to add natives here, if any are provided.
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_
|
||||
|
||||
#include "svn_version.h"
|
||||
|
||||
/**
|
||||
* @file smsdk_config.h
|
||||
* @brief Contains macros for configuring basic extension information.
|
||||
@@ -42,12 +40,12 @@
|
||||
/* Basic information exposed publicly */
|
||||
#define SMEXT_CONF_NAME "SQLite"
|
||||
#define SMEXT_CONF_DESCRIPTION "SQLite Driver"
|
||||
#define SMEXT_CONF_VERSION SVN_FULL_VERSION
|
||||
#define SMEXT_CONF_VERSION ""
|
||||
#define SMEXT_CONF_AUTHOR "AlliedModders LLC"
|
||||
#define SMEXT_CONF_URL "http://www.sourcemod.net/"
|
||||
#define SMEXT_CONF_LOGTAG "SQLITE"
|
||||
#define SMEXT_CONF_LICENSE "GPL"
|
||||
#define SMEXT_CONF_DATESTRING __DATE__ " " __TIME__
|
||||
#define SMEXT_CONF_DATESTRING ""
|
||||
|
||||
/**
|
||||
* @brief Exposes plugin's main interface.
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod SQLite Extension
|
||||
* Copyright (C) 2004-2008 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_SQLITEEXT_VERSION_H_
|
||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
#define SM_BUILD_STRING "-dev"
|
||||
#define SM_BUILD_UNIQUEID "2757:4d62987ed79b" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "1.2.4" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION 1,2,4,0
|
||||
|
||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* vim: set ts=4 :
|
||||
* =============================================================================
|
||||
* SourceMod SQLite Extension
|
||||
* Copyright (C) 2004-2008 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_SQLITEEXT_VERSION_H_
|
||||
#define _INCLUDE_SQLITEEXT_VERSION_H_
|
||||
|
||||
#define SM_BUILD_STRING "$BUILD_STRING$"
|
||||
#define SM_BUILD_UNIQUEID "$BUILD_ID$" SM_BUILD_STRING
|
||||
#define SVN_FULL_VERSION "$PMAJOR$.$PMINOR$.$PREVISION$" SM_BUILD_STRING
|
||||
#define SVN_FILE_VERSION $PMAJOR$,$PMINOR$,$PREVISION$,0
|
||||
|
||||
#endif //_INCLUDE_SQLITEEXT_VERSION_H_
|
||||
@@ -9,7 +9,7 @@
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
#include "svn_version.h"
|
||||
#include <sourcemod_version.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
@@ -29,8 +29,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION SVN_FILE_VERSION
|
||||
PRODUCTVERSION SVN_FILE_VERSION
|
||||
FILEVERSION SM_FILE_VERSION
|
||||
PRODUCTVERSION SM_FILE_VERSION
|
||||
FILEFLAGSMASK 0x17L
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@@ -47,12 +47,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "Comments", "SQLite Extension"
|
||||
VALUE "FileDescription", "SourceMod SQLite Extension"
|
||||
VALUE "FileVersion", SVN_FULL_VERSION
|
||||
VALUE "FileVersion", SM_FULL_VERSION
|
||||
VALUE "InternalName", "SourceMod SQLite Extension"
|
||||
VALUE "LegalCopyright", "Copyright (c) 2004-2008, AlliedModders LLC"
|
||||
VALUE "OriginalFilename", BINARY_NAME
|
||||
VALUE "ProductName", "SourceMod SQLite Extension"
|
||||
VALUE "ProductVersion", SVN_FULL_VERSION
|
||||
VALUE "ProductVersion", SM_FULL_VERSION
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
Reference in New Issue
Block a user