reference to unzipped files ?
-
How do you grab a reference to an unzipped file?
I download a zip containing the .pkg, unzip it successfully, so from here how do I do to start it as a process aka launch the installer?
-
@ustk I would advise against trying to run executables on a user's system, especially a Mac. But if you know the name of the file and you know where you unzipped it you can just get a reference with the regular
File
andFileSystem
functions. -
@d-healey That's what I was thinking, using the file system by knowing the filename in advance which isn't hard in the end...
Why wouldn't you run an executable if it's yours and it's secure?
in the end, I'd like to implement a one click "download & install" as a part of my licensing manager... -
@ustk might be catched by some firewall or other security measures as this looks like a very suspicious behaviour from a security standpoint. Just imagine that the same procedure is being done by a harmful binary…
-
@ustk said in reference to unzipped files ?:
Why wouldn't you run an executable if it's yours and it's secure?
As a user it's a bit spooky when executables run themselves :)
And as Christoph says it might get flagged by the system as being sus.
For Rhapsody I just download the file then open the location so the user can run it.Actually looks like I just open the website and let the user do everything manually.Also why do you download it as a zip and not just download the pkg directly?
-
@Christoph-Hart @d-healey But I'm very cute, not harmful at all, a real teddy bear I promise!
Ok I get it. Now it works here but if this could be caught by the user's system then I let this idea go and do as Dave suggests, simply open the Download directory upon extraction.
Also why do you download it as a zip and not just download the pkg directly?
Wordpress doesn't allow me to upload a .pkg :man_shrugging:
Thanks
-
@ustk said in reference to unzipped files ?:
Wordpress doesn't allow me to upload a .pkg
Don't you use S3 (or similar) for hosting your files?
You can tell Wordpress to allow the upload of pkg, it's your site after all, Wordpress isn't the boss :)
-
@d-healey Thank I'll have a look! The website part is definitely not my cup of tea...
-
@ustk or you could go the way we roll..
Download and install from inside the plugin - so we dont use a pkg - all the pkg is doing for you (usually) is moving some files to some known locations, so we
Download one(or more) zip...
unzip them...
move them where they are supposed to be going.. all inside the plugin. -
@Lindon nice solution indeed but I wouldn’t add a layer of complexity for now, but I keep this solution as a good candidate for a later update