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 (use Mono 5.8 to get your server working! This is important until we will update our server binaries)
  • 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 (this is for Debian Wheezy and automatically imports the keys for Mono 5.8).

sudo apt-key adv --keyserver hkp:// --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb wheezy/snapshots/5.8 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

And make sure it is our wanted version 5.8

mono -V

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


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.