Doing a build on Windows is a totally different matter and most users never need to do that. It’s mostly intersting for those wanting own functionality or just being curious. But you should be an experienced Visual Studio user. It’s a complicated task and not a good start for a beginner. The key problem when building on Windows is that we cannot ship any 3rd party library we used. Instead you have to collect them all yourself. In order to ease that task we created the list below. Each library comes with a version number which usually specifies the minimum version to be used. Most of the time it’s not mandatory to use the exact same version, but it helps minimizing trouble if you do. To build and link you need the library’s header files, a dynamic library (.DLL) and the linker library (.lib). There are a few libraries that are static and you may have to build some on your own. You’ve been warned.
All 4 top level dirs are needed. What to put there is mentioned in detail below. Also have a look at the PrepareOutputDir.cmd file in the WB source folder. This is called by VS on successfull build of the main project and copies a lot of dependency stuff to the target folder (under “bin/x64/release”). This batch file will help you to find missing resources if you have trouble starting MySQL Workbench.
The MySQL Workbench solution (iworkbench/MySQLWorkbench.sln) contains several build targets and architectures. In this blog we only focus on the 64bit release build. After you opened MySqlWorkbench.sln solution you have to set the configuration and platform in Visual Studio. You can do this using the combo box on the standard toolbar (Picture 2) or using Configuration Manager (Menu->Build->Configuration Manager, Picture 3).
Now it is time to fill the mysql-win-res folder with all dependencies. You should be able find precompiled binaries for most of them on the Internet. If not then it’s up to you to create it.
Once this setup is done you can start the build in Visual Studio.
I hope this helps to get your application compile on Windows and if you have any questions you can contact the Workbench team on the #workbench IRC channel.
hi,Marcin, is there compiled mysql-win-res package i can download?
@mini, that’s the whole point of writing this blog post. We cannot simply publish the win-res folder for legal reasons. Hence the detailed info about how to create it yourself.
Must be a joke…not funny though. If there isn’t at least a script to download all needed dependencies and to place them into the right directories, who has got to time to contribute?!