HISE Logo Forum
    • Categories
    • Register
    • Login

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

    Scheduled Pinned Locked Moved General Questions
    37 Posts 7 Posters 3.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Dan KorneffD
      Dan Korneff
      last edited by

      Still struggling with this one... can't get a post install script to work in a Whitebox PKG.
      Here's the full error I'm getting:

      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: @(#)PROGRAM:Install  PROJECT:Install-1000
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: @(#)PROGRAM:Installer  PROJECT:Installer-965.1
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Hardware: Macmini4,1 @ 2.40 GHz (x 2), 16384 MB RAM
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Running OS Build: Mac OS X 10.15.2 (19C57)
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: USER=dan
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: LOGNAME=dan
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: PATH=/usr/bin:/bin:/usr/sbin:/sbin
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.f5vjJkAmgb/Listeners
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: HOME=/Users/dan
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: SHELL=/bin/zsh
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: TMPDIR=/var/folders/6k/pjx9t2q93mg8b0jyjs2y24sw0000gn/T/
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: XPC_SERVICE_NAME=com.apple.installer.548
      2020-01-24 18:25:03-05 Dans-Mac-mini Installer[40398]: Env: XPC_FLAGS=0x0
      2020-01-24 18:25:04-05 Dans-Mac-mini Installer[40398]: test  Installation Log
      2020-01-24 18:25:04-05 Dans-Mac-mini Installer[40398]: Opened from: /Users/dan/Desktop/test/test/build/test.pkg
      2020-01-24 18:25:04-05 Dans-Mac-mini Installer[40398]: Package Authoring Error: <background_scaling> has an unsupported MIME type: X-NSObject/NSNumber
      2020-01-24 18:25:04-05 Dans-Mac-mini Installer[40398]: Package Authoring Error: <background_alignment> has an unsupported MIME type: X-NSObject/NSNumber
      2020-01-24 18:25:04-05 Dans-Mac-mini Installer[40398]: Failed to load specified background image
      2020-01-24 18:25:05-05 Dans-Mac-mini Installer[40398]: Referenced component packages (1) trustLevel=100
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: Administrator authorization granted.
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: ================================================================================
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: User picked Standard Install
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: Choices selected for installation:
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: 	Install: "test"
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: 		test.pkg : com.mygreatcompany.pkg.test : 1.0
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: ================================================================================
      2020-01-24 18:25:18-05 Dans-Mac-mini Installer[40398]: It took 0.00 seconds to summarize the package selections.
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: -[IFPKGDerivedDocument sortedPackageLocations]: result = (
      	    "file://localhost"
      	)
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: location = file://localhost
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: -[IFDInstallController(Private) _buildInstallPlanReturningError:]: file://localhost/Users/dan/Desktop/test/test/build/test.pkg
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Set authorization level to root for session
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Will use PK session
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Using authorization level of root for IFPKInstallElement
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Starting installation:
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Configuring volume "Hard Drive"
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Preparing disk for local booted install.
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Free space on "Hard Drive": 244.58 GB (244576600064 bytes).
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: Create temporary directory "/var/folders/6k/pjx9t2q93mg8b0jyjs2y24sw0000gn/T//Install.40398fiFQ0a"
      2020-01-24 18:25:19-05 Dans-Mac-mini Installer[40398]: IFPKInstallElement (1 packages)
      2020-01-24 18:25:19-05 Dans-Mac-mini installd[1528]: PackageKit: Adding client PKInstallDaemonClient pid=40398, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
      2020-01-24 18:25:20-05 Dans-Mac-mini Installer[40398]: PackageKit: Enqueuing install with framework-specified quality of service (utility)
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: ----- Begin install -----
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: request=PKInstallRequest <1 packages, destination=/>
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: packages=(
      	    "PKLeopardPackage <id=com.mygreatcompany.pkg.test, version=1.0, url=file://localhost/Users/dan/Desktop/test/test/build/test.pkg>"
      	)
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: Set reponsibility for install to 40398
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: Extracting file://localhost/Users/dan/Desktop/test/test/build/test.pkg (destination=/Library/InstallerSandboxes/.PKInstallSandboxManager/4E0FB4FE-6A1F-4232-9082-EF19CD75F8EF.activeSandbox/Root, uid=0)
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: prevent user idle system sleep
      2020-01-24 18:25:20-05 Dans-Mac-mini installd[1528]: PackageKit: suspending backupd
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Using trashcan path /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/PKInstallSandboxTrash/4E0FB4FE-6A1F-4232-9082-EF19CD75F8EF.sandboxTrash for sandbox /Library/InstallerSandboxes/.PKInstallSandboxManager/4E0FB4FE-6A1F-4232-9082-EF19CD75F8EF.activeSandbox
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Shoving /Library/InstallerSandboxes/.PKInstallSandboxManager/4E0FB4FE-6A1F-4232-9082-EF19CD75F8EF.activeSandbox/Root (0 items) to /
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Executing script "./postinstall" in /private/tmp/PKInstallSandbox.it0Hz8/Scripts/com.mygreatcompany.pkg.test.aWq9Cy
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: *** Couldn't posix_spawn: error 8
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Failed task attributes: {
      	    NSFileCreationDate = "2020-01-24 23:23:25 +0000";
      	    NSFileExtensionHidden = 0;
      	    NSFileGroupOwnerAccountID = 0;
      	    NSFileGroupOwnerAccountName = wheel;
      	    NSFileHFSCreatorCode = 0;
      	    NSFileHFSTypeCode = 0;
      	    NSFileModificationDate = "2020-01-24 23:23:25 +0000";
      	    NSFileOwnerAccountID = 0;
      	    NSFileOwnerAccountName = root;
      	    NSFilePosixPermissions = 493;
      	    NSFileReferenceCount = 1;
      	    NSFileSize = 53;
      	    NSFileSystemFileNumber = 1581080;
      	    NSFileSystemNumber = 16777220;
      	    NSFileType = NSFileTypeRegular;
      	}
      2020-01-24 18:25:21-05 Dans-Mac-mini install_monitor[40406]: Temporarily excluding: /Applications, /Library, /System, /bin, /private, /sbin, /usr
      2020-01-24 18:25:21-05 Dans-Mac-mini install_monitor[40406]: Re-included: /Applications, /Library, /System, /bin, /private, /sbin, /usr
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: releasing backupd
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: allow user idle system sleep
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Cleared responsibility for install from 40398.
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Cleared permissions on Installer.app
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Install Failed: Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “test.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file://localhost/Users/dan/Desktop/test/test/build/test.pkg, PKInstallPackageIdentifier=com.mygreatcompany.pkg.test, NSLocalizedDescription=An error occurred while running scripts from the package “test.pkg”.} {
      	    NSFilePath = "./postinstall";
      	    NSLocalizedDescription = "An error occurred while running scripts from the package \U201ctest.pkg\U201d.";
      	    NSURL = "file://localhost/Users/dan/Desktop/test/test/build/test.pkg";
      	    PKInstallPackageIdentifier = "com.mygreatcompany.pkg.test";
      	}
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Running idle tasks
      2020-01-24 18:25:21-05 Dans-Mac-mini Installer[40398]: install:didFailWithError:Error Domain=PKInstallErrorDomain Code=112 "An error occurred while running scripts from the package “test.pkg”." UserInfo={NSFilePath=./postinstall, NSURL=file://localhost/Users/dan/Desktop/test/test/build/test.pkg, PKInstallPackageIdentifier=com.mygreatcompany.pkg.test, NSLocalizedDescription=An error occurred while running scripts from the package “test.pkg”.}
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Removing client PKInstallDaemonClient pid=40398, uid=501 (/System/Library/CoreServices/Installer.app/Contents/MacOS/Installer)
      2020-01-24 18:25:21-05 Dans-Mac-mini installd[1528]: PackageKit: Done with sandbox removals
      2020-01-24 18:25:22-05 Dans-Mac-mini Installer[40398]: Install failed: The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.
      2020-01-24 18:25:22-05 Dans-Mac-mini Installer[40398]: IFDInstallController A0AB60 state = 8
      2020-01-24 18:25:22-05 Dans-Mac-mini Installer[40398]: Displaying 'Install Failed' UI.
      2020-01-24 18:25:22-05 Dans-Mac-mini Installer[40398]: 'Install Failed' UI displayed message:'The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.'.
      2020-01-24 18:25:24-05 Dans-Mac-mini Installer[40398]: Package Removal: Package is not in downloads directory. Not offering removal.
      2020-01-24 18:25:24-05 Dans-Mac-mini Installer[40398]: Package Removal: Package cannot be removed.
      

      Does this mean anything to anyone here?

      Dan Korneff - Producer / Mixer / Audio Nerd

      1 Reply Last reply Reply Quote 0
      • Dan KorneffD
        Dan Korneff
        last edited by

        Ok! Finally sorted out.
        Apparently, you can't use ~/ in a pre or post-installation script of a package. I had to use $HOME instead.

        Dan Korneff - Producer / Mixer / Audio Nerd

        Casey KolbC 1 Reply Last reply Reply Quote 5
        • Casey KolbC
          Casey Kolb @Dan Korneff
          last edited by

          Thank you for this thread! Super useful.

          @dustbro Do you mind posting your final shell script? I haven't quite cracked it yet on my system.

          Casey Kolb
          Founder & CEO of Lunacy Audio
          Composer | Producer | Software Developer

          1 Reply Last reply Reply Quote 0
          • Dan KorneffD
            Dan Korneff
            last edited by

            Here's what I got going on. My installer places all of the extra files (Markdown, AudioRecources.dat, ImageResources.dat, user manual, etc...) into the system Library/Application Support folder, then I use a post-install script to move the data into the user Library/Application Support folder.
            I've added comments above each line.

            #!/bin/sh
            
            // this line moves the System Library folder to the User Library folder:
            /usr/bin/rsync -avurpE --remove-source-files /Library/Application\ Support/Company/Product/ $HOME/Library/Application\ Support/Company/Product/
            
            // this line deletes the System Library folder after the files are moved:
            find /Library/Application\ Support/Company/ -type d -empty -delete
            
            // determine logged in user:
            loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`
            
            //This line copies my user manual from the User Library to Desktop for easy access:
            /usr/bin/rsync -avurpE  $HOME/Library/Application\ Support/Company/Product/User\ Manual/ /Users/$loggedInUser/Desktop/
            
            exit 0
            

            Dan Korneff - Producer / Mixer / Audio Nerd

            Casey KolbC 1 Reply Last reply Reply Quote 1
            • Casey KolbC
              Casey Kolb @Dan Korneff
              last edited by

              @dustbro Amazing! Thank you 😀

              Casey Kolb
              Founder & CEO of Lunacy Audio
              Composer | Producer | Software Developer

              1 Reply Last reply Reply Quote 1
              • Casey KolbC
                Casey Kolb
                last edited by Casey Kolb

                @dustbro I'm having one serious issue with this approach and I wonder if you've encountered this as well. When I rsync the application folder like above, if the folder doesn't already exist (which will be the case for any user downloading the plugin for the first time) then it will keep the permissions set by Packages for the temp folder which has some pretty whack results and makes the folder read-only for the user. Only the system will be able to read/write.

                This is super deadly because it removes the ability to save presets or create new folders in the preset browser. It also disables the changing of the Sample Folder directory because the entire plugin folder becomes read-only. I've tried a bunch of different things in the bash script to fix this but nothing seems to be doing the trick.

                Casey Kolb
                Founder & CEO of Lunacy Audio
                Composer | Producer | Software Developer

                Dan KorneffD 1 Reply Last reply Reply Quote 0
                • Dan KorneffD
                  Dan Korneff @Casey Kolb
                  last edited by

                  @Lunacy-Audio have you checked another system yet? I'm currently using this method successfully.
                  The most common problem I've seen is the inability to remove the system Company folder after sync due to permissions issues.

                  Dan Korneff - Producer / Mixer / Audio Nerd

                  1 Reply Last reply Reply Quote 0
                  • Casey KolbC
                    Casey Kolb
                    last edited by

                    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?

                    Casey Kolb
                    Founder & CEO of Lunacy Audio
                    Composer | Producer | Software Developer

                    1 Reply Last reply Reply Quote 0
                    • Casey KolbC
                      Casey Kolb
                      last edited by Casey Kolb

                      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.

                      Casey Kolb
                      Founder & CEO of Lunacy Audio
                      Composer | Producer | Software Developer

                      1 Reply Last reply Reply Quote 0
                      • Casey KolbC
                        Casey Kolb
                        last edited by Casey Kolb

                        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
                        

                        Casey Kolb
                        Founder & CEO of Lunacy Audio
                        Composer | Producer | Software Developer

                        DanHD 1 Reply Last reply Reply Quote 1
                        • DanHD
                          DanH @Casey Kolb
                          last edited by

                          @Lunacy-Audio Hmmmm I am failing massively at this :face_with_tears_of_joy:

                          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.

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

                          Dan KorneffD 1 Reply Last reply Reply Quote 0
                          • Dan KorneffD
                            Dan Korneff @DanH
                            last edited by

                            @DanH is it failing on :

                            # remove temporary folder
                            

                            Dan Korneff - Producer / Mixer / Audio Nerd

                            DanHD 1 Reply Last reply Reply Quote 0
                            • DanHD
                              DanH @Dan Korneff
                              last edited by

                              @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

                              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                              https://dhplugins.com/ | https://dcbreaks.com/
                              London, UK

                              Casey KolbC 1 Reply Last reply Reply Quote 0
                              • Casey KolbC
                                Casey Kolb @DanH
                                last edited by Casey Kolb

                                @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.

                                Casey Kolb
                                Founder & CEO of Lunacy Audio
                                Composer | Producer | Software Developer

                                DanHD 1 Reply Last reply Reply Quote 0
                                • DanHD
                                  DanH @Casey Kolb
                                  last edited by

                                  @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?!

                                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                  https://dhplugins.com/ | https://dcbreaks.com/
                                  London, UK

                                  Casey KolbC 1 Reply Last reply Reply Quote 0
                                  • Casey KolbC
                                    Casey Kolb @DanH
                                    last edited by

                                    @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

                                    Casey Kolb
                                    Founder & CEO of Lunacy Audio
                                    Composer | Producer | Software Developer

                                    DanHD 1 Reply Last reply Reply Quote 0
                                    • DanHD
                                      DanH @Casey Kolb
                                      last edited by

                                      @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....

                                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                      https://dhplugins.com/ | https://dcbreaks.com/
                                      London, UK

                                      Casey KolbC 1 Reply Last reply Reply Quote 1
                                      • Casey KolbC
                                        Casey Kolb @DanH
                                        last edited by

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

                                        Casey Kolb
                                        Founder & CEO of Lunacy Audio
                                        Composer | Producer | Software Developer

                                        DanHD 1 Reply Last reply Reply Quote 0
                                        • DanHD
                                          DanH @Casey Kolb
                                          last edited by

                                          @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....

                                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                                          https://dhplugins.com/ | https://dcbreaks.com/
                                          London, UK

                                          Casey KolbC 1 Reply Last reply Reply Quote 0
                                          • Casey KolbC
                                            Casey Kolb @DanH
                                            last edited by

                                            @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.

                                            Casey Kolb
                                            Founder & CEO of Lunacy Audio
                                            Composer | Producer | Software Developer

                                            DanHD 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            17

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.5k

                                            Posts