Introduction
This guide takes you through the process of downloading the program created by “The best programmers as NTNU”. The program is stored in the git repository “PROG1004_Group13”. This tutorial is based that the user has experience with a bash terminal. (When copying the commands, remember to copy the whole content inside the brackets, even though move over several lines). This guide is only using a bash terminal, and will therefor also work for MacOS users.
The Guide
-
If you have a Debian based Linux distribution, you can use the command (sudo apt install git). Type in the password for your machine. If you have an Arch based Linux distribution, you can use the command (sudo pacman –S git). After the download has finished you can check if it has been installed again. Again, you can run the command “git --version”, if you now get a output with a version of git it has been installed.
-
To get your hands on the program you need to download the folder where the program is located. First check if your computer has Git downloaded. You can check this with the command (git --version). If your terminal now display a version of git you have now successfully downloaded git.
-
Further we now have to download the git repository. Choose a location where u want to download the git repository. Use the command (git clone https://gitlab.stud.idi.ntnu.no/eskillr/prog1004_group13.git). Now you should see an install like this. If the picture looks similar to what you have downloaded, the git repository has now been successfully downloaded.
-
Once downloaded the git repository you need to check if you have the correct compiler at disposal. Type in the command
g++ --version
in the bash terminal. If you get an output which includes information for copyright and warranty about the software, it is installed on your system. If not, you need to download a compiler that makes the program code, to data code. If you are on a Debian system g++ should already be installed but with the commandsudo apt install g++
. If a package now got installed, you can again check with the commandg++ version
if the software is available on your system. -
For running the program, you now need to move to the folder where the program file is located. With the command
cd prog1004_group13/User_Manual/Linux; ./check.sh
you move to the correct location. If you type in the correct commands, you will be prompted with the message “You are now in the correct folder”. Now you are ready to compile and run the program. ** -
Since the g++ compiler has now been downloaded, you can now compile the program. Run the command
g++ football.cpp -o run_program
. There will be a little wait, and if no errors occur in the terminal, the program is ready to run. Since their now has been made a compiled file, the program is now ready to be run. Type in the command./run_program
and the program should now be up and running.