Author Topic: [SOLVED] Modify/customize data location for OpenXcom in linux  (Read 8402 times)

niculinux

  • Guest
hello again,

Since I'm struggling to get openxcom working i find the location of the data folders required to run the game somewhat "annoyng", for eg. may be possible to change their path? From

Code: [Select]
/usr/share/openxcom/data/ 
to

Code: [Select]
/home/username/oepnxcom/data/
Edit: for instance, would be very neat if this may be possible simply by modify  an entry in the configuration file ;) Also for better and simplier mod management
« Last Edit: June 17, 2014, 08:53:01 pm by niculinux »

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile

niculinux

  • Guest
Re: Modify/customize data location for OpenXcom
« Reply #2 on: June 14, 2014, 09:19:14 pm »
This might help: https://www.ufopaedia.org/index.php?title=Installing_(OpenXcom)#Data_Folder

Thanks, I've looked at it but did not cathc up how to do :,( Please someone may explain in  a very simple way? Have mercy  ;)

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Modify/customize data location for OpenXcom
« Reply #3 on: June 14, 2014, 09:55:28 pm »
here you can read how top set environment variables
https://help.ubuntu.com/community/EnvironmentVariables
and if you set the $XDG_DATA_HOME and $XDG_DATA_DIRS variable to something like
/home/myname/openxcomfolder
the programm looks for data in /home/myname/openxcomfolder/openxcom/data

niculinux

  • Guest
Re: Modify/customize data location for OpenXcom
« Reply #4 on: June 14, 2014, 10:48:07 pm »
ok thanks but things really start to get hard for me  :'( :'( I'd suggest that the default behavior of the game  should look into /home of the user, it'd make way more simple to install openxcom and mod managing/customizing/editing.   :)

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Modify/customize data location for OpenXcom
« Reply #5 on: June 14, 2014, 10:52:37 pm »
The game should already look into home. If you don't have XDG set up, these are the default paths:
- ~/.local/share/openxcom/data/ (~ is the home path)
- /usr/share/openxcom/data/
- /usr/local/share/openxcom/data/

Offline Falko

  • Commander
  • *****
  • Posts: 802
    • View Profile
Re: Modify/customize data location for OpenXcom
« Reply #6 on: June 14, 2014, 11:46:55 pm »
new try - without changing variables:
mkdir -p /home/username/oxcom
su - root
mv -r /usr/share/openxcom/data/  /home/username/oxcom
chown -R username /home/username/oxcom
ln -s /home/username/oxcom/data /usr/share/openxcom/data/

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Modify/customize data location for OpenXcom
« Reply #7 on: June 15, 2014, 12:25:56 am »
You can also just pass a custom path by command line, like "./openxcom -data /home/username/oxcom/data"

niculinux

  • Guest
Re: Modify/customize data location for OpenXcom
« Reply #8 on: June 15, 2014, 01:15:50 pm »
The game should already look into home. If you don't have XDG set up, these are the default paths:
- ~/.local/share/openxcom/data/ (~ is the home path)

well seems it's not working! I've compiled 1.0 with the help of the community here <3 and put the data files in the above mentioned path and also in my oxpenxcom installation path.

The data directoryes where (accordin to the readme included):

Code: [Select]
GEODATA
GEOGRAPH
MAPS
ROUTES
SOUND
TERRAIN
UFOGRAPH
UFOINTRO
UNITS

and the path is:

Code: [Select]
/home/username/openxcom-1.0.0/bin/data/openxcom
I've also applyed the universal patch taken from homepage, but game says cannot find certain files. May I humbly suggest to move this into troubleshooting section of the forum?

edit:  i'm on linux, and the log file in the .config home folder says:

Code: [Select]
[15-06-2014 12:17:59] [INFO] Data folder is:
[15-06-2014 12:17:59] [INFO] Data search is:
[15-06-2014 12:17:59] [INFO] - /home/nico/.local/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/share/xfce/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/local/sharehttps://openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/sharehttps://openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/local/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/local/share/openxcomhttps://data/
[15-06-2014 12:17:59] [INFO] - ./data/
[15-06-2014 12:17:59] [INFO] User folder is: /home/nico/.local/share/openxcom/
[15-06-2014 12:17:59] [INFO] Config folder is: /home/nico/.config/openxcom/
[15-06-2014 12:17:59] [INFO] Options loaded successfully.
[15-06-2014 12:17:59] [INFO] SDL initialized successfully.
[15-06-2014 12:17:59] [INFO] SDL_mixer initialized successfully.
[15-06-2014 12:17:59] [INFO] Attempting to set display to 1024x768x8...
[15-06-2014 12:17:59] [INFO] Display set to 1024x768x8.
[15-06-2014 12:17:59] [INFO] Loading ruleset...
[15-06-2014 12:18:00] [INFO] Ruleset loaded successfully.
[15-06-2014 12:18:00] [INFO] Loading resources...
[15-06-2014 12:18:00] [INFO] /etc/timidity/freepats.cfg: No such file or directory
[15-06-2014 12:18:00] [ERROR] GMDEFEND not found
« Last Edit: June 15, 2014, 11:05:03 pm by niculinux »

niculinux

  • Guest
Re: Modify/customize data location for OpenXcom in linux
« Reply #9 on: June 15, 2014, 11:07:51 pm »
Actually , i seem to be successful only with 0.9 version, a .deb packaged one, also the game looks for the data only when placed in

Code: [Select]
/usr/share/openxcom/data/
And ignores other path above mentioned, so i suppose it's a matter of configuration, but i really don'n know what to do. Any other suggestion, info?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2159
    • View Profile
Re: Modify/customize data location for OpenXcom in linux
« Reply #10 on: June 16, 2014, 10:00:40 pm »
well seems it's not working! I've compiled 1.0 with the help of the community here <3 and put the data files in the above mentioned path and also in my oxpenxcom installation path.

The data directoryes where (accordin to the readme included):

Code: [Select]
GEODATA
GEOGRAPH
MAPS
ROUTES
SOUND
TERRAIN
UFOGRAPH
UFOINTRO
UNITS

and the path is:

Code: [Select]
/home/username/openxcom-1.0.0/bin/data/openxcom
I've also applyed the universal patch taken from homepage, but game says cannot find certain files. May I humbly suggest to move this into troubleshooting section of the forum?

edit:  i'm on linux, and the log file in the .config home folder says:

Code: [Select]
[15-06-2014 12:17:59] [INFO] Data folder is:
[15-06-2014 12:17:59] [INFO] Data search is:
[15-06-2014 12:17:59] [INFO] - /home/nico/.local/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/share/xfce/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/local/sharehttps://openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/sharehttps://openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/local/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/share/openxcom/data/
[15-06-2014 12:17:59] [INFO] - /usr/local/share/openxcomhttps://data/
[15-06-2014 12:17:59] [INFO] - ./data/
[15-06-2014 12:17:59] [INFO] User folder is: /home/nico/.local/share/openxcom/
[15-06-2014 12:17:59] [INFO] Config folder is: /home/nico/.config/openxcom/
[15-06-2014 12:17:59] [INFO] Options loaded successfully.
[15-06-2014 12:17:59] [INFO] SDL initialized successfully.
[15-06-2014 12:17:59] [INFO] SDL_mixer initialized successfully.
[15-06-2014 12:17:59] [INFO] Attempting to set display to 1024x768x8...
[15-06-2014 12:17:59] [INFO] Display set to 1024x768x8.
[15-06-2014 12:17:59] [INFO] Loading ruleset...
[15-06-2014 12:18:00] [INFO] Ruleset loaded successfully.
[15-06-2014 12:18:00] [INFO] Loading resources...
[15-06-2014 12:18:00] [INFO] /etc/timidity/freepats.cfg: No such file or directory
[15-06-2014 12:18:00] [ERROR] GMDEFEND not found
Looks like you did everything correctly, but your X-COM copy only has MIDI music, so the game needs TiMIDIty installed for it to work.

niculinux

  • Guest
Re: Modify/customize data location for OpenXcom in linux
« Reply #11 on: June 17, 2014, 08:52:45 pm »
IN fact you're right  timidity was missing -.-

so no problem:

Code: [Select]
sudo apt-ge install timidity
It pulled down a couple of depenmdencies, and the the game started! But then, I got another surprise installing the 0.73 pirates mod.

First part, solved!