Author Topic: Linux version?  (Read 14692 times)

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #15 on: June 16, 2016, 03:57:37 pm »
Can't you run wine on Linux?

Of course I can, but what this has to do with the lack of cross-compilers targeting OSX?

Offline Star_Treasure

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: Linux version?
« Reply #16 on: July 13, 2016, 12:43:52 am »
I've compiled OXCE on linux, but I haven't found any instructions on how to install the mod and only play Xpiratez on my windows computer from the pre-installed binary. Can anybody instruct me here?

Offline Searmay

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Re: Linux version?
« Reply #17 on: July 13, 2016, 08:29:27 pm »
You can probably use the one Meridian links to in his thread: https://openxcom.org/forum/index.php/topic,4187.0.html

If that doesn't work (it didn't for me), try:
Code: [Select]
git clone https://github.com/MeridianOXC/OpenXcom.git -b oxce3.0-plus-proto
mkdir OpenXcom/build
cd OpenXcom/build
sed -i "/ModScript.cpp/d" ../src/CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j3
sudo make install
Then from Dioxine's XPiratez rar, copy user/mod into ~/.local/share/openxcom/ and user/options.cfg to ~/.config/openxcom/. Oh, and the UFO/TFTD files can go in ~/.local/share/openxcom/{UFO,TFTD}.

If that doesn't work it might help if your distro has a openxcom in its repo to get working first.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #18 on: July 14, 2016, 04:07:13 pm »
Frankly, the attempts to use standard  data/user dirs on linux ( ~/.local, etc) are a bit of a mess.

I just extract the mod somewhere, for example ~/games/oxp99,
put the UFO:EU data into ~/games/oxp99/share/openxcom/UFO,
put the latest binary somewhere like ~/games/oxp99/bin/openxcom

then use a run.sh script to launch the game:

Code: [Select]
#!/bin/sh
prefix=/home/stdrd/games/oxp99
usrPath=$prefix/user
cfgPath=$usrPath
dataPath=$prefix

bin=$prefix/bin/openxcom

$bin -user $usrPath -cfg $cfgPath -data $dataPath

setting paths explicitly saves much time and hair-pulling

also, linux binaries are available here


Offline Star_Treasure

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: Linux version?
« Reply #19 on: July 14, 2016, 11:23:29 pm »
No precompiled binaries exist for Ubuntu 16.04 (Xenial) sadly.

Offline Star_Treasure

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: Linux version?
« Reply #20 on: July 14, 2016, 11:37:05 pm »
You can probably use the one Meridian links to in his thread: https://openxcom.org/forum/index.php/topic,4187.0.html

If that doesn't work (it didn't for me), try:
Code: [Select]
git clone https://github.com/MeridianOXC/OpenXcom.git -b oxce3.0-plus-proto
mkdir OpenXcom/build
cd OpenXcom/build
sed -i "/ModScript.cpp/d" ../src/CMakeLists.txt
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j3
sudo make install
Then from Dioxine's XPiratez rar, copy user/mod into ~/.local/share/openxcom/ and user/options.cfg to ~/.config/openxcom/. Oh, and the UFO/TFTD files can go in ~/.local/share/openxcom/{UFO,TFTD}.

If that doesn't work it might help if your distro has a openxcom in its repo to get working first.

Where does the bin end up when you compile this way? The way I was doing it earlier it showed up in OpenXcom/bin/ but I can't find it this time.

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #21 on: July 15, 2016, 11:23:05 am »
No precompiled binaries exist for Ubuntu 16.04 (Xenial) sadly.

Here you go https://lxnt.wtf/oxem/builds/oxce3.0-plus-proto-4009675-2016-07-14-j11-xenial-x86_64.7z while I fix the names and rest of builds.

EDIT:

Okay, fixed it all, plus fancy lister w/sort: https://lxnt.wtf/oxem/
« Last Edit: July 15, 2016, 01:06:24 pm by Stoddard »

Offline Searmay

  • Sergeant
  • **
  • Posts: 35
    • View Profile
Re: Linux version?
« Reply #22 on: July 15, 2016, 08:40:17 pm »
Quote
Where does the bin end up when you compile this way?
Make will create it in OpenXcom/build/bin, and make install should put it in /usr/local/bin. The build directory is just a way to keep the compilation separated from everything else so it's easy to remove when you bugger it up.

Offline Star_Treasure

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: Linux version?
« Reply #23 on: July 15, 2016, 09:41:19 pm »
Something must have gone wrong, neither folders have anything in them.

This is what I got when I tried again.

Code: [Select]
collect2: error: ld returned 1 exit status
src/CMakeFiles/openxcom.dir/build.make:8577: recipe for target 'bin/openxcom' failed
make[2]: *** [bin/openxcom] Error 1
CMakeFiles/Makefile2:103: recipe for target 'src/CMakeFiles/openxcom.dir/all' failed
make[1]: *** [src/CMakeFiles/openxcom.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

« Last Edit: July 15, 2016, 10:08:10 pm by Star_Treasure »

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #24 on: July 15, 2016, 09:57:19 pm »
Something must have gone wrong, neither folders have anything in them.

Very strange that OpenXcom/build is empty. The cmake -DCMAKE_BUILD_TYPE=Release .. command should have left at least something there. Was there any output?


Besides, my buildbots don't use Cmake, they essentially do:

Code: [Select]
cd OpenXcom/src
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
make -j 8 -f Makefile.simple

The PKG_CONFIG_PATH is needed since OpenXcom doesn't work with libyaml-cpp version 0.5.2, so you need to get version 0.5.3 from https://github.com/jbeder/yaml-cpp/releases/tag/release-0.5.3, install its build dependencies - libboost-dev package, build and install it under /usr/local prefix. (And preferably also uninstall  libyaml-cpp-dev package).

Then you can run the above commands and it'll put the binary in OpenXcom/bin.




Offline Star_Treasure

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: Linux version?
« Reply #25 on: July 15, 2016, 10:08:32 pm »
 I used to be able to compile by using
Code: [Select]
make -f Makefile.simple as instructed on https://www.ufopaedia.org/index.php/Compiling_with_Make_(OpenXcom)

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #26 on: July 15, 2016, 10:11:32 pm »
I used to be able to compile by using
Code: [Select]
make -f Makefile.simple as instructed on https://www.ufopaedia.org/index.php/Compiling_with_Make_(OpenXcom)

Did it cease to work? Any error output (simple makefiles are that much simpler to debug than CMake) ?

Because I have no problems building it that way.  In any case, it seems some dependency is missing. Could you post more output?

PS: CMake build indeed seems to be broken. Here's the fix: https://github.com/MeridianOXC/OpenXcom/pull/4
« Last Edit: July 15, 2016, 10:29:42 pm by Stoddard »

Offline Star_Treasure

  • Captain
  • ***
  • Posts: 96
    • View Profile
Re: Linux version?
« Reply #27 on: July 15, 2016, 10:50:52 pm »
Oh yeah,
Code: [Select]
make -f Makefile.simpleworked. And I got the mod installed. But I do see how this method is messier and wonder why the other way wasn't working.

Offline Yankes

  • Commander
  • *****
  • Posts: 3207
    • View Profile
Re: Linux version?
« Reply #28 on: July 15, 2016, 11:37:56 pm »
Oh yeah,
Code: [Select]
make -f Makefile.simpleworked. And I got the mod installed. But I do see how this method is messier and wonder why the other way wasn't working.
Possible this: https://openxcom.org/forum/index.php/topic,4187.msg67028.html#msg67028
Couple of releases of OXCE and OXCE+ have bugged cmake script. It will be fix in next version (meanwhile you can cherry-pick this commit https://github.com/Yankes/OpenXcom/commit/19feeef6bd2a1d9868ff77ffccd03197926c6c1e to fix it).

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Linux version?
« Reply #29 on: July 15, 2016, 11:40:08 pm »
Possible this: https://openxcom.org/forum/index.php/topic,4187.msg67028.html#msg67028
Couple of releases of OXCE and OXCE+ have bugged cmake script. It will be fix in next version (meanwhile you can cherry-pick this commit https://github.com/Yankes/OpenXcom/commit/19feeef6bd2a1d9868ff77ffccd03197926c6c1e to fix it).

I managed to make it work with https://github.com/MeridianOXC/OpenXcom/pull/4

Seemed faster to just patch than to search the forum. But whatever.





The archives with linux binaries now contain all data files so that there's one less step when installing from scratch (no need to download 2016-07-08-OpenXcomExPlus31-full.zip, just extract the linux archive on top of the mod).

https://lxnt.wtf/oxem/

Please ignore 'oxce3.0' in the file name, it does not mean the builds are not 3.2 or whatever latest version there is.
Instead pay attention to the date in the file name, and download the latest.

Builds commence within an hour of any updates appearing on the github.

« Last Edit: July 17, 2016, 11:25:06 am by Stoddard »