VST Project Generator for Windows prepends source file names with “myplugin”, whereas VST Project Generator for Mac does not.
I’m aiming to build VST3 files targeting Windows and Mac without duplicating source code. This would be easier to do if the source files generated by VST Project Generator for each platform were identically named.
Was this decision intentional? If not, I’d like to request a common naming convention.
It is certainly odd that it does not generate the same names. That being said, you don’t generate the same project both on Windows and macOS: you generate a project on one platform, then you work on it and then you simply compile it on the other platform(s).
The project that gets generated by the generator is multi-platform by default and can be compiled on Windows/macOS/Linux irrelevant on which platform it is generated…
Thanks for the reply @pongasoft !
This is my first time using the VST3 SDK, so I have some observations that appear to conflict with what you’re telling me:
-
and then you simply compile it on the other platform(s).
In my observation, running the VST3 Project Generator on the target platform is a prerequisite to performing this compilation, as it creates the IDE project with the appropriate toolchain configuration.
-
The project that gets generated by the generator is multi-platform by default and can be compiled on Windows/macOS/Linux irrelevant on which platform it is generated…
The project that gets generated depends on what is selected in the “CMake Generator” field. After selecting this field, the “CMake Platform” field dropdown list then contains the available target platforms for the selected Generator. (For example, on an M1 Mac with Xcode selected as the CMake Generator, there are no Windows platforms available in the CMake Platform list.)
If the project that gets generated by the generator is truly multi-platform by default, then I would expect to see multiple target platforms in Visual Studio’s “Solution Platforms” dropdown list, but I don’t. (I chose “Defaults” as the CMake Platform).
I’m working on a Mac with Parallels installed, so I’m able to seamlessly run Mac and Windows applications side by side. This virtualization provides a nice alternative to cross-compilation, as everything is effectively native. My plan is to simply share source code between each project (with their respective target platforms). I believe doing this will allow me to work in whichever IDE I choose (Xcode or Visual Studio), and then simply open the other IDE and compile.
Please let me know if there’s something I’m not understanding.
Thanks!
Mike
The project generator really does 2 things:
- generate a bunch of files with their proper content in their proper location
- run cmake to generate the project for the right toolchain (this is what the CMake Generator/Platform section is used for)
Running 2) is a “convenience” from the tool so that after running the generator on a given platform you can start coding. The most important part is 1) and what is necessary to generate a project.
Once the project is generated on one platform, you only need 2) and 2) is simply done by invoking cmake on the machine you want to compile your project.
You can simply run “cmake -G
” on the command line and it will show you the list of values you can use after -G and that corresponds to the dropdown in the UI
In general, you simply run something like this to do 2):
> # at the root of the source tree
> mkdir build
> cd build
> cmake .. -G "Visual Studio 17 2022"
On macOS you would use:
> # at the root of the source tree
> mkdir build
> cd build
> cmake .. -G "Xcode"
If you look at my Jamba project (https://jamba.dev/quickstart/web/), the “generator” is the web page and it generates the right set of files with proper content and location (equivalent to 1). You then download the zip file and then run a command (called configurator.py) which is only a glorified python script that simply invokes CMake with the right set of parameters for the right platform without having to remember what the parameters are.
1 Like
Hi @abnegative,
the idea behind this is that you use the Project Generator once and then you check-in the folder which is generated without the “build” folder into a SCM (like git or subversion). And then you checkout that folder from the SCM and use cmake on that platform to generate the native project. All you need to create a native project is the CMakeLists.txt file. It’s like a cross platform project file.
1 Like