Expansion Tutorial
-
@yall said in Expansion Tutorial:
@Christoph-Hart great, when will this be possible?
It already is, that's what Christoph's announcement was for :)
-
@d-healey do you have to recompile hise with the latest scriptnode branch?
-
Does this new expansion encryption includes simple serial protection stuff?
Since Hise creates a json dump file while serial number validation, can we use this encryption method here too?
-
@Christoph-Hart
i just tried, so indeed the encryption works, but one thing i don't understand, the .hxi file created is only to "protect" the expansion? how to turn the "mini expansions project" into a single file? I must have missed something ^^ -
Lol the hxi file is the mini project. Everything is in there (except for the samples obviously)
-
@Christoph-Hart it also includes the sample map folder?
so if I understand correctly, the end user either simply has in Appdata .... / expansionsName, a Sample folder and the .hxi file?
I ask because in fact, my hxi file has a size of 30kb it seemed really very small to me -
Thats the power of zstd...
-
And the correct path is APPDATA/Expansions/ExpansionName/info.hxi
-
@Steve-Mohican said in Expansion Tutorial:
Does this new expansion encryption includes simple serial protection stuff?
Since Hise creates a json dump file while serial number validation, can we use this encryption method here too?
No the serial key restriction is totally unrelated to expansions
-
@Christoph-Hart ok great. I get it. in the expansionName folder there must be only the hxi file and the sample folder ok? and if i want to modify my expansion i have to remove the hxi because the expansion becomes unreadable in the sampler is that correct?
-
Yes. While you can still load the samplemaps that are embedded in the .hxi file using scripting calls, they will not show up in the sampler's dropdown anymore (because you would be operating on the embedded data and not the actual .xml files which would be terrible annoying to realize later)...
There's also a quick feature that removes the hxi / hxip files and bumps the "expansion level" back by one using this button on the expansion property popup:
-
@Christoph-Hart ok great. I get it. in the expansionName folder there must be only the hxi file and the sample folder ok? and if i want to modify my expansion i have to remove the hxi because the expansion becomes unreadable in the sampler is that correct?
-
Yes. While you can still load the samplemaps that are embedded in the .hxi file using scripting calls, they will not show up in the sampler's dropdown anymore (because you would be operating on the embedded data and not the actual .xml files which would be terrible annoying to realize later)...
There's also a quick feature that removes the hxi / hxip files and bumps the "expansion level" back by one using this button on the expansion property popup:
-
This post is deleted! -
@yall I see that you've pasted your question again and then deleted it :)
Anyways I've just pushed a few changes to the system that smooth out some edges:
- you don't have to call
ExpansionHandler.setEncryptionKey()
anymore. I don't remember exactly why I added it in the first place but I think that it was before I used the project-wide Encryption Key setting in the project settings and I can't think of a scenario where this call isn't 100% redudant. - you can now specify the target directory when installing an expansion with
ExpansionHandler.installFromPackage()
. You also getExpansion.setSampleFolder()
andExpansion.getSampleFolder()
so you can implement a way that the user can change the folders afterwards. - I backrolled the change that David added to
FileSystem.browse
. Using 5 parameters and remembering their correct order is a bit too much, so I used the old signature forbrowse
and added abrowseForDirectory()
function to add the other functionality.
- you don't have to call
-
@Christoph-Hart Thanks Christoph!
-
@Christoph-Hart said in Expansion Tutorial:
@yall I see that you've pasted your question again and then deleted it :)
Anyways I've just pushed a few changes to the system that smooth out some edges:
- you don't have to call
ExpansionHandler.setEncryptionKey()
anymore. I don't remember exactly why I added it in the first place but I think that it was before I used the project-wide Encryption Key setting in the project settings and I can't think of a scenario where this call isn't 100% redudant. - you can now specify the target directory when installing an expansion with
ExpansionHandler.installFromPackage()
. You also getExpansion.setSampleFolder()
andExpansion.getSampleFolder()
so you can implement a way that the user can change the folders afterwards. - I backrolled the change that David added to
FileSystem.browse
. Using 5 parameters and remembering their correct order is a bit too much, so I used the old signature forbrowse
and added abrowseForDirectory()
function to add the other functionality.
Ok slightly confused about one or two things (likely more than that actually - knowing me).
So I have an expansion : which I roll up into "something" (a .hxi file probably) that has everything in it that I need for my expansion(except the samples themselves)...
OK so I put this file here:
APPDATA/Expansions/ExpansionName/info.hxiwhere "APPDATA" includes my product name folder...
Now I want to know where to put my Samples....
So I think the best place is with all the original samples (lets call these the factory samples).
So question: How do I get them there?
Clearly my installer can take all the individual ch1 files and ask the user where they put the original set, but it might be a lot of files - so its messy, and the user might not recall...
For the original install HISE has the hr1 file set and a process of unpacking them - is there a similar (planned) process for expansions? if not can we have one?
So user buys expansion, installer puts the .hx1 file where it needs to be , product start - finds an expansion that isnt "configured" asks the user for the hr1 file equivalent for the expansion, and as it already KNOWS the SAMPLES location it unpacks the hr1 equivalent putting the ch1 files in the correct spot...
Or can it do all this already?
- you don't have to call
-
@Lindon Allow the user to select the location they want to install the samples and pass this to
ExpansionHandler.installFromPackage()
.For the original install HISE has the hr1 file set and a process of unpacking them
That's what
ExpansionHandler.installFromPackage()
does, you just pass it the .hr1 file (the user can select this with a file browser) and the destination to extract the samples to (user can select this with a directory browser) :) -
@d-healey said in Expansion Tutorial:
@Lindon Allow the user to select the location they want to install the samples and pass this to
ExpansionHandler.installFromPackage()
.For the original install HISE has the hr1 file set and a process of unpacking them
That's what
ExpansionHandler.installFromPackage()
does, you just pass it the .hr1 file (the user can select this with a file browser) and the destination to extract the samples to (user can select this with a directory browser) :)OK great - so I check the status of expansions (how would I know if its already been installed?) and if samples not installed then pop a user dialog asking for the location of the hr1 file, when I have that pop another asking for where they want to store the samples..(suggesting SAMPLES as an option) and take their answers as params for ExpansionHandler.installFromPackage()
yes?
So what is ExpansionHandler.getUninitialisedExpansions() telling me?
-
@Lindon said in Expansion Tutorial:
(how would I know if its already been installed?
You could probably use the File API to check if the expansion folder exists in the app data folder. You could also check the list of available expansions in your script.
samples not installed then pop a user dialog asking for the location of the hr1 file, when I have that pop another asking for where they want to store the samples..(suggesting SAMPLES as an option) and take their answers as params for ExpansionHandler.installFromPackage()
The samples "should" be installed when they install the expansion, if they move the samples to a different location then you could handle that with the
Expansion.setSampleFolder()
function.So what is ExpansionHandler.getUninitialisedExpansions() telling me?
According to the docs - Returns a list of all expansions that aren't loaded properly yet.
So no idea, have a look in the source code and report back :)