HISE Logo Forum
    • Categories
    • Register
    • Login

    Replacing the LinkOSX file

    Scheduled Pinned Locked Moved General Questions
    9 Posts 4 Posters 478 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.
    • orangeO
      orange
      last edited by

      I am using the below Bash Script format to copy the LinkOSX file to the user library. It works well if there is no Plugin folder in the AppData folder.

      But if there is already a LinkOSX file, it doesn't replace. Does anyone has a fix for this?

      #!/bin/sh
      
      sudo -u $USER mkdir -p $HOME/Library/Application\ Support/MyCompany/TestPlugin/
      
      /usr/bin/rsync -avurpE --remove-source-files /Library/Application\ Support/MyCompany/TestPlugin/ $HOME/Library/Application\ Support/MyCompany/TestPlugin/
      
      sudo find $HOME/Library/Application\ Support/MyCompany/ -type d -user root -exec sudo chown -R $USER: {} +
      
      rm -rf /Library/Application\ Support/MyCompany
      
      exit 0
      

      develop Branch / XCode 13.1
      macOS Monterey / M1 Max

      DanHD Dan KorneffD 2 Replies Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Why not do it from within your plugin?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        orangeO 1 Reply Last reply Reply Quote 1
        • DanHD
          DanH @orange
          last edited by

          @orange pretty sure you can use that last rm line to remove it. Let me check my bash scripts tomorrow as I've done similar recently

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

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

            @orange Since you're using the -v (verbose) flag, have you tired to drag/drop the script in Terminal to see if you get an error? I would think it should tell you if there was an issue.

            Dan Korneff - Producer / Mixer / Audio Nerd

            1 Reply Last reply Reply Quote 1
            • orangeO
              orange @d.healey
              last edited by orange

              @d-healey said in Replacing the LinkOSX file:

              Why not do it from within your plugin?

              Because I've updated the samples and since the Sample size is very low (200MB), I want to make a straight-forward installation for the user.


              @DanH said in Replacing the LinkOSX file:

              @orange pretty sure you can use that last rm line to remove it. Let me check my bash scripts tomorrow as I've done similar recently

              The script removes the temporary folder, but doesn't replace the LinkOSX file.


              @Dan-Korneff said in Replacing the LinkOSX file:

              @orange Since you're using the -v (verbose) flag, have you tired to drag/drop the script in Terminal to see if you get an error? I would think it should tell you if there was an issue.

              I get "Permission Denied" error.

              develop Branch / XCode 13.1
              macOS Monterey / M1 Max

              Dan KorneffD DanHD 2 Replies Last reply Reply Quote 1
              • Dan KorneffD
                Dan Korneff @orange
                last edited by

                @orange ok! That's where we need to look. Check the permissions of the file that was previously installed. Who has what permissions when you right click on the file and hit "get info"?

                Dan Korneff - Producer / Mixer / Audio Nerd

                DanHD orangeO 2 Replies Last reply Reply Quote 1
                • DanHD
                  DanH @orange
                  last edited by

                  @orange gonna pm you now

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

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

                    @Dan-Korneff I use a pre-install script to remove any files / folders before installing new ones

                    #!/bin/sh
                    
                    
                    rm -rf $HOME/Library/Application\ Support/MYCOMPANY/PLUGIN/LinkOSX
                    
                    
                    
                    exit 0
                    

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

                    1 Reply Last reply Reply Quote 1
                    • orangeO
                      orange @Dan Korneff
                      last edited by

                      @Dan-Korneff said in Replacing the LinkOSX file:

                      @orange ok! That's where we need to look. Check the permissions of the file that was previously installed. Who has what permissions when you right click on the file and hit "get info"?

                      This happen even on an admin account. I think since there is a file, Whitebox doesn't overwrite it.

                      @DanH said in Replacing the LinkOSX file:

                      @Dan-Korneff I use a pre-install script to remove any files / folders before installing new ones

                      That did the trick, Thank you! So for this purpose, first a Pre-Install script to remove the file:

                      #!/bin/sh
                      
                      
                      rm -rf $HOME/Library/Application\ Support/MYCOMPANY/PLUGIN/LinkOSX
                      
                      
                      
                      exit 0
                      

                      Then the Post-Install script to replace it:

                      #!/bin/sh
                      
                      sudo -u $USER mkdir -p $HOME/Library/Application\ Support/MyCompany/TestPlugin/
                      
                      /usr/bin/rsync -avurpE --remove-source-files /Library/Application\ Support/MyCompany/TestPlugin/ $HOME/Library/Application\ Support/MyCompany/TestPlugin/
                      
                      sudo find $HOME/Library/Application\ Support/MyCompany/ -type d -user root -exec sudo chown -R $USER: {} +
                      
                      rm -rf /Library/Application\ Support/MyCompany
                      
                      exit 0
                      

                      develop Branch / XCode 13.1
                      macOS Monterey / M1 Max

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

                      16

                      Online

                      1.7k

                      Users

                      11.8k

                      Topics

                      102.6k

                      Posts