[FlexJS] Output folders with FB

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[FlexJS] Output folders with FB

Nicolas Granon
We are currently investigating FlexJS (we have a large code base developed
with Flex 4.7, using FlashBuilder 4.7 and have to decide to migrate to
FlexJS or ReactJS).

 

Our concern is about web apps only (we will keep all AIR apps as they are).

 

On our first tests, we have successfully installed FlexJS 0.8.

FB seems to compile correctly to both SWF and JS.

 

However, we cannot figure out how we can setup FB so that the JS output is
sent to a location relative to the SWF output ???

We send the SWF output (using FB's project settings / output folder) to a
folder under the http server root (in the bin-debug folder) but the
generated js version always goes automatically in the bin/js-debug folder
located in the workspace/project folder.

 

How is it possible to override the output folder for the js version ? (since
of course there is nothing in FB for specifying JS output folders)

Shouldn't it go automatically to the bin/js-debug relative to the bin-debug
folder ? Or is there a compiler option that must be set in the project
settings/compiler pane ?

 

(our setup is windows, FlashBuilder 4.7)

 

Many thanks in advance

 

Nicolas

 

--

 

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Output folders with FB

piotrz
Hi Nicolas,

The first which come up to my mind is to specify for compiler option
-output=pathtofolder.

Glad to hear that you are trying FlexJS!

Thanks, Piotr


2017-09-25 14:01 GMT+02:00 Nicolas Granon <[hidden email]>:

> We are currently investigating FlexJS (we have a large code base developed
> with Flex 4.7, using FlashBuilder 4.7 and have to decide to migrate to
> FlexJS or ReactJS).
>
>
>
> Our concern is about web apps only (we will keep all AIR apps as they are).
>
>
>
> On our first tests, we have successfully installed FlexJS 0.8.
>
> FB seems to compile correctly to both SWF and JS.
>
>
>
> However, we cannot figure out how we can setup FB so that the JS output is
> sent to a location relative to the SWF output ???
>
> We send the SWF output (using FB's project settings / output folder) to a
> folder under the http server root (in the bin-debug folder) but the
> generated js version always goes automatically in the bin/js-debug folder
> located in the workspace/project folder.
>
>
>
> How is it possible to override the output folder for the js version ?
> (since
> of course there is nothing in FB for specifying JS output folders)
>
> Shouldn't it go automatically to the bin/js-debug relative to the bin-debug
> folder ? Or is there a compiler option that must be set in the project
> settings/compiler pane ?
>
>
>
> (our setup is windows, FlashBuilder 4.7)
>
>
>
> Many thanks in advance
>
>
>
> Nicolas
>
>
>
> --
>
>
>
>


--

Piotr Zarzycki

mobile: +48 880 859 557
skype: zarzycki10

LinkedIn: http://www.linkedin.com/piotrzarzycki
<https://pl.linkedin.com/in/piotr-zarzycki-92a53552>

GitHub: https://github.com/piotrzarzycki21
Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Output folders with FB

Idylog - Nicolas Granon

Hi Piotr,

 

Many thanks for your answer.

 

However, this does not work : the documentation clearly states that the –output compiler option is used to specify an “output directory AND file name”.

And that is true !

 

If you add

-output=mypath\myfile.swf

to the compiler “command line” options it makes the compiler write the SWF output with the name “myfile.swf” in the folder specified by “mypath”.

 

But the JS output is still written in the js-debug folder under the workspace root !

 

In fact, the “output folder” text input from “project > properties > flex build path” pane just passes the text input value to the –output option of the compiler (after appending {project name}.swf).

The only difference is that if you specify the output folder in “flex build path” AND the compiler option, the compiler option overrides the specified build path (it overrides both the path and the output SWF filename) which seems quite understable.

 

What seems missing is some kind of “js-compiler-output” parameter.

 

But, at least, it seems to me that the js compiler should use the path from the “-output” option when building its own output path…and not the source path.

 

All suggestions are welcome !

 

Nicolas Granon

 

 

De : Piotr Zarzycki [mailto:[hidden email]]
Envoyé : lundi 25 septembre 2017 14:14
À : [hidden email]; [hidden email]
Objet : Re: [FlexJS] Output folders with FB

 

Hi Nicolas,

 

The first which come up to my mind is to specify for compiler option -output=pathtofolder.

 

Glad to hear that you are trying FlexJS!

 

Thanks, Piotr 

 

 

2017-09-25 14:01 GMT+02:00 Nicolas Granon <[hidden email]>:

We are currently investigating FlexJS (we have a large code base developed
with Flex 4.7, using FlashBuilder 4.7 and have to decide to migrate to
FlexJS or ReactJS).



Our concern is about web apps only (we will keep all AIR apps as they are).



On our first tests, we have successfully installed FlexJS 0.8.

FB seems to compile correctly to both SWF and JS.



However, we cannot figure out how we can setup FB so that the JS output is
sent to a location relative to the SWF output ???

We send the SWF output (using FB's project settings / output folder) to a
folder under the http server root (in the bin-debug folder) but the
generated js version always goes automatically in the bin/js-debug folder
located in the workspace/project folder.



How is it possible to override the output folder for the js version ? (since
of course there is nothing in FB for specifying JS output folders)

Shouldn't it go automatically to the bin/js-debug relative to the bin-debug
folder ? Or is there a compiler option that must be set in the project
settings/compiler pane ?



(our setup is windows, FlashBuilder 4.7)



Many thanks in advance



Nicolas



--



 

--

Piotr Zarzycki 

mobile: +48 880 859 557 
skype: 
zarzycki10

LinkedIn: http://www.linkedin.com/piotrzarzycki

GitHubhttps://github.com/piotrzarzycki21

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Output folders with FB

piotrz
Nicolas,

I will check this one today or tomorrow evening my time (Poland :)). I'm
using Maven to build FlexJS application which has "outputDirectory" option
- I haven't use it so far, but I will also check.
However it is quite understandable that you would like to have build
working in Flash Builder.

Another idea is that maybe there somehow connected to type of the build:
apart of specifying "output" try to build JS only application using
-targets=JSFlex and -output=myfolder.

Maybe someone beat me earlier to help you.

Piotr


2017-09-25 18:06 GMT+02:00 Idylog - Nicolas Granon <[hidden email]>:

> Hi Piotr,
>
>
>
> Many thanks for your answer.
>
>
>
> However, this does not work : the documentation clearly states that the
> –output compiler option is used to specify an “output directory AND file
> name”.
>
> And that is true !
>
>
>
> If you add
>
> -output=mypath\myfile.swf
>
> to the compiler “command line” options it makes the compiler write the SWF
> output with the name “myfile.swf” in the folder specified by “mypath”.
>
>
>
> But the JS output is still written in the js-debug folder under the
> workspace root !
>
>
>
> In fact, the “output folder” text input from “project > properties > flex
> build path” pane just passes the text input value to the –output option of
> the compiler (after appending {project name}.swf).
>
> The only difference is that if you specify the output folder in “flex
> build path” AND the compiler option, the compiler option overrides the
> specified build path (it overrides both the path and the output SWF
> filename) which seems quite understable.
>
>
>
> What seems missing is some kind of “js-compiler-output” parameter.
>
>
>
> But, at least, it seems to me that the js compiler should use the path
> from the “-output” option when building its own output path…and not the
> source path.
>
>
>
> All suggestions are welcome !
>
>
>
> Nicolas Granon
>
>
>
> [image: signature_e_mail]
>
>
>
> *De :* Piotr Zarzycki [mailto:[hidden email]]
> *Envoyé :* lundi 25 septembre 2017 14:14
> *À :* [hidden email]; [hidden email]
> *Objet :* Re: [FlexJS] Output folders with FB
>
>
>
> Hi Nicolas,
>
>
>
> The first which come up to my mind is to specify for compiler option
> -output=pathtofolder.
>
>
>
> Glad to hear that you are trying FlexJS!
>
>
>
> Thanks, Piotr
>
>
>
>
>
> 2017-09-25 14:01 GMT+02:00 Nicolas Granon <[hidden email]>:
>
> We are currently investigating FlexJS (we have a large code base developed
> with Flex 4.7, using FlashBuilder 4.7 and have to decide to migrate to
> FlexJS or ReactJS).
>
>
>
> Our concern is about web apps only (we will keep all AIR apps as they are).
>
>
>
> On our first tests, we have successfully installed FlexJS 0.8.
>
> FB seems to compile correctly to both SWF and JS.
>
>
>
> However, we cannot figure out how we can setup FB so that the JS output is
> sent to a location relative to the SWF output ???
>
> We send the SWF output (using FB's project settings / output folder) to a
> folder under the http server root (in the bin-debug folder) but the
> generated js version always goes automatically in the bin/js-debug folder
> located in the workspace/project folder.
>
>
>
> How is it possible to override the output folder for the js version ?
> (since
> of course there is nothing in FB for specifying JS output folders)
>
> Shouldn't it go automatically to the bin/js-debug relative to the bin-debug
> folder ? Or is there a compiler option that must be set in the project
> settings/compiler pane ?
>
>
>
> (our setup is windows, FlashBuilder 4.7)
>
>
>
> Many thanks in advance
>
>
>
> Nicolas
>
>
>
> --
>
>
>
>
>
> --
>
> *Piotr Zarzycki *
>
> mobile: +48 880 859 557 <+48%20880%20859%20557>
> skype: zarzycki10
>
> LinkedIn: http://www.linkedin.com/piotrzarzycki
> <https://pl.linkedin.com/in/piotr-zarzycki-92a53552>
>
> GitHub: https://github.com/piotrzarzycki21
>



--

Piotr Zarzycki

mobile: +48 880 859 557
skype: zarzycki10

LinkedIn: http://www.linkedin.com/piotrzarzycki
<https://pl.linkedin.com/in/piotr-zarzycki-92a53552>

GitHub: https://github.com/piotrzarzycki21
Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Output folders with FB

Alex Harui-2
In reply to this post by Idylog - Nicolas Granon
Hi Nicolas,

I just tried setting –output= to an absolute path for the swf and it worked for me.  It will take whatever path you specify for the SWF and use the grandparent folder (not the parent) because it is expecting the SWF to go in something like /Users/username/output/bin-debug/foo.swf.  Then the JS output will go in  /Users/username/output/bin/js-debug.

If it isn't working from within Flash Builder, try the command-line (js/bin/mxmlc).  Also try manually deleting the bin/js-debug folder to prove that you aren't seeing old output from before you changed the settings and the new output is going somewhere else.

HTH,
-Alex

From: Idylog - Nicolas Granon <[hidden email]<mailto:[hidden email]>>
Organization: IDYLOG
Reply-To: "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>>, "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>>
Date: Monday, September 25, 2017 at 9:06 AM
To: "[hidden email]<mailto:[hidden email]>" <[hidden email]<mailto:[hidden email]>>
Subject: RE: [FlexJS] Output folders with FB

Hi Piotr,

Many thanks for your answer.

However, this does not work : the documentation clearly states that the –output compiler option is used to specify an “output directory AND file name”.
And that is true !

If you add
-output=mypath\myfile.swf
to the compiler “command line” options it makes the compiler write the SWF output with the name “myfile.swf” in the folder specified by “mypath”.

But the JS output is still written in the js-debug folder under the workspace root !

In fact, the “output folder” text input from “project > properties > flex build path” pane just passes the text input value to the –output option of the compiler (after appending {project name}.swf).
The only difference is that if you specify the output folder in “flex build path” AND the compiler option, the compiler option overrides the specified build path (it overrides both the path and the output SWF filename) which seems quite understable.

What seems missing is some kind of “js-compiler-output” parameter.

But, at least, it seems to me that the js compiler should use the path from the “-output” option when building its own output path…and not the source path.

All suggestions are welcome !

Nicolas Granon

[signature_e_mail]

De : Piotr Zarzycki [mailto:[hidden email]]
Envoyé : lundi 25 septembre 2017 14:14
À : [hidden email]<mailto:[hidden email]>; [hidden email]<mailto:[hidden email]>
Objet : Re: [FlexJS] Output folders with FB

Hi Nicolas,

The first which come up to my mind is to specify for compiler option -output=pathtofolder.

Glad to hear that you are trying FlexJS!

Thanks, Piotr


2017-09-25 14:01 GMT+02:00 Nicolas Granon <[hidden email]<mailto:[hidden email]>>:
We are currently investigating FlexJS (we have a large code base developed
with Flex 4.7, using FlashBuilder 4.7 and have to decide to migrate to
FlexJS or ReactJS).



Our concern is about web apps only (we will keep all AIR apps as they are).



On our first tests, we have successfully installed FlexJS 0.8.

FB seems to compile correctly to both SWF and JS.



However, we cannot figure out how we can setup FB so that the JS output is
sent to a location relative to the SWF output ???

We send the SWF output (using FB's project settings / output folder) to a
folder under the http server root (in the bin-debug folder) but the
generated js version always goes automatically in the bin/js-debug folder
located in the workspace/project folder.



How is it possible to override the output folder for the js version ? (since
of course there is nothing in FB for specifying JS output folders)

Shouldn't it go automatically to the bin/js-debug relative to the bin-debug
folder ? Or is there a compiler option that must be set in the project
settings/compiler pane ?



(our setup is windows, FlashBuilder 4.7)



Many thanks in advance



Nicolas



--




--

Piotr Zarzycki

mobile: +48 880 859 557
skype: zarzycki10

LinkedIn: http://www.linkedin.com/piotrzarzycki<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpl.linkedin.com%2Fin%2Fpiotr-zarzycki-92a53552&data=02%7C01%7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419523962836460&sdata=6SYIu2fzojQ0fyT1PzMZA0EFvJbLfl%2FXJM6A27JVbHo%3D&reserved=0>

GitHub: https://github.com/piotrzarzycki21<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpiotrzarzycki21&data=02%7C01%7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419523962836460&sdata=oQOlISfb1SZU4xiP31mZa%2Bxztie9hls39tEphlXOW6o%3D&reserved=0>
Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Output folders with FB

Idylog - Nicolas Granon
In reply to this post by piotrz
Piotr,

If, as you suggested, I specify JSFlex target-only and an output file, an empty file is written in the output dir (I presume it corresponds to the non-generated SWF, although it seems to me that *nothing* should be written) and the js output is still written under the project root.

By the way, I do not really understand why the js debug output is in a two-level hierarchy (bin/js-debug) although the regular (swf) output is in a single-level hierarchy (bin-debug). Wouldn't it be more logical (and simpler) to have 'bin-debug' for swf, and 'bin-js-debug' for js ?? (those dirs being generated by default under the "output folder" root). Also, note that in FB, the 'export release build' option has its own 'output folder' text input, and it can be totally unrelated to the 'debug' output folder. Also, in FB, the release version is written in the specified 'export release build' folder and NO additional subfolder is created.

Nicolas Granon



> -----Message d'origine-----
> De : Piotr Zarzycki [mailto:[hidden email]]
> Envoyé : lundi 25 septembre 2017 18:11
> À : [hidden email]
> Objet : Re: [FlexJS] Output folders with FB
>
> Nicolas,
>
> I will check this one today or tomorrow evening my time (Poland :)).
> I'm using Maven to build FlexJS application which has "outputDirectory"
> option
> - I haven't use it so far, but I will also check.
> However it is quite understandable that you would like to have build
> working in Flash Builder.
>
> Another idea is that maybe there somehow connected to type of the
> build:
> apart of specifying "output" try to build JS only application using -
> targets=JSFlex and -output=myfolder.
>
> Maybe someone beat me earlier to help you.
>
> Piotr
>
>
> 2017-09-25 18:06 GMT+02:00 Idylog - Nicolas Granon
> <[hidden email]>:
>
> > Hi Piotr,
> >
> >
> >
> > Many thanks for your answer.
> >
> >
> >
> > However, this does not work : the documentation clearly states that
> > the –output compiler option is used to specify an “output directory
> > AND file name”.
> >
> > And that is true !
> >
> >
> >
> > If you add
> >
> > -output=mypath\myfile.swf
> >
> > to the compiler “command line” options it makes the compiler write
> the
> > SWF output with the name “myfile.swf” in the folder specified by
> “mypath”.
> >
> >
> >
> > But the JS output is still written in the js-debug folder under the
> > workspace root !
> >
> >
> >
> > In fact, the “output folder” text input from “project > properties >
> > flex build path” pane just passes the text input value to the –output
> > option of the compiler (after appending {project name}.swf).
> >
> > The only difference is that if you specify the output folder in “flex
> > build path” AND the compiler option, the compiler option overrides
> the
> > specified build path (it overrides both the path and the output SWF
> > filename) which seems quite understable.
> >
> >
> >
> > What seems missing is some kind of “js-compiler-output” parameter.
> >
> >
> >
> > But, at least, it seems to me that the js compiler should use the
> path
> > from the “-output” option when building its own output path…and not
> > the source path.
> >
> >
> >
> > All suggestions are welcome !
> >
> >
> >
> > Nicolas Granon
> >
> >
> >
> > [image: signature_e_mail]
> >
> >
> >
> > *De :* Piotr Zarzycki [mailto:[hidden email]]
> > *Envoyé :* lundi 25 septembre 2017 14:14 *À :* [hidden email];
> > [hidden email] *Objet :* Re: [FlexJS] Output folders with FB
> >
> >
> >
> > Hi Nicolas,
> >
> >
> >
> > The first which come up to my mind is to specify for compiler option
> > -output=pathtofolder.
> >
> >
> >
> > Glad to hear that you are trying FlexJS!
> >
> >
> >
> > Thanks, Piotr
> >
> >
> >
> >
> >
> > 2017-09-25 14:01 GMT+02:00 Nicolas Granon <[hidden email]>:
> >
> > We are currently investigating FlexJS (we have a large code base
> > developed with Flex 4.7, using FlashBuilder 4.7 and have to decide to
> > migrate to FlexJS or ReactJS).
> >
> >
> >
> > Our concern is about web apps only (we will keep all AIR apps as they
> are).
> >
> >
> >
> > On our first tests, we have successfully installed FlexJS 0.8.
> >
> > FB seems to compile correctly to both SWF and JS.
> >
> >
> >
> > However, we cannot figure out how we can setup FB so that the JS
> > output is sent to a location relative to the SWF output ???
> >
> > We send the SWF output (using FB's project settings / output folder)
> > to a folder under the http server root (in the bin-debug folder) but
> > the generated js version always goes automatically in the bin/js-
> debug
> > folder located in the workspace/project folder.
> >
> >
> >
> > How is it possible to override the output folder for the js version ?
> > (since
> > of course there is nothing in FB for specifying JS output folders)
> >
> > Shouldn't it go automatically to the bin/js-debug relative to the
> > bin-debug folder ? Or is there a compiler option that must be set in
> > the project settings/compiler pane ?
> >
> >
> >
> > (our setup is windows, FlashBuilder 4.7)
> >
> >
> >
> > Many thanks in advance
> >
> >
> >
> > Nicolas
> >
> >
> >
> > --
> >
> >
> >
> >
> >
> > --
> >
> > *Piotr Zarzycki *
> >
> > mobile: +48 880 859 557 <+48%20880%20859%20557>
> > skype: zarzycki10
> >
> > LinkedIn: http://www.linkedin.com/piotrzarzycki
> > <https://pl.linkedin.com/in/piotr-zarzycki-92a53552>
> >
> > GitHub: https://github.com/piotrzarzycki21
> >
>
>
>
> --
>
> Piotr Zarzycki
>
> mobile: +48 880 859 557
> skype: zarzycki10
>
> LinkedIn: http://www.linkedin.com/piotrzarzycki
> <https://pl.linkedin.com/in/piotr-zarzycki-92a53552>
>
> GitHub: https://github.com/piotrzarzycki21

Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Output folders with FB

Idylog - Nicolas Granon
In reply to this post by Alex Harui-2
Well, Alex, you are right : when launching from the command-line, everything goes to the specified dir.
Even more surprising : *no* empty swf file generated (with "-targets=JSFlex" option).

This is confusing... Is there any specific configuration for FB ? I thought that the "compiler options" from FB where simply applied to the task. Seems like it does not work that way...
We have to get the correct configuration (we do not want to have to launch a compile task manually on each save).

Any clue ? (config file mismatch ? incorrect path to build task ?...)

Nicolas Granon




> -----Message d'origine-----
> De : Alex Harui [mailto:[hidden email]]
> Envoyé : lundi 25 septembre 2017 18:53
> À : [hidden email]; [hidden email]
> Objet : Re: [FlexJS] Output folders with FB
>
> Hi Nicolas,
>
> I just tried setting –output= to an absolute path for the swf and it
> worked for me.  It will take whatever path you specify for the SWF and
> use the grandparent folder (not the parent) because it is expecting the
> SWF to go in something like /Users/username/output/bin-debug/foo.swf.
> Then the JS output will go in  /Users/username/output/bin/js-debug.
>
> If it isn't working from within Flash Builder, try the command-line
> (js/bin/mxmlc).  Also try manually deleting the bin/js-debug folder to
> prove that you aren't seeing old output from before you changed the
> settings and the new output is going somewhere else.
>
> HTH,
> -Alex
>
> From: Idylog - Nicolas Granon
> <[hidden email]<mailto:[hidden email]>>
> Organization: IDYLOG
> Reply-To: "[hidden email]<mailto:[hidden email]>"
> <[hidden email]<mailto:[hidden email]>>,
> "[hidden email]<mailto:[hidden email]>"
> <[hidden email]<mailto:[hidden email]>>
> Date: Monday, September 25, 2017 at 9:06 AM
> To: "[hidden email]<mailto:[hidden email]>"
> <[hidden email]<mailto:[hidden email]>>
> Subject: RE: [FlexJS] Output folders with FB
>
> Hi Piotr,
>
> Many thanks for your answer.
>
> However, this does not work : the documentation clearly states that the
> –output compiler option is used to specify an “output directory AND
> file name”.
> And that is true !
>
> If you add
> -output=mypath\myfile.swf
> to the compiler “command line” options it makes the compiler write the
> SWF output with the name “myfile.swf” in the folder specified by
> “mypath”.
>
> But the JS output is still written in the js-debug folder under the
> workspace root !
>
> In fact, the “output folder” text input from “project > properties >
> flex build path” pane just passes the text input value to the –output
> option of the compiler (after appending {project name}.swf).
> The only difference is that if you specify the output folder in “flex
> build path” AND the compiler option, the compiler option overrides the
> specified build path (it overrides both the path and the output SWF
> filename) which seems quite understable.
>
> What seems missing is some kind of “js-compiler-output” parameter.
>
> But, at least, it seems to me that the js compiler should use the path
> from the “-output” option when building its own output path…and not the
> source path.
>
> All suggestions are welcome !
>
> Nicolas Granon
>
> [signature_e_mail]
>
> De : Piotr Zarzycki [mailto:[hidden email]]
> Envoyé : lundi 25 septembre 2017 14:14
> À : [hidden email]<mailto:[hidden email]>;
> [hidden email]<mailto:[hidden email]>
> Objet : Re: [FlexJS] Output folders with FB
>
> Hi Nicolas,
>
> The first which come up to my mind is to specify for compiler option -
> output=pathtofolder.
>
> Glad to hear that you are trying FlexJS!
>
> Thanks, Piotr
>
>
> 2017-09-25 14:01 GMT+02:00 Nicolas Granon
> <[hidden email]<mailto:[hidden email]>>:
> We are currently investigating FlexJS (we have a large code base
> developed with Flex 4.7, using FlashBuilder 4.7 and have to decide to
> migrate to FlexJS or ReactJS).
>
>
>
> Our concern is about web apps only (we will keep all AIR apps as they
> are).
>
>
>
> On our first tests, we have successfully installed FlexJS 0.8.
>
> FB seems to compile correctly to both SWF and JS.
>
>
>
> However, we cannot figure out how we can setup FB so that the JS output
> is sent to a location relative to the SWF output ???
>
> We send the SWF output (using FB's project settings / output folder) to
> a folder under the http server root (in the bin-debug folder) but the
> generated js version always goes automatically in the bin/js-debug
> folder located in the workspace/project folder.
>
>
>
> How is it possible to override the output folder for the js version ?
> (since of course there is nothing in FB for specifying JS output
> folders)
>
> Shouldn't it go automatically to the bin/js-debug relative to the bin-
> debug folder ? Or is there a compiler option that must be set in the
> project settings/compiler pane ?
>
>
>
> (our setup is windows, FlashBuilder 4.7)
>
>
>
> Many thanks in advance
>
>
>
> Nicolas
>
>
>
> --
>
>
>
>
> --
>
> Piotr Zarzycki
>
> mobile: +48 880 859 557
> skype: zarzycki10
>
> LinkedIn:
> http://www.linkedin.com/piotrzarzycki<https://na01.safelinks.protection
> .outlook.com/?url=https%3A%2F%2Fpl.linkedin.com%2Fin%2Fpiotr-zarzycki-
> 92a53552&data=02%7C01%7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7
> b34438794aed2c178decee1%7C0%7C0%7C636419523962836460&sdata=6SYIu2fzojQ0
> fyT1PzMZA0EFvJbLfl%2FXJM6A27JVbHo%3D&reserved=0>
>
> GitHub:
> https://github.com/piotrzarzycki21<https://na01.safelinks.protection.ou
> tlook.com/?url=https%3A%2F%2Fgithub.com%2Fpiotrzarzycki21&data=02%7C01%
> 7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7b34438794aed2c178decee
> 1%7C0%7C0%7C636419523962836460&sdata=oQOlISfb1SZU4xiP31mZa%2Bxztie9hls3
> 9tEphlXOW6o%3D&reserved=0>

Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Output folders with FB

Alex Harui-2
The FB project settings are combined with any "Additional compiler
arguments" and passed to the compiler.  I have a hard time believing that
the compiler in 0.8.0 would write a SWF according to the -output parameter
but would then not write bin/js-debug to the _grandparent_ of the SWF file
specified, because there should only be one compiler "launch" to create
both when targets=SWF,JSFlex.  But you never know, this is relatively new
code.

It would be easier for me to believe that FB is making assumptions.  FB
doesn't launch the compiler like you did on the command line.  It loads
the compiler class via a bunch of jars and calls directly into the
compiler's entry points.  There are several classes in FB code we don't
control that are involved and they might assume a SWF is being created.
Apache Flex owns one jar specific to FB integration and we don't know the
code that well so there is a chance that some code we own is involved, but
it is unlikely.

Just to double-check:  what did you set your -output parameter to?  If you
set it to:

  -output=mypath\myfile.swf


Are you sure that there isn't now a bin/js-debug folder in the parent
folder of mypath (and not mypath itself)?  Then FB might have copied it
around or is showing it to you in the Package Explorer even though it
lives outside the project folder.

HTH,
-Alex

On 9/25/17, 12:54 PM, "Idylog - Nicolas Granon" <[hidden email]> wrote:

>Well, Alex, you are right : when launching from the command-line,
>everything goes to the specified dir.
>Even more surprising : *no* empty swf file generated (with
>"-targets=JSFlex" option).
>
>This is confusing... Is there any specific configuration for FB ? I
>thought that the "compiler options" from FB where simply applied to the
>task. Seems like it does not work that way...
>We have to get the correct configuration (we do not want to have to
>launch a compile task manually on each save).
>
>Any clue ? (config file mismatch ? incorrect path to build task ?...)
>
>Nicolas Granon
>
>
>
>
>> -----Message d'origine-----
>> De : Alex Harui [mailto:[hidden email]]
>> Envoyé : lundi 25 septembre 2017 18:53
>> À : [hidden email]; [hidden email]
>> Objet : Re: [FlexJS] Output folders with FB
>>
>> Hi Nicolas,
>>
>> I just tried setting –output= to an absolute path for the swf and it
>> worked for me.  It will take whatever path you specify for the SWF and
>> use the grandparent folder (not the parent) because it is expecting the
>> SWF to go in something like /Users/username/output/bin-debug/foo.swf.
>> Then the JS output will go in  /Users/username/output/bin/js-debug.
>>
>> If it isn't working from within Flash Builder, try the command-line
>> (js/bin/mxmlc).  Also try manually deleting the bin/js-debug folder to
>> prove that you aren't seeing old output from before you changed the
>> settings and the new output is going somewhere else.
>>
>> HTH,
>> -Alex
>>
>> From: Idylog - Nicolas Granon
>> <[hidden email]<mailto:[hidden email]>>
>> Organization: IDYLOG
>> Reply-To: "[hidden email]<mailto:[hidden email]>"
>> <[hidden email]<mailto:[hidden email]>>,
>> "[hidden email]<mailto:[hidden email]>"
>> <[hidden email]<mailto:[hidden email]>>
>> Date: Monday, September 25, 2017 at 9:06 AM
>> To: "[hidden email]<mailto:[hidden email]>"
>> <[hidden email]<mailto:[hidden email]>>
>> Subject: RE: [FlexJS] Output folders with FB
>>
>> Hi Piotr,
>>
>> Many thanks for your answer.
>>
>> However, this does not work : the documentation clearly states that the
>> –output compiler option is used to specify an “output directory AND
>> file name”.
>> And that is true !
>>
>> If you add
>> -output=mypath\myfile.swf
>> to the compiler “command line” options it makes the compiler write the
>> SWF output with the name “myfile.swf” in the folder specified by
>> “mypath”.
>>
>> But the JS output is still written in the js-debug folder under the
>> workspace root !
>>
>> In fact, the “output folder” text input from “project > properties >
>> flex build path” pane just passes the text input value to the –output
>> option of the compiler (after appending {project name}.swf).
>> The only difference is that if you specify the output folder in “flex
>> build path” AND the compiler option, the compiler option overrides the
>> specified build path (it overrides both the path and the output SWF
>> filename) which seems quite understable.
>>
>> What seems missing is some kind of “js-compiler-output” parameter.
>>
>> But, at least, it seems to me that the js compiler should use the path
>> from the “-output” option when building its own output path…and not the
>> source path.
>>
>> All suggestions are welcome !
>>
>> Nicolas Granon
>>
>> [signature_e_mail]
>>
>> De : Piotr Zarzycki [mailto:[hidden email]]
>> Envoyé : lundi 25 septembre 2017 14:14
>> À : [hidden email]<mailto:[hidden email]>;
>> [hidden email]<mailto:[hidden email]>
>> Objet : Re: [FlexJS] Output folders with FB
>>
>> Hi Nicolas,
>>
>> The first which come up to my mind is to specify for compiler option -
>> output=pathtofolder.
>>
>> Glad to hear that you are trying FlexJS!
>>
>> Thanks, Piotr
>>
>>
>> 2017-09-25 14:01 GMT+02:00 Nicolas Granon
>> <[hidden email]<mailto:[hidden email]>>:
>> We are currently investigating FlexJS (we have a large code base
>> developed with Flex 4.7, using FlashBuilder 4.7 and have to decide to
>> migrate to FlexJS or ReactJS).
>>
>>
>>
>> Our concern is about web apps only (we will keep all AIR apps as they
>> are).
>>
>>
>>
>> On our first tests, we have successfully installed FlexJS 0.8.
>>
>> FB seems to compile correctly to both SWF and JS.
>>
>>
>>
>> However, we cannot figure out how we can setup FB so that the JS output
>> is sent to a location relative to the SWF output ???
>>
>> We send the SWF output (using FB's project settings / output folder) to
>> a folder under the http server root (in the bin-debug folder) but the
>> generated js version always goes automatically in the bin/js-debug
>> folder located in the workspace/project folder.
>>
>>
>>
>> How is it possible to override the output folder for the js version ?
>> (since of course there is nothing in FB for specifying JS output
>> folders)
>>
>> Shouldn't it go automatically to the bin/js-debug relative to the bin-
>> debug folder ? Or is there a compiler option that must be set in the
>> project settings/compiler pane ?
>>
>>
>>
>> (our setup is windows, FlashBuilder 4.7)
>>
>>
>>
>> Many thanks in advance
>>
>>
>>
>> Nicolas
>>
>>
>>
>> --
>>
>>
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>> mobile: +48 880 859 557
>> skype: zarzycki10
>>
>> LinkedIn:
>>
>>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.linke
>>din.com%2Fpiotrzarzycki&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f9
>>0%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=f
>>tJm0JriFYtt8GE7xlbiOzbLxVzcSkN9iChnB%2BBGAsw%3D&reserved=0<https://na01.s
>>afelinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.protect
>>ion&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7Cfa7b1b5a7b344387
>>94aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=eTseR2dPXKgkFfMIPdqOD
>>enqdLSNmvPSw54mOi8qrX0%3D&reserved=0
>> .outlook.com/?url=https%3A%2F%2Fpl.linkedin.com%2Fin%2Fpiotr-zarzycki-
>> 92a53552&data=02%7C01%7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7
>> b34438794aed2c178decee1%7C0%7C0%7C636419523962836460&sdata=6SYIu2fzojQ0
>> fyT1PzMZA0EFvJbLfl%2FXJM6A27JVbHo%3D&reserved=0>
>>
>> GitHub:
>>
>>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.c
>>om%2Fpiotrzarzycki21&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7
>>Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=Cvh%
>>2B73itACKqEqgjhcF47O%2Bbdz1d6MGnehIQRalKShE%3D&reserved=0<https://na01.sa
>>felinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.protecti
>>on.ou&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7Cfa7b1b5a7b3443
>>8794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=rI2Mscn0POAqguoXIR%
>>2BEf4aNYzA%2BdYKY%2F0lUEml4kUA%3D&reserved=0
>> tlook.com/?url=https%3A%2F%2Fgithub.com%2Fpiotrzarzycki21&data=02%7C01%
>> 7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7b34438794aed2c178decee
>> 1%7C0%7C0%7C636419523962836460&sdata=oQOlISfb1SZU4xiP31mZa%2Bxztie9hls3
>> 9tEphlXOW6o%3D&reserved=0>
>

Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Output folders with FB

Idylog - Nicolas Granon
Alex, thank you for your answer.

OK.

Here is exactly what I have done so far.
(FB 4.7, Windows).

The project itself is minimal, since I only wanted to validate that the installation was correct and that FB could compile.
In fact, it is the 'hello world' project.

All settings described below are in the 'project settings' of FB, "Flex compiler" pane.

Compiler options that I have tried :

-output=<some existing folder>
Is invalid if the folder already exists. I believe you cannot have -output to a folder. You should have -output to a filename. If you specify a folder, no output is generated at all (or you have the 'ok' button greyed and cannot validate the compiler settings). Probably FB sees that the output name is a folder and not a file.

-output=<some folder><filename>
Works ok for the SWF output. If <filename> has an inconsistent extension (or no extension at all), the resulting file is named "as is".
If <filename> exists, it is overwritten.
The JS output goes under the project root, in bin/js-debug, and is named after the project name. the filename specified is ignored.
("JS output" means 3 files : index.html, <projectname>.js and <projectname>.css, plus subdirs and all their content).

-targets=JSFlex -output=<somefolder><filename>
An empty (length=0) file is created in the output dir.
The JS output is generated exactly as before.

Tried to use forward slashes instead of backslashes in the path : the results are identical.

When launching the compiler *from the command line*, tried both -output=<somepath> and -output=<somepath><filename>
Both work.
If no <filename> specified, the resulting file has the name of the project.
If a filename is specified, the filename is used.
All files are correctly directed to the <somepath> specified (folders are created as expected, bin-debug, bin/js-debug).

In FB settings :
You cannot specify the *same* output folder in the "build path output folder" and as an additional compiler option : if you do, you get an "access denied" error (in the "errors" pane of FB, which is logical since the -output option expects a file name, while the "build output folder" expects a folder).

All checks are done through the file system (explorer) including timestamp check. Not through the FB "package explorer" pane.

All outputs are valid (can be loaded in browser and display correctly) which is good news !

So, yes, I can confirm that, when using the "build path" options and/or the "additional compiler arguments" of FB, the resulting JS output is always sent to <project path> and never to <build output path>.

I do not have any specific or fancy internal mappings, virtual drives or anything special. All tests are made on a local hard drive. OS is Win7.
I can make snapshots of FB settings if you think that could help...???

Maybe somebody else is using FB under Windows and could confirm ?

Nicolas Granon




> -----Message d'origine-----
> De : Alex Harui [mailto:[hidden email]]
> Envoyé : lundi 25 septembre 2017 22:46
> À : [hidden email]; [hidden email]
> Objet : Re: [FlexJS] Output folders with FB
>
> The FB project settings are combined with any "Additional compiler
> arguments" and passed to the compiler.  I have a hard time believing
> that the compiler in 0.8.0 would write a SWF according to the -output
> parameter but would then not write bin/js-debug to the _grandparent_ of
> the SWF file specified, because there should only be one compiler
> "launch" to create both when targets=SWF,JSFlex.  But you never know,
> this is relatively new code.
>
> It would be easier for me to believe that FB is making assumptions.  FB
> doesn't launch the compiler like you did on the command line.  It loads
> the compiler class via a bunch of jars and calls directly into the
> compiler's entry points.  There are several classes in FB code we don't
> control that are involved and they might assume a SWF is being created.
> Apache Flex owns one jar specific to FB integration and we don't know
> the code that well so there is a chance that some code we own is
> involved, but it is unlikely.
>
> Just to double-check:  what did you set your -output parameter to?  If
> you set it to:
>
>   -output=mypath\myfile.swf
>
>
> Are you sure that there isn't now a bin/js-debug folder in the parent
> folder of mypath (and not mypath itself)?  Then FB might have copied it
> around or is showing it to you in the Package Explorer even though it
> lives outside the project folder.
>
> HTH,
> -Alex
>
> On 9/25/17, 12:54 PM, "Idylog - Nicolas Granon" <[hidden email]>
> wrote:
>
> >Well, Alex, you are right : when launching from the command-line,
> >everything goes to the specified dir.
> >Even more surprising : *no* empty swf file generated (with
> >"-targets=JSFlex" option).
> >
> >This is confusing... Is there any specific configuration for FB ? I
> >thought that the "compiler options" from FB where simply applied to
> the
> >task. Seems like it does not work that way...
> >We have to get the correct configuration (we do not want to have to
> >launch a compile task manually on each save).
> >
> >Any clue ? (config file mismatch ? incorrect path to build task ?...)
> >
> >Nicolas Granon
> >
> >
> >
> >
> >> -----Message d'origine-----
> >> De : Alex Harui [mailto:[hidden email]] Envoyé : lundi 25
> >> septembre 2017 18:53 À : [hidden email]; [hidden email]
> >> Objet : Re: [FlexJS] Output folders with FB
> >>
> >> Hi Nicolas,
> >>
> >> I just tried setting –output= to an absolute path for the swf and it
> >> worked for me.  It will take whatever path you specify for the SWF
> >> and use the grandparent folder (not the parent) because it is
> >> expecting the SWF to go in something like
> /Users/username/output/bin-debug/foo.swf.
> >> Then the JS output will go in  /Users/username/output/bin/js-debug.
> >>
> >> If it isn't working from within Flash Builder, try the command-line
> >> (js/bin/mxmlc).  Also try manually deleting the bin/js-debug folder
> >> to prove that you aren't seeing old output from before you changed
> >> the settings and the new output is going somewhere else.
> >>
> >> HTH,
> >> -Alex
> >>
> >> From: Idylog - Nicolas Granon
> >> <[hidden email]<mailto:[hidden email]>>
> >> Organization: IDYLOG
> >> Reply-To: "[hidden email]<mailto:[hidden email]>"
> >> <[hidden email]<mailto:[hidden email]>>,
> >> "[hidden email]<mailto:[hidden email]>"
> >> <[hidden email]<mailto:[hidden email]>>
> >> Date: Monday, September 25, 2017 at 9:06 AM
> >> To: "[hidden email]<mailto:[hidden email]>"
> >> <[hidden email]<mailto:[hidden email]>>
> >> Subject: RE: [FlexJS] Output folders with FB
> >>
> >> Hi Piotr,
> >>
> >> Many thanks for your answer.
> >>
> >> However, this does not work : the documentation clearly states that
> >> the –output compiler option is used to specify an “output directory
> >> AND file name”.
> >> And that is true !
> >>
> >> If you add
> >> -output=mypath\myfile.swf
> >> to the compiler “command line” options it makes the compiler write
> >> the SWF output with the name “myfile.swf” in the folder specified by
> >> “mypath”.
> >>
> >> But the JS output is still written in the js-debug folder under the
> >> workspace root !
> >>
> >> In fact, the “output folder” text input from “project > properties >
> >> flex build path” pane just passes the text input value to the –
> output
> >> option of the compiler (after appending {project name}.swf).
> >> The only difference is that if you specify the output folder in
> “flex
> >> build path” AND the compiler option, the compiler option overrides
> >> the specified build path (it overrides both the path and the output
> >> SWF
> >> filename) which seems quite understable.
> >>
> >> What seems missing is some kind of “js-compiler-output” parameter.
> >>
> >> But, at least, it seems to me that the js compiler should use the
> >> path from the “-output” option when building its own output path…and
> >> not the source path.
> >>
> >> All suggestions are welcome !
> >>
> >> Nicolas Granon
> >>
> >> [signature_e_mail]
> >>
> >> De : Piotr Zarzycki [mailto:[hidden email]]
> >> Envoyé : lundi 25 septembre 2017 14:14 À :
> >> [hidden email]<mailto:[hidden email]>;
> >> [hidden email]<mailto:[hidden email]>
> >> Objet : Re: [FlexJS] Output folders with FB
> >>
> >> Hi Nicolas,
> >>
> >> The first which come up to my mind is to specify for compiler option
> >> - output=pathtofolder.
> >>
> >> Glad to hear that you are trying FlexJS!
> >>
> >> Thanks, Piotr
> >>
> >>
> >> 2017-09-25 14:01 GMT+02:00 Nicolas Granon
> >> <[hidden email]<mailto:[hidden email]>>:
> >> We are currently investigating FlexJS (we have a large code base
> >> developed with Flex 4.7, using FlashBuilder 4.7 and have to decide
> to
> >> migrate to FlexJS or ReactJS).
> >>
> >>
> >>
> >> Our concern is about web apps only (we will keep all AIR apps as
> they
> >> are).
> >>
> >>
> >>
> >> On our first tests, we have successfully installed FlexJS 0.8.
> >>
> >> FB seems to compile correctly to both SWF and JS.
> >>
> >>
> >>
> >> However, we cannot figure out how we can setup FB so that the JS
> >> output is sent to a location relative to the SWF output ???
> >>
> >> We send the SWF output (using FB's project settings / output folder)
> >> to a folder under the http server root (in the bin-debug folder) but
> >> the generated js version always goes automatically in the
> >> bin/js-debug folder located in the workspace/project folder.
> >>
> >>
> >>
> >> How is it possible to override the output folder for the js version
> ?
> >> (since of course there is nothing in FB for specifying JS output
> >> folders)
> >>
> >> Shouldn't it go automatically to the bin/js-debug relative to the
> >> bin- debug folder ? Or is there a compiler option that must be set
> in
> >> the project settings/compiler pane ?
> >>
> >>
> >>
> >> (our setup is windows, FlashBuilder 4.7)
> >>
> >>
> >>
> >> Many thanks in advance
> >>
> >>
> >>
> >> Nicolas
> >>
> >>
> >>
> >> --
> >>
> >>
> >>
> >>
> >> --
> >>
> >> Piotr Zarzycki
> >>
> >> mobile: +48 880 859 557
> >> skype: zarzycki10
> >>
> >> LinkedIn:
> >>
> >>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l
> i
> >>nke
> >>din.com%2Fpiotrzarzycki&data=02%7C01%7C%7C29af24245ba04419596108d5044
> f
> >>3f9
> >>0%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419660775178744&sda
> t
> >>a=f
> >>tJm0JriFYtt8GE7xlbiOzbLxVzcSkN9iChnB%2BBGAsw%3D&reserved=0<https://na
> 0
> >>1.s
> >>afelinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.pro
> t
> >>ect
> >>ion&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7Cfa7b1b5a7b34
> 4
> >>387
> >>94aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=eTseR2dPXKgkFfMIP
> d
> >>qOD
> >>enqdLSNmvPSw54mOi8qrX0%3D&reserved=0
> >>
> >>.outlook.com/?url=https%3A%2F%2Fpl.linkedin.com%2Fin%2Fpiotr-
> zarzycki-
> >>
> >>92a53552&data=02%7C01%7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5
> a
> >>7
> >>
> >>b34438794aed2c178decee1%7C0%7C0%7C636419523962836460&sdata=6SYIu2fzoj
> Q
> >>0  fyT1PzMZA0EFvJbLfl%2FXJM6A27JVbHo%3D&reserved=0>
> >>
> >> GitHub:
> >>
> >>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
> u
> >>b.c
> >>om%2Fpiotrzarzycki21&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f
> 9
> >>0%7
> >>Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=
> C
> >>vh%
> >>2B73itACKqEqgjhcF47O%2Bbdz1d6MGnehIQRalKShE%3D&reserved=0<https://na0
> 1
> >>.sa
> >>felinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.prot
> e
> >>cti
> >>on.ou&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7Cfa7b1b5a7b
> 3
> >>443
> >>8794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=rI2Mscn0POAqguo
> X
> >>IR%
> >>2BEf4aNYzA%2BdYKY%2F0lUEml4kUA%3D&reserved=0
> >>
> >>tlook.com/?url=https%3A%2F%2Fgithub.com%2Fpiotrzarzycki21&data=02%7C0
> 1
> >>%
> >>7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7b34438794aed2c178dec
> e
> >>e
> >>
> >>1%7C0%7C0%7C636419523962836460&sdata=oQOlISfb1SZU4xiP31mZa%2Bxztie9hl
> s
> >>3
> >> 9tEphlXOW6o%3D&reserved=0>
> >


Reply | Threaded
Open this post in threaded view
|

Re: [FlexJS] Output folders with FB

Alex Harui-2
Hi Nicolas,

OK, I looked into it.  Turns out that FB doesn't use the -output
parameter.  Please file a JIRA bug so we can track this issue.

A workaround is to specify the output parameter in a -config.xml file.  If
you don't already have one specified in your project, you can always
create a -config.xml file in the src folder for your project.  The
compiler automatically looks for a <projectname>-config.xml file in the
same folder as the main .MXML file.

For example, I was testing with a DataBindingExample project with the main
MXML file in src/DataBindingExample.mxml.  I created a
DataBindingExample-config.xml file in the src folder and its contents are:

<flex-config>
       
 
<output>/Users/aharui/temp/AltFolder/bin-debug/DataBindingExample.swf</outp
ut>
       
</flex-config>

Then the compiler put the output in
/Users/aharui/temp/AltFolder/bin/js-debug


HTH,
-Alex

On 9/25/17, 3:07 PM, "Idylog - Nicolas Granon" <[hidden email]> wrote:

>Alex, thank you for your answer.
>
>OK.
>
>Here is exactly what I have done so far.
>(FB 4.7, Windows).
>
>The project itself is minimal, since I only wanted to validate that the
>installation was correct and that FB could compile.
>In fact, it is the 'hello world' project.
>
>All settings described below are in the 'project settings' of FB, "Flex
>compiler" pane.
>
>Compiler options that I have tried :
>
>-output=<some existing folder>
>Is invalid if the folder already exists. I believe you cannot have
>-output to a folder. You should have -output to a filename. If you
>specify a folder, no output is generated at all (or you have the 'ok'
>button greyed and cannot validate the compiler settings). Probably FB
>sees that the output name is a folder and not a file.
>
>-output=<some folder><filename>
>Works ok for the SWF output. If <filename> has an inconsistent extension
>(or no extension at all), the resulting file is named "as is".
>If <filename> exists, it is overwritten.
>The JS output goes under the project root, in bin/js-debug, and is named
>after the project name. the filename specified is ignored.
>("JS output" means 3 files : index.html, <projectname>.js and
><projectname>.css, plus subdirs and all their content).
>
>-targets=JSFlex -output=<somefolder><filename>
>An empty (length=0) file is created in the output dir.
>The JS output is generated exactly as before.
>
>Tried to use forward slashes instead of backslashes in the path : the
>results are identical.
>
>When launching the compiler *from the command line*, tried both
>-output=<somepath> and -output=<somepath><filename>
>Both work.
>If no <filename> specified, the resulting file has the name of the
>project.
>If a filename is specified, the filename is used.
>All files are correctly directed to the <somepath> specified (folders are
>created as expected, bin-debug, bin/js-debug).
>
>In FB settings :
>You cannot specify the *same* output folder in the "build path output
>folder" and as an additional compiler option : if you do, you get an
>"access denied" error (in the "errors" pane of FB, which is logical since
>the -output option expects a file name, while the "build output folder"
>expects a folder).
>
>All checks are done through the file system (explorer) including
>timestamp check. Not through the FB "package explorer" pane.
>
>All outputs are valid (can be loaded in browser and display correctly)
>which is good news !
>
>So, yes, I can confirm that, when using the "build path" options and/or
>the "additional compiler arguments" of FB, the resulting JS output is
>always sent to <project path> and never to <build output path>.
>
>I do not have any specific or fancy internal mappings, virtual drives or
>anything special. All tests are made on a local hard drive. OS is Win7.
>I can make snapshots of FB settings if you think that could help...???
>
>Maybe somebody else is using FB under Windows and could confirm ?
>
>Nicolas Granon
>
>
>
>
>> -----Message d'origine-----
>> De : Alex Harui [mailto:[hidden email]]
>> Envoyé : lundi 25 septembre 2017 22:46
>> À : [hidden email]; [hidden email]
>> Objet : Re: [FlexJS] Output folders with FB
>>
>> The FB project settings are combined with any "Additional compiler
>> arguments" and passed to the compiler.  I have a hard time believing
>> that the compiler in 0.8.0 would write a SWF according to the -output
>> parameter but would then not write bin/js-debug to the _grandparent_ of
>> the SWF file specified, because there should only be one compiler
>> "launch" to create both when targets=SWF,JSFlex.  But you never know,
>> this is relatively new code.
>>
>> It would be easier for me to believe that FB is making assumptions.  FB
>> doesn't launch the compiler like you did on the command line.  It loads
>> the compiler class via a bunch of jars and calls directly into the
>> compiler's entry points.  There are several classes in FB code we don't
>> control that are involved and they might assume a SWF is being created.
>> Apache Flex owns one jar specific to FB integration and we don't know
>> the code that well so there is a chance that some code we own is
>> involved, but it is unlikely.
>>
>> Just to double-check:  what did you set your -output parameter to?  If
>> you set it to:
>>
>>   -output=mypath\myfile.swf
>>
>>
>> Are you sure that there isn't now a bin/js-debug folder in the parent
>> folder of mypath (and not mypath itself)?  Then FB might have copied it
>> around or is showing it to you in the Package Explorer even though it
>> lives outside the project folder.
>>
>> HTH,
>> -Alex
>>
>> On 9/25/17, 12:54 PM, "Idylog - Nicolas Granon" <[hidden email]>
>> wrote:
>>
>> >Well, Alex, you are right : when launching from the command-line,
>> >everything goes to the specified dir.
>> >Even more surprising : *no* empty swf file generated (with
>> >"-targets=JSFlex" option).
>> >
>> >This is confusing... Is there any specific configuration for FB ? I
>> >thought that the "compiler options" from FB where simply applied to
>> the
>> >task. Seems like it does not work that way...
>> >We have to get the correct configuration (we do not want to have to
>> >launch a compile task manually on each save).
>> >
>> >Any clue ? (config file mismatch ? incorrect path to build task ?...)
>> >
>> >Nicolas Granon
>> >
>> >
>> >
>> >
>> >> -----Message d'origine-----
>> >> De : Alex Harui [mailto:[hidden email]] Envoyé : lundi 25
>> >> septembre 2017 18:53 À : [hidden email]; [hidden email]
>> >> Objet : Re: [FlexJS] Output folders with FB
>> >>
>> >> Hi Nicolas,
>> >>
>> >> I just tried setting –output= to an absolute path for the swf and it
>> >> worked for me.  It will take whatever path you specify for the SWF
>> >> and use the grandparent folder (not the parent) because it is
>> >> expecting the SWF to go in something like
>> /Users/username/output/bin-debug/foo.swf.
>> >> Then the JS output will go in  /Users/username/output/bin/js-debug.
>> >>
>> >> If it isn't working from within Flash Builder, try the command-line
>> >> (js/bin/mxmlc).  Also try manually deleting the bin/js-debug folder
>> >> to prove that you aren't seeing old output from before you changed
>> >> the settings and the new output is going somewhere else.
>> >>
>> >> HTH,
>> >> -Alex
>> >>
>> >> From: Idylog - Nicolas Granon
>> >> <[hidden email]<mailto:[hidden email]>>
>> >> Organization: IDYLOG
>> >> Reply-To: "[hidden email]<mailto:[hidden email]>"
>> >> <[hidden email]<mailto:[hidden email]>>,
>> >> "[hidden email]<mailto:[hidden email]>"
>> >> <[hidden email]<mailto:[hidden email]>>
>> >> Date: Monday, September 25, 2017 at 9:06 AM
>> >> To: "[hidden email]<mailto:[hidden email]>"
>> >> <[hidden email]<mailto:[hidden email]>>
>> >> Subject: RE: [FlexJS] Output folders with FB
>> >>
>> >> Hi Piotr,
>> >>
>> >> Many thanks for your answer.
>> >>
>> >> However, this does not work : the documentation clearly states that
>> >> the –output compiler option is used to specify an “output directory
>> >> AND file name”.
>> >> And that is true !
>> >>
>> >> If you add
>> >> -output=mypath\myfile.swf
>> >> to the compiler “command line” options it makes the compiler write
>> >> the SWF output with the name “myfile.swf” in the folder specified by
>> >> “mypath”.
>> >>
>> >> But the JS output is still written in the js-debug folder under the
>> >> workspace root !
>> >>
>> >> In fact, the “output folder” text input from “project > properties >
>> >> flex build path” pane just passes the text input value to the –
>> output
>> >> option of the compiler (after appending {project name}.swf).
>> >> The only difference is that if you specify the output folder in
>> “flex
>> >> build path” AND the compiler option, the compiler option overrides
>> >> the specified build path (it overrides both the path and the output
>> >> SWF
>> >> filename) which seems quite understable.
>> >>
>> >> What seems missing is some kind of “js-compiler-output” parameter.
>> >>
>> >> But, at least, it seems to me that the js compiler should use the
>> >> path from the “-output” option when building its own output path…and
>> >> not the source path.
>> >>
>> >> All suggestions are welcome !
>> >>
>> >> Nicolas Granon
>> >>
>> >> [signature_e_mail]
>> >>
>> >> De : Piotr Zarzycki [mailto:[hidden email]]
>> >> Envoyé : lundi 25 septembre 2017 14:14 À :
>> >> [hidden email]<mailto:[hidden email]>;
>> >> [hidden email]<mailto:[hidden email]>
>> >> Objet : Re: [FlexJS] Output folders with FB
>> >>
>> >> Hi Nicolas,
>> >>
>> >> The first which come up to my mind is to specify for compiler option
>> >> - output=pathtofolder.
>> >>
>> >> Glad to hear that you are trying FlexJS!
>> >>
>> >> Thanks, Piotr
>> >>
>> >>
>> >> 2017-09-25 14:01 GMT+02:00 Nicolas Granon
>> >> <[hidden email]<mailto:[hidden email]>>:
>> >> We are currently investigating FlexJS (we have a large code base
>> >> developed with Flex 4.7, using FlashBuilder 4.7 and have to decide
>> to
>> >> migrate to FlexJS or ReactJS).
>> >>
>> >>
>> >>
>> >> Our concern is about web apps only (we will keep all AIR apps as
>> they
>> >> are).
>> >>
>> >>
>> >>
>> >> On our first tests, we have successfully installed FlexJS 0.8.
>> >>
>> >> FB seems to compile correctly to both SWF and JS.
>> >>
>> >>
>> >>
>> >> However, we cannot figure out how we can setup FB so that the JS
>> >> output is sent to a location relative to the SWF output ???
>> >>
>> >> We send the SWF output (using FB's project settings / output folder)
>> >> to a folder under the http server root (in the bin-debug folder) but
>> >> the generated js version always goes automatically in the
>> >> bin/js-debug folder located in the workspace/project folder.
>> >>
>> >>
>> >>
>> >> How is it possible to override the output folder for the js version
>> ?
>> >> (since of course there is nothing in FB for specifying JS output
>> >> folders)
>> >>
>> >> Shouldn't it go automatically to the bin/js-debug relative to the
>> >> bin- debug folder ? Or is there a compiler option that must be set
>> in
>> >> the project settings/compiler pane ?
>> >>
>> >>
>> >>
>> >> (our setup is windows, FlashBuilder 4.7)
>> >>
>> >>
>> >>
>> >> Many thanks in advance
>> >>
>> >>
>> >>
>> >> Nicolas
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >>
>> >> Piotr Zarzycki
>> >>
>> >> mobile: +48 880 859 557
>> >> skype: zarzycki10
>> >>
>> >> LinkedIn:
>> >>
>> >>https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.l
>> i
>> >>nke
>> >>din.com%2Fpiotrzarzycki&data=02%7C01%7C%7C29af24245ba04419596108d5044
>> f
>> >>3f9
>> >>0%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419660775178744&sda
>> t
>> >>a=f
>> >>tJm0JriFYtt8GE7xlbiOzbLxVzcSkN9iChnB%2BBGAsw%3D&reserved=0<https://na
>> 0
>> >>1.s
>> >>afelinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.pro
>> t
>> >>ect
>> >>ion&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7Cfa7b1b5a7b34
>> 4
>> >>387
>> >>94aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=eTseR2dPXKgkFfMIP
>> d
>> >>qOD
>> >>enqdLSNmvPSw54mOi8qrX0%3D&reserved=0
>> >>
>> >>.outlook.com/?url=https%3A%2F%2Fpl.linkedin.com%2Fin%2Fpiotr-
>> zarzycki-
>> >>
>> >>92a53552&data=02%7C01%7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5
>> a
>> >>7
>> >>
>> >>b34438794aed2c178decee1%7C0%7C0%7C636419523962836460&sdata=6SYIu2fzoj
>> Q
>> >>0  fyT1PzMZA0EFvJbLfl%2FXJM6A27JVbHo%3D&reserved=0>
>> >>
>> >> GitHub:
>> >>
>> >>https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>> u
>> >>b.c
>> >>om%2Fpiotrzarzycki21&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f
>> 9
>> >>0%7
>> >>Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=
>> C
>> >>vh%
>> >>2B73itACKqEqgjhcF47O%2Bbdz1d6MGnehIQRalKShE%3D&reserved=0<https://na0
>> 1
>> >>.sa
>> >>felinks.protection.outlook.com/?url=https%3A%2F%2Fna01.safelinks.prot
>> e
>> >>cti
>> >>on.ou&data=02%7C01%7C%7C29af24245ba04419596108d5044f3f90%7Cfa7b1b5a7b
>> 3
>> >>443
>> >>8794aed2c178decee1%7C0%7C0%7C636419660775178744&sdata=rI2Mscn0POAqguo
>> X
>> >>IR%
>> >>2BEf4aNYzA%2BdYKY%2F0lUEml4kUA%3D&reserved=0
>> >>
>> >>tlook.com/?url=https%3A%2F%2Fgithub.com%2Fpiotrzarzycki21&data=02%7C0
>> 1
>> >>%
>> >>7C%7Cf1f069b8962f4acb644408d5042f64e3%7Cfa7b1b5a7b34438794aed2c178dec
>> e
>> >>e
>> >>
>> >>1%7C0%7C0%7C636419523962836460&sdata=oQOlISfb1SZU4xiP31mZa%2Bxztie9hl
>> s
>> >>3
>> >> 9tEphlXOW6o%3D&reserved=0>
>> >
>
>

Reply | Threaded
Open this post in threaded view
|

RE: [FlexJS] Output folders with FB

Idylog - Nicolas Granon
Hi Alex, (and all!)

I think that I have the solution :

I made a dump of the compiler settings (using the -dump-config option of mxmlc in the js/bin folder).
In the output file, I found a (commented out) -js-output option
I have put the -js-output option in the additional compiler arguments of FB (project settings > flex compiler) followed by a folder name.

All JS output is now correctly written to the -js-output specified folder.

(note : it seems you can use an "=" sign between the option key and the value (folder name), *or* a space. Adobe docs suggest that a space should be used for -output, so I guess a space is preferable for -js-output too.)
(note : no quotes needed for the destination folder, unless the folder name contains spaces)
(note : you can specify a non-existent folder. It will be created automatically).
(note : you specify only the "base" folder name. The "bin" folder and subfolders - js-debug etc. - will be automatically created inside that base folder).

So, here is the correct settings for output folders when using FB 4.7 (should be the same for FB 4.6, but I did not check).
Maybe you can use this and update the documentation ?

For debug build :
-----------------

The SWF output (and related files like html wrapper etc.) will go to the folder specified under "Project settings > Flex Build Path > Output folder.
The -output argument should *not* (in my opinion) be used under "Flex Compiler > Additional compiler arguments".
By default, FB suggest "bin-debug" as the name of the last folder of the output folder path, but any name can be used.


The JS output (and related files and subfolders) will, by default, go under the project root (in the workspace), unless the -js-output argument is added as an additional compiler argument (project settings > flex compiler).
The -js-output argument must specify a "base" folder, which can exist or not. If it does not exists, it will be created automatically.
A bin subfolder and a bin/js-debug folder will be created if necessary inside that base folder.
All JS output will go inside the bin/js-debug subfolder.
The preferred syntax (in my opinion) for the -js-output argument should use a space as the separator between the option key and the folder name. If the folder name contains spaces, it must be quoted.

For release build :
-------------------

JS output goes in js-release subfolder of the SAME base folder as the one used for debug build. The js-release subfolder will be created automatically if necessary.

This means that you cannot have different base folders *at the same time* for debug and release build for JS as you can have for SWF.

When outputting SWF, the destination folder is specified under "Export release build" and can be totally different from the one used for debug build.
When outputting JS, you would have to modify the -js-output compiler option if you do not want the release build go under the same base folder as the debug build.

Alternatively, one can use a "config.xml" file for the compiler as Alex said.
The content of a "config.xml" file overrides the interval settings of FB.
The additional compiler options from FB (Project settings > Flex compiler) override the options from the config.xml file, if any.
The name of the config.xml file can be specified in the additional compiler arguments inside FB (-load-config argument). If a file named {project name}-config.xml is found in the same folder as the entry point (usually {project_name}/src/) it will be used automatically. If the -load-config argument is used, any path/filename can be used. Several config.xml files can be chained using the += operator (instead of a space, which is a bit inconsistent).

If using a config.xml file, the compiler arguments will be <output/> and <js-output> for SWF output and JS output respectively.
Note that those elements are *outside* of the <compiler/> element.

Of course, the "run configuration(s)" in FB should point to the expected html file(s) !
This allows to have one run config pointing to the HTML/SWF output, and another one pointing to the HTML/JS output.
The same applies to debug configurations.


Alex, I do not think that filing a bug is necessary : the above explanations should allow FB users to setup their desired output folders correctly.


Many thanks for your help and to Piotr, too.

Nicolas Granon