Add .rc files.

Former-commit-id: 3d9c34eff669112a54d181ca3f970e2c77d31409
This commit is contained in:
David Anderson 2014-02-08 20:53:01 -08:00
parent 1f15fdd6cb
commit 779e064a17
5 changed files with 30 additions and 19 deletions

View File

@ -229,13 +229,11 @@ class AMXXConfig(object):
binary = compiler.Library(name)
binary.compiler.cxxincludes += [os.path.join(context.currentSourcePath)]
if builder.target_platform == 'windows':
#binary.sources += ['version.rc']
#binary.compiler.rcdefines += [
# 'BINARY_NAME="{0}"'.format(binary.outputFile),
# 'SM_GENERATED_BUILD',
# 'RC_COMPILE',
#]
pass
binary.compiler.rcdefines += [
'BINARY_NAME="{0}"'.format(binary.outputFile),
'AMBUILD',
'RC_COMPILE',
]
elif builder.target_platform == 'mac':
binary.compiler.postlink += [
'-compatibility_version', '1.0.0',
@ -250,7 +248,7 @@ class AMXXConfig(object):
os.path.join(context.currentSourcePath, 'sdk'),
]
if builder.target_platform == 'mac':
if builder.target_platform == 'mac' or builder.target_platform == 'windows':
name = name + '_amxx'
elif builder.target_platform == 'linux':
name = name + '_amxx_i386'
@ -260,14 +258,12 @@ class AMXXConfig(object):
def ProgramBuilder(self, context, compiler, name):
binary = compiler.Program(name)
binary.compiler.cxxincludes += [os.path.join(context.currentSourcePath)]
# if builder.target_platform == 'windows':
# binary.sources += ['version.rc']
# binary.compiler.rcdefines += [
# 'BINARY_NAME="{0}"'.format(binary.outputFile),
# 'SM_GENERATED_BUILD',
# 'RC_COMPILE',
# ]
# binary.compiler.linkflags += [self.versionlib]
if builder.target_platform == 'windows':
binary.compiler.rcdefines += [
'BINARY_NAME="{0}"'.format(binary.outputFile),
'AMBUILD',
'RC_COMPILE',
]
binary.compiler.sourcedeps += AMXX.generated_headers
return binary
@ -283,7 +279,7 @@ class AMXXConfig(object):
def MetaPlugin(self, context, name):
compiler = self.MMCompiler(context)
if builder.target_platform == 'mac':
if builder.target_platform == 'mac' or builder.target_platform == 'windows':
name = name + '_mm'
elif builder.target_platform == 'linux':
name = name + '_mm_i386'

View File

@ -94,4 +94,7 @@ binary.sources = [
'trie_natives.cpp',
]
if builder.target_platform == 'windows':
binary.sources += ['version.rc']
AMXX.binaries += [builder.Add(binary)]

View File

@ -6,7 +6,13 @@
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
#include "svn_version.h"
#if defined AMBUILD
# include <amxmodx_version.h>
#else
# define SVN_VERSION_DWORD 1, 8, 3, 0
# define SVN_VERSION_STRING "dev-local"
# define SVN_VERSION SVN_VERSION_STRING
#endif
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@ -49,7 +55,7 @@ BEGIN
VALUE "LegalCopyright", "Copyright (c) 2004-2007, AMX Mod X Dev Team"
VALUE "OriginalFilename", "amxmodx_mm.dll"
VALUE "ProductName", "AMX Mod X"
VALUE "ProductVersion", SVN_VERSION_PRODUCT
VALUE "ProductVersion", SVN_VERSION
END
END
BLOCK "VarFileInfo"

View File

@ -29,4 +29,7 @@ binary.sources = [
'Binary.cpp',
]
if builder.target_platform == 'windows':
binary.sources += ['amxxpc1.rc']
AMXX.amxxpc = builder.Add(binary)

View File

@ -35,4 +35,7 @@ binary.sources = [
'memfile.c',
]
if builder.target_platform == 'windows':
binary.sources+= ['libpawnc.rc']
AMXX.libpc300 = builder.Add(binary)