You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by cd...@apache.org on 2021/03/21 11:35:34 UTC

[royale-asjs] 09/17: - Updated the js-only distributions to work for FlashBuilder

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 306088158cc11b3d236c006a53ef7b4e83ac9b95
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Sun Mar 7 12:40:13 2021 +0100

    - Updated the js-only distributions to work for FlashBuilder
---
 distribution/pom.xml                               |  4 +-
 .../main/assembly/{bin.xml => bin-without-swf.xml} |  2 +
 .../component-flashbuilder-without-swf.xml         | 51 +++++++++++++
 .../src/main/assembly/component-royale.xml         | 84 ++++++----------------
 .../main/assembly/{dir.xml => dir-without-swf.xml} |  2 +
 5 files changed, 77 insertions(+), 66 deletions(-)

diff --git a/distribution/pom.xml b/distribution/pom.xml
index 8ae06a4..eef1d6a 100644
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -43,8 +43,8 @@
     <targetPlayerMinorVersion>0</targetPlayerMinorVersion>
 
     <strip-swf>true</strip-swf>
-    <assembly.bin>bin.xml</assembly.bin>
-    <assembly.dir>dir.xml</assembly.dir>
+    <assembly.bin>bin-without-swf.xml</assembly.bin>
+    <assembly.dir>dir-without-swf.xml</assembly.dir>
     <assembly.sdk-description>royale-sdk-description.xml</assembly.sdk-description>
   </properties>
 
diff --git a/distribution/src/main/assembly/bin.xml b/distribution/src/main/assembly/bin-without-swf.xml
similarity index 88%
rename from distribution/src/main/assembly/bin.xml
rename to distribution/src/main/assembly/bin-without-swf.xml
index 533eaa8..7b1ddd7 100644
--- a/distribution/src/main/assembly/bin.xml
+++ b/distribution/src/main/assembly/bin-without-swf.xml
@@ -27,6 +27,8 @@ under the License.
   <componentDescriptors>
     <componentDescriptor>src/main/assembly/component-royale.xml</componentDescriptor>
     <componentDescriptor>src/main/assembly/component-royale-without-swf.xml</componentDescriptor>
+    <!-- Descriptors containing all the tweaks needed to support FlashBuilder -->
     <componentDescriptor>src/main/assembly/component-flashbuilder.xml</componentDescriptor>
+    <componentDescriptor>src/main/assembly/component-flashbuilder-without-swf.xml</componentDescriptor>
   </componentDescriptors>
 </assembly>
diff --git a/distribution/src/main/assembly/component-flashbuilder-without-swf.xml b/distribution/src/main/assembly/component-flashbuilder-without-swf.xml
new file mode 100644
index 0000000..e683d57
--- /dev/null
+++ b/distribution/src/main/assembly/component-flashbuilder-without-swf.xml
@@ -0,0 +1,51 @@
+<!--
+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.
+-->
+<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3 http://maven.apache.org/xsd/component-1.1.3.xsd">
+
+    <dependencySets>
+        <!-- It seems FlashBuilder needs an additional theme artifact present to be happy -->
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>frameworks/libs</outputDirectory>
+            <outputFileNameMapping>KeepsFBFromHanging.swc</outputFileNameMapping>
+            <includes>
+                <include>org.apache.royale.typedefs:royale-typedefs-js:swc</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>frameworks/libs/player/${flash.version}</outputDirectory>
+            <outputFileNameMapping>playerglobal.swc</outputFileNameMapping>
+            <includes>
+                <include>org.apache.royale.typedefs:royale-typedefs-js:swc</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <useProjectArtifact>false</useProjectArtifact>
+            <outputDirectory>frameworks/libs/air</outputDirectory>
+            <outputFileNameMapping>airglobal.swc</outputFileNameMapping>
+            <includes>
+                <include>org.apache.royale.typedefs:royale-typedefs-js:swc</include>
+            </includes>
+        </dependencySet>
+    </dependencySets>
+
+</component>
diff --git a/distribution/src/main/assembly/component-royale.xml b/distribution/src/main/assembly/component-royale.xml
index 2496a48..8915abb 100644
--- a/distribution/src/main/assembly/component-royale.xml
+++ b/distribution/src/main/assembly/component-royale.xml
@@ -1,20 +1,20 @@
 <!--
-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
+    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
+        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.
+    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.
 -->
 <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.3"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -28,7 +28,6 @@ under the License.
             <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>lib</outputDirectory>
             <!-- FlashBuilder doesn't like us appending the version to the jar name -->
-            <!--outputFileNameMapping>${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}</outputFileNameMapping-->
             <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.royale.compiler:*:jar</include>
@@ -54,15 +53,6 @@ under the License.
                 <exclude>*:org.json:jar</exclude>
             </excludes>
         </dependencySet>
