Page 1 of 1

[Linux] Create .deb package

Posted: Mon Feb 05, 2018 8:40 am
by Laurent
Hi all,

TLDR: integrate factorio nicely in your Ubuntu/Debian desktop as follows: download the attached zip. Download factorio_alpha_x64_[version].tar.xz. Put that [version] in the top of the file Makefile. Open a terminal, do "sudo make install", enjoy.

I use Ubuntu and I really like it when software nicely integrates in my desktop. Factorio does not do that by itself, but with a little help it can do that. Here is my approach, which is by the way based on the excellent AUR package.

The main idea is to create a .deb-package that can be installed in the usual way. Factorio is built such that it understands the standard linux file system, so that helps. Here is how you can do this:
  • Download and unzip it
  • Download factorio_alpha_x64_[version].tar.xz from in the folder you just unzipped
  • Open that folder in a terminal. In Ubuntu: right click on empty space in the folder and choose "Open in Terminal"
  • Run "make", this will take a while. It will uncompress the factorio[blabla].xz and compress it again using some metadata to factorio_[version]-1.deb
  • Run "sudo make install" or "sudo apt install ./factorio_[version]-1.deb" or "sudo dpkg -i ./factorio_[version]-1.deb" to install factorio.
  • Open Factorio from the Ubuntu menu, just as you would do for any other app.
Biggest disadvantage of this approach is that the auto-updater does not work anymore... Does anybody know a way to download the update files manually and apply it using some sort of patch approach?

Bonus: You can convert your current factorio saves to the new factorio. To do this, copy paste the directories "config", "mods", "saves", and the files "achievements.dat", "blueprint-storage.dat", "crop-cache.dat", and "player-data.json" to "~/.factorio", where ~ stands for your home directory. Do *not* copy the file config-path.cfg. Be wise, make backups of your saves before doing this :)

If you have any questions, please let me know.

Re: [Linux] Create .deb package

Posted: Tue Mar 05, 2019 1:37 pm
by wizd3m
According to the Makefile you now place the executable in /usr/bin and the data files under /usr/share/factorio. The following should work, although I cannot test it as I am not on an Debian based system now.

To enable updates you could place the files under /opt/factorio and then chmod -R 755 all the files under /opt/factorio.

Under /usr/bin you could create a bash file which changes the working directory to /opt/factorio and then executes factorio. Or just change the Exec line in .desktop to Exec=/opt/factorio/bin/factorio.

Re: [Linux] Create .deb package

Posted: Wed Aug 12, 2020 6:42 am
by vitex
Hi All,

my unofficial debian package:

Pull requests accepted ;)