Is there a simple host that can run in Wine on Linux for testing Windows VST2 plugs

DSP, Plug-in and Host development discussion.
RELATED
PRODUCTS
xos
KVRer
Topic Starter
14 posts since 21 Jul, 2022

Post Sat Nov 12, 2022 1:27 pm

Trying so set up a workflow and setup for developing VST2 plugs for Windows on Linux. And compiling the plugs for windows with MinGW.

Maybe you have some tips for this? I developed a VST2 plug on Linux, but it crashes after compiling it when running it on Windows. So I'm making a new try to make a plug, while also continuously testing the builds for windows while developing on Linux. So that I can fetch were cross platform capability goes wrong during development. But I'm struggling to find a good workflow before I start to develop for both platforms at the same time.

So do you have any advise on a windows host that can run on Linux for plugin development in Wine? Or should I install Carla and run them that way? Or do you have any better tips for a cross platform development?

User avatar
whyterabbyt
Beware the Quoth
31781 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair

Post Sat Nov 12, 2022 1:32 pm

Any reason not to actually run Windows, eg in a VM?
"You're becoming old, and that makes you bitter and angry.... Happens to people who lack empathy and good principles.
Good guys (like I very obviously am) learn how to deal with that properly, without taking it out on others"

xos
KVRer
Topic Starter
14 posts since 21 Jul, 2022

Post Sat Nov 12, 2022 2:37 pm

Yes! running Windows in a VM is an idea. It's just the headache of the windows license key. So would preferably not need to by a new windows license.

ghettosynth
KVRAF
14092 posts since 13 Oct, 2009

Post Sat Nov 12, 2022 2:49 pm

xos wrote: Sat Nov 12, 2022 2:37 pm Yes! running Windows in a VM is an idea. It's just the headache of the windows license key. So would preferably not need to by a new windows license.
Two points: First, to answer your question directly, Reaper runs well in Wine and also has a Linux build so you can have a similar testing environment for comparison. Second, you can install Windows 10/11 without a license and the limitations are minor, e.g., you can't set the desktop background. Now, I'm not advocating piracy, I'm not actually sure of the legal ramifications, if any, there. However, I do know that Linus of Linus Tech Tips does this for testing hardware and has talked about it at length on his channel. Bonus point: At some point I think that as a dev you just have to commit a bit more to testing environments. You're not going to easily test for M1 compatibility, for example, without forking over some money for an M1 mac. Windows laptops are cheap; bonus if you buy one at the low end, because you can determine whether your plugin works well on a low-end machine.
Last edited by ghettosynth on Sat Nov 12, 2022 3:37 pm, edited 1 time in total.

xos
KVRer
Topic Starter
14 posts since 21 Jul, 2022

Post Sat Nov 12, 2022 3:12 pm

ghettosynth wrote: Sat Nov 12, 2022 2:49 pm Two points: First, to answer your question directly, Reaper runs well in Wine and also has a Linux build so you can have a similar testing environment for comparison. Second, you can install Windows 10/11 without a license and the limitations are minor, e.g., you can't set the desktop background. Now, I'm not advocating piracy, I'm not actually sure of the legal ramifications, if any, there. However, I do no that Linus of Linus Tech Tips does this for testing hardware and has talked about it at length on his channel. Bonus point: At some point I think that as a dev you just have to commit a bit more to testing environments. You're not going to easily test for M1 compatibility, for example, without forking over some money for an M1 mac. Windows laptops are cheap; bonus if you buy one at the low end, because you can determine whether your plugin works well on a low-end machine.
Yes! I would likely need many different hosts to test on.

I have a windows machine to test on. But at the moment I just need some convenient for testing, to make fast checks that it works. Maybe I could set up a network so I can transfer the file to the windows machine automatically. But It would be nice to not switch laptop at all for fast iterations when compiling and testing.

It looks like Bitwig can run in wine on Linux. I just tested that, as I have a licence. And it looks like it works without any issues. The only thing is that for getting the audio to work I needed to use the driver supplied that FL-studio installed in Wine.

Looks like I eventually need to learn how to use many different hosts for testing.

User avatar
wrl
KVRist
61 posts since 12 Aug, 2011

Post Sat Nov 12, 2022 3:29 pm

Seconding the REAPER recommendation, it's treated me well.

The thing with running it in WINE though is that you're not really testing anything against Windows, you're testing against however-WINE-implemented-Windows, which, while generally very good these days, isn't perfect. You'll want a Windows machine to test with eventually, but WINE can sometimes help find bugs. I always double check against a Windows machine though.

Intel NUCs are cheap, as are the little ASUS PN50 line of Ryzen mini-PCs.
owner/operator LHI Audio

xos
KVRer
Topic Starter
14 posts since 21 Jul, 2022

Post Sat Nov 12, 2022 5:23 pm

Yes! I installed Reaper. It was easy to use.

Maybe I can use some sort of remote desktop to control the windows computer and some type of network so I don't need to manually transfer files at all.

User avatar
mystran
KVRAF
7326 posts since 12 Feb, 2006 from Helsinki, Finland

Post Sun Nov 13, 2022 12:08 am

