Building MuseScore on Windows
If you are a Windows user and want to help with code development you can now build MuseScore on Windows. This makes development more convenient for the many people that use Windows on a daily basis. In the past you had to use Linux to create Windows builds of MuseScore. Lasconic wrote instructions in early April and others have managed to build on Windows since then.
Mateusz Czaplinski was the first to build MuseScore on Windows. In January 2009 he announced "...After a day of hard work I have succeeded." His work was pioneering but the procedure was quite complex.
Recently Lasconic has worked to simplify the process. The instructions are available in the developers handbook. See Compile instructions (Windows - MinGW) - SVN trunk .
The instructions by Lasconic assume a certain level of knowledge. To build MuseScore on Windows you should first be familiar with the following:
- The Windows path variable and how to add new directories to it
- SVN or TortoiseSVN and how to checkout and update
- The command prompt and how to change directories
Building MuseScore is an involved process that may take several hours to setup the first time. Make sure you have about 5 GB of disk space available for the development software and the files created during the build process. Once setup is complete the actual build process takes 1-3 hours or more depending on the speed of your computer. Subsequent builds take less time if you do not delete the files created during the first build.
If you get stuck at any point feel free to post your questions on the developers mailing list .
Comments
It's easy for the user to identify the primary MuseScore file for a song, i.e., the song name with an mscz extension. I can't find any information on the other related files. For every primary song file, there's another similarly named file that is almost identical except it begins with a period and ends with a comma. Then, there are many files whose names begin with ms and have no extension. I have two PCs -- a desktop for work at home; and a laptop for traveling. I want to keep these data files in sync for both PCs. I can copy the entire data folder, but this is time-consuming. How can I tell which "ms" files belong to which songs? I see that there is not necessarily a change in an "ms" file when I change a song. Also, when I delete a song, how do I tell which "ms" files to delete? I don't like to carry dead weight in my folders. If a subsidiary file is no longer necessary, I want to clean it up. Over a long period of time, this could get rather messy. Any suggestions?
In reply to MuseScore Files by rrayner_
The primary MuseScore file is the only one you need to keep in sync. The other files are automatic backups of previously saved versions. The similarly name file that begins with a period and ends with a comma contains the previously saved version of the corresponding primary file.
Prereleases for the next version of MuseScore do not create the "ms" files you mention. If you want to delete the "ms" files you can do so (they do not affect the primary file).
revision 1806 on 64-bit vista.
Any experience using QT 2009.02 instead of 2009.01 ?
What I found:
1. Besides the 2 lines in mscore\cmake\mingw32.mingw.cmake that the instructions indicate, the directory of mingw is also hard coded into Makefile.mingw in the line
MINGW_DIR = "C:\Qt\2009.01\mingw"
2. The function gettimeofday() is used in mscore\mscore\utils.cpp, but its prototype never appears in any header files either of mscore or mingw. I had to add it into utils.cpp to make the compilation proceed. (It's used in also.cpp too, but that's not required for Windows build.)
3. It finally ended with the following error
Linking CXX executable mscore.exe
C:\Qt\2009.02\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
cannot find -lQtUiToolsd
collect2: ld returned 1 exit status
mingw32-make[3]: *** [mscore/mscore.exe] Error 1
mingw32-make[3]: Leaving directory `C:/MuseScoreSource/win32build'
mingw32-make[2]: *** [mscore/CMakeFiles/mscore.dir/all] Error 2
mingw32-make[2]: Leaving directory `C:/MuseScoreSource/win32build'
mingw32-make[1]: *** [all] Error 2
mingw32-make[1]: Leaving directory `C:/MuseScoreSource/win32build'
mingw32-make: *** [win32] Error 2
Any insight would be greatly apprciated.
In reply to Qt 2009.02 by yingdat
Lasconic is looking in to this: http://n2.nabble.com/Problem-with-gettimeofday---using-QTime.currentTim…
In reply to Qt 2009.02 by yingdat
Lasconic's doc said Qt 2009.01 included gcc 3.4.5 but Qt 2009.02 mingw only has gcc 3.4.2 and it is missing gettimeofday like you say. The most annoying symptom for my first windows build were millions of warnings about "inline function declared dllexport, ignored" which make the output unreadable.
I installed and used latest www.mingw.org which fixed these warnings and also the gettimeofday issue.
Whoever built Qt 2009.02 also left out QtUiToolsd, like you say. I downloaded the Qt Framework, installed it, found libQtUiToolsd.a, and copied this into the Qt SDK lib folder.
Finally, I was able to get an mscore.exe.
iDave2
In reply to Qt 2009.02 has older mingw by iDave2
... and it had only 1200 warnings!
Nice. ;-)
In reply to Finally, I was able to get an mscore.exe... by iDave2
Nice :)
Do you use any IDE ? how do you know about the warning count ?
In reply to Nice :) Do you use any IDE ? by [DELETED] 5
Hi Lasconic,
I have cygwin on my machine so I wrote a little .bat file to run the make and used a command like this from DOS,
$ myMake 2>&1 | tee myMake.log
then watch the relaxing messages spew for about 50 minutes to both Command Prompt window and to file.
When it is done, I type something like this from Command Prompt,
$ grep warning: myMake.log | wc -l
You can also use "findstr" from DOS. wc -l counts lines.
I have not used an IDE yet but probably will if I start working with you guys coding. I am a big fan of Eclipse.
iDave2
In reply to wc -l by iDave2
I updated both the SVN and the tutorial for Qt 4.5.1 based on your findings. I also write a short paragraph about the new Cmake support in Qt Creator in Qt 4.5.1.
In reply to I updated both the SVN and by [DELETED] 5
I tried to build MScore with the actual version of any dependencies.
the QT-directory in Makefile.mingw has to be changed to the correct version:
MINGW_DIR = "C:\Qt\X.X\mingw"
the Jack-directories in CMakeLists.txt have to be changed to the correct version:
set (JACK_INCDIR "C:/Program Files/Jack vX.X.X/includes")
set (JACK_LIB "C:/Program Files/Jack vX.X.X/lib/libjack.a")
in the QT-Creator you have to choose MINGW for the firt CMake run.
with this changes I was able to successfully build MScore.
When I try to run it I get an error because of a missing function in QtCore4.dll.
None of the three dlls (2 shipped with Qt, 1 from a MScore install) had all the functions, that the build requires.
Qt-Version 2010.01.
Qt-2009.05 works.
So I suggest to put a direct link to the Qt version that is used for development, since http://www.qtsoftware.com/downloads only provides a link to the actual version.
//get.qt.nokia.com/qtsdk/qt-sdk-win-opensource-2009.05.exe is the direct link to the used version.
So...
The bulid is running and I am ready to help developing MuseScore!
In reply to Build problems by HumerGu
Thanks for sharing your findings. Feel free to update the Compile instructions! Simply click on the edit tab and mention that Qt-2009.05 works.
In reply to Build problems by HumerGu
Thank you for the feedback. Lasconic updated the build instructions and source files for Qt 4.5.1 a couple days ago. I updated JACK to 1.9.4 today. If you have any more questions please ask. There is also a developers mailing list that you may find useful.
In reply to Thank you for the feedback. by David Bolton
Is jack 1.9.4 working? My last try leads to a failure.
In reply to Is jack 1.9.4 working? My by [DELETED] 5
r.2598 nightly is built against JACK 1.9.4. I followed the instructions provided in the developers handbook and by HumerGu above. Let me know if you have any problems.