view buildSrc/win.gradle @ 11208:db2c977a840b

8220147: Cherry pick GTK WebKit 2.22.7 changes Reviewed-by: mbilla, kcr
author arajkumar
date Fri, 08 Mar 2019 14:03:47 +0530
parents dc4eac151944
children
line wrap: on
line source
/*
 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.  Oracle designates this
 * particular file as subject to the "Classpath" exception as provided
 * by Oracle in the LICENSE file that accompanied this code.
 *
 * This code 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
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
 */

ext.WIN = [:]

WIN.canBuild = IS_WINDOWS
if (!WIN.canBuild) return;

WIN.compileSwing = true;
WIN.compileSWT = true;

WIN.includeNull3d = true

// Lambda for naming the generated libs
WIN.library = { name -> return "${name}.dll" as String }

WIN.libDest = "bin"
WIN.modLibDest = "lib"

def CPU_BITS = IS_64 ? "x64" : "x86"

setupTools("windows_tools",
    { propFile ->
        if (project.hasProperty('setupWinTools')) {
            setupWinTools(propFile)
        } else {
            // Create the properties file
            ByteArrayOutputStream results = new ByteArrayOutputStream();
            String winsdkDir = System.getenv().get("WINSDK_DIR");
            exec({
                environment([
                        "WINSDKPATH" : winsdkDir == null ? "" : winsdkDir,
                        "CONF"       : "/$CONF", // TODO does this mean the generated properties must be reset when in a different configuration?
                        "VCARCH"     : IS_64 ? "amd64" : "x86",
                        "SDKARCH"    : IS_64 ? "/x64" : "/x86",
                ]);
                commandLine("cmd", "/q", "/c", "buildSrc\\genVSproperties.bat");
                setStandardOutput(results);
            });
            BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim()));
            reader.readLine();
            reader.readLine();
            String line;
            while ((line = reader.readLine()) != null && !line.startsWith("######")) {
                line = line.replace("\\", "/").replace("/@@ENDOFLINE@@", "").replace("@@ENDOFLINE@@", "").replace("//", "/").replace("windows.vs.", "WINDOWS_VS_");
                propFile << line << "\r\n";
            }
        }
    },
    { properties ->
        defineProperty("WINDOWS_VS_VSINSTALLDIR", properties, "c:/Program Files (x86)/Microsoft Visual Studio/2017/Professional");
        defineProperty("WINDOWS_VS_WINSDKDLLINSTALLDIR", properties, "c:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs");
        defineProperty("WINDOWS_SDK_DIR", properties, System.getenv().get("WINSDK_DIR"))
        defineProperty("WINDOWS_SDK_VERSION", properties, "")
        defineProperty("WINDOWS_VS_VCINSTALLDIR", properties, "$WINDOWS_VS_VSINSTALLDIR/VC")
        defineProperty("WINDOWS_VS_DEVENVDIR", properties, "$WINDOWS_VS_VSINSTALLDIR/Common7/IDE")
        defineProperty("WINDOWS_VS_DEVENVCMD", properties, "$WINDOWS_VS_DEVENVDIR/VCExpress.exe")
        defineProperty("WINDOWS_VS_MSVCDIR", properties, WINDOWS_VS_VCINSTALLDIR)
        defineProperty("WINDOWS_DXSDK_DIR", properties, System.getenv().get("DXSDK_DIR"))
        defineProperty("WINDOWS_VS_INCLUDE", properties, "$WINDOWS_VS_VCINSTALLDIR/INCLUDE;" + "$WINDOWS_SDK_DIR/include;")
        defineProperty("WINDOWS_VS_VER", properties, "150")
        defineProperty("WINDOWS_CRT_VER", properties, "150")
        defineProperty("WINDOWS_VS_LIB", properties, "$WINDOWS_VS_VCINSTALLDIR/LIB;" + "$WINDOWS_SDK_DIR/lib;")
        defineProperty("WINDOWS_VS_LIBPATH", properties, "$WINDOWS_VS_VCINSTALLDIR/LIB;")
        def parfaitPath = IS_COMPILE_PARFAIT ? System.getenv().get("PARFAIT_PATH") + ";" : "";
        defineProperty("WINDOWS_VS_PATH", properties, parfaitPath + "$WINDOWS_VS_DEVENVDIR;" +
                "$WINDOWS_VS_VSINSTALLDIR/VC/BIN;" +
                "$WINDOWS_VS_VSINSTALLDIR/Common7/Tools;" +
                "$WINDOWS_VS_VCINSTALLDIR/VCPackages;" +
                "$WINDOWS_SDK_DIR/bin/NETFX 4.0 Tools;" +
                "$WINDOWS_SDK_DIR/bin;" +
                System.getenv().get("PATH"))
    }
)

