Getting Started
Dependencies
SDL2
SDL2 Image
SDL2 GFX
SDL2 TTF
SDL2 Mixer
sudo apt update && sudo apt upgrade
sudo apt-get install libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-gfx-dev libsdl2-mixer-dev
Install with Pack
Assuming you have installed Pack.
Install all the dependencies using the commands above.
Make sure you added
idris2to$PATH.pack install idrisGL
Note
Unable to install with Pack?
make[1]: idris2: No such file or directory: Make sure you addedidris2to$PATH.Errors caused by
include <SDL....>orSDL not found: Install all the dependencies.Not on the list? Check Pack Nightly Build and report an issue if it is related to IdrisGL.
Install from Source Code
git clone https://github.com/ECburx/Idris2GLNavigate to the directory:
cd Idris2GLMake sure you added
idris2to$PATH.If you have installed all the dependencies,
make installOtherwise,
make quickInstall. This will install the dependencies for you.
Additional installation options
make cleancleans everything.make prebuildbuild shared libraries without installing them.cd src/c_srcmake buildbuilds shared libraries.make installinstall shared libraries to idris2 system library directory.
cd srcidris2 --build idrisGL.ipkgbuilds the library.idris2 --install idrisGL.ipkginstall the library.idris2 --clean idrisGL.ipkgcleans everything.idris2 --mkdoc idrisGL.ipkggenerates HTML documentation for IdrisGL, output tobuild/docs.
Checking Installation
Once the IdrisGL package has been installed, the command line option --package idrisGL
makes it accessible (abbreviated to -p idrisGL).
idris2 -p idrisGL
If no error occurred, the IdrisGL should be successfully installed.
Import Things You Need
import IdrisGL: basic IdrisGL functions.import IdrisGL.Color: predefined colors.import IdrisGL.Random: unsafe, predictable and limited randomness, for users who need (inaccurate) random data to test graphics. (May be removed in the future.)