Development Setup (0.3.x and earlier)

robotanarchy edited this page Aug 17, 2015 · 2 revisions

This is only relevant for 0.3.x and earlier! Read Development Setup for above versions!

Development Setup (0.3.x and earlier)

This mod uses a total of three IDEs for different purposes! This page describes how to get all of them up and running, so you can start hacking immediatelly.

Common Setup Steps

No matter what part of the mod you'll be developing, it is necessary that you do this first:

  • Install git on Linux or Github for Windows
  • Clone the source code: git clone https://github.com/Bytewerk/gta2-hackers-remix.git
  • For the non-AutoIt3 parts you'll need the latest IDE project files. Merge these with the git source tree that you have downloaded and do not overwrite the source code files from git. Because then you wouldn't have the latest ones.

Code::Blocks with SDL2

Sort-of works with wine, but you should use the supplied Makefile instead!

Why?

Why Code::Blocks instead of Visual C++? Because it is OSS, has less bloat and ships a working MinGW toolchain. Code that compiles with MinGW should also work with GCC on Linux. And SDL provides a really nice, crossplatform abstraction for game controllers and video stuff.

Setup

  • Download Code::Blocks (the one that has MinGW included) and install it
  • Download SDL2 development libraries for MinGWx32
  • Download SDL2_net for 32-bit Windows
  • Extract the bin, include, lib and share folders from the SDL2 and SDL2_net archives to %Pogram Files%/Codeblocks/MinGW/ (merge existing folders)
  • open the project that you have downloaded earlier (see common steps)
  • start hacking
Fix SDL 2.0.3

You'll probably get the error winapifamily.h: No such file or directory, when you try to compile. This is a bug in the mentioned SDL version, here's the fix.

AutoIt3

Works with Wine except for the advanced SciTE.

Why?

To make this mod happen, we need to set up and control (that is, automating GUI clicking) the network lobby of up to 6 instances of GTA2.exe in the background. We also need to change the GTA2 registry entries and do lots of other Windows-API-spcific stuff to merge all GTA2 windows into one big window.

AutoIt3 abstracts the Windows API to a perfectly documented scripting language (press F1 for help in SciTE). We don't need to install a big IDE like Visual Studio, and while AutoIt3 is not open source for valid reasons, it is freeware.

Setup

  • Grab and install the latest AutoIt3 and (only on Windows, as it doesn't work in Wine) their advanced SciTE Editor
  • Start up AutoIt3's SciTE editor and begin hacking on the .au3 files
  • Start splitscreen_mod.au3 / meta.au3 (post-alpha branch) to run the mod (or press F5 when the file is open)
  • Developing on Linux can be done with Geany (syntax highlighting file)

Visual Studio 2013

Not tested with Wine.

Setup

Import the latest project files (which you got by following the common steps above) with the freeware-unless-you-got-a-bigass-company Visual Studio 2013 Community Edition. If you already have the 2010 version installed, you can use the older project files from here.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.