Giter Site home page Giter Site logo

zetes's Introduction

Zetes

Zetes is a crossplatform lightweight framework which allows the user to develop console or native-looking GUI programs, written in Java, that could run on a machine without any JVM installed.

The core of Zetes is built upon Avian Java machine implementation which would be embedded into every target binary thus your program could run without any dependencies except the system API. Imagine your program that has been written in Java and it even could run external jars, but it doesn't need any JRE or JDK installed at all. Really. It's just an exe file. And in addition it has a beautiful GUI (based upon SWT).

The main feature of the library is that it makes a thin wrapper on SWT and basic system libraries that makes it possible to make an app which has a native look-and-feel under different platforms. For example, the "Exit" item is in system menu on OS X, but in "File" menu under Windows; about box has "OK" button in Windows, but doesn't have any on OS X and so on...

The user of the library shouldn't think about such differences. That's why Zetes could be useful.

Supported OS

Fully supported at the moment:

  • Windows (XP - 7) i686 (32 bit) or x86_64 (64 bit)
  • OS X 10.8 Mountain Lion

Partially supported (only console applications, no GUI yet):

  • Ubuntu 12.10 or any compatible (x86_64)
  • Raspbian on Raspberry Pi board (armv6l processor, a Debian-based linux)

Hopefully it should work under any Intel-based Linux, Windows or Mac platform and on everything compatible with Raspberry Pi.

Building Zetes and demo applications

At first you should prepare the environment. Although Zetes is a crossplatform library and its building process is the same on any supported platform, at first you need to prepare environment and this preparation is a different process on different platforms.

Environment on Windows on i686 (32 bit) and x86_64 (64 bit)

As soon as Windows isn't a POSIX platform, the environment preparation isn't completely trivial. In Windows it would take about 10-15 minutes.

Download and install Oracle JDK 7 (it isn't needed to run the target binaries, but it's used to build them and the framework itself, cause it doesn't contain any Java compiler tool). You can get it from the official download site.

This framework is made crossplatform and it needs Unix compilers and tools to work, so under Windows you need mingw-w64 to build (and use) it. If you have a 32-bit OS, don't worry โ€“ mingw-w64 doesn't have only 64-bit tools, but 32-bit versions too.

Go to http://mingw-w64.sourceforge.net site, find Mingw-builds title there. Under this title you will find a list of implementations for different windows platforms and a small link to the universal installer (the direct link to the installer). Download this installer, run it and install any mingw toolchain, suitable for your system. Avoid installing it to a default "Program Files" folder cause you could have problems with configuration. I'd recommend c:\mingw\mingw-builds<i>name_of_toolchain\

Now you have gcc compiler, but don't have a proper unix environment for it. You should take it from the same place. It's called MSYS and located in the same sourceforge repo as mingw-w64.

Open http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/ and download the latest msys+7za+wget+svn+git+mercurial+cvs-rev??.7z version. The direct link to the current version is msys+7za+wget+svn+git+mercurial+cvs-rev13.7z

Extract the archive contents to some folder near your mingw compiler toolchain (I recommend c:\mingw\mingw-builds\msys).

Enter the subdirectory etc under the newly created directory msys. There you'll find a file named fstab. Open it with your favorite plain-text editor (notepad or notepad++ or something...) and insert there a line

c:/mingw/mingw-builds/<name_of_toolchain>/mingw<XX>		/mingw

where the path should be changed to your path and XX is "32" on i686 system and "64" on x86_64. The entered path should exist and contain the compiler toolchain. for example, on my machine this line looks like this:

c:/mingw/mingw-builds/x64-4.8.1-posix-seh-rev3/mingw64		/mingw

And the last preparation. You should set a couple of variables for your MSYS profile to connect it to your JDK.

In the same directory as fstab there is a file named profile. Open it. It contains many commands used to initialize MSYS environment. You should add a one or two lines to its end.

On 32-bit system write one line:

export JAVA_HOME="<directory_where_jdk_installed>"

On 64-bit system you should write two lines

export JAVA_HOME="<directory_where_jdk_installed>"
export ARCH=x86_64

For example, on my machine it looks like

export JAVA_HOME="C:\Program Files\Java\jdk1.7.0_17"
export ARCH=x86_64

Now let's check the configuration. Make sure you saved all the files you've edited recently. Go to your msys directory and run msys.bat script there. It will open a terminal window for you. This terminal isn't a simple one. It's an MSYS terminal. You will use it to work with Zetes framework and your projects dependent on it.

Let's do two tests to ensure everything's configured fine:

Test 1

Enter this command to MSYS terminal:

gcc

If you see something like

gcc.exe: fatal error: no input files

then gcc compiler (and all the toolchain) is installed properly. If the response is like "command not found", something went wrong.

Test 2

Enter this command to MSYS terminal:

"$JAVA_HOME/bin/javac"

Notice this quote marks. They are necessary. As a response you should see a long "usage" instruction for javac Java Compiler tool. If not, something went wrong.

Congratulations! You have configured your environment successfully.

Building Zetes

This part is much easier then the previous one

Open the MSYS terminal (with msys.bat). Enter your Projects folder. Now you should get Zetes source.

git clone https://github.com/bigfatbrowncat/zetes.git

Wait till it ends downloading the repo, enter newly created zetes folder and write

make all

Zetes will be built with all demo projects.

zetes's People

Contributors

bigfatbrowncat avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.