View unanswered posts | View active topics


Reply to topic  [ 11 posts ] 
Your opinion on the Flex 2 workflow 
Author Message
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 10749
Location: Paris, France
Post Your opinion on the Flex 2 workflow
It is apparently frequent with FlexBuilder to compile multiple SWFs at once. We'll be happy to implement this kind of workflow (in the FlashDevelop way) but we need more understanding on this question.

- How you manage multiple compilations?
- Does it only concerns MXML files or AS files too?
- How do you choose the output SWF names?
- Do all these compilations share the same configuration?
- How do these RSL work?

We would like to integrate it without changing to much things in the GUI:
- we have the Output filename in the project properties,
- we have the "Always Compile" flag -- currently only the first selected item is used as the main project file,
- we have the pre/post build commands where we could run the hosted mxmlc compiler.


Sun Jun 03, 2007 9:35 pm
Profile WWW
Member

Joined: Fri Feb 17, 2006 3:39 pm
Posts: 49
Location: Boston
Post 
Typically when I do this on a single Flex project, I'll list several applications in the project properties. By default the SWF name is the same name as the file and to debug a specific application I'll right click on the file itself and choose Debug As.. or Run As... etc. These are usually MXML files but occasionally they can be AS files.

We have a few projects at work that are setup with more than one file that gets compiled into a SWF.

_________________
Tim
http://timwalling.com


Sun Jun 03, 2007 11:33 pm
Profile WWW
Member

Joined: Tue Mar 14, 2006 4:53 am
Posts: 82
Post 
just do it like visual studio does

have the project explorer become a "solution" explorer where multiple projects can be added, then you can setup projects individually and even add dependencies between them so that a build order is determined

i'd also like to provide my own config files to the compiler, i'd like an option to specificy a list of config files in the project and not have anything "automatically" added to the compiler's call line

how i work right now is i have a common config file which i load first, a target config file which is either debug or release, and finally a project specific config file

note that mxmlc will automatically look for and load any file that is named <name_of_compiled_file>-config.xml

so in my case, i run the compiler like so
Code:
mxmlc -load-config=common-config.xml -load-config=debug-config.xml -file-specs=myfile.mxml


which will also automatically load myfile-config.xml if found


mat


edit: in a solution you can also set which project is the "default" project for global actions like "run" and "build"


Mon Jun 04, 2007 3:08 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 10749
Location: Paris, France
Post 
derean wrote:
i'd also like to provide my own config files to the compiler, i'd like an option to specificy a list of config files in the project and not have anything "automatically" added to the compiler's call line

The compiler is now controled using a generated config file - so it's already possible to specify your own config files in the "additional options" (but it could be more friendly). Only options like debug mode, show warnings and the like are added to the command line.

twalling wrote:
We have a few projects at work that are setup with more than one file that gets compiled into a SWF.

I couldn't find the compiler options to specify (in a config file) several target files to compile - filespecs seem to allow only one file, or am I wrong?


Mon Jun 04, 2007 7:22 am
Profile WWW
Member

Joined: Fri Feb 17, 2006 3:39 pm
Posts: 49
Location: Boston
Post 
Philippe wrote:
I couldn't find the compiler options to specify (in a config file) several target files to compile - filespecs seem to allow only one file, or am I wrong?


When we build from within Flex Builder the targets are defined in the project settings, when we build command-line we're using Ant so we specify different targets that way.

I can send some sample project files if you'd like to see how Flex Builder lists the different applications being compiled.

_________________
Tim
http://timwalling.com


Mon Jun 04, 2007 12:09 pm
Profile WWW
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 10749
Location: Paris, France
Post 
twalling wrote:
Philippe wrote:
I couldn't find the compiler options to specify (in a config file) several target files to compile - filespecs seem to allow only one file, or am I wrong?


When we build from within Flex Builder the targets are defined in the project settings, when we build command-line we're using Ant so we specify different targets that way.