if (WINDOWS_SDK_DIR == null || WINDOWS_SDK_DIR == "") {
    throw new GradleException("FAIL: WINSDK_DIR not defined");
}

// Define set of flags shared for all targets that support debug compilation
def ccDebugFlags =
    IS_DEBUG_NATIVE ? ["/MDd", "/Od", "/Zi", "/DDEBUG"] : ["/O2", "/MD", "/DNDEBUG"]

def winVsVer = Integer.parseInt(WINDOWS_VS_VER)
if (winVsVer >= 120) {
    // Serialize access to PDB file for debug builds if on VS2013 or later
    if (IS_DEBUG_NATIVE) ccDebugFlags += "/FS"
}


// Common set of flags for all modules
def ccFlags = ["/nologo", "/W3", "/EHsc", "/c",
        "/D_STATIC_CPPLIB", "/D_DISABLE_DEPRECATE_STATIC_CPPLIB", "/DINLINE=__inline",
        "/DUNICODE", "/D_UNICODE", "/DWIN32", "/DIAL", "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN",
        "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32",
        ccDebugFlags].flatten();

def linkFlags = ["/nologo", "/dll", "/manifest", "/opt:REF", "/incremental:no", "/dynamicbase", "/nxcompat"];
if (!IS_64) linkFlags.add("/safeseh");
if (IS_DEBUG_NATIVE) linkFlags.add("/debug");

// Remove C++ static linking if not on VS2010
if (WINDOWS_VS_VER != "100") {
    ccFlags -= ["/D_STATIC_CPPLIB", "/D_DISABLE_DEPRECATE_STATIC_CPPLIB"]
}

