You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2019/11/21 19:11:37 UTC

[royale-asjs] branch develop updated: fixed issue where bin/mxmlc and bin/compc scripts did not work because they didn't understand the targets compiler option in royale-config.xml

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

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


The following commit(s) were added to refs/heads/develop by this push:
     new 2b79a0c  fixed issue where bin/mxmlc and bin/compc scripts did not work because they didn't understand the targets compiler option in royale-config.xml
2b79a0c is described below

commit 2b79a0c6fc9c0e68d57de0f717f038dea4ac732b
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Thu Nov 21 11:11:29 2019 -0800

    fixed issue where bin/mxmlc and bin/compc scripts did not work because they didn't understand the targets compiler option in royale-config.xml
    
    Now uses compiler-jx with -targets=SWF to preserve the existing behavior while allowing the extended compiler options in royale-config.xml
---
 build.xml                                     | 14 ++++++++++++++
 distribution/src/main/resources/bin/compc     |  2 +-
 distribution/src/main/resources/bin/compc.bat |  2 +-
 distribution/src/main/resources/bin/mxmlc     |  2 +-
 distribution/src/main/resources/bin/mxmlc.bat |  2 +-
 5 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/build.xml b/build.xml
index 3350f7c..df7a59c 100644
--- a/build.xml
+++ b/build.xml
@@ -510,6 +510,20 @@ limitations under the License.
                 <include name="**"/>
             </fileset>
         </copy>
+        <!--
+            compiler-jx has some optional scripts that override the ones from
+            compiler. the core SWF compiler doesn't understand our
+            royale-config.xml because it sets a number of JS-related compiler
+            options, so its original scripts will fail when executed and report
+            unknown tag errors. the override scripts call compiler-jx with
+            -targets=SWF to preserve the original behavior while handling the
+            extended options included in royale-config.xml.
+        -->
+        <copy todir="${basedir}/bin" overwrite="true">
+            <fileset dir="${ROYALE_COMPILER_REPO}/compiler-jx/src/assembly/compiler-override-scripts">
+                <include name="**"/>
+            </fileset>
+        </copy>
         <chmod dir="${basedir}/bin" excludes="**/*.bat" perm="+x" />
         <mkdir dir="${basedir}/js/lib" />
         <echo>Copying Transpiler from ${ROYALE_COMPILER_REPO}</echo>
diff --git a/distribution/src/main/resources/bin/compc b/distribution/src/main/resources/bin/compc
index f3c137c..64d071e 100755
--- a/distribution/src/main/resources/bin/compc
+++ b/distribution/src/main/resources/bin/compc
@@ -68,4 +68,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Droyalelib="$ROYALE_HOME/frameworks" -jar "${ROYALE_COMPILER_HOME}/lib/compiler-compc.jar" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Droyalelib="$ROYALE_HOME/frameworks" -jar "${ROYALE_COMPILER_HOME}/js/lib/compc.jar" --targets=SWF "$@"
diff --git a/distribution/src/main/resources/bin/compc.bat b/distribution/src/main/resources/bin/compc.bat
index a70aa3d..acd4cea 100644
--- a/distribution/src/main/resources/bin/compc.bat
+++ b/distribution/src/main/resources/bin/compc.bat
@@ -28,5 +28,5 @@ if "x%ROYALE_COMPILER_HOME%"=="x"  (set ROYALE_COMPILER_HOME=%~dp0..) else echo
 
 if "x%ROYALE_HOME%"=="x" (set ROYALE_HOME=%~dp0..) else echo Using Royale SDK: %ROYALE_HOME%
 
-@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m  -Droyalelib="%ROYALE_HOME%/frameworks" -jar "%ROYALE_COMPILER_HOME%\lib\compiler-compc.jar" %*
+@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m  -Droyalelib="%ROYALE_HOME%/frameworks" -jar "%ROYALE_COMPILER_HOME%\js\lib\compc.jar" --targets=SWF %*
 
diff --git a/distribution/src/main/resources/bin/mxmlc b/distribution/src/main/resources/bin/mxmlc
index 3ab2ed5..74dabce 100755
--- a/distribution/src/main/resources/bin/mxmlc
+++ b/distribution/src/main/resources/bin/mxmlc
@@ -68,4 +68,4 @@ fi
 
 VMARGS="-Xmx384m -Dsun.io.useCanonCaches=false "
 
-java $VMARGS $D32 $SETUP_SH_VMARGS -Droyalelib="$ROYALE_HOME/frameworks" -jar "${ROYALE_COMPILER_HOME}/lib/compiler-mxmlc.jar" "$@"
+java $VMARGS $D32 $SETUP_SH_VMARGS -Droyalelib="$ROYALE_HOME/frameworks" -jar "${ROYALE_COMPILER_HOME}/js/lib/mxmlc.jar" --targets=SWF "$@"
diff --git a/distribution/src/main/resources/bin/mxmlc.bat b/distribution/src/main/resources/bin/mxmlc.bat
index c5605ed..6092fa1 100644
--- a/distribution/src/main/resources/bin/mxmlc.bat
+++ b/distribution/src/main/resources/bin/mxmlc.bat
@@ -28,6 +28,6 @@ if "x%ROYALE_COMPILER_HOME%"=="x"  (set ROYALE_COMPILER_HOME=%~dp0..) else echo
 
 if "x%ROYALE_HOME%"=="x" (set ROYALE_HOME=%~dp0..) else echo Using Royale SDK: %ROYALE_HOME%
 
-@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m  -Droyalelib="%ROYALE_HOME%\frameworks" -jar "%ROYALE_COMPILER_HOME%\lib\compiler-mxmlc.jar" %*
+@java -Dsun.io.useCanonCaches=false -Xms32m -Xmx512m  -Droyalelib="%ROYALE_HOME%\frameworks" -jar "%ROYALE_COMPILER_HOME%\js\lib\mxmlc.jar" --targets=SWF %*