changeset 8923:c76fdbcbd413 9-b59

Automated merge with http://hg.openjdk.java.net/openjfx/9/rt
author kcr
date Mon, 06 Apr 2015 13:06:05 -0700
parents a378a6c5987f 1d44222deee1
children 7dae06ce5283 1f9339f99b87
files
diffstat 15 files changed, 55 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/buildSrc/armv6hf.gradle	Sat Apr 04 13:10:17 2015 -0700
+++ b/buildSrc/armv6hf.gradle	Mon Apr 06 13:06:05 2015 -0700
@@ -79,6 +79,7 @@
 ARMV6HF.compileSWT = false;
 ARMV6HF.compileFXPackager = false;
 ARMV6HF.compileWebnodeNative = false;
+ARMV6HF.compileMediaNative = false;
 
 ARMV6HF.includeLens = false
 ARMV6HF.includeMonocle = true
--- a/buildSrc/armv6sf.gradle	Sat Apr 04 13:10:17 2015 -0700
+++ b/buildSrc/armv6sf.gradle	Mon Apr 06 13:06:05 2015 -0700
@@ -78,6 +78,7 @@
 ARMV6SF.compileSWT = false;
 ARMV6SF.compileFXPackager = false;
 ARMV6SF.compileWebnodeNative = false;
+ARMV6SF.compileMediaNative = false;
 
 ARMV6SF.includeLens = false
 ARMV6SF.includeMonocle = true
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/AbstractImageBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/AbstractImageBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -79,6 +79,9 @@
     public void writeCfgFile(Map<String, ? super Object> params, File cfgFileName, String runtimeLocation) throws IOException {
         cfgFileName.delete();
 
+        boolean appCDEnabled = UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params);
+        String appCDSCacheMode = APP_CDS_CACHE_MODE.fetchFrom(params);
+        
         PrintStream out = new PrintStream(cfgFileName);
         
         out.println("[Application]");
@@ -92,6 +95,9 @@
                 String.join(File.pathSeparator, CLASSPATH.fetchFrom(params).split("[ :;]")));
         out.println("app.runtime=" + runtimeLocation);
         out.println("app.identifier=" + IDENTIFIER.fetchFrom(params));
+        if (appCDEnabled) {
+            out.println("app.appcds.cache=" + appCDSCacheMode.split("\\+")[0]);
+        }
 
 
         out.println();
@@ -121,8 +127,7 @@
             }
         }
 
