FreeBSD Installation

From ENIGMA
Revision as of 21:09, 29 December 2020 by Time-killer-games (talk | contribs)
Jump to navigation Jump to search
The official logo of FreeBSD based operating systems and environments.

For the sake of simplifying maintenance, we only officially support FreeBSD and its derivatives, out of the BSD distributions, since FreeBSD is largely the most popular among them. If you are new to FreeBSD and are confused by its complex installation process, we strongly recommend you download NomadBSD instead, which is based on the FreeBSD distro, therefore it is compatible with these instructions, and can be downloaded from the official website, (requires flash drive >= 5GB to install):

  • Windows, Mac, and Linux users can use balenaEtcher to easily write NomadBSD to a bootable flash drive.

(NomadBSD allows you to select a default shell during its graphical installation;

make sure you change it to use bash, otherwise you'll be stuck with fish)...

  • First off, running LateralGM, (the IDE), requires you doing this in the terminal;

(you should only need to do this ONCE on your system, even if you update or uninstall ENIGMA, however many times):

   echo "fdesc   /dev/fd     fdescfs     rw  0   0" | sudo tee -a /etc/fstab
   echo "proc    /proc       procfs      rw  0   0" | sudo tee -a /etc/fstab
  • Additionally, for LateralGM and/or emake, (the CLI), you will need to do the following, but beware;

this will permanently DELETE your default 'make' executable and replace it with a symlink to 'gmake':

   sudo rm /usr/bin/make
   sudo ln -s /usr/local/bin/gmake /usr/bin/make
  • Then, you will have to create a symlink to bash so that bash commands will be properly recognized:
   sudo pkg ins bash
   sudo ln -s /usr/local/bin/bash /bin/bash
  • Lastly, run the installer script provided below; to actually install ENIGMA, now that your system is ready:
Easy method for FreeBSD users
On FreeBSD simply copy and paste this code into a file called "install.sh" and run it. If it doesn't run make sure you have given it permission to be run as an executable.
#!/bin/bash
cd ~/
echo "Installing dependencies..."
sudo pkg ins wget git llvm gcc gdb gmake pkgconf protobuf protobuf-c lzlib glew glm png libGLU freeglut mesa-libs openal-soft libogg alure libsndfile freealut libvorbis vorbis-tools Box2D dumb sdl2 freetype2 libffi libX11 libXrandr libXinerama openjdk-jre openjdk8 rapidjson libyaml boost-libs pulseaudio pugixml yaml-cpp zenity kdialog
echo "Downloading Enigma..."
git clone git://github.com/time-killer-games/enigma-dev-fork.git ~/enigma-dev
ln -s /usr/local/include/google ~/enigma-dev/shared/protos/google
ln -s /usr/local/include/google ~/enigma-dev/CommandLine/emake/google
rm -rf ~/.enigma
mkdir ~/.enigma
mkdir ~/.enigma/Preprocessor_Environment_Editable
cd enigma-dev
echo "Downloading easy startup script..."
wget https://pastebin.com/raw/aBAU4j3C -O start.sh
sed -i -e 's/\r$//' start.sh
echo "Correcting permissions..."
chmod +x start.sh
chmod +x install.sh
echo "Installing..."
./install.sh
echo "Rebuilding compiler..."
gmake clean
gmake
gmake emake
echo "Done, to start Enigma just run 'cd ~/enigma-dev;MAKE=gmake java -jar lateralgm.jar'"

Install Dependencies

  • The following dependencies will be installed for ENIGMA and the games it creates:
   sudo pkg ins wget git llvm gcc gdb gmake pkgconf protobuf protobuf-c lzlib glew glm png libGLU freeglut mesa-libs openal-soft 
                libogg alure libsndfile freealut libvorbis vorbis-tools Box2D dumb sdl2 freetype2 libffi libX11 libXrandr 
                libXinerama openjdk-jre openjdk8 rapidjson libyaml boost-libs pulseaudio pugixml yaml-cpp zenity kdialog
  • These may be needed to be installed on end-users' computers that run your games:
   sudo pkg ins lzlib glew glm png libGLU freeglut mesa-libs openal-soft libogg alure libsndfile freealut libvorbis vorbis-tools 
                Box2D dumb sdl2 freetype2 libffi libX11 libXrandr libXinerama zenity kdialog
  • End-users' won't need all of those dependencies, depending on the features used...

Please start a topic on the forums if you are unsure which dependencies your game needs.

Download ENIGMA

ENIGMA can be downloaded and installed using the following commands:

   git clone git://github.com/time-killer-games/enigma-dev-fork.git ~/enigma-dev
   ln -s /usr/local/include/google ~/enigma-dev/shared/protos/google
   ln -s /usr/local/include/google ~/enigma-dev/CommandLine/emake/google
   rm -rf ~/.enigma
   mkdir ~/.enigma
   mkdir ~/.enigma/Preprocessor_Environment_Editable

Install IDE + Plugin

You will also need the LateralGM and ENIGMA plugin binaries; they can be installed 1 of 3 ways.

1) You can install those automatically by running the install script in the enigma-dev folder:

   cd ~/enigma-dev
   ./install.sh

2) Invoking python, (only if you have python 2.6 or python 3+ installed), on "install.py":

   cd ~/enigma-dev
   python install.py

3) Or you can obtain them manually per these instructions.