Installation

The ObjectTalk package is written in C++ and can be compiled on MacOS, Linux (Ubuntu and Alpine are tested) and Windows. To simplify the build process, Cmake is used to deal with cross-platform challenges. Right now, all platforms support the build process from the command line using very simple instructions. MacOS and Windows also support using visual development environments like Xcode and Visual Studio (Code).

ObjectTalk uses a large number of 3rd party Open Source packages. The Cmake process automatically loads the correct versions, compiles them and links them into the ObjectTalk executable (simply named ot). No endless downloads, frustrations over each package's peculiarities or countless Google searches. The plan is to just support it out of the box.

Below are simple instructions for each of the supported platforms followed by some hints that apply to all platforms.

Build and Install on MacOS

ObjectTalk is supported on Sonoma (MacOS 14), Ventura (MacOS 13), Monterey (MacOS 12) and Big Sur (MacOS 11). There are 4 simple requirements to get your machine ready for ObjectTalk development:

  • Install Xcode from the App Store
  • Install homebrew using the instructions at https://brew.sh
  • Install git using brew install git from the command line
  • Install Cmake using brew install cmake from the command line

To build ObjectTalk, do the following from the command line:

  • cd [to your favorite build directory]
  • git clone https://github.com/goossens/ObjectTalk.git
  • cd ObjectTalk
  • Create a debug version with make debug or create a release version with make release
  • You can run the test suite for the language with make test
  • The created binary will be ./debug/bin/ot or ./release/bin/ot depending on the build type
  • You can also build an Xcode project with make xcode: the project will be in the xcode directory

Build and Install on Linux

ObjectTalk is supported on Linux. Given the large number of flavors, the core team only tests the build process on Alpine Linux and Ubuntu 22.04 Desktop. The Alpine environment is used to test a headless version (just a command line tool without a GUI) and the Ubuntu version is used to test the GUI version. In practice, any combination should work as it just depends on the availability of X-Windows and Vulkan. Other flavors of Linux will likely work as well but we'll let the community provide the instructions.

The headless versions can be easily tested with Docker. The docker folder contains the recipes and you can quickly spawn a docker container by doing a make alpine or make ubuntu from the top-level directory. You obviously have to have Docker and make installed on your host platform. The developers use this frequently on a MacOS platform.

To build the full version of ObjectTalk on Ubuntu 22.04 Desktop with GUI and IDE, run the following commands:

  • Install additional software using sudo apt-get install build-essential cmake git xorg-dev libgl1-mesa-dev x11proto-core-dev libx11-dev libwayland-dev libxkbcommon-x11-dev
  • cd [to your favorite build directory]
  • If your favorite directory is on a mounted drive, you might have to do a git config --global --replace-all safe.directory '*'
  • git clone https://github.com/goossens/ObjectTalk.git
  • cd ObjectTalk
  • Create a debug version with make debug or create a release version with make release
  • You can run the test suite for the language with make test
  • The created binary will be ./debug/bin/ot or ./release/bin/ot depending on the build type

If you don't want the GUI, look at the Dockerfiles to see what packages are required.

Build and Install on Windows

ObjectTalk is supported on Windows 10, 11, Server 2019 or Server 2022. There are 3 simple requirements to get your machine ready for ObjectTalk development:

  • Install Visual Studio 17 2022 (make sure you pick the "Desktop development with C++" option): Visual Studio 16 2019 also works
  • Install git from https://git-scm.com/download/win using defaults
  • Install cmake from https://cmake.org/download/ (ensure you select the "add cmake to the system PATH" option)

To build ObjectTalk, do the following from the command line:

  • cd [to your favorite build directory]
  • git clone https://github.com/goossens/ObjectTalk.git
  • If your favorite directory is on a mounted drive, you might have to do a git config --global --replace-all safe.directory "*"
  • cd ObjectTalk
  • cmake -Bvs -G "Visual Studio 17 2022" -A x64
  • Build ObjectTalk by Hand:
    • cd vs
    • cmake --build .
    • Run the tests: ctest -C Debug --output-on-failure
  • Build ObjectTalk in Visual Studio:
    • Open the ObjectTalk.sln solution in the vs folder and go crazy.

Running ObjectTalk

Once you have compiled ObjectTalk, you end up with a single executable the is either in the debug/bin, debug/release, debug/xcode or debug/vs directories depending on the platform or the method used. This executable can be moved anywhere and in the future is will be distributed in a package suitable for the platform.

In priciple, the ObjectTalk executable (ot) is a command line tool that takes parameters. Here is the help you get when you run ot -h:

Usage: ot [options] scripts

Positional arguments:
scripts      	scripts to execute

Optional arguments:
-h --help    	shows help message and exits
-v --version 	prints version information and exits
-i --ide     	edit code instead of running it [default: false]

So for example:

  • Just running the executable without parameters launches an Integrated Development Environment (IDE) that allow you to edit ObjectTalk scripts, scenes, boards, GUIs or node-based logic.
  • You can directly run an ObjectTalk script using ot [script name]
  • you can also open a script directly in the IDE by using ot -i [script name]