Skip to content

mayim/yaxx

 
 

Repository files navigation

LATEST RELEASE July, 22nd 2014 - "Horseshoe"
#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. #Installing REXX If you don't want to build Rexx or Rexxoid, but just install it, pre-built executables are provided for Android, Linux and Windows.

  • Navigate to the releases page
  • Download the appropriate version and file
  • Install it on your device.
    For Rexxoid (REXX on Android), 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.
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. ####Importing my beloved REXX scripts in Android
  • 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.
Note that tapping on a file or on an email attachment with a .rexx extension automatically launch Android REXX. #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 update
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.

About

Miscellaneous gemstones (REXX, YASP parser, PDA, Android...)

Resources

Stars

Watchers

Forks

Packages

No packages published