Setting Up a Development Environment on Linux

From GT-MP
Jump to: navigation, search

Setting Up a Development Environment on Linux

If you want to set up a development environment on your favorite Linux distro, you've come to the right place!

Before starting

First we'll need to download some stuff:

  • Mono
  • Rider (No, Ryder is the one from GTA:San Andreas, this is Rider)
  • GTMP Server

Mono is a software platform designed to create cross platform .Net applications, first we'll need to import their keys

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt update

Now, we'll let apt handle the rest

sudo apt install mono-devel

Now about Rider, Rider is a cross platform .Net IDE developed by JetBrains, right now it's being developed and that's why it's free, but I recommend you to buy it whenever it comes out (All of their products are worth it, check them out, specially IDEA). By going to their webpage, [1] you can download an 'early build'. Then you'll just have to uncompress it (Do I have to upload a pic of right clicking a compressed file :P) and open the folder

cd Rider*
cd bin

And open Rider

./rider.sh

Don't worry, later on you'll be able to open Rider from the Start Menu (Wasn't it called like that on Windows? :P)

Rider Menu.gif

Now that you have your tools ready, you'll have to add the GTMP resources, so after creating your project you'll have to go to the Solution Explorer

Rider Ref1.png

Then right click 'ClassLibrary' (or whatever name you gave it) and click "Add Reference", then choose GrandTheftMultioplayerServer.exe and GrandTheftMultiplayerShared.dll (From the server folder you downloaded)

Rider Ref2.png

And that's it! Now, I'll show you an example of how it looks like to code with Rider (Click the image or you'll see nothing)


SSRider 1.gif

I prefer the 'Darcula' theme, as you can see, it's really nice and it will complain about the names you assign to variables, like every IDE should do.