Skip to content

CEduardoSQUTEC/game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to Game

This repository contains Bash and PowerShell scripts to generate CMake projects that include SFML library.

Table of Content

  1. Requirements
  2. Installation
  3. How to generate a new SFML CMake project?

Requirements

Linux - Ubuntu 18.04

Please ensure that following required components have been installed:

  • CMake
  • GNU C++/G++
  • GDB
  • Git
  • CLion

MacOS - Mojave 10.14

Please ensure that following required components have been installed:

  • CLang
  • Homebrew
  • Git
  • CLion

Windows 10

Please ensure that following required components have been installed:

  • Visual Studio Community
  • Git
  • CLion

Installation

Linux - Ubuntu 18.04

  1. Open a terminal: [Ctrl] + [Alt] + [T]
  2. Ensure CMake has been installed: cmake --version or install as follow: sudo apt install cmake
  3. Ensure GNU C++/G++ has been installed: g++ --version or install as follow: sudo apt install g++
  4. Ensure GNU Debug has been installed: gdb --version or install as follow: sudo apt install gdb
  5. Ensure Git has been installed: git --version or install as follow: sudo apt install git
  6. Install CLion see more details in Linux - Ubuntu section: JetBrains
  7. Install SFML
    • In the terminal go to Home folder: cd ~
    • Verify if folder CLionProjects exists: ls otherwise create that new folder: mkdir CLionProjects
    • Go to CLionProjects folder: cd CLionProjects
    • Download game project: git clone https://github.com/rrivas-utec/game.git, and finally
    • Execute the following statements:
      cd ~/CLionProjects/game/installers/linux
      ./install_sfml.sh
      

MacOS - Mojave 10.14

  1. Open a terminal: [Command] + [Spacebar] and write in: terminal
  2. Ensure CLang has been installed: clang --version or if it is necessary run follow statement: xcode-select --install
  3. Ensure Homebrew has been installed: brew --version or see: Homebrew
  4. Ensure Git has been installed: git --version or if it is necessary run the following statement: brew install git
  5. Install CLion see more details in MacOS section: JetBrains
  6. Install SFML:
    • In the terminal go to Home folder: cd ~
    • Verify if folder CLionProjects exists: ls otherwise create that new folder: mkdir CLionProjects
    • Go to CLionProjects folder: cd CLionProjects
    • Download game project: git clone https://github.com/rrivas-utec/game.git, and finally
    • Execute the following statements:
      cd ~/CLionProjects/game/installers/macOS
      ./install_sfml.sh
      

Windows 10

  1. Install Visual Studio Community 2019: VS Community
    Minimum Requirement:
  2. Open a PowerShell terminal: [] + [R] and write in: powershell
  3. Install Git 2.20 or greater: Git
  4. Install CLion see more details in CLion 2019 - Visual Studio section: JetBrains
  5. Install SFML:
    • In the PowerShell terminal go to Home folder: cd ~
    • Verify if CLionProjects folder exists: ls otherwise create the new folder: mkdir CLionProjects
    • Go to CLionProjects folder: cd CLionProjects
    • Download game project: git clone https://github.com/rrivas-utec/game.git, and finally
    • Execute the following statements:
      cd ~/CLionProjects/game/installers/windows
      Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
      Y
      ./install_sfml.ps1
      

How to generate a new SFML CMake project?

Linux - Ubuntu 18.04

  1. Open a terminal: [Ctrl] + [Alt] + [T]
  2. Execute the following statement:
    cd ~/CLionProjects/game/generators/linux
    
  3. Define the name of your project, for example pacman and execute the following statement:
    ./gen_project.sh pacman
    
    This statement will generate a new folder called pacman at same level of game folder, in this case both folders will be inside of CLionProjects folder and pacman folder will contain the following files:

    The project could be used by CLion IDE but also can be compiled in command line, in order to help command line programming, it contains 3 additional scripts:
    • build.sh, to build a folder called build where CMake work stuff is saved.
    • run.sh, to compile the program and generate the executable, it verifies if build folder is available and if it is not, the script builds it.
    • clean.sh, to clean any previous compilation.

MacOS - Mojave 10.14

  1. Open a terminal: [Command] + [Spacebar] and write in: terminal
  2. Execute the following statement:
    cd ~/CLionProjects/game/generators/macOS
    
  3. Follow same Linux instructions since step 3.

Windows 10

  1. Open a PowerShell terminal: [] + [R] and write in: powershell
  2. Execute the following statement:
    cd ~/CLionProjects/game/generators/windows
    
  3. Define the name of your project, for example pacman and execute the following statement:
    ./gen_project.ps1 pacman
    
    This statement will generate a new folder called pacman at same level of game folder as it was explained in prior cases (linux and macOS) but it will not include any additional script so the recommendation for windows installation is to execute this project from CLion IDE or similar.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 98.2%
  • Other 1.8%