Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

ProjectCompilation

Krom Stern edited this page Nov 15, 2016 · 5 revisions

###Instructions for project compilation

Introduction

This instruction explains how to compile a working project.

Pre-requirements

  • Microsoft Windows OS: XP or higher (we did not test 95, 98, Me, 2000, but they would probably work as well)
  • Delphi (version 2009 or higher) or Lazarus (32bit, version 0.9 or higher)
  • GIT client (TortoiseGit, GitHub for Windows or any other of your choice)
  • OpenGL 1.5 compliant GPU
  • Original "Knights and Merchants: The Peasants Rebellion" data files

Optional (can be ignored or skipped with conditional switches):

  • madExcept installed
  • OpenAL drivers installed

Walkthrough

  1. Clone the project onto your PC using Git client. Right-click in a folder where you want the project to be (e.g. "C:\My Documents") and select from drop-down menu "Git Clone". Specify path to our repository, "https://github.com/Kromster80/kam_remake" and destination folder (e.g. "C:\My Documents\kam_remake"). Git will do its job in couple of minutes.
    *From now on paths will be written as relative, so e.g. ".\Maps" means "C:\My Documents\kam_remake\Maps"
  2. Copy resource files from your "Knights and Merchants: The Peasants Rebellion" installation. You need ".\data" folder, copy whole of it into project folder. When asked - replace all of the existing files/folders.
  3. Now to revert several replaced files - Right-click inside project folder and select Git > Revert. Revert all the changes made to project files in ".\data" folder.
  4. Copy all the *.rx files from ".\data\gfx\res\" to ".\SpriteResource\" folder.
  5. Launch the Delphi/Lazarus and open ".\Utils\RXXPacker\RXXPacker.dpr" project. Compile and launch it. Select all the available items and press "Repack". This will convert sprites to format we use in game.
  6. You won't have our private network authentication unit, so open ".\KaM Remake.inc" file with Notepad and place a dot like so "{.$DEFINE USESECUREAUTH}". This will make Delphi skip all the code within USESECUREAUTH clauses. This authentication unit makes it harder for someone to join a multiplayer game using an unofficial client that they compiled themselves. If you somehow have our private network authentication unit (or you wrote your own) then you can skip this step.
  7. If you don't have madExcept installed, then open ".\KaM Remake.inc" file with Notepad and place a dot like so "{.$DEFINE USE_MAD_EXCEPT}". This will make Delphi skip all the code within USE_MAD_EXCEPT clauses. If you have madExcept installed - skip this step.
  8. Now you can open ".\KaM Remake.groupproj" (if you have Delphi XE+) project and compile the project and/or its utility tools. Or ".\KaM Remake.dpr" if you have older Delphi version.