Open GoogleCodeExporter opened 9 years ago
we will test only IDE so far: Flash Builder 4.5 and 4.7
the goal is to produce a redbean executable
that replace the default builder
more details:
when you create an ActionScript project in Flash Builder
- go into project properties
- select "builders"
- you see by default a "Flex" builder
scenario would be
- desactivate the "Flex" builder
- create a new builder (program)
- open file system
- follow the path where the redtamarin SDK is installed
- in the redtamarin SDK select "/bin/redbean"
there the SDK could define an env var
REDTAMARIN_SDK = /opensource/redtamarin/sdks/0.3.5
which would allow instead of browsing the file system
to simply use
for OSX
${env_var:REDTAMARIN_SDK}/bin/redbean
for Windows
${env_var:REDTAMARIN_SDK}/bin/redbean.exe
other scenario
- desactivate the "Flex" builder
- create a new builder (ant builder)
- use "${project_loc}/build.xml"
- build.xml would define the path of the redtamarin SDK
- and which redbean executable to call
there we could provide a default Ant build.xml
which could
- define the path of the redtamarin SDK (need to he edited by the user)
- detect the operating system
- use the correct redbean executable
- etc.
Original comment by zwetan
on 16 Feb 2013 at 5:50
the env var for the redtamarin SDK should be REDTAMARIN_HOME
to foloow the standard: JAVA_HOME, ANT_HOME, AIR_HOME, PLAYERGLOBAL_HOME, etc.
Original comment by zwetan
on 16 Feb 2013 at 5:53
how redbean should work
the builder by default should use
${env_var:REDTAMARIN_HOME}/bin/redbean
and there redbean would by default look for a build.as3 file
or you could force the executable to load a particular build file
${env_var:REDTAMARIN_HOME}/bin/redbean -f mybuild.as3
Original comment by zwetan
on 16 Feb 2013 at 5:54
basic minimum redbean API
public function compile( filepath:String, ...libraries ):void
public function shell( filepath:String, debug:Boolean = false, ...libraries
):void
public function projector( name:String, debug:Boolean = false, target:OS =
null, ...filepath ):void
a basic build script
build.as3
----
import redbean.*
var test:Boolean = true;
var debug:Boolean = true;
compile( "src/sysinfo.as", "avmglue.abc" );
if( test )
{
shell( "sysinfo.abc", debug, "avmglue.abc" );
}
else
{
projector( "sysinfo", false, "sysinfo.abc", "avmglue.abc" );
}
----
Original comment by zwetan
on 16 Feb 2013 at 5:58
API related to the command line
API: compile( "src/sysinfo.as", "avmglue.abc" );
CLI: java -jar asc.jar -AS3 -import builtin.abc -import toplevel.abc -import
avmglue.abc src/sysinfo.as
API: shell( "sysinfo.abc", true, "avmglue.abc" );
CLI: ./redshell_d avmglue.abc sysinfo.abc
API: projector( "sysinfo", false, "sysinfo.abc", "avmglue.abc" );
CLI: ./swfmake -o program.swf avmglue.abc sysinfo.abc; ./createprojector -exe
redshell -o sysinfo program.swf
Original comment by zwetan
on 16 Feb 2013 at 6:04
correction, exemple with projector should be
projector( "sysinfo", false, null, "sysinfo.abc", "avmglue.abc" );
null for use the default OS
or
projector( "sysinfo", false, OS.windows, "sysinfo.abc", "avmglue.abc" );
OS would contains either
OS.unknown/OS.default - to compile for the current OS
(eg. if you run the build under OSX, then you compile by default for OSX)
OS.linux - to compile for Linux Debian/Ubuntu/CentOS
OS.windows - to compile for Windows
OS.macintosh - to compile for Mac OSX
OS.all - to compile for all OS: linux/windows/macintosh
Original comment by zwetan
on 16 Feb 2013 at 6:40
OS.linux , OS.windows, OS.macintosh mens by default 32bit
then when 64bit is supported we can add
OS.linux64, OS.windows64, OS.macintosh64
and then OS.all would mean all 32bits OS
and OS.all64 would mean all 64bits OS
and if needed we can add
OS.all96 (32+64=96) to compile all 32bits and 64bits OS
and/or
OS.windoww96 to compile both OS.windows and OS.windows64
etc.
Original comment by zwetan
on 16 Feb 2013 at 6:44
Original comment by zwetan
on 20 Nov 2013 at 5:13
Original comment by zwetan
on 15 Dec 2013 at 3:19
Original comment by zwetan
on 15 Dec 2013 at 4:21
Original issue reported on code.google.com by
zwetan
on 16 Feb 2013 at 5:36