##=============================================================
## Building instructions for EQUINOX-3D plugins
##
## AUTHOR:  Gabor Nagy
## DATE:    2024-Jul-09 14:31:12
##
## Copyright (C) 1992-2017 by Gabor Nagy. All rights reserved.
##=============================================================

To build the plugins:

(1)
Set the EQUINOX3D_DIR environment variable to your EQUINOX-3D directory.
For example, to $HOME/equinox3d-9.7.22-Linux-x86_64

Or, on MacOS: /Users/gnagy/EQUINOX-3D.app/Contents/MacOS

As you know, EQX is installation-free, so you can have multiple versions on your system.
This environment variable allows you to always safely try the latest version of EQX in a "sandbox" without worrying about any code or art content failing to build / load.


(2)
Make sure that $(EQUINOX3D_DIR)/bin is in your PATH.
It contains command line tools that are required for building.
These tools are accessed via environment variables, so you can override them, in case there is already a command with the same name on your system.
So, 'icr' (image crop) is referred to via the environment variable 'iCR'.
See below.


Example setup:

Make a symbolic link, called eqx to the version of EQUINOX-3D you want to build with, so you can use shorter path names.
It also allows you to quickly switch between Eqx3D versions for building plugins, even if you move your source directory outside the Eqx3D directory structure.

For example (assuming that you extracted the download package in your home dir):
cd
ln -s equinox3d-9.7.4-Linux64bit eqx

On MacOS (assuming that you extracted the download package on your desktop):
cd
ln -s Desktop/EQUINOX-3D.app/Contents/MacOS eqx

Add these lines to your .bashrc (assuming you use the bash shell):

export EQUINOX3D_DIR=$HOME/eqx
export PATH=$EQUINOX3D_DIR/bin:$PATH
export iC=ic
export iCM=icm
export iCN=icn
export iCR=icr
export iCS=ics
export iDS=ids
export iI=ii
export iS=is
export iSPL=ispl
export LC=lc
export EICON_SIZEX=128
export EICON_SIZEY=128
export EICONBIG_SIZEX=96
export EICONBIG_SIZEY=96

Don't forget to do an update (source ~/.bashrc)


(3) Install the OpenGL development package, approproate for your Linux distribution.
Make sure that it does not overwrite your graphics drivers (e.g. your OpenGL libraries provided by NVidia).

For example, on Ubuntu, or Mint, you need commands somathing like this:
sudo apt-get install mesa-common-dev
sudo apt-get install freeglut3-dev


To add a plugin to EQUINOX-3D, add an entry to Plugins/Plugins.list:

{
Name	= Category/Name;	# The plugin name that will appear in the plugin-manager
Object	= MyPlugin;		# The name of the dynamic executeable file (.so)
}
