You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/03/14 16:32:50 UTC

[royale-compiler] branch develop updated (0a80d3f -> 6770853)

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

aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.


    from 0a80d3f  use string if CSS function is not known and this is a royale project.  Fixes #26
     new 5a1a2b9  need to use uint for rgba
     new 6770853  add theme swcs to definition set so ClassReferences to themes will work. Helps fix apache/royale-asjs#127

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../internal/codegen/mxml/royale/MXMLRoyalePublisher.java      |  9 +++++++--
 .../royale/compiler/internal/css/codegen/CSSReducer.java       |  2 +-
 .../compiler/internal/projects/RoyaleProjectConfigurator.java  | 10 ++++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

[royale-compiler] 01/02: need to use uint for rgba

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 5a1a2b9aaaed6d2c5b6dacd0ee8e588aea9e68d7
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Mar 13 23:49:36 2018 -0700

    need to use uint for rgba
---
 .../org/apache/royale/compiler/internal/css/codegen/CSSReducer.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/css/codegen/CSSReducer.java b/compiler/src/main/java/org/apache/royale/compiler/internal/css/codegen/CSSReducer.java
index 171f1c9..4f26684 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/css/codegen/CSSReducer.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/css/codegen/CSSReducer.java
@@ -462,7 +462,7 @@ public class CSSReducer implements ICSSCodeGenResult
         }
         else if (value instanceof CSSRgbaColorPropertyValue)
         {
-            valueInstructions.addInstruction(ABCConstants.OP_pushint, new Long(((CSSRgbaColorPropertyValue)value).getColorAsLong()));
+            valueInstructions.addInstruction(ABCConstants.OP_pushuint, new Long(((CSSRgbaColorPropertyValue)value).getColorAsLong()));
         }
         else if (value instanceof CSSKeywordPropertyValue)
         {

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.

[royale-compiler] 02/02: add theme swcs to definition set so ClassReferences to themes will work. Helps fix apache/royale-asjs#127

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 67708534f9e841b61b0bde715bc7e4b446d20d87
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Mar 14 09:32:34 2018 -0700

    add theme swcs to definition set so ClassReferences to themes will work. Helps fix apache/royale-asjs#127
---
 .../internal/codegen/mxml/royale/MXMLRoyalePublisher.java      |  9 +++++++--
 .../compiler/internal/projects/RoyaleProjectConfigurator.java  | 10 ++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
index 7b75e49..1c3e943 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/mxml/royale/MXMLRoyalePublisher.java
@@ -192,6 +192,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         // Iterate over all themes SWCs and add the contents of any included files in
         // an assets folder to an assets folder in the destination folder.
         final ISWCManager swcManager = project.getWorkspace().getSWCManager();
+        List<ISWC> themeSWCs = new ArrayList<ISWC>();
         List<IFileSpecification> themes = project.getThemeFiles();
         for (final IFileSpecification themeFile : themes)
         {
@@ -199,6 +200,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
             if ("swc".equalsIgnoreCase(extension))
             {
                 final ISWC swc = swcManager.get(new File(themeFile.getPath()));
+                themeSWCs.add(swc);
 	            Map<String, ISWCFileEntry> files = swc.getFiles();
 	            for (String key : files.keySet())
 	            {
@@ -312,7 +314,10 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         // Iterate over all swc dependencies and add all the externs they contain.
         // (Externs are located in a "externs" directory in the root of the SWC)
         List<ISWC> swcs = project.getLibraries();
-        for (ISWC swc : swcs)
+        List<ISWC> allswcs = new ArrayList<ISWC>();
+        allswcs.addAll(swcs);
+        allswcs.addAll(themeSWCs);
+        for (ISWC swc : allswcs)
         {
             Map<String, ISWCFileEntry> files = swc.getFiles();
             for (String key : files.keySet())
@@ -342,7 +347,7 @@ public class MXMLRoyalePublisher extends JSGoogPublisher implements IJSPublisher
         // Add all files generated by the compiler to the compilation unit.
         /////////////////////////////////////////////////////////////////////////////////
 
-        GoogDepsWriter gdw = getGoogDepsWriter(intermediateDir, projectName, googConfiguration, swcs);
+        GoogDepsWriter gdw = getGoogDepsWriter(intermediateDir, projectName, googConfiguration, allswcs);
         // This list contains all files generated by the compiler, this is both the
         // compiled js files created by the sources of the current project plus the
         // js files of used dependencies.
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java
index d8ec777..31295fd 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProjectConfigurator.java
@@ -398,6 +398,16 @@ public class RoyaleProjectConfigurator extends Configurator
         
         // add Library Path
         libraries.addAll(toFileList(project.getCompilerLibraryPath(configuration)));
+
+        List<String> themes = configuration.getCompilerThemeFiles();
+        for (String theme : themes)
+        {
+        	if (theme.endsWith(".swc"))
+        	{
+        		File f = new File(theme);
+        		libraries.add(f);
+        	}
+        }
         
         project.setLibraries(new ArrayList<File>(libraries));
         

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.