Note: this readme is far to be finished and I hope to complete it over time…
NEW REVISION (July, 22nd 21014) "Horseshoe" See what's new
#What is YAXX? One could consider YAXX as a collection of many pieces of code that have been developed along a period of 20 years of fun at doing programming.
-
toolslib gathers C++ objects that were missing from the original C++ libraries (and, in my opinion, the gap was never filled the way Java designers did it later.)
-
decnblib is Mike Cowlishaw's decimal number library, getting rid of the 16-bit arithmetic barrier
-
stdiolib makes a bridge from the C-stdio to java, easing the exchange of data via streams.
-
yasp3lib is an SGML Parser (SGML being the precursor of XML)
-
rexxlib provides all objects and methods required by the implementation of the Rexx interpreter (Restructured extended editor)
Fortunately, YAXX is not just a miscellany of heterogeneous (although usefull) routines. It provides the means to build a REXX interpreter, and this is how most people will understand YAXX.
####Any doc?
No real detailed documentation. After all, Rexx is … Rexx, a well documented programming language and the Rexxoid application should be enough intuitive to get you up and running quite immediately. Nevertheless, you will find here a series of screenshots describing in short how Rexx shows up on an Android device.
Code name of the latest version is "Horseshoe".
#Install REXX on my Android Device
You say "I don't want to build Rexxoid, I just want to install it on my device".
OK, then get the already-built Rexxoid.apk
Assuming you read this README from the Jaxo github,
- in the list above this README, find Rexxoid.apk and click on it;
- in the page that appears, click the Raw tab;
- this should open a dialog offering a Save File option (at least Firefox does it!)
- Save the file and install it on your device.
The easiest way is to mail the Rexxoid.apk file to your email account on your android device. Then, you can install straight from the mail.
- Insert a comment in the first line of each script, with a couple of words identifying the script.
- Send the script(s) as mail attachments to your email account on your android device, open the mail, save the attachment.
- Start REXX and press to the (hardware) left button on your phone. In the options menu, choose import.
##Rexx on Android You need the appropriate android / eclipse project, and to build the .so libraries.
- The Android Eclipse project — the GUI layer — is named *Rexxoid*.
- YAXX (this GIT) only builds the .SO libraries, which represents 95% of the whole edifice.
###Summary, only for experts
cd ~/yaxx/android /path/to/android_ndk/ndk-build
This produces the .SO files in ~/yaxx/android/libs/armeabi
"libs/armeabi" needs to be ln -s'ed from your Android project directory.
My Personal Cheatsheet
- the ~/yaxx/android/jni directory contains the android makefiles;
- to examine .so entries, do
nm -gC libtoolslib.so
or,readelf -Ws libtoolslib.so | awk "{print $8}"
- to start an emulator from the console:
android create avd --force -n petrus -t 10 -c 2G emulator -avd petrus
- These instructions have been tested on Linux Ubuntu 12.04
- In what follows, you must replace the symbol [\$home] with the fully qualified name of your home directory.
Ex: [\$home] -> /home/myuserid
- First is to get yaxx from this git
cd ~ git clone https://github.com/Jaxo/yaxx.git
creates the yaxx directory in your home (i.e.:[$home]/yaxx
)
- Install Eclipse. you can download it from here
- Install the Android plugin for Eclipse. Go to that page and carefully follow the instructions.
- Install the Android NDK: android-ndk-r9-linux-x86.tar.bz2 from here
"NDK" — not to be confused with "SDK" — is a complementary tool.
To install it, after download, I did:cd /usr/local sudo mv ~/Downloads/android-ndk-r9-linux-x86.tar.bz2 . sudo tar -xjvf android-ndk-r9-linux-x86.tar.bz2 sudo rm android-ndk-r9-linux-x86.tar.bz2 cd ~
- Build the .so:
cd ~/yaxx/android /usr/local/android-ndk-r9/ndk-build
The ".so" files are created in~/yaxx/android/libs/armeabi
. Later, these will be symbolically linked from the Eclipse Android project.
####Create and run the "Rexxoid" project in Eclipse
Before to start, you may want you get acquainted to Android debug mechanism at reading
this document.
- Start Eclipse, File -> Import… -> Android -> Existing Android Code Into Workspace -> Next
- In the dialog Import Projects:
Root Directory: [$home]/yaxx/android Copy projects into workspace stays unchecked Add project to working sets stays unchecked
Press Finish.
-
Right click on the project name "rexxoid" in the Package Explorer pane, then Debug As -> Android Application.
It is Android Application, do not choose Android Native Application -
If you get interrupted by this infamous message:
Unable to execute dex: java.nio.BufferOverflowException.
(from http://stackoverflow.com/questions/20778767)- Right click on project and go to properties
- Go to Java Build Path Screen (from left menu)
- Select Libraries Pane
- Highlight Android dependencies
- Click Remove
- Click Ok and restart at previous step.
- The Android Device Chooser dialog will probably show up, since you didn't tell what Android Virtual Device you wanted to run with.
- check Launch a new Android Virtual Device
- Press the Manager… button
- In the Android Virtual Device Manager dialog, press the New… button
- In the Create a new Android Virtual Device (AVD) dialog, press the New… button, and enter:
AVD Name: RexxDevice Device: 3.2" QVGA (ADP2) Target: Android 2.2 - API Level 8 SD Card: 10MiB
The 3rd parameter (Target) is important: you must select a device with min API level 8! For the other parameters, it's up to your taste. - Press OK and close the Create a new Android Virtual Device (AVD) dialog
- Back to the Android Device Chooser dialog, press Refresh, select the newly created device, press OK
- Wait 2 or 3 minutes until the Android device gets ready
- You must then see the Rexx Android King. Run qheure to test that everything is OK.
- Right click on the project name "rexxoid" in the Package Explorer pane, then Android Tools -> Export Signed Application Package.
- If you don't yet have a keystore, select Create new keystore
- I suggest the target directory of your rexxoid.apk be [$home]/yaxx/android/bin
With your phone device adb-connected to your computer,
cd ~/android-sdks/platform-tools cp ~/yaxx/android/bin/rexxoid.apk . adb install rexxoid.apk rm rexxoid.apk##Rexx on Linux, Windows, … On a Linux build machine, to produce the Linux-executable REXX module requires the build tools to be installed first:
sudo apt-get upgrade sudo apt-get install build-essentialThen, enter:
make clean rexxThis is it!
To produce a WIN32 executable, (aka rexx.exe) is also doable. You need a cross-compiler, that is, mingw-w64:
sudo apt-get install mingw-w64 make os=win32 clean rexx
On a MS Windows machine, you might be able to produce an executable using MS development tools. The repository has still the dsp/dsw files required by Visual C++ and the like. I didn't test it -- I have no more Windows since decades -- but it has chances to work. The "makeall.bat" file might help.