Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

luke9511

macrumors member
Original poster
Mar 23, 2015
60
0
hey everyone, i need to make a installer that will install files into folder in the hidden folder Application Support under the hidden library folder, how do i go about doing this? is there any software that can help me out?
 
i thought i would update this, but the files need to be installed under /users/yourusername/hidden library folder/ application support folder/its own folder, i found free software but there is no up to date guides on how to make it work
 
i thought i would update this, but the files need to be installed under /users/yourusername/hidden library folder/ application support folder/its own folder, i found free software but there is no up to date guides on how to make it work
You can't assume that the user that runs the installer is the same as the user who will be using the software. Making installers that install files into a given user's folder will be problematic.
 
You can't assume that the user that runs the installer is the same as the user who will be using the software. Making installers that install files into a given user's folder will be problematic.
that i already know, i got it figured out on windows but mac is a whole different ball game
 
Usually, if there is something to do with "~/Library/Application Support/Foo", there's an application involved. That Application should be responsible for populating that folder.

The reason Mac is a different ball game is that if there's something portable about an App's install, it should be in the app bundle. The main reason to use an installer here is to put something in "/Library/Application Support" so that multiple apps in a group can access it (like Adobe CC). ~/Library is not really meant to be the target of an install for any reason, really.

It mostly sounds like you want to plop down information about a given cryptocurrency account onto a machine for deployment reasons? Your best option seems to be to use a .pkg to put the files into a central location (/Library/Application Support), which would make for a good backup location, and then use the post-script to copy it from there into the current user's Library folder. But this does require admin privileges for no good reason, really.

Or just use a shell script (can bundle it as a .command if users will be installing it themselves) which copies the files to the correct location. Yet another option is a very simple Cocoa app that includes the files as resources in the bundle and displays a very, very simple UI. Depends on your needs.
 
  • Like
Reactions: chrfr
that i already know, i got it figured out on windows but mac is a whole different ball game
The point is that what you're trying to do is bad practice, regardless of whether or not you have it figured out. Your application should be set up to run and then create the necessary files for the user, rather than your installer trying to guess who might be using the computer, running the installer, and then creating files for that user. This fact isn't different for Windows or Mac.
 
The point is that what you're trying to do is bad practice, regardless of whether or not you have it figured out. Your application should be set up to run and then create the necessary files for the user, rather than your installer trying to guess who might be using the computer, running the installer, and then creating files for that user. This fact isn't different for Windows or Mac.

I suspect this isn't an App they actually develop. They are trying to deploy data to go with an app they are using. Which is not entirely unheard of, but this sort of muck comes about when you have apps that aren't built for this sort of deployment, and you don't have any other infrastructure to deploy user data other than cobbling together MSIs.

And because MSI is a giant pile of legacy, wrapped in a "what could go wrong?" attitude, it allows a lot of things that if you were building an OS today, you would never actually allow. :p
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.