ext.WINDOWS_NATIVE_COMPILE_ENVIRONMENT = [
        "VCINSTALLDIR"         : WINDOWS_VS_VCINSTALLDIR,
        "VSINSTALLDIR"         : WINDOWS_VS_VSINSTALLDIR,
        "DEVENVDIR"            : WINDOWS_VS_DEVENVDIR,
        "MSVCDIR"              : WINDOWS_VS_MSVCDIR,
        "VS_VER"               : WINDOWS_VS_VER,
        "PATH"                 : WINDOWS_VS_PATH,
        "INCLUDE"              : WINDOWS_VS_INCLUDE,
        "LIB"                  : WINDOWS_VS_LIB,
        "LIBPATH"              : WINDOWS_VS_LIBPATH,
        "DXSDK_DIR"            : WINDOWS_DXSDK_DIR
];
def msvcVer = System.getenv("MSVC_VER") ?: "14.10.25017"
def msvcBinDir = ""
if (hasProperty('toolchainDir')) {
    msvcBinDir = "$WINDOWS_VS_VSINSTALLDIR/VC/bin/$CPU_BITS"
} else if (winVsVer == 150) {
    msvcBinDir = "$WINDOWS_VS_VSINSTALLDIR/VC/Tools/MSVC/$msvcVer/bin/Host${CPU_BITS}/$CPU_BITS"
} else if (winVsVer <= 120) {
    msvcBinDir = (IS_64
                      ? "$WINDOWS_VS_VSINSTALLDIR/VC/BIN/amd64"
                      : "$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")
def winSdkBinDir = "$WINDOWS_SDK_DIR/Bin"
if (WINDOWS_VS_VER != "100") {
    winSdkBinDir += "/$CPU_BITS"
}

if (!file(cygpath("$winSdkBinDir/RC.Exe")).exists()) {
    winSdkBinDir = "$WINDOWS_SDK_DIR/Bin/$WINDOWS_SDK_VERSION"
    if (WINDOWS_VS_VER != "100") {
        winSdkBinDir += "/$CPU_BITS"
    }
}

ext.RC = cygpath("$winSdkBinDir/rc.exe")
def rcCompiler = RC
ext.FXC = cygpath("$winSdkBinDir/fxc.exe")

if (!file(FXC).exists()) {
    if (WINDOWS_DXSDK_DIR == null || WINDOWS_DXSDK_DIR == "") {
        throw new GradleException("FAIL: DXSDK_DIR not defined");
    }
    ext.FXC = cygpath("$WINDOWS_DXSDK_DIR/utilities/bin/x86/fxc.exe")
}

ext.MC = cygpath("$winSdkBinDir/mt.exe")

if (!file(RC).exists()) throw new GradleException("FAIL: cannot find RC: " + RC)
if (!file(FXC).exists()) throw new GradleException("FAIL: cannot find FXC: " + FXC)

def msvcRedstDir
if (hasProperty('toolchainDir')) {
    msvcRedstDir = "$WINDOWS_VS_VSINSTALLDIR/VC/Redist/$CPU_BITS"
} else {
    def msvcRedistVer = System.getenv("MSVC_REDIST_VER") ?: "14.10.25008"
    msvcRedstDir = "$WINDOWS_VS_VSINSTALLDIR/VC/Redist/MSVC/$msvcRedistVer/$CPU_BITS"
}

def winSdkDllDir = "$WINDOWS_VS_WINSDKDLLINSTALLDIR/$CPU_BITS"

def WINDOWS_DLL_VER = WINDOWS_VS_VER
ext.MSVCR = null
ext.MSVCP = null

def windowsCRTVer = System.getenv("WINDOWS_CRT_VER") ?: WINDOWS_CRT_VER
if (WINDOWS_VS_VER == "150") {
    WINDOWS_DLL_VER = "140"
    ext.MSVCR = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT/vcruntime${WINDOWS_DLL_VER}.dll")
    ext.MSVCP = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT/msvcp${WINDOWS_DLL_VER}.dll")
}

def vs2017DllPath = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT")
if (file(vs2017DllPath).exists()) {
    ext.WIN.VS2017DLLNames = [
        "concrt140.dll",
        "msvcp140.dll",
        "vcruntime140.dll"
    ];
    ext.WIN.VS2017DLLs = []
    ext.WIN.VS2017DLLNames.each { vsdll->
        ext.WIN.VS2017DLLs += "$vs2017DllPath/$vsdll"
    }
}
else {
    ext.WIN.VS2017DLLNames = [
	];
    ext.WIN.VS2017DLLs = [
	];
}

def WinSDKDLLsPath = cygpath("${winSdkDllDir}")
if (file(WinSDKDLLsPath).exists()) {
    ext.WIN.WinSDKDLLNames = [
        "api-ms-win-core-console-l1-1-0.dll",
        "api-ms-win-core-datetime-l1-1-0.dll",
        "api-ms-win-core-debug-l1-1-0.dll",
        "api-ms-win-core-errorhandling-l1-1-0.dll",
        "api-ms-win-core-file-l1-1-0.dll",
        "api-ms-win-core-file-l1-2-0.dll",
        "api-ms-win-core-file-l2-1-0.dll",
        "api-ms-win-core-handle-l1-1-0.dll",
        "api-ms-win-core-heap-l1-1-0.dll",
        "api-ms-win-core-interlocked-l1-1-0.dll",
        "api-ms-win-core-libraryloader-l1-1-0.dll",
        "api-ms-win-core-localization-l1-2-0.dll",
        "api-ms-win-core-memory-l1-1-0.dll",
        "api-ms-win-core-namedpipe-l1-1-0.dll",
        "api-ms-win-core-processenvironment-l1-1-0.dll",
        "api-ms-win-core-processthreads-l1-1-0.dll",
        "api-ms-win-core-processthreads-l1-1-1.dll",
        "api-ms-win-core-profile-l1-1-0.dll",
        "api-ms-win-core-rtlsupport-l1-1-0.dll",
        "api-ms-win-core-string-l1-1-0.dll",
        "api-ms-win-core-synch-l1-1-0.dll",
        "api-ms-win-core-synch-l1-2-0.dll",
        "api-ms-win-core-sysinfo-l1-1-0.dll",
        "api-ms-win-core-timezone-l1-1-0.dll",
        "api-ms-win-core-util-l1-1-0.dll",
        "api-ms-win-crt-conio-l1-1-0.dll",
        "api-ms-win-crt-convert-l1-1-0.dll",
        "api-ms-win-crt-environment-l1-1-0.dll",
        "api-ms-win-crt-filesystem-l1-1-0.dll",
        "api-ms-win-crt-heap-l1-1-0.dll",
        "api-ms-win-crt-locale-l1-1-0.dll",
        "api-ms-win-crt-math-l1-1-0.dll",
        "api-ms-win-crt-multibyte-l1-1-0.dll",
        "api-ms-win-crt-private-l1-1-0.dll",
        "api-ms-win-crt-process-l1-1-0.dll",
        "api-ms-win-crt-runtime-l1-1-0.dll",
        "api-ms-win-crt-stdio-l1-1-0.dll",
        "api-ms-win-crt-string-l1-1-0.dll",
        "api-ms-win-crt-time-l1-1-0.dll",
        "api-ms-win-crt-utility-l1-1-0.dll",
        "ucrtbase.dll"
    ];
    ext.WIN.WinSDKDLLs = []
    ext.WIN.WinSDKDLLNames.each { winsdkdll->
        ext.WIN.WinSDKDLLs += "$WinSDKDLLsPath/$winsdkdll"
    }
}
else {
    ext.WIN.WinSDKDLLNames = [
    ];
    ext.WIN.WinSDKDLLs = [
    ];
}

// Product version variables passed to RC:
def rcVer = "$RELEASE_VERSION"
def rcVerMajor = Integer.parseInt(jfxReleaseMajorVersion)
def rcVerMinor = Integer.parseInt(jfxReleaseMinorVersion)
def rcVerSecurity = Integer.parseInt(jfxReleaseSecurityVersion)
def rcVerPatch = Integer.parseInt(jfxReleasePatchVersion)
def rcVerFile = "${rcVerMajor},${rcVerMinor},${rcVerSecurity},${rcVerPatch}"
def rcVerBuild = "$RELEASE_VERSION_LONG"
def rcVerCopyrYear = "${Calendar.getInstance().get(Calendar.YEAR)}"

def rcFlags = [
    "/d", "\"JFX_COMPANY=${COMPANY_NAME}\"",
    "/d", "\"JFX_COMPONENT=${PRODUCT_NAME} ${PLATFORM_NAME} binary\"",
    "/d", "\"JFX_NAME=${PRODUCT_NAME} ${PLATFORM_NAME} ${rcVerMajor}\"",
    "/d", "\"JFX_VER=${rcVer}\"",
    "/d", "\"JFX_BUILD_ID=${rcVerBuild}\"",
    "/d", "\"JFX_COPYRIGHT=Copyright \u00A9 ${rcVerCopyrYear}\"",
    "/d", "\"JFX_FVER=${rcVerFile}\"",
    "/d", "\"JFX_FTYPE=0x2L\"",
    "/nologo"
];

def defaultRcSource = file("${project("graphics").projectDir}/src/main/resources/version.rc");

WIN.glass = [:]
WIN.glass.javahInclude = [
    "com/sun/glass/events/**",
    "com/sun/glass/ui/*",
    "com/sun/glass/ui/win/*"]
WIN.glass.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/win")
WIN.glass.compiler = compiler
WIN.glass.rcCompiler = rcCompiler;
WIN.glass.rcSource = file("${project("graphics").projectDir}/src/main/native-glass/win/GlassResources.rc");
WIN.glass.rcFlags = [
    "/I", file("${project("graphics").projectDir}/src/main/resources"),
    "/d", "JFX_FNAME=glass.dll",
    "/d", "JFX_INTERNAL_NAME=glass",
    rcFlags].flatten();
WIN.glass.ccFlags = [ccFlags, "/WX"].flatten()
if (WINDOWS_VS_VER != "100") WIN.glass.ccFlags -= ["/WX"]
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",
        "/DELAYLOAD:user32.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:winmm.dll", "/DELAYLOAD:shell32.dll",
        "/DELAYLOAD:Uiautomationcore.dll", "/DELAYLOAD:dwmapi.dll"].flatten()
