fabiangreffrath / crispy-doom

Crispy Doom is a limit-removing enhanced-resolution Doom source port based on Chocolate Doom.
https://fabiangreffrath.github.io/crispy-homepage
GNU General Public License v2.0
802 stars 132 forks source link

IWAD Not Found On Linux Even Though The Path Is Clearly Specified #1193

Open Cleetu5 opened 7 months ago

Cleetu5 commented 7 months ago

Background

Version of Crispy Doom: 6.0.0

Operating System and version:
Linux Pop!_OS 22.04 LTS x86_64

Game: Doom

Bug description

Observed behaviour: I specify the path to the IWAD like this: flatpak run io.github.fabiangreffrath.Doom -iwad ~/path/to/iwad/DOOM2.WAD, but it's not working. Thank you for the help in advance.

fabiangreffrath commented 7 months ago

Well, what exactly does it say? Are you aware of the fact that file paths are case sensitive in Linux?

Cleetu5 commented 7 months ago

its says: IWAD file /path to file/DOOM2.WAD not found. I'm not sure what "case sensitive" means tbh.

fabiangreffrath commented 7 months ago

This means that doom2.wad is not the same as DOOM2.WAD and both may be separate files.

Cleetu5 commented 7 months ago

I see. I did experiment with renaming the file, but that also didnt work. So is he looking for doom2.wad or DOOM2.WAD?

mikeday0 commented 7 months ago

If the path to your iwad contains spaces, you also need to surround it with .

Cleetu5 commented 7 months ago

If the path to your iwad contains spaces, you also need to surround it with .

There are no spaces.

mikeday0 commented 7 months ago

There are no spaces.

Okay. Can you share the exact terminal output then?

Cleetu5 commented 7 months ago

There are no spaces.

Okay. Can you share the exact terminal output then?

flatpak run io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD
                           Crispy Doom 6.0.0
Z_Init: Init zone memory allocation daemon. 
zone memory: 0x7821e4400010, 32 MiB allocated for zone
Using /home/fredi/.var/app/io.github.fabiangreffrath.Doom/data/crispy-doom/ for configuration and saves
V_Init: allocate screens.
M_LoadDefaults: Load system defaults.
saving config in /home/fredi/.var/app/io.github.fabiangreffrath.Doom/data/crispy-doom/default.cfg
IWAD file '/home/fredi/Doom_iwads/DOOM2.WAD' not found!
fabiangreffrath commented 7 months ago

And does the file /home/fredi/Doom_iwads/DOOM2.WAD exist? As mentioned before, upper case and lower case makes a difference.

Cleetu5 commented 7 months ago

And does the file /home/fredi/Doom_iwads/DOOM2.WAD exist? As mentioned before, upper case and lower case makes a difference.

100% it absolutely does. The WAD also works, as I checked it with a diferent sourceport. Could there be an issue with the way crispy searches for files on my computer perhaps? Putting the file in the root of my home directory also doesnt work. Neither did putting the file in the crispy directory.

mikeday0 commented 7 months ago

Sorry if this seems like an inane request, but can you run ls -l /home/fredi/Doom_iwads and share the output?

Cleetu5 commented 7 months ago

Sorry if this seems like an inane request, but can you run ls -l /home/fredi/Doom_iwads and share the output?

Haha you really don't trust me it seems. Here's the output:

ls -l ~/Doom_iwads
insgesamt 43400
-rw-rw-r-- 1 fredi fredi 14604584 Dez 24  1996 DOOM2.WAD
-rw-rw-r-- 1 fredi fredi 12408292 Dez 24  1996 DOOM.WAD
-rw-rw-r-- 1 fredi fredi 17420824 Dez 24  1996 PLUTONIA.WAD
ceski-1 commented 7 months ago

Someone removed the ability to access the file system: https://github.com/flathub/io.github.fabiangreffrath.Doom/commit/5d0e9354f9bd15b7c183a7543017ad2c300f219b

A line like this needs to be added: https://github.com/flathub/org.chocolate_doom.ChocolateDoom/blob/c9575372cffade6d9d55240c853454d9066ef1d4/org.chocolate_doom.ChocolateDoom.yml#L14C5-L14C37

Until that's fixed, try adding --filesystem=/path/path:ro to the command line (more info).

ceski-1 commented 7 months ago

I guess you can also copy the wad to the crispy directory under ~/.var/app/ ?

Cleetu5 commented 7 months ago

