steinbergmedia / vst3sdk

VST 3 Plug-In SDK
Other
1.59k stars 162 forks source link

Sample Plugins - compiling issue #42

Closed Mc-Zen closed 4 years ago

Mc-Zen commented 4 years ago

When buildling and compiling the included sample plugins the UI is missing for almost all plugins (tried with Win7 SP1 on MSVC2017 and 2019).

Solution: The .rc resource file for each sample plugin needs to include all required resources (i.e. the .uidesc and image files for the UI) like this:

example_image.png PNG "example_image.png" plugin.uidesc DATA "../recources/plugin.uidesc" etc...

Otherwise the UI can't be parsed due to files that are not found. Currently all plugins that feature a proper UI show merely a black box while the "hostchecker" plugin is the only one working correctly (actually has the needed entries in the resource file).

Unfortunately no errors are shown when compiling and debugging which makes it hard to find the cause for anyone not knowing.

scheffle commented 4 years ago

Which host did you test this with? Have you tried with the editorhost example in the SDK? Which path did you use? Did you use the vst3 folder or the vst3 file? You need to use the whole vst3 folder.

Mc-Zen commented 4 years ago

I tried this with the Vst3PluginTestHost from the SDK and Cubase 10 (same result). I used the whole vst3 folder. 

Actually when debugging in Visual Studio (using the TestHost) I found out that when the vstgui library creates and loads the gui of one of the concerning sample plugins, deep under the hood the "errno" variable is set to the "filenotfound" value by the fstream c++-library immediately after the vstgui tries to load the .uidesc file. This then cancels the rest of the gui creation.

scheffle commented 4 years ago

Please check with our latest release if you still have this problem.

Mc-Zen commented 4 years ago

I took the time to check the new release now,

In cmake you can choose "Create_bundle_for_windows" or not. Indeed I had disabled "Create_bundle_for_windows" before when I encountered the initial issue because with this option enabled again some errors ocurred.

Now I downloaded the latest release and this time left "Create_bundle_for_windows" enabled. So now I get an error from the post-build-event when building any of the example plugins. It seems this error happens in the line(s) where a certain attrib is edited:

attrib +s C:/_path_to_debug_output_/again.vst3/desktop.ico

and I guess attrib is not recognized as the path is definitely valid. Without the lines calling attrib the plugins compile without errors. The firstly mentioned problem doesn't occur anymore.

scheffle commented 4 years ago

It looks like you are missing C:\Windows\System32 from your PATH environment variable.

Mc-Zen commented 4 years ago

Yes indeed, that was the thing. Now everythings comiles fine. Thank you