How to start as a Developer?
On the extremely unlikely possibility that I'd be able to find time to code MuseScore (if VSTi support was easy, it would be done by now), I decided to download and compile the source code.
I followed the instructions, and got a compiled version of mscore, but - that's pretty much all I got.
- I had no idea where make stashed the binary file. I had to go hunting through the directories to find it.
- The version (0.9.3) was way out of date.
- I couldn't find any source code. There were plenty of .h and .cxx files, but they all were auto-generated from .ui files, none of which seemed to be included.
- I had no idea what sorts of tools should be used to edit and modify the source code.
The Development portion of this website seems to be targeted at project maintainers for various platforms, but not for developers. While the Developer's Handbook says it contains "all information regarding MuseScore development", the actual page is (by it's own admission) little more than a placeholder.
While I'd rather have the developers spend what little time they have writing code, it would be nice if there were enough information on the site for a potential developer to play around with the source without having to bug the folk via the developer mailing list.
Comments
I am on Windows so I'll help the best I can (I assume you are on Ubuntu or some flavor of Linux?). Maybe together we can write the instructions for building from the latest sources on Linux
First of all you what the latest files from SVN. You will need to install an SVN client (instructions on the SourceForge page)
http://sourceforge.net/scm/?type=svn&group_id=109430
Once you have SVN set up use the follow command to checkout only the latest code.
svn co https://mscore.svn.sourceforge.net/svnroot/mscore/trunk mscore
Let me know if you get this far.
In reply to I am on Windows so I'll help by David Bolton
Yes, I've got Ubuntu and Vista. I'd assumed that Linux was the preferred development environment. If not, I can install under Vista.
I believe svn is installed by default on Ubunu. In any case, it's already on my box.
I had started an SVN checkout earlier today, but stopped because I'd locked it when I did a Ctrl+Z in the middle of a checkout. It seems to be better now. So it looks like I'm current.
I also installed QT Designer 3 and QT Creator.
In reply to Yes, I've got Ubuntu and by dcuny
See if the instructions for Mac OS can get you the rest of the way. When you get to the
make
commands leave out the portion that reads:-f MakeFile.osx
In reply to See if the instructions for by David Bolton
Hrm... This doesn't look promising. Since I was able to get a compile under the Ubuntu Compile instructions, that's a more promising route.
It looks like the Makefile is in ~/mscore/trunk, so I'll give that a try...
Ooops. There seems to be a problem:
...
[ 3%] Building CXX object awl/CMakeFiles/awl.dir/pitchlabel.cpp.o
[ 3%] Building CXX object awl/CMakeFiles/awl.dir/poslabel.cpp.o
[ 3%] Building CXX object awl/CMakeFiles/awl.dir/utils.cpp.o
[ 3%] Building CXX object awl/CMakeFiles/awl.dir/denomspinbox.cpp.o
Linking CXX static library libawl.a
make[3]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
[ 3%] Built target awl
make[2]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
make: *** [release] Error 2
That Error 2 isn't very informative. I wonder if sudo make would be better...
Nope, after make clean and another make, I get the same problem:
make[3]: *** [mscore/CMakeFiles/smf2xml.dir/event.cpp.o] Error 1
make[3]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
make[2]: *** [mscore/CMakeFiles/smf2xml.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 9%] Building CXX object fluid/CMakeFiles/fluid.dir/rev.cpp.o
[ 9%] Building CXX object fluid/CMakeFiles/fluid.dir/tuning.cpp.o
Linking CXX static library libfluid.a
make[3]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
[ 9%] Built target fluid
make[2]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/david/Desktop/mscore/trunk/build'
make: *** [release] Error 2
In reply to Hrm... This doesn't look by dcuny
I think you need to install the dependencies first: portaudio, JACK, and libsndfile. I'm not sure how this is done on Ubuntu, but it is steps number 7 and 8 in the Mac OS instructions.
It will be something like the first part of: http://www.musescore.org/en/node/319/revisions/1511/view (except there are more dependencies now).
In reply to Dependencies by David Bolton
Wich version of ubuntu are you using?
I setup a build environment for 8.04, one year ago or so. It was meant to cross compile windows and that's no more possible now. Also at least to more dependencies are needed since then. Jack and libsndfile.
See http://n2.nabble.com/Image-Instructions-to-compile-MScore-for-Linux-Win…
The image is no more available but the instructions is ok I think. If I have some time I will try to post an updated version of the instructions.
In reply to Wich version of ubuntu are by [DELETED] 5
I'm running Ubuntu 9.10. I'll see if I can get the code to compile with the supplied instructions, thanks!
In reply to Hrm... This doesn't look by dcuny
I miss the error in your log which happend earlier.
The current cmake script has a bug whith some file dependencies. Compiling on a multi-core machine failes when make is called with "-j2" option (which is default on this machines). Please go into the build directory and start "make" without any option. Hope this helps.
In reply to Missing Error by [DELETED] 3
I don't have a multi-core machine, so I don't think that's an issue. I used a plain make, with no additional options. (Well, I did a make clean to clean up after the failed compilation).
In reply to I didn't use any options with make by dcuny
When you post the log make sure you include a few lines before the one that says "Error 1". That way we can see what it failed on. You did this with the first log, but not with the second.
In reply to When you post the log make by David Bolton
Oh, I see. I figured Error 2 was indicating an error code, not an ordinal value. I'll include that next time, assuming that it doesn't scroll off out of the terminal's buffer.
It's probably be a few days before I have time to try compiling this again.
In reply to Error 1 by dcuny
Hi!
Please, could somebody tell wich packages are needed to compile in Ubuntu 9.10. This is my Cmake complain:
CMake Error at CMakeLists.txt:143 (message):
Fatal error: ALSA >= 1.0.0 required
But I'm sure I have ALSA 1.0.20 installed.
I promise I will update the section explaining how to compile in ubuntu, so that even unexperienced people like me are able to compile!
In reply to Compiling in Ubuntu 9.10 by alkayata
You need the developer package of the alsa library which contains the needed header files (libasound2-dev).
In reply to developer packages by [DELETED] 3
Hi again!
I installed libasound2-dev, libsndfile1-dev, portaudio19-dev, doxygen, g++ (I think that's all). I downloaded qt4.6 from nokia site.
Now it builds until 95%: it's almost a joke! And then:
CMakeFiles/mscore.dir/plugins.cpp.o: In function `MuseScore::pluginTriggered(int)':
./mscore/mscore/plugins.cpp:268: undefined reference to `QScriptEngineDebugger::QScriptEngineDebugger(QObject*)'
./mscore/mscore/plugins.cpp:269: undefined reference to `QScriptEngineDebugger::attachTo(QScriptEngine*)'
./mscore/mscore/plugins.cpp:271: undefined reference to `QScriptEngineDebugger::action(QScriptEngineDebugger::DebuggerAction) const'
collect2: ld returned 1 exit status
make[3]: *** [mscore/mscore] Error 1
make[2]: *** [mscore/CMakeFiles/mscore.dir/all] Error 2
Has somebody knows what I'm missing?
Thanks
In reply to Building in ubuntu 9.10 by alkayata
You build the current SVN? I had the same kind of errors on Mac and made an update for it at r2462
In reply to You build the current SVN? I by [DELETED] 5
I made the svn update, but the problem persists.
I do make debug, if that it's important. Besides the compiler (or the linker, I'm not sure) complains about an undefined reference to `QScriptEngineDebugger::QScriptEngineDebugger(QObject*)' and other thing related to that class.
I've found in Nokia documentation page for Qt 4.6 that this class and its members are in QtScriptTools module.
When I make nm libQtScriptTools.so | less I can find a lot of references to QScriptEngineDebugger in the symbols table (I don't know if I'm using the right words, I'm a musician).
It seems that symbols for QScriptEngineDebugger::QScriptEngineDebugger(QObject*), QScriptEngineDebugger::attachTo(QScriptEngine*) and QScriptEngineDebugger::action(QScriptEngineDebugger::DebuggerAction) const exist, which are the three elements about ld complains (I think its ld the one who is angry).
So I'm really confused, because at the begining of the make process I can read a very nice line wich says that qt libraries are found in the right place!
After searching in my system, I've found that there are three qscriptenginedebugger.h files. The first is in qt/include/Qt, second in qt/include/QScriptTools and third in qt/src/scripttools/debugging...
In reply to Compiling in Ubuntu 9.10 by alkayata
The documentation for compiling MuseScore on Mac mentions that you need the SDK rather than the framework only. Is this what you downloaded?
In reply to The documentation for by David Bolton
I downloaded the SDK LGPL version. It is this one wich has the very nice Qt Creator.
In reply to Compiling in Ubuntu 9.10 by alkayata
Apparently there is a problem with cmake and QT_USE_QTSCRIPTTOOLS handling
I have 3 setups
I could upgrade CMake on ubuntu, but Karmic does not have CMake 2.8 available (or you have to add a ppa ...).
The other way I found is to uncomment the following lines in CMakeLists.txt.
# Set QT_QTSCRIPT_LIBRARY (for cmake 2.4)
#FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript QtScript4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
#FIND_LIBRARY(QT_QTSCRIPT_LIBRARY_DEBUG NAMES QtScript QtScript_debug QtScriptd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTSCRIPT_TOOLS_LIBRARY_RELEASE NAMES QtScriptTools QtScriptTools4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
FIND_LIBRARY(QT_QTSCRIPT_TOOLS_LIBRARY_DEBUG NAMES QtScriptTools QtScriptTools_debug QtScriptToolsd4 PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
#_QT4_ADJUST_LIB_VARS(QTSCRIPT)
_QT4_ADJUST_LIB_VARS(QTSCRIPT_TOOLS)
If someone building on Linux with CMake 2.6.4, could confirm that it's needed to compile, I would commit this and enclose it in a IF LINUX or similar.
In reply to Solution? by [DELETED] 5
I am using cmake version 2.6-patch 4 without problems on Kubuntu 9.10.
In reply to I am using cmake version by [DELETED] 3
Finally it compiled! I can not believe it :)
Thanks lasconic!
Tomorrow I will update compiling instructions for 0.9.6 version under Ubuntu 9.10...
Ciao!
In reply to I am using cmake version by [DELETED] 3
@werner Will it hurt your build if I commit the uncommented lines in CMakeLists.txt ?
In reply to Commit? by [DELETED] 5
No, it does also work with the lines uncommented. The lines are an old hack to replace the functionality of the
set(QT_USE_QTSCRIPTTOOLS TRUE)
line which was not recognized in old cmake versions. Maybe the names have changed so that the lib is not included?
In reply to No, it does also work with by [DELETED] 3
Well, I don't know... The set(QT_USE_QTSCRIPTTOOLS TRUE) works ok on Windows and Kubuntu with Xmake 2.6.4.
But apparently, it does not work on Ubuntu 9.10 and MacOSX. THat's why I updated to Cmake 2.8 on Mac.
For the comfort of Ubuntu users I commited the uncommented lines in r2500