Someone removed the ability to access the file system: flathub/io.github.fabiangreffrath.Doom@5d0e935

A line like this needs to be added: https://github.com/flathub/org.chocolate_doom.ChocolateDoom/blob/c9575372cffade6d9d55240c853454d9066ef1d4/org.chocolate_doom.ChocolateDoom.yml#L14C5-L14C37

Until that's fixed, try adding --filesystem=/path/path:ro to the command line (more info).

Oh, great that the problem got figured out! Could you perhaps post the entire command for crispy?

I guess you can also copy the wad to the crispy directory under ~/.var/app/ ?

Tried already. Didn't work. And the WAD file itself works fine.

mikeday0 commented 7 months ago

Haha you really don't trust me it seems. Here's the output:

Quite the opposite, in fact! This problem seems kind of crazy so I knew there was no way you were making it up. :smile: I was thinking maybe a strange character got into the filename or perhaps the permissions got mangled.

Anyway, @ceski-1 to the rescue. (As usual!)

ceski-1 commented 7 months ago

Could you perhaps post the entire command for crispy?

flatpak run --filesystem=~/Doom_iwads:ro io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD
mikeday0 commented 7 months ago

I guess you can also copy the wad to the crispy directory under ~/.var/app/ ?

Tried already. Didn't work. And the WAD file itself works fine.

The flatpak works fine for me provided that the iwad file is located somewhere under ~/.var/app/io.github.fabiangreffrath.Doom.

For example: flatpak run io.github.fabiangreffrath.Doom -iwad ~/.var/app/io.github.fabiangreffrath.Doom/DOOM2.WAD

Cleetu5 commented 7 months ago

Could you perhaps post the entire command for crispy?

flatpak run --filesystem=~/Doom_iwads:ro io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD

thanks!

ceski-1 commented 7 months ago

The flatpak works fine for me provided that the iwad file is located somewhere under ~/.var/app/io.github.fabiangreffrath.Doom.

For example: flatpak run io.github.fabiangreffrath.Doom -iwad ~/.var/app/io.github.fabiangreffrath.Doom/DOOM2.WAD

That's probably a more secure approach than exposing other parts of the file system to the flatpak. Maybe someone can update the manifest to be more convenient.

This also works with the above but I'm not sure what the best practice is: flatpak run --persist=. io.github.fabiangreffrath.Doom

mikeday0 commented 7 months ago

I know next to nothing about flatpak, but could you add a wad directory to the data folder and then set DOOMWADPATH to that directory and then inject it into flatpak environment? Then the user could place their wads in that folder and call them by their bare filenames.

Cleetu5 commented 7 months ago

Could you perhaps post the entire command for crispy?

flatpak run --filesystem=~/Doom_iwads:ro io.github.fabiangreffrath.Doom -iwad ~/Doom_iwads/DOOM2.WAD

I just wanted to say that it works now! Also do I have to put in the filesystem command everytime I wanna run Crispy?

mikeday0 commented 7 months ago

@Cleetu5 Could you confirm that if you put DOOM2.WAD in the ~/.var/app/io.github.fabiangreffrath.Doom/ directory and then call crispy-doom using flatpak run io.github.fabiangreffrath.Doom -iwad ~/.var/app/io.github.fabiangreffrath.Doom/DOOM2.WAD that it does not load for you?

6b6279 commented 7 months ago

Manually setting DOOMWADPATH over Flatseal and then copying the WAD files to the respective directory within the sandbox seems to work. It's important to keep in mind that Flatpak does not replace $HOME by the root of the sandbox namespace itself, but it exposes the respective .var subdirectory, i.e., DOOMWADPATH should be set according to the actual user home directory. DOOMWADPATH=/home/foobar/.var/app/io.github.fabiangreffrath.Doom/data/wads should do it. Don't forget to replace /home/foobar with your own home directory path. $HOME doesn't work as Flatpak (nor Flatseal) does bash-like string replacement.

wonkidoodle commented 3 months ago

Someone removed the ability to access the file system: flathub/io.github.fabiangreffrath.Doom@5d0e935

A line like this needs to be added: https://github.com/flathub/org.chocolate_doom.ChocolateDoom/blob/c9575372cffade6d9d55240c853454d9066ef1d4/org.chocolate_doom.ChocolateDoom.yml#L14C5-L14C37

Until that's fixed, try adding --filesystem=/path/path:ro to the command line (more info).

I ran into the same issue trying to load Crispy Doom on the Steam Deck. The quoted solution was enough to get it going. Thanks.