Author Topic: Linux version?  (Read 17594 times)

Offline liamdawe

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Linux version?
« on: April 13, 2016, 03:39:22 pm »
Hey there, since OpenXcom works multi-platform, what are the chances of getting Linux builds of this mod too?

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Linux version?
« Reply #1 on: April 13, 2016, 04:19:07 pm »
I don't believe anyone is compiling Linux builds of Meridian's OXCE+ right now, but if you are willing to compile them yourself, it should be possible.  Meridian has the link to his build on Github in the first post of his thread.
https://openxcom.org/forum/index.php/topic,4187.0.html

niculinux

  • Guest
Re: Linux version?
« Reply #2 on: April 13, 2016, 04:20:41 pm »
I'd too would be very interested, maybe someone may wnat to make a generic binary executable file (.bin) that may be relased within the next xpiratez update?

Offline liamdawe

  • Sergeant
  • **
  • Posts: 27
    • View Profile
Re: Linux version?
« Reply #3 on: April 13, 2016, 04:51:23 pm »
I've actually tried the Linux exe included in the linked post, but it complaints about a missing libSDL1.2, which I do have installed :(

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: Linux version?
« Reply #4 on: April 13, 2016, 05:04:17 pm »
I see.  Well, I would refer all questions to that thread, as Meridian is the author of the current executable.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9094
    • View Profile
Re: Linux version?
« Reply #5 on: April 13, 2016, 06:07:51 pm »
I've actually tried the Linux exe included in the linked post, but it complaints about a missing libSDL1.2, which I do have installed :(

