My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
HowToBuildTheSimpleCompiler  
How To Build The Simple Compiler and Runtime Library
Featured
Updated Jul 2, 2009 by simpleco...@gmail.com

How To Build The Simple Compiler and Runtime Library

Requirements

Before attempting to build the Simple compiler and runtime library, you need to have the following software installed on your computer:

  • Java SDK 1.6 or newer
  • Android SDK 1.5 or newer
  • Ant version 1.7 or newer

Setup

After downloading or checking out the Simple source code, you need to set following environment variables:

  • JAVA_HOME needs to point to the root directory of your Java SDK installation
  • ANDROID_HOME needs to point to the root directory of your Android SDK installation
  • SIMPLE_HOME needs to point to the root directory of the Simple source distribution plus /dist plus the one of /linux, /mac or /windows (e.g. /home/name/simple/dist/linux)

Building

On Mac or Linux execute the following commands:

cd <root of your Simple source distribution>
ant clean all
chmod +x ${SIMPLE_HOME}/simplec

On Windows execute the following commands:

cd <root of your Simple source distribution>
ant clean all

The built Simple compiler can now be found in SIMPLE_HOME. On Windows its name is simplec.bat, on Mac or Linux it is simply simplec.

Comment by istry....@gmail.com, Jul 29, 2009

i have translate thie article into chinese if you need this article_ch please visit my Blog http://hi.baidu.com/istry

Comment by cdebetaz, Aug 12, 2009

Please, could you write a wiki with a step by step complete installation. Otherwise it will be impossible for lot of beginner programmers to use your software.

Comment by lenz1...@gmail.com, Aug 23, 2009

Step by step instalation on windows xp. Sorry it is only russian :( my english iz very bad http://blog.catfoto.ru/post/Simple-Basic-d0bad0bed0bcd0bfd0b8d0bbd18fd182d0bed180-d0b4d0bbd18f-ANDROID.aspx

Comment by Loen...@gmail.com, Sep 2, 2009

Ok i used to program with basic when i was a kid so I was looking forward to this but I'm having much difficulty installing all this stuff. For example:

SIMPLE_HOME needs to point to the root directory of the Simple source distribution plus /dist plus the one of /linux, /mac or /windows (e.g. /home/name/simple/dist/linux)

Theres no such directory on my machine, furthermore in the how to create a simple application article the SIMPLE_HOME needs to point to the root of the simple installation.

I tried to run simplec anyway because it was sitting in the simple installation directory and it gave me allot of text output and then an error:

.................;E:\Android\SimpleCompiler?.jar com.goog le.devtools.simple.compiler.Main whetever Exception in thread "main" java.lang.NullPointerException?

at com.google.devtools.simple.util.Preconditions.checkNotNull(Preconditi
ons.java:42)....................

Yes im super green, is there someone who can help me out?

Comment by Loen...@gmail.com, Sep 2, 2009

Ok update, my friend found a solution using google translate on Lenz1986s link, thanks a million for that lenz!

We got it working by typing "newsimpleproject.bat com.example.Test" first and then simplec "Test/simpleproject/project.properties"

I still only vaguely understand what just happens but at least we are one step further!

Comment by darkne...@gmail.com, Nov 7, 2009

c:\Users\admin\Desktop\simple>ant clean all Buildfile: build.xml does not exist! Build failed

why ???

Comment by mr.e.cam...@gmail.com, Nov 11, 2009

why is there no support being its supposed ro be basic and all?

Comment by danielle...@gmail.com, Nov 13, 2009

I've install all above package But when I process ant clean all command get "build.xml does not exist build fail" How can I fix this issue??

Comment by JimandMa...@gmail.com, Aug 15, 2010

Why does it have to be so difficult to set up the compiler? You would think the compiler would come with better instructions or better yet, as a program file ready to go.

Comment by aluru.ph...@gmail.com, Oct 6, 2010

ya good

Comment by harry...@gmail.com, Nov 21, 2010

I have installed all the appropriate files (I think) and I have set the environment variables, but I am confused as to how I can actually get the compiler started. Can anyone give me some step by step instructions as to how to install simple on a Windows XP? Thanks in advance.

Comment by paolobo1...@gmail.com, Mar 8, 2011

HI, I have this error (Ubuntu 10.04) <pre> ../simplec Tetris/simpleproject/project.properties ________Compiling com/google/devtools/simple/samples/tetris/Square.simple ________Compiling com/google/devtools/simple/samples/tetris/UpStep.simple ________Compiling com/google/devtools/simple/samples/tetris/DownStep.simple ________Compiling com/google/devtools/simple/samples/tetris/Brick.simple ________Compiling com/google/devtools/simple/samples/tetris/InvertedEll.simple ________Compiling com/google/devtools/simple/samples/tetris/Ell.simple ________Compiling com/google/devtools/simple/samples/tetris/Tetris.simple ________Compiling com/google/devtools/simple/samples/tetris/Bar.simple ________Compiling com/google/devtools/simple/samples/tetris/Podium.simple ________Generating Manifest File ________Packaging Tetris 8-mar-2011 15.04.27 com.google.devtools.simple.util.Execution execute INFO: ____Executing /pub/Linux/Android/android-sdk-linux_x86/platforms/android-1.5/tools/aapt package -v -f -M /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/AndroidManifest.xml -S /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/res -A /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../assets -I /pub/Linux/Android/android-sdk-linux_x86/platforms/android-1.5/android.jar -F /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/deploy/Tetris.ap_ Found 1 custom asset file in /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../assets Locale/Vendor pairs: /

Files: assets/empty.png Src: /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../assets/empty.png drawable/simple.png Src: /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/res/drawable/simple.png AndroidManifest.xml Src: /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/AndroidManifest.xml Including resources from package: /pub/Linux/Android/android-sdk-linux_x86/platforms/android-1.5/android.jar applyFileOverlay for drawable applyFileOverlay for layout applyFileOverlay for anim applyFileOverlay for xml applyFileOverlay for raw applyFileOverlay for color applyFileOverlay for menu (processed image /pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/res/drawable/simple.png: 103% size of source) (new resource id simple from drawable/simple.png #generated) Opening '/pub/USR/SimpleAndroid/samples/Tetris/simpleproject/../build/deploy/Tetris.ap_' Writing all files... 'assets/empty.png' (not compressed) 'res/drawable/simple.png' (not compressed) 'AndroidManifest.xml' (compressed 66%) 'resources.arsc' (not compressed) Generated 4 files Included 0 files from jar/zip files. Checking for deleted files Done! Exception in thread "main" java.lang.NoClassDefFoundError: com/android/apkbuilder/ApkBuilder at com.google.devtools.simple.compiler.Compiler.compile(Compiler.java:415) at com.google.devtools.simple.compiler.Main.main(Main.java:45) Caused by: java.lang.ClassNotFoundException: com.android.apkbuilder.ApkBuilder at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) ... 2 more </pre>

Comment by VlAle...@gmail.com, Mar 20, 2011

xp and ubuntu 10.04: Buildfile: build.xml not exist! Build failed

Comment by emore.an...@gmail.com, Jan 5, 2012

fortunatly it shoud be easy!!!!!!!! i am building programs for pc since 20 jears in basic and i can't even start writing code for android!!!!!

Comment by Joliesi...@gmail.com, Mar 12, 2012

my codes are not running


Sign in to add a comment
Powered by Google Project Hosting