MuseScore 的编译
MuseScore Compile instructions (Windows - MinGW)
NB There a number of Windows installers on this page - make sure it is the Online Installer you are downloading. MuseScore is known to work with 5.4.
Run the installer and install Qt in C:\Qt
. You just need the Qt libraries for MinGW 4.9.1 and the MinGW 4.9.1 toolchain.
(optional) Add the following to your %PATH%
C:\Qt\Tools\mingw491_32\bin;C:\Qt\Tools\mingw491_32\lib
C:\Qt\5.4\mingw491_32\bin
C:\Qt\Tools\QtCreator\bin
CMake
Download the latest version of windows binaries for CMake. Choose the Windows (Win32 Installer) version. You need at least version 2.8.7. Versions up to 3.3.0 are known to work too. #建议用3.3.0
Install in the default location (probably C:\Program Files\CMake
or C:\Program Files (x86)\CMake
) and optionally put the bin
subdirectory in your PATH.
NSIS unicode is used to create the install package itself. It's not needed if you just want to develop.
doxygen is used to generate developer documentation from the source files. It is not needed to compile the program, but if you plan to develop the generated documentation can aid understanding the classes and class hierarchies.
Download the native windows doxygen installer from www.doxygen.org
Note: there have been reports that the cygwin doxygen package has issues generating MuseScore developer documentation, and so it is recommended to use the native windows doxygen instead.
Source Code
Get the source code from GitHub. If you need a Git client, you can try Git for Windows or the GitHub windows client.
git clone git://github.com/musescore/MuseScore.git #会用git的话,知道怎么弄,不懂Git的话,去学。推荐廖雪峰老师的git教程
If you plan to contribute to MuseScore, you can setup your own fork on GitHub and clone it instead. See the Git Workflow page.
Note: Directory names with spaces in them cause the build to fail; so avoid spaces in the name of your clone directory.
(optional but recommended) In your clone directory, copy the file build/git/hooks/post-checkout
to the directory .git/hooks
in order for mscore/revision.h
to be maintained automatically by git. See build/git/hooks/README
for details. Note that the .git directory is hidden.
The following two steps should not be necessary if using the default paths given above for Qt and MinGW.
Change build\mingw32.mingw.cmake
to suit your Qt and mingw install
set (CROSS C:/Qt/Tools/mingw491_32) set (CROSSQT C:/Qt/5.4/mingw491_32)
%PATH% summary
You must have the following in your %PATH%:
C:\Program Files\CMake\bin
(or wherever you installed CMake)C:\Qt\Tools\mingw491_32\bin;C:\Qt\Tools\mingw491_32\lib
(or wherever MinGW is installed for you)C:\Qt\5.4\mingw491_32\bin
(or wherever Qt is installed for you)- And if you want to launch QtCreator from the command line
C:\Qt\Tools\QtCreator\bin
NOTE: You can add path elements to cmd shells via Computer / System Properties / Advanced System Settings / Environment Variables. However, the make process can be sensitive to the rest of the contents of your %PATH% as well. If you encounter issues like mingw32-make immediately terminating with error code 0xc00000fd, then try stripping your path down to only the above elements, plus perhaps C:\Windows and C:\Windows\System32. You might consider running the build from a batch file that temporarily sets your %PATH% to just the required elements.
A good approach to doing so is to create the following batch file in the "C:\Qt" folder:
C:\Qt\qt.bat
echo Setting up a MinGW/Qt only environment...
echo -- Set QTDIR to C:\Qt\5.4\mingw491_32
set QTDIR=C:\Qt\5.4\mingw491_32
echo -- Set PATH to %QTDIR%\bin
set PATH=%QTDIR%\bin
echo -- Adding C:\Program Files (x86)\CMake\bin
set PATH=%PATH%;C:\Program Files (x86)\CMake\bin
echo -- Adding C:\Qt\Tools\mingw491_32\bin;C:\Qt\Tools\mingw491_32\lib to PATH
set PATH=%PATH%;C:\Qt\Tools\mingw491_32\bin;C:\Qt\Tools\mingw491_32\lib
echo -- Adding to C:\Qt\Tools\QtCreator\bin
set PATH=%PATH%;C:\Qt\Tools\QtCreator\bin
echo -- Adding %SystemRoot%\System32 to PATH
set PATH=%PATH%;%SystemRoot%\System32
echo -- QMAKESPEC set to win32-g++
set QMAKESPEC=win32-g++
cd %USERPROFILE%
echo -- Set MAKEFLAGS to -j %NUMBER_OF_PRCESSORS%
set MAKEFLAGS=-j %NUMBER_OF_PROCESSORS%
rem un-rem the following line to start Qt Creator immediately
rem using /low makes sure you can still work with the PC
rem -lastsession gets you back where you left
rem start /low qtcreator -lastsession
Dependencies #后面给的有压缩包和怎么放。
In addition to Qt, MuseScore depends on:
- portaudio to access Windows audio
- JACK to connect to JACK Server for MIDI and audio
- libsndfile for wav/ogg/flac output
- Ogg and Vorbis for support of ogg soundfonts
- LAME for support for MP3 (only the header files)
I choose to put most of these dependencies directly in the MinGW include path. It's ugly but convenient. Either follow the below instructions or install just Jack and Freetype and for the rest take Qt-additions.zip and unpack it into C:\.
libVorbis, libVorbisFile, libOgg
The latest source also requires libraries for Vorbis and Ogg.
- Get the library files for libVorbis and libOgg from: http://www.xiph.org/downloads
- Copy the directories:
include\vorbis
andinclude\ogg
intoC:\Qt\Tools\mingw491_32\i686-w64-mingw32\include
(Copy the entire directory so that you end up withC:\Qt\Tools\mingw491_32\i686-w64-mingw32\include\vorbis
andC:\Qt\Tools\mingw491_32\i686-w64-mingw32\include\ogg
) - Get the Vorbis Tools and copy
libogg.dll
,libvorbis.dll
andlibvorbisfile.dll
inC:\Qt\Tools\mingw491_32\lib
(You need to decompress the .7z file using 7 Zip)
Portaudio
- Get
portaudio.dll
from a previous MuseScore install (bin
directory) and copy toC:\Qt\Tools\mingw491_32\lib
- Get
portaudio.h
from the current version at http://www.portaudio.com/download.html and copy toC:\Qt\Tools\mingw491_32\i686-w64-mingw32\include
. You need to decompress the .tar.gz file using 7 Zip, as before.
JACK #这一个是最麻烦的,一直下不下来,也许是我网络的问题,最好好麻烦的下下来了。
- Download the Windows installer for JACK from http://jackaudio.org/downloads
- Install
- The build process assumes you installed in a directory
Jack
in your program files directory. The name of the program files directory can vary depending on the version and language of Windows. The environment variable%ProgramFiles%
or%ProgramFiles(x86)%
is used to find the directory. On an English version of Windows this will result in looking inC:\Program Files\Jack
or inC:\Program Files (x86)\Jack
on a Windows 64-bit
libsndfile
- Windows binary available, choose Win32 http://www.mega-nerd.com/libsndfile
- Install and go to the installation directory. The installation process is required to be run in administration mode.
- Copy
include\sndfile.h
intoC:\Qt\Tools\mingw491_32\i686-w64-mingw32\include
- Copy
bin/libsndfile-1.dll
intoC:\Qt\Tools\mingw491_32\lib
LAME
- Download the current source files for LAME: http://lame.sourceforge.net/download.php
- You need to decompress the .tar.gz file using 7 Zip, as before
- Create a new folder in the
C:\Qt\Tools\mingw491_32\i686-w64-mingw32\include
directory calledlame
- Copy
include\lame.h
intoC:\Qt\Tools\mingw491_32\i686-w64-mingw32\include\lame
If you wish to use the QtCreator IDE, follow the instructions in section "Qt Creator IDE", below.
Open a command line, possibly using a batch file such as qt.bat
given above.
Browse to the directory where you checked out musescore
Enter
mingw32-make -f Makefile.mingw release
or
mingw32-make -f Makefile.mingw debug
Note that the two options internally set different flags for the compiler. In debug mode the QT_DEBUG flag is used, so conditional code controlled by #ifdef QT_DEBUG is compiled. In release mode NDEBUG is set. Unless you are building a release, it is suggested that you use the "debug" option, like in the section on the Qt Creator IDE (below).
Be patient ... On my Vista laptop (Intel T7550) it takes more than one hour to build. Build times on Windows can be more than twice as long as build times on Ubuntu (using the same computer). Once the compilation finishes, the MuseScore executable can be found in build.release/mscore/MuseScore.exe
or build.debug/mscore/MuseScore.exe
. So long as C:\Qt\Tools\mingw48_32\lib
is in the PATH, it should not be necessary to copy any DLLs. However, it has been found necessary to copy the complete directories iconengines
and imageformats
from %QTDIR%\plugins
to the build.release/mscore
or build.debug/mscore
directory (resulting in, for example, build.debug/mscore/iconengines
. This should be sufficient for most development work.
Note: You may need to go into the preferences, and fix the paths to have Windows-style slash characters (backslash), or you may see error messages about not being able to open files. [Is this a bug?]
If you need the language files, instrument list, templates, and the normal directory structure of a installed version of MuseScore then type:
mingw32-make -f Makefile.mingw install
or, for a debug build:
mingw32-make -f Makefile.mingw installdebug
Once install has finished look in the current directory for win32install/bin/MuseScore.exe. In this case there is no need to copy DLLs or the plugins directories, as they are already copied during the make process.
If you need developer documentation for MuseScore then after compiling, type:
cd build.release mingw32-make doxy
The generated documentation can be viewed by opening win32build/Doc/html/index.html in a browser.
Qt Creator IDE #这个是重点,因为我用的就是这个IDE
Once you setup everything above, you can open Qt Creator, either by typing start qtcreator
from within a command prompt started as above, or by creating a separate batch file with start qtcreator
as the last command.
Go to File => Open File or Project....
Choose CmakeLists.txt file type and open the file CmakeLists.txt
from your source directory.
Now it will take you through a pathwizard:
- Build Location:
For the first Cmake run, it will offer a build directory such asMuseScore-build
, ifMuseScore
is your checkout directory. Change this to choose a build directory ofMuseScore/build.qtc
instead.
Please make sure the name of your build directory does not contain spaces. - Choose CMake Executable:
Browse to where you installed CMake (i.e. C:\Program Files (x86)\CMake\bin) - Run CMake:
Then input the following arguments for CMake:
-DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_TOOLCHAIN_FILE=build/mingw32.mingw.cmake -DCMAKE_INSTALL_PREFIX=../win32install
C:\Qt\Tools\mingw491_32\lib
in the PATH, so no further setting of environment variables should be required.[ignore]
lrelease
target.
install
under Targets.
%{sourceDir}\win32install\bin\MuseScore.exe
.
To compile the debug build and start debugging go to Debug => Start debugging => Start debugging or simply click the debug icon. You have access to Qt help, completion, and debugging features!
MuseScore 的编译相关推荐
- musescore windows 上面编译
musescore windows 上面编译: github 地址: https://github.com/musescore/MuseScore.git 我这边下载的是MuseScore-3.6.2 ...
- 记一次,编译MuseScore的经历
MuseScore是一款开源的乐谱编辑软件,很是好用,界面美观.自己在尝试在windows平台编译这个软件过程中,遇到的问题记录如下: 1.MuseScore选的是2.1版本的源码,qt 5.4 + ...
- musescore 4.0编译
musescore 4.0 的模块化设计 明显 每一个文件下面大部份会形成一个.a的库 在这里插入图片描述 appsehll 模块 appsehll 看得出来是 appsehll 负责加载下面全部子模 ...
- MuseScore编译成 移动端的app 02
musecore 依赖 压缩库 zlib 移植 android 进入根目录 ./configure --prefix=/home/junjun/ --static –prefix=/home/junj ...
- MuseScore编译成 移动端的app 01
musecore 主要用qt 开发 系统架构图 音频系统图 qt 有ios 和android 两个移动端的移植能力 第一步肯定是解决构建的影响 先在pc 上面的系统上构建 window 上面最多外加一 ...
- musescore 构建入门
musescore : 1.QT上面开发 2. Qt由于版本更新, 更新到QT6了, 构建器由qmake 更换到cmake ,musescore 在QT是用cmake 构建桌面软件包, 3.底层依赖库 ...
- go build 编译报错 missing go.sum entry for module providing package
go build 编译报错 missing go.sum entry for module providing package 解决方法 // 移除未使用的依赖 go mod tidy 再次编译,就可 ...
- kotlin重写构造方法编译报错:Primary constructor call expected
在kotlin中使用construct关键字定义构造方法,如果类定义时已经有构造方法(类名后带括号),需要添加构造方法时,需要使用以下写法: class User(var name,var age){ ...
- Myeclipse中项目没有代码错误提示,jsp页面无编译迹象?如何解决
在使用Myeclipse开发项目时,发现jsp页面中嵌入的java代码没有编译的迹象,错误的get方法没有报错,没有报错信息我们如何知道我们开发的内容是正确的呢? 接下来就演示一下如何解决
最新文章
- 初创公司MongoDB最佳实践策略和躲坑秘笈
- 推荐算法炼丹笔记:阿里序列化推荐算法ComiRec
- 实现微信朋友圈动态列表
- fastJson null字符串转空 null数字转0
- SpringMVC入门(一)之HelloWorld(IDEA版)
- git代码库迁移保留commit历史_svn 迁移到 git 仓库并保留 commit 历史记录
- [Java] 蓝桥杯ALGO-39 算法训练 数组排序去重
- Effective_STL 学习笔记(二)小心对 “容器无关代码” 的幻想
- HTML之文本相关标签
- 间接寻址级别不同_「计算机组成原理」:常见的指令寻址方式
- 数据协作如何解决大数据的大问题
- 浅谈WebService的版本兼容性设计
- linux信号灯超时时间已到,急!!信号灯超时时间已到错误又出来了!!!!
- TCP/IP协议学习总结
- 一文将 DCDC 的 Layout 讲的明明白白,收藏这篇就够了
- 专升本英语作文信件类必背范文十篇
- iOS开发-plist文件的常用操作
- 单一窗口关区备案_【亚东关务】单一窗口集中申报来了,集报备案、集报清单详细操作手册...
- 系统架构——掌握和使用UML包图模型
- 硬件工程师综合训练 旋转图形设计
热门文章
- AudioTrack: releaseBuffer() track 0xe5c6bc00 disabled due to previous underrun, restarting
- 5大自动化测试的 Python 框架
- C++字节对齐(地址对齐)
- 开启学习高效率模式——iPhone专注模式怎么设置
- python 代理ip
- office2010安装出错怎么办
- sql 按姓氏笔画(拼音)排序
- oracle 算列总数,Oracle认证:Oracle统计符合条件列总数
- oracle linux unbreakable linux 6.1迅雷离线高速下载
- 你招聘设计师时都问哪些问题?你是怎么招聘设计师大牛的?