Android package. 4tH 4tH Forth compiler
Reklam
Reklam
CHAPTER 3. INSTALLATION GUIDE 34 cd vi .profile
or: cd vi .bashrc
This will launch the editor and allow you to edit the appropriate file. In this example your default 4tH directory is /home/joe/4th: export DIR4TH=/home/joe/4th/
If 4tH is unable to find a sourcefile, e.g. lib/anscore.4th, it will try to load /home/joe/4th-
/lib/anscore.4th
. Do not forget to add the trailing slash. If you do, it will not work properly.
3.1.4.5
Updating
Simply install the package. Unless you’ve used a different location or different options the previous time, it will simply overwrite the previous executables. If you still have 4thd,
4thg
, 4thx or 4thc somewhere on your drive, delete them. That’s ancient stuff!
3.1.5
Android package
First, install the ”Android Terminal Emulator” by Jack Palevich
3
.
Important!
The shared_prefs folder is required. It only exists after you change the preferences in the terminal emulator.
So before commencing, change the text colour, font or something .
Note that on some devices /sdcard can only be accessed by /mnt/sdcard. Unzip the archive on your Linux, OS/X or Windows PC if your Android device lacks this capability.
3.1.5.1
Android 2.2
Support for Android 2.2 is experimental. Follow the instructions in section 3.1.5.2. Please report any problems you experience.
3
You can find this free application in your Android Market.
Homepage: https://github.com/jackpal/Android-Terminal-Emulator/wiki
CHAPTER 3. INSTALLATION GUIDE 35
3.1.5.2
Android 2.3+
Copy the following files from the install directory to any directory on the SD card of your ARM Android device:
• 4th
• 4tsh
• pp4th
• install23.sh
Start up the ”Android Terminal Emulator” and issue the following command: cd /sdcard cd <your directory> sh install23.sh
You will be asked two vital questions:
1. Are the 4th, 4tsh and pp4th files in your current working directory;
2. Is there an OK file in the ATE directory under /data/data.
If you can answer these questions affirmative, press the ”Enter” key, otherwise exit ATE.
Finally, you will be given a last chance to quit the installation script. If you want to continue, press ”Enter”. The application should respond:
(INFO ) Installing Android 4tH..
(INFO ) Android 4tH installed..
4tH is now installed on your Android device and you can close the ”Android Terminal
Emulator”. You can remove the files from the SD card if you wish.
3.1.5.3
Android 3+, 4+
Important!
Some Android 3+ devices don’t feature a full shell, so in some cases the following procedure won’t work and the script will fail with a shell error. This is not harmful to your device.
If that happens to you, please use the script install23.sh
instead and follow the procedure described in section 3.1.5.2.
Copy the following files from the install directory to the /sdcard/Download directory of your ARM Android device:
• 4th
• 4tsh
CHAPTER 3. INSTALLATION GUIDE
• pp4th
• install.sh
Start up the ”Android Terminal Emulator” and issue the following command: cd /sdcard/Download sh install.sh
36
The application should respond:
(INFO ) Installing Android 4tH..
(INFO ) Android 4tH installed..
4tH is now installed on your Android device and you can close the ”Android Terminal
Emulator”. You can remove the files from /sdcard/Download if you wish.
3.1.5.4
Postinstallation
Copy the 4th subdirectory to your Android device, e.g. /sdcard/4th. Start up the
”Android Terminal Emulator” and choose ”Preferences” from the top right menu. Scroll to
”Shell” and choose ”Initial command”. Edit it so it reads: export PATH=<original setting>:/data/data/jackpal.androidterm/ shared_prefs:$PATH;export DIR4TH=/sdcard/4th/
Make sure $PATH is declared only once, e.g.: export PATH=/data/local/bin:/data/data/jackpal.androidterm/ shared_prefs:$PATH;export DIR4TH=/sdcard/4th/
The installation is finished now. You can now restart the ”Android Terminal Emulator” and access 4tH by simply typing:
4th
At the prompt. If you use 4tH on a tablet you may also consider installing the ”Hackers keyboard” by Klaus Weidner
4
. Working with the ”Android Terminal Emulator” becomes a lot easier that way!
3.1.5.5
DIR4TH environment variable
This variable is used to indicate where 4tHs default directory is. If a sourcefile cannot be found in the current directory, the compiler
5 will try to get it here. If 4tH is unable to find a sourcefile, e.g. lib/anscore.4th, it will try to load /sdcard/4th-
/lib/anscore.4th
. Do not forget to add the trailing slash. If you do, it will not work properly.
4 http://code.google.com/p/hackerskeyboard/ Note Android will issue a warning about keyloggers. Don’t worry, it always does that when you install a non-standard input device. The ”Hackers keyboard” is Open Source and there are no indications it contains any malware.
5
That is: the compiler, not the editor or anything else.
İndir
Reklam