HISE Logo Forum
    • Categories
    • Register
    • Login

    extractZipFile problem

    Scheduled Pinned Locked Moved General Questions
    81 Posts 5 Posters 4.2k 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.
    • d.healeyD
      d.healey @Matt_SF
      last edited by

      @Matt_SF I just tested and the installer makes no difference in this case.

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

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by d.healey

        Codesigning doesn't seem to help. Haven't tried notarizing but since this wasn't necessary before Catalina I don't think it will help.

        Unless someone offers a solution I'm just going to install it in the user's plugin folder for anything below Big Sur. Engine.getSystemStats() is helpful here ;)

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

        1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey
          last edited by

          And here's a little test to see if zip files are automatically extracted when downloading through HISE. It seems they are not, which is a relief!

          HiseSnippet 925.3ocsV80aaaCDmxIpX1aqXEXe.D7Sx.t9OcswcqXXc1NdvXMIFUoE6sBFpSwDghTfjJqdA4w8wXeG22fsiRxwxsFYsFX5ACd++2c7tidgVw.iQoIdMOeUFP79J+nUR6xIKobIY9Th2C8iU+tTnnwmCFKY7pLpw.wDOuC9EmNdMOjT782+zXpfJYvFVDxaUbF7JdJ2tg6hW9qbgXFMFNmmVS6m9x4LkbhRnxQ7bf+.RFkcE8R3TpSsF9DuGbbL2pzQVpELnNiUwqhVh3qT+2xM7KDfiXHIBcTIaxjkbQ7h04pgP7NbwlL+fxL+a8OgGyui+lJv2THHXiE0qAdMtOHM7y.Rd0fzgkP5Q9QLMOytQhCOeo+boEzITrTWGJk5RZ7WM7mnPMj1dozqfYZj3NKBOZvftA3OcdQqVQf9ZP2y.1wTC7lW+pv1Ks1LyOzuehRmm1aI2.8n4wbU+1NC3RAWBAI4RlkqjAJ43bqUIG5BnVIBYpzLkDCc2fqohbnSqaZ0jmDDVQ0r45toYbADh97Vzsqg6kfcxZGD1tx0s63.XU.lPEhKvthvOLx6BcaGJGRDJFUDjqEA+XPaWgyZ5mm4zwzOA0xze3QOaz2OZzyOZvngO4w+AOCduUSY3MbOjn8KZ0bsWRPe37bzJiERcXelRDC5vZLmVg.SmhbycmW.l1XuhsvgcJ7X0EAS.T4LtjaVBw2YqqJsVisRILO5FbyscCR5dWRG14lacU0ZWQmprvYxxBPqaaE7ghRR1orpBq.yncI1M6puOCCk4oW.55MBNEwl6smXdvm1DCqrGolhJ4bI2dVFTQWT9iKO+wyWjplL7zalOkZotQtJdndYf1xcvwaJbMtypb.ro+TvbkUkUnaUmIBYagzGVMdV1IR3wNCpZKIum3468mXzV4NbFdvPuFlKWnArsyMuxMmnRQ+Q0nJdMHe77Ot4QEmKn1sWG416VI.q3asCvMmKMb6p56k+L1QM3d2Q8oBwG4ufaYK2MFarCLh2E+efwpM6es+wII.ytAfG5O621203+Gg+0pbKWd4ITql65ANMOMBePiAXzkRPXbsCMb8ikzCbztJPDHiKH9G7qR3PGsWkvgqERRoLs5crx4L2aGeQAGDSxhmJa5ehiNXHoX1CsyePuAjT7Yr2wXtz+w3Hxts4I6gMe2dXyS2Cad1dXyQ6gMi1Cad98Zi6eP7y4VUZ43.xXwwEKg77NVRwNqhtPx+BDB6rT.
          

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

          1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey
            last edited by d.healey

            @Lindon Have you checked if File.hasWriteAccess() gives any useful feedback in this situation? On Monterey it returns 0 even though I can write to the folder which is weird.

            Here's an example function that we could use to choose the path based on the OS version and write access.

            inline function getVST3Path()
            {
            	local os = Engine.getSystemStats().OperatingSystemName;
            	local version = os.substring(os.indexOf("OSX") + 4, os.length);
            	local username = Engine.getSystemStats().FullUserName;
            	local systemPath = "/Library/Audio/Plug-ins/VST3";
            	local f = FileSystem.fromAbsolutePath(systemPath);
            	
            	if (version < "11.0" || !f.hasWriteAccess())
            	    return "/Users/" + username + "/Library/Audio/Plug-ins/VST3";
            		
            	return systemPath;
            }
            
            Console.print(getVST3Path());
            

            I haven't tested this on Mojave so let me know if you find any issues with it.

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

            LindonL 1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey
              last edited by d.healey

              Another option which I will explore tomorrow is running an external command like cp to copy the plugin from a temp location to the destination.

              I just did a quick test on my main system to copy a file from my downloads folder to my desktop :D

              const f = FileSystem.fromAbsolutePath("/usr/bin/cp");
              f.startAsProcess("/home/dave/Downloads/test.txt /home/dave/Desktop/testCopy.txt");
              

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

              1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @d.healey
                last edited by Lindon

                @d-healey said in extractZipFile problem:

                @Lindon Have you checked if File.hasWriteAccess() gives any useful feedback in this situation? On Monterey it returns 0 even though I can write to the folder which is weird.

                Here's an example function that we could use to choose the path based on the OS version and write access.

                inline function getVST3Path()
                {
                	local os = Engine.getSystemStats().OperatingSystemName;
                	local version = os.substring(os.indexOf("OSX") + 4, os.length);
                	local username = Engine.getSystemStats().FullUserName;
                	local systemPath = "/Library/Audio/Plug-ins/VST3";
                	local f = FileSystem.fromAbsolutePath(systemPath);
                	
                	if (version < "11.0" || !f.hasWriteAccess())
                	    return "/Users/" + username + "/Library/Audio/Plug-ins/VST3";
                		
                	return systemPath;
                }
                
                Console.print(getVST3Path());
                

                I haven't tested this on Mojave so let me know if you find any issues with it.

                OKay a range of problems...

                First this function is returning a Path on Mojave as follows:

                /Users/Lindon Mulcahy-Parker/Library/Audio/Plug-Ins/VST3

                ..and this is failing, because there is no user called Lindon Mulcahy-Parker

                ... if I force the function to return this path:

                /Users/lindon/Library/Audio/Plug-Ins/VST3. then I can successfully upload the VST3 to this folder...

                ..which in the SystemStats is LogonName, so I think we need to use that instead....

                ..we also need to account for the AU plugins too, so I suggest we need to generalise up this function call to:

                inline function getPluginPath()
                {
                	local os = Engine.getSystemStats().OperatingSystemName;
                	local version = os.substring(os.indexOf("OSX") + 4, os.length);
                	local username = Engine.getSystemStats().LogonName;
                	local systemPath = "/Library/Audio/Plug-Ins";
                	local f = FileSystem.fromAbsolutePath(systemPath);
                	if (version < "11.0" || !f.hasWriteAccess())
                	{
                	    return "/Users/" + username + "/Library/Audio/Plug-Ins";
                	};
                	return systemPath;
                }
                

                Testing it out now...

                HISE Development for hire.
                www.channelrobot.com

                LindonL 1 Reply Last reply Reply Quote 0
                • LindonL
                  Lindon @Lindon
                  last edited by

                  yeah thats working....

                  Now my only concern is with this LogonName - will it always be correct?

                  Can anyone with MacOS - of any vintage - run this snippet and check the Console print out against your Users folder on your machine? thanks..

                  HiseSnippet 719.3ocsUs0aSCCE1tqYhVtHlD+.r1SshQWKLFHlPLVufpXWJjsIdaxywswZI1Q1NCpP7el+AvwIYscaUksJQdnpmKewe9b9NmLPqXbiQoQ3JGONgivOxyerzF1NjJjn9cP3m3c.0X4ZRtq8FmPMFd.BiW4SNG3JkQYO+9C6QinRFepKD5Tkfw2WDKrS8NX2OKhh5QC3GKhmI6s1sOSIaqhTo.eVwqIJgxtfNheH0kVIODd0tABqR6aoVtAxYOUvX+P02k44epvHNOh6LZg7gWTtaT6PQTvfqtqFDBWdvza9J427m4cfHPLw+zJvSyBPlhX1Z.tzhnTq6AkvyPox4TZMOelVjXmFwwmG50WBMjgTnTOKUxyEU5KXu1JHCosQL8BdOMXLAQssa1bCB7S8cpVUyGQRMbsDJvj2S5JGIj7Fi3V+wPKO1cmL0p2Xe0Hkz0D.Hva1nh3MRzBos15GGx0bhITkFEPNmSnjgpn.PsvnQQ7.hMTXd25vYcCbadBbrlMWm77IDn9NCSkLqPIIvoor7ij0pW8mUqT8WUI2LzvgyMl6dqUvIqmaXmdSuHf0jowmy0aPtjFkxmjHzPtdWd06VWlk2FlIQkruTXOJgWX2yUsBx++s0Dnh9H7uS52gZoNYRgOHuDt1JbzA2geILmkKZp30gatvpRfIsaon.srJHMhZut.2MIWD.pGWSU4TNRivNd1I86gpu4BU82UJtl2.gkENeNVZNbDpT+O3XwthG60c3PNyNkfk858skcwv+33+pJ0JjiNfZ0hefvdGlF6CqHYb3zkRdD7x8vkbpkb6lNaWEvmKCxL9C7TDrkyFWDr0UAQwTlVcFKeJvsM5AYd.NIyV9VA9J.XSZgxlL.bdMazDECKFOiwbW+W.B34i4kKAlWsDX1ZIv75k.y1KAl2rDXd6Bw39lzGSsp37wAvwftYqHv3tRJnrxTgn+1+Pm3F
                  

                  HISE Development for hire.
                  www.channelrobot.com

                  ulrikU 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey
                    last edited by

                    Oops yes I should have used logon name, my excuse is working at 2am :p

                    The cp idea seems to be a no-go, it doesn't have permissions either when running inside HISE.

                    I think we can remove the || !f.hasWriteAccess() Because I think this will always return 0 for some reason.

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

                    1 Reply Last reply Reply Quote 0
                    • ulrikU
                      ulrik @Lindon
                      last edited by

                      @Lindon Yes working here, prints "/users/my name

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @ulrik
                        last edited by

                        @ulrik said in extractZipFile problem:

                        @Lindon Yes working here, prints "/users/my name

                        thanks.

                        Okay Dave, I think our work here is done....

                        HISE Development for hire.
                        www.channelrobot.com

                        d.healeyD 1 Reply Last reply Reply Quote 1
                        • d.healeyD
                          d.healey @Lindon
                          last edited by

                          @Lindon said in extractZipFile problem:

                          @ulrik said in extractZipFile problem:

                          @Lindon Yes working here, prints "/users/my name

                          Okay Dave, I think our work here is done....

                          I think to maintain consistency and make it easier to deal with support requests I'm just going to stick the plugins in the user folder regardless of OS version.

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

                          LindonL 1 Reply Last reply Reply Quote 0
                          • LindonL
                            Lindon @d.healey
                            last edited by

                            @d-healey said in extractZipFile problem:

                            @Lindon said in extractZipFile problem:

                            @ulrik said in extractZipFile problem:

                            @Lindon Yes working here, prints "/users/my name

                            Okay Dave, I think our work here is done....

                            I think to maintain consistency and make it easier to deal with support requests I'm just going to stick the plugins in the user folder regardless of OS version.

                            yeah considering this also....

                            HISE Development for hire.
                            www.channelrobot.com

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

                            23

                            Online

                            1.8k

                            Users

                            12.1k

                            Topics

                            104.9k

                            Posts