flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [1/3] git commit: [flex-sdk] [refs/heads/release4.16.0] - FLEX-35084 add -broker-local-connection and -broker-product-manager options
Date Tue, 22 Nov 2016 07:42:46 GMT
Repository: flex-sdk
Updated Branches:
  refs/heads/release4.16.0 4aae54543 -> f95a01662


FLEX-35084 add -broker-local-connection and -broker-product-manager options


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/77d6955b
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/77d6955b
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/77d6955b

Branch: refs/heads/release4.16.0
Commit: 77d6955b7333b7df353bad795cf7c552557c7f7e
Parents: 4aae545
Author: Alex Harui <aharui@apache.org>
Authored: Mon Nov 21 23:31:20 2016 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Nov 21 23:31:20 2016 -0800

----------------------------------------------------------------------
 .../macromedia/asc/util/version.properties      |  1 +
 .../java/macromedia/asc/embedding/SwfMaker.java | 16 +++++++++-
 .../flex2/compiler/common/Configuration.java    | 32 ++++++++++++++++++++
 .../java/flex2/linker/LinkerConfiguration.java  |  4 +++
 .../src/java/flex2/linker/SimpleMovie.java      | 10 ++++++
 .../tools/flexbuilder/BuilderConfiguration.java | 10 ++++++
 .../src/java/flex2/tools/oem/Configuration.java | 22 ++++++++++++++
 .../oem/internal/ConfigurationConstants.java    |  2 ++
 .../tools/oem/internal/LinkerConfiguration.java | 24 +++++++++++++++
 .../tools/oem/internal/OEMConfiguration.java    | 30 ++++++++++++++++++
 .../swfutils/src/java/flash/swf/TagDecoder.java |  7 ++++-
 .../swfutils/src/java/flash/swf/TagEncoder.java |  4 ++-
 .../src/java/flash/swf/tags/FileAttributes.java |  4 +++
 .../src/java/flash/swf/tools/SwfxParser.java    |  2 ++
 .../src/java/flash/swf/tools/SwfxPrinter.java   |  2 ++
 15 files changed, 167 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/asc/build/java/classes/macromedia/asc/util/version.properties
----------------------------------------------------------------------
diff --git a/modules/asc/build/java/classes/macromedia/asc/util/version.properties b/modules/asc/build/java/classes/macromedia/asc/util/version.properties
new file mode 100644
index 0000000..39edfcd
--- /dev/null
+++ b/modules/asc/build/java/classes/macromedia/asc/util/version.properties
@@ -0,0 +1 @@
+build=20161121
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/asc/src/java/macromedia/asc/embedding/SwfMaker.java
----------------------------------------------------------------------
diff --git a/modules/asc/src/java/macromedia/asc/embedding/SwfMaker.java b/modules/asc/src/java/macromedia/asc/embedding/SwfMaker.java
index c7cff7f..961d703 100644
--- a/modules/asc/src/java/macromedia/asc/embedding/SwfMaker.java
+++ b/modules/asc/src/java/macromedia/asc/embedding/SwfMaker.java
@@ -40,6 +40,8 @@ public class SwfMaker
 	public static final int swfFlagsNoCrossdomainCache  = 0x00000004;  // do not add this SWF
to the Asset Cache
 	public static final int swfFlagsAS3                 = 0x00000008;  // this SWF contains
AVM+ bytecodes
 	public static final int swfFlagsHasMetadata         = 0x00000010;  // this SWF contains
stagMetadata somewhere
+    public static final int swfFlagsBrokerLocalConnection = 0x00004000;  // broker local
connections
+    public static final int swfFlagsBrokerProductManager = 0x00008000;  // broker product
manager
 	// (this is not relevant to the player, but is relevant to search engines)
 	public static final int kDefaultSwfFlags            = 0x00000000;   // these flags are assumed
when no stagFileAttributes is present
 
