I've been looking into this issue over the weekend. I have the resources, which 
give us problems in Jewel and TDJ, downloaded locally:

  *   1. https://fonts.googleapis.com/css?family=Lato:400,700
  *   2. 
https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js 
(LICENSE included)
  *   3. 
https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.js
 (LICENSE included)
  *   4. 
https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js
 (LICENSE included)
  *   5. https://fonts.googleapis.com/icon?family=Material+Icons (LICENSE 
included)
  *   6. https://pro.fontawesome.com/releases/v5.13.0/css/all.css (LICENSE 
‘free’ included)

This is the list of files, inside ‘royale-asjs\frameworks\projects’ with the 
tag “<inject_script>”:
- 
royale-asjs\frameworks\projects\Ace\src\main\royale\org\apache\royale\ace\ACEEditor.as
                https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.6/ace.js

- 
royale-asjs\frameworks\projects\Basic\src\main\royale\org\apache\royale\html\util\DialogPolyfill.as
                
https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.js
                
https://cdnjs.cloudflare.com/ajax/libs/dialog-polyfill/0.4.9/dialog-polyfill.min.css

- 
royale-asjs\frameworks\projects\Core\src\main\royale\org\apache\royale\utils\CompressionUtils.as
                https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.3/pako.min.js

- 
royale-asjs\frameworks\projects\CreateJS\src\main\royale\org\apache\royale\createjs\Application.as
                https://code.createjs.com/easeljs-0.8.1.min.js
                https://code.createjs.com/tweenjs-0.6.2.min.js

- 
royale-asjs\frameworks\projects\FontAwesome\src\main\royale\org\apache\royale\fa\FontAwesomeIcon.as
                
http://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css

- 
royale-asjs\frameworks\projects\Icons\src\main\royale\org\apache\royale\icons\FontAwesomeIcon.as
https://pro.fontawesome.com/releases/v5.15.4/css/all.css (It should be changed 
to the free version)

- 
royale-asjs\frameworks\projects\Icons\src\main\royale\org\apache\royale\icons\MaterialIcon.as
https://fonts.googleapis.com/icon?family=Material+Icons

- 
royale-asjs\frameworks\projects\Jewel\src\main\royale\org\apache\royale\jewel\beads\views\TabBarView.as
https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js

- 
royale-asjs\frameworks\projects\JQuery\src\main\royale\org\apache\royale\jquery\Application.as
http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css
http://code.jquery.com/jquery-1.9.1.js
http://code.jquery.com/ui/1.10.2/jquery-ui.js

- 
royale-asjs\frameworks\projects\Mobile\src\main\royale\org\apache\royale\cordova\Application.as
cordova.js (Directly referenced. No download address is specified, but it is 
not downloaded locally either.)

- 
royale-asjs\frameworks\projects\MXRoyale\src\main\royale\mx\controls\TinyEditor.as
                node_modules/tiny-editor/dist/bundle.js (Directly referenced. 
No download address is specified, but it is not downloaded locally either.)
                https://use.fontawesome.com/releases/v5.3.1/css/all.css

- 
royale-asjs\frameworks\projects\MXRoyaleBase\src\main\royale\mx\rpc\remoting\CompressedRemoteObject.as
- 
royale-asjs\frameworks\projects\MXRoyaleBase\src\main\royale\mx\rpc\remoting\mxml\CompressedRemoteObject.as
- 
royale-asjs\frameworks\projects\Network\src\main\royale\org\apache\royale\net\CompressedRemoteObject.as
                https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.6/pako.min.js

I have created a branch in the royale-asjs repository: 
examples/TDJ_localresources with the initial downloads.
According to Josh's instructions we can use the compiler option 
-js-include-script to include the js files in the swc, but how should we 
include the css and source files (*.woff2)?

My first tests were with TDJ but I get license errors ('rat' file). What steps 
should I follow to include them? (I have tried adding the resources in 
Approveroyale.xml but it didn't work. Do I have to compile royale-asjs for it 
to recognize them?)

Any help will be appreciated.

Thx

Hiedra

De: Josh Tynjala <notificati...@github.com>
Enviado el: martes, 4 de marzo de 2025 17:45
Para: apache/royale-asjs <royale-a...@noreply.github.com>
CC: Maria Jose Esteve <mjest...@iest.com>; Comment <comm...@noreply.github.com>
Asunto: Re: [apache/royale-asjs] Apache Royale Tour de Jewel - broken (Issue 
#1252)


As an example, Jewel's TabBarView contains the following <inject_script> that 
links to a JS library on Cloudflare. That's not going to work anymore.

<inject_script>

var script = document.createElement("script");

script.setAttribute("src", 
"https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js";);

document.head.appendChild(script);

</inject_script>

We're going to need to change TabBarView (and any other classes in royale-asjs 
that use <inject_script> to load files from CDNs) to provide that script file 
in a different way.

I recently added a -js-include-script option to royale-compiler. That's 
probably our best bet. It includes the .js file in the .swc file (or in the 
compiled app), and it automatically adds a <script> tag to the .html file.

In Jewel, we might use it like this (assuming that web-animations.min.js is 
added to our repo at that location):

-js-include-script+=src/main/assembly/scripts/web-animations.min.js

That means that we'll need to include web-animations.min.js in the Royale 
distribution. Hopefully, all of the scripts that we're referencing have 
compatible licenses that the ASF accepts.

—
Reply to this email directly, view it on 
GitHub<https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U4PT7OIPW7D5EVNUED2SXJ7DAVCNFSM6AAAAABWNZIIOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJYGI4TQNJXG4>.
You are receiving this because you commented.Message ID: 
<apache/royale-asjs/issues/1252/2698298...@github.com<mailto:apache/royale-asjs/issues/1252/2698298...@github.com>>
[joshtynjala]joshtynjala left a comment 
(apache/royale-asjs#1252)<https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577>

As an example, Jewel's TabBarView contains the following <inject_script> that 
links to a JS library on Cloudflare. That's not going to work anymore.

<inject_script>

var script = document.createElement("script");

script.setAttribute("src", 
"https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.1/web-animations.min.js";);

document.head.appendChild(script);

</inject_script>

We're going to need to change TabBarView (and any other classes in royale-asjs 
that use <inject_script> to load files from CDNs) to provide that script file 
in a different way.

I recently added a -js-include-script option to royale-compiler. That's 
probably our best bet. It includes the .js file in the .swc file (or in the 
compiled app), and it automatically adds a <script> tag to the .html file.

In Jewel, we might use it like this (assuming that web-animations.min.js is 
added to our repo at that location):

-js-include-script+=src/main/assembly/scripts/web-animations.min.js

That means that we'll need to include web-animations.min.js in the Royale 
distribution. Hopefully, all of the scripts that we're referencing have 
compatible licenses that the ASF accepts.

—
Reply to this email directly, view it on 
GitHub<https://github.com/apache/royale-asjs/issues/1252#issuecomment-2698298577>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/ANJL3U4PT7OIPW7D5EVNUED2SXJ7DAVCNFSM6AAAAABWNZIIOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOJYGI4TQNJXG4>.
You are receiving this because you commented.Message ID: 
<apache/royale-asjs/issues/1252/2698298...@github.com<mailto:apache/royale-asjs/issues/1252/2698298...@github.com>>

Reply via email to