WIN.glass.lib = "glass"

WIN.decora = [:]
WIN.decora.compiler = compiler
WIN.decora.ccFlags = [IS_64 ? [] : ["/arch:SSE"], "/fp:fast", ccFlags].flatten()
WIN.decora.linker = linker
WIN.decora.linkFlags = [linkFlags].flatten()
WIN.decora.lib = "decora_sse"
WIN.decora.rcCompiler = rcCompiler;
WIN.decora.rcSource = defaultRcSource
WIN.decora.rcFlags = ["/d", "JFX_FNAME=decora_sse.dll", "/d", "JFX_INTERNAL_NAME=decora", rcFlags].flatten()

WIN.prism = [:]
WIN.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"]
WIN.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism")
WIN.prism.compiler = compiler
WIN.prism.ccFlags = [ccFlags].flatten()
WIN.prism.linker = linker
WIN.prism.linkFlags = [linkFlags].flatten()
WIN.prism.lib = "prism_common"
WIN.prism.rcCompiler = rcCompiler;
WIN.prism.rcSource = defaultRcSource
WIN.prism.rcFlags = ["/d", "JFX_FNAME=prism_common.dll", "/d", "JFX_INTERNAL_NAME=prism", rcFlags].flatten()

WIN.prismSW = [:]
WIN.prismSW.javahInclude = ["com/sun/pisces/**/*"]
WIN.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw")
WIN.prismSW.compiler = compiler
WIN.prismSW.ccFlags = [ccFlags].flatten()
WIN.prismSW.linker = linker
WIN.prismSW.linkFlags = [linkFlags].flatten()
WIN.prismSW.lib = "prism_sw"
WIN.prismSW.rcCompiler = rcCompiler;
WIN.prismSW.rcSource = defaultRcSource
WIN.prismSW.rcFlags = ["/d", "JFX_FNAME=prism_sw.dll", "/d", "JFX_INTERNAL_NAME=prismSW", rcFlags].flatten()