-        <!-- Put the externs swcs into the externs directory -->
-        <!--dependencySet>
-          <useProjectArtifact>false</useProjectArtifact>
-          <outputDirectory>externs</outputDirectory>
-          <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
-          <includes>
-            <include>org.apache.royale.typedefs:*</include>
-          </includes>
-        </dependencySet-->
         <!-- Put the framework js-swcs into the frameworks/libs directory -->
         <dependencySet>
             <useProjectArtifact>false</useProjectArtifact>
@@ -79,11 +69,9 @@ under the License.
             <outputDirectory>js/lib</outputDirectory>
             <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
             <includes>
-                <!-- <include>org.apache.royale.compiler:compiler-jx:jar</include> -->
                 <include>*:args4j:jar</include>
                 <include>*:commons-io:*</include>
                 <include>*:flex-tool-api:*</include>
-                <!-- <include>*:google-closure-library*:jar</include> -->
                 <include>*:guava:*</include>
                 <include>*:org.json:jar</include>
             </includes>
@@ -98,15 +86,6 @@ under the License.
         </dependencySet>
 
         <!-- Copy the fonts -->
-        <!-- Disabled as currently font swf compilation is deactivated -->
-        <!--dependencySet>
-          <useProjectArtifact>false</useProjectArtifact>
-          <outputDirectory>frameworks/fonts</outputDirectory>
-          <includes>
-            <include>org.apache.royale.framework:Fonts:swf</include>
-          </includes>
-          <outputFileNameMapping>flat-ui-icons-regular.swf</outputFileNameMapping>
-        </dependencySet-->
         <dependencySet>
             <useProjectArtifact>false</useProjectArtifact>
             <outputDirectory>frameworks/fonts</outputDirectory>
@@ -168,10 +147,10 @@ under the License.
 
         <!-- Copy the js-projects -->
         <fileSet>
-            <outputDirectory>frameworks/js</outputDirectory>
-            <directory>../frameworks/js</directory>
+            <outputDirectory>frameworks/js/projects</outputDirectory>
+            <directory>../frameworks/js/projects</directory>
             <includes>
-                <include>**</include>
+                <include>*/src/**</include>
             </includes>
         </fileSet>
 
@@ -180,27 +159,11 @@ under the License.
             <directory>../frameworks/themes</directory>
             <outputDirectory>frameworks/themes</outputDirectory>
             <includes>
-                <include>**</include>
+                <!-- Include only the source directories -->
+                <include>*/src/**</include>
             </includes>
         </fileSet>
 
-        <!-- Copy the unpacked closure-compiler -->
-        <!-- <fileSet>
-          <outputDirectory>js/lib/google/closure-compiler/compiler</outputDirectory>
-          <directory>target/closure-compiler-temp</directory>
-          <includes>
-            <include>**</include>
-          </includes>
-        </fileSet> -->
-        <!-- Copy all from the parent -->
-        <!-- <fileSet>
-          <directory>../js/lib/google/closure-compiler/compiler</directory>
-          <outputDirectory>js/lib/google/closure-compiler/compiler</outputDirectory>
-          <includes>
-            <include>**</include>
-          </includes>
-        </fileSet> -->
-
         <!-- Copy the unpacked closure-library -->
         <fileSet>
             <outputDirectory>js/lib/google/closure-library/closure</outputDirectory>
@@ -209,14 +172,6 @@ under the License.
                 <include>**</include>
             </includes>
         </fileSet>
-        <!-- Copy all from the parent -->
-        <!-- <fileSet>
-          <directory>../js/lib/google/closure-library/closure</directory>
-          <outputDirectory>js/lib/google/closure-library/closure</outputDirectory>
-          <includes>
-            <include>**</include>
-          </includes>
-        </fileSet> -->
     </fileSets>
 
     <files>
@@ -291,6 +246,7 @@ under the License.
             <outputDirectory>js/lib</outputDirectory>
             <destName>compc.jar</destName>
         </file>
+        <!-- Copy the jsc.jar itself -->
         <file>
             <source>${project.build.directory}/jsc/jsc.jar</source>
             <outputDirectory>js/lib</outputDirectory>
diff --git a/distribution/src/main/assembly/dir.xml b/distribution/src/main/assembly/dir-without-swf.xml
similarity index 86%
rename from distribution/src/main/assembly/dir.xml
rename to distribution/src/main/assembly/dir-without-swf.xml
index dbcd0ee..692fa2d 100644
--- a/distribution/src/main/assembly/dir.xml
+++ b/distribution/src/main/assembly/dir-without-swf.xml
@@ -26,6 +26,8 @@ under the License.
   <componentDescriptors>
     <componentDescriptor>src/main/assembly/component-royale.xml</componentDescriptor>
     <componentDescriptor>src/main/assembly/component-royale-without-swf.xml</componentDescriptor>
+    <!-- Descriptors containing all the tweaks needed to support FlashBuilder -->
     <componentDescriptor>src/main/assembly/component-flashbuilder.xml</componentDescriptor>
+    <componentDescriptor>src/main/assembly/component-flashbuilder-without-swf.xml</componentDescriptor>
   </componentDescriptors>
 </assembly>