Building on Windows
I'm keen to do some work in the MuseScore source. I've got decades of experience in C++, including a lot of experience profiling and optimising code for speed and memory access.
But I spent a day yesterday trying to even get anywhere near starting to build. Even the Qt install took literally hours. It was a complete waste of a day.
There's a huge hurdle for a Visual Studio developer to contribute to this project.
People's political / whatever views about MicroSoft aside, their IDE is an environment in which a developer can be very productive. I can't however be productive in MinGW, or Eclipse. I would rather contribute my time to MuseScore, rather than learning prehistoric tools I won't be using for anything else.
I'd also speculate that the majority of MuseScore users are on Windows.
I think it would benefit the project greatly if someone who knows how the build system works could put together a set of project files for Visual Studio, and streamline the process for visual studio developers to contribute.
This may be worth a poll, since it's hard to tell whether to care enough about Visual Studio developers or not. I'm only one guy after all.
But I seriously doubt I'm the only developer who has been effectively prevented from contributing to this project because of the build environment and requirements.
Comments
I wouldn't exactly go and call Qt(Creator) a prehistoric tool (Eclipse is far from needed); but yes, there is a desire to enable a Visual Studio build chain for MuseScore. All we need is someone with the time to put into making it happen.
The upside would be that we can also (again) use the WebView components of Qt under windows then, as those are chromium based and don't build on MinGW.
In reply to I wouldn't exactly go and by jeetee
Maybe I could work with someone to enable this?
I have some time to put in, but doing it on my own is quite a learning curve.
Would need to probably port all the dependent projects as well (such as PortAudio etc). Or better still make binaries available. It doesn't make sense for every developer to have to build Qt for instance when it's a big task and will result in the same binary in the end (or if it doesn't we probably would want it to).
Also I think there are some more reasons to target 64 bit.
We found when we ported WinGate to 64 bit there were a few unexpected bonuses, such as improved resource (CPU) allocation. You get given a bit more CPU time basically so things ran quicker.
Also a lot of access to underlying things are 64 bit on 64 bit windows, and the WOW subsystem has to marshall or thunk things through which slows it down a little.
I would say that while the vast majority of MuseScore *users* are probably on Windows, when it comes to people who are interested in *development*, it starts skewing a lot more towards Linux, and even among the Windows developers, the Qt environment is in pretty common use among those who have worked on open source projects. I definitely recommend giving QtCreator a shot - not sure why you consider it "prehistopric" as it is pretty much standard-issue with respect to the facilities it provides, and it should seem pretty instantly familiar to anyone familiar with any other IDE. I guess maybe the profiling tools are not where Visual Studio is? But still, basic development should be a breeze.
That said, sure, if someone wanted to put together instructions for building using Visual Studio, that would be fine.
In reply to I would say that while the by Marc Sabatella
the ideal instructions for building with Visual Studio should be
1. Download the files
2. Double click the project file
3. Hit F7, wait.
done.
to be frank I've found the same problems / barriers with all the open source projects I've had anything to do with. Basically they are not set up for windows development at all, yet Windows is still probably the primary platform the products are used on.
I guess it's a byproduct of the fact that until relatively recently you couldn't get commercial Windows IDEs without paying a fair amount of money for them, but Nadella has changed tack a lot, and is embracing open source and cross-platform, and the free editions of VS2010, 2015 etc are very compelling.
It's really hard to forego the familiarity I have with Dev Studio to look at another IDE. I found Eclipse largely horrible to use, and even Android Workbench annoyed the heck out of me.
The profiling tools and integrated source debugging in Developer Studio are very compelling as well.
It's hard to know what kind of thing MS may have been by now if it had been easy for Visual Studio developers to contribute. Someone may be very skilled in C++ and Visual Studio, but ignorant about open source, and the barrier to entry is very high, and requires a huge time commitment to become useful - not even counting figuring out how the project code works.
In reply to the ideal instructions for by Adrien de Croy
So are the current ideal instructions:
1. Clone the source
1b) download additional pre-built binaries for the dependencies
2. double click the project file
2b) specify target to build, because we have multiple
3. Build & Run
I use Visual Studio on a daily basis at my day job and agree that it has become one of the best IDEs out there (at least since 2015 and up). In the older versions there was quite a lot of Microsoft specific stuff that easily seeped in.
One of the things I am wondering about is the Qt - Visual Studio integration. QtCreator has a very good designer view for the graphical interface; I haven't looked into how that would work in the Visual Studio environment.
In reply to So are the current ideal by jeetee
Is this useful?
http://doc.qt.io/qtvstools/index.html
In reply to Is this by AndreasKågedal
possibly, I'll need to look further into it. I really know nothing much at all about Qt, and even less about QtCreator.
In reply to So are the current ideal by jeetee
yep that would be great.
At this stage I'd see myself more useful in algorithm optimisation, rather than GUI layout etc so I wouldn't see a need to tinker with the UI / layout. Mainly just run the exe in the profiler etc.
May need Qt symbols to properly profile it as well.
In reply to the ideal instructions for by Adrien de Croy
Hi, I'm the release manager for the Windows and MacOSX version. I would love to have a MSVC toolchain build for MuseScore. Both MSVC and mingw gcc have their merits, and they can both be used in QtCreator. Of course, the MSVC toolchain could also be used in Visual Studio. Mingw is free, opensource, it implemented C++11 a lot faster than MSVC. MSVC on the other end should be better optimized, make faster binaries, and would help us to have a webview, but also better crash reporting.
I have a pretty good understanding of the MuseScore build process..., but I have never used Microsoft developer tools. So I'm happy to help you to modify our build system to be able to build with VS! We can talk on IRC #musescore on freenode.net (click here is you don't have an IRC client)
In reply to Hi, I'm the release manager by [DELETED] 5
Hi! I've started working on getting MuseScore to compile with the MSVC 2017 toolchain. From what I've seen on this thread and others, this is interesting to the community to recover the use of a webview.
Right now, I'm fighting with CMAKE to get it to generate the correct make-system for the VS toolchain (I'm almost there... most of the projects/subdirs are already being correctly generated, and mostly compile - except for a few errors and warnings here and there :) Getting that fixed is the next step, after everything is correctly set-up).
Perhaps we can meet on IRC to chat about this. I would appreciate some help with CMAKE (I hadn't used it previously, and this limits somewhat what I'm able to achieve...).
Regards!
I know it's been a while, but MuseScore is now built with msvc, with visual studio being the default tool.
In reply to I know it's been a while,… by ecstrema
Hi, I'm looking to setup my windows environment for musescore development with VS 2017 64. I've run into a build failures issue where it appears all 25 projects fail with a similar object reference error: Build Started: Project:msscore, Configuration: RelWithDebInfo x64 --- Object Reference not set to an instance of an object. I did review the documentation for gaps in my setup, but was not able to identify any missing configuration. Any help/advice would be greatly appreciated. Thx in advance
In reply to Hi, I'm looking to setup my… by davilo61
With Visual Studio 2017 or 2019? Which Qt version exactly?
In reply to With Visual Studio 2017 or… by Jojo-Schmitz
Hi, VS2017 v15.9.24, QT VS Tools v 2.5.2 rev 1 and Qt 5.12.9 MSVC 2017 64
In reply to Hi, VS2017 v15.9.24, QT VS… by davilo61
I've dropped VS2017 and moved to Vs2019 and also Qt 5.12.9. But AppVeyor still uses VS017. And Qt 5.9.8. So that does work too
In reply to I've dropped VS2017 and… by Jojo-Schmitz
I suppose I could update to VS2019 and try that with my current QT 5.12.9. I should mention I'm using the free community edition of VS2017 and will update to the VS2019 community edition.
In reply to I suppose I could update to… by davilo61
It works for me.
Make sure to really follow the developers' handbook to the letter (while applying brain at places ;-))
In reply to It works for me. Make sure… by Jojo-Schmitz
Ok I will re-check my settings as well. There are any number of ways to go awry in that process.
In reply to Ok I will re-check my… by davilo61
Thanks for responding so quickly. I did have a question to clarify. What is meant by the musescore checkout folder? Is that the root of the repo directory where I cloned the master?
In reply to Thanks for responding so… by davilo61
yes
In reply to yes by Jojo-Schmitz
There are all platform build instructions and specific platform build instructions. I just followed the instructions for using Visual Studio. Is that correct ?
In reply to There are all platform build… by davilo61
yes