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

create a redtamarin SDK (google code Issue 53) #32

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

create a redtamarin SDK (google code Issue 53) #32

zwetan opened this issue Dec 28, 2015 · 0 comments

Comments

@zwetan
Copy link
Member

zwetan commented Dec 28, 2015

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


currently the situation is like that

in a general manner "it is hard to use redtamarin"

  • it's hard to find the correct executable
  • it's hard to find what can be done with redtamarin
  • it's hard to setup an IDE to work on a redtamarin project
  • it's hard to test/debug/compile/etc.
  • it's even harder when people want to work with external abc libraries
  • and much more

A redtamarin SDK should help by providing a default organisation
of files, utilities, environment variables, etc.

scenario:

  • download an SDK
  • install the SDK (different versions can be installed in parallel)
  • follow an easy setup for the Flash Builder IDE
  • now you can write code, test/compile, produce projector easily

after many tests, relying on Ant to test/compile/etc. is not enough
so we will create our own build tool to cover the special cases

  • abc dependencies
  • include files generation
  • projector generation (for the current system, for other systems)

see #54 redbean


first support mainly Windows and OSX
(even though it should work with Linux too later)

2 parts of the SDK

  • environment variables setup
  • files distribution

env var
REDTAMARIN_HOME = /opensource/redtamarin/sdks/0.3.5
PATH = '$REDTAMARIN_HOME/bin:$PATH'

files

  • asc.jar
  • redshell, redshell.exe, redshell_d, redshell_d.exe
  • redbean, redbean.exe
  • builtin.abc, toplevel.abc, avmglue.abc

later we should provide more files like
abcdump, swfmake, etc.


the first redtamarin SDK will target version 0.3.2
and support only Windows and OSX

so we should be able to distribute an SDK before
the sync with tamarin-redux

then the next SDK will target v0.4.0
(which is more server oriented)
and so also support Linux (Debian, Ubuntu CentOS, maybe others)


we should organize the files in such a way that
we could support the same name for Linux and OSX

eg. no to different names, for ex: redbean and redbean.nix

but instead:
/linux/redbean
/osx/redbean


not only support the same names for different OS
but also for different bits

eg. 32bits vs 64bits

/linux/32/redbean
/linux/64/redbean

/osx/32/redbean
/osx/64/redbean


as we don't want complicated path for users

eg.
${env_var:REDTAMARIN_HOME}/bin/linux/32/redbean

we want simple path like
${env_var:REDTAMARIN_HOME}/bin/redbean

/bin/redbean should be a system shell scripts
that look into REDTAMARIN_OPTS

REDTAMARIN_HOME = /opensource/redtamarin/sdks/0.3.5
REDTAMARIN_OPTS = -d64

eg. like JAVA_OPTS use -d64 to run in 64bit


also we should have REDSHELL_OPTS for the avmshell running options

REDSHELL_OPTS = "-swfversion 9 -api FP_9_0"

and be very clear in the doc that
REDTAMARIN_OPTS is not the same as REDSHELL_OPTS
and explain the why/what/etc.

we also need a REDTAMARIN_PATH (like PYTHONPATH)
to allow to augment the default search path for library files (*.abc)

by default we could have this logic to search for libraries
CURRENT_PATH/name.abc
REDTAMARIN_PATH/name.abc
REDTAMARIN_HOME/abcs/name.abc

illustrated example:
you have myprogram.abc
which call loadLibrary( "avmglue.abc" )
running from the path /test/123/

with the env vars
REDTAMARIN_HOME = /opensource/redtamarin/sdks/0.3.5
REDTAMARIN_PATH = "/usr/share/redtamarin/lib:/users/zwetan/redlib"

loadLibrary() should then search in order

  1. /test/123/avmglue.abc
  2. /usr/share/redtamarin/lib/avmglue.abc
  3. /users/zwetan/redlib/avmglue.abc
  4. /opensource/redtamarin/sdks/0.3.5/abcs/avmglue.abc

if notfound in any of those paths then should
report an error "could not load library" or something alike


so far SDK structure would look like this

.
├── bin
│   ├── redbean
│   └── redbean.exe
├── lib
│   └── asc.jar
├── lib-abc
│   ├── avmglue.abc
│   ├── builtin.abc
│   └── toplevel.abc
├── lib-swc
│   └── redtamarin.swc
├── runtimes
│   └── redshell
│       └── 32
│           ├── nix
│           │   ├── redshell
│           │   └── redshell_d
│           ├── osx
│           │   ├── redshell
│           │   └── redshell_d
│           ├── osx105
│           │   ├── redshell
│           │   └── redshell_d
│           └── win
│               ├── redshell.exe
│               └── redshell_d.exe
└── tools
    └── redbean
        └── 32
            ├── nix
            │   └── redbean
            ├── osx
            │   └── redbean
            └── win
                └── redbean.exe

we will not start with v0.3.2 but with v0.4

eg. we make a clean cut between v0.4 and any older version

no backward compatibility, period


the SDK should have the functionality to

  • chose the path of an already installed Flex SDK
  • chose the path of an already installed AIR SDK

and/or

  • install a Flex SDK
  • install a AIR SDK
  • merge a AIR SDK with a Flex SDK

but

Flex and AIR SDK are OPTIONAL

our SDK and tools need to rely mainly and solely on asc.jar (and/or asc2.jar)
with maybe in a far away futur porting everything to AS3 (to avoid any dependencies on Java)


see #96 as3distro


see #97 redshell


let's clarify the role of everyone

RedTamarin SDK

  • distributed as a zip file
  • contains files and folders
  • have ONE installer script (that can rely on redshell)
  • define ENVIRONMENT VARS
  • generate default executable tools: redbean, as3distro

redshell

  • is our AS3 command line runtime
  • have NO DEPENDENCIES
  • the SDK contains all the versions: release, debug, debug-debugger
  • the SDK contains all the OS exe: Windows , Mac OS X, Linux
  • the SDK contains all the cpu architecture: 32-bit and 64-bit

redbean

  • is our AS3 make and compiler
  • have dependencies: redshell, ASC.jar, ASC2.jar
  • use by default: build.as3
  • can build ABC, SWF and EXE
  • can build complex SWF, SWC, AIR only if FLEX/AIR SDK is installed

as3distro

  • is our AS3 package manager
  • have dependencies: redshell, redbean
  • use by default: distro.as3
  • can distribute and install AS, ABC, SWF, SWC, AIR and EXE
  • can build complex AS sources, complex SWF, SWC, AIR only if FLEX/AIR SDK is installed

note: redtamarin EXE are not exactly the same as your Operating System EXE

  • we can distribute a very "little" *.abc or *.swf file
  • we merge one of the redshell exe wit this ABC or SWF to produce the EXE
  • if new redshell runtimes become available it should allow to produce new EXE directly

note: we make a difference between AS sources and complex AS sources

  • AS sources: AS3 source code that depends only on redtamarin libraries CLIB, RNL and AVMGLUE
  • complex AS sources: AS3 source code that depends on AIR/FLEX SDK

note: we make a difference between SWF and complex SWF

  • SWF: SWF file containing only doABC2 tags (will work only with redshell runtime)
  • complex SWF: SWF containing ANY tags (will work with Flash Player and/or AIR runtime)

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

No branches or pull requests

1 participant