Skip to content

Building the project

Rey edited this page Nov 27, 2024 · 6 revisions

Building the project

Build is made using bat scripts, which are located in the \bat\ directory.

Pre-requirements

  • Delphi (version 2009 or higher)
  • .NET Framework (version 4.0 or higher)
  • GIT client (TortoiseGit, GitHub for Windows or any other of your choice)
  • Inno Setup (version 6 or higher)
  • Lazarus cross-platform compilation (check further instructions)
  • Original "Knights and Merchants: The Peasants Rebellion" data files
  • Secure assets, such as KM_NetAuthSecure.pas and CheckKaM.iss. Installation could be made without them as an unofficial release (check further instructions)
  • KaM Remake video files (renamed original videos). Could be taken from any released beta version
  • KaM Remake older versions, f.e. r6720
  1. Clone kam_remake repository to some folder on you hard drive
  2. Clone kam_remake_maps repository to some folder on you hard drive
  3. Clone ScriptingEditor repository to some folder on you hard drive, if you have access to it. Otherwise skip this step
  4. Clone kam_remake_private repository to some folder on you hard drive, if you have access to it. Otherwise skip this step
  5. fpcupdeluxe installation. fpcupdeluxe is used to configure FPC compiler and Lazarus to compile linux dedicated servers.
    fpcupdeluxe web site
    fpcupdeluxe github repo
  • Download and run latest fpcupdeluxe version (tested on the version v2.4.0e)
  • Choose directory to install fcupdeluxe.
  • On the Basic tab choose Install/update FPC + Lazarus. Tested on FPC v3.2.0, Lazarus v3.4. Needed packets will be downloaded and installed into the chosen folder.
  • On the Cross tab choose CPU i386 and OS linux and click Install compiler to install linux x86 compiler
  • On the Cross tab choose CPU x86_64 and OS linux and click Install compiler to install linux x64 compiler
  1. Create file \bat\rsvars_local.bat in the project directory and set variables in it as shown in the \bat\rsvars_local_example.bat file
  2. To build installation exe file you will need to run \bat\make_beta_and_installer.bat (in your kam_remake repository). It could take up to 5-10 minutes. At the end there should be a message that InnoSetup Compilation is complete. If you do not receive this message, it means the installation failed. You will see what was the last step in console and check details in the corresponding log file.
Clone this wiki locally