I have almost no experience with Linux, sorry :(
If there are any Linux gurus here, please help.

PS: That Linux executable I shared in the post was compiled by me on Kubuntu (using Makefile.simple) and it works fine for me.

Offline Arthanor

  • Commander
  • *****
  • Posts: 2488
  • XCom Armoury Quartermaster
    • View Profile
Re: Linux version?
« Reply #6 on: April 13, 2016, 09:44:45 pm »
I compile it (and tweak some of the code) for my personal use. I think if you are a Linux user, you should just DIY, since that's sort of the point of Linux too ;)

Step 1: Make sure you have the dependencies
It's super easy to "sudo apt-get Package name", as they are listed between parenthesis on the webpage. Get them all, obviously. You can also use the command here, presumably.

Step 2: Get the code
Either download it from the github webpage or git clone it. There are link in the first post of Meridian's exe to the github page.

Step 3: Compile
As listed in the page linked above, there are a few options. I have had success with CMake option, although the webpage is now a bit confusing with information overload. So here's my checklist:

 0.    make installation directory (called "srcdir" in these notes)
 1.    git clone git@github.com:MeridianOXC/OpenXcom.git srcdir (or just move the files you downloaded from github into your srcdir)
 2.    {copy patched XCOM assets into srcdir/bin/data}
 3.    mkdir srcdir/build
 4.    cd srcdir/build
 5.    cmake ..
 6.    ccmake .. (this opens a little "gui-lite" in the terminal. Things to do in the gui are in {}
 7.    {set CMAKE_BUILD_TYPE to Release (or Debug if you want useful stack traces, but that slows the game a lot)}
 8.    {set CMAKE_INSTALL_PREFIX to /path/to/where/you/want/the/game/to/be/
 9.    {set DATADIR to define folder in which OpenXCom will look for the data subfolder (ex.: you can do /path/to/where/you/want/the/game/to/be/data/}
10.    {configure, then generate and exit}
11.    make -j3
12.    make install

This will give you a "openxcom" executable in /path/to/where/you/want/the/game/to/be/bin/.

Next to the bin folder you'll also get a user folder, in which to put the Piratez files from the user directory that is in the archive that Dioxine distributes (it annoys me that you have to download the whole thing with a Windows executable and dig out the mod, but Dioxine is convinced Windows users are clueless about how to set things up and need everything pre-set.. so Linux users have to do the extra work).

I actually do things slightly differently, where I have separate user and data directories, so I run OpenXCom with a little script:

Code: [Select]
#!/bin/bash
usrPath='/path/to/where/you/want/the/user/folder/to/be/user'
cfgPath='/path/to/where/you/want/the/config/to/be/config'
dataPath='/path/to/where/you/want/the/data/to/be/data'
/path/to/where/you/want/the/game/to/be/bin/openxcom -user $usrPath -cfg $cfgPath -data $dataPath 1>/path/to/where/you/want/the/Log/to/be/XPiratezLog.txt 2>&1

This allows me to define a specific user directory, config directory and data directory, and to get a log of the executable in case it crashes so I can maybe have a bit of info on what went wrong. The user and data directories are especially useful as you can make 1000% sure that the game is looking where you want it to instead of wherever it might think the things are.

Offline DoktorV

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Linux version?
« Reply #7 on: April 13, 2016, 11:32:32 pm »
If you're on a 64-bit installation, the game won't run even if you install all the dependencies because the system will install the 64-bit versions by default while the program is 32-bit and needs 32-bit versions of the libraries it's referencing. To install the 32-bit versions of the dependencies, you have to have multiarch installed, and then specify that you want to install the 32 bit versions like so:

apt-get install X:i386

Replace X with each library (libsdl1.2, etc) until you have them all.

Offline R1dO

  • Colonel
  • ****
  • Posts: 442
    • View Profile
Re: Linux version?
« Reply #8 on: April 14, 2016, 12:45:46 am »
If you're on a 64-bit installation, the game won't run even if you install all the dependencies because the system will install the 64-bit versions by default while the program is 32-bit and needs 32-bit versions of the libraries it's referencing. To install the 32-bit versions of the dependencies, you have to have multiarch installed, and then specify that you want to install the 32 bit versions like so:

apt-get install X:i386

Replace X with each library (libsdl1.2, etc) until you have them all.

Are you sure? Or do you specifically refer to extended.  I can't remember ever needing to do that on multiple machines, and except for 1 those are all 64 bit.

Offline DoktorV

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: Linux version?
« Reply #9 on: April 14, 2016, 08:28:59 pm »
It might only be required for extended, or possibly my own configuration required manually installing 32 bit libraries instead of them being installed automatically. I can imagine, though I'm not sure, that there may be some setting I don't know about.

I revise my advice: If you are on a 64 bit system and you installed the dependencies but it still doesn't run, try manually specifying you want to install the 32 bit versions of the dependencies and try again.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #10 on: June 12, 2016, 08:55:18 pm »
I set up a buildbot that builds binaries on the three current ubuntu releases. Results can be had here: https://lxnt.wtf/oxem/

The bot should pick up any changes in github repo in a day or so.

Libyaml is 0.5.3 statically linked. Libsdl1.2 is pretty much the same across the releases, so the main difference would be the compilers, and gcc 5.2/5.3 spits way more warnings (than 4.8 in trusty).


Offline lusciouspear

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Re: Linux version?
« Reply #11 on: June 14, 2016, 09:41:17 am »
I use Wine on OSX -- takes about 8 minutes to load but works great :D

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #12 on: June 14, 2016, 12:38:06 pm »
Unfortunately, OSX builds on my system are not possible. OSX doesn't run very well under virtualization, not to mention this doesn't fit with the licensing stuff. That's why there's a bunch of companies renting out measly mac minis for like 80 euro a month.


Offline Crazy Photon

  • Squaddie
  • *
  • Posts: 8
  • Resistance is NEVER Futile!
    • View Profile
Re: Linux version?
« Reply #13 on: June 15, 2016, 02:05:28 am »
Is your OSX too old for homebrew? I run the latest builds of OpenXcom on both OSX and Linux by running make -f Makefile.simple (OSX requires a small tweak though, there is a conflict of the boost library version).

Offline lusciouspear

  • Sergeant
  • **
  • Posts: 39
    • View Profile
Re: Linux version?
« Reply #14 on: June 16, 2016, 08:52:35 am »
Unfortunately, OSX builds on my system are not possible. OSX doesn't run very well under virtualization, not to mention this doesn't fit with the licensing stuff. That's why there's a bunch of companies renting out measly mac minis for like 80 euro a month.

Can't you run wine on Linux?