I can send some sample project files if you'd like to see how Flex Builder lists the different applications being compiled.

So you must call the MXMLC compiler for each target?

I'll be happy to try some sample projects - send what you can :)


Mon Jun 04, 2007 12:28 pm
Profile WWW
Member

Joined: Tue Mar 14, 2006 4:53 am
Posts: 82
Post 
Philippe wrote:
I couldn't find the compiler options to specify (in a config file) several target files to compile - filespecs seem to allow only one file, or am I wrong?


well the compiler documentation says:
MXMLC doc wrote:
-file-specs [path-element] [...]
a list of source files to compile, the last file specified will be
used as the target application (repeatable, default variable)


so i take it it will forcefully compile every file in the list, but consider only the last one as the application

obviously standard use would be to only specify the application source file since the compiler finds all import statements and determines itself what other files need to be compiled

UPDATE: it looks like the file-specs option is not in the docs any longer for the newest compiler, but here's what the new compiler's syntax help looks like

Adobe wrote:
Adobe Flex Compiler (mxmlc)
Version 2.0.1 build 155542
Copyright (c) 2004-2006 Adobe Systems, Inc. All rights reserved.

Usage: mxmlc [configuration options] [default arguments]

Configuration options may be set on the command line as
'-variable=value,value,value'. (The number of values required depends on the
particular variable.) Boolean options may be enabled with '-variable=true'
and disabled with '-variable=false', with '-variable' being shorthand for
'-variable=true'. Variables may be cleared by setting '-variable=' with no
value following the equals sign.

The default argument list is equivalent to setting the 'file-specs' variable.
The special string '--' may be used to terminate processing of named
configuration options and to force any remaining values on the command line
to be interpreted as default arguments.

In general, a given variable may only be set once, but a few variables may be
set multiple times if noted as 'repeatable' in their description; i.e.
'-a=x,y,z' may also be set as '-a=x -a=y -a=z' if 'a' is repeatable. A more
useful trait of repeatable variables is that by using the special syntax
'-variable+=value,value', the new values set will be appended to the current
value, rather than replacing the current value list.

Configuration variables sometimes have shortened aliases that make them
easier to type. Hierarchical dotted variable names will automatically have an
alias generated for their 'leaf' name, if it is unique.

Filenames specified on the command line must either be an absolute path or
relative to the current directory.


it seems giving a list of files at the end of the command line is the list of files to build


Mon Jun 04, 2007 12:53 pm
Profile
Member

Joined: Tue Mar 14, 2006 4:53 am
Posts: 82
Post 
so, any word on the direction taken?


Thu Jun 07, 2007 1:20 am
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 10749
Location: Paris, France
Post 
derean wrote:
so, any word on the direction taken?

For the moment we are going to release a more reliable build, then we'll work on "solutions" (groups of projects).
We'll probably also manage to optimize execution of mxmlc in the pre/post build commands.


Thu Jun 07, 2007 7:37 am
Profile WWW
Member

Joined: Tue Mar 14, 2006 4:53 am
Posts: 82
Post 
don't forget compc :)

its useful for RSL


Thu Jun 07, 2007 1:12 pm
Profile
Member

Joined: Mon Oct 16, 2006 12:02 am
Posts: 333
Location: Lviv, Ukraine
Post Re: Your opinion on the Flex 2 workflow
We have 1 source code for each target version of swf.
Custom flex-config.xml is used for compile each swf. (we using ant for production build).
Separate config is "dev" config, which is used for compilation in FD.

The ability to have several compilation profiles will be a good feature. But in my mind it is not as important as to have other abilities:

- Native support for compile swc libraries
- "Solution" approach with tracking projects dependencies.
- "Class Move/Rename" refactoring.

This is necessary for comfortable development large projects with a lot of modules and libraries.

PS: I've just seen that topic is so old.. )


Wed Oct 13, 2010 1:51 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 11 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.