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/20 09:05:43 UTC
VS Code to build a library SWC-JS
Hi,
I'm usin VS Code to build Royale with a mxml starting point on
asconfi.json, template, etc, etc ....
But, how to use VS Code (in therms of the full asconfig.json) to build a
library: SWC-JS ?
Has anyone used it for this purpose?
Re: VS Code to build a library SWC-JS
Posted by Alex Harui <ah...@adobe.com.INVALID>.
Apologies if this was already mentioned, but it appears that frameworks/projects/Ace produces a JS-only SWC. I don't know if its VSCode config works or not, but might be a useful data point.
-Alex
On 5/23/22, 3:18 PM, "Josh Tynjala" <jo...@bowlerhat.dev> wrote:
Okay, I think I got the Spectrum library building a JS-only .swc file with
a few minor tweaks.
In asconfig.json, external-library-path should be changed so that it is the
same as js-external-library-path. By default,
library-path/external-library-path in royale-config.xml uses the SWF
framework, so if you want a JS-only .swc file, you need to specifically
tell it to use the JS framework.
"external-library-path": [
"${royalelib}/libs",
"${royalelib}/../js/libs",
"libs"
],
"js-external-library-path": [
"${royalelib}/../js/libs",
"${royalelib}/js/libs",
"libs"
],
In compile-config.xml, there are two tweaks.
First, you should remove playerglobal.swc because you are targeting JS only.
<!-- <external-library-path>
<path-element>playerglobal.swc</path-element>
</external-library-path> -->
Second, you need to ensure that the correct values for the COMPILE::SWF and
COMPILE::JS defines are being used. By default, define for these values
uses AUTO, so the compiler would set COMPILE::SWF to true and COMPILE::JS
to false when creating the .swc file. Since you want a JS-only .swc file,
you need to specifically tell it to set COMPILE::SWF to false and
COMPILE::JS to true.
<define>
<name>COMPILE::SWF</name>
<value>false</value>
</define>
<define>
<name>COMPILE::JS</name>
<value>true</value>
</define>
That should do it. I tested with SpectrumBrowser, and the compiler seemed
happy using the new .swc file. The app ran, and I didn't notice anything
obviously out of place.
--
Josh Tynjala
Bowler Hat LLC <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbowlerhat.dev%2F&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q5%2BRSVcLCjWWm7OIQYwtWrScyCVuTKta1wsXCEgHBD0%3D&reserved=0>
On Mon, May 23, 2022 at 8:19 AM Harbs <ha...@gmail.com> wrote:
> That causes an error in the SWF part of the build.
>
> If you have a suggestion on how to fix the asconfigc file, I’m all ears. I
> tried using load-config and js-load-config like it’s done in ant, but that
> doesn’t seem to work for some reason.
>
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fblob%2Fmaster%2FSpectrum%2Fasconfig.json%23L23&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HmU49bT%2Fhe5kEsAIhDhZRYoRP3X4yhJH8dCslzKN8xo%3D&reserved=0
>
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fblob%2Fmaster%2FSpectrum%2Fasconfig.json%23L26&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tbX8GOPMWrh51fa60GAVA%2FFJksj04i3KjrFdJIi07WE%3D&reserved=0
>
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fblob%2Fmaster%2FSpectrum%2Fcompile-config.xml%23L17&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OyO9eMIbmVNNppJH1PhRktWOoIxcRl%2BquqrvJ49RXAA%3D&reserved=0
>
>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fblob%2Fmaster%2FSpectrum%2Fjs-compile-config.xml%23L17&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=FZhBX2Xv%2FDhgHkZxHLNCF4jAmrI9H4opvJPtxkjCRRc%3D&reserved=0
>
> > On May 23, 2022, at 5:15 PM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >
> > You can set COMPILE::JS to true and COMPILE::SWF to false manually in
> your
> > library's asconfig.json using the define compiler option. That will
> > override the default AUTO value from royale-config.xml.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbowlerhat.dev%2F&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q5%2BRSVcLCjWWm7OIQYwtWrScyCVuTKta1wsXCEgHBD0%3D&reserved=0>
> >
> >
> > On Mon, May 23, 2022 at 4:41 AM Harbs <ha...@gmail.com> wrote:
> >
> >> That will allow it to compile, but no code in a COMPILE::JS block will
> >> actually make it into the swc.
> >>
> >> Are you sure you’re getting COMPILE::JS code?
> >>
> >>> On May 22, 2022, at 7:11 PM, Hugo Ferreira <hf...@gmail.com>
> >> wrote:
> >>>
> >>> Thank you.
> >>>
> >>> As know the reason, as a workaround I solved this issue by adding SWF
> as
> >>> target and put COMPILE::JS everywhere where I found and error because
> was
> >>> JS code.
> >>> Now I can always compile in VS Code the library.
> >>>
> >>> Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
> >>> 09:14:
> >>>
> >>>> Issue in Spectrum with details:
> >>>>
> >>>> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fissues%2F74&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=siM%2FGaHJGhtsmkcoI7OGl%2FoCEz6u7u4lx%2B%2F3298EeMw%3D&reserved=0
> >>>>
> >>>>> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
> >>>>>
> >>>>> The problem with this setup is that COMPILE::JS blocks do not make it
> >>>> into the JS code in the swc.
> >>>>>
> >>>>> I’ve had trouble getting the scw built with COMPILE::JS block intact.
> >>>>>
> >>>>> This works in ant to build a valid swc:
> >>>>>
> >>>>
> >>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fblob%2Fmaster%2FSpectrum%2Fbuild.xml&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=GyJCXicmuGzo5E8orItZbfoN04nTOAL6TvpgbSLrJkg%3D&reserved=0
> >>>>>
> >>>>> But this does not work in asconfgic:
> >>>>>
> >>>>
> >>
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Funhurdle%2Fspectrum-royale%2Fblob%2Fmaster%2FSpectrum%2Fasconfig.json&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eWknXNHbiT5cfJ%2BBS%2Fq5H9MGbbD8e1A3065j2QavUZU%3D&reserved=0
> >>>>>
> >>>>> I have not yet figured out the correct asconfigc settings to make
> this
> >>>> work.
> >>>>>
> >>>>>> On May 20, 2022, at 7:46 PM, Josh Tynjala <
> joshtynjala@bowlerhat.dev>
> >>>> wrote:
> >>>>>>
> >>>>>> Here's a basic example asconfig.json for a JS SWC library that I
> found
> >>>> in
> >>>>>> one of my old projects:
> >>>>>>
> >>>>>> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpaste.apache.org%2Fc0rsu&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=iGT0E4Z%2Fd1OwRNAg3IRaHuFcyEr8FvGu2vFwppoA0Js%3D&reserved=0
> >>>>>>
> >>>>>> --
> >>>>>> Josh Tynjala
> >>>>>> Bowler Hat LLC <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbowlerhat.dev%2F&data=05%7C01%7Caharui%40adobe.com%7Ca7aff65ec40d4f5dc73708da3d0a2cbf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637889411156927541%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q5%2BRSVcLCjWWm7OIQYwtWrScyCVuTKta1wsXCEgHBD0%3D&reserved=0>
> >>>>>>
> >>>>>>
> >>>>>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <
> hferreira.80@gmail.com
> >>>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> I'm usin VS Code to build Royale with a mxml starting point on
> >>>>>>> asconfi.json, template, etc, etc ....
> >>>>>>> But, how to use VS Code (in therms of the full asconfig.json) to
> >> build
> >>>> a
> >>>>>>> library: SWC-JS ?
> >>>>>>> Has anyone used it for this purpose?
> >>>>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >>
>
>
Re: VS Code to build a library SWC-JS
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Okay, I think I got the Spectrum library building a JS-only .swc file with
a few minor tweaks.
In asconfig.json, external-library-path should be changed so that it is the
same as js-external-library-path. By default,
library-path/external-library-path in royale-config.xml uses the SWF
framework, so if you want a JS-only .swc file, you need to specifically
tell it to use the JS framework.
"external-library-path": [
"${royalelib}/libs",
"${royalelib}/../js/libs",
"libs"
],
"js-external-library-path": [
"${royalelib}/../js/libs",
"${royalelib}/js/libs",
"libs"
],
In compile-config.xml, there are two tweaks.
First, you should remove playerglobal.swc because you are targeting JS only.
<!-- <external-library-path>
<path-element>playerglobal.swc</path-element>
</external-library-path> -->
Second, you need to ensure that the correct values for the COMPILE::SWF and
COMPILE::JS defines are being used. By default, define for these values
uses AUTO, so the compiler would set COMPILE::SWF to true and COMPILE::JS
to false when creating the .swc file. Since you want a JS-only .swc file,
you need to specifically tell it to set COMPILE::SWF to false and
COMPILE::JS to true.
<define>
<name>COMPILE::SWF</name>
<value>false</value>
</define>
<define>
<name>COMPILE::JS</name>
<value>true</value>
</define>
That should do it. I tested with SpectrumBrowser, and the compiler seemed
happy using the new .swc file. The app ran, and I didn't notice anything
obviously out of place.
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Mon, May 23, 2022 at 8:19 AM Harbs <ha...@gmail.com> wrote:
> That causes an error in the SWF part of the build.
>
> If you have a suggestion on how to fix the asconfigc file, I’m all ears. I
> tried using load-config and js-load-config like it’s done in ant, but that
> doesn’t seem to work for some reason.
>
>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json#L23
>
>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json#L26
>
>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/compile-config.xml#L17
>
>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/js-compile-config.xml#L17
>
> > On May 23, 2022, at 5:15 PM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >
> > You can set COMPILE::JS to true and COMPILE::SWF to false manually in
> your
> > library's asconfig.json using the define compiler option. That will
> > override the default AUTO value from royale-config.xml.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
> >
> > On Mon, May 23, 2022 at 4:41 AM Harbs <ha...@gmail.com> wrote:
> >
> >> That will allow it to compile, but no code in a COMPILE::JS block will
> >> actually make it into the swc.
> >>
> >> Are you sure you’re getting COMPILE::JS code?
> >>
> >>> On May 22, 2022, at 7:11 PM, Hugo Ferreira <hf...@gmail.com>
> >> wrote:
> >>>
> >>> Thank you.
> >>>
> >>> As know the reason, as a workaround I solved this issue by adding SWF
> as
> >>> target and put COMPILE::JS everywhere where I found and error because
> was
> >>> JS code.
> >>> Now I can always compile in VS Code the library.
> >>>
> >>> Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
> >>> 09:14:
> >>>
> >>>> Issue in Spectrum with details:
> >>>>
> >>>> https://github.com/unhurdle/spectrum-royale/issues/74
> >>>>
> >>>>> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
> >>>>>
> >>>>> The problem with this setup is that COMPILE::JS blocks do not make it
> >>>> into the JS code in the swc.
> >>>>>
> >>>>> I’ve had trouble getting the scw built with COMPILE::JS block intact.
> >>>>>
> >>>>> This works in ant to build a valid swc:
> >>>>>
> >>>>
> >>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
> >>>>>
> >>>>> But this does not work in asconfgic:
> >>>>>
> >>>>
> >>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
> >>>>>
> >>>>> I have not yet figured out the correct asconfigc settings to make
> this
> >>>> work.
> >>>>>
> >>>>>> On May 20, 2022, at 7:46 PM, Josh Tynjala <
> joshtynjala@bowlerhat.dev>
> >>>> wrote:
> >>>>>>
> >>>>>> Here's a basic example asconfig.json for a JS SWC library that I
> found
> >>>> in
> >>>>>> one of my old projects:
> >>>>>>
> >>>>>> https://paste.apache.org/c0rsu
> >>>>>>
> >>>>>> --
> >>>>>> Josh Tynjala
> >>>>>> Bowler Hat LLC <https://bowlerhat.dev>
> >>>>>>
> >>>>>>
> >>>>>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <
> hferreira.80@gmail.com
> >>>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> I'm usin VS Code to build Royale with a mxml starting point on
> >>>>>>> asconfi.json, template, etc, etc ....
> >>>>>>> But, how to use VS Code (in therms of the full asconfig.json) to
> >> build
> >>>> a
> >>>>>>> library: SWC-JS ?
> >>>>>>> Has anyone used it for this purpose?
> >>>>>>>
> >>>>>
> >>>>
> >>>>
> >>
> >>
>
>
Re: VS Code to build a library SWC-JS
Posted by Harbs <ha...@gmail.com>.
That causes an error in the SWF part of the build.
If you have a suggestion on how to fix the asconfigc file, I’m all ears. I tried using load-config and js-load-config like it’s done in ant, but that doesn’t seem to work for some reason.
https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json#L23
https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json#L26
https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/compile-config.xml#L17
https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/js-compile-config.xml#L17
> On May 23, 2022, at 5:15 PM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
>
> You can set COMPILE::JS to true and COMPILE::SWF to false manually in your
> library's asconfig.json using the define compiler option. That will
> override the default AUTO value from royale-config.xml.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Mon, May 23, 2022 at 4:41 AM Harbs <ha...@gmail.com> wrote:
>
>> That will allow it to compile, but no code in a COMPILE::JS block will
>> actually make it into the swc.
>>
>> Are you sure you’re getting COMPILE::JS code?
>>
>>> On May 22, 2022, at 7:11 PM, Hugo Ferreira <hf...@gmail.com>
>> wrote:
>>>
>>> Thank you.
>>>
>>> As know the reason, as a workaround I solved this issue by adding SWF as
>>> target and put COMPILE::JS everywhere where I found and error because was
>>> JS code.
>>> Now I can always compile in VS Code the library.
>>>
>>> Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
>>> 09:14:
>>>
>>>> Issue in Spectrum with details:
>>>>
>>>> https://github.com/unhurdle/spectrum-royale/issues/74
>>>>
>>>>> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
>>>>>
>>>>> The problem with this setup is that COMPILE::JS blocks do not make it
>>>> into the JS code in the swc.
>>>>>
>>>>> I’ve had trouble getting the scw built with COMPILE::JS block intact.
>>>>>
>>>>> This works in ant to build a valid swc:
>>>>>
>>>>
>> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
>>>>>
>>>>> But this does not work in asconfgic:
>>>>>
>>>>
>> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
>>>>>
>>>>> I have not yet figured out the correct asconfigc settings to make this
>>>> work.
>>>>>
>>>>>> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev>
>>>> wrote:
>>>>>>
>>>>>> Here's a basic example asconfig.json for a JS SWC library that I found
>>>> in
>>>>>> one of my old projects:
>>>>>>
>>>>>> https://paste.apache.org/c0rsu
>>>>>>
>>>>>> --
>>>>>> Josh Tynjala
>>>>>> Bowler Hat LLC <https://bowlerhat.dev>
>>>>>>
>>>>>>
>>>>>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hferreira.80@gmail.com
>>>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'm usin VS Code to build Royale with a mxml starting point on
>>>>>>> asconfi.json, template, etc, etc ....
>>>>>>> But, how to use VS Code (in therms of the full asconfig.json) to
>> build
>>>> a
>>>>>>> library: SWC-JS ?
>>>>>>> Has anyone used it for this purpose?
>>>>>>>
>>>>>
>>>>
>>>>
>>
>>
Re: VS Code to build a library SWC-JS
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
You can set COMPILE::JS to true and COMPILE::SWF to false manually in your
library's asconfig.json using the define compiler option. That will
override the default AUTO value from royale-config.xml.
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Mon, May 23, 2022 at 4:41 AM Harbs <ha...@gmail.com> wrote:
> That will allow it to compile, but no code in a COMPILE::JS block will
> actually make it into the swc.
>
> Are you sure you’re getting COMPILE::JS code?
>
> > On May 22, 2022, at 7:11 PM, Hugo Ferreira <hf...@gmail.com>
> wrote:
> >
> > Thank you.
> >
> > As know the reason, as a workaround I solved this issue by adding SWF as
> > target and put COMPILE::JS everywhere where I found and error because was
> > JS code.
> > Now I can always compile in VS Code the library.
> >
> > Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
> > 09:14:
> >
> >> Issue in Spectrum with details:
> >>
> >> https://github.com/unhurdle/spectrum-royale/issues/74
> >>
> >>> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
> >>>
> >>> The problem with this setup is that COMPILE::JS blocks do not make it
> >> into the JS code in the swc.
> >>>
> >>> I’ve had trouble getting the scw built with COMPILE::JS block intact.
> >>>
> >>> This works in ant to build a valid swc:
> >>>
> >>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
> >>>
> >>> But this does not work in asconfgic:
> >>>
> >>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
> >>>
> >>> I have not yet figured out the correct asconfigc settings to make this
> >> work.
> >>>
> >>>> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev>
> >> wrote:
> >>>>
> >>>> Here's a basic example asconfig.json for a JS SWC library that I found
> >> in
> >>>> one of my old projects:
> >>>>
> >>>> https://paste.apache.org/c0rsu
> >>>>
> >>>> --
> >>>> Josh Tynjala
> >>>> Bowler Hat LLC <https://bowlerhat.dev>
> >>>>
> >>>>
> >>>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hferreira.80@gmail.com
> >
> >>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I'm usin VS Code to build Royale with a mxml starting point on
> >>>>> asconfi.json, template, etc, etc ....
> >>>>> But, how to use VS Code (in therms of the full asconfig.json) to
> build
> >> a
> >>>>> library: SWC-JS ?
> >>>>> Has anyone used it for this purpose?
> >>>>>
> >>>
> >>
> >>
>
>
Re: VS Code to build a library SWC-JS
Posted by Hugo Ferreira <hf...@gmail.com>.
Seems to work but then (after the e-mail), I faced a new problem.
The main application (that's JSRoyale only) shows errors but compile.
So, I decided to go back to the library and compile with JS only.
I have a generated SWC empty that I copy to the bin folder before build
with VS Code.
I know that's a rudimentar procedure but works and in a fear future I will
don't need to compile the library so often.
Harbs <ha...@gmail.com> escreveu no dia segunda, 23/05/2022 à(s)
12:41:
> That will allow it to compile, but no code in a COMPILE::JS block will
> actually make it into the swc.
>
> Are you sure you’re getting COMPILE::JS code?
>
> > On May 22, 2022, at 7:11 PM, Hugo Ferreira <hf...@gmail.com>
> wrote:
> >
> > Thank you.
> >
> > As know the reason, as a workaround I solved this issue by adding SWF as
> > target and put COMPILE::JS everywhere where I found and error because was
> > JS code.
> > Now I can always compile in VS Code the library.
> >
> > Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
> > 09:14:
> >
> >> Issue in Spectrum with details:
> >>
> >> https://github.com/unhurdle/spectrum-royale/issues/74
> >>
> >>> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
> >>>
> >>> The problem with this setup is that COMPILE::JS blocks do not make it
> >> into the JS code in the swc.
> >>>
> >>> I’ve had trouble getting the scw built with COMPILE::JS block intact.
> >>>
> >>> This works in ant to build a valid swc:
> >>>
> >>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
> >>>
> >>> But this does not work in asconfgic:
> >>>
> >>
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
> >>>
> >>> I have not yet figured out the correct asconfigc settings to make this
> >> work.
> >>>
> >>>> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev>
> >> wrote:
> >>>>
> >>>> Here's a basic example asconfig.json for a JS SWC library that I found
> >> in
> >>>> one of my old projects:
> >>>>
> >>>> https://paste.apache.org/c0rsu
> >>>>
> >>>> --
> >>>> Josh Tynjala
> >>>> Bowler Hat LLC <https://bowlerhat.dev>
> >>>>
> >>>>
> >>>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hferreira.80@gmail.com
> >
> >>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I'm usin VS Code to build Royale with a mxml starting point on
> >>>>> asconfi.json, template, etc, etc ....
> >>>>> But, how to use VS Code (in therms of the full asconfig.json) to
> build
> >> a
> >>>>> library: SWC-JS ?
> >>>>> Has anyone used it for this purpose?
> >>>>>
> >>>
> >>
> >>
>
>
Re: VS Code to build a library SWC-JS
Posted by Harbs <ha...@gmail.com>.
That will allow it to compile, but no code in a COMPILE::JS block will actually make it into the swc.
Are you sure you’re getting COMPILE::JS code?
> On May 22, 2022, at 7:11 PM, Hugo Ferreira <hf...@gmail.com> wrote:
>
> Thank you.
>
> As know the reason, as a workaround I solved this issue by adding SWF as
> target and put COMPILE::JS everywhere where I found and error because was
> JS code.
> Now I can always compile in VS Code the library.
>
> Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
> 09:14:
>
>> Issue in Spectrum with details:
>>
>> https://github.com/unhurdle/spectrum-royale/issues/74
>>
>>> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
>>>
>>> The problem with this setup is that COMPILE::JS blocks do not make it
>> into the JS code in the swc.
>>>
>>> I’ve had trouble getting the scw built with COMPILE::JS block intact.
>>>
>>> This works in ant to build a valid swc:
>>>
>> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
>>>
>>> But this does not work in asconfgic:
>>>
>> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
>>>
>>> I have not yet figured out the correct asconfigc settings to make this
>> work.
>>>
>>>> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev>
>> wrote:
>>>>
>>>> Here's a basic example asconfig.json for a JS SWC library that I found
>> in
>>>> one of my old projects:
>>>>
>>>> https://paste.apache.org/c0rsu
>>>>
>>>> --
>>>> Josh Tynjala
>>>> Bowler Hat LLC <https://bowlerhat.dev>
>>>>
>>>>
>>>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm usin VS Code to build Royale with a mxml starting point on
>>>>> asconfi.json, template, etc, etc ....
>>>>> But, how to use VS Code (in therms of the full asconfig.json) to build
>> a
>>>>> library: SWC-JS ?
>>>>> Has anyone used it for this purpose?
>>>>>
>>>
>>
>>
Re: VS Code to build a library SWC-JS
Posted by Hugo Ferreira <hf...@gmail.com>.
Thank you.
As know the reason, as a workaround I solved this issue by adding SWF as
target and put COMPILE::JS everywhere where I found and error because was
JS code.
Now I can always compile in VS Code the library.
Harbs <ha...@gmail.com> escreveu no dia domingo, 22/05/2022 à(s)
09:14:
> Issue in Spectrum with details:
>
> https://github.com/unhurdle/spectrum-royale/issues/74
>
> > On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
> >
> > The problem with this setup is that COMPILE::JS blocks do not make it
> into the JS code in the swc.
> >
> > I’ve had trouble getting the scw built with COMPILE::JS block intact.
> >
> > This works in ant to build a valid swc:
> >
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
> >
> > But this does not work in asconfgic:
> >
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
> >
> > I have not yet figured out the correct asconfigc settings to make this
> work.
> >
> >> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev>
> wrote:
> >>
> >> Here's a basic example asconfig.json for a JS SWC library that I found
> in
> >> one of my old projects:
> >>
> >> https://paste.apache.org/c0rsu
> >>
> >> --
> >> Josh Tynjala
> >> Bowler Hat LLC <https://bowlerhat.dev>
> >>
> >>
> >> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
> >> wrote:
> >>
> >>> Hi,
> >>>
> >>> I'm usin VS Code to build Royale with a mxml starting point on
> >>> asconfi.json, template, etc, etc ....
> >>> But, how to use VS Code (in therms of the full asconfig.json) to build
> a
> >>> library: SWC-JS ?
> >>> Has anyone used it for this purpose?
> >>>
> >
>
>
Re: VS Code to build a library SWC-JS
Posted by Harbs <ha...@gmail.com>.
Issue in Spectrum with details:
https://github.com/unhurdle/spectrum-royale/issues/74
> On May 22, 2022, at 11:12 AM, Harbs <ha...@gmail.com> wrote:
>
> The problem with this setup is that COMPILE::JS blocks do not make it into the JS code in the swc.
>
> I’ve had trouble getting the scw built with COMPILE::JS block intact.
>
> This works in ant to build a valid swc:
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
>
> But this does not work in asconfgic:
> https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
>
> I have not yet figured out the correct asconfigc settings to make this work.
>
>> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
>>
>> Here's a basic example asconfig.json for a JS SWC library that I found in
>> one of my old projects:
>>
>> https://paste.apache.org/c0rsu
>>
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev>
>>
>>
>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
>> wrote:
>>
>>> Hi,
>>>
>>> I'm usin VS Code to build Royale with a mxml starting point on
>>> asconfi.json, template, etc, etc ....
>>> But, how to use VS Code (in therms of the full asconfig.json) to build a
>>> library: SWC-JS ?
>>> Has anyone used it for this purpose?
>>>
>
Re: VS Code to build a library SWC-JS
Posted by Harbs <ha...@gmail.com>.
The problem with this setup is that COMPILE::JS blocks do not make it into the JS code in the swc.
I’ve had trouble getting the scw built with COMPILE::JS block intact.
This works in ant to build a valid swc:
https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/build.xml
But this does not work in asconfgic:
https://github.com/unhurdle/spectrum-royale/blob/master/Spectrum/asconfig.json
I have not yet figured out the correct asconfigc settings to make this work.
> On May 20, 2022, at 7:46 PM, Josh Tynjala <jo...@bowlerhat.dev> wrote:
>
> Here's a basic example asconfig.json for a JS SWC library that I found in
> one of my old projects:
>
> https://paste.apache.org/c0rsu
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm usin VS Code to build Royale with a mxml starting point on
>> asconfi.json, template, etc, etc ....
>> But, how to use VS Code (in therms of the full asconfig.json) to build a
>> library: SWC-JS ?
>> Has anyone used it for this purpose?
>>
Re: VS Code to build a library SWC-JS
Posted by Hugo Ferreira <hf...@gmail.com>.
Thank you very much.
I tried before post js-library-path but was missing the library-path
Perfect now.
Thank you very much.
Maria Jose Esteve <mj...@iest.com> escreveu no dia sexta, 20/05/2022
à(s) 20:17:
> Hi Hugo, do you include the MX dependency?
>
> I don't know the components that you need...
> - if they are not visual, I understand that you will need the Base:
>
> "library-path": [
> "${royalelib}/libs/MXRoyaleBase.swc"
> ],
> "js-library-path": [
> "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
> ],
>
> - If they are visual:
>
> "library-path": [
> "${royalelib}/libs/MXRoyale.swc"
> ],
> "js-library-path": [
> "${royalelib}/js/libs/MXRoyaleJS.swc"
> ],
>
> Hiedra
>
> -----Mensaje original-----
> De: Hugo Ferreira <hf...@gmail.com>
> Enviado el: viernes, 20 de mayo de 2022 20:15
> Para: Apache Royale Development <de...@royale.apache.org>
> Asunto: Re: VS Code to build a library SWC-JS
>
> Hi Josh,
>
> I was able to compile the library SWC-JS.
> I tested in a pure AS + MXML (pure Jewel + Base) and build without any
> errors.
> I inspect the SWC and everything was there.
>
> Then I tested with a MX component (test code above) and I got and
> error: This tag could not be resolved to an ActionScript class. It will be
> ignored.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.apache.org/royale/spark"
> xmlns:mx="library://ns.apache.org/royale/mx">
>
> </mx:HBox>
>
> Also VS Code highliight <mx:HBox with the error.
>
> There is something aditional to the asconfig.json for this case ?
>
> Thank you,
> Hugo.
>
> Hugo Ferreira <hf...@gmail.com> escreveu no dia sexta, 20/05/2022
> à(s) 18:56:
>
> > Hi Josh,
> >
> > Exactly what I needed.
> > Thank you very much :)
> >
> > Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sexta,
> > 20/05/2022 à(s) 17:46:
> >
> >> Here's a basic example asconfig.json for a JS SWC library that I
> >> found in one of my old projects:
> >>
> >> https://paste.apache.org/c0rsu
> >>
> >> --
> >> Josh Tynjala
> >> Bowler Hat LLC <https://bowlerhat.dev>
> >>
> >>
> >> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira
> >> <hf...@gmail.com>
> >> wrote:
> >>
> >> > Hi,
> >> >
> >> > I'm usin VS Code to build Royale with a mxml starting point on
> >> > asconfi.json, template, etc, etc ....
> >> > But, how to use VS Code (in therms of the full asconfig.json) to
> >> > build a
> >> > library: SWC-JS ?
> >> > Has anyone used it for this purpose?
> >> >
> >>
> >
>
RE: VS Code to build a library SWC-JS
Posted by Maria Jose Esteve <mj...@iest.com>.
Hi Hugo, do you include the MX dependency?
I don't know the components that you need...
- if they are not visual, I understand that you will need the Base:
"library-path": [
"${royalelib}/libs/MXRoyaleBase.swc"
],
"js-library-path": [
"${royalelib}/js/libs/MXRoyaleBaseJS.swc"
],
- If they are visual:
"library-path": [
"${royalelib}/libs/MXRoyale.swc"
],
"js-library-path": [
"${royalelib}/js/libs/MXRoyaleJS.swc"
],
Hiedra
-----Mensaje original-----
De: Hugo Ferreira <hf...@gmail.com>
Enviado el: viernes, 20 de mayo de 2022 20:15
Para: Apache Royale Development <de...@royale.apache.org>
Asunto: Re: VS Code to build a library SWC-JS
Hi Josh,
I was able to compile the library SWC-JS.
I tested in a pure AS + MXML (pure Jewel + Base) and build without any errors.
I inspect the SWC and everything was there.
Then I tested with a MX component (test code above) and I got and
error: This tag could not be resolved to an ActionScript class. It will be ignored.
<?xml version="1.0" encoding="UTF-8"?>
<mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.apache.org/royale/spark"
xmlns:mx="library://ns.apache.org/royale/mx">
</mx:HBox>
Also VS Code highliight <mx:HBox with the error.
There is something aditional to the asconfig.json for this case ?
Thank you,
Hugo.
Hugo Ferreira <hf...@gmail.com> escreveu no dia sexta, 20/05/2022
à(s) 18:56:
> Hi Josh,
>
> Exactly what I needed.
> Thank you very much :)
>
> Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sexta,
> 20/05/2022 à(s) 17:46:
>
>> Here's a basic example asconfig.json for a JS SWC library that I
>> found in one of my old projects:
>>
>> https://paste.apache.org/c0rsu
>>
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev>
>>
>>
>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira
>> <hf...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I'm usin VS Code to build Royale with a mxml starting point on
>> > asconfi.json, template, etc, etc ....
>> > But, how to use VS Code (in therms of the full asconfig.json) to
>> > build a
>> > library: SWC-JS ?
>> > Has anyone used it for this purpose?
>> >
>>
>
Re: VS Code to build a library SWC-JS
Posted by Hugo Ferreira <hf...@gmail.com>.
Hi Josh,
I was able to compile the library SWC-JS.
I tested in a pure AS + MXML (pure Jewel + Base) and build without any
errors.
I inspect the SWC and everything was there.
Then I tested with a MX component (test code above) and I got and
error: This tag could not be resolved to an ActionScript class. It will be
ignored.
<?xml version="1.0" encoding="UTF-8"?>
<mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.apache.org/royale/spark"
xmlns:mx="library://ns.apache.org/royale/mx">
</mx:HBox>
Also VS Code highliight <mx:HBox with the error.
There is something aditional to the asconfig.json for this case ?
Thank you,
Hugo.
Hugo Ferreira <hf...@gmail.com> escreveu no dia sexta, 20/05/2022
à(s) 18:56:
> Hi Josh,
>
> Exactly what I needed.
> Thank you very much :)
>
> Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sexta,
> 20/05/2022 à(s) 17:46:
>
>> Here's a basic example asconfig.json for a JS SWC library that I found in
>> one of my old projects:
>>
>> https://paste.apache.org/c0rsu
>>
>> --
>> Josh Tynjala
>> Bowler Hat LLC <https://bowlerhat.dev>
>>
>>
>> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
>> wrote:
>>
>> > Hi,
>> >
>> > I'm usin VS Code to build Royale with a mxml starting point on
>> > asconfi.json, template, etc, etc ....
>> > But, how to use VS Code (in therms of the full asconfig.json) to build a
>> > library: SWC-JS ?
>> > Has anyone used it for this purpose?
>> >
>>
>
Re: VS Code to build a library SWC-JS
Posted by Hugo Ferreira <hf...@gmail.com>.
Hi Josh,
Exactly what I needed.
Thank you very much :)
Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sexta, 20/05/2022
à(s) 17:46:
> Here's a basic example asconfig.json for a JS SWC library that I found in
> one of my old projects:
>
> https://paste.apache.org/c0rsu
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I'm usin VS Code to build Royale with a mxml starting point on
> > asconfi.json, template, etc, etc ....
> > But, how to use VS Code (in therms of the full asconfig.json) to build a
> > library: SWC-JS ?
> > Has anyone used it for this purpose?
> >
>
Re: VS Code to build a library SWC-JS
Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Here's a basic example asconfig.json for a JS SWC library that I found in
one of my old projects:
https://paste.apache.org/c0rsu
--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>
On Fri, May 20, 2022 at 2:05 AM Hugo Ferreira <hf...@gmail.com>
wrote:
> Hi,
>
> I'm usin VS Code to build Royale with a mxml starting point on
> asconfi.json, template, etc, etc ....
> But, how to use VS Code (in therms of the full asconfig.json) to build a
> library: SWC-JS ?
> Has anyone used it for this purpose?
>