You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Hugo Ferreira <hf...@gmail.com> on 2022/05/21 22:10:04 UTC

Strange issue building a library with target only JSRoyale

Hi,

I found a strange issue trying to build a library: SWC-JS.

If I clean the bin folder, I can't build again.
But if I copy a very small SWC (builded with with a very small project that
targets to SWF + JSRoyale) to the bin folder, I can build the first time
and on the second time is create a .swc.new with ZIPException error.

This is my asconfig.json:
{
"config": "royale",
"type": "lib",
"compilerOptions": {
"source-map": true,
"targets": [
"JSRoyale"
],
"source-path": [
"src"
],
"include-sources": [
"src"
],
"include-namespaces": [
"library://ns.apache.org/royale/community"
],
"output": "bin/RoyaleFramework.swc",
"library-path": [
"${royalelib}/libs"
],
"js-library-path": [
"${royalelib}/js/libs"
]
}
}

Workaround:
Copy a swc to the bin folder to fill with the compiled content.
Works only for the first time.

Desired:
Compile even with the bin folder empty and with targets only for JSRoyale.

Re: Strange issue building a library with target only JSRoyale

Posted by Hugo Ferreira <hf...@gmail.com>.
Yes, but if I do that, there is other issues mention before (ex:
incompatibilities with main project that is JSRoyale only and reference the
library source).
I end up creating a very small SWC (using target SWF) as a template, copy
to the bin folder and sucessfull build with only JSRoayle.
I have to first copy to SWC to the bin folder before build.
Because this is a framework library, fortunately I don't need to build so
often.

Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia segunda,
23/05/2022 à(s) 15:08:

> You must include the SWF target before JSRoyale if you want the compiler to
> create a .swc file.
>
> "targets": [
> "SWF",
> "JSRoyale"
> ]
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Sat, May 21, 2022 at 3:09 PM Hugo Ferreira <hf...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I found a strange issue trying to build a library: SWC-JS.
> >
> > If I clean the bin folder, I can't build again.
> > But if I copy a very small SWC (builded with with a very small project
> that
> > targets to SWF + JSRoyale) to the bin folder, I can build the first time
> > and on the second time is create a .swc.new with ZIPException error.
> >
> > This is my asconfig.json:
> > {
> > "config": "royale",
> > "type": "lib",
> > "compilerOptions": {
> > "source-map": true,
> > "targets": [
> > "JSRoyale"
> > ],
> > "source-path": [
> > "src"
> > ],
> > "include-sources": [
> > "src"
> > ],
> > "include-namespaces": [
> > "library://ns.apache.org/royale/community"
> > ],
> > "output": "bin/RoyaleFramework.swc",
> > "library-path": [
> > "${royalelib}/libs"
> > ],
> > "js-library-path": [
> > "${royalelib}/js/libs"
> > ]
> > }
> > }
> >
> > Workaround:
> > Copy a swc to the bin folder to fill with the compiled content.
> > Works only for the first time.
> >
> > Desired:
> > Compile even with the bin folder empty and with targets only for
> JSRoyale.
> >
>

Re: Strange issue building a library with target only JSRoyale

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
You must include the SWF target before JSRoyale if you want the compiler to
create a .swc file.

"targets": [
"SWF",
"JSRoyale"
]

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Sat, May 21, 2022 at 3:09 PM Hugo Ferreira <hf...@gmail.com>
wrote:

> Hi,
>
> I found a strange issue trying to build a library: SWC-JS.
>
> If I clean the bin folder, I can't build again.
> But if I copy a very small SWC (builded with with a very small project that
> targets to SWF + JSRoyale) to the bin folder, I can build the first time
> and on the second time is create a .swc.new with ZIPException error.
>
> This is my asconfig.json:
> {
> "config": "royale",
> "type": "lib",
> "compilerOptions": {
> "source-map": true,
> "targets": [
> "JSRoyale"
> ],
> "source-path": [
> "src"
> ],
> "include-sources": [
> "src"
> ],
> "include-namespaces": [
> "library://ns.apache.org/royale/community"
> ],
> "output": "bin/RoyaleFramework.swc",
> "library-path": [
> "${royalelib}/libs"
> ],
> "js-library-path": [
> "${royalelib}/js/libs"
> ]
> }
> }
>
> Workaround:
> Copy a swc to the bin folder to fill with the compiled content.
> Works only for the first time.
>
> Desired:
> Compile even with the bin folder empty and with targets only for JSRoyale.
>