News for hackers. Stuff that matters.
Re:macOS to FreeBSD migration a.k.a. why I left macOS by dukeofdoom on Tuesday December 01, 2020 @12:05PM (#25267081)
I'll mention two pain points as a former windows developer.

I used to develop windows shareware, all the way back to Windows 95. Back then you could write to the installation folder "c:\program files\myapp" and life was simple.

At some point MS figured this was bad security, and you needed to write to the Windows Rigistery (HCKLM / HCKLU) to store your app settings. And write to C:\Users\<username>\AppData\ folder to store your data files.

So all of this resulted in 3 different places you needed to write your data to now. But then it gets even more split because, in some cases you needed to run as an admin during the installation, and your appdata will be stored under the admin account. Also, at some point c:\progrm files\ was split, and also they added c:\program files (x86), and I believe the c:\program files\ is virtualized. And the Windows registry is also split for local user, and machine settings, and admin settings.

Two issues I ran into:

1. c:\program files\myapp\ I could not trust what I wrote there. I believe its virtualized. So I ran into issues where I would delete a file in my installation folder, and old version would be put back by windows in the background.

2. When a regular user installed my app, and it need to write to HKLM, the app will need to be elevated to admin to be able to do that. This also resulted in another split of settings. Because there are per user settings and per machine settings.

In conclusion, app installation became a confusing mess!

Re:macOS to FreeBSD migration a.k.a. why I left macOS by Macha on Tuesday December 01, 2020 @12:15PM (#25267188)
This divide exists in all OSes now.

Linux (XDG):

Config: XDG_CONFIG_HOME (~/.config)

App: /usr/bin

Runtime data: XDG_DATA_HOME (~/.local/share)

--

MacOS:

(Note: CLI apps often follow the XDG conventions rather than the Mac conventions on OS X)

Config: ~/Library/Application Support/

Application: /Applications

Runtime data: ~/Library/Application Support

Re:macOS to FreeBSD migration a.k.a. why I left macOS by quotemstr on Tuesday December 01, 2020 @12:30PM (#25267406)
> In conclusion, app installation became a confusing mess!

No, app installation was a confusing mess and now it's been cleaned up. There's nothing wrong with an app separating user-specific data from system-global data. Running an app as a regular user shouldn't require any writes to HKLM!

Re:macOS to FreeBSD migration a.k.a. why I left macOS by dukeofdoom on Tuesday December 01, 2020 @01:01PM (#25267796)
One of my apps has a dll based plugin system, uses OCX. Requires elevation to install dll files.
Re:macOS to FreeBSD migration a.k.a. why I left macOS by pjmlp on Tuesday December 01, 2020 @03:09PM (#25269278)
Re:macOS to FreeBSD migration a.k.a. why I left macOS by quotemstr on Tuesday December 01, 2020 @06:21PM (#25271386)
Bingo. There's zero excuse for writing global system data for user-specific needs.