Add support for targeting Windows XP building with Visual Studio 2012 Update 1
This commit is contained in:
parent
66738ebff7
commit
e2df502218
3
makefile
3
makefile
|
@ -27,6 +27,9 @@ BUILD_X86_ASM = 1
|
|||
# Build for x64 targets (MinGW64 and MSVC only, this will undefine BUILD_A68K and BUILD_X86_ASM)
|
||||
#BUILD_X64_EXE = 1
|
||||
|
||||
# Build for Windows XP target (for use with Visual Studio 2012)
|
||||
#BUILD_VS2012_XP_TARGET = 1
|
||||
|
||||
# Include 7-zip support
|
||||
INCLUDE_7Z_SUPPORT = 1
|
||||
|
||||
|
|
14
makefile.vc
14
makefile.vc
|
@ -1,4 +1,4 @@
|
|||
# Makefile for FBA, for use with GNU make & Microsoft Visual C++ 2010
|
||||
# Makefile for FBA, for use with GNU make & Microsoft Visual C++ 2012
|
||||
#
|
||||
# The first pass makes sure all intermediary targets are present. The second pass updates
|
||||
# any targets, if necessary. (Intermediary) targets which have their own unique rules
|
||||
|
@ -58,6 +58,9 @@ ifndef UNICODE
|
|||
NAME := $(NAME)a
|
||||
COMPILENAME := $(COMPILENAME)a
|
||||
endif
|
||||
ifdef BUILD_VS2012_XP_TARGET
|
||||
NAME := $(NAME)xp
|
||||
endif
|
||||
|
||||
cpulevel = 6
|
||||
ifeq ($(CPUTYPE),i586)
|
||||
|
@ -212,6 +215,10 @@ ifdef BUILD_X64_EXE
|
|||
DEF := $(DEF) /DBUILD_X64_EXE
|
||||
endif
|
||||
|
||||
ifdef BUILD_VS2012_XP_TARGET
|
||||
DEF := $(DEF) /DBUILD_VS2012_XP_TARGET
|
||||
endif
|
||||
|
||||
ifdef SYMBOL
|
||||
CFLAGS = /nologo /Od /GF /GS /RTC1 /Zi /Zc:forScope /MTd /EHsc /Fp$(objdir)/dep/generated/ # /Wall
|
||||
ASFLAGS += -g
|
||||
|
@ -229,6 +236,11 @@ else
|
|||
LDFLAGS += /LTCG:STATUS
|
||||
endif
|
||||
|
||||
ifdef BUILD_VS2012_XP_TARGET
|
||||
CFLAGS += /D_USING_V110_SDK71_
|
||||
LDFLAGS += /SUBSYSTEM:WINDOWS,5.01
|
||||
endif
|
||||
|
||||
# Change the priority of some warnings so they are only shown at warning level 4. They are:
|
||||
# lvl4 C4127: conditional expression is constant
|
||||
# lvl4 C4201: nonstandard extension used : nameless struct/union
|
||||
|
|
|
@ -2883,11 +2883,14 @@ int ScrnSize()
|
|||
ew = GetSystemMetrics(SM_CXSIZEFRAME) << 1;
|
||||
eh = GetSystemMetrics(SM_CYSIZEFRAME) << 1;
|
||||
|
||||
// Visual Studio 2012 seems to have an issue with these, other reports on the web about it too
|
||||
// Visual Studio 2012 (seems to have an issue with these, other reports on the web about it too
|
||||
#if defined _MSC_VER
|
||||
#if _MSC_VER >= 1700
|
||||
ew <<= 1;
|
||||
eh <<= 1;
|
||||
// using the old XP supporting SDK we don't need to alter anything
|
||||
#if !defined BUILD_VS2012_XP_TARGET
|
||||
ew <<= 1;
|
||||
eh <<= 1;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,7 +31,11 @@ int main(int /*argc*/, char** /*argv*/)
|
|||
#elif _MSC_VER >= 1600 && _MSC_VER < 1700
|
||||
printf("#define BUILD_COMP Visual C++ 2010\n");
|
||||
#elif _MSC_VER >= 1700 && _MSC_VER < 1800
|
||||
#if defined BUILD_VS2012_XP_TARGET
|
||||
printf("#define BUILD_COMP Visual C++ 2012 (XP)\n");
|
||||
#else
|
||||
printf("#define BUILD_COMP Visual C++ 2012\n");
|
||||
#endif
|
||||
#else
|
||||
printf("#define BUILD_COMP Visual C++ %i.%i\n", _MSC_VER / 100 - 6, _MSC_VER % 100 / 10);
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue