custom installer

Discussion in 'Mac Programming' started by luke9511, Jun 20, 2017.

  1. luke9511 macrumors member

    Joined:
    Mar 23, 2015
    #1
    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?
     
  2. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #2
  3. luke9511 thread starter macrumors member

    Joined:
    Mar 23, 2015
    #3
    this is not an app, just some files for a crypto wallet
     
  4. luke9511 thread starter macrumors member

    Joined:
    Mar 23, 2015
    #4
    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
     
  5. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #5
    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.
     
  6. luke9511 thread starter macrumors member

    Joined:
    Mar 23, 2015
    #6
    that i already know, i got it figured out on windows but mac is a whole different ball game
     
  7. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #7
    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.
     
  8. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #8
    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.
     
  9. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #9
    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
     

Share This Page