Official macOS release?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

dpJudas
Developer
Developer
Posts: 798
Joined: Sat Jul 23, 2016 7:53

Re: Official macOS release?

Post by dpJudas »

Excellent! Then we just need something roughly ala this:

Code: Select all

#import <Foundation/Foundation.h>

FString GetAppDataPath()
{
	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
	NSString *directory = [paths objectAtIndex:0];
	return [directory UTF8String];
}

FString GetResourcesPath()
{
	return [[[NSBundle mainBundle] resourcePath] UTF8String];
}
Not sure if we need that second one - just including it for reference.

_mental_, are you looking at this or do you want me to do it?

Edit: probably better mental does it because I'm not sure I can tell on the Apple docs which versions introduced that function and its alternatives on NSFileManager.
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Re: Official macOS release?

Post by Rachael »

About the xbr support, it seems like the CMake list was updated for it, but the files are not present in the source tree. I was trying to run CMake today to fix a minor issue but it errors out at that point.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: Official macOS release?

Post by Graf Zahl »

Hm. I thought I added them. One moment.
User avatar
Rachael
Developer
Developer
Posts: 3646
Joined: Sat May 13, 2006 10:30

Re: Official macOS release?

Post by Rachael »

Sweet, thank you! That worked.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Official macOS release?

Post by _mental_ »

About special path on macOS: URLForDirectory and URLsForDirectory from NSFileManager class cannot be used because they require 10.6 but ZDoom should run on 10.4. NSSearchPathForDirectoriesInDomains() is the right choise although it has no ability to return path to the Preferences directory.
I'm in doubt about the switch to Cocoa here. CoreServices API was deprecated in 10.8 but we are targeting 10.7 at least (and 10.6 is still possible with the legacy renderer and custom C++ standard library).
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: Official macOS release?

Post by Gez »

_mental_ wrote:Are saved games or screenshots qualified as user data? The answer is very subjective I think.
Definitely; especially screenshots. If someone takes a screenshot, usually they'll want to be able to access it afterwards, not to have it sent to write-only memory.

Saves you could argue that only the app needs to access them, even though a user might want to back them up or something, but screenshots? ZDoom doesn't even have an in-app way to view screenshots you've made...
Graf Zahl wrote:I think ZDoom gets most things correct. The only one I wasn't certain about is the INI. Interestingly, this is done differently on Windows than on macOS. On Windows it goes into the roaming app data, which is normally a hidden folder.
There are a few things that users are expected to do by directly editing their ini (adding stuff to autoload being the biggest) though.
_mental_
Developer
Developer
Posts: 259
Joined: Sun Aug 07, 2011 13:36

Re: Official macOS release?

Post by _mental_ »

Here is my build environment for macOS. Only the recent Xcode is required. Run build.sh and it will create .dmg at HEAD of the master branch. Suggestions/complains are welcome.
VisiblyShaken

Re: Official macOS release?

Post by VisiblyShaken »

I'm a linux guy making the switch from linux to mac and I cant stop stumbling all over. Couldn't even get wine to work with gzdoom, but this did the trick with no issues so far. Thank you team.
Locked

Return to “GZDoom”