Author Topic: HOW-TO: Install OpenXcom X-Piratez on Arch Linux  (Read 10867 times)

Offline CaptainCorkscrew

  • Captain
  • ***
  • Posts: 78
    • View Profile
    • Let's Play: XPiratez
HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« on: November 10, 2016, 02:04:08 pm »
Hi there,

after a bit of trying I managed to get X-Piratez! to work on Arch Linux. Here is a short HOW-TO that should at least in part be helpful to users of other distributions as well.

This HOW-TO is for X-Piratez! Version 0.99E.

Requirement: OXCE 3.3 plus
For this mod to work it is a requirement that you have Meridians OXCE 3.3 plus installed. Links to some executables can be found here: https://openxcom.org/forum/index.php/topic,4187.0.html

However, those executables are for Ubuntu and may or may not work on Debian or Linux Mint as well, but what about all the other Linux distributions, like Arch? The solution: build from source.
The code can be found on Meridians github page: https://github.com/MeridianOXC/OpenXcom/tree/oxce3.3-plus-proto
It is important to  check out the oxce3.3-plus-proto branch, not master.

To build it on Arch Linux it is easiest to re-use the openxcom PKGBUILD from AUR and modify it slighty: https://aur.archlinux.org/packages/openxcom-git/
The minimal modification you need to do is to change the source from:
Code: [Select]
source=(git+"https://github.com/SupSuper/${_gitname}.git")to
Code: [Select]
source=(git+"https://github.com/MeridianOXC/OpenXcom.git#branch=oxce3.3-plus-proto")

Then build and install the package as usual. The obvious downside is that you will not be able to install vanilla openxcom in parallel. I can not be bothered to create a proper PKGBUILD and put it on AUR since they changed the way AUR works at least twice in the last two years and I can not be bothered to re-learn it all the time. Maybe someone else will make a nice PKGBUILD.

If you use a different distribution, the PKGBUILD may still be useful to you since it is just a bash script and contains all the steps necessary to build openxcom.

Now we have Meridians OXCE 3.3 installed and you should see that version when you run 'openxcom'.

Installing the X-Piratez! Mod
The latest version of the mod can be found here: https://openxcom.org/forum/index.php/topic,3626.0.html
Download, extract.
Copy the contents of the 'user' directory to '.local/share/openxcom'.
You will also need at least the original UFO or TFTD and copy all folders therein into the respective folders in 'local/share/openxcom'.
I bought the games on GOG and installed them using wine to get at the files.

Once you have done all that, your folder structure should look like this:
Code: [Select]
$ tree -L 2 .local/share/openxcom/
.local/share/openxcom/
├── TFTD
│   ├── ANIMS
│   ├── FLOP_INT
│   ├── GEODATA
│   ├── GEOGRAPH
│   ├── HARDDISK
│   ├── MAPS
│   ├── MISSDAT
│   ├── ROUTES
│   ├── SOUND
│   ├── TERRAIN
│   ├── UFO2EXE
│   ├── UFOEXE
│   ├── UFOGRAPH
│   └── UNITS
├── UFO
│   ├── GEODATA
│   ├── GEOGRAPH
│   ├── MAPS
│   ├── ROUTES
│   ├── SOUND
│   ├── TERRAIN
│   ├── UFOGRAPH
│   ├── UFOINTRO
│   └── UNITS
├── mods
│   ├── AltCorpseComplete
│   ├── Piratez
│   ├── Piratez Alternate Armor - Smoke
│   ├── Piratez Alternate Armor - Tac
│   ├── Piratez Alternate SGC
│   └── Piratez Naughty Mod
├── openxcom.log
├── options.cfg
├── piratez
│   ├── Shave.sav
│   ├── Spider_crash_bug.sav
│   ├── _autobattle_.asav
│   ├── _autogeo_.asav
│   └── _quick_.asav
├── xcom1
└── xcom2

To enable the mod, run 'openxcom', go to options -> mods and select X-Piratez from the drop-down menu.

You are almost there. You should now go through all the options in Options -> ADVANCED, one by one, and make sure that they are set as suggested by the mod.
Thankfully this information is in the description text of each option. If the descriptions says "NAY" oder "BEGONE" then NAY it is, if it says YARR! then set it to YARR!. Once that is dealt with you can be sure that you will play the mod as intended by the authors.

That's it, have fun with this great game!
« Last Edit: November 13, 2016, 01:59:41 pm by CaptainCorkscrew »

Offline ohartenstein23

  • Commander
  • *****
  • Posts: 1933
  • Flamethrowers fry cyberdisk circuits
    • View Profile
Re: Arch Linux Installation
« Reply #1 on: November 10, 2016, 02:59:19 pm »
I opened this thread fully expecting another "This doesn't work for my Linux distribution, someone needs to make a precompiled executable and instructions for my specific system needs," but was pleasantly surprised to find you helping out other users. Kudos to you, and welcome to the forums!

Offline CaptainCorkscrew

  • Captain
  • ***
  • Posts: 78
    • View Profile
    • Let's Play: XPiratez
Re: Arch Linux Installation
« Reply #2 on: November 10, 2016, 08:17:20 pm »
Thanks.
It is just some information from various places put together. I hope someone will find it useful.

Offline Derived

  • Sergeant
  • **
  • Posts: 10
    • View Profile
Re: HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« Reply #3 on: July 13, 2018, 01:02:17 am »
How to adapt this for Gentoo (sorry not sorry, not arch linux but close enough  ;D):
* adapt openxcom ebuild from official portage tree to pull correct version of MeridianOXC/OpenXcom from github (my modified ebuild attached, for reference or lazy trusting people just remove the .txt extension).
* Tried emerging, but compilation failed for me on yaml-cpp linking. Fixed this by removing line 91 of
 cmake/modules/FindYaml_cpp.cmake (i.e. the line: SET(YAMLCPP_INCLUDE_DIR "${YAMLCPP_INCLUDE_DIR};${YAMLCPP_INCLUDE_DIR}/.."))). To fix this on the run, we use the ebuild command (as emerge does to install a package):
** run first "sudo ebuild meridianoxc-3.5.0_p9999.ebuild fetch unpack".
** then remove the line (on my system unpack placed the source files into /var/tmp/portage/games-engines/meridianoxc-3.5.0_p9999/work/meridianoxc-3.5.0_p9999)
** Finnish installing with "sudo ebuild meridianoxc-3.5.0_p9999.ebuild compile install qmerge"
* Unzip piratez mod distribution (e.g. in your home dir) and run from inside the created Dioxine_XPiratez-folder using: "openxcom -data ." (this way all the nay/yarr options seem to be preset and locked to correct values, and no copying files anywhere is needed, again satisfying my laziness)

Yes, you can do it Gentoo :)

ps. for extra fun, place your starting base at an out-of-the way location.
pps. and if you're more knowledgeable about gentoo, feel free to create an overlay with the ebuild with the proper patch. This be my 3cents.
« Last Edit: July 13, 2018, 01:24:29 am by dd »

Offline mk-fg

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« Reply #4 on: July 15, 2018, 11:56:44 am »
However, those executables are for Ubuntu and may or may not work on Debian or Linux Mint as well, but what about all the other Linux distributions, like Arch? The solution: build from source.

Arch indeed provides a rather painless build option (with all headers pre-installed, great tools and aur), but alternative can be to use these pre-built binaries anyway, which would probably work fine on any distro - Arch included - with one quirk wrt SDL (usually) or other .so versions, which can usually be worked around like this:

Code: [Select]
% ldd OpenXcomEx
...
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00007f61a2b9b000)
        libSDL_gfx.so.15 => not found
        libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0x00007f61a294c000)
...
% ls -ld /usr/lib/libSDL_gfx*
lrwxrwxrwx 1 root root    20 Mar 31  2017 /usr/lib/libSDL_gfx.so -> libSDL_gfx.so.16.9.1
lrwxrwxrwx 1 root root    20 Mar 31  2017 /usr/lib/libSDL_gfx.so.16 -> libSDL_gfx.so.16.9.1
-rwxr-xr-x 1 root root 90928 Mar 31  2017 /usr/lib/libSDL_gfx.so.16.9.1
% sudo ln -s libSDL_gfx.so /usr/lib/libSDL_gfx.so.15

It's a hack, but works fine in almost all (if not all) practical cases, as .so changes in such libs tend to leave old ABIs unchanged anyway.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« Reply #5 on: July 15, 2018, 02:40:10 pm »
Code: [Select]
% ldd OpenXcomEx
...
        libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x00007f61a2b9b000)
        libSDL_gfx.so.15 => not found
        libSDL_mixer-1.2.so.0 => /usr/lib/libSDL_mixer-1.2.so.0 (0x00007f61a294c000)
...

I wonder what's the version of libSDL_gfx is this. 2.0.26? If so, there are zero ABI changes to 2.0.25 which is .so.15 .  So this would work in all cases.
« Last Edit: July 15, 2018, 02:44:55 pm by Stoddard »

Offline mk-fg

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« Reply #6 on: July 15, 2018, 02:50:52 pm »
I wonder what's the version of libSDL_gfx is this. 2.0.26?

Seem to be 2.0.25, as that ldd was for Ubuntu Bionic binary, and that's what it seem to have currently. Have 2.0.26 here and its soname is .16, so definitely not that.
EDIT: guess we both looked it up at the same time :)

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« Reply #7 on: July 15, 2018, 03:00:26 pm »
Seem to be 2.0.25, as that ldd was for Ubuntu Bionic binary, and that's what it seem to have currently. Have 2.0.26 here and its soname is .16, so definitely not that.
EDIT: guess we both looked it up at the same time :)

:) No, I meant what's the version of the lib with the .so.16 suffix. But whatever, symlinking should work no problem.


Offline mk-fg

  • Sergeant
  • **
  • Posts: 17
    • View Profile
Re: HOW-TO: Install OpenXcom X-Piratez on Arch Linux
« Reply #8 on: July 15, 2018, 03:12:13 pm »
:) No, I meant what's the version of the lib with the .so.16 suffix. But whatever, symlinking should work no problem.

Ah, guess was confused by your quote pick that only mentioned .15.