Packages not updating files on OSX 10.12



  • Ok, I know it's not directly HISE-related but I stated to get reports that the installer I built in Packages doesn't overwrite the files in the components folder. I'm wondering if any of you guys experienced it? Should I change some settings in Packages? Or maybe there's a script I could use to remove the .component file first before the updated version gets installed?

    Thank you!



  • @tomekslesicki said in Packages not updating files on OSX 10.12:

    .component

    Here's what they suggest:
    http://s.sudre.free.fr/Software/Packages/Q&A_5.html

    I'm about to create an installer for a product upgrade, so I'll chime in when I get there.



  • I figured it out and thought I'd post the solution here, maybe you'll find it useful. Create a file called YourInstrument.sh (I used SublimeText to do that but I guess you can create it in whatever really). Load it into Packages as a pre-install script. The file should contain the following code:

    #!/bin/sh
    
    FILE=$HOME/Library/Audio/Plug-Ins/Components/YourFile.component
    if test -n "$FILE"; then
    		rm -R $HOME/Library/Audio/Plug-Ins/Components/YourFile.component
    
    fi
    
    exit 0
    

    If you have separate packages for AU and VST files, each can have its own .sh script with a path to the file.

    What the script does is it removes the specified file before the install progresses. Done!



  • A quick update: on older Macs, the script runs after the files are installed which removes them in a dumb way. So, here's a solution: I'm now installing the files to a temp folder inside the VST and Components folder - it's just called temp. I then added a post script that copies the files (yourplugin_au_post.sh in my case).

    #!/bin/sh
    mv $HOME/Library/Audio/Plug-Ins/Components/temp/YourPlugin.component $HOME/Library/Audio/Plug-Ins/Components/YourPlugin.component
    rm -R $HOME/Library/Audio/Plug-Ins/Components/temp/
    
    exit 0
    

    Done!



  • I think it might be possible to do this just with the post script, first removing the file in the Components folder and then moving in the one from the temp one


Log in to reply
 

8
Online

647
Users

2.6k
Topics

21.4k
Posts