Group project for CS1666, fall 2021
Install SDL2 fully on your machine
- MacOS
- Run
brew install gcc - Run
brew install sdl2 - Run
brew install sdl2_image - Run
brew install sdl2_mixer - Run
brew install sdl2_ttf - Add the following to your
~/.bash_profile:export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/lib" - Run
source ~/.bash_profile
- Run
- Windows (assuming Rust installed through
rustup)- Download the SDL2-devel-2.0.16-VC.zip
- Download the SDL2_image-devel-2.0.5-VC.zip
- Download the SDL2_mixer-devel-2.0.4-VC.zip
- Download the SDL2_ttf-devel-2.0.15-VC.zip
- Locate your install of rustup. Mine was
C:\Users\{username}\.rustup - Navigate to roughly the following path:
C:\Users\{username}\.rustup\toolchains\{current_toolchain}\lib\rustlib\x86_64-pc-windows-msvc\libwherecurrent_toolchainwill likely be the most recently modified folder with the namestablein it- I think the process is similar for those who have rust installed through different means. Basing off of the https://github.com/Rust-SDL2/rust-sdl2 repo, the folder path might be
C:\Program Files\Rust\lib\rustlib\x86_64-pc-windows-msvc\libthough I cannot confirm.
- I think the process is similar for those who have rust installed through different means. Basing off of the https://github.com/Rust-SDL2/rust-sdl2 repo, the folder path might be
- Add the path found in vi to your environment variables like so that the variable name is
LIBRARY_PATH - From each .zip, navigate roughly to
{file name}\lib\x64and copy all contents into the path mentioned in vi - Copy these files found within their respective .zips (
SDL2.dll,SDL2_image.dll,SDL2_mixer.dll, andSDL2_ttf.dll) to your project folder placed in the same location asCargo.toml(From what I can tell, this needs to be done every time you want to utilize SDL2)
- Linux
- Furthering from the instructions found on the rust-sdl2 repo, you may need to install the following packages:
libsdl2-image-dev,libsdl2-mixer-dev, andlibsdl2-ttf-dev
- Furthering from the instructions found on the rust-sdl2 repo, you may need to install the following packages:
Within inf_runner folder:
cargo buildcargo run- Play to your heart's content