Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redbean (google code Issue 54) #33

Open
zwetan opened this issue Dec 28, 2015 · 0 comments
Open

redbean (google code Issue 54) #33

zwetan opened this issue Dec 28, 2015 · 0 comments
Labels
external related to external project

Comments

@zwetan
Copy link
Member

zwetan commented Dec 28, 2015

https://code.google.com/p/redtamarin/issues/detail?id=54


redbean will be the tool to use to

  • test redtamarin oriented project from an IDE
  • compile ABC files
  • compile group of ABC files into a SWF
  • compile projectors (EXE)

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.

the env var for the redtamarin SDK should be REDTAMARIN_HOME

to follow the standard: JAVA_HOME, ANT_HOME, AIR_HOME, PLAYERGLOBAL_HOME, etc.


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


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" );
}

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


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


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.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external related to external project
Projects
None yet
Development

No branches or pull requests

1 participant