dreamer / luxtorpeda

Steam Play compatibility tool to run games using native Linux engines
https://luxtorpeda.gitlab.io/
GNU General Public License v2.0
390 stars 9 forks source link

Arx Libertatis has a problem with finding data files #16

Closed dreamer closed 5 years ago

dreamer commented 5 years ago

By default, the engine is written to expect data files imported from CD, GOG or somewhere else - not to operate directly on data included in Steam install.

Suggested solution is to package symbolic links with filenames as expected by Arx and point engine to them using --data-dir.

d10sfan commented 5 years ago

For this one, need to create a shell script that calls ./arx with the data-dir parameter (set to the current directory). As well, figure out the files that are not named correctly, then create relative path symbolic links that'll be included in the build artifact.

dreamer commented 5 years ago

--data-dir can be passed in packages.json, but a script can be useful as well.

d10sfan commented 5 years ago

I've pushed up changes to the arx libertatis package and the new build is working now.

What it does now is it runs a script at runtime and creates symlinks for all the files that it finds to be incorrectly cased. I'm doing it at runtime in case other localizations have different file names. Then the script once complete will call the ./arx binary (now called arx-bin) with the data-dir variable.

I was able to run from a clean start and it came right up into the game, without the wizard that was originally showing up. And it doesn't install any data anywhere either, just creates it's config.

So this one should be ready for testing again, then if it's good, should be ready to be publicized.

monyarm commented 5 years ago

Make sure to not create the symlinks if on an case insensitive file system.

d10sfan commented 5 years ago

Make sure to not create the symlinks if on an case insensitive file system.

It does check if the file exists before creating it. In that case, would a case insensitive system pass that test?

dreamer commented 5 years ago

This case sensitivity thing would not be a problem until recently, but now users might mount their ext4 filesystems this way to work around game bugs for games under Proton, so it's a valid concern :(

Another concerning usecases are:

… and I have no idea what the results can be for each usecase.

For this reason I am going to create share subdirectory (lux/share?) and place the structure with symlinks inside - this will leave out only users who placed their libraries on NTFS drives and mounted them in case-sensitive way and without symlink support… but for these users I consider it a PEBKAC.

Another thing is… I really, really dislike that we have complex launcher script - for now it's ok, but we might move it to being helper script in package repo instead; one benefit of it is - we can handle both Arx Fatalis and Arx Fatalis demo (https://steamdb.info/app/1710/) without extra steps.

This would all be easier if Arx Libertatis behaved like any other ioquake3-derived engine and just assumed the same file names as default installation - this renaming files to lowercase added a lot of unnecessary complexity.

An idea for later is: port the file-finding algorithm I developed for Boxtron (https://github.com/dreamer/boxtron/blob/master/winpathlib.py) from Python to C and submit it as PR to Lux Libertatis.

monyarm commented 5 years ago

I think submitting a pull request might be the least messy option

On Tue, 6 Aug 2019, 11:50 Patryk Obara, notifications@github.com wrote:

This case sensitivity thing would not be a problem until recently, but now users might mount their ext4 filesystems this way to work around game bugs for games under Proton, so it's a valid concern :(

Another concerning usecases are:

  • user might install the game on case-sensitive fs and later move the game installation
  • or game library
  • or remount the fs
  • or use the same library under Windows

… and I have no idea what the results can be for each usecase.

For this reason I am going to create share subdirectory (lux/share?) and place the structure with symlinks inside - this will leave out only users who placed their libraries on NTFS drives and mounted them in case-sensitive way and without symlink support… but for these users I consider it a PEBKAC.

Another thing is… I really, really dislike that we have complex launcher script - for now it's ok, but we might move it to being helper script in package repo instead; one benefit of it is - we can handle both Arx Fatalis and Arx Fatalis demo (https://steamdb.info/app/1710/) without extra steps.

This would all be easier if Arx Libertatis behaved like any other ioquake3-derived engine and just assumed the same file names as default installation - this renaming files to lowercase added a lot of unnecessary complexity.

An idea for later is: port the file-finding algorithm I developed for Boxtron (https://github.com/dreamer/boxtron/blob/master/winpathlib.py) from Python to C and submit it as PR to Lux Libertatis.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dreamer/luxtorpeda/issues/16?email_source=notifications&email_token=AAXHJKQUMSXWE4RU4T7XB2LQDE3MNA5CNFSM4IJM3PU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3UNLRI#issuecomment-518575557, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXHJKSARPHQ7NDC3OUWLT3QDE3MNANCNFSM4IJM3PUQ .

dreamer commented 5 years ago

For now, I simplified symlink creation and placed it in share/arx/data: https://gitlab.com/luxtorpeda/packages/arxlibertatis/compare/8133ce47edac330435fdfc09c5f3770ee8b722d6...4dec08f23d37326a14c70871c31b6daa05fdb3af

I still have broken textures, but haven't found the root cause for that (it seems to be affecting only me). Maybe packaging Arx Demo will help to pinpoint the problem.

dreamer commented 5 years ago

After a few tests it seems like Arx is now working ok - I still have textures problem, but it seems to be game-related and we won't be able to fix it in the package. Thanks, everyone!