Android NetRexx IDE prototype
This
document covers the purpose, features, requirements, installation and
use of the Android NetRexx development environment currently under
development by Kermit Kiser.
Purpose
The purpose
of this IDE is to enable Android applications to be developed in
NetRexx rather than the default limited Java environment provided by
Google.
Features
This IDE provides functions to
create Android projects in NetRexx format and to compile and test them
on an Android emulator or device.
Requirements
(This
IDE runs in the jEdit open source editor environment instead of the
Eclipse plugin environment provided with the Android SDK.)- The jEdit editor version 4.3+.
- jEdit plugins Errorlist, Console, and NetRexxScript.
- The full NetRexx distribution including NetRexxC.jar (NetRexx compiler) and NetRexxR.jar (NetRexx runtime library) - now included with the IDE.
- The Ant distribution. (The Ant NetRexx task is now included with the IDE) Android SDK beyond V7 requires Ant 1.8+.
- A current Java developer kit (JDK).
- The Android NetRexx IDE archive.
- The Android SDK.
Installation
- Download and install a current Java JDK: -- http://java.sun.com/javase/downloads/index.jsp
- Download and install jEdit 4.3+ if you do not already have it: -- http://www.jedit.org/index.php?page=download
- Install
the plugins listed under requirements by selecting "Plugins=>Plugin
Manager=>Install", checking the boxes for the plugins and clicking
the Install button.
- Download and unzip the NetRexx archive (now optional as recent build is included with the IDE) http://www.netrexx.org
- Download and install the Ant distribution: -- http://ant.apache.org/bindownload.cgi
- Download and install the Android SDK: -- http://developer.android.com/sdk/index.html
- Download
and unzip the "Android" IDE directory in the jEdit user home macros
directory: -- http://kenai.com/projects/netrexx-plus/downloads/directory/Android%20IDE
- Update environment variables -
add the Ant "bin" directory and the Android SDK "tools" and "platform-tools" directories to the execution PATH
Create or update the ANT_HOME variable to point to the Ant distribution
(If I get time I will eliminate some of these variable requirements.) - You
may need to download and install the Windows USB driver for Android
phones: http://developer.android.com/sdk/win-usb.html
Use
This
IDE consists primarily of several NetRexx scripts which run as jEdit
macros along with templates for a NetRexx Android starter
application and a special Ant build file for Android NetRexx projects.
Some of the macros will ask for the locations of the Android SDK, and
the NetRexxC.jar and NetRexxR.jar files but this should only be
required once.
The provided files are the following:
- Android NetRexx IDE prototype.html -- This document.
- android_update.nrx
-- starts the Android GUI configuration and update utility. Use
this first to download all target Android versions and to create
virtual devices (phones) for the emulator.
- debug_build.nrx
-- This macro will compile a NetRexx Android application
and sign it with a "debug" key for testing only. You must select the
Ant "netrexx-build.xml" file in your project's root directory.
- emulator.nrx
-- This macro will allow you to select an Android Virtual
Device and then will start the Android emulator using that device.
- install_2_emulator.nrx -- allows you to select and install an application (.apk) file to a running emulator
- install_2_usb.nrx -- allows
you to select and install an application (.apk) file to a USB attached
Android phone. The phone must be placed in debug mode first
(settings=>application=>development).
- list_devices.nrx -- shows a list of the virtual devices you have created
- netrexx-build.xml
-- the Ant build file required to create an Android application
from NetRexx source files. Automatically copied to new projects by
new_project macro.
- new_project.nrx -- this
macro displays a dialog screen to enter all needed parms then creates
an Android project in NetRexx format
- release_build.nrx
-- an Ant build that signs the application with your release key
for publishing via Google Market or any web site. To use this you must
first generate a signing key with the JDK as documented in the Android
SDK and add key.store and key.alias to your master build.properties
file in your user home directory. You will be prompted for the passwords
on each release build.
- set_adk_location.nrx -- prompts for, verifies and saves location of Android SDK. Called by other macros, not directly.
- set_NetRexxC_location.nrx -- prompts for, verifies and saves location of NetRexx compiler. Called by other macros, not directly.
- set_nrx_run_time_location.nrx -- prompts for, verifies and saves location of NetRexx runtime lib. Called by other macros, not directly.
- set_project_base_location.nrx -- prompts for, verifies and saves a base directory location for projects. Called by other macros, not directly.
- shell.nrx -- passes system commands to jEdit Console plugin via Beanshell subsystem
- start_debug_monitor.nrx -- starts the DDMS debugging monitor - use to monitor device logs, snap screen, etc.
- template.nrx.txt -- a starter application in NetRexx which is automatically copied to new projects. Customize as needed.
- uninstall_from_emulator.nrx
-- This can be faster than a manual uninstall on the emulator.
Requires you to select the main class file for the application.
- update_project.nrx - A new macro to update older projects to the newest build format.
- widget_provider.xml -- A sample widget provider definition file
- NetRexxC.jar -- A recent build of the NetRexx translator
- NetRexxR.jar -- A recent build of the NetRexx run time module
- ant-netrexx.jar -- A recent build of the NetRexx coded Ant task from RexxLA
Changelog
- 2011-12-12 == V2.1 - fix update_project
to replace build.properties and add property for pack.dir to direct
compile output, update netrexx-build.xml to correctly build classes
after R.java compile, switch to NetRexx 3.01RC2 files in distribution
zip.
- 2011-10-05 == V2.0 - works with SDK
Tools R15 and platform tools R9. Added update_project macro to update
older projects to the new build format implemented in SDK rev 14.
Included NetRexxC.jar, NetRexxR.jar and ant-netrexx.jar files. Added
fix to prevent nrx source files from being included in APKs.
- 2011-07-30
== v1.9 - tested with SDK Tools R12 and platform tools R6.
Updated uninstall_from_emulator macro to use adb uninstall. Improved adb server auto-start for faster installs.
- 2011-07-08
== v1.8 - modified to run on Unix systems (I tested on Ubuntu and Win 7) and SDK Tools R12.
The uninstall_from_emulator macro is not a reliable way to uninstall
from late Android versions.
Also the Android 1.5 build fix is no longer needed - they finally fixed what they broke and thus broke what I fixed!
- 2011-07-06
== v1.7 - replaced .bsh files with .nrx files, fixed problems with
servers not detached automatically and workfiles not auto-closed, moved
Beanshell interface to new shell.nrx module, added new project base
directory property to save typing
- 2011-05-18
== v1.6 - updated netrexx_build.xml for new SDK Tools r11 - property
var for lib dir
changed. The new platform-tools directory must be added to the OS path
now as adb.exe has moved. (Previous support was only tested for r5, r6,
r7)
- 2010-05-27
== v1.5 - updated new_project.nrx for new SDK Tools rev 6 dir
structures, patch to emulator.nrx for output format changed in "android
list avd" cmd
- 2010-02-16
== v1.4 - added widget_provider.xml and updated new_project.nrx to
create widget projects as well as activity projects (or both in one)
- 2010-01-13
== v1.3 - add release build support with digital signing for Android
1.5 , fix release_build macro to call build-release target
- 2010-01-07 == v1.2 - add debug build support for Android 1.5 platform (Google tech changed the build files radically at 1.6)
- 2010-01-07
== v1.1 - add start_debug_monitor macro to start Android
debug GUI (DDMS) (better than adb logcat to monitor logs plus has
screen capture support)
- 2010-01-04 == v1.0 - initial release with new project, build, updater and emulator support for Android platform 1.6/2.0