1 /* 2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 ext.WIN = [:] 27 28 WIN.canBuild = IS_WINDOWS 29 if (!WIN.canBuild) return; 30 31 WIN.compileSwing = true; 32 WIN.compileSWT = true; 33 34 WIN.includeNull3d = true 35 36 // Lambda for naming the generated libs 37 WIN.library = { name -> return "${name}.dll" as String } 38 39 WIN.libDest = "bin" 40 WIN.modLibDest = "lib" 41 42 setupTools("windows_tools", 43 { propFile -> 44 // Create the properties file 45 ByteArrayOutputStream results = new ByteArrayOutputStream(); 46 String winsdkDir = System.getenv().get("WINSDK_DIR"); 47 exec({ 48 environment([ 49 "WINSDKPATH" : winsdkDir == null ? "" : winsdkDir, 50 "CONF" : "/$CONF", // TODO does this mean the generated properties must be reset when in a different configuration? 51 "VCARCH" : IS_64 ? "amd64" : "x86", 52 "SDKARCH" : IS_64 ? "/x64" : "/x86", 53 ]); 54 commandLine("cmd", "/q", "/c", "buildSrc\\genVSproperties.bat"); 55 setStandardOutput(results); 56 }); 57 BufferedReader reader = new BufferedReader(new StringReader(results.toString().trim())); 58 reader.readLine(); 59 reader.readLine(); 60 String line; 61 while ((line = reader.readLine()) != null && !line.startsWith("######")) { 62 line = line.replace("\\", "/").replace("/@@ENDOFLINE@@", "").replace("@@ENDOFLINE@@", "").replace("//", "/").replace("windows.vs.", "WINDOWS_VS_"); 63 propFile << line << "\r\n"; 64 } 65 }, 66 { properties -> 67 defineProperty("WINDOWS_VS_VSINSTALLDIR", properties, "c:/Program Files (x86)/Microsoft Visual Studio/2017/Professional"); 68 defineProperty("WINDOWS_VS_WINSDKDLLINSTALLDIR", properties, "c:/Program Files (x86)/Windows Kits/10/Redist/ucrt/DLLs"); 69 defineProperty("WINDOWS_SDK_DIR", properties, System.getenv().get("WINSDK_DIR")) 70 defineProperty("WINDOWS_SDK_VERSION", properties, "") 71 defineProperty("WINDOWS_VS_VCINSTALLDIR", properties, "$WINDOWS_VS_VSINSTALLDIR/VC") 72 defineProperty("WINDOWS_VS_DEVENVDIR", properties, "$WINDOWS_VS_VSINSTALLDIR/Common7/IDE") 73 defineProperty("WINDOWS_VS_DEVENVCMD", properties, "$WINDOWS_VS_DEVENVDIR/VCExpress.exe") 74 defineProperty("WINDOWS_VS_MSVCDIR", properties, WINDOWS_VS_VCINSTALLDIR) 75 defineProperty("WINDOWS_DXSDK_DIR", properties, System.getenv().get("DXSDK_DIR")) 76 defineProperty("WINDOWS_VS_INCLUDE", properties, "$WINDOWS_VS_VCINSTALLDIR/INCLUDE;" + "$WINDOWS_SDK_DIR/include;") 77 defineProperty("WINDOWS_VS_VER", properties, "150") 78 defineProperty("WINDOWS_VS_LIB", properties, "$WINDOWS_VS_VCINSTALLDIR/LIB;" + "$WINDOWS_SDK_DIR/lib;") 79 defineProperty("WINDOWS_VS_LIBPATH", properties, "$WINDOWS_VS_VCINSTALLDIR/LIB;") 80 def parfaitPath = IS_COMPILE_PARFAIT ? System.getenv().get("PARFAIT_PATH") + ";" : ""; 81 defineProperty("WINDOWS_VS_PATH", properties, parfaitPath + "$WINDOWS_VS_DEVENVDIR;" + 82 "$WINDOWS_VS_VSINSTALLDIR/VC/BIN;" + 83 "$WINDOWS_VS_VSINSTALLDIR/Common7/Tools;" + 84 "$WINDOWS_VS_VCINSTALLDIR/VCPackages;" + 85 "$WINDOWS_SDK_DIR/bin/NETFX 4.0 Tools;" + 86 "$WINDOWS_SDK_DIR/bin;" + 87 System.getenv().get("PATH")) 88 } 89 ) 90 91 if (WINDOWS_SDK_DIR == null || WINDOWS_SDK_DIR == "") { 92 throw new GradleException("FAIL: WINSDK_DIR not defined"); 93 } 94 95 // Define set of flags shared for all targets that support debug compilation 96 def ccDebugFlags = 97 IS_DEBUG_NATIVE ? ["/MDd", "/Od", "/Zi", "/DDEBUG"] : ["/O2", "/MD", "/DNDEBUG"] 98 99 def winVsVer = Integer.parseInt(WINDOWS_VS_VER) 100 if (winVsVer >= 120) { 101 // Serialize access to PDB file for debug builds if on VS2013 or later 102 if (IS_DEBUG_NATIVE) ccDebugFlags += "/FS" 103 } 104 105 106 // Common set of flags for all modules 107 def ccFlags = ["/nologo", "/W3", "/EHsc", "/c", 108 "/D_STATIC_CPPLIB", "/D_DISABLE_DEPRECATE_STATIC_CPPLIB", "/DINLINE=__inline", 109 "/DUNICODE", "/D_UNICODE", "/DWIN32", "/DIAL", "/D_LITTLE_ENDIAN", "/DWIN32_LEAN_AND_MEAN", 110 "/I$JDK_HOME/include", "/I$JDK_HOME/include/win32", 111 ccDebugFlags].flatten(); 112 113 def linkFlags = ["/nologo", "/dll", "/manifest", "/opt:REF", "/incremental:no", "/dynamicbase", "/nxcompat"]; 114 if (!IS_64) linkFlags.add("/safeseh"); 115 if (IS_DEBUG_NATIVE) linkFlags.add("/debug"); 116 117 // Remove C++ static linking if not on VS2010 118 if (WINDOWS_VS_VER != "100") { 119 ccFlags -= ["/D_STATIC_CPPLIB", "/D_DISABLE_DEPRECATE_STATIC_CPPLIB"] 120 } 121 122 ext.WINDOWS_NATIVE_COMPILE_ENVIRONMENT = [ 123 "VCINSTALLDIR" : WINDOWS_VS_VCINSTALLDIR, 124 "VSINSTALLDIR" : WINDOWS_VS_VSINSTALLDIR, 125 "DEVENVDIR" : WINDOWS_VS_DEVENVDIR, 126 "MSVCDIR" : WINDOWS_VS_MSVCDIR, 127 "VS_VER" : WINDOWS_VS_VER, 128 "PATH" : WINDOWS_VS_PATH, 129 "INCLUDE" : WINDOWS_VS_INCLUDE, 130 "LIB" : WINDOWS_VS_LIB, 131 "LIBPATH" : WINDOWS_VS_LIBPATH, 132 "DXSDK_DIR" : WINDOWS_DXSDK_DIR 133 ]; 134 def msvcVer = System.getenv("MSVC_VER") ?: "14.10.25017" 135 def msvcBinDir = "" 136 if (winVsVer == 150) { 137 msvcBinDir = (IS_64 138 ? "$WINDOWS_VS_VSINSTALLDIR/VC/Tools/MSVC/$msvcVer/bin/HostX64/x64" 139 : "$WINDOWS_VS_VSINSTALLDIR/VC/Tools/MSVC/$msvcVer/bin/HostX86/x86") 140 } else if (winVsVer <= 120) { 141 msvcBinDir = (IS_64 142 ? "$WINDOWS_VS_VSINSTALLDIR/VC/BIN/amd64" 143 : "$WINDOWS_VS_VSINSTALLDIR/VC/BIN") 144 } 145 def compiler = IS_COMPILE_PARFAIT ? "cl.exe" : cygpath("$msvcBinDir/cl.exe") 146 def linker = IS_COMPILE_PARFAIT ? "link.exe" : cygpath("$msvcBinDir/link.exe") 147 def winSdkBinDir = "$WINDOWS_SDK_DIR/Bin" 148 if (WINDOWS_VS_VER != "100") { 149 winSdkBinDir += "/" + (IS_64 ? "x64" : "x86") 150 } 151 152 if (!file(cygpath("$winSdkBinDir/RC.Exe")).exists()) { 153 winSdkBinDir = "$WINDOWS_SDK_DIR/Bin/$WINDOWS_SDK_VERSION" 154 if (WINDOWS_VS_VER != "100") { 155 winSdkBinDir += "/" + (IS_64 ? "x64" : "x86") 156 } 157 } 158 println "winSdkBinDir=$winSdkBinDir" 159 160 ext.RC = cygpath("$winSdkBinDir/rc.exe") 161 def rcCompiler = RC 162 ext.FXC = cygpath("$winSdkBinDir/fxc.exe") 163 164 if (!file(FXC).exists()) { 165 if (WINDOWS_DXSDK_DIR == null || WINDOWS_DXSDK_DIR == "") { 166 throw new GradleException("FAIL: DXSDK_DIR not defined"); 167 } 168 ext.FXC = cygpath("$WINDOWS_DXSDK_DIR/utilities/bin/x86/fxc.exe") 169 } 170 171 ext.MC = cygpath("$winSdkBinDir/mt.exe") 172 173 if (!file(RC).exists()) throw new GradleException("FAIL: cannot find RC: " + RC) 174 if (!file(FXC).exists()) throw new GradleException("FAIL: cannot find FXC: " + FXC) 175 176 def msvcRedistVer = System.getenv("MSVC_REDIST_VER") ?: "14.10.25008" 177 String msvcRedstDir = (IS_64 178 ? "$WINDOWS_VS_VSINSTALLDIR/VC/Redist/MSVC/$msvcRedistVer/x64" 179 : "$WINDOWS_VS_VSINSTALLDIR/VC/Redist/MSVC/$msvcRedistVer/x86") 180 181 String winSdkDllDir = (IS_64 182 ? "$WINDOWS_VS_WINSDKDLLINSTALLDIR/x64" 183 : "$WINDOWS_VS_WINSDKDLLINSTALLDIR/x86") 184 185 def WINDOWS_DLL_VER = WINDOWS_VS_VER 186 ext.MSVCR = null 187 ext.MSVCP = null 188 189 def windowsCRTVer = System.getenv("WINDOWS_CRT_VER") ?: "150" 190 if (WINDOWS_VS_VER == "150") { 191 WINDOWS_DLL_VER = "140" 192 ext.MSVCR = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT/vcruntime${WINDOWS_DLL_VER}.dll") 193 ext.MSVCP = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT/msvcp${WINDOWS_DLL_VER}.dll") 194 } 195 196 def vs2017DllPath = cygpath("${msvcRedstDir}/Microsoft.VC${windowsCRTVer}.CRT") 197 if (file(vs2017DllPath).exists()) { 198 ext.WIN.VS2017DLLNames = [ 199 "concrt140.dll", 200 "msvcp140.dll", 201 "vcruntime140.dll" 202 ]; 203 ext.WIN.VS2017DLLs = [] 204 ext.WIN.VS2017DLLNames.each { vsdll-> 205 ext.WIN.VS2017DLLs += "$vs2017DllPath/$vsdll" 206 } 207 } 208 else { 209 ext.WIN.VS2017DLLNames = [ 210 ]; 211 ext.WIN.VS2017DLLs = [ 212 ]; 213 } 214 215 def WinSDKDLLsPath = cygpath("${winSdkDllDir}") 216 if (file(WinSDKDLLsPath).exists()) { 217 ext.WIN.WinSDKDLLNames = [ 218 "api-ms-win-core-console-l1-1-0.dll", 219 "api-ms-win-core-datetime-l1-1-0.dll", 220 "api-ms-win-core-debug-l1-1-0.dll", 221 "api-ms-win-core-errorhandling-l1-1-0.dll", 222 "api-ms-win-core-file-l1-1-0.dll", 223 "api-ms-win-core-file-l1-2-0.dll", 224 "api-ms-win-core-file-l2-1-0.dll", 225 "api-ms-win-core-handle-l1-1-0.dll", 226 "api-ms-win-core-heap-l1-1-0.dll", 227 "api-ms-win-core-interlocked-l1-1-0.dll", 228 "api-ms-win-core-libraryloader-l1-1-0.dll", 229 "api-ms-win-core-localization-l1-2-0.dll", 230 "api-ms-win-core-memory-l1-1-0.dll", 231 "api-ms-win-core-namedpipe-l1-1-0.dll", 232 "api-ms-win-core-processenvironment-l1-1-0.dll", 233 "api-ms-win-core-processthreads-l1-1-0.dll", 234 "api-ms-win-core-processthreads-l1-1-1.dll", 235 "api-ms-win-core-profile-l1-1-0.dll", 236 "api-ms-win-core-rtlsupport-l1-1-0.dll", 237 "api-ms-win-core-string-l1-1-0.dll", 238 "api-ms-win-core-synch-l1-1-0.dll", 239 "api-ms-win-core-synch-l1-2-0.dll", 240 "api-ms-win-core-sysinfo-l1-1-0.dll", 241 "api-ms-win-core-timezone-l1-1-0.dll", 242 "api-ms-win-core-util-l1-1-0.dll", 243 "api-ms-win-crt-conio-l1-1-0.dll", 244 "api-ms-win-crt-convert-l1-1-0.dll", 245 "api-ms-win-crt-environment-l1-1-0.dll", 246 "api-ms-win-crt-filesystem-l1-1-0.dll", 247 "api-ms-win-crt-heap-l1-1-0.dll", 248 "api-ms-win-crt-locale-l1-1-0.dll", 249 "api-ms-win-crt-math-l1-1-0.dll", 250 "api-ms-win-crt-multibyte-l1-1-0.dll", 251 "api-ms-win-crt-private-l1-1-0.dll", 252 "api-ms-win-crt-process-l1-1-0.dll", 253 "api-ms-win-crt-runtime-l1-1-0.dll", 254 "api-ms-win-crt-stdio-l1-1-0.dll", 255 "api-ms-win-crt-string-l1-1-0.dll", 256 "api-ms-win-crt-time-l1-1-0.dll", 257 "api-ms-win-crt-utility-l1-1-0.dll", 258 "ucrtbase.dll" 259 ]; 260 ext.WIN.WinSDKDLLs = [] 261 ext.WIN.WinSDKDLLNames.each { winsdkdll-> 262 ext.WIN.WinSDKDLLs += "$WinSDKDLLsPath/$winsdkdll" 263 } 264 } 265 else { 266 ext.WIN.WinSDKDLLNames = [ 267 ]; 268 ext.WIN.WinSDKDLLs = [ 269 ]; 270 } 271 272 // Product version variables passed to RC: 273 def rcVer = "$RELEASE_VERSION" 274 def rcVerMajor = Integer.parseInt(jfxReleaseMajorVersion) 275 def rcVerMinor = Integer.parseInt(jfxReleaseMinorVersion) 276 def rcVerSecurity = Integer.parseInt(jfxReleaseSecurityVersion) 277 def rcVerPatch = Integer.parseInt(jfxReleasePatchVersion) 278 def rcVerFile = "${rcVerMajor},${rcVerMinor},${rcVerSecurity},${rcVerPatch}" 279 def rcVerBuild = "$RELEASE_VERSION_LONG" 280 def rcVerCopyrYear = "${Calendar.getInstance().get(Calendar.YEAR)}" 281 282 def rcFlags = [ 283 "/d", "\"JFX_COMPANY=${COMPANY_NAME}\"", 284 "/d", "\"JFX_COMPONENT=${PRODUCT_NAME} ${PLATFORM_NAME} binary\"", 285 "/d", "\"JFX_NAME=${PRODUCT_NAME} ${PLATFORM_NAME} ${rcVerMajor}\"", 286 "/d", "\"JFX_VER=${rcVer}\"", 287 "/d", "\"JFX_BUILD_ID=${rcVerBuild}\"", 288 "/d", "\"JFX_COPYRIGHT=Copyright \u00A9 ${rcVerCopyrYear}\"", 289 "/d", "\"JFX_FVER=${rcVerFile}\"", 290 "/d", "\"JFX_FTYPE=0x2L\"", 291 "/nologo" 292 ]; 293 294 def defaultRcSource = file("${project("graphics").projectDir}/src/main/resources/version.rc"); 295 296 WIN.glass = [:] 297 WIN.glass.javahInclude = [ 298 "com/sun/glass/events/**", 299 "com/sun/glass/ui/*", 300 "com/sun/glass/ui/win/*"] 301 WIN.glass.nativeSource = file("${project("graphics").projectDir}/src/main/native-glass/win") 302 WIN.glass.compiler = compiler 303 WIN.glass.rcCompiler = rcCompiler; 304 WIN.glass.rcSource = file("${project("graphics").projectDir}/src/main/native-glass/win/GlassResources.rc"); 305 WIN.glass.rcFlags = [ 306 "/I", file("${project("graphics").projectDir}/src/main/resources"), 307 "/d", "JFX_FNAME=glass.dll", 308 "/d", "JFX_INTERNAL_NAME=glass", 309 rcFlags].flatten(); 310 WIN.glass.ccFlags = [ccFlags, "/WX"].flatten() 311 if (WINDOWS_VS_VER != "100") WIN.glass.ccFlags -= ["/WX"] 312 WIN.glass.linker = linker 313 WIN.glass.linkFlags = [linkFlags, "delayimp.lib", "gdi32.lib", "urlmon.lib", "Comdlg32.lib", 314 "winmm.lib", "imm32.lib", "shell32.lib", "Uiautomationcore.lib", "dwmapi.lib", 315 "/DELAYLOAD:user32.dll", "/DELAYLOAD:urlmon.dll", "/DELAYLOAD:winmm.dll", "/DELAYLOAD:shell32.dll", 316 "/DELAYLOAD:Uiautomationcore.dll", "/DELAYLOAD:dwmapi.dll"].flatten() 317 WIN.glass.lib = "glass" 318 319 WIN.decora = [:] 320 WIN.decora.compiler = compiler 321 WIN.decora.ccFlags = [IS_64 ? [] : ["/arch:SSE"], "/fp:fast", ccFlags].flatten() 322 WIN.decora.linker = linker 323 WIN.decora.linkFlags = [linkFlags].flatten() 324 WIN.decora.lib = "decora_sse" 325 WIN.decora.rcCompiler = rcCompiler; 326 WIN.decora.rcSource = defaultRcSource 327 WIN.decora.rcFlags = ["/d", "JFX_FNAME=decora_sse.dll", "/d", "JFX_INTERNAL_NAME=decora", rcFlags].flatten() 328 329 WIN.prism = [:] 330 WIN.prism.javahInclude = ["com/sun/prism/impl/**/*", "com/sun/prism/PresentableState*"] 331 WIN.prism.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism") 332 WIN.prism.compiler = compiler 333 WIN.prism.ccFlags = [ccFlags].flatten() 334 WIN.prism.linker = linker 335 WIN.prism.linkFlags = [linkFlags].flatten() 336 WIN.prism.lib = "prism_common" 337 WIN.prism.rcCompiler = rcCompiler; 338 WIN.prism.rcSource = defaultRcSource 339 WIN.prism.rcFlags = ["/d", "JFX_FNAME=prism_common.dll", "/d", "JFX_INTERNAL_NAME=prism", rcFlags].flatten() 340 341 WIN.prismSW = [:] 342 WIN.prismSW.javahInclude = ["com/sun/pisces/**/*"] 343 WIN.prismSW.nativeSource = file("${project("graphics").projectDir}/src/main/native-prism-sw") 344 WIN.prismSW.compiler = compiler 345 WIN.prismSW.ccFlags = [ccFlags].flatten() 346 WIN.prismSW.linker = linker 347 WIN.prismSW.linkFlags = [linkFlags].flatten() 348 WIN.prismSW.lib = "prism_sw" 349 WIN.prismSW.rcCompiler = rcCompiler; 350 WIN.prismSW.rcSource = defaultRcSource 351 WIN.prismSW.rcFlags = ["/d", "JFX_FNAME=prism_sw.dll", "/d", "JFX_INTERNAL_NAME=prismSW", rcFlags].flatten() 352 353 WIN.prismD3D = [:] 354 WIN.prismD3D.javahInclude = ["com/sun/prism/d3d/**/*"] 355 WIN.prismD3D.nativeSource = [ 356 file("${project("graphics").projectDir}/src/main/native-prism-d3d"), 357 file("${project("graphics").projectDir}/src/main/native-prism-d3d/hlsl")] 358 WIN.prismD3D.compiler = compiler 359 WIN.prismD3D.ccFlags = [ccFlags, "/Ibuild/headers/PrismD3D"].flatten() 360 WIN.prismD3D.linker = linker 361 WIN.prismD3D.linkFlags = [linkFlags, "user32.lib"].flatten() 362 WIN.prismD3D.lib = "prism_d3d" 363 WIN.prismD3D.rcCompiler = rcCompiler; 364 WIN.prismD3D.rcSource = defaultRcSource 365 WIN.prismD3D.rcFlags = ["/d", "JFX_FNAME=prism_d3d.dll", "/d", "JFX_INTERNAL_NAME=prismD3D", rcFlags].flatten(); 366 367 WIN.iio = [:] 368 WIN.iio.javahInclude = ["com/sun/javafx/iio/**/*"] 369 WIN.iio.nativeSource = [ 370 file("${project("graphics").projectDir}/src/main/native-iio"), 371 file("${project("graphics").projectDir}/src/main/native-iio/libjpeg7")] 372 WIN.iio.compiler = compiler 373 WIN.iio.ccFlags = [ccFlags].flatten() 374 WIN.iio.linker = linker 375 WIN.iio.linkFlags = [linkFlags].flatten() 376 WIN.iio.lib = "javafx_iio" 377 WIN.iio.rcCompiler = rcCompiler; 378 WIN.iio.rcSource = defaultRcSource 379 WIN.iio.rcFlags = ["/d", "JFX_FNAME=javafx_iio.dll", "/d", "JFX_INTERNAL_NAME=iio", rcFlags].flatten(); 380 381 WIN.prismES2 = [:] 382 WIN.prismES2.javahInclude = ["com/sun/prism/es2/**/*"] 383 WIN.prismES2.nativeSource = [ 384 file("${project("graphics").projectDir}/src/main/native-prism-es2"), 385 file("${project("graphics").projectDir}/src/main/native-prism-es2/GL"), 386 file("${project("graphics").projectDir}/src/main/native-prism-es2/windows") 387 ] 388 WIN.prismES2.compiler = compiler 389 WIN.prismES2.ccFlags = ["/Ob1", "/GF", "/Gy", "/GS", "/DWIN32", ccFlags].flatten() 390 WIN.prismES2.linker = linker 391 WIN.prismES2.linkFlags = [linkFlags, "/SUBSYSTEM:WINDOWS", "opengl32.lib", "gdi32.lib", "user32.lib", "kernel32.lib"].flatten() 392 WIN.prismES2.lib = "prism_es2" 393 WIN.prismES2.rcCompiler = rcCompiler; 394 WIN.prismES2.rcSource = defaultRcSource 395 WIN.prismES2.rcFlags = ["/d", "JFX_FNAME=prism_es2.dll", "/d", "JFX_INTERNAL_NAME=prismES2", rcFlags].flatten(); 396 397 def closedDir = file("$projectDir/../rt-closed") 398 WIN.font = [:] 399 WIN.font.javahInclude = [ 400 "com/sun/javafx/font/**/*", 401 "com/sun/javafx/text/**/*"] 402 WIN.font.nativeSource = [file("${project("graphics").projectDir}/src/main/native-font")] 403 WIN.font.compiler = compiler 404 WIN.font.ccFlags = ["/DJFXFONT_PLUS", "/D_WIN32_WINNT=0x0601", ccFlags].flatten() 405 WIN.font.ccFlags -= ["/DUNICODE", "/D_UNICODE"] 406 WIN.font.linker = linker 407 WIN.font.linkFlags = [linkFlags, "advapi32.lib", "gdi32.lib", "user32.lib", "dwrite.lib", "d2d1.lib", "windowscodecs.lib", "ole32.lib"].flatten() 408 WIN.font.lib = "javafx_font" 409 WIN.font.rcCompiler = rcCompiler; 410 WIN.font.rcSource = defaultRcSource 411 WIN.font.rcFlags = ["/d", "JFX_FNAME=javafx_font.dll", "/d", "JFX_INTERNAL_NAME=font", rcFlags].flatten(); 412 413 WIN.media = [:] 414 WIN.media.rcCompiler = rcCompiler 415 WIN.media.rcSource = defaultRcSource 416 WIN.media.glibRcFile = "glib-lite.res" 417 WIN.media.gstreamerRcFile = "gstreamer-lite.res" 418 WIN.media.fxpluginsRcFile = "fxplugins.res" 419 WIN.media.jfxmediaRcFile = "jfxmedia.res" 420 WIN.media.glibRcFlags = ["/d", "JFX_FNAME=glib-lite.dll", "/d", "JFX_INTERNAL_NAME=glib", rcFlags].flatten() 421 WIN.media.gstreamerRcFlags = ["/d", "JFX_FNAME=gstreamer-lite.dll", "/d", "JFX_INTERNAL_NAME=gstreamer", rcFlags].flatten() 422 WIN.media.fxpluginsRcFlags = ["/d", "JFX_FNAME=fxplugins.dll", "/d", "JFX_INTERNAL_NAME=fxplugins", rcFlags].flatten() 423 WIN.media.jfxmediaRcFlags = ["/d", "JFX_FNAME=jfxmedia.dll", "/d", "JFX_INTERNAL_NAME=jfxmedia", rcFlags].flatten() 424 def parfaitPath = System.getenv("PARFAIT_PATH"); 425 WIN.media.compiler = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-cl.exe" : "cl.exe"; 426 WIN.media.linker = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-link.exe" : "link.exe"; 427 WIN.media.ar = IS_COMPILE_PARFAIT ? "${parfaitPath}/parfait-lib.exe" : "lib.exe"; 428 429 WIN.webkit = [:] 430 WIN.webkit.rcCompiler = rcCompiler 431 WIN.webkit.rcSource = defaultRcSource 432 WIN.webkit.rcFlags = ["/d", "JFX_FNAME=jfxwebkit.dll", "/d", "JFX_INTERNAL_NAME=webkit", rcFlags].flatten();