Author Topic: %USER_DIRECTORY% not working for BGee, BG2ee on OS X  (Read 4583 times)

Offline subtledoctor

  • Planewalker
  • *****
  • Posts: 131
%USER_DIRECTORY% not working for BGee, BG2ee on OS X
« on: March 03, 2015, 07:46:55 AM »
Thought I should mention, it seems Beamdog has changed the user directory containing Baldur.ini and savegames for BGee and BG2ee on OS X.  This might have happened in the recent patch.

The .ini and savegames used to be at ~/Documents/Baldur's Gate - Enhanced Edition/.  This is where Weidu looks for %USER_DIRECTORY%.

Now, the .ini and savegames are in ~/Library/Containers/com.beamdog.baldursgateenhancededition/Data/Documents/Baldur's Gate - Enhanced Edition.

BG2ee has the user_directory at ~/Library/Containers/com.beamdog.baldursgateIIenhancededition/Data/Documents/Baldur's Gate II - Enhanced Edition.

IWDee seems to be using the normal folder in ~/Documents... though I know it is up for a patch soon, so that may change.

Behavior: If I move the user_directory to ~/Documents/ and create an alias or symlink to the ~/Library/... location, the game cannot follow the alias and crashes.  Alternatively I can make an alias or symlink from the ~/Library/... location to ~/Documents/ to give me easy access to the .ini... but when I do this, Weidu cannot follow the alias and the %USER_DIRECTORY% variable does not work.

This likely has to do with Apple's new sandboxing security features (I'm using 10.8.5) since I think that's what the ~/Library/Containers/ folder is for.  I'm not sure whether IWDee really behaves differently, or whether I had my security preferences set differently when I happened to install it. 

Seems to me the ideal solution is to have Weidu check for the .ini in ~/Library/Containers/... first, and if nothing is there to use ~/Documents/.  But I have no idea whether that's feasible - that's what you guys are here for!   :)

Cheers

Offline hook71

  • Planewalker
  • *****
  • Posts: 63
  • Gender: Male
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #1 on: March 04, 2015, 09:25:58 AM »
IWD:EE uses ~/Library/Containers/com.overhaulgames.iwdee-macos/Data/Documents/Icewind Dale - Enhanced Edition on my Mac.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1158
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #2 on: March 08, 2015, 04:41:11 PM »
I guess I shall have to go ask Beamhaul for some kind of diagram or something.

Offline subtledoctor

  • Planewalker
  • *****
  • Posts: 131
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #3 on: March 09, 2015, 01:16:31 PM »
I'm *fairly* sure it's an OS X thing, depending on the app sandboxings setting introduced in Mountain Lion (or was it Lion?)

If you set the OS to only run applications from the App Store or from Known Developers, I think it moves the games' .ini and savegames into ~/Library/Containers./  If you let the oS run any app from anywhere, I think it keeps those files in ~/Documents.

I think. I'm not totally sure. It would be great if Beamhaul (or some OS X expert) could explain it, but I've got no authoritative answer over on the Beamdog forums.


Offline AstroBryGuy

  • Planewalker
  • *****
  • Posts: 154
  • Gender: Male
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #4 on: March 10, 2015, 11:51:13 PM »
I downloaded the EEs from Beamdog, and it created symlinks (not OSX aliases) in ~/Documents to folders in ~/Library/Containers. Also, in my testing, WeiDU works fine with symlinks, but not OSX aliases.

Code: [Select]
lrwxr-xr-x   1 astrobryguy  staff      119 Aug 11  2014 Baldur's Gate - Enhanced Edition -> /Users/astrobryguy/Library/Containers/com.beamdog.baldursgateenhancededition/Data/Documents/Baldur's Gate - Enhanced Edition
lrwxr-xr-x   1 astrobryguy  staff      124 Aug 11  2014 Baldur's Gate II - Enhanced Edition -> /Users/astrobryguy/Library/Containers/com.beamdog.baldursgateIIenhancededition/Data/Documents/Baldur's Gate II - Enhanced Edition
lrwxr-xr-x   1 astrobryguy  staff      109 Oct  6 01:06 Icewind Dale - Enhanced Edition -> /Users/astrobryguy/Library/Containers/com.overhaulgames.iwdee-macos/Data/Documents/Icewind Dale - Enhanced Edition

If an installer is putting files in ~/Library/Containers and not creating those symlinks (or is creating aliases instead), that would be a problem.

Offline subtledoctor

  • Planewalker
  • *****
  • Posts: 131
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #5 on: March 11, 2015, 09:22:06 AM »
I thought I had tested and it wasn't working with UNIX symlinks. But further, more rigorous testing suggests that it does. Meaning everything is okay. Sorry if I alarmed anyone.

Offline Wisp

  • Moderator
  • Planewalker
  • *****
  • Posts: 1158
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #6 on: March 20, 2015, 06:58:19 PM »
So there is nothing to fix about USER_DIRECTORY on OS X?

Offline CrevsDaak

  • big kid lil' orc
  • Planewalker
  • *****
  • Posts: 48
  • Gender: Male
  • duuuh graah
Re: %USER_DIRECTORY% not working for BGee, BG2ee on OS X
« Reply #7 on: March 20, 2015, 09:24:03 PM »
So there is nothing to fix about USER_DIRECTORY on OS X?
Exactly. It's working alright.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: