OpenXcom Forum

OpenXcom => Troubleshooting => Topic started by: niculinux on June 14, 2014, 07:07:43 pm

Title: [SOLVED] Modify/customize data location for OpenXcom in linux
Post by: niculinux on June 14, 2014, 07:07:43 pm
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 (https://openxcom.org/forum/index.php?topic=2255.0) ;) Also for better and simplier mod management
Title: Re: Modify/customize data location for OpenXcom
Post by: SupSuper on June 14, 2014, 07:44:07 pm
This might help: https://www.ufopaedia.org/index.php?title=Installing_(OpenXcom)#Data_Folder
Title: Re: Modify/customize data location for OpenXcom
Post by: niculinux 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  ;)
Title: Re: Modify/customize data location for OpenXcom
Post by: Falko 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
Title: Re: Modify/customize data location for OpenXcom
Post by: niculinux 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.   :)
Title: Re: Modify/customize data location for OpenXcom
Post by: SupSuper 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/
Title: Re: Modify/customize data location for OpenXcom
Post by: Falko 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/
Title: Re: Modify/customize data location for OpenXcom
Post by: SupSuper 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"
Title: Re: Modify/customize data location for OpenXcom
Post by: niculinux 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? (https://openxcom.org/forum/index.php?board=12.0)

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
Title: Re: Modify/customize data location for OpenXcom in linux
Post by: niculinux 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?
Title: Re: Modify/customize data location for OpenXcom in linux
Post by: SupSuper 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? (https://openxcom.org/forum/index.php?board=12.0)

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.
Title: Re: Modify/customize data location for OpenXcom in linux
Post by: niculinux 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. (https://openxcom.org/forum/index.php?topic=2305.0)

First part, solved!