[MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
SanyaWaffles
Posts: 805
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

[MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by SanyaWaffles »

The title's a bit short so let me describe what the problem is.

A friend on MacOS wanted to test my standalone TC so I gave her the ipk3. The problem is when she put GZDoom.app and the ipk3 in the same directory, the IPK3 was not found.

Is that normal behavior? I remember WADs being able to be put in the directory GZDoom.app was in.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by _mental_ »

It depends on how GZDoom was invoked.

Here is the list of IWADs search paths
  • . (current directory)
  • $DOOMWADDIR
  • ~/Documents/GZDoom
  • ~/Library/Application Support/GZDoom
  • $PROGDIR
  • /Library/Application Support/GZDoom
It's OK for game launched from UI, i.e. from Finder, Spotlight, etc.
Because in this case the current directory is root. I doubt someone has IWADs there.

If you want some kind of portable game then put all WADs next to executable, in GZDoom.app/Contents/MacOS directory.
User avatar
Rachael
Posts: 13557
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by Rachael »

Is it normal, that if any app (not GZDoom) is inside an .app bundle, that it will not scan the immediate folder outside of it for data? Honestly (not being a Mac user), this seems anti-intuitive to me and I don't like it, especially if you have a program other than Finder launching the game. I think that GZDoom should always behave the same whether it is launched by Finder or not, although I will say having the current directory "." directive is handy for external programs launching it who may want to use alternative data.

Note that I am not a full-time Mac user, but from what little experience I do have on Mac, I can tell you this is not the behavior I would expect from GZDoom - or any Mac app for that matter.

Is it completely unfeasible to have an ${APP_PARENT} search folder for Mac that is only active when ".app/" matches somewhere in argv[0]?
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by _mental_ »

GZDoom always behaves the same in terms of search paths. The current directory entry is added for convenience only.
Program that launches GZDoom can set its current directory or alter environment variables. We have no control over this.

As far as I know placing something next to a self-contained bundle (i.e. when it's not embedded/private helper app) is considered a bad design.
Some cheap game ports to Mac do this. Obviously such products cannot be distributed in MacAppStore.
SanyaWaffles
Posts: 805
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by SanyaWaffles »

So the ideal way to create a self-running standalone executable would be to bundle the ipk3 within the app itself?

I feel that could be hard to maintain considering I don't have a Mac machine anymore to test on (It's on loan to a friend)

I feel the way my friend had to install the ipk3 was a bit convoluted considering she's not exactly, by her own words, computer savvy.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by _mental_ »

If you want to update your mod together with GZDoom then put IWAD inside the bundle and copy it into any directory.
If you want to update independently then copy GZDoom anywhere and IWAD to ~/Documents/GZDoom directory.
SanyaWaffles
Posts: 805
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields
Contact:

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by SanyaWaffles »

I didn't learn until today that ~/Documents/GZDoom is a path you can put your IWADs/IPK3s or WADs in general... that might be a better option until my mods are stable/finished.

It says however, when you run without any WADs/PK3s, to put it in the harder to find ~/Library/Application Support/gzdoom folder (as Library is hidden on modern MacOS iterations if memory serves correctly).

Maybe the console code should be changed to include both of these paths? (Most people know where the Documents folder is).

Anyhow, thank you for clarifying my options.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: [MacOS] GZDoom.app doesn't search for ipk3/iwads proper

Post by _mental_ »

No IWAD error might be improved. Post more user friendly message and I’ll add it.
Post Reply

Return to “Closed Bugs [GZDoom]”