@@ -229,6 +231,8 @@ public class SwfMaker
 		String className = null;
 		int width, height, fps = 12;
         int useNetwork=0;
+        int brokerLocalConnection=0;
+        int brokerProductManager=0;
 
         boolean debug = false;
 		int dAt = options.indexOf(",-g");
@@ -243,6 +247,16 @@ public class SwfMaker
             useNetwork=swfFlagsUseNetwork;
             options = options.substring(0, dAt) + options.substring(dAt+12);
         }
+        dAt = options.indexOf(",-brokerLocalConnection");
+        if (dAt>-1) {
+            brokerLocalConnection=swfFlagsBrokerLocalConnection;
+            options = options.substring(0, dAt) + options.substring(dAt+23);
+        }
+        dAt = options.indexOf(",-brokerProductManager");
+        if (dAt>-1) {
+            brokerProductManager=swfFlagsBrokerProductManager;
+            options = options.substring(0, dAt) + options.substring(dAt+22);
+        }
 
         StringTokenizer tokenizer = new StringTokenizer(options, ",");
 		switch (tokenizer.countTokens())
@@ -282,7 +296,7 @@ public class SwfMaker
 		PutWord(1);       // # of frames  SDD ### Change to sensicle number
 
 		StartTag(stagFileAttributes, false);
-		PutDWord(swfFlagsAS3|useNetwork);
+		PutDWord(swfFlagsAS3|useNetwork|brokerLocalConnection|brokerProductManager);
 		FinishTag();
 
 		if (debug)

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/compiler/common/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/compiler/common/Configuration.java b/modules/compiler/src/java/flex2/compiler/common/Configuration.java
index 9c89347..dfc2906 100644
--- a/modules/compiler/src/java/flex2/compiler/common/Configuration.java
+++ b/modules/compiler/src/java/flex2/compiler/common/Configuration.java
@@ -1167,6 +1167,38 @@ public class Configuration implements LinkerConfiguration, Cloneable
         this.useNetwork = b;
     }
 
