3 Quick Questions about Expansions!
-
@Christoph-Hart Any idea on this one?
Inside HISE, expansions work flawlessly. But in compiled plugin, it seems like it's not extracting/installing them properly using:
expHandler.installExpansionFromPackage(hr,FileSystem.Samples);
I exported/encoded the monoliths properly (I think), embedded the .hxi file. And it extracts the samplemap.ch1 AND the info.hxi to the designated Samples folder. It also doesn't copy any files, or make any directories, in the appdata folder on Windows.
My brain hurts, been at this for hours now.
I can send the entire project if that helps, I apologize in advance for the horrible coding standards.
OK MORE PROGRESS:
If I manually copy the info.hxi over to the root folder of the instrument in appdata, Bloom appears in the dropdown list, but there's still no images or samples being loaded.
In fact manually copying the .hxi to the appdata folder rebuilds the entire expansion folder structure inside the Samples folder (but the images folder is empty).
-
I don't have time to debug this at the moment. Have you tried running it in Visual Studio's debugger to see if it reveals anything?
-
@d-healey No problem :) no i haven't yet, I suppose that's tomorrows job since it's 6am now
-
Can someone please let me know what exactly happens when using installExpansionsFromPackage? Does it rebuild the entire folder structure of the expansion in appdata? Does it rebuild it in the Samples/Expansions folder? Does it just provide the .ch1 and .hxi files?
Since mine isn't working, I'm not sure what it's even supposed to be doing to debug.
Edit: Okay it's supposed to recreate the entire folder structure in APPDATA, and the samplemaps are located in wherever the base samples folder is.
I've got it working now for FilesOnly (after manually dragging stuff around), still no idea why the encrypted one isn't rebuilding it properly.
-
@Christoph-Hart Could you pretty please take a look at this when you get the chance?
If I call expHandler.installExpansionFromPackage(exp location, samples folder), it extracts the entire .hr1 to the samples folder including the .hxi, and doesn't recreate the expansions folder structure anywhere in APPDATA.
As far as I know I did every step right, and FilesOnly expansions work properly if I manually copy them to the right locations. Just seems to affect the intermediate ones
-
@iamlamprey said in 3 Quick Questions about Expansions!:
doesn't recreate the expansions folder structure anywhere in APPDATA
That's correct. It won't recreate the folder structure because most of the data can be read from the hxi. I think it only extracts the User Presets folder.
it extracts the entire .hr1 to the samples folder
Do you mean it extracts the ch files from the hr1?
-
@d-healey said in 3 Quick Questions about Expansions!:
That's correct. It won't recreate the folder structure because most of the data can be read from the hxi. I think it only extracts the User Presets folder.
So the images etc are all stored in the hxi? Why would it extract both to the same folder?
The only way I can get the expansion even showing up in the plugin is to manually move the .hxi to the APPDATA folder. (Samples/images etc still don't load).
Do you mean it extracts the ch files from the hr1?
Yep. At this point I'm contemplating just making the expansions FilesOnly and using innosetup or something to set the folder structure up.
This same issue occured in the hise-tutorial project once I added my code.
-
@iamlamprey said in 3 Quick Questions about Expansions!:
Why would it extract both to the same folder?
Both what?
@iamlamprey said in 3 Quick Questions about Expansions!:
The only way I can get the expansion even showing up in the plugin is to manually move the .hxi to the APPDATA folder.
This should happen automatically when you install the expansion. Post the code you're using to install the expansion.
Yep.
Then it's working as expected, it should extract the ch files from the hr archive.
-
@d-healey said in 3 Quick Questions about Expansions!:
Both what?
The samples as a .ch1, and the info.hxi file both get extracted to the Samples folder (set using the FloatingTile).
This should happen automatically when you install the expansion. Post the code you're using to install the expansion.
const var expHandler = Engine.createExpansionHandler(); var expansionDirectory = FileSystem.getFolder(FileSystem.Samples); expHandler.setAllowedExpansionTypes([expHandler.FileBased, expHandler.Intermediate, expHandler.Encrypted]); reg hr; /*There's also the GUI elements: 1. A FloatingTile set to CustomSettings to change the designated Samples folder. 2. A button to locate and install the .hr1. 3. A button to set active expansions (one for each expansion). 4. A debugging ComboBox that lists all the installed expansions - this ONLY shows the expansions when I move the info.hxi file from the Samples folder to my APPDATA folder on Windows. The samples and images still don't load. */ //Button to install user-selected expansion: inline function onButton2Control(component, value) { FileSystem.browse(expansionDirectory, false, "", function(result) { hr = result; expHandler.installExpansionFromPackage(hr,test); expHandler.refreshExpansions(); }); }; //Button to set active expansion and load sample map: inline function onExpansions_ButtonBloomControl(component, value) { Engine.setCurrentExpansion("Bloom"); currentExpansion = "Bloom"; //Put Stuff Under This backgroundImage = ("{EXP::Bloom}bg_bloom.png"); Image_BG.setAlpha(1); Image_BG.set("fileName", backgroundImage); ComboBox_Atlas.set("visible", 0); SamplerRR.setAttribute(12, 0); Sampler_NoRR.setAttribute(12, 1); SamplerRR.setBypassed(1-value); Sampler_NoRR.setBypassed(value); SamplerRR.asSampler().loadSampleMap("{EXP::Bloom}Bloom_SampleMap"); };
Is it not loading the samples because of the {EXP::} stuff?
-
expHandler.installExpansionFromPackage(hr,test);
Where does
test
magically appear from? -
@d-healey Sorry that's just a random thing while I was testing. It's:
const var test = FileSystem.getFolder(FileSystem.AppData);
But it's just made a folder on my desktop instead. Either way I had tried expansionDirectory as well as the constants like FileSystem.Samples to no avail.
-
Here's a working example. I've already exported the .hr1 file and it contains the info.hxi. It was a bit finicky on my system but that could be because I'm on GNU/Linux. If I tried to run the installer from within the HISE project it didn't work properly, however once I exported to a standalone app (will work with plugin also) the installer worked as it should.
-
@d-healey Thanks for taking the time to make that, unfortunately it crashes Ableton and the standalone exe doesn't open (eats up 11% CPU). It only works when I comment out
inline function onbtnInstallControl(component, value) { if (value) { FileSystem.browse("", false, "", function(result) { hr = result; /* FileSystem.browseForDirectory("", function(dir) { expHandler.installExpansionFromPackage(hr, dir); }); */ }); } };
I'm guessing Windows doesn't like nested file browser functions?
-
I've been using this code on Windows in another project. Run a debug in Visual Studio and see what's causing the crash.
-
@d-healey How does one do this?
Edit: Ok went file -> open solution -> .exe -> debug -> start debug
and got
'Expansion Demo x64.exe' (Win32): Loaded 'D:\Documents\HISE\Expansion Demo\Binaries\Compiled\App\Expansion Demo x64.exe'. Module was built without symbols. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\comdlg32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.19041.844_none_423537bff6b9828c\comctl32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Unloaded 'C:\Windows\System32\advapi32.dll' 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\wininet.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\version.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\dbghelp.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\opengl32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\glu32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\twinapi.appcore.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\wldp.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.844_none_ca00b6081b84eb1d\comctl32.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\WindowsCodecs.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\MrmCoreR.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\iertutil.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\thumbcache.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\DataExchange.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\dcomp.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\d3d11.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\dxgi.dll'. Cannot find or open the PDB file. onecore\com\combase\dcomrem\resolver.cxx(2283)\combase.dll!00007FFB63C0276E: (caller: 00007FFB63C0546E) ReturnHr(1) tid(3114) 80040154 Class not registered onecore\com\combase\dcomrem\resolver.cxx(2491)\combase.dll!00007FFB63C05496: (caller: 00007FFB63C01FB5) ReturnHr(2) tid(3114) 80040154 Class not registered 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\TextInputFramework.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\CoreUIComponents.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'. Cannot find or open the PDB file. 'Expansion Demo x64.exe' (Win32): Unloaded 'C:\Windows\System32\WinTypes.dll' The thread 0x29f8 has exited with code 0 (0x0). The thread 0x22a4 has exited with code 0 (0x0). The thread 0x2eb8 has exited with code 0 (0x0). The thread 0xd44 has exited with code 0 (0x0). The thread 0x3114 has exited with code 0 (0x0). The thread 0x3020 has exited with code 0 (0x0). The thread 0x1054 has exited with code 0 (0x0). The thread 0x126c has exited with code 0 (0x0). The thread 0x1fcc has exited with code 0 (0x0). The thread 0xde0 has exited with code 0 (0x0). The program '[1552] Expansion Demo x64.exe' has exited with code 0 (0x0).
-
You need to make a debug build with debug symbols probably
-
@d-healey as in a debug build of HISE instead of release?
-
@iamlamprey A debug build of the project, not HISE.
-
-
@iamlamprey You sure you're on the latest scriptnode?