WIN.prismD3D = [:]
WIN.prismD3D.javahInclude = ["com/sun/prism/d3d/**/*"]
WIN.prismD3D.nativeSource = [
    file("${project("graphics").projectDir}/src/main/native-prism-d3d"),
    file("${project("graphics").projectDir}/src/main/native-prism-d3d/hlsl")]
WIN.prismD3D.compiler = compiler
WIN.prismD3D.ccFlags = [ccFlags, "/Ibuild/headers/PrismD3D"].flatten()
WIN.prismD3D.linker = linker
WIN.prismD3D.linkFlags = [linkFlags, "user32.lib"].flatten()
WIN.prismD3D.lib = "prism_d3d"
WIN.prismD3D.rcCompiler = rcCompiler;
WIN.prismD3D.rcSource = defaultRcSource
WIN.prismD3D.rcFlags = ["/d", "JFX_FNAME=prism_d3d.dll", "/d", "JFX_INTERNAL_NAME=prismD3D", rcFlags].flatten();

WIN.iio = [:]
WIN.iio.javahInclude = ["com/sun/javafx/iio/**/*"]
WIN.iio.nativeSource = [
    file("${project("graphics").projectDir}/src/main/native-iio"),
    file("${project("graphics").projectDir}/src/main/native-iio/libjpeg")]
WIN.iio.compiler = compiler
WIN.iio.ccFlags = [ccFlags].flatten()
WIN.iio.linker = linker
WIN.iio.linkFlags = [linkFlags].flatten()
WIN.iio.lib = "javafx_iio"
WIN.iio.rcCompiler = rcCompiler;
WIN.iio.rcSource = defaultRcSource
WIN.iio.rcFlags = ["/d", "JFX_FNAME=javafx_iio.dll", "/d", "JFX_INTERNAL_NAME=iio", rcFlags].flatten();