+    //
+    // 'broker-local-connection' option
+    //
+    
+    private boolean brokerLocalConnection;
+    
+    public boolean brokerLocalConnection()
+    {
+        return brokerLocalConnection;
+    }
+    
+    public void cfgBrokerLocalConnection( ConfigurationValue cv, boolean b)
+    {
+        this.brokerLocalConnection = b;
+    }
+    
+    //
+    // 'broker-product-manager' option
+    //
+    
+    private boolean brokerProductManager;
+    
+    public boolean brokerProductManager()
+    {
+        return brokerProductManager;
+    }
+    
+    public void cfgBrokerProductManager( ConfigurationValue cv, boolean b)
+    {
+        this.brokerProductManager = b;
+    }
+    
     
 
 	/**

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/linker/LinkerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/linker/LinkerConfiguration.java b/modules/compiler/src/java/flex2/linker/LinkerConfiguration.java
index 28dd782..75adf5c 100644
--- a/modules/compiler/src/java/flex2/linker/LinkerConfiguration.java
+++ b/modules/compiler/src/java/flex2/linker/LinkerConfiguration.java
@@ -47,6 +47,10 @@ public interface LinkerConfiguration
 
 	boolean useNetwork();
 
+    boolean brokerLocalConnection();
+    
+    boolean brokerProductManager();
+    
 	boolean lazyInit();
 
     boolean scriptLimitsSet();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/linker/SimpleMovie.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/linker/SimpleMovie.java b/modules/compiler/src/java/flex2/linker/SimpleMovie.java
index fe59138..8a0f138 100644
--- a/modules/compiler/src/java/flex2/linker/SimpleMovie.java
+++ b/modules/compiler/src/java/flex2/linker/SimpleMovie.java
@@ -128,6 +128,16 @@ public class SimpleMovie extends Movie
 	            fileAttributes.actionScript3 = (version >= 9);
             }
             
+            if (configuration.brokerLocalConnection())
+            {
+                fileAttributes.brokerLocalConnection = true;
+            }
+            
+            if (configuration.brokerProductManager())
+            {
+                fileAttributes.brokerProductManager = true;
+            }
+            
             if (configuration.getAdvancedTelemetry()) {
             	enableTelemetry.enabled = true;
             }

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/tools/flexbuilder/BuilderConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/tools/flexbuilder/BuilderConfiguration.java b/modules/compiler/src/java/flex2/tools/flexbuilder/BuilderConfiguration.java
index ee0faec..c8edeaf 100644
--- a/modules/compiler/src/java/flex2/tools/flexbuilder/BuilderConfiguration.java
+++ b/modules/compiler/src/java/flex2/tools/flexbuilder/BuilderConfiguration.java
@@ -414,6 +414,16 @@ public class BuilderConfiguration implements Configuration
 		configuration.useNetwork(b);
 	}
 
+    public void brokerProductManager(boolean b)
+    {
+        configuration.brokerProductManager(b);
+    }
+    
+    public void brokerLocalConnection(boolean b)
+    {
+        configuration.brokerLocalConnection(b);
+    }
+    
 	public void useResourceBundleMetaData(boolean b)
 	{
 		configuration.useResourceBundleMetaData(b);

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/tools/oem/Configuration.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/tools/oem/Configuration.java b/modules/compiler/src/java/flex2/tools/oem/Configuration.java
index e25f8c6..8aa120d 100644
--- a/modules/compiler/src/java/flex2/tools/oem/Configuration.java
+++ b/modules/compiler/src/java/flex2/tools/oem/Configuration.java
@@ -1174,6 +1174,28 @@ public interface Configuration
     void useNetwork(boolean b);
     
     /**
+     * Toggles whether the application SWF is flagged broker local connections.
+     * This is equivalent to the <code>broker-local-connection</code> option
of the mxmlc or compc compilers.
+     *
+     * <p>
+     * The default value is <code>true</code>.
+     *
+     * @param b Boolean value.
+     */
+    void brokerLocalConnection(boolean b);
+    
+    /**
+     * Toggles whether the application SWF is flagged to broker product manager.
+     * This is equivalent to the <code>broker-product-manager</code> option of
the mxmlc or compc compilers.
+     *
+     * <p>
+     * The default value is <code>true</code>.
+     *
+     * @param b Boolean value.
+     */
+    void brokerProductManager(boolean b);
+    
+    /**
      * Set the default output directory for configuration settings.
      * 
      */

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/tools/oem/internal/ConfigurationConstants.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/tools/oem/internal/ConfigurationConstants.java
b/modules/compiler/src/java/flex2/tools/oem/internal/ConfigurationConstants.java
index c167982..30696b0 100644
--- a/modules/compiler/src/java/flex2/tools/oem/internal/ConfigurationConstants.java
+++ b/modules/compiler/src/java/flex2/tools/oem/internal/ConfigurationConstants.java
@@ -27,6 +27,8 @@ package flex2.tools.oem.internal;
 interface ConfigurationConstants
 {
     String USE_NETWORK                                          = "--use-network";
+    String BROKER_LOCAL_CONNECTION                              = "--broker-local-connection";
+    String BROKER_PRODUCT_MANAGER                               = "--broker-product-manager";
     String RUNTIME_SHARED_LIBRARIES                             = "--runtime-shared-libraries";
     String RAW_METADATA                                         = "--raw-metadata";
     String PROJECTOR                                            = "--projector";

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java b/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java
index 946b747..e20787c 100644
--- a/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java
+++ b/modules/compiler/src/java/flex2/tools/oem/internal/LinkerConfiguration.java
@@ -338,6 +338,30 @@ public class LinkerConfiguration extends ToolsConfiguration implements
flex2.lin
 		}
 	}
 
