Skip to content

Build Instructions

Steven Frank edited this page Jan 20, 2017 · 33 revisions

How to build Einstein

General remarks

Einstein can currently be built for macOS and iOS using Xcode, or for Linux using Perforce Jam.

To run, Einstein requires a specially compiled Newton ROM extension (REx) file, and a Newton ROM dump.

About the ROM extension (REx)

For now, the ROM extension can only be built using Apple Newton C++ Tools and Apple Newton Toolkit, available on UNNA as part of the NewtonDev environment. The NewtonDev tools require a Mac OS 9 or Mac OS X "Classic" environment.

For your convenience, a pre-built binary of the Einstein REx is included under the _Data_ directory. (Note: The REx is not the ROM. We cannot distribute the ROM. Please read "About the ROM" below.)

Please see Known Issues for some issues you may encounter while running Einstein.

About the ROM

Einstein requires an 8 MB Newton ROM dump image (8,388,608 bytes exactly) to run. Please see Dumping The Rom for more information about extracting the ROM image from your owned Newton device.

Development efforts are currently concentrated on the 717006 ROM, which corresponds to Apple's last official release of Newton OS -- version 2.1.

For iOS builds, it must be named 717006.rom and in the application's Documents folder at runtime.

For the iOS simulator, the path to this file will be something like: /(Home)/Library/Application Support/iPhone Simulator/(SDK Version)/Applications/(Einstein UUID)/Documents/717006.rom

For an iOS device, use iTunes to copy the ROM file to the device as described on the iOS page.

For macOS, the ROM file can be selected at runtime.

An MD5 checksum of a known working ROM dump is 70dc5f5f3102e44f15dc93f356b98add.

Building on macOS, for macOS, using Xcode

  1. Get the latest Xcode from Apple and install it.
  2. Open Einstein.xcodeproj, located in _Build_/Xcode
  3. Choose Einstein as your Active Target.
  4. Build!

Building on macOS, for iOS, using Xcode

  1. Get the latest Xcode with iOS SDK from Apple and install it.
  2. Open Einstein.xcodeproj, located in _Build_/Xcode
  3. Choose iOSEinstein as your Active Target.
  4. From the same menu, choose whether you are building for Simulator or Device (actual hardware).
  5. Build!

Building on Linux, for Linux, using Jam

The following build process has been tested on a virtual machine running a completely fresh install of Ubuntu 16.04.1 Desktop (64-bit) configured with 2 GB of RAM.

  • Install dependencies
  • sudo apt install git
  • sudo apt install jam
  • sudo apt install gcc-multilib
  • sudo apt install g++-multilib
  • sudo apt install libx11-dev
  • sudo apt install libx11-dev:i386
  • sudo apt install portaudio19-dev
  • sudo apt install libexpat-dev
  • Clone the Einstein repository
  • git clone https://github.com/pguyot/Einstein.git
  • Build the "K" supporting library
  • cd Einstein/K/_Build_/Jam
  • jam
    • Expect quite a few warnings and other messages
    • If you see a message failed Link build.LINUX/KLibsTests ... failed updating 1 target(s), that's OK, as long as ./build.LINUX/libk.a now exists
  • Build Einstein
  • cd ../../../_Build_/Jam
  • jam -starget=linux -sjittarget=generic -sC++FLAGS="-I../../libffi-linux/include -L../../libffi-linux/lib" -sCCFLAGS="-L../../libffi-linux/lib"
    • Expect quite a few warnings and other messages
    • This might take a few minutes! Be patient!
    • build.LINUX/einstein should now exist
  • Now to run it
  • cd build.LINUX
  • mkdir data
  • cp ../../../_Data_/Einstein.rex data/
  • (copy your Newton ROM file named "717006" to data/)
  • LD_LIBRARY_PATH=../../../libffi-linux/lib
  • export LD_LIBRARY_PATH
  • ./einstein data

Legacy builds

Legacy Build Instructions for currently unmaintained platforms are available.