WIN.prismES2 = [:]
WIN.prismES2.javahInclude = ["com/sun/prism/es2/**/*"]
WIN.prismES2.nativeSource = [
    file("${project("graphics").projectDir}/src/main/native-prism-es2"),
    file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"),
    file("${project("graphics").projectDir}/src/main/native-prism-es2/windows")
]
WIN.prismES2.compiler = compiler
WIN.prismES2.ccFlags = ["/Ob1", "/GF", "/Gy", "/GS", "/DWIN32", ccFlags].flatten()
WIN.prismES2.linker = linker
WIN.prismES2.linkFlags = [linkFlags, "/SUBSYSTEM:WINDOWS", "opengl32.lib", "gdi32.lib", "user32.lib", "kernel32.lib"].flatten()
WIN.prismES2.lib = "prism_es2"
WIN.prismES2.rcCompiler = rcCompiler;
WIN.prismES2.rcSource = defaultRcSource
WIN.prismES2.rcFlags = ["/d", "JFX_FNAME=prism_es2.dll", "/d", "JFX_INTERNAL_NAME=prismES2", rcFlags].flatten();

def closedDir = file("$projectDir/../rt-closed")
WIN.font = [:]
WIN.font.javahInclude = [
        "com/sun/javafx/font/**/*",
        "com/sun/javafx/text/**/*"]
WIN.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")]
WIN.font.compiler = compiler
WIN.font.ccFlags = ["/DJFXFONT_PLUS", "/D_WIN32_WINNT=0x0601", ccFlags].flatten()
WIN.font.ccFlags -= ["/DUNICODE", "/D_UNICODE"]
WIN.font.linker = linker
WIN.font.linkFlags = [linkFlags, "advapi32.lib", "gdi32.lib", "user32.lib", "dwrite.lib", "d2d1.lib", "windowscodecs.lib", "ole32.lib"].flatten()
WIN.font.lib = "javafx_font"
WIN.font.rcCompiler = rcCompiler;
WIN.font.rcSource = defaultRcSource
WIN.font.rcFlags = ["/d", "JFX_FNAME=javafx_font.dll", "/d", "JFX_INTERNAL_NAME=font", rcFlags].flatten();

WIN.media = [:]
WIN.media.rcCompiler = rcCompiler
WIN.media.rcSource = defaultRcSource
WIN.media.glibRcFile = "glib-lite.res"
WIN.media.gstreamerRcFile = "gstreamer-lite.res"
WIN.media.fxpluginsRcFile = "fxplugins.res"
WIN.media.jfxmediaRcFile = "jfxmedia.res"
WIN.media.glibRcFlags = ["/d", "JFX_FNAME=glib-lite.dll", "/d", "JFX_INTERNAL_NAME=glib", rcFlags].flatten()
WIN.media.gstreamerRcFlags = ["/d", "JFX_FNAME=gstreamer-lite.dll", "/d", "JFX_INTERNAL_NAME=gstreamer", rcFlags].flatten()
WIN.media.fxpluginsRcFlags = ["/d", "JFX_FNAME=fxplugins.dll", "/d", "JFX_INTERNAL_NAME=fxplugins", rcFlags].flatten()
WIN.media.jfxmediaRcFlags = ["/d", "JFX_FNAME=jfxmedia.dll", "/d", "JFX_INTERNAL_NAME=jfxmedia", rcFlags].flatten()
def parfaitPath = System.getenv("PARFAIT_PATH");
WIN.media.compiler = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-cl.exe" : "cl.exe";
WIN.media.linker = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-link.exe" : "link.exe";
WIN.media.ar = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-lib.exe" : "lib.exe";

WIN.webkit = [:]
WIN.webkit.compiler = compiler
WIN.webkit.linker = linker
WIN.webkit.rcCompiler = rcCompiler
WIN.webkit.rcSource = defaultRcSource
WIN.webkit.rcFlags = ["/d", "JFX_FNAME=jfxwebkit.dll", "/d", "JFX_INTERNAL_NAME=webkit", rcFlags].flatten();