-        
-        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)) {
+        if (appCDEnabled) {
             prepareAppCDS(params, out);
         }
         
@@ -162,7 +167,7 @@
         out.print(getCacheLocation(params));
         out.print(APP_FS_NAME.fetchFrom(params));
         out.println(".jpa");
-        out.println("-Xshare:on");
+        out.println("-Xshare:auto");
         out.println("-XX:+UseAppCDS");
         if (Log.isDebug()) {
             out.println("-verbose:class");
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/StandardBundlerParam.java	Mon Apr 06 13:06:05 2015 -0700
@@ -590,6 +590,16 @@
                     (s, p) -> Boolean.parseBoolean(s)
             );
 
+    public static final StandardBundlerParam<String> APP_CDS_CACHE_MODE =
+            new StandardBundlerParam<>(
+                    I18N.getString("param.com-app-cds-cache-mode.name"),
+                    I18N.getString("param.com-app-cds-cache-mode.description"),
+                    "commercial.AppCDS.cache",
+                    String.class,
+                    p -> "auto",
+                    (s, p) -> s
+            );
+
     @SuppressWarnings("unchecked")
     public static final StandardBundlerParam<List<String>> APP_CDS_CLASS_ROOTS =
             new StandardBundlerParam<>(
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxAppBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -422,6 +422,6 @@
 
     @Override
     protected String getCacheLocation(Map<String, ? super Object> params) {
-        return "$APPDIR/";
+        return "$CACHEDIR/";
     }
 }
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxDebBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxDebBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -562,7 +562,10 @@
         data.put("SECONDARY_LAUNCHERS_REMOVE", removeScripts.toString());
 
         StringBuilder cdsScript = new StringBuilder();
-        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)) {
+        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)
+                && ("install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))
+                || "auto+install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))))
+        {
             cdsScript.append("/opt/");
             cdsScript.append(data.get("APPLICATION_FS_NAME"));
             cdsScript.append("/");
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxRpmBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/linux/LinuxRpmBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -440,7 +440,10 @@
         data.put("SECONDARY_LAUNCHERS_REMOVE", removeScripts.toString());
 
         StringBuilder cdsScript = new StringBuilder();
-        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)) {
+        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)
+                && ("install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))
+                || "auto+install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))))
+        {
             cdsScript.append("/opt/");
             cdsScript.append(data.get("APPLICATION_FS_NAME"));
             cdsScript.append("/");
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinAppBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -562,6 +562,6 @@
 
     @Override
     protected String getCacheLocation(Map<String, ? super Object> params) {
-        return "$APPDIR/";
+        return "$CACHEDIR/";
     }
 }
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinExeBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -492,7 +492,10 @@
         validateValueAndPut(data, "APPLICATION_DESCRIPTION", DESCRIPTION, params);
         data.put("APPLICATION_SERVICE", SERVICE_HINT.fetchFrom(params) ? "returnTrue" : "returnFalse");
         data.put("APPLICATION_NOT_SERVICE", SERVICE_HINT.fetchFrom(params) ? "returnFalse" : "returnTrue");
-        data.put("APPLICATION_APP_CDS", (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params))
+        data.put("APPLICATION_APP_CDS_INSTALL", 
+                (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params) 
+                        && ("install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))
+                            || "auto+install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))))
                 ? "returnTrue"
                 : "returnFalse");
         data.put("START_ON_INSTALL", START_ON_INSTALL.fetchFrom(params) ? "-startOnInstall" : "");
--- a/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinMsiBundler.java	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/java/com/oracle/tools/packager/windows/WinMsiBundler.java	Mon Apr 06 13:06:05 2015 -0700
@@ -689,7 +689,10 @@
     
     private String getAppCDSBlock(Map<String, ? super Object> params) {
         String cdsBlock = "";
-        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)) {
+        if (UNLOCK_COMMERCIAL_FEATURES.fetchFrom(params) && ENABLE_APP_CDS.fetchFrom(params)
+                        && ("install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))
+                        || "auto+install".equals(APP_CDS_CACHE_MODE.fetchFrom(params))))
+        {
             cdsBlock = 
                     "     <CustomAction Id=\"CACHE_CDS\"\n" +
                     "          Directory=\"APPLICATIONFOLDER\"\n" +
--- a/modules/fxpackager/src/main/native/library/common/WindowsPlatform.cpp	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/native/library/common/WindowsPlatform.cpp	Mon Apr 06 13:06:05 2015 -0700
@@ -758,7 +758,7 @@
         }
 
         if (::CreateProcess(Application.data(), (wchar_t*)command.data(), NULL,
-            NULL, FALSE, 0, NULL, NULL, &startupInfo, &FProcessInfo) == TRUE) {
+            NULL, FALSE, 0, NULL, NULL, &startupInfo, &FProcessInfo) == FALSE) {
             TString message = PlatformString::Format(_T("Error: Unable to create process %s"), Application.data());
             throw Exception(message);
         }
--- a/modules/fxpackager/src/main/resources/com/oracle/tools/packager/StandardBundlerParam.properties	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/resources/com/oracle/tools/packager/StandardBundlerParam.properties	Mon Apr 06 13:06:05 2015 -0700
@@ -139,6 +139,9 @@
 param.com-app-cds.name=Enable AppCDS
 param.com-app-cds.description=Enabled and package with Application Class Data Sharing, including generation of .jsa file.
 
+param.com-app-cds-cache-mode.name=AppCDS Cache Mode
+param.com-app-cds-cache-mode.description=The mode in which the AppCDS .jpa files are generated and cached.  Current values are 'install', 'auto', and 'auto+install'.
+
 param.com-app-cds-root.name=AppCDS Root Classes
 param.com-app-cds-root.description=List of "root classes" for AppCDS to generate class sharing data from.  Default is the main class.
 
--- a/modules/fxpackager/src/main/resources/com/oracle/tools/packager/mac/MacPkgBundler.properties	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/resources/com/oracle/tools/packager/mac/MacPkgBundler.properties	Mon Apr 06 13:06:05 2015 -0700
@@ -28,6 +28,7 @@
 error.cannot-write-to-output-dir=Output directory {0} is not writable.
 
 message.building-pkg=Building PKG package for {0}
+message.running-script=Running shell script on application image [{0}]
 message.preparing-scripts=Preparing package scripts
 message.preparing-distribution-dist=Preparing distribution.dist\: {0}
 message.config-save-location=\  Config files are saved to {0}. Use them to customize package.
--- a/modules/fxpackager/src/main/resources/com/oracle/tools/packager/windows/template.iss	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/fxpackager/src/main/resources/com/oracle/tools/packager/windows/template.iss	Mon Apr 06 13:06:05 2015 -0700
@@ -48,7 +48,7 @@
 SECONDARY_LAUNCHERS
 
 [Run]
-Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-Xappcds:generatecache"; Check: APPLICATION_APP_CDS()
+Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-Xappcds:generatecache"; Check: APPLICATION_APP_CDS_INSTALL()
 Filename: "{app}\RUN_FILENAME.exe"; Description: "{cm:LaunchProgram,APPLICATION_NAME}"; Flags: nowait postinstall skipifsilent; Check: APPLICATION_NOT_SERVICE()
 Filename: "{app}\RUN_FILENAME.exe"; Parameters: "-install -svcName ""APPLICATION_NAME"" -svcDesc ""APPLICATION_DESCRIPTION"" -mainExe ""APPLICATION_LAUNCHER_FILENAME"" START_ON_INSTALL RUN_AT_STARTUP"; Check: APPLICATION_SERVICE()
 
--- a/modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c	Sat Apr 04 13:10:17 2015 -0700
+++ b/modules/media/src/main/native/gstreamer/plugins/av/videodecoder.c	Mon Apr 06 13:06:05 2015 -0700
@@ -288,12 +288,19 @@
 {
     BaseDecoder *base = BASEDECODER(decoder);
 
+#if NEW_CODEC_ID
+    int width = base->frame->width;
+    int height = base->frame->height;
+#else
+    int width = base->context->width;
+    int height = base->context->height;
+#endif // NEW_CODEC_ID 
+    
     if (GST_PAD_CAPS(base->srcpad) == NULL ||
-        decoder->width != base->context->width ||
-        decoder->height != base->context->height)
+        decoder->width != width || decoder->height != height)
     {
-        decoder->width = base->context->width;
-        decoder->height = base->context->height;
+        decoder->width = width;
+        decoder->height = height;
 
         decoder->discont = (GST_PAD_CAPS(base->srcpad) != NULL);