Various Windows build fixes (bug 5997 part 13, r=ds).
Various Windows build fixes (
bug 5997 part 13, r=ds).
1.1 --- a/AMBuildScript Mon Dec 30 17:51:00 2013 -0500
1.2 +++ b/AMBuildScript Mon Dec 30 17:51:00 2013 -0500
1.3 @@ -252,7 +252,8 @@
1.4 binary.sources += ['version.rc']
1.5 binary.compiler.rcdefines += [
1.6 'BINARY_NAME="{0}"'.format(binary.outputFile),
1.7 - 'SM_GENERATED_BUILD'
1.8 + 'SM_GENERATED_BUILD',
1.9 + 'RC_COMPILE',
1.10 ]
1.11 elif builder.target_platform == 'mac':
1.12 binary.compiler.postlink += [
1.13 @@ -269,7 +270,8 @@
1.14 binary.sources += ['version.rc']
1.15 binary.compiler.rcdefines += [
1.16 'BINARY_NAME="{0}"'.format(binary.outputFile),
1.17 - 'SM_GENERATED_BUILD'
1.18 + 'SM_GENERATED_BUILD',
1.19 + 'RC_COMPILE',
1.20 ]
1.21 binary.compiler.linkflags += [self.versionlib]
1.22 binary.compiler.sourcedeps += SM.generated_headers
2.1 --- a/extensions/curl/curl-src/lib/AMBuilder Mon Dec 30 17:51:00 2013 -0500
2.2 +++ b/extensions/curl/curl-src/lib/AMBuilder Mon Dec 30 17:51:00 2013 -0500
2.3 @@ -14,6 +14,12 @@
2.4 mac_tuple = mac_version.split('.')
2.5 if int(mac_tuple[0]) >= 10 and int(mac_tuple[1]) >= 9:
2.6 binary.compiler.defines += ['BUILTIN_STRLCAT']
2.7 +elif builder.target_platform is 'windows':
2.8 + binary.compiler.defines += [
2.9 + 'BUILDING_LIBCURL',
2.10 + 'CURL_STATICLIB',
2.11 + 'CURL_DISABLE_LDAP',
2.12 + ]
2.13
2.14 binary.sources += [
2.15 'base64.c',
2.16 @@ -52,7 +58,6 @@
2.17 'llist.c',
2.18 'md5.c',
2.19 'memdebug.c',
2.20 - 'mprintf.c',
2.21 'multi.c',
2.22 'netrc.c',
2.23 'nss.c',
2.24 @@ -82,5 +87,7 @@
2.25 'url.c',
2.26 'version.c'
2.27 ]
2.28 +if builder.target_platform != 'windows':
2.29 + builder.sources += ['mprintf.c']
2.30 rvalue = builder.Add(binary)
2.31
3.1 --- a/public/sourcemod_version.h Mon Dec 30 17:51:00 2013 -0500
3.2 +++ b/public/sourcemod_version.h Mon Dec 30 17:51:00 2013 -0500
3.3 @@ -39,6 +39,9 @@
3.4 */
3.5
3.6 #if defined SM_GENERATED_BUILD
3.7 +# if defined RC_COMPILE
3.8 +# undef SM_USE_VERSIONLIB
3.9 +# endif
3.10 # if defined SM_USE_VERSIONLIB
3.11 # include <versionlib.h>
3.12 # else
4.1 --- a/sourcepawn/compiler/libpawnc.rc Mon Dec 30 17:51:00 2013 -0500
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,52 +0,0 @@
4.4 -#include <windows.h>
4.5 -#if defined WIN32 || defined _WIN32 || defined __WIN32__
4.6 -# include <winver.h>
4.7 -#else
4.8 -# include <ver.h>
4.9 -#endif
4.10 -#include <sourcemod_version.h>
4.11 -
4.12 -AppIcon ICON "pawn.ico"
4.13 -
4.14 -/* Version information
4.15 - *
4.16 - * All strings MUST have an explicit \0. See the Windows SDK documentation
4.17 - * for details on version information and the VERSIONINFO structure.
4.18 - */
4.19 -
4.20 -#define VERSIONNAME "smcomp.exe\0"
4.21 -#define VERSIONDESCRIPTION "SourcePawn Compiler\0"
4.22 -#define VERSIONPRODUCTNAME "smcomp\0"
4.23 -
4.24 -VS_VERSION_INFO VERSIONINFO
4.25 -FILEVERSION SM_VERSION_FILE
4.26 -PRODUCTVERSION SM_VERSION_FILE
4.27 -FILEFLAGSMASK 0x0000003FL
4.28 -FILEFLAGS 0
4.29 -#if defined(WIN32)
4.30 - FILEOS VOS__WINDOWS32
4.31 -#else
4.32 - FILEOS VOS__WINDOWS16
4.33 -#endif
4.34 -FILETYPE VFT_DLL
4.35 -BEGIN
4.36 - BLOCK "StringFileInfo"
4.37 - BEGIN
4.38 - BLOCK "040904E4"
4.39 - BEGIN
4.40 - VALUE "CompanyName", "(C)1998-2006 ITB CompuPhase, AlliedModders LLC\0"
4.41 - VALUE "FileDescription", VERSIONDESCRIPTION
4.42 - VALUE "FileVersion", SM_VERSION_STRING
4.43 - VALUE "InternalName", VERSIONNAME
4.44 - VALUE "LegalCopyright", "(C)1998-2006 ITB CompuPhase, AlliedModders LLC\0"
4.45 - VALUE "OriginalFilename", VERSIONNAME
4.46 - VALUE "ProductName", VERSIONPRODUCTNAME
4.47 - VALUE "ProductVersion", SM_VERSION_STRING
4.48 - END
4.49 - END
4.50 -
4.51 - BLOCK "VarFileInfo"
4.52 - BEGIN
4.53 - VALUE "Translation", 0x409, 1252
4.54 - END
4.55 -END
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/sourcepawn/compiler/version.rc Mon Dec 30 17:51:00 2013 -0500
5.3 @@ -0,0 +1,52 @@
5.4 +#include <windows.h>
5.5 +#if defined WIN32 || defined _WIN32 || defined __WIN32__
5.6 +# include <winver.h>
5.7 +#else
5.8 +# include <ver.h>
5.9 +#endif
5.10 +#include <sourcemod_version.h>
5.11 +
5.12 +AppIcon ICON "pawn.ico"
5.13 +
5.14 +/* Version information
5.15 + *
5.16 + * All strings MUST have an explicit \0. See the Windows SDK documentation
5.17 + * for details on version information and the VERSIONINFO structure.
5.18 + */
5.19 +
5.20 +#define VERSIONNAME "smcomp.exe\0"
5.21 +#define VERSIONDESCRIPTION "SourcePawn Compiler\0"
5.22 +#define VERSIONPRODUCTNAME "smcomp\0"
5.23 +
5.24 +VS_VERSION_INFO VERSIONINFO
5.25 +FILEVERSION SM_VERSION_FILE
5.26 +PRODUCTVERSION SM_VERSION_FILE
5.27 +FILEFLAGSMASK 0x0000003FL
5.28 +FILEFLAGS 0
5.29 +#if defined(WIN32)
5.30 + FILEOS VOS__WINDOWS32
5.31 +#else
5.32 + FILEOS VOS__WINDOWS16
5.33 +#endif
5.34 +FILETYPE VFT_DLL
5.35 +BEGIN
5.36 + BLOCK "StringFileInfo"
5.37 + BEGIN
5.38 + BLOCK "040904E4"
5.39 + BEGIN
5.40 + VALUE "CompanyName", "(C)1998-2006 ITB CompuPhase, AlliedModders LLC\0"
5.41 + VALUE "FileDescription", VERSIONDESCRIPTION
5.42 + VALUE "FileVersion", SM_VERSION_STRING
5.43 + VALUE "InternalName", VERSIONNAME
5.44 + VALUE "LegalCopyright", "(C)1998-2006 ITB CompuPhase, AlliedModders LLC\0"
5.45 + VALUE "OriginalFilename", VERSIONNAME
5.46 + VALUE "ProductName", VERSIONPRODUCTNAME
5.47 + VALUE "ProductVersion", SM_VERSION_STRING
5.48 + END
5.49 + END
5.50 +
5.51 + BLOCK "VarFileInfo"
5.52 + BEGIN
5.53 + VALUE "Translation", 0x409, 1252
5.54 + END
5.55 +END