SFMLFlashcards / TESTLY
Benjamin Michaelis, Hugo Aponte, Zach Griswold, Blake Calvin
https://github.com/BenjaminMichaelis/sfmlFlashcards
Github Repo:Directions
You can add and delete flash cards from the menu, and you can also choose to play a match game. In Match, we'll associate your terms and definitions with a flashcard. You can click on the question card, drag it, and hover it over the corresponding answer card. Press E to go back to menu...(that works for every selection from the menu except add/delete card) Can be run by directions below or make file (make; make run)
Prerequisites
Windows
- SFML 2.5.1 - GCC 7.3.0 MinGW (DW2) 32-bit (for Windows)
- GCC 7.3.0 MinGW (DW2) 32-bit (for Windows)
- Git Bash (for Windows)
MacOS
- SFML 2.5.1 - Clang 64-bit
- Command Line Tools / XCode (type "xcode-select --install" in terminal to trigger the installer)
- Homebrew (for makeicns, or to optionally install SFML)
All
- Visual Studio Code
- Extensions (install from Extensions panel):
Installation
Windows
- Download & Extract SFML to C:/SFML-2.5.1/ where the bin/lib/include folders are contained within
- Download & Extract MinGW to C:/mingw32/ where the bin/lib/include folders are contained within
MacOS
- Install "Command Line Tools" in MacOS if they're not already installed (type "xcode-select --install" in terminal)
- Follow the "Installing SFML" directions here: https://www.sfml-dev.org/tutorials/2.5/start-osx.php#installing-sfml
Linux
- Ensure the GCC Toolchain is installed (sudo apt install build-essential)
- Run sudo apt install libsfml-dev. The SFML version you got will vary depending on the distro. 2.5.1 is included in Ubuntu 19.04 Disco Dingo for example.
All
- Download & Install Visual Studio Code if you don't already have it.
- Install the official C/C++ Extension, reload the window & wait for the dependencies to install.
- If on Windows, install Git Bash, and ensure the "terminal.integrated.shell.windows" property in the project's settings.json is set to bash.exe's correct location (default: C:/Program Files/Git/bin/bash.exe). We'll be using this for the terminal in our workspace so that the Makefile can run in both Windows, Mac & Linux
- In settings.json Ensure Path in the terminal.integrated.env.windows object is set to the correct location of the compiler's executable (example: C:\mingw32\bin) and the SFML directory is correct as well. Keep in mind Paths should be separated by a semi-colon with no spaces between.
Configuration
At this point, everything you need is installed
- Open the sfmlFlashcards folder in VS Code. You should see an lime-green status bar at the bottom (color-picked from the SFML logo).
- With Main.cpp (or any source file) open, check the lower-right to ensure "Win32/Mac/Linux" is the configuration set (this should be auto-selected by the C++ plugin). If it is not correct, hit Ctrl+Shift+B and select C/Cpp: Select a configuration... and choose the platform you're working on.
- At this point you should be able to run a build task (Ctrl+Shift+B > Build & Run), but it'll be nicer to add keybindings for these tasks so you can build with 1 keypress.
- Open the .vscode folder and click on the _keybindings.json file. This is not an officially recognized file, but just contains the keybindings you can copy into the actual keybindings.json file.
- Go into File > Preferences > Keyboard Shortcuts & click on the keybindings.json link at the top.
- Copy the keybindings into this file. Feel free to change them if you don't like them later.
- Hit the F9 key to run the Build & Run: Release task. It should run the Makefile, find the compiler, build the Main.cpp into Main.o, and launch the sample SFML app. Shift+F9 will launch the basic Debug build, and F8 will launch the actual Debugger alongside the Debug build.