+    public boolean brokerProductManager()
+    {
+        if (args.contains(ConfigurationConstants.BROKER_PRODUCT_MANAGER))
+        {
+            return super.brokerProductManager();
+        }
+        else
+        {
+            return original.brokerProductManager();
+        }
+    }
+    
+    public boolean brokerLocalConnection()
+    {
+        if (args.contains(ConfigurationConstants.BROKER_LOCAL_CONNECTION))
+        {
+            return super.brokerLocalConnection();
+        }
+        else
+        {
+            return original.brokerLocalConnection();
+        }
+    }
+    
 	public String width()
 	{
 		return original.width();

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java b/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java
index 3afdd12..7cade9c 100644
--- a/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java
+++ b/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java
@@ -1931,6 +1931,34 @@ public class OEMConfiguration implements Configuration, ConfigurationConstants,
 		newLinkerOptionsAfterCompile.add(USE_NETWORK);
 	}
 	
+    /**
+     * Toggles whether the application SWF is has the broker-local-connection bit set.
+     * This is equivalent to using <code>mxmlc/compc --broker-local-connection</code>.
+     * By default, it is set to <code>false</code>.
+     *
+     * @param b boolean value
+     */
+    public void brokerLocalConnection(boolean b)
+    {
+        args.put(BROKER_LOCAL_CONNECTION, b ? Boolean.TRUE : Boolean.FALSE);
+        linker_args.put(BROKER_LOCAL_CONNECTION, b ? Boolean.TRUE : Boolean.FALSE);
+        newLinkerOptionsAfterCompile.add(BROKER_LOCAL_CONNECTION);
+    }
+    
+    /**
+     * Toggles whether the application SWF is has the broker-product-manager bit set.
+     * This is equivalent to using <code>mxmlc/compc --broker-product-manager</code>.
+     * By default, it is set to <code>false</code>.
+     *
+     * @param b boolean value
+     */
+    public void brokerProductManager(boolean b)
+    {
+        args.put(BROKER_PRODUCT_MANAGER, b ? Boolean.TRUE : Boolean.FALSE);
+        linker_args.put(BROKER_PRODUCT_MANAGER, b ? Boolean.TRUE : Boolean.FALSE);
+        newLinkerOptionsAfterCompile.add(BROKER_PRODUCT_MANAGER);
+    }
+    
 	/**
 	 * Defines a token. mxmlc and compc support token substitutions. For example,
 	 * 
@@ -2353,6 +2381,8 @@ public class OEMConfiguration implements Configuration, ConfigurationConstants,
 		setSWFMetaData(c.getMetadata());
 		setRuntimeSharedLibraries(toStrings(c.getRuntimeSharedLibraries()));
 		useNetwork(c.useNetwork());
+        brokerLocalConnection(c.brokerLocalConnection());
+        brokerProductManager(c.brokerProductManager());
 		
 		// useMobileFramework();
 		

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/swfutils/src/java/flash/swf/TagDecoder.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagDecoder.java b/modules/swfutils/src/java/flash/swf/TagDecoder.java
index 45b7326..526780b 100644
--- a/modules/swfutils/src/java/flash/swf/TagDecoder.java
+++ b/modules/swfutils/src/java/flash/swf/TagDecoder.java
@@ -2788,15 +2788,20 @@ public final class TagDecoder
     {
         FileAttributes tag = new FileAttributes();
         r.syncBits();
+        
         r.readUBits(1); //reserved
         tag.useDirectBlit = r.readBit();
         tag.useGPU = r.readBit();
         tag.hasMetadata = r.readBit();
+        
         tag.actionScript3 = r.readBit();
         tag.suppressCrossDomainCaching = r.readBit();
         tag.swfRelativeUrls = r.readBit();
         tag.useNetwork = r.readBit();
-        r.readUBits(24); //reserved
+        
+        tag.brokerProductManager = r.readBit();
+        tag.brokerLocalConnection = r.readBit();
+        r.readUBits(22); //reserved
         return tag;
     }
     

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/swfutils/src/java/flash/swf/TagEncoder.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/TagEncoder.java b/modules/swfutils/src/java/flash/swf/TagEncoder.java
index 4652ed1..a723875 100644
--- a/modules/swfutils/src/java/flash/swf/TagEncoder.java
+++ b/modules/swfutils/src/java/flash/swf/TagEncoder.java
@@ -114,7 +114,9 @@ public class TagEncoder extends TagHandler
         tagw.writeBit(tag.suppressCrossDomainCaching);
         tagw.writeBit(tag.swfRelativeUrls);
         tagw.writeBit(tag.useNetwork);
-        tagw.writeUBits(0, 24);
+        tagw.writeBit(tag.brokerProductManager);
+        tagw.writeBit(tag.brokerLocalConnection);
+        tagw.writeUBits(0, 22);
         encodeTag(tag);
     }
     

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/swfutils/src/java/flash/swf/tags/FileAttributes.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/tags/FileAttributes.java b/modules/swfutils/src/java/flash/swf/tags/FileAttributes.java
index 2f4b27f..5a43e8f 100644
--- a/modules/swfutils/src/java/flash/swf/tags/FileAttributes.java
+++ b/modules/swfutils/src/java/flash/swf/tags/FileAttributes.java
@@ -45,6 +45,8 @@ public class FileAttributes extends Tag
     public boolean useNetwork;
     public boolean useGPU;
     public boolean useDirectBlit;
+    public boolean brokerProductManager;
+    public boolean brokerLocalConnection;
 
     public FileAttributes()
     {
@@ -70,6 +72,8 @@ public class FileAttributes extends Tag
                 (tag.swfRelativeUrls == this.swfRelativeUrls) &&
                 (tag.useDirectBlit == this.useDirectBlit) &&
                 (tag.useGPU == this.useGPU) &&
+                (tag.brokerProductManager == this.brokerProductManager) &&
+                (tag.brokerLocalConnection == this.brokerLocalConnection) &&
                 (tag.useNetwork == this.useNetwork))
             {
                 isEqual = true;

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/swfutils/src/java/flash/swf/tools/SwfxParser.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/tools/SwfxParser.java b/modules/swfutils/src/java/flash/swf/tools/SwfxParser.java
index 474d7bc..217b53d 100644
--- a/modules/swfutils/src/java/flash/swf/tools/SwfxParser.java
+++ b/modules/swfutils/src/java/flash/swf/tools/SwfxParser.java
@@ -497,6 +497,8 @@ public class SwfxParser extends DefaultHandler
         tag.suppressCrossDomainCaching = parseBoolean(getAttribute(attributes, "suppressCrossDomainCaching"));
         tag.swfRelativeUrls = parseBoolean(getAttribute(attributes, "swfRelativeUrls"));
         tag.useNetwork = parseBoolean(getAttribute(attributes, "useNetwork"));
+        tag.brokerProductManager = parseBoolean(getAttribute(attributes, "brokerProductManager"));
+        tag.brokerLocalConnection = parseBoolean(getAttribute(attributes, "brokerLocalConnection"));
         stack.push(tag);
     }
     

http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/77d6955b/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java
----------------------------------------------------------------------
diff --git a/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java b/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java
index 87bd084..5f1a13d 100644
--- a/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java
+++ b/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java
@@ -228,6 +228,8 @@ public final class SwfxPrinter extends TagHandler
 			out.print(" suppressCrossDomainCaching='" + tag.suppressCrossDomainCaching + "'");
 			out.print(" swfRelativeUrls='" + tag.swfRelativeUrls + "'");
 			out.print(" useNetwork='" + tag.useNetwork + "'");
+            out.print(" brokerProductManager='" + tag.brokerProductManager + "'");
+            out.print(" brokerLocalConnection='" + tag.brokerLocalConnection + "'");
 			close();
 		}
 		


Mime
View raw message