Installation of MonoGame 3.7.1 on Linux Mint 19.2 Tina for game development

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
kwyrky
Level 1
Level 1
Posts: 46
Joined: Wed Jul 10, 2019 5:10 am

Installation of MonoGame 3.7.1 on Linux Mint 19.2 Tina for game development

Post by kwyrky » Fri Aug 23, 2019 6:59 am

Hi all,

this tutorial is for you, if you want to check out the awesome MonoGame framework for game development.

In this tutorial we are going to install MonoGame 3.7.1.

This tutorial is based on the installation instructions for MonoGame 3.6 of cra0zy and adapted for MonoGame 3.7.1.

So here are the step by step installation instructions which worked for me:

Step 1

Since Linux Mint is based on Ubuntu we can install the latest official version of MonoDevelop for Ubuntu 18.04 like this (check the link for comparison):

Code: Select all

sudo apt install apt-transport-https dirmngr
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list
sudo apt update
sudo apt-get install monodevelop
Step 2

After that I used cra0zy`s package (thank you for providing it) like described here like this:

Code: Select all

wget https://github.com/cra0zy/monodevelop-run-installer/releases/download/6.2.0.1778-1/monodevelop-6.2.0.1778-1.run
chmod +x monodevelop-6.2.0.1778-1.run
sudo ./monodevelop-6.2.0.1778-1.run
Step 3

After that I opened the Linux Mint start menu and openend MonoDevelop Stable (notice the Stable here) once so that it creates the necessary files as the current user as it should do automatically when started for the first time.

Step 4

After that I installed MonoGame with the provided installer like this:

Code: Select all

wget https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/monogame-sdk.run
chmod +x monogame-sdk.run
sudo ./monogame-sdk.run
Step 5

I deleted the temporary downloaded files which are no longer needed at this point:

Code: Select all

sudo rm monodevelop-6.2.0.1778-1.run monogame-sdk.run
Step 6

I opened MonoDevelop Stable and used Tools | Add-ins... | Gallery | Game Development | MonoGame Addin from the menu to install the project templates so that it is then possible to create a new solution in MonoDevelop Stable which is based on one of the MonoGame templates.

Step 7

I opened MonoDevelop and used Tools | Extensions... | Gallery | Game Development | MonoGame Extension from the menu to install the project templates so that it is then possible to create a new solution in MonoDevelop which is based on one of the MonoGame templates.

Step 8

At this point we should have a fully installed version of the MonoGame framework. Just start MonoDevelop and create a new solution using one of the MonoGame templates which should be available at this point.

Just wanted to share, enjoy :slight_smile:

kwyrky
Level 1
Level 1
Posts: 46
Joined: Wed Jul 10, 2019 5:10 am

Re: Installation of MonoGame 3.7.1 on Linux Mint 19.2 Tina for game development

Post by kwyrky » Sun Aug 25, 2019 7:10 am

I wrote a bash script for it to automate the process a bit more:

Code: Select all

#! /bin/bash
#
# step 1
monodeveloplatest=monodevelop
if [ $(dpkg-query -W -f='${Status}' $package 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
  echo "$monodeveloplatest not installed..."
  sudo apt install -y apt-transport-https dirmngr
  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  echo "deb https://download.mono-project.com/repo/ubuntu vs-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-vs.list
  sudo apt update
  sudo apt-get install -y $monodeveloplatest
else
  echo "$monodeveloplatest already installed."
fi
# step 2
monodevelopstable=monodevelop-6.2.0.1778-1.run
monodevelopstablefull=https://github.com/cra0zy/monodevelop-run-installer/releases/download/6.2.0.1778-1/${monodevelopstable}
if [ -f $monodevelopstable ]; then
  echo "${monodevelopstable} found"
else   
  echo "downloading ${monodevelopstable}..."
  wget $monodevelopstablefull
fi
chmod +x $monodevelopstable
sudo ./$monodevelopstable
# step 3
echo "Opening MonoDevelop stable... The script will continue after MonoDevelop stable is closed. Please close it now. Waiting for MonoDevelop stable to be closed..."
[ $SUDO_USER ] && user=$SUDO_USER || user=`whoami`
echo $user
sudo -H -u $user bash -c 'monodevelop-stable && wait $!'
# step 4
monogame=monogame-sdk.run
monogamefull=https://github.com/MonoGame/MonoGame/releases/download/v3.7.1/${monogame}
if [ -f $monogame ]; then
  echo "${monogame} found"
else   
  echo "Downloading MonoGame..."
  wget $monogamefull
fi
chmod +x monogame-sdk.run
echo "Installing MonoGame..."
sudo ./$monogame
# step 5 
echo "Downloaded files:"
echo ${monodevelopstable} 
echo ${monogame}
while true; do
    read -p "Do you wish to cleanup and delete the downloaded files which are no longer needed by this script?" yn
    case $yn in
        [Yy]* ) echo "deleting files..." && sudo rm ${monodevelop} ${monogame}; break;;
        [Nn]* ) exit;;
        * ) echo "Please answer yes or no.";;
    esac
done
# step 6
echo "To install the MonoGame templates: Please open MonoDevelop stable and use Tools > Add-ins... > Gallery > Game Development > MonoGame Addin."
# step 7
echo "To install the MonoGame templates: Please open MonoDevelop and use Tools > Extensions... > Gallery > Game Development > MonoGame Extension."
# step 8
echo "Finished!"
#read -p "Finished! Press [Enter] to exit."
Maybe there is some room for improvement since I am new to writing bash scripts.

Post Reply

Return to “Tutorials”