Page 2 of 2

Re: Official macOS release?

Posted: Sat Sep 03, 2016 12:26
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.

Re: Official macOS release?

Posted: Sat Sep 03, 2016 15:44
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.

Re: Official macOS release?

Posted: Sat Sep 03, 2016 15:54
by Graf Zahl
Hm. I thought I added them. One moment.

Re: Official macOS release?

Posted: Sat Sep 03, 2016 16:04
by Rachael
Sweet, thank you! That worked.

Re: Official macOS release?

Posted: Sat Sep 03, 2016 16:46
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).

Re: Official macOS release?

Posted: Sat Sep 03, 2016 20:55
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.

Re: Official macOS release?

Posted: Sun Sep 04, 2016 11:49
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.

Re: Official macOS release?

Posted: Tue Sep 27, 2016 6:42
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.