Mac Installer issue that effects (I think) all of us



  • Yup, I'm checking across a few other machines every time I build the Packages installer. I have everything bundled into one installer, so VST, AU, AAX, Standalone, and also Presets. The Presets package has a post-installation script like the one above, but the permissions are always messed up. Should I be changing the Owner/Group in the actual temporary payload in Packages?



  • I've also noticed that if the company folder doesn't already exist in $HOME/Library/Application\ Support/, then rsync won't create the folder automatically, so the install won't work.



  • Ok, so I think I've finally figured something out that works across all the Macs I'm testing. It basically ensures that directory exists and that the permissions are always set recursively from the plugin directory. I don't love all the sudo nonsense, so I'll see if I can find a cleaner solution at some point.

    #!/bin/sh
    # ensure plugin directory actually exists
    sudo -u $USER mkdir -p $HOME/Library/Application\ Support/Company/Product/
    
    # move and sync files from temporary payload to real plugin directory
    /usr/bin/rsync -avurpE --remove-source-files /Library/Application\ Support/Company/Product/ $HOME/Library/Application\ Support/Company/Product/
    
    # ensure permissions are recursively set to current user for plugin directory
    sudo find $HOME/Library/Application\ Support/Company/ -type d -user root -exec sudo chown -R $USER: {} +
    
    # remove temporary folder
    rm -rf /Library/Application\ Support/Company
    
    exit 0
    


  • @Lunacy-Audio Hmmmm I am failing massively at this 😂

    Oh wait lol... It's actually doing what I want (thanks guys!)..... but yet, the installer says its 'failed'. So it delivers what I need but says failed... Which isn't ideal! I'm using @Lunacy-Audio script and replaced paths with my own.



  • @DanH is it failing on :

    # remove temporary folder
    


  • @dustbro I don't know - I tried removing that Last line just in case it was that and it still failed. However it still installed the files where I wanted, and there's no trace of the temporary directory

    Weird one



  • @DanH Your WhiteBox Packages installer is failing? Do you require a password for the installer? The bash script will only work if the user enters a password, which gives the installer full permissions.



  • @Lunacy-Audio Thanks man. So I just tried it without the bash script and it's installing absolutely fine.

    Perhaps I don't even need the bash script?!



  • @DanH The bash script is only if you're trying to install data (like documentation or user presets) along with the standard plugin files.

    Are you setting it as a post-script? Mine looks like this.

    Screen Shot 2021-02-17 at 10.17.26 AM.png



  • @Lunacy-Audio Yes I'm installing those LFO preset shapes (that you helped me make / save!). So data files which are all *.lfo, and they go straight into the Presets folder. My project looks roughly the same as yours in regards to the Post Install script etc.

    Like I said it's all working. Tried on 3 computers now, Mojave and Catalina....



  • @DanH Oh cool! Yeah that's a perfect use case. Ok, glad it's working.



  • @Lunacy-Audio Yes but without the bash script (it wouldn't work with it) - so hopefully that doesn't cause any issues down the line....



  • @DanH The danger in not using the bash script is that you'll overwrite any presets or changes the user has added if they run the installer again. The bash script uses rsync to sync the files from the installer with whatever is currently there.

    But I'm not sure why it's not working on your end. I'm using it without any issues. You might need to make the .sh file executable? Hard to say without seeing your Packages file.



  • @Lunacy-Audio Can I send you my Packages file to check pls? Can't seem to figure out the error!



  • @Lunacy-Audio @dustbro Hi guys, do you know what I'd need to tweak in the bash script in order to overwrite a folder, say the User Presets for example? I tried removing rsync but I think there's another step or two?

    Thanks, D



  • @DanH Try using the Remove command on a pre-install script

    rm -rf /directory you wan to remove


  • @dustbro said in Mac Installer issue that effects (I think) all of us:

    rm -rf /directory you wan to remove

    Did the trick, thanks 🙂


Log in to reply
 

10
Online

1.3k
Users

4.3k
Topics

38.5k
Posts