-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a rudimentary MacOS packager #85
Comments
Some discussion on #87, but summarizing: what if we just provide one of those "drag this to this folder symlink" type of installers (or none at all, which is typical for vst plugins), and I (or someone else) could whip up some code that runs at startup to sync the |
Of course I didn't consider permissions... sigh |
The permissions thing is solved by using ~/Library. Yes you can hose ~/Library/Application Support and break surge. I think some better error reporting in that case is useful. Here's the current code in SurgeStorage.cpp
which explains why the MAC and linux users aren't seeing this error! I'll open a separate issue for that. But I don't want to change things like configuration file behavior and split it and what not now; I think we may be better focused in getting a regular engine which can build, run, and package macOS with few feature changes. Of course I broke this rule by implementing zoom! As to a "drag this folder to their" type thing that would be pretty good but I can't quite figure out how to automate it; and it would require two drags (one for the component and one for the ~/Library/Application Support). I can automate building a dmg with all the assets and a shell script. Let me google a bit and see if that would let me automate building a .pkg which is what we really want. |
@baconpaul can punt on the installer for a while, if I get all the resources included in the bundle and dumped into |
Yeah hdiutil can make a dmg but that hand step to set the background is a pain. I'm just reading about .pkg files quickly. That may be the best route. |
Oh and #89 has that surge storage reminder. Reading "man productbuild" now. Will report back. |
Hmm, this is interesting: looks like it could be done. I'll see if I can create a Surge.component installer. |
http://thegreyblog.blogspot.com/2014/06/os-x-creating-packages-from-command_2.html shows you a lot of it. I got stuck though getting it to install in local.
is what I tried this morning. If you'd like to take a swing at this that would be great. It's frustrating me some. I'll see if I can fix a couple of the other bugs like filesystem and no warning on corrupt. |
Ahh yeah if yours works, then you build two pkgs (one for the component one for the resources) then use product build --synthesize to group them. Like I said, I've just been googling like you and it didn't work for me. Hope my research helps! |
I managed to get Surge.component to appear in I could attempt to create one that copies files from |
Yeah you end up with one pkg. But the way you do that is to make two pkg (one for Surge.component and one for resources/data) and then combine those two pkgs into another pkg using product build. So lets say you have SurgeComponent.pkg which installs the component (which you do! Awesome) and SurgeResources.pkg which install the resources (which you are working on). Then apparently you can do
then Surge.pkg will just install both. So then the only other thing you would do is
and you will get a dmg Getting the first two pkgs working was what stuck me. |
Fingers crossed that this works:
I have no idea if it should or shouldn't.I've wiped my Surge -folder just in case from |
nope, no go:
|
@baconpaul btw your work, it's good to put the plugin in /Library/Audio/Plug-Ins/Component and not ~/Library/Audio/Plug-Ins/Component. 👍 |
Didn't see this issue until now. I built an installer using Packages, but using |
Now that @kzatow has resources in the bundle we really only need the one step pkg build on the component which is above I think. And then permissions to make a github release too I suppose But the two step stuff i talked about above is all obviated now the component populates application support if it isn’t there |
Yeah, I'd say given the current state of things one of 2 options is the best:
https://stackoverflow.com/questions/10574223/how-to-create-drag-and-drop-installer-for-macos-x |
the drag'n'drop installing is easy to do for .vst .vst3 .component on mac, but the data/resources copying is the things that throws me off - ideally the user should not be asked to do this ("hey, so, unzip this folder to your ~/Library/Application Support/Surge" - not cool, never seen it done like that). but maybe there IS a way of doing it, as @baconpaul posted a rather complex link to it recently. |
@kzantow query, when you say "distribute .vst .component in zip" and then follow it up with "since resources are included etc" - what does |
@esaruoho yes, the VST and AU bundles include all the resources and automatically put them in |
@kzantow wow that's awesome! that really, actually is, awesome. thanks! |
for BW we've been using this tool to build scripted dmgs: https://github.com/andreyvit/create-dmg For surge 1.5 I just created a sparseimage manually and converted it to a bundle. I could provide those via e-mail to look at but I don't want to put those in the repo. |
Just my opinion, but I don't think the plugin should be installing things at run-time, that is the job of the installer. As a temporary solution I think it is OK, but longer term I will work on creating a script that does it using |
@asimilon it really feels like the sooner we get to a .pkg / .dmg combo that installs the files (VST2,VST3,AU) and the plugin simple runs and doesn't muck about with files, the better :) man i wish these |
I completely agree. Just I don’t know the magic for how to use pkgbuild. I do know the final script will look like 1: Four executions of pkgbuild. 3 of them simple, since they are for .component or .vst or .vst3 with a target folder and one tricky since it packages up the data directory to go to application support 2: One execution or productbuild. —synthesize to make those 4 sub packages into one big package 3: On execution of hdiutil to make a dmg But the exact mechanics of that completely escaped me. @asimilon or @esaruoho if you get that working then we can knock out @kzantow recursive copy from the plugin and start the train rolling to get an alpha release. We are close to the answer in the fragments in this thread. |
Is 3: strictly necessary? Could just as well distribute a This is pure conjecture, but until we work out the logistics of signing, might having both unsigned DMG and |
Just to reiterate, I have a slightly different idea of the "best" thing to do in general: include these files in the bundles and do not move them to the As for having an installer, if the desire is to install all variants of the plugin, the dragging-to-folder kind is probably not as good as the typical |
Yeah you know @kzantow I think this is one of those things where "the first person with a PR which does one of these things will say how we do it!". I think the pkg is more "native" and @asimilon has extra benefit from learning pkgbuild so I think we will end up there. Remember, I "solved" this problem by telling people to run a crappy shell script outside of Xcode. So I'm definitely not an authority! Chuckle. |
i would definitely appreciate a .dmg containing .pkgs . the user is supposed to know about evading gatekeeper. :) |
@baconpaul will do this tomorrow, and it matches some of the issues in #83 and #84.
To install Surge you need to
This should be done properly in a .pkg but that’s a bit of a pain. So I propose that for now I just add a script which
Then we can at least share dmgs for alpha releases more easily
Again, I’m away from my coding today but wanted to memorialize this as I think it will help get us some more Mac alpha testers, even before all the code is merged. (Like: I could run this from my zoom-ui branch and get all my bug fixes in while waiting for @kurasu to review the stream of PRs over the next few days which will come if/once #69 is merged).
The text was updated successfully, but these errors were encountered: