Skip to content

Latest commit

 

History

History
192 lines (178 loc) · 9.53 KB

README.md

File metadata and controls

192 lines (178 loc) · 9.53 KB

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,

  1. in the list above this README, find Rexxoid.apk and click on it;
  2. in the page that appears, click the Raw tab;
  3. this should open a dialog offering a Save File option (at least Firefox does it!)
  4. 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.
####Importing my beloved REXX scripts
  • 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.
#Install REXX on my computer The repository contains as well a Linux and (yes!) a Windows version: the download process is identical: Raw + Save. Note that those executables are found under the REXX directory. However, given the many flavors these OS's are declined into, I would suggest you to build it by yourself. As explained below, the repository provides the appropriate makefiles and it's not so difficult to do. #Building REXX The libraries have been tested in several OS environments, which ascertains their portability and robustness. Besides classical OS's (Linux, MS Windows), Palm OS was one of the first candidate for writing "REXX for Palm OS" at the beginning of the 2000's. In 2010, REXX was ported to Android...

##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
    
###Detailed Instructions
  • 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

Building the .so files

  1. 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)
  2. Install Eclipse.  you can download it from here
  3. Install the Android plugin for Eclipse.  Go to that page and carefully follow the instructions.
  4. 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 ~
  5. 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.

  1. Start Eclipse, File -> Import… -> Android -> Existing Android Code Into Workspace -> Next
  2. 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.
  3. 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
  4. If you get interrupted by this infamous message:
    Unable to execute dex: java.nio.BufferOverflowException.
    (from http://stackoverflow.com/questions/20778767)
    1. Right click on project and go to properties
    2. Go to Java Build Path Screen (from left menu)
    3. Select Libraries Pane
    4. Highlight Android dependencies
    5. Click Remove
    6. Click Ok and restart at previous step.
  5. 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

  6. You must then see the Rexx Android King. Run qheure to test that everything is OK.
####Create the APK
  1. Right click on the project name "rexxoid" in the Package Explorer pane, then Android Tools -> Export Signed Application Package.
  2. If you don't yet have a keystore, select Create new keystore
  3. I suggest the target directory of your rexxoid.apk be [$home]/yaxx/android/bin
####Install the APK on your device Use the Android adb tool, from your [android sdk root]/platform-tools directory.
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-essential
Then, enter:
make clean rexx
This 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.