extractZipFile problem
-
@Lindon What result do you get with the test project I posted in this thread a while back? I was testing from directly in HISE as well as compiled.
-
@d-healey - didnt actaully try it - I will go away and try...
-
@d-healey -- Okay well if I understand what your test is and what I'm supposed to do:
- First button select a zip
- second button select a folder
- press extract.....and get the contents of 1 inside 2
Then - fail sadly... test.txt never ends up in Audio/Plug-Ins/VST3
..what's worse is that it never reports an error...
-
@Lindon said in extractZipFile problem:
So I tried setting the sandbox settings I needed and manually compiling n XCode, but XCode told me this warning:
TheInstaller - App isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it. (in target 'TheInstaller - App')
...and I think this is why it still fails...
-
@Lindon said in extractZipFile problem:
@d-healey -- Okay well if I understand what your test is and what I'm supposed to do:
- First button select a zip
- second button select a folder
- press extract.....and get 1 inside 2
Then - fail sadly... test.txt never ends up in Audio/Plug-Ins/VST3
Yep you understood perfectly. Did you test from within HISE or did you compile?
Now that we have a simple test I can attempt to recreate your result and we can find a solution.
BTW I intentionally labelled the checkbox I added to HISE "Admin Permissions" because I figured it may be needed for more than just Windows at some point :)
-
@d-healey said in extractZipFile problem:
Yep you understood perfectly. Did you test from within HISE or did you compile?
Now that we have a simple test I can attempt to recreate your result and we can find a solution.
BTW I intentionally labelled the checkbox I added to HISE "Admin Permissions" because I figured it may be needed for more than just Windows at some point :)
_ I only tested from within HISE at the moment, I will try compiling now...
-
@Lindon said in extractZipFile problem:
_ I only tested from within HISE at the moment, I will try compiling now...
Might also be worth seeing if codesigning or notarizing makes a difference.
-
@d-healey said in extractZipFile problem:
@Lindon said in extractZipFile problem:
_ I only tested from within HISE at the moment, I will try compiling now...
Might also be worth seeing if codesigning or notarizing makes a difference.
Compiled, tried - still fails - will try codesigning and notarizing...tho I cant see how that will make any difference...
-
@Lindon I'll fire up my old mac now and see what result I get
-
Same issue for me on Mojave. I also notice (and I remember Christoph telling me about this) that zip files automatically extract on download...
-
@d-healey not really worrying about download extraction...:-)
-
@Lindon said in extractZipFile problem:
@d-healey not really worrying about download extraction...:-)
Yet :)
-
To confirm, those sandbox settings didn't make a difference here either. I'll keep searching. I guess as a last resort we can use the user's plugin folder instead of the system one.
-
@d-healey @Lindon coming back late here but FYI, I just tested David's test project, compiled it as a standalone and it works just fine. Didn't ask for anything, it extracted correctly the zip file into my Audio/Plug-Ins/VST3/TESTDIR
@Lindon said in extractZipFile problem:
So, all you MacOS experts ...how do I get my app to start with super user permissions....?
AFAIK if your app requires writing permission, the user will be prompted to allow access when needed. Like, at the beginning of this thread when I tested the extracting function, HISE asked for permission the first time, then never again afterwards.
As far as I recall a WhiteBox generated installer (or MacOS when I try and start an installer) will ask for the password to start...
This option must be checked : "Require admin password for installation". But it should be checked by default.
But maybe tweaking these options for your installer might do the trick...? (I've never used them) :
The Installer - App isn't code signed but requires entitlements. It is not possible to add entitlements to a binary without signing it.
I also get this warning but when I ignore it, I still can codesign/notarize my plugins correctly :)
-
@Matt_SF Are you using Mojave? The problem doesn't exist on Big Sur or Monterey but is only on earlier versions.
Packages may impart the necessary permissions on our binaries (but I I don't see how it could) I'll have to test.
-
@d-healey said in extractZipFile problem:
@Matt_SF Are you using Mojave? The problem doesn't exist on Big Sur or Monterey but is only on earlier versions.
Ah, indeed I'm on Monterey.
Packages may impart the necessary permissions on our binaries (but I I don't see how it could) I'll have to test.
I also thought that would be weird... About the write permission I highlighted in my last screenshot, this is what the documentation says :
"Access : The access permissions for the item after it's installed on disk." -
@Matt_SF I just tested and the installer makes no difference in this case.
-
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 ;) -
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.iQoIdMOeUF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Cad98Zi6eP7y4VUZ43.xXwwEKg77NVRwNqhtPx+BDB6rT.
-
@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.