Skip to content

SalmaHayek

Elliott Hughes edited this page Jul 5, 2018 · 7 revisions

About the silly name: I needed a name for a repository containing useful Java classes shared by several projects.

I couldn't think of a good name, so I went for a nice name instead.

Features

This list is very incomplete, but gives some idea of a few of the larger facilities on offer:

  • PTextArea - One of the bigger things we offer is a high-performance text area. It's single-font, like JTextArea, but it's multi-color, like JTextPane. It has none of JTextPane's performance problems, though, and it has a fairly simple interface for adding custom colorers for file types you care about. It comes with colorers for popular languages such as C++, Java, and Ruby.

    Another big feature is built-in spelling checker support. It's even clever enough to check camelCaseWords if you're editing source, and also offers support for custom exception lists. It's fast, too, and unlike (say) Apple's built-in spelling checker is fast enough to check a whole document when you open it or paste, rather than waiting for you to move the caret out of a word before checking it.

    There's also support for hyperlinks, both of the mailer kind where (say) http://software.jessies.org/ is automatically turned into a link, but also in more sophisticated applications where you want arbitrary recognized text to be turned into a link to some function of the recognized text. Edit and SCM use this to link to bug databases and RFCs, for example, so that simply saying "Sun 6227617" or "RFC 2229" in a comment (or in this document as I'm writing it) is enough to get you a link to the relevant document.

  • Forms - Our forms package is also really useful. We think it's the best and easiest way to create dialogs. All the dialogs in all of our programs are produced this way, with a minimal amount of code. There's automatic support for all the features you'd expect, and it's even really easy to add "advanced" functionality like fields that search as-you-type.

  • Build System - Disappointed by the amount of boilerplate nonsense required by the likes of Ant, and disappointed by the relatively small amount of work such tools actually do for you, we've developed quite a sophisticated build system. It uses GNU make, but don't let that scare you: the whole point is that you can write pretty much anything (pure Java, Java + JNI, pure C++) and it'll do all the work for you.

    If you want, we can also automatically generate installable distributions. For Mac users, we create Mac ".app" bundles (containing universal binaries for Intel and PowerPC) and compress them into ".zip" files ready for distribution (not .dmg since https://github.com/software-jessies-org/jessies/commit/30ca8d44d28bcf63883fa0bd1a5009616c4948a6). For Linux users, we create ".deb" and ".rpm" packages. For Solaris users, we create ".pkg" packages. For MS Windows users, we create ".msi" installers.

    If you look at the "Makefile" at the top of any of our projects, you'll see that none of them requires more than a single "include" line. That's it! (Strictly, if you want to generate Windows installers you need to specify a UUID for your project. But that's only one extra line, that by definition you should never change.)

  • JavaHpp: javah(1) for C++ Programmers - Write your JNI code in C++ for improved clarity and correctness. See Better JNI through C++ for the original motivation. In a nutshell, we generate a C++ class corresponding to the Java class, and automatically write C functions to call the appropriate member function on the C++ class. There's a member function for every native method, that you need to implement. There's a member variable for every field that proxies for the actual Java object's corresponding field, so you can read and write the field as if it were a C++ member variable. C++ exceptions thrown in your JNI code are translated to Java exceptions.

    See the Terminator source for a good example of this in use.

Using our Debian package repository

We used to have one of these but code.google.com doesn't support it. Nor does github. Yeah, we've heard tell of https://bintray.com/ and https://packager.io/pricing. Mañana.

Downloads / Building from Source

The Changes are available separately.

Anonymous read-only Git access is available. Copy and paste these commands to get everything you need:

git clone https://github.com/software-jessies-org/jessies.git && cd jessies
make -C salma-hayek

Then you can optionally build our other main projects with:

make -C terminator
make -C evergreen

There's no longer a source distribution, but Git makes it easier for you to keep up to date, and makes it easier to submit patches.

If you just want to look, you can browse the repository.

All Platforms

You need Java 6 or later.

A JRE is enough to run our projects, but you need a JDK to build them.

You need Ruby 1.8 or later to run any of our projects.

You need GNU make 3.81 or later to build from source. The makefile will tell you what to do if you try to build with an old version.

To build the C++ parts, you'll need g++.

If you see this error, it means you're trying to build one of our projects without a copy of the salma-hayek library they all depend on:

Makefile:8: ../salma-hayek/lib/build/simple.make: No such file or directory
make: *** No rule to make target `../salma-hayek/lib/build/simple.make'.  Stop.

Check out or unpack a copy of salma-hayek and try again.

Mac OS

You need Mac OS 10.4 or later, and the latest Apple Java 6, available via Software Update.

You need the command-line tools supplied with Xcode 2.2.1 or later. The latest version of Xcode is available as a free download from Apple. Note that running the Xcode 2.2.1 installer will overwrite /usr/bin/make with version 3.80, so you need to upgrade to GNU make 3.81 after upgrading Xcode.
More recent versions of Xcode include an adequate make.

All our projects build universal binaries and libraries, suitable for both Intel and PowerPC Macs.

Ubuntu

We have more information about UbuntuSetup, including commands to install all the packages needed to build our projects.

Windows

Windows builds require Cygwin. We have more information about CygwinSetup if you're not already using it, and CygwinProblems.

To build the Windows installer, you need Microsoft's open source Windows installer compiler, WiX version 2 or 3, installed and on your path.

If you see this error when building on Cygwin:

light.exe : error LGHT0001 : COM object with CLSID {F94985D5-29F9-4743-9805-99BC3F35B678} is either not valid or not registered.

you also need MergeMod.dll to be installed and registered. An easy way to achieve this is to run the WiX version 3 installer.

Clone this wiki locally