LATEST RELEASE
August, 28th 2014 - "Emerald b3" |
-
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 (ANSI X3.274), and this is how most people will understand YAXX.
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.REXX scripts can be found here: on a time permits basis, I will try to add the most relevant examples. Also, you will find here a series of screenshots describing in short how Rexx shows up on an Android device. If you don't want to build Rexx or Rexxoid, but just install it, pre-built executables are provided for Android, Linux and Windows.
- For Rexxoid -- Rexx for Android -- the recommended way is to install it from Google Play Store, or, only as an alternative, you can download it using the procedure described next and mail the Rexxoid.apk file to your email account on your android device.
-
To download Rexx to your computer:
- Navigate to the releases page
- Download the appropriate version and file
- Install it on your device.
- If the proposed pre-builts do not match your OS versions, you will have to build it by yourself. As explained below, the repository provides the appropriate makefiles and it's not so difficult to do.
- 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.
- First is to create the .so libraries required by the Java Native Interface.
- Then, to build the
rexxoid.apk
. It adds the Android's Graphic User Interface (GUI layer) leading to the final and only piece to upload to the Android device. We will make this Application PacKage by creating an Android Project under the Eclipse IDE.
cd ~/yaxx/android (your path to the android ndk)/ndk-buildThis produces the .SO files in
~/yaxx/android/libs/armeabi
"libs/armeabi" needs to be ln -s'ed from your Android project directory.
cd ~/yaxx/android ant clean releaseproduces the final Rexxoid-release.apk in the android/bin 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 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.
- Install Eclipse. you can download it from here
- Install the Android plugin for Eclipse. Go to that page and carefully follow the instructions.
- 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
android
tool provides a mean to create a
build.xml file for Apache Ant. Such one can be found under the android
directory. You could recreate it by entering
(path to your SDK/tools directory)android update project -p (your eclipse project directory)Use the Android adb tool, from your [android sdk root]/platform-tools directory.
With your phone device adb-connected to your computer, do
cd ~/android-sdks/platform-tools cp ~/yaxx/android/bin/rexxoid.apk . adb install rexxoid.apk rm rexxoid.apkOn a Linux build machine, to produce the Linux-executable REXX module requires the build tools to be installed first:
sudo apt-get update 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 no more use MS-Windows since years -- but it has chances to work. The "makeall.bat" file might help.