Packaging my first instrument - LinkOSX question?
-
If you use the built in expansion installer it should handle this for you.
You can use the File and FileSystem APIs to access various folders, like the home directory.
-
@d-healey Hiya - I've read through all that but the issue is that the plugin going to update overtime to include these expansions. Each new expansion release will require an updated version of the plugin to work due to new elements being added there too.
My plan was to simply package the plugin and expansions together and distribute this to users for install each time a new expansion is added.
The issue I'm having is I want to avoid users needing to give the plugin the sample path and expansions directory when they open it up, as this isn't the most user friendly thing if people aren't tech savvy.
I have found (using a comment from yourself I believe!) the option to use the global app data folder rather than the users/application support/ folder, which should make this a bit easier. I'm building a test of this now, but I'll still need to amend the LinkOSX and LinkWindows files to point to the correct folder.
-
@LozPetts You can get a reference to the expansion folder easily with
FileSystem.getFolder(FileSystem.AppData).getChildFile("Expansions");
- or something similar. I find the global app data folder thing causes issues so I don't use it. -
@d-healey Okay -
I'm trying to bypass the need to extract an HR1 on first install and simply have my .ch1 files be in the /Samples/ folder of each Expansion, is that possible? Can LinkOSX/LinkWindows just be bypassed and the paths be set by using the above to grab the Expansions folder and then scripting that to be where the samples are in each expansion folder?
I hope that makes some degree of sense.
-
@LozPetts You need to let the user choose where they want the samples. I just add a button in each expansion that that can click to tell the plugin where the samples are, this then creates the link file, if they move the samples at some point then they can just go through the process again.
-
@d-healey Is it possible to pre-load/script the location of the HR1 file so that I can install it to a set location via the package? That way users only need to extract the samples to their sample folder rather than extract the individual HR1 files for each expansion every time there's an update/new expansion.
-
@LozPetts said in Packaging my first instrument - LinkOSX question?:
Is it possible to pre-load/script the location of the HR1 file
The hr1 file could be anywhere on the user's system, so the only way to find it is to ask the user.
It sounds like you'd be better off making a custom solution that doesn't use the hr system.
-
@d-healey Surely if it's installed by a package I could pop the HR1 in the App Data/Application Support folder and set that as the location for that and then simply ask the user where they want the samples to be extracted to? That way the location of the HR1 file would always be the same as the installer would always put it there?
When you say use a custom system, where do I look at how to do this/ implement this? I didn't know this was an option!
-
@LozPetts Oh I didn't realise you were including the hr file in the installer. In that case you have control so you can put it where you like.
@LozPetts said in Packaging my first instrument - LinkOSX question?:
where do I look at how to do this/ implement this?
File and FileSystem APIs. It's just moving files around after all.
-
@d-healey Understood - I've spent the last hour pouring over the relevant documentation and can't see any mention of how to actually declare the location of the HR files in a script that HISE will then pick up for extraction - any ideas on how to do this? I can point the plugin to the containing folder, and get the HR file, but then there doesn't seem to be any info on injecting this into that extraction process on the first run, unless I'm being blind.
-