HISE Logo Forum
    • Categories
    • Register
    • Login

    Sample Installer Script Issues with WhiteBox Packages

    Scheduled Pinned Locked Moved General Questions
    11 Posts 3 Posters 555 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.
    • Casey KolbC
      Casey Kolb
      last edited by

      Hi all,

      We've been using a simple install script with our samples installer to automate the process for creating the LinkOS file so the user doesn't need to reselect the location again when opening the plugin. It works like 99% of the time, but very occasionally will fail on certain Macs, so we're looking for a better solution.

      Does anyone have a working script for this? Here's what we're currently using:

      #!/bin/sh
      # Write sample location selected by user to LinkOSX for HISE
      
      # First, remove LinkOSX file if it's already there
      instrumentname="CUBE"
      devname="Lunacy Audio"
      
      FILE="$HOME/Library/Application Support/${devname}/${instrumentname}/LinkOSX"
      if test -n "$FILE"; then
      		rm -R "$HOME/Library/Application Support/${devname}/${instrumentname}/LinkOSX"
      fi
      
      # Second, use the environment variable from WhiteBox Packages to write the destination to a file
      destfile=/Users/${USER}/Library/Application\ Support/${devname}/${instrumentname}/LinkOSX
      printf "${DSTROOT}/Lunacy Audio/CUBE/Samples" > "$destfile"

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

      SimonS 1 Reply Last reply Reply Quote 0
      • SimonS
        Simon @Casey Kolb
        last edited by

        @Casey-Kolb Did you ever figure out what was causing the issue?

        Christoph HartC 1 Reply Last reply Reply Quote 0
        • Christoph HartC
          Christoph Hart @Simon
          last edited by

          @Simon Not sure if related, but macOS fails to write to the user library if the user has no admin rights. Don't ask why, but this basically caused my entire idea of making a installer solution using the multipage creator obsolete.

          SimonS 1 Reply Last reply Reply Quote 1
          • SimonS
            Simon @Christoph Hart
            last edited by

            Yeah I would assume some permissions thing, but the 99% of the time thing is worrying...

            SimonS 1 Reply Last reply Reply Quote 0
            • SimonS
              Simon @Simon
              last edited by Simon

              @Simon I just tested this on two macs and it worked fine. If I just don't test on too many more macs, I can pretend it has a 100% success rate 🤷

              Christoph HartC 1 Reply Last reply Reply Quote 1
              • Christoph HartC
                Christoph Hart @Simon
                last edited by

                @Simon Check on a user account that hasn't admin rights, I'm pretty sure that's the 1% that Casey was talking about :)

                SimonS 1 Reply Last reply Reply Quote 0
                • SimonS
                  Simon @Christoph Hart
                  last edited by

                  @Christoph-Hart Oh I see what you mean, wouldn't that be expected though? A non-sudoer account should be unable to install most software.

                  The installer prompts for sudo, presumably to install to /Library. To me it sounded like Casey would run into installs where the user has sudo, enters their password in the installer, but the file still isn't created.

                  Christoph HartC 1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @Simon
                    last edited by

                    A non-sudoer account should be unable to install most software.

                    Yes if it writes to the global library folder. But why macOS refuses to write to the user folder is beyond me - that's the entire reason for a user folder and you shouldn't need admin rights to write to your own folder.

                    SimonS 1 Reply Last reply Reply Quote 1
                    • SimonS
                      Simon @Christoph Hart
                      last edited by

                      Weeeell if Casey confirms before I release this thing, we'll know, otherwise I expect I'll find out soon enough from a grumpy customer email.

                      Christoph HartC 1 Reply Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @Simon
                        last edited by

                        @Simon Wouldn't hold my breath for it I haven't seen him here for quite some time so not sure if he gets the notification.

                        SimonS 1 Reply Last reply Reply Quote 0
                        • SimonS
                          Simon @Christoph Hart
                          last edited by

                          @Christoph-Hart ec2cf61c-e8ea-45a9-8336-b23b8e79a428-image.png It's a race between him and grumpy customers.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          30

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          101.9k

                          Posts