diff --git a/buildSrc/genVSproperties.bat b/buildSrc/genVSproperties.bat --- a/buildSrc/genVSproperties.bat +++ b/buildSrc/genVSproperties.bat @@ -31,14 +31,12 @@ set LIBPATH= REM Run the vsvars32.bat file, sending it's output to neverland. -set VSVER=100 -set VSVARSDIR=%VS100COMNTOOLS% -if "%VSVARSDIR%"=="" set VSVER=71 -if "%VSVARSDIR%"=="" set VSVARSDIR=%VS71COMNTOOLS% -if "%VSVARSDIR%"=="" set VSVER=80 -if "%VSVARSDIR%"=="" set VSVARSDIR=%VS80COMNTOOLS% -if "%VSVARSDIR%"=="" set VSVER=90 -if "%VSVARSDIR%"=="" set VSVARSDIR=%VS90COMNTOOLS% +set VSVER=120 +set VSVARSDIR=%VS120COMNTOOLS% +if "%VSVARSDIR%"=="" set VSVER=110 +if "%VSVARSDIR%"=="" set VSVARSDIR=%VS110COMNTOOLS% +if "%VSVARSDIR%"=="" set VSVER=100 +if "%VSVARSDIR%"=="" set VSVARSDIR=%VS100COMNTOOLS% REM We shouldn't depend on VSVARS32 as it's 32-bit only. REM However, this var is still used somewhere in FX (e.g. diff --git a/buildSrc/win.gradle b/buildSrc/win.gradle --- a/buildSrc/win.gradle +++ b/buildSrc/win.gradle @@ -41,10 +41,10 @@ WIN.libDest = "bin" def ccFlags = ["/nologo", "/W3", "/EHsc", "/c", - "/D_STATIC_CPPLIB", "/D_DISABLE_DEPRECATE_STATIC_CPPLIB", "/DINLINE=__inline", + "/DINLINE=__inline", "/DUNICODE", "/D_UNICODE", "/DWIN32", "/DIAL", "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN", "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32", - IS_DEBUG_NATIVE ? ["/MDd", "/Od", "/Zi", "/DDEBUG"] : ["/O2", "/MD", "/DNDEBUG"]].flatten(); + IS_DEBUG_NATIVE ? ["/MDd", "/Od", "/Zi", "/FS", "/DDEBUG"] : ["/O2", "/MD", "/DNDEBUG"]].flatten(); def linkFlags = ["/nologo", "/dll", "/manifest", "/opt:REF", "/incremental:no"]; if (IS_DEBUG_NATIVE) linkFlags.add("/debug"); @@ -113,13 +113,16 @@ : "$WINDOWS_VS_VSINSTALLDIR/VC/BIN") def compiler = IS_COMPILE_PARFAIT ? "cl.exe" : cygpath("$msvcBinDir/cl.exe") def linker = IS_COMPILE_PARFAIT ? "link.exe" : cygpath("$msvcBinDir/link.exe") -ext.RC = cygpath("$WINDOWS_SDK_DIR/Bin/RC.Exe") -def rcCompiler = cygpath("$WINDOWS_SDK_DIR/Bin/RC.Exe") +def winSdkBinDir="$WINDOWS_SDK_DIR/Bin/" + (IS_64 ? "x64" : "x86") +ext.RC = cygpath("$winSdkBinDir/RC.Exe") +def rcCompiler = RC ext.FXC = cygpath("$WINDOWS_DXSDK_DIR/utilities/bin/x86/fxc.exe") -ext.MC = cygpath("$WINDOWS_SDK_DIR/Bin/mt.exe") +ext.MC = cygpath("$winSdkBinDir/mt.exe") // This next line is based on a line in the ant build scripts, but doesn't seem to point to the right place //ext.MSVCR = cygpath("${WINDOWS_VS_MSVCDIR}/redist/${IS_64 ? 'x64' : 'x86'}/Microsoft.VC${WINDOWS_VS_VER}.CRT/msvcr${WINDOWS_VS_VER}.dll") +if (!file(RC).exists()) throw new GradleException("FAIL: cannot find RC") + def rcFlags = [ "/d", "\"JFX_COMPANY=${COMPANY_NAME}\"", "/d", "\"JFX_COMPONENT=${PRODUCT_NAME} ${PLATFORM_NAME} binary\"", @@ -148,7 +151,8 @@ "/d", "JFX_FNAME=glass.dll", "/d", "JFX_INTERNAL_NAME=glass", rcFlags].flatten(); -WIN.glass.ccFlags = [ccFlags, "/WX"].flatten() +// TODO kcr fix glass warnings and then add "/WX" back in +WIN.glass.ccFlags = [ccFlags].flatten() WIN.glass.linker = linker WIN.glass.linkFlags = [linkFlags, "delayimp.lib", "gdi32.lib", "urlmon.lib", "Comdlg32.lib", "winmm.lib", "imm32.lib", "shell32.lib", "Uiautomationcore.lib", "dwmapi.lib",