

I have just uploaded the ASPiK 1.7.0 that fixes the issue with the VSTGUI4 library's init/exit additions.Â
The current version of RackAFX 7.3.3 includes these changes, so newly exported ASPiK projects will have these fixes.
GitHub: https://github.com/willpirkleaudio/ASPiK
EZ ZIP Download: https://www.aspikplugins.com/downloads/ASPiK_SDK_1.7.0.001.zip
The following files were modified; if you would like to update an existing project to 1.7.0 manually, then copy these FOUR files from the SDK /PluginTemplate folder to your project's corresponding folders:
project_source/source/PluginKernel/plugingui.h
project_source/source/PluginKernel/plugingui.cpp
project_source/source/vst_source/factory.cpp
project_source/source/aax_source/AAXPluginGUI.cpp
These were the only files modified, and only for the VSTGUI init/exit stuff. All other code is untouched.
WillÂ
Â
Â
WillÂ
Huge thanks Will.
However it's not quite working for me yet.
I tried the EZZip version first but encountered all those previous issues. Maybe they're the old files though, as they were different from those currently on Github. I tried that version next using the included VSTGUI and current VST SDK 3.7.2_build28_2021_03_30
I'm receiving a compile error unfortunately.
From a fresh ASPiKKreated project, VisualStudio is saying that moduleHandle is an undeclared identifier on line 59 factory.cpp
VSTGUI::init((HINSTANCE)moduleHandle);
A small and probably unrelated issue, which I only mention as I hadn't noticed it before. In cmake just before it complains harmlessly about the missing EXPAT library it looks for and then does not find "C++ include stdatomic.h". Maybe it was always like that though.
Hope there's just a missing declaration or something, I see that the code's totally different on Mac so it must be tricky. Massive appreciation for all your efforts so far.
Cheers
(edit Just tried with PluginTemplate and also PluginTemplate with the latest VSTGUI from their Github. Same missing moduleHandle declaration )
( edit2. Tried adding #include "C:\ASPiK-1.70\ALL_SDK\VST_SDK\VST3_SDK\public.sdk\source\main\moduleinit.cpp" to factory.cpp
that found the missing pointer to moduleHandle but the new compile error on line 57 says - bool InitModule(*void) already has a body. )
Well damn. That's what I get for using both Win and Win10 to merge fixes.Â
You just need to add one line of code to factory.cpp, an extern fwd declaration for a global variable:
#include "vstgui/lib/vstguiinit.h"
#include "public.sdk/source/main/pluginfactory.h"
extern void* moduleHandle; // <-- add this line of code
Do not initialize the variable, leave it just like above.Â
VSTGUI4 relies on global variables for both Mac and Windows. This is one of those "real world" cases that the C++ academics don't see unless they participate in industry, and global variables solve an important issue for this library.Â
The original PluginGUI.cpp file had these extern variables declared in it, and I tried to clean up the top part of the file, by removing all global variable forward declarations. This is where the bug crept in - two different fixes on two VMMs...
I will do a quick maintenance push on 1.7.0 for this one file... meantime, you can fix it with the code above.
WillÂ
Thanks the fix compiles now and also loads into Reaper, VSTHost, Plugin DR, Ableton without any error. Also tested loading, saving, exiting, reopening multiple instances of the plug. ++
Unfortunately I still get that previous Assertion Failed error whilst saving over the GUI from the editor. Reapers crashed debug report again shows line 243 at prettywriter.h to be at fault.
Are you able to overwrite the plugingui.uidesc file, without crashing it?
OK - well not too difficult to fix this one. Not the same error, this has to do with the new JSON .uidesc file format, which just popped up in this VSTGUI4 library (the VSTGUI lib defaults to XML via a #define statement).Â
To fix this, you need to change the flags in the file saving function. You can find this in the plugingui.cpp file at line 1006 (in the latest .cpp file). It is at line 1027 in the older versions.Â
Replace the flags as shown here, with the new wire-or-ed constants as follows; there is a deprecated constant you can change at the same time, so alter the two lines:
int32_t flags = UIDescription::kWriteAsXML;
and then in the if() statement:
flags |= UIDescription::kWriteImagesIntoUIDescFile;Â
void PluginGUI::save(bool saveAs)
{
  if (!showGUIEditor) return;
Â
  int32_t flags = UIDescription::kWriteAsXML; // <--- initialize for XML here
#if VSTGUI_LIVE_EDITING
  UIEditController* editController = dynamic_cast<UIEditController*>                                (getViewController(frame->getView(0)));
if (editController)
{
  UIAttributes* attributes = editController->getSettings();
  bool val;
    Â
  if (attributes->getBooleanAttribute(UIEditController::kEncodeBitmapsSettingsKey, val)      && val == true)
  {
    flags |= UIDescription::kWriteImagesIntoUIDescFile; // <--- changeÂ
  }
// --- ETC rest of file is not touchedÂ
This sets you up to write the XML file into the UIDESC file.Â
Looks like another quick update.... Good thing I've got part of it automated, though notarizing the ASPiKreator for Mac requires waiting on Apple...
WillÂ
Most Users Ever Online: 152
Currently Online:
11 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Chaes: 56
Skyler: 48
StevieD: 46
Derek: 46
Frodson: 45
Peter: 43
TheSmile: 43
Nickolai: 43
clau_ste: 39
jeanlecode: 37
Member Stats:
Guest Posters: 1
Members: 768
Moderators: 1
Admins: 6
Forum Stats:
Groups: 13
Forums: 42
Topics: 842
Posts: 3347
Moderators: W Pirkle: 689