The International Simutrans Forum

 

Author Topic: Compiling the Pakset  (Read 1269 times)

0 Members and 1 Guest are viewing this topic.

Offline Spenk009

  • *
  • Posts: 242
Compiling the Pakset
« on: January 05, 2019, 08:29:45 AM »
Many posters have issues building their own executables and/or paksets. I hope to bring some light into this dark with a quick guide on building PakBritain128-Extended on Linux and Windows.

Linux users:
Clone the github repository following the guide here and the command
Code: [Select]
git clone https://github.com/jamespetts/simutrans-pak128.britainYou may need to install libpng15.so.15 from here, by extracting the /usr/lib64/ contents into your /usr/lib/ and the /usr/share/ into your /usr/share/.
In your cloned directory, .../simutrans-pak128.britain/ run
Code: [Select]
make -jX X is the amount of threads (or cores) your cpu has plus one (i7 2700K (4 cores) 8 threads = 9).

There may be an error encountered which requires the installation of build essentials (Error 126, "sudo apt-get install build-essential"). If you encounter Error 127 you can try running make with sudo.


This is an old guide to compiling your own pakset on Windows.

  • Install Python from here, I would go for 2.7.10 but this is open to your preference.
  • Install the MakeObject Script Engine from here.
  • Download a fresh copy of PakBritain from GitHub, the branch (above the file list) is currently "half-heights" as of May 2015. Extract this to a folder like in step 2 above.
  • Download the Extended Makeobj.exe from here. You will only need makeobj.exe and can move it into the PakBritain folder.
  • Find "makeALL.mos" in the main folder and edit the file with Notepad or similar. Replace config config "makeobj=%makeobj%" with "makeobj=makeobj.exe".
  • Run "makeALL.mos".
  • Wait for the script to complete, which usually takes a few minutes. While it does that, download the folders for inside the completed pak from here.
  • When the script has finished, copy/move the "Pak128.Britain-Ex-0.9.X", from within original folder you extracted the GitHub sources in, to your previously compiled Simutrans Extended game folder.
  • Extract the folders for inside the completed pak from two steps ago into the "Pak128.Britain-Ex-0.9.X" folder.
  • Start Simutrans.exe to check whether the pak runs.
Thank you to jamespetts, VS, and all others in the project.
« Last Edit: January 06, 2019, 07:44:55 AM by Spenk009 »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18683
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Compiling the Pakset
« Reply #1 on: January 05, 2019, 01:06:35 PM »
Splendid, thank you - stickied!

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2676
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Compiling the Pakset
« Reply #2 on: January 05, 2019, 01:10:24 PM »
There is no need to use sudo. In general make shoud never be run as root, except for "make install". The compilation should run for security reasons as normal unprivileged user.

Offline Spenk009

  • *
  • Posts: 242
Re: Compiling the Pakset
« Reply #3 on: January 06, 2019, 07:43:20 AM »
Vladki: I get Error 126 or 127 if I try to compile without sudo. This is probably due to file ownership issues which I'm still quite foreign to. I've edited the post to reflect this.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2676
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Compiling the Pakset
« Reply #4 on: January 06, 2019, 02:34:20 PM »
In this case no part of the process (git clone; make) shall be run with sudo. So you should be the owner of those files. However it is possible that the files are marked read-only. You can fix that by running:
Code: [Select]
chmod -R u+rwX .In the cloned directory. If it fails on some files, check the ownership with "ls -l"

Ah, and of course if you once had run "sudo make", some files will be owned by root. Just delete them as root "sudo rm" and try again.