I just looked in my working copy and the default royale-config.xml looks like it uses -js-library-path. I don’t remember if the build scripts tweak that or not for a js-only package, so look in the royale-config you have and verify if that's true. I guess we must have made that change to make it easier for JS-only projects to access browser APIs. I thought we were still gambling that folks were not using platform-specific APIs, but I guess that's no longer true.
So if your royale-config is using -js-library-path, then yes, you just specify custom SWCs using -js-library-path. HTH, -Alex On 9/11/18, 10:02 AM, "Piotr Zarzycki" <[email protected]> wrote: Alex, In the other words I don't have any other option than put my JS only library to js-library-path if I ever wanted to build my application to JS only. Unless there is really a bug, because why following things are not working. -targets=JSRoyale -source-path+=src -library-path+=lib/RoyaleLibTestJS.swc Having above parameters setup like that should we be able to build our application or not ? IF YES it should work - We definitely have a Bug here. Thanks, Piotr wt., 11 wrz 2018 o 18:49 Alex Harui <[email protected]> napisał(a): > It sounds like I have still not clearly explained how > library-path/swf-library-path/js-library-path work. > > Library-path is for SWCs that "might" work for both SWF and JS. When we > compile most Royale SWCs, we build the library.swf with COMPILE::SWF=true > and then compile JS files with COMPILE::SWF=false. The gamble is that > folks will not use platform-specific APIs (like Flash classes or the > Browser's HTMLElement. The default configuration for Royale is to put the > SWCs in frameworks/projects on the library-path. > > The swf-library-path and js-library-path options are for specifying SWCs > that have APIs for that specific platform. BUT (this is the key point), as > soon as you specify even one SWC with js-library-path, the compiler will no > longer us just plain -library-path in determining the list of SWCs. If one > SWC was specified with -js-library-path, then ALL swcs for the JS compile > must be specified using js-library-path. > > So, if you used -js-library-path to specify your custom SWC, then you > should get the error about not finding Application since it was specified > with just plain "library-path" in royale-config.xml. You might have to > specify -js-library-path=<royale-asjs folder>/frameworks/js/libs" as well > to get all of the other Royale SWCs. > > Anyone who can explain it better, please do so. > > HTH, > -Alex > > On 9/11/18, 9:28 AM, "Piotr Zarzycki" <[email protected]> wrote: > > I just checked and here is the results. > > JS version of library: > If I'm using js-external-library-path or js-library-path - SWC is being > recognized and I'm able to build using it my project to JS (JSRoyale) > If I'm using -library-path or external-library-path - It's failing with > errors described in first email. > > SWF version of library: > If I'm using -swf-library-path - I'm getting following error [1], > however > if I use -swf-external-library-path - project is able to produce > correct > swf. Maybe we have a bug in case of -swf-library-path. > If I'm using -library-path and external-library-path I'm able to > produce > correct swf. > > It looks like I know how to implement all of that in Moonshine now. > Very > useful information. I'm wondering whether we shouldn't think that is > all > bugs in case of -library-path and swf-library-path. > > Many Thanks for help Alex. > > [1] > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2F13Sq&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=Z3MfV3twGC%2F1BdfRMHBKIL4fcvh3ZSBMg7YRm2htQbw%3D&reserved=0 > > wt., 11 wrz 2018 o 18:09 Piotr Zarzycki <[email protected]> > napisał(a): > > > Alex, > > > > It looks like library.swf contains in both cases required > information and > > files. I have in this library two files. > > > > 1) MyClass -> Contains import of all classes > > 2) MyViewClass - contains function in blocs COMPILE::SWF and > COMPILE::JS > > > > JS library dump: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FdLA2&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=mAINfsmspL4wKRJx7WctjMMZnvE0RaR%2BB02FhDdO8po%3D&reserved=0 > > SWF library dump: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fo1rW&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=dIETWTqKTgofF8Na7SdJDgHOq%2B%2B3SyrmyJL4aUJ3N9s%3D&reserved=0 > > > > Next step is to try using -js-library-path etc to check whether it > makes > > any difference. > > > > Thanks, > > Piotr > > > > > > wt., 11 wrz 2018 o 18:00 Piotr Zarzycki <[email protected]> > > napisał(a): > > > >> Yes I did it. Both looks almost the same. > >> > >> JS -> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FXhLi&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=jNRaFAEAJ%2Br2%2FS%2FaCeEnvytMqXVyueNSsPt%2B38gmBx8%3D&reserved=0 > >> SWF -> > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2FMwKB&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=FmHPVQFBwmKIYt3smkKJlMPJpo6B8r4%2FafMibqEUotY%3D&reserved=0 > >> > >> I will provide in couple of minutes SWF dump. > >> > >> Thanks, > >> Piotr > >> > >> wt., 11 wrz 2018 o 17:52 Alex Harui <[email protected]> > >> napisał(a): > >> > >>> Royale SWCs should always have a folder of JS files unless they > are SWF > >>> only. > >>> > >>> Before you dump the library.swf, did you look in the catalog.xml? > It is > >>> easier to see what it thinks is in the SWC. It could be that the > manifest > >>> or other list of classes is not specified in the JS compile. > >>> > >>> HTH, > >>> -Alex > >>> > >>> On 9/11/18, 8:49 AM, "piotrz" <[email protected]> wrote: > >>> > >>> Hi Alex, > >>> > >>> The first part of your answer is behind me. I have checked > what is > >>> inside > >>> both swcs. On the left sight of the screenshot is JS version. > >>> > >>> < > >>> > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2Ffile%2Ft1%2Fjs_swf.png&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=u5i7SWaSbZIgrnBOYcIk7VeNCQ4zLDP4G89Ssiin7qw%3D&reserved=0 > > > >>> > >>> > >>> Interesting thing is that in both cases I have folder with JS > files. > >>> > >>> I have definitely my swcs in library-path, because SWF version > is > >>> working > >>> fine. > >>> > >>> I will try to examine library.swf and get back to you. > >>> > >>> Thanks, > >>> Piotr > >>> > >>> > >>> > >>> -- > >>> Sent from: > >>> > https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapache-royale-development.20373.n8.nabble.com%2F&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=EnVRE97DEShVsUeslIaVU37rQ9tzNJs7uSZ1f8vnE70%3D&reserved=0 > >>> > >>> > >>> > >> > >> -- > >> > >> Piotr Zarzycki > >> > >> Patreon: * > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688617676&sdata=Fq9UTq%2F4sYZ9z9PrHDT%2Ber2F5kjn9S3W2R0mhnlBzxE%3D&reserved=0 > >> < > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0 > >* > >> > > > > > > -- > > > > Piotr Zarzycki > > > > Patreon: * > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0 > > < > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0 > >* > > > > > -- > > Piotr Zarzycki > > Patreon: * > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0 > < > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0 > >* > > > -- Piotr Zarzycki Patreon: *https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0 <https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.patreon.com%2Fpiotrzarzycki&data=02%7C01%7Caharui%40adobe.com%7Cb5046911633b469f392908d618086565%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636722821688627685&sdata=VRrjIQlJFYD8t85KqFOgL5VWV8j7YBxaZM48q76amSo%3D&reserved=0>*