The workflow I use for cross-platform development is to put the source code into a git repository (eg. a local network share works if you want to avoid the cloud), then clone and build locally on each platform. If there's a problem, you can debug and fix it directly on the platform experiencing the problems even if it's not your main development platform and afterwards just push the changes back into the master repository. I think this is much easier than trying to build on one system and test on another.
Seeking asylum in any country willing to acknowledge my right to exist.

rafa1981
KVRian
838 posts since 4 Jan, 2007

Post Sun Nov 13, 2022 1:30 pm

In my case I went to great lengths to avoid installing Visual Studio on Windows (dozens of GB) when I only wanted the SDK which is about 1GB. They make it hard to avoid the bloat.

You can crosscompile on Linux directly using clang (cl) provided you download the Windows SDK and fix some issues with case insensitivity. This project does it for you:
https://github.com/Jake-Shadle/xwin

From that point it is regular cross-compile and CMake stuff. Neither interesting nor immediate but not imposible to figure out. You can check how it's done here:
https://github.com/RafaGago/artv-audio

For the steps involves, you can look at the github workflow file.

For debugging I think that you can cross debug on Wine but I didn't get it working in 1 hour when I tried and I desisted. As I'm using JUCE I have never found a Windows only bug. I run YOLO. For caution I export a pdb to be able to open Windows crash dumps (with WinDbg), should they happen.

This setup is enough for my OSS project. Probably a bit fragile though, as it depends on not so mainstream tooling and workflows.

I don't do Mac, but I guess that that one is much harder to crosscompile.

xos
KVRer
Topic Starter
14 posts since 21 Jul, 2022

Post Thu Nov 24, 2022 7:33 pm

What I eventually did was to install MinGW on Linux and cross-compiled to windows on the Linux computer, with the same sourcecode for both Linux and Windows. I don't know if it's the right way, but it's good enough for now.

And I made a makefile to control compiling with automatic transfers of files to the windows computer.
And I set up VNC so I can see the windows desktop and remote control the windows computer, as wine's windows emulation is not good enough. I installed the development branch of Wine so I can write some bug reports later on, so I can see if they will make some improvements for running some audio applications or other windows applications.

And I also set it up ssh so I can run windows commands from Linux on the windows computer if needed. But as it looks at the moment I will probably not need it.

But I will need to use some more hosts to test in. Reaper looked like a good advise. Has anyone tested NanoHost from tone2 or Element from kushview? Or does anyone have some better ideas? Maybe something with good error reporting?

User avatar
Markus Krause
KVRAF
1562 posts since 2 Jul, 2018

Post Fri Nov 25, 2022 1:39 am

Nanohost is free, tiny, fast and works fine under Wine (tested it under Zorin Linux with various products). I also use it for development and debugging.
https://www.tone2.com/nanohost.html
https://www.tone2.com/nanohost_manual.html
Tone2 Audiosoftware https://www.tone2.com

rl
KVRist
100 posts since 6 Jan, 2003

Post Sat Nov 26, 2022 3:18 pm

For testing and debugging under Linux/Wine I'm using Carla. Carla has the nice feature that I can quickly unload/reload the plugin.

User avatar
audiojunkie
KVRAF
3790 posts since 19 Apr, 2002 from Utah

Post Sat Nov 26, 2022 6:08 pm

wrl wrote: Sat Nov 12, 2022 3:29 pm Seconding the REAPER recommendation, it's treated me well.

The thing with running it in WINE though is that you're not really testing anything against Windows, you're testing against however-WINE-implemented-Windows, which, while generally very good these days, isn't perfect. You'll want a Windows machine to test with eventually, but WINE can sometimes help find bugs. I always double check against a Windows machine though.

Intel NUCs are cheap, as are the little ASUS PN50 line of Ryzen mini-PCs.
I agree with this. If you are writing apps for Windows, you need a real Windows environment to test on. The same if you are writing for Apple or Linux.
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

User avatar
audiojunkie
KVRAF
3790 posts since 19 Apr, 2002 from Utah

Post Sat Nov 26, 2022 6:12 pm

xos wrote: Sat Nov 12, 2022 5:23 pm Yes! I installed Reaper. It was easy to use.

Maybe I can use some sort of remote desktop to control the windows computer and some type of network so I don't need to manually transfer files at all.
RDP works fine for some things—for instance, a business app. But in this case, you need to be able to test how well the audio works under various latencies and loads. RDP would be crap for that.

I guess you could develop the basic functionality that way and rely on beta testers to the things that won’t work well with RDP.
C/R, dongles & other intrusive copy protection equals less-control & more-hassle for consumers. Company gone-can’t authorize. Limit to # of auths. Instability-ie PACE. Forced internet auths. THE HONEST ARE HASSLED, NOT THE PIRATES.

rafa1981
KVRian
838 posts since 4 Jan, 2007

Post Sun Nov 27, 2022 5:12 am

Don't forget QEMU if you want to avoid involving two computers. Unfortunately it wasn't very straightforward to get good low latency audio last time I checked. Probably the situation has improved with PipeWire.

Return to “DSP and Plug-in Development”