incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cframp...@apache.org
Subject svn commit: r1409957 [8/12] - in /incubator/flex/utilities/trunk: common/.settings/ common/src/assets/styles/ common/src/org/apache/flex/utilities/common/ common/src/org/apache/flex/utilities/common/controls/ common/src/org/apache/flex/utilities/common...
Date Thu, 15 Nov 2012 19:56:39 GMT
Modified: incubator/flex/utilities/trunk/installer/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installer/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installer/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml (original)
+++ incubator/flex/utilities/trunk/installer/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml Thu Nov 15 19:56:32 2012
@@ -1,211 +1,211 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-
-
-<!--- The default skin class for a Spark TitleWindow container.  
-
-     @see spark.skins.spark.TitleWindowCloseButtonSkin
-     @see spark.components.TitleWindow
-
-     @langversion 3.0
-     @playerversion Flash 10
-     @playerversion AIR 1.5
-     @productversion Flex 4
--->
-<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
-    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
-    minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
-    
-    <fx:Metadata>
-        <![CDATA[ 
-        /** 
-         * @copy spark.skins.spark.ApplicationSkin#hostComponent
-         */
-        [HostComponent("spark.components.TitleWindow")]
-        ]]>
-    </fx:Metadata> 
-    
-	<!--
-		NOTE: this skin file contains sub-parts that may continue to react to
-		Style code.  To remove this behavior create new copies of those skins
-		and remove the styles.
-	-->
-    <s:states>
-        <s:State name="normal" />
-        <s:State name="inactive" stateGroups="inactiveGroup" />
-        <s:State name="disabled" />
-        <s:State name="normalWithControlBar" stateGroups="withControls" />
-        <s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
-        <s:State name="disabledWithControlBar" stateGroups="withControls" />
-    </s:states>
-    
-    <!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
-    <s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
-                             alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
-                             angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
-    
-    <!--- drop shadow can't be hittable so all other graphics go in this group -->
-    <s:Group left="0" right="0" top="0" bottom="0">
-        
-        <!--- top group mask @private-->
-        <s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
-            <!--- @private-->
-            <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
-                <s:fill>
-                    <s:SolidColor alpha="0"/>
-                </s:fill>
-            </s:Rect>
-        </s:Group>
-        
-        <!--- bottom group mask @private-->
-        <s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
-                 includeIn="withControls">
-            <!--- @private-->
-            <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
-                <s:fill>
-                    <s:SolidColor alpha="0"/>
-                </s:fill>
-            </s:Rect>
-        </s:Group>
-        
-        <!--- layer 1: border @private -->
-        <s:Rect id="border" left="0" right="0" top="0" bottom="0" >
-            <s:stroke>
-                <!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
-                <s:SolidColorStroke id="borderStroke" weight="1" />
-            </s:stroke>
-        </s:Rect>
-        
-        
-		<s:BitmapImage source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" scaleMode="stretch" />
-
-		<!-- layer 3: contents -->
-        <!--- Contains the vertical stack of title bar content and control bar. -->
-        <s:Group left="1" right="1" top="1" bottom="1" id="contents">
-            <s:layout>
-                <s:VerticalLayout gap="0" horizontalAlign="justify" />
-            </s:layout>
-            <!--- @private -->
-            <s:Group id="topGroup" mask="{topGroupMask}">
-                
-                <!--- layer 0: title bar fill @private -->
-                <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
-                    <s:fill>
-                        <s:LinearGradient rotation="90">
-                            <s:GradientEntry color="0xD2D2D2"
-                                             color.inactiveGroup="0xEAEAEA"/>
-                            <s:GradientEntry color="0x9A9A9A"
-                                             color.inactiveGroup="0xCECECE"/>
-                        </s:LinearGradient>
-                    </s:fill>
-                </s:Rect>
-                
-                <!--- layer 1: title bar highlight @private -->
-                <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
-                    <s:stroke>
-                        <s:LinearGradientStroke rotation="90" weight="1">
-                            <s:GradientEntry color="0xE6E6E6" />
-                            <s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
-                        </s:LinearGradientStroke>
-                    </s:stroke>
-                    <s:fill>
-                        <s:LinearGradient rotation="90">
-                            <s:GradientEntry color="0xFFFFFF" alpha="0.15" />
-                            <s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
-                            <s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
-                        </s:LinearGradient>
-                    </s:fill>
-                </s:Rect>
-                
-                <!--- layer 2: title bar divider @private -->
-                <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
-                    <s:fill>
-                        <s:SolidColor color="0x000000" alpha="0.75" />
-                    </s:fill>
-                </s:Rect>
-                
-                <!-- layer 3: text -->
-                <!--- @copy spark.components.Panel#titleDisplay -->
-                <s:Label id="titleDisplay" maxDisplayedLines="1"
-                         left="9" right="36" top="1" bottom="0" minHeight="30"
-                         verticalAlign="middle" fontWeight="bold" />
-                
-                <!-- layer 4: moveArea -->
-                <!--- @copy spark.components.TitleWindow#moveArea -->
-                <s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
-                
-                <!--- @copy spark.components.TitleWindow#closeButton -->
-                <s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
-                          width="15" height="15" right="7" top="7" />
-            </s:Group>
-            
-            <!--
-                Note: setting the minimum size to 0 here so that changes to the host component's
-                size will not be thwarted by this skin part's minimum size.   This is a compromise,
-                more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
-            -->
-            <!--- @copy spark.components.SkinnableContainer#contentGroup -->
-            <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
-            </s:Group>
-            
-            <!--- @private -->
-            <s:Group id="bottomGroup" minWidth="0" minHeight="0" 
-                     includeIn="withControls">  
-                
-                <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
-
-                    <!-- layer 0: control bar divider line -->
-                    <s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
-                        <s:fill>
-                            <s:SolidColor color="0x000000" />
-                        </s:fill>
-                    </s:Rect>
-                    
-                    <!-- layer 1: control bar highlight -->
-                    <s:Rect left="0" right="0" top="1" bottom="0">
-                        <s:stroke>
-                            <s:LinearGradientStroke rotation="90" weight="1">
-                                <s:GradientEntry color="0xFFFFFF" />
-                                <s:GradientEntry color="0xD8D8D8" />
-                            </s:LinearGradientStroke>
-                        </s:stroke>
-                    </s:Rect>
-                    
-                    <!-- layer 2: control bar fill -->
-                    <s:Rect left="1" right="1" top="2" bottom="1">
-                        <s:fill>
-                            <s:LinearGradient rotation="90">
-                                <s:GradientEntry color="0xEDEDED"/>
-                                <s:GradientEntry color="0xCDCDCD"/>
-                            </s:LinearGradient>
-                        </s:fill>
-                    </s:Rect>
-                </s:Group>
-                
-                <!--- @copy spark.components.Panel#controlBarGroup -->
-                <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
-                    <s:layout>
-                        <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
-                    </s:layout>
-                </s:Group>
-            </s:Group>
-        </s:Group>
-    </s:Group>
-</s:SparkSkin>
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+
+<!--- The default skin class for a Spark TitleWindow container.  
+
+     @see spark.skins.spark.TitleWindowCloseButtonSkin
+     @see spark.components.TitleWindow
+
+     @langversion 3.0
+     @playerversion Flash 10
+     @playerversion AIR 1.5
+     @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false"
+    minWidth="76" minHeight="76" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+    
+    <fx:Metadata>
+        <![CDATA[ 
+        /** 
+         * @copy spark.skins.spark.ApplicationSkin#hostComponent
+         */
+        [HostComponent("spark.components.TitleWindow")]
+        ]]>
+    </fx:Metadata> 
+    
+	<!--
+		NOTE: this skin file contains sub-parts that may continue to react to
+		Style code.  To remove this behavior create new copies of those skins
+		and remove the styles.
+	-->
+    <s:states>
+        <s:State name="normal" />
+        <s:State name="inactive" stateGroups="inactiveGroup" />
+        <s:State name="disabled" />
+        <s:State name="normalWithControlBar" stateGroups="withControls" />
+        <s:State name="inactiveWithControlBar" stateGroups="withControls, inactiveGroup" />
+        <s:State name="disabledWithControlBar" stateGroups="withControls" />
+    </s:states>
+    
+    <!--- drop shadow can't be hittable so it stays sibling of other graphics @private-->
+    <s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" 
+                             alpha.inactiveGroup="0.22" distance="11"  distance.inactiveGroup="7"
+                             angle="90" color="0x000000" left="0" top="0" right="0" bottom="0"/>
+    
+    <!--- drop shadow can't be hittable so all other graphics go in this group -->
+    <s:Group left="0" right="0" top="0" bottom="0">
+        
+        <!--- top group mask @private-->
+        <s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask">
+            <!--- @private-->
+            <s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+                <s:fill>
+                    <s:SolidColor alpha="0"/>
+                </s:fill>
+            </s:Rect>
+        </s:Group>
+        
+        <!--- bottom group mask @private-->
+        <s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+                 includeIn="withControls">
+            <!--- @private-->
+            <s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+                <s:fill>
+                    <s:SolidColor alpha="0"/>
+                </s:fill>
+            </s:Rect>
+        </s:Group>
+        
+        <!--- layer 1: border @private -->
+        <s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+            <s:stroke>
+                <!--- Defines the TitleWindowSkin class's border stroke. The default value is 1. -->
+                <s:SolidColorStroke id="borderStroke" weight="1" />
+            </s:stroke>
+        </s:Rect>
+        
+        
+		<s:BitmapImage source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" scaleMode="stretch" />
+
+		<!-- layer 3: contents -->
+        <!--- Contains the vertical stack of title bar content and control bar. -->
+        <s:Group left="1" right="1" top="1" bottom="1" id="contents">
+            <s:layout>
+                <s:VerticalLayout gap="0" horizontalAlign="justify" />
+            </s:layout>
+            <!--- @private -->
+            <s:Group id="topGroup" mask="{topGroupMask}">
+                
+                <!--- layer 0: title bar fill @private -->
+                <s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+                    <s:fill>
+                        <s:LinearGradient rotation="90">
+                            <s:GradientEntry color="0xD2D2D2"
+                                             color.inactiveGroup="0xEAEAEA"/>
+                            <s:GradientEntry color="0x9A9A9A"
+                                             color.inactiveGroup="0xCECECE"/>
+                        </s:LinearGradient>
+                    </s:fill>
+                </s:Rect>
+                
+                <!--- layer 1: title bar highlight @private -->
+                <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+                    <s:stroke>
+                        <s:LinearGradientStroke rotation="90" weight="1">
+                            <s:GradientEntry color="0xE6E6E6" />
+                            <s:GradientEntry color="0xFFFFFF" alpha="0.22"/>
+                        </s:LinearGradientStroke>
+                    </s:stroke>
+                    <s:fill>
+                        <s:LinearGradient rotation="90">
+                            <s:GradientEntry color="0xFFFFFF" alpha="0.15" />
+                            <s:GradientEntry color="0xFFFFFF" alpha="0.15" ratio="0.44"/>
+                            <s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.4401"/>
+                        </s:LinearGradient>
+                    </s:fill>
+                </s:Rect>
+                
+                <!--- layer 2: title bar divider @private -->
+                <s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+                    <s:fill>
+                        <s:SolidColor color="0x000000" alpha="0.75" />
+                    </s:fill>
+                </s:Rect>
+                
+                <!-- layer 3: text -->
+                <!--- @copy spark.components.Panel#titleDisplay -->
+                <s:Label id="titleDisplay" maxDisplayedLines="1"
+                         left="9" right="36" top="1" bottom="0" minHeight="30"
+                         verticalAlign="middle" fontWeight="bold" />
+                
+                <!-- layer 4: moveArea -->
+                <!--- @copy spark.components.TitleWindow#moveArea -->
+                <s:Group id="moveArea" left="0" right="0" top="0" bottom="0" />
+                
+                <!--- @copy spark.components.TitleWindow#closeButton -->
+                <s:Button id="closeButton" skinClass="spark.skins.spark.TitleWindowCloseButtonSkin"
+                          width="15" height="15" right="7" top="7" />
+            </s:Group>
+            
+            <!--
+                Note: setting the minimum size to 0 here so that changes to the host component's
+                size will not be thwarted by this skin part's minimum size.   This is a compromise,
+                more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+            -->
+            <!--- @copy spark.components.SkinnableContainer#contentGroup -->
+            <s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+            </s:Group>
+            
+            <!--- @private -->
+            <s:Group id="bottomGroup" minWidth="0" minHeight="0" 
+                     includeIn="withControls">  
+                
+                <s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+
+                    <!-- layer 0: control bar divider line -->
+                    <s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+                        <s:fill>
+                            <s:SolidColor color="0x000000" />
+                        </s:fill>
+                    </s:Rect>
+                    
+                    <!-- layer 1: control bar highlight -->
+                    <s:Rect left="0" right="0" top="1" bottom="0">
+                        <s:stroke>
+                            <s:LinearGradientStroke rotation="90" weight="1">
+                                <s:GradientEntry color="0xFFFFFF" />
+                                <s:GradientEntry color="0xD8D8D8" />
+                            </s:LinearGradientStroke>
+                        </s:stroke>
+                    </s:Rect>
+                    
+                    <!-- layer 2: control bar fill -->
+                    <s:Rect left="1" right="1" top="2" bottom="1">
+                        <s:fill>
+                            <s:LinearGradient rotation="90">
+                                <s:GradientEntry color="0xEDEDED"/>
+                                <s:GradientEntry color="0xCDCDCD"/>
+                            </s:LinearGradient>
+                        </s:fill>
+                    </s:Rect>
+                </s:Group>
+                
+                <!--- @copy spark.components.Panel#controlBarGroup -->
+                <s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+                    <s:layout>
+                        <s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+                    </s:layout>
+                </s:Group>
+            </s:Group>
+        </s:Group>
+    </s:Group>
+</s:SparkSkin>

Propchange: incubator/flex/utilities/trunk/installer/src/ws/tink/spark/skins/controls/UpdaterDialogSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/utilities/trunk/installerBadge/.settings/org.eclipse.core.resources.prefs
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installerBadge/.settings/org.eclipse.core.resources.prefs?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installerBadge/.settings/org.eclipse.core.resources.prefs (original)
+++ incubator/flex/utilities/trunk/installerBadge/.settings/org.eclipse.core.resources.prefs Thu Nov 15 19:56:32 2012
@@ -1,3 +1,3 @@
-#Mon Aug 13 11:22:10 PDT 2012
-eclipse.preferences.version=1
-encoding/<project>=utf-8
+#Mon Aug 13 11:22:10 PDT 2012
+eclipse.preferences.version=1
+encoding/<project>=utf-8

Propchange: incubator/flex/utilities/trunk/installerBadge/.settings/org.eclipse.core.resources.prefs
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/installerBadge/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/installerBadge/html-template/disclaimer.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html (original)
+++ incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html Thu Nov 15 19:56:32 2012
@@ -1,94 +1,94 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<!DOCTYPE html>
-
-<html> 
-<head>
-    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-    <title>${title}</title>
-    
-    <style type="text/css"> 
-        body { margin: 0; padding: 0; }   
-        object:focus { outline: none; }
-        #flashContent { display: none; }
-        #${application} { border: 1px solid #172647; }
-    </style>
-    
-    <!-- 
-        SWFObject v2.2 <http://code.google.com/p/swfobject/> 
-        is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
-    -->
-    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
-    
-    <script type="text/javascript">
-        /* use strict */
-        
-        var swfVersionStr, params, attributes;
-        
-        function displayType() {
-            if ((window.top != window.self) && window.parent)
-                return window.name;
-                
-            return "";
-        }
-        
-        function init() {
-            var prefix, theElement, theHeight, theWidth, widget;
-            
-    		if (displayType() != "") {
-	    		if (typeof window.innerWidth === 'number') {
-	    			theHeight = window.innerHeight;
-	    			theWidth = window.innerWidth;
-	    		} else {
-	        		theElement = window.document.documentElement;
-	
-	    			theHeight = theElement.clientHeight;
-	    			theWidth = theElement.clientWidth;
-	    		}
-	
-	            widget = document.getElementById("${application}");
-	            widget.style.height = (theHeight - 2) + "px";
-	            widget.style.width = (theWidth - 2) + "px";
-	        }
-        }
-        
-        swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
-        flashVars = { serviceURL: "http://people.apache.org/~bigosmallm/installapacheflex_RC1/binaries/" };
-        params = { quality: "high", bgcolor: "${bgcolor}", allowscriptaccess: "sameDomain",
-            allowfullscreen: "true" };
-        attributes = { id: "${application}", name: "${application}" };
-        
-        swfobject.embedSWF("${swf}.swf", "flashContent", "300", "300", 
-            swfVersionStr, "", flashVars, params, attributes);
-        
-        swfobject.createCSS("#flashContent", "display: block;");
-    </script>
-    
-</head>
-<body onload="init();">
-    <div id="flashContent">
-        <script type="text/javascript"> 
-            var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); 
-            document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" 
-                            + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); 
-        </script> 
-    </div>
-</body>
-</html>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<!DOCTYPE html>
+
+<html> 
+<head>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+
+    <title>${title}</title>
+    
+    <style type="text/css"> 
+        body { margin: 0; padding: 0; }   
+        object:focus { outline: none; }
+        #flashContent { display: none; }
+        #${application} { border: 1px solid #172647; }
+    </style>
+    
+    <!-- 
+        SWFObject v2.2 <http://code.google.com/p/swfobject/> 
+        is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
+    -->
+    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
+    
+    <script type="text/javascript">
+        /* use strict */
+        
+        var swfVersionStr, params, attributes;
+        
+        function displayType() {
+            if ((window.top != window.self) && window.parent)
+                return window.name;
+                
+            return "";
+        }
+        
+        function init() {
+            var prefix, theElement, theHeight, theWidth, widget;
+            
+    		if (displayType() != "") {
+	    		if (typeof window.innerWidth === 'number') {
+	    			theHeight = window.innerHeight;
+	    			theWidth = window.innerWidth;
+	    		} else {
+	        		theElement = window.document.documentElement;
+	
+	    			theHeight = theElement.clientHeight;
+	    			theWidth = theElement.clientWidth;
+	    		}
+	
+	            widget = document.getElementById("${application}");
+	            widget.style.height = (theHeight - 2) + "px";
+	            widget.style.width = (theWidth - 2) + "px";
+	        }
+        }
+        
+        swfVersionStr = "${version_major}.${version_minor}.${version_revision}";
+        flashVars = { serviceURL: "http://people.apache.org/~bigosmallm/installapacheflex_RC1/binaries/" };
+        params = { quality: "high", bgcolor: "${bgcolor}", allowscriptaccess: "sameDomain",
+            allowfullscreen: "true" };
+        attributes = { id: "${application}", name: "${application}" };
+        
+        swfobject.embedSWF("${swf}.swf", "flashContent", "300", "300", 
+            swfVersionStr, "", flashVars, params, attributes);
+        
+        swfobject.createCSS("#flashContent", "display: block;");
+    </script>
+    
+</head>
+<body onload="init();">
+    <div id="flashContent">
+        <script type="text/javascript"> 
+            var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://"); 
+            document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='" 
+                            + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" ); 
+        </script> 
+    </div>
+</body>
+</html>

Propchange: incubator/flex/utilities/trunk/installerBadge/html-template/index.template.html
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml (original)
+++ incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml Thu Nov 15 19:56:32 2012
@@ -105,7 +105,8 @@ limitations under the License.
 		//    creationCompleteHandler
 		//----------------------------------
 		
-		private function creationCompleteHandler(event:FlexEvent):void
+		private function creationCompleteHandler(event:FlexEvent):void
+
 		{
 			_serviceURL = FlexGlobals.topLevelApplication.parameters.serviceURL;
 			
@@ -277,4 +278,4 @@ limitations under the License.
 			  click="btnDownload_clickHandler(event)"
 			  styleName="mainBtnStyle"/>
 	
-</s:Application>
\ No newline at end of file
+</s:Application>

Propchange: incubator/flex/utilities/trunk/installerBadge/src/InstallApacheFlexBadge.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/installerBadge/src/org/apache/flex/installApacheFlexBadge/resources/EmbeddedMedia.as
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/utilities/trunk/installerBadge/src/org/apache/flex/installApacheFlexBadge/styles/ApacheFlexBadgeStyle.css
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/installerBadge/src/org/apache/flex/installApacheFlexBadge/styles/ApacheFlexBadgeStyle.css?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/installerBadge/src/org/apache/flex/installApacheFlexBadge/styles/ApacheFlexBadgeStyle.css (original)
+++ incubator/flex/utilities/trunk/installerBadge/src/org/apache/flex/installApacheFlexBadge/styles/ApacheFlexBadgeStyle.css Thu Nov 15 19:56:32 2012
@@ -1,48 +1,49 @@
-/*
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-*/
-@namespace s "library://ns.adobe.com/flex/spark";
-
-@font-face {
-	src: url("/assets/fonts/open-sans/OpenSans-Bold.ttf");
-	fontFamily: openSansBold;
-	advancedAntiAliasing: true;
-	unicodeRange:
-		U+0044, /* D */
-		U+004F, /* O */
-		U+0057, /* W */
-		U+004E, /* N */
-		U+004C, /* L */
-		U+0041, /* A */
-		U+0030-U+0039, /* Numbers [0..9] */
-		U+002E-U+002E; /* Period [.] */
-}
-
-s|Button
-{
-	skinClass : ClassReference("ws.tink.spark.skins.controls.ButtonSkin");
-	fontFamily : openSansBold;
-	fontSize : 14;
-	color	: #FFFFFF;
-	borderColor: #DBDBDB;
-}
-
-.mainBtnStyle
-{
-	chromeColor: #679d13;
-}
+/*
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*/
+@namespace s "library://ns.adobe.com/flex/spark";
+
+@font-face {
+	src: url("/assets/fonts/open-sans/OpenSans-Bold.ttf");
+	fontFamily: openSansBold;
+	advancedAntiAliasing: true;
+	unicodeRange:
+		U+0044, /* D */
+		U+004F, /* O */
+		U+0057, /* W */
+		U+004E, /* N */
+		U+004C, /* L */
+		U+0041, /* A */
+		U+0030-U+0039, /* Numbers [0..9] */
+		U+002E-U+002E; /* Period [.] */
+}
+
+s|Button
+{
+	skinClass : ClassReference("ws.tink.spark.skins.controls.ButtonSkin");
+	fontFamily : openSansBold;
+	fontSize : 14;
+	color	: #FFFFFF;
+	borderColor: #DBDBDB;
+}
+
+.mainBtnStyle
+{
+	chromeColor: #679d13;
+}
+

Propchange: incubator/flex/utilities/trunk/installerBadge/src/org/apache/flex/installApacheFlexBadge/styles/ApacheFlexBadgeStyle.css
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/flex/utilities/trunk/mavenizer/README.txt
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/README.txt?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/README.txt (original)
+++ incubator/flex/utilities/trunk/mavenizer/README.txt Thu Nov 15 19:56:32 2012
@@ -1,129 +1,129 @@
-/////////////////////////////////////////////////////////////////////////////////////////
-The Mavenizer tool is used to convert the Apache and Adobe Flex SDKs and Air SDKs into
-Maven artifacts. Automatically creating the Directories, pom-files, copying and moving 
-the resources to the correct destinations.
-
-These artifacts can be used in Maven builds using the Flexmojos plugin (Starting with
-version 6.x).
-/////////////////////////////////////////////////////////////////////////////////////////
-
-The generator automatically converts the desired FDKs into a mavenized form, all you 
-need, is to download and unzip the archives containing the sdks and execute the 
-generator passing in the source and target directory as parameter. 
-
-The Generator doesn't stupidly copy all java libraries to the destination, but checks
-if the given artifact has already been deployed to maven central or by deploying an
-other FDK previously. For this check you do need an internet connection to do the
-conversion, otherwise I think this will probably take forever.
-
-Internally it consists of 3 components: 
-- One for deploying the Flash artifacts
-- One for deploying the Air artifacts
-- One for deploying the Flex artifacts
-
-As the Adobe FDKs all contained the AIR SDK and the Flash runtime the FDK directories
-are processed by each of the FDK directories. When deploying the Flex SDK the references
-to the flash and air artifacts are done based upon the playerglobal.swc and 
-airglobal.swc. The Generator compares the checksum of the file contained in the FDK
-with that of already deployed artifacts (I think in one of the 3.x FDKs the 
-"AIR SDK Readme.txt" stated the version to be a different version than it actually was).
-
-The Flash version used isn't detected by looking at the playerglobal.swc but by having
-a look at the content of the file "flex-config.xml" in the directory 
-"{fdkroot}/frameworks". Unfortunately I couldn't find a similar reference to a desired
-AIR version in any of the config files.
-
-/////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////
-								!!! WARNING !!!
-/////////////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////////////
-I would suggest not to generate the artifacts into your local repo directly, but
-to generate it to an empty directory and then move it from there.
-/////////////////////////////////////////////////////////////////////////////////////////
-
-Here come the steps needed to build the Generator (Assuming you already have a working
-Maven installation)
-
-1. Checkout the code (The directory containing the pom.xml I will call {home} from now on)
-2. Go to the directory {home}
-3. Execute "mvn package"
-
-You should now have a jar file called flex-sdk-converter-1.0.jar in your {home}/target
-directory.
-
-Using the generator:
-
-1. Prepare the source directory:
-	a) Create a directory anywhere (I will call it {sdkhome} from now on).
-	b) Create a directory {sdkhome}/air (optionally if you want to deploy Air SDKs).
-		I) Copy the AIR SDK archives you downloaded into {sdkhome}/air 
-		II) Unpack the archives in that directory, so the path to the "AIR SDK Readme.txt"
-		    is as follows "{sdkhome}/air/AdobeAIRSDK-{Airversion}-{Airplatform}/AIR SDK Readme.txt"
-			(Actually the name of the "AdobeAIRSDK-*" directory doesn't matter, it's just important
-			for the sequence in which the artifacts are generated)
-	c) Create a directory {sdkhome}/flex (optionally if you want to deploy Flex SDKs).
-		I) Copy the Flex SDK archives you downloaded into {sdkhome}/flex
-		II) Unpack the archived in that directory, so the path to the "flex-sdk-description.xml"
-		    is as follows "{sdkhome}/flex/flex_sdk_{Flexversion}/flex-sdk-description.xml"
-			(Actually the name of the "flex_sdk_*" directory doesn't matter, it's just important
-			for the sequence in which the artifacts are generated)
-	d) Create a directory anywhere which will contain the output (I will call it {fdktarget} 
-	   from now on)
-	e) Change to the directory {home}
-	f) Execute the following command: "java -cp target/flex-sdk-converter-1.0.jar SDKGenerator "{sdkhome}" "{fdktarget}""
-	   (You should wrap the both directory names in double-quotes if they contain spaces)
-
-/////////////////////////////////////////////////////////////////////////////////////////
-Some notes to things I noticed in dealing with some of the SDKs
-/////////////////////////////////////////////////////////////////////////////////////////
-	   
-Flex SDK 2.0:
-- Version is strange "3.0 Moxie M2.180927". Has to be changed to 2.0.1.180927 in flex-sdk-description.xml 
-
-With the first three Flex SDKs (3.0.0.477A, 3.0.1.1732A and 3.2.0.3958A) I did have some 
-trouble finding out the AIR version as well as the binary artifacts. The sizes and 
-checksums of the airglobal.swc didnt match any of the official AIR artifacts and the adl 
-command didn't output a version. Currently without tweaking these FDKs are generated 
-without working AIR support.
-If however you need one of these FDKs you can simply make the generator use the air 
-version you want, by copying the airglobal.swc of the version you want to use into the
-directory "{fdkroot}/frameworks/libs/air" assuming you have deployed any FDK or Air SDK 
-containing that version of airglobal, the generator will correctly add dependencies to
-that AIR version.
-
-Flex 4.8.0.1359417:
-- Needs a "player" directory in "framework" in order to execute compc (Copy from Flex 4.6.0).
-- Needs all the dependencies in place "textlayout", "osmf" and the stuff that needs to
-  be copied into the "{fdkroot}/lib/external" and "{fdkroot}/lib/external/optional" 
-  directories. For more instructions on this, please read the README.txt in the root of
-  Your FDK.
-- Needs to detect the AIR version the FDK is compatible with, this is currently determined 
-  by checking the version of the airglobal.swc in the framework/libs/air/airglobal.swc. 
-  Simply copy this from the 4.6 FDK
-
-/////////////////////////////////////////////////////////////////////////////////////////
-Some of the urls to access the binary distributions:  
-/////////////////////////////////////////////////////////////////////////////////////////
-  
-AIR SDKs (From Adobe):  
-http://helpx.adobe.com/air/kb/archived-air-sdk-version.html
-
-Flex SDKs (From Adobe):
-(Unfortunately the page seems messed-up, but you can get the URLs from there)
-http://sourceforge.net/adobe/flexsdk/wiki/downloads/
-
-/////////////////////////////////////////////////////////////////////////////////////////
-Some information (HOWTO) to go with the SDKDeployer  
-/////////////////////////////////////////////////////////////////////////////////////////
-
-The SDKDeployer allows you to deploy any maven structured directory to a remote maven 
-repository as soon as you've got the remote rights.
-
-Usage: java -cp flex-sdk-converter-1.0.jar SDKDeployer "directory" "repositoryId" "url" "mvn"
-
-The SDKDeployer needs 4 ordered parameters separated by spaces:
-    1- directory: The path to the directory to deploy.
-    2- repositoryId: Server Id to map on the <id> under <server> section of settings.xml.
-    3- url: URL where the artifacts will be deployed.
-    4- mvn: The path to the mvn.bat / mvn.sh.
+/////////////////////////////////////////////////////////////////////////////////////////
+The Mavenizer tool is used to convert the Apache and Adobe Flex SDKs and Air SDKs into
+Maven artifacts. Automatically creating the Directories, pom-files, copying and moving 
+the resources to the correct destinations.
+
+These artifacts can be used in Maven builds using the Flexmojos plugin (Starting with
+version 6.x).
+/////////////////////////////////////////////////////////////////////////////////////////
+
+The generator automatically converts the desired FDKs into a mavenized form, all you 
+need, is to download and unzip the archives containing the sdks and execute the 
+generator passing in the source and target directory as parameter. 
+
+The Generator doesn't stupidly copy all java libraries to the destination, but checks
+if the given artifact has already been deployed to maven central or by deploying an
+other FDK previously. For this check you do need an internet connection to do the
+conversion, otherwise I think this will probably take forever.
+
+Internally it consists of 3 components: 
+- One for deploying the Flash artifacts
+- One for deploying the Air artifacts
+- One for deploying the Flex artifacts
+
+As the Adobe FDKs all contained the AIR SDK and the Flash runtime the FDK directories
+are processed by each of the FDK directories. When deploying the Flex SDK the references
+to the flash and air artifacts are done based upon the playerglobal.swc and 
+airglobal.swc. The Generator compares the checksum of the file contained in the FDK
+with that of already deployed artifacts (I think in one of the 3.x FDKs the 
+"AIR SDK Readme.txt" stated the version to be a different version than it actually was).
+
+The Flash version used isn't detected by looking at the playerglobal.swc but by having
+a look at the content of the file "flex-config.xml" in the directory 
+"{fdkroot}/frameworks". Unfortunately I couldn't find a similar reference to a desired
+AIR version in any of the config files.
+
+/////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////
+								!!! WARNING !!!
+/////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////
+I would suggest not to generate the artifacts into your local repo directly, but
+to generate it to an empty directory and then move it from there.
+/////////////////////////////////////////////////////////////////////////////////////////
+
+Here come the steps needed to build the Generator (Assuming you already have a working
+Maven installation)
+
+1. Checkout the code (The directory containing the pom.xml I will call {home} from now on)
+2. Go to the directory {home}
+3. Execute "mvn package"
+
+You should now have a jar file called flex-sdk-converter-1.0.jar in your {home}/target
+directory.
+
+Using the generator:
+
+1. Prepare the source directory:
+	a) Create a directory anywhere (I will call it {sdkhome} from now on).
+	b) Create a directory {sdkhome}/air (optionally if you want to deploy Air SDKs).
+		I) Copy the AIR SDK archives you downloaded into {sdkhome}/air 
+		II) Unpack the archives in that directory, so the path to the "AIR SDK Readme.txt"
+		    is as follows "{sdkhome}/air/AdobeAIRSDK-{Airversion}-{Airplatform}/AIR SDK Readme.txt"
+			(Actually the name of the "AdobeAIRSDK-*" directory doesn't matter, it's just important
+			for the sequence in which the artifacts are generated)
+	c) Create a directory {sdkhome}/flex (optionally if you want to deploy Flex SDKs).
+		I) Copy the Flex SDK archives you downloaded into {sdkhome}/flex
+		II) Unpack the archived in that directory, so the path to the "flex-sdk-description.xml"
+		    is as follows "{sdkhome}/flex/flex_sdk_{Flexversion}/flex-sdk-description.xml"
+			(Actually the name of the "flex_sdk_*" directory doesn't matter, it's just important
+			for the sequence in which the artifacts are generated)
+	d) Create a directory anywhere which will contain the output (I will call it {fdktarget} 
+	   from now on)
+	e) Change to the directory {home}
+	f) Execute the following command: "java -cp target/flex-sdk-converter-1.0.jar SDKGenerator "{sdkhome}" "{fdktarget}""
+	   (You should wrap the both directory names in double-quotes if they contain spaces)
+
+/////////////////////////////////////////////////////////////////////////////////////////
+Some notes to things I noticed in dealing with some of the SDKs
+/////////////////////////////////////////////////////////////////////////////////////////
+	   
+Flex SDK 2.0:
+- Version is strange "3.0 Moxie M2.180927". Has to be changed to 2.0.1.180927 in flex-sdk-description.xml 
+
+With the first three Flex SDKs (3.0.0.477A, 3.0.1.1732A and 3.2.0.3958A) I did have some 
+trouble finding out the AIR version as well as the binary artifacts. The sizes and 
+checksums of the airglobal.swc didnt match any of the official AIR artifacts and the adl 
+command didn't output a version. Currently without tweaking these FDKs are generated 
+without working AIR support.
+If however you need one of these FDKs you can simply make the generator use the air 
+version you want, by copying the airglobal.swc of the version you want to use into the
+directory "{fdkroot}/frameworks/libs/air" assuming you have deployed any FDK or Air SDK 
+containing that version of airglobal, the generator will correctly add dependencies to
+that AIR version.
+
+Flex 4.8.0.1359417:
+- Needs a "player" directory in "framework" in order to execute compc (Copy from Flex 4.6.0).
+- Needs all the dependencies in place "textlayout", "osmf" and the stuff that needs to
+  be copied into the "{fdkroot}/lib/external" and "{fdkroot}/lib/external/optional" 
+  directories. For more instructions on this, please read the README.txt in the root of
+  Your FDK.
+- Needs to detect the AIR version the FDK is compatible with, this is currently determined 
+  by checking the version of the airglobal.swc in the framework/libs/air/airglobal.swc. 
+  Simply copy this from the 4.6 FDK
+
+/////////////////////////////////////////////////////////////////////////////////////////
+Some of the urls to access the binary distributions:  
+/////////////////////////////////////////////////////////////////////////////////////////
+  
+AIR SDKs (From Adobe):  
+http://helpx.adobe.com/air/kb/archived-air-sdk-version.html
+
+Flex SDKs (From Adobe):
+(Unfortunately the page seems messed-up, but you can get the URLs from there)
+http://sourceforge.net/adobe/flexsdk/wiki/downloads/
+
+/////////////////////////////////////////////////////////////////////////////////////////
+Some information (HOWTO) to go with the SDKDeployer  
+/////////////////////////////////////////////////////////////////////////////////////////
+
+The SDKDeployer allows you to deploy any maven structured directory to a remote maven 
+repository as soon as you've got the remote rights.
+
+Usage: java -cp flex-sdk-converter-1.0.jar SDKDeployer "directory" "repositoryId" "url" "mvn"
+
+The SDKDeployer needs 4 ordered parameters separated by spaces:
+    1- directory: The path to the directory to deploy.
+    2- repositoryId: Server Id to map on the <id> under <server> section of settings.xml.
+    3- url: URL where the artifacts will be deployed.
+    4- mvn: The path to the mvn.bat / mvn.sh.

Propchange: incubator/flex/utilities/trunk/mavenizer/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/README.txt
            ('svn:executable' removed)

Propchange: incubator/flex/utilities/trunk/mavenizer/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/pom.xml
            ('svn:executable' removed)

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java Thu Nov 15 19:56:32 2012
@@ -14,155 +14,155 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import java.io.*;
-
-/**
- * Created with IntelliJ IDEA.
- * User: fthomas
- * Date: 11.08.12
- * Time: 18:17
- */
-public class SDKDeployer {
-    private String directory;
-    private String repositoryId;
-    private String url;
-    private String mvn;
-
-    /**
-     * @param parameters
-     */
-    public SDKDeployer(String[] parameters) {
-        super();
-        this.directory = parameters[0];
-        this.repositoryId = parameters[1];
-        this.url = parameters[2];
-        this.mvn = parameters[3];
-    }
-
-    public static void main(String[] args) {
-        if (args.length < 4) {
-            System.out.println("\nUsage: java -cp flex-sdk-converter-1.0.jar SDKDeployer \"directory\" \"repositoryId\" \"url\" \"mvn\"\n");
-            System.out.println("The SDKDeployer needs 4 ordered parameters separated by spaces:");
-            System.out.println("\t1- directory: The path to the directory to deploy.");
-            System.out.println("\t2- repositoryId: Server Id to map on the <id> under <server> section of settings.xml.");
-            System.out.println("\t3- url: URL where the artifacts will be deployed.");
-            System.out.println("\t4- mvn: The path to the mvn.bat / mvn.sh.");
-            return;
-        }
-
-        SDKDeployer deployer = new SDKDeployer(args);
-        deployer.start();
-    }
-
-    private void start() {
-        try {
-            File dir = new File(directory);
-
-            doDir(dir);
-        } catch (Throwable e) {
-            e.printStackTrace();
-        }
-    }
-
-    private void doDir(File dir) throws IOException, InterruptedException {
-        File[] listFiles = dir.listFiles(new PomFilter());
-        if (listFiles != null) {
-            for (File pom : listFiles) {
-                doPom(pom);
-            }
-        }
-
-        File[] listDirs = dir.listFiles(new DirFilter());
-        if (listDirs != null) {
-            for (File subdir : listDirs) {
-                doDir(subdir);
-            }
-        }
-    }
-
-    private void doPom(File pom) throws IOException, InterruptedException {
-        File base = pom.getParentFile();
-        final String fileName = pom.getName();
-        String artifactName = fileName.substring(0, fileName.lastIndexOf("-"));
-
-        if (artifactName != null) {
-            final File artifacts[] = new File(pom.getParent()).listFiles(new ArtifactFilter());
-            final String DEPLOY = mvn + " deploy:deploy-file -DrepositoryId=" + repositoryId + " -Durl=" + url;
-
-            String packaging;
-            String classifier = null;
-
-            String mavenDeploy = DEPLOY;
-
-            if (artifacts != null && artifacts.length > 0) {
-                for (File artifact : artifacts) {
-                    classifier = packaging = null;
-                    artifactName = artifact.getName();
-
-                    packaging = (artifactName.endsWith("rb.swc")) ? "rb.swc" : artifactName.substring(artifactName.lastIndexOf(".") + 1);
-
-                    try {
-                        classifier = artifactName
-                                .substring(artifactName.indexOf(base.getName()) + base.getName().length() + 1, artifactName.length() - packaging.length() - 1);
-                    } catch (StringIndexOutOfBoundsException ex) {/*has no classifier*/}
-                    ;
-
-                    mavenDeploy = DEPLOY;
-                    mavenDeploy += " -Dfile=\"" + artifact.getAbsolutePath() + "\"";
-                    mavenDeploy += " -DpomFile=\"" + pom.getAbsolutePath() + "\"";
-                    if (classifier != null && classifier.length() > 0) {
-                        mavenDeploy += " -Dclassifier=\"" + classifier + "\"";
-                    }
-                    mavenDeploy += " -Dpackaging=\"" + packaging + "\"";
-                    exec(mavenDeploy);
-                }
-            } else {
-                mavenDeploy += " -Dfile=\"" + pom.getAbsolutePath() + "\"";
-                mavenDeploy += " -DpomFile=\"" + pom.getAbsolutePath() + "\"";
-                exec(mavenDeploy);
-            }
-        }
-    }
-
-    private void exec(String exec) throws InterruptedException, IOException {
-        System.out.println(exec);
-        Process p = Runtime.getRuntime().exec(exec);
-        String line;
-        BufferedReader bri = new BufferedReader(new InputStreamReader(p.getInputStream()));
-        BufferedReader bre = new BufferedReader(new InputStreamReader(p.getErrorStream()));
-        while ((line = bri.readLine()) != null) {
-            System.out.println(line);
-        }
-        bri.close();
-        while ((line = bre.readLine()) != null) {
-            System.out.println(line);
-        }
-        bre.close();
-        p.waitFor();
-        System.out.println("Done.");
-    }
-
-    private class PomFilter implements java.io.FileFilter {
-
-        @Override
-        public boolean accept(File pathname) {
-            return pathname.getName().endsWith(".pom");
-        }
-    }
-
-    private class DirFilter implements java.io.FileFilter {
-
-        @Override
-        public boolean accept(File pathname) {
-            return pathname.isDirectory();
-        }
-    }
-
-    private class ArtifactFilter implements java.io.FileFilter {
-
-        @Override
-        public boolean accept(File pathname) {
-            return !pathname.getName().endsWith(".pom");
-        }
-    }
-}
+import java.io.*;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: fthomas
+ * Date: 11.08.12
+ * Time: 18:17
+ */
+public class SDKDeployer {
+    private String directory;
+    private String repositoryId;
+    private String url;
+    private String mvn;
+
+    /**
+     * @param parameters
+     */
+    public SDKDeployer(String[] parameters) {
+        super();
+        this.directory = parameters[0];
+        this.repositoryId = parameters[1];
+        this.url = parameters[2];
+        this.mvn = parameters[3];
+    }
+
+    public static void main(String[] args) {
+        if (args.length < 4) {
+            System.out.println("\nUsage: java -cp flex-sdk-converter-1.0.jar SDKDeployer \"directory\" \"repositoryId\" \"url\" \"mvn\"\n");
+            System.out.println("The SDKDeployer needs 4 ordered parameters separated by spaces:");
+            System.out.println("\t1- directory: The path to the directory to deploy.");
+            System.out.println("\t2- repositoryId: Server Id to map on the <id> under <server> section of settings.xml.");
+            System.out.println("\t3- url: URL where the artifacts will be deployed.");
+            System.out.println("\t4- mvn: The path to the mvn.bat / mvn.sh.");
+            return;
+        }
+
+        SDKDeployer deployer = new SDKDeployer(args);
+        deployer.start();
+    }
+
+    private void start() {
+        try {
+            File dir = new File(directory);
+
+            doDir(dir);
+        } catch (Throwable e) {
+            e.printStackTrace();
+        }
+    }
+
+    private void doDir(File dir) throws IOException, InterruptedException {
+        File[] listFiles = dir.listFiles(new PomFilter());
+        if (listFiles != null) {
+            for (File pom : listFiles) {
+                doPom(pom);
+            }
+        }
+
+        File[] listDirs = dir.listFiles(new DirFilter());
+        if (listDirs != null) {
+            for (File subdir : listDirs) {
+                doDir(subdir);
+            }
+        }
+    }
+
+    private void doPom(File pom) throws IOException, InterruptedException {
+        File base = pom.getParentFile();
+        final String fileName = pom.getName();
+        String artifactName = fileName.substring(0, fileName.lastIndexOf("-"));
+
+        if (artifactName != null) {
+            final File artifacts[] = new File(pom.getParent()).listFiles(new ArtifactFilter());
+            final String DEPLOY = mvn + " deploy:deploy-file -DrepositoryId=" + repositoryId + " -Durl=" + url;
+
+            String packaging;
+            String classifier = null;
+
+            String mavenDeploy = DEPLOY;
+
+            if (artifacts != null && artifacts.length > 0) {
+                for (File artifact : artifacts) {
+                    classifier = packaging = null;
+                    artifactName = artifact.getName();
+
+                    packaging = (artifactName.endsWith("rb.swc")) ? "rb.swc" : artifactName.substring(artifactName.lastIndexOf(".") + 1);
+
+                    try {
+                        classifier = artifactName
+                                .substring(artifactName.indexOf(base.getName()) + base.getName().length() + 1, artifactName.length() - packaging.length() - 1);
+                    } catch (StringIndexOutOfBoundsException ex) {/*has no classifier*/}
+                    ;
+
+                    mavenDeploy = DEPLOY;
+                    mavenDeploy += " -Dfile=\"" + artifact.getAbsolutePath() + "\"";
+                    mavenDeploy += " -DpomFile=\"" + pom.getAbsolutePath() + "\"";
+                    if (classifier != null && classifier.length() > 0) {
+                        mavenDeploy += " -Dclassifier=\"" + classifier + "\"";
+                    }
+                    mavenDeploy += " -Dpackaging=\"" + packaging + "\"";
+                    exec(mavenDeploy);
+                }
+            } else {
+                mavenDeploy += " -Dfile=\"" + pom.getAbsolutePath() + "\"";
+                mavenDeploy += " -DpomFile=\"" + pom.getAbsolutePath() + "\"";
+                exec(mavenDeploy);
+            }
+        }
+    }
+
+    private void exec(String exec) throws InterruptedException, IOException {
+        System.out.println(exec);
+        Process p = Runtime.getRuntime().exec(exec);
+        String line;
+        BufferedReader bri = new BufferedReader(new InputStreamReader(p.getInputStream()));
+        BufferedReader bre = new BufferedReader(new InputStreamReader(p.getErrorStream()));
+        while ((line = bri.readLine()) != null) {
+            System.out.println(line);
+        }
+        bri.close();
+        while ((line = bre.readLine()) != null) {
+            System.out.println(line);
+        }
+        bre.close();
+        p.waitFor();
+        System.out.println("Done.");
+    }
+
+    private class PomFilter implements java.io.FileFilter {
+
+        @Override
+        public boolean accept(File pathname) {
+            return pathname.getName().endsWith(".pom");
+        }
+    }
+
+    private class DirFilter implements java.io.FileFilter {
+
+        @Override
+        public boolean accept(File pathname) {
+            return pathname.isDirectory();
+        }
+    }
+
+    private class ArtifactFilter implements java.io.FileFilter {
+
+        @Override
+        public boolean accept(File pathname) {
+            return !pathname.getName().endsWith(".pom");
+        }
+    }
+}

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKDeployer.java
            ('svn:executable' removed)

Modified: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKGenerator.java
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKGenerator.java?rev=1409957&r1=1409956&r2=1409957&view=diff
==============================================================================
--- incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKGenerator.java (original)
+++ incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKGenerator.java Thu Nov 15 19:56:32 2012
@@ -14,222 +14,222 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-import java.io.*;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.parsers.*;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-import air.AirFrameworkGenerator;
-import air.AirRuntimeGenerator;
-import flex.FlexCompilerGenerator;
-import flex.FlexFrameworkGenerator;
-import flex.FlexRuntimeGenerator;
-
-/**
- * Created with IntelliJ IDEA.
- * User: cdutz
- * Date: 11.05.12
- * Time: 12:03
- */
-public class SDKGenerator {
-
-    protected List<String> generatedAirVersions = new ArrayList<String>();
-
-    /**
-     * All this little helper does is list up all directories in the given base directory and
-     * trigger the actual import on that. If a flex sdk comes with an air runtime, the structure
-     * is identical to that of an ordinary air sdk. Therefore the import works if a flex sdk or
-     * an air sdk directory is passed to this method.
-     *
-     * @param sdkSourceDirectory source directory containing the air content
-     * @param sdkTargetDirectory directory where to copy the content
-     * @throws Exception
-     */
-    public void generateAllAir(File sdkSourceDirectory, File sdkTargetDirectory) throws Exception {
-        final File sdkDirectories[] = sdkSourceDirectory.listFiles(new FileFilter() {
-            public boolean accept(File pathname) {
-                return pathname.isDirectory();
-            }
-        });
-        if (sdkDirectories != null) {
-            System.out.println("---------------------------------------------");
-            for (final File sdkDirectory : sdkDirectories) {
-                String sdkVersion = getAirSdkVersion(sdkDirectory);
-
-                // As we are eventually generating the air sdks first, a flex sdk processed
-                // later could contain the same version of air, in this case we skip that.
-                if((sdkVersion != null) && !generatedAirVersions.contains(sdkVersion)) {
-                    System.out.println("-- Generating Air SDK version: " + sdkVersion);
-                    System.out.println("---------------------------------------------");
-
-                    generateAir(sdkDirectory, sdkTargetDirectory, sdkVersion);
-
-                    System.out.println("---------------------------------------------");
-
-                    generatedAirVersions.add(sdkVersion);
-                }
-            }
-        }
-    }
-
-    public void generateAir(final File sdkSourceDirectory, final File sdkTargetDirectory, final String sdkVersion) throws Exception {
-        // Generate the artifacts, needed by the flex application.
-        new AirFrameworkGenerator().process(sdkSourceDirectory, false, sdkTargetDirectory, sdkVersion);
-
-        // Deploy the FlashPlayer and AIR runtime binaries.
-        new AirRuntimeGenerator().process(sdkSourceDirectory, false, sdkTargetDirectory, sdkVersion);
-    }
-
-    public void generateAllFlex(File sdkSourceDirectory, File sdkTargetDirectory) throws Exception {
-        final File sdkDirectories[] = sdkSourceDirectory.listFiles(new FileFilter() {
-            public boolean accept(File pathname) {
-                return pathname.isDirectory();
-            }
-        });
-        if (sdkDirectories != null) {
-            System.out.println("---------------------------------------------");
-            for (final File sdkDirectory : sdkDirectories) {
-                String sdkVersion = getFlexSdkVersion(sdkDirectory);
-
-                // Apache FDKs (ok ... the only one available) have the version prefix "Apache-"
-                // So this is what we use in order to determine what type of FDK it is.
-                final boolean isApache = sdkVersion.startsWith("Apache-");
-                if (isApache) {
-                    sdkVersion = sdkVersion.substring("Apache-".length());
-                }
-
-                System.out.println("-- Generating Flex SDK version: " + sdkVersion);
-                System.out.println("---------------------------------------------");
-
-                // TODO: Comment this line in to deploy the apache flex under org.apache.flex
-                //generateFlex(sdkDirectory, isApache, sdkTargetDirectory, sdkVersion);
-                generateFlex(sdkDirectory, false, sdkTargetDirectory, sdkVersion);
-
-                System.out.println("---------------------------------------------");
-            }
-        }
-    }
-
-    public void generateFlex(final File sdkSourceDirectory, final boolean isApache, final File sdkTargetDirectory, final String sdkVersion) throws Exception {
-        // Generate the artifacts, needed by the flex compiler.
-        new FlexCompilerGenerator().process(sdkSourceDirectory, isApache, sdkTargetDirectory, sdkVersion);
-
-        // Generate the artifacts, needed by the flex application.
-        new FlexFrameworkGenerator().process(sdkSourceDirectory, isApache, sdkTargetDirectory, sdkVersion);
-
-        // Deploy the FlashPlayer and AIR runtime binaries.
-        new FlexRuntimeGenerator().process(sdkSourceDirectory, isApache, sdkTargetDirectory, sdkVersion);
-    }
-
-    public static void main(String[] args) throws Exception {
-
-        if (args.length != 2) {
-            System.out.println("Usage: SDKGenerator {source-directory} {target-directory}");
-            System.exit(0);
-        }
-
-        final String sdkSourceDirectoryName = args[0];
-        final String sdkTargetDirectoryName = args[1];
-
-        final File sdkSourceDirectory = new File(sdkSourceDirectoryName);
-        final File sdkTargetDirectory = new File(sdkTargetDirectoryName);
-
-        // When generating the fdks the generator tries to figure out the flashplayer-version and air-version
-        // by comparing the hash of the playerglobal.swc and airglobal.swc with some hashes. This list of
-        // hashes has to be created first. Therefore the Generator generates air artifacts by processing air
-        // sdk directories and then by extracting the needed artifacts from the flex fdks.
-        final SDKGenerator generator = new SDKGenerator();
-        generator.generateAllAir(new File(sdkSourceDirectory, "air"), sdkTargetDirectory);
-        generator.generateAllAir(new File(sdkSourceDirectory, "flex"), sdkTargetDirectory);
-
-        // After the air artifacts are generated and
-        generator.generateAllFlex(new File(sdkSourceDirectory, "flex"), sdkTargetDirectory);
-    }
-
-    /**
-     * The only place I found where to extract the version of an Air SDK was the "AIR SDK Readme.txt" file.
-     * In order to get the version we need to cut out the version-part from the title-row of that text file.
-     * This file is present in the root of a pure air sdk or in the root of a flex sdk, therefore the same
-     * algorithm works if sdkSourceDirectory points to a flex sdk or an air sdk.
-     *
-     * @param sdkSourceDirectory directory in which to look for the sdk descriptor file of an air sdk
-     * @return version of the sdk in th given directory
-     */
-    public static String getAirSdkVersion(final File sdkSourceDirectory) {
-        final File sdkDescriptor = new File(sdkSourceDirectory, "AIR SDK Readme.txt");
-
-        if (sdkDescriptor.exists()) {
-            DataInputStream in = null;
-            try {
-                final FileInputStream fstream = new FileInputStream(sdkDescriptor);
-                in = new DataInputStream(fstream);
-                final BufferedReader br = new BufferedReader(new InputStreamReader(in));
-                final String strLine = br.readLine();
-                return strLine.substring("Adobe AIR ".length(), strLine.indexOf(" ", "Adobe AIR ".length()));
-            } catch (Exception e) {
-                e.printStackTrace();
-            } finally {
-                if (in != null) {
-                    try {
-                        in.close();
-                    } catch (IOException ioe) {
-                        // Ignore.
-                    }
-                }
-            }
-        }
-        return null;
-    }
-
-    /**
-     * The Flex SDK version is contained in the flex-sdk-description.xml file.
-     *
-     * @param sdkSourceDirectory directory where to look for the fdk descriptor file
-     * @return version string of the fdk
-     */
-    public static String getFlexSdkVersion(final File sdkSourceDirectory) {
-        final File sdkDescriptor = new File(sdkSourceDirectory, "flex-sdk-description.xml");
-
-        final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-        try {
-            // Parse the document
-            final DocumentBuilder db = dbf.newDocumentBuilder();
-            final Document dom = db.parse(sdkDescriptor);
-
-            // Get name, version and build nodes
-            final Element root = dom.getDocumentElement();
-            final String name = root.getElementsByTagName("name").item(0).getTextContent();
-            final String version = root.getElementsByTagName("version").item(0).getTextContent();
-            final String build = root.getElementsByTagName("build").item(0).getTextContent();
-
-            // In general the version consists of the content of the version element with an appended build-number.
-            String sdkVersion = version + "." + build;
-
-            // Deal with the patched re-releases of all older SDKs:
-            // The patched versions have A or B appended to their name and not a modified version or build number.
-            // In order to differentiate the patched versions from the un-patched ones, we appnd A or B to the
-            // version string.
-            if (name.endsWith("A")) {
-                sdkVersion += "A";
-            } else if (name.endsWith("B")) {
-                sdkVersion += "B";
-            }
-
-            // If the name contains "Apache", we prefix the version with "Apache-". This is cut off
-            // again later on.
-            if (name.contains("Apache")) {
-                sdkVersion = "Apache-" + sdkVersion;
-            }
-
-            return sdkVersion;
-        } catch (ParserConfigurationException pce) {
-            throw new RuntimeException(pce);
-        } catch (SAXException se) {
-            throw new RuntimeException(se);
-        } catch (IOException ioe) {
-            throw new RuntimeException(ioe);
-        }
-    }
-}
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.parsers.*;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+import air.AirFrameworkGenerator;
+import air.AirRuntimeGenerator;
+import flex.FlexCompilerGenerator;
+import flex.FlexFrameworkGenerator;
+import flex.FlexRuntimeGenerator;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: cdutz
+ * Date: 11.05.12
+ * Time: 12:03
+ */
+public class SDKGenerator {
+
+    protected List<String> generatedAirVersions = new ArrayList<String>();
+
+    /**
+     * All this little helper does is list up all directories in the given base directory and
+     * trigger the actual import on that. If a flex sdk comes with an air runtime, the structure
+     * is identical to that of an ordinary air sdk. Therefore the import works if a flex sdk or
+     * an air sdk directory is passed to this method.
+     *
+     * @param sdkSourceDirectory source directory containing the air content
+     * @param sdkTargetDirectory directory where to copy the content
+     * @throws Exception
+     */
+    public void generateAllAir(File sdkSourceDirectory, File sdkTargetDirectory) throws Exception {
+        final File sdkDirectories[] = sdkSourceDirectory.listFiles(new FileFilter() {
+            public boolean accept(File pathname) {
+                return pathname.isDirectory();
+            }
+        });
+        if (sdkDirectories != null) {
+            System.out.println("---------------------------------------------");
+            for (final File sdkDirectory : sdkDirectories) {
+                String sdkVersion = getAirSdkVersion(sdkDirectory);
+
+                // As we are eventually generating the air sdks first, a flex sdk processed
+                // later could contain the same version of air, in this case we skip that.
+                if((sdkVersion != null) && !generatedAirVersions.contains(sdkVersion)) {
+                    System.out.println("-- Generating Air SDK version: " + sdkVersion);
+                    System.out.println("---------------------------------------------");
+
+                    generateAir(sdkDirectory, sdkTargetDirectory, sdkVersion);
+
+                    System.out.println("---------------------------------------------");
+
+                    generatedAirVersions.add(sdkVersion);
+                }
+            }
+        }
+    }
+
+    public void generateAir(final File sdkSourceDirectory, final File sdkTargetDirectory, final String sdkVersion) throws Exception {
+        // Generate the artifacts, needed by the flex application.
+        new AirFrameworkGenerator().process(sdkSourceDirectory, false, sdkTargetDirectory, sdkVersion);
+
+        // Deploy the FlashPlayer and AIR runtime binaries.
+        new AirRuntimeGenerator().process(sdkSourceDirectory, false, sdkTargetDirectory, sdkVersion);
+    }
+
+    public void generateAllFlex(File sdkSourceDirectory, File sdkTargetDirectory) throws Exception {
+        final File sdkDirectories[] = sdkSourceDirectory.listFiles(new FileFilter() {
+            public boolean accept(File pathname) {
+                return pathname.isDirectory();
+            }
+        });
+        if (sdkDirectories != null) {
+            System.out.println("---------------------------------------------");
+            for (final File sdkDirectory : sdkDirectories) {
+                String sdkVersion = getFlexSdkVersion(sdkDirectory);
+
+                // Apache FDKs (ok ... the only one available) have the version prefix "Apache-"
+                // So this is what we use in order to determine what type of FDK it is.
+                final boolean isApache = sdkVersion.startsWith("Apache-");
+                if (isApache) {
+                    sdkVersion = sdkVersion.substring("Apache-".length());
+                }
+
+                System.out.println("-- Generating Flex SDK version: " + sdkVersion);
+                System.out.println("---------------------------------------------");
+
+                // TODO: Comment this line in to deploy the apache flex under org.apache.flex
+                //generateFlex(sdkDirectory, isApache, sdkTargetDirectory, sdkVersion);
+                generateFlex(sdkDirectory, false, sdkTargetDirectory, sdkVersion);
+
+                System.out.println("---------------------------------------------");
+            }
+        }
+    }
+
+    public void generateFlex(final File sdkSourceDirectory, final boolean isApache, final File sdkTargetDirectory, final String sdkVersion) throws Exception {
+        // Generate the artifacts, needed by the flex compiler.
+        new FlexCompilerGenerator().process(sdkSourceDirectory, isApache, sdkTargetDirectory, sdkVersion);
+
+        // Generate the artifacts, needed by the flex application.
+        new FlexFrameworkGenerator().process(sdkSourceDirectory, isApache, sdkTargetDirectory, sdkVersion);
+
+        // Deploy the FlashPlayer and AIR runtime binaries.
+        new FlexRuntimeGenerator().process(sdkSourceDirectory, isApache, sdkTargetDirectory, sdkVersion);
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        if (args.length != 2) {
+            System.out.println("Usage: SDKGenerator {source-directory} {target-directory}");
+            System.exit(0);
+        }
+
+        final String sdkSourceDirectoryName = args[0];
+        final String sdkTargetDirectoryName = args[1];
+
+        final File sdkSourceDirectory = new File(sdkSourceDirectoryName);
+        final File sdkTargetDirectory = new File(sdkTargetDirectoryName);
+
+        // When generating the fdks the generator tries to figure out the flashplayer-version and air-version
+        // by comparing the hash of the playerglobal.swc and airglobal.swc with some hashes. This list of
+        // hashes has to be created first. Therefore the Generator generates air artifacts by processing air
+        // sdk directories and then by extracting the needed artifacts from the flex fdks.
+        final SDKGenerator generator = new SDKGenerator();
+        generator.generateAllAir(new File(sdkSourceDirectory, "air"), sdkTargetDirectory);
+        generator.generateAllAir(new File(sdkSourceDirectory, "flex"), sdkTargetDirectory);
+
+        // After the air artifacts are generated and
+        generator.generateAllFlex(new File(sdkSourceDirectory, "flex"), sdkTargetDirectory);
+    }
+
+    /**
+     * The only place I found where to extract the version of an Air SDK was the "AIR SDK Readme.txt" file.
+     * In order to get the version we need to cut out the version-part from the title-row of that text file.
+     * This file is present in the root of a pure air sdk or in the root of a flex sdk, therefore the same
+     * algorithm works if sdkSourceDirectory points to a flex sdk or an air sdk.
+     *
+     * @param sdkSourceDirectory directory in which to look for the sdk descriptor file of an air sdk
+     * @return version of the sdk in th given directory
+     */
+    public static String getAirSdkVersion(final File sdkSourceDirectory) {
+        final File sdkDescriptor = new File(sdkSourceDirectory, "AIR SDK Readme.txt");
+
+        if (sdkDescriptor.exists()) {
+            DataInputStream in = null;
+            try {
+                final FileInputStream fstream = new FileInputStream(sdkDescriptor);
+                in = new DataInputStream(fstream);
+                final BufferedReader br = new BufferedReader(new InputStreamReader(in));
+                final String strLine = br.readLine();
+                return strLine.substring("Adobe AIR ".length(), strLine.indexOf(" ", "Adobe AIR ".length()));
+            } catch (Exception e) {
+                e.printStackTrace();
+            } finally {
+                if (in != null) {
+                    try {
+                        in.close();
+                    } catch (IOException ioe) {
+                        // Ignore.
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
+    /**
+     * The Flex SDK version is contained in the flex-sdk-description.xml file.
+     *
+     * @param sdkSourceDirectory directory where to look for the fdk descriptor file
+     * @return version string of the fdk
+     */
+    public static String getFlexSdkVersion(final File sdkSourceDirectory) {
+        final File sdkDescriptor = new File(sdkSourceDirectory, "flex-sdk-description.xml");
+
+        final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        try {
+            // Parse the document
+            final DocumentBuilder db = dbf.newDocumentBuilder();
+            final Document dom = db.parse(sdkDescriptor);
+
+            // Get name, version and build nodes
+            final Element root = dom.getDocumentElement();
+            final String name = root.getElementsByTagName("name").item(0).getTextContent();
+            final String version = root.getElementsByTagName("version").item(0).getTextContent();
+            final String build = root.getElementsByTagName("build").item(0).getTextContent();
+
+            // In general the version consists of the content of the version element with an appended build-number.
+            String sdkVersion = version + "." + build;
+
+            // Deal with the patched re-releases of all older SDKs:
+            // The patched versions have A or B appended to their name and not a modified version or build number.
+            // In order to differentiate the patched versions from the un-patched ones, we appnd A or B to the
+            // version string.
+            if (name.endsWith("A")) {
+                sdkVersion += "A";
+            } else if (name.endsWith("B")) {
+                sdkVersion += "B";
+            }
+
+            // If the name contains "Apache", we prefix the version with "Apache-". This is cut off
+            // again later on.
+            if (name.contains("Apache")) {
+                sdkVersion = "Apache-" + sdkVersion;
+            }
+
+            return sdkVersion;
+        } catch (ParserConfigurationException pce) {
+            throw new RuntimeException(pce);
+        } catch (SAXException se) {
+            throw new RuntimeException(se);
+        } catch (IOException ioe) {
+            throw new RuntimeException(ioe);
+        }
+    }
+}

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKGenerator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/utilities/trunk/mavenizer/src/main/java/SDKGenerator.java
            ('svn:executable' removed)



Mime
View raw message