-
Run MSYS2:
MSYS2 MinGW 64-bit
from the Windows Start Menu.- Make sure you are running the correct executable or else you will have trouble with the C++ compiler not recognizing your system correctly.
-
Install dependencies
pacman -S git nano make mingw64/mingw-w64-x86_64-gcc mingw-w64-x86_64-gdb mingw-w64-x86_64-gcc mingw-w64-x86_64-toolchain mingw64-w64-x86_64-cmake mingw64-w64-x86_64-ninja mingw-w64-x86_64-zlib mingw-w64-x86_64-freetype mingw-w64-x86_64-glfw mingw-w64-x86_64-mpv mingw-w64-x86_64-youtube-dl bison flex
-
Edit
~/.bashrc
to includeexport GRAIL=/path/to/GRAIL
andexport PATH=$PATH:$GRAIL/bin
on the following line.source ~/.bashrc
the first time.
-
Install gcc-11 and g++-11
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-11 g++-11
- Preferred, but optional
-
Set gcc-11 and g++-11 as default compiler
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
-
Confirm that the default versions of gcc and g++ are correct
sudo update-alternatives --config gcc sudo update-alternatives --config g++
-
- Preferred, but optional
-
If the default version of CMake is installed, purge it from
apt
sudo apt purge --auto-remove cmake
-
Install the latest version of CMake
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null sudo rm /etc/apt/trusted.gpg.d/kitware.gpg sudo apt install kitware-archive-keyring sudo apt update sudo apt install cmake
-
Install other dependencies
sudo apt install ninja-build libglfw3-dev libfreetype6-dev mpv libmpv-dev liblzma-dev flex bison pkg-config
-
Refer to step 4 of Getting Set up - Windows to set up the environment variables.
-
Install gcc-11 and g++-11
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-11 g++-11
- Preferred, but optional
-
Set gcc-11 and g++-11 as default compiler
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
-
Confirm that the default versions of gcc and g++ are correct
sudo update-alternatives --config gcc sudo update-alternatives --config g++
-
- Preferred, but optional
-
Install dependencies
sudo apt install make cmake ninja-build libglfw3-dev libfreetype-dev mpv libmpv-dev liblzma-dev flex bison
-
Refer to step 4 of Getting Set up - Windows to set up the environment variables.
-
Install dependencies
sudo pacman -S glfw-x11 freetype2 base-devel cmake ninja mpv youtube-dl
- If you are using Wayland, there install
glfw-wayland
instead ofglfw-x11
. Wayland support is currently unconfirmed.
- If you are using Wayland, there install
-
Refer to step 4 of Getting Set up - Windows to set up the environment variables.
-
To compile with default settings, run
./build.sh
-
For versions of Ubuntu with custom versions of gcc, but did not set the default compiler with update-alternatives:
CC=gcc-11 CXX=g++-11 cmake -S . -Bbuild -GNinja cmake --build build
-
For those who want to modify the default configuration and compile themselves, we use the following:
cmake -S . -Bbuild -GNinja cmake --build build
-
Update
test/CMakeLists.txt
to compile the file you want to compile and link it to grail. -
cd test && testWidgets
- Cursors and other features might not work for other tests as they are not 100% Linux/Windows compatible yet.
GitHub has a great guide on how to do this! This guide will show you how to load ssh-agent
when your terminal starts and add a new SSH key to ssh-agent
and GitHub
In this instance, you'll need to change the remote url that git is pointing to. This can be done with a single git command that changes which website the remote called origin
is pointing at. Once you run this, try to push again and you should be good to go!
Git command:
git remote set-url origin git@github.com:StevensDeptECE/GrailGUI.git
The GRAIL
environment variable is most likely not set. Please refer to step 4 of Getting Set up - Windows. If you have done this and still find yourself getting the same error, you may using a shell besides Bash. This is important because the instructions provided tell you to edit the .bashrc
, but that file may not be loaded if you were zsh, ksh, fish, or another alternative. To check which shell you are running, use one of the solutions mentioned here and then look up which file you would edit to export environment variables.
This error is most commonly scene when attempting to run Grail on a Windows virtual machine. If your use-case is different, please open an issue with the details of your environment. As far as the project team is aware, this error can be traced to a lack of OpenGL compatibility on Windows virtual machines. This means that the issues is a driver problem that cannot be resolved until there is better OpenGL support in virtual video drivers. If you need a virtual machine, but do not need Windows, a virtual machine running Ubuntu Linux should work. Otherwise, until there is sufficient OpenGL support for virtual Windows, you will have to resort to a dual boot or alternative computer to run Grail and Grail-based programs.
If you have an issue not on this list, and feel it should be included in the list of frequent issues, open an issue and let us know!