Skip to content

Commit

Permalink
update build for Qt5 on Windows mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed May 14, 2013
1 parent 2c10012 commit 0cdad25
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 41 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ if (APPLE)
set(CMAKE_CXX_FLAGS_DEBUG "-std=c++0x -fPIC -stdlib=libc++ -g")
set(CMAKE_CXX_FLAGS_RELEASE "-std=c++0x -fPIC -stdlib=libc++ -O2 -DNDEBUG")
else (APPLE)
set(CMAKE_CXX_FLAGS_DEBUG "-std=gnu++0x -fPIC -fPIE -g")
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++0x -fPIC -O2 -DNDEBUG")
if (MINGW)
set(CMAKE_CXX_FLAGS_DEBUG "-std=gnu++0x -fPIE -g")
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++0x -O2 -DNDEBUG")
else (MINGW)
set(CMAKE_CXX_FLAGS_DEBUG "-std=gnu++0x -fPIC -fPIE -g")
set(CMAKE_CXX_FLAGS_RELEASE "-std=gnu++0x -fPIC -O2 -DNDEBUG")
endif (MINGW)
endif(APPLE)

set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
Expand Down
1 change: 1 addition & 0 deletions aeolus/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ int Model::read_instr ()
Ifelm *I;
Addsynth *A;

#undef ERROR
enum { CONT, DONE, ERROR, COMM, ARGS, MORE, NO_INSTR, IN_INSTR,
BAD_SCOPE, BAD_ASECT, BAD_RANK, BAD_DIVIS, BAD_KEYBD, BAD_IFACE,
BAD_STR1, BAD_STR2 };
Expand Down
26 changes: 16 additions & 10 deletions build/mingw32.mingw.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

set (CMAKE_SYSTEM_NAME "Windows")

set (CROSS C:/MinGW)
set (CROSSQT C:/Qt/4.8.4)
set (CROSS C:/Qt/Qt5.0.2/Tools/MinGW)
set (CROSSQT C:/Qt/Qt5.0.2/5.0.2/mingw47_32)

set (CMAKE_C_COMPILER ${CROSS}/bin/gcc.exe)
set (CMAKE_CXX_COMPILER ${CROSS}/bin/g++.exe)
Expand All @@ -26,6 +26,8 @@ set (QT_LIBRARY_DIR ${CROSSQT}/lib)

set (QT_MOC_EXECUTABLE "${CROSSQT}/bin/moc.exe")
set (QT_UIC_EXECUTABLE "${CROSSQT}/bin/uic.exe")
set (QT_LRELEASE_EXECUTABLE "${CROSSQT}/bin/lrelease.exe")
set (QT_LUPDATE_EXECUTABLE "${CROSSQT}/bin/lupdate.exe")
set (QT_RCC_EXECUTABLE "${CROSSQT}/bin/rcc")
set (QT_QTCORE_LIBRARY "mops")

Expand All @@ -39,14 +41,18 @@ set (QT_INCLUDES ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR}
${QT_QTXMLPATTERNS_INCLUDE_DIR}
)
set (QT_mingw_LIBRARIES
QtSvg4
QtGui4
QtCore4
QtXml4
QtNetwork4
QtWebKit4
QtXmlPatterns4
QtDeclarative4
Qt5Svg
Qt5Gui
Qt5Core
Qt5Widgets
Qt5Xml
Qt5Network
Qt5WebKitWidgets
Qt5WebKit
Qt5V8
Qt5XmlPatterns
Qt5Declarative
Qt5PrintSupport
)

# Qt3Support4
Expand Down
37 changes: 20 additions & 17 deletions mscore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ add_executable ( ${ExecutableName}
driver.h
)

qt5_use_modules(${ExecutableName} Gui Widgets Network)
#qt5_use_modules(${ExecutableName} Gui Widgets Network)

target_link_libraries(mscore
libmscore
Expand Down Expand Up @@ -312,26 +312,29 @@ if (MINGW)
${CROSS}/lib/libogg.dll
${CROSS}/lib/libvorbis.dll
${CROSS}/lib/libvorbisfile.dll
${CROSSQT}/bin/QtCore4.dll
${CROSSQT}/bin/QtGui4.dll
${CROSSQT}/bin/QtXml4.dll
${CROSSQT}/bin/QtSvg4.dll
${CROSSQT}/bin/QtNetwork4.dll
${CROSSQT}/bin/QtWebKit4.dll
${CROSSQT}/bin/phonon4.dll
${CROSSQT}/bin/QtXmlPatterns4.dll
${CROSSQT}/bin/QtDeclarative4.dll
${CROSSQT}/bin/QtScript4.dll
${CROSSQT}/bin/QtSql4.dll
${CROSSQT}/bin/Qt5Core.dll
${CROSSQT}/bin/Qt5Widgets.dll
${CROSSQT}/bin/Qt5Gui.dll
${CROSSQT}/bin/Qt5Xml.dll
${CROSSQT}/bin/Qt5Svg.dll
${CROSSQT}/bin/Qt5Network.dll
${CROSSQT}/bin/Qt5WebKit.dll
${CROSSQT}/bin/Qt5WebKitWidgets.dll
${CROSSQT}/bin/Qt5XmlPatterns.dll
${CROSSQT}/bin/Qt5Declarative.dll
${CROSSQT}/bin/Qt5Script.dll
${CROSSQT}/bin/Qt5Sql.dll
${CROSSQT}/bin/Qt5V8.dll
${CROSSQT}/bin/Qt5PrintSupport.dll
)
install_files ( /bin/iconengines .dll
${CROSSQT}/plugins/iconengines/qsvgicon4.dll
${CROSSQT}/plugins/iconengines/qsvgicon.dll
)
install_files ( /bin/imageformats .dll
${CROSSQT}/plugins/imageformats/qjpeg4.dll
${CROSSQT}/plugins/imageformats/qmng4.dll
${CROSSQT}/plugins/imageformats/qsvg4.dll
${CROSSQT}/plugins/imageformats/qtiff4.dll
${CROSSQT}/plugins/imageformats/qjpeg.dll
${CROSSQT}/plugins/imageformats/qmng.dll
${CROSSQT}/plugins/imageformats/qsvg.dll
${CROSSQT}/plugins/imageformats/qtiff.dll
)

else (MINGW)
Expand Down
18 changes: 9 additions & 9 deletions mscore/importove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1419,23 +1419,23 @@ void OveToMScore::convertNotes(Measure* measure, int part, int staff, int track)
if (cr == 0) {
// Segment::SegmentType st = Segment::SegChordRest;

cr = new Chord(score_);
cr = new Ms::Chord(score_);
cr->setTrack(noteTrack);

// grace
if (container->getIsGrace()) {
TDuration duration = OveNoteType_To_Duration(container->getGraceNoteType());
duration.setDots(container->getDot());
((Chord*) cr)->setNoteType(NOTE_APPOGGIATURA);
((Ms::Chord*) cr)->setNoteType(NOTE_APPOGGIATURA);

if (duration.type() == TDuration::V_QUARTER) {
((Chord*) cr)->setNoteType(NOTE_GRACE4);
((Ms::Chord*) cr)->setNoteType(NOTE_GRACE4);
cr->setDurationType(TDuration::V_QUARTER);
} else if (duration.type() == TDuration::V_16TH) {
((Chord*) cr)->setNoteType(NOTE_GRACE16);
((Ms::Chord*) cr)->setNoteType(NOTE_GRACE16);
cr->setDurationType(TDuration::V_16TH);
} else if (duration.type() == TDuration::V_32ND) {
((Chord*) cr)->setNoteType(NOTE_GRACE32);
((Ms::Chord*) cr)->setNoteType(NOTE_GRACE32);
cr->setDurationType(TDuration::V_32ND);
} else {
cr->setDurationType(TDuration::V_EIGHT);
Expand Down Expand Up @@ -1480,7 +1480,7 @@ void OveToMScore::convertNotes(Measure* measure, int part, int staff, int track)
int line = drumset->line(pitch);
note->setLine(line);
note->setTpcFromPitch();
((Chord*) cr)->setStemDirection(drumset->stemDirection(pitch));
((Ms::Chord*) cr)->setStemDirection(drumset->stemDirection(pitch));
setDirection = true;
}
}
Expand Down Expand Up @@ -1510,9 +1510,9 @@ void OveToMScore::convertNotes(Measure* measure, int part, int staff, int track)
cr->add(note);

cr->setVisible(oveNote->getShow());
((Chord*) cr)->setNoStem((int) container->getNoteType() <= OVE::Note_Whole);
((Ms::Chord*) cr)->setNoStem((int) container->getNoteType() <= OVE::Note_Whole);
if(!setDirection)
((Chord*) cr)->setStemDirection(container->getStemUp() ? MScore::UP : MScore::DOWN);
((Ms::Chord*) cr)->setStemDirection(container->getStemUp() ? MScore::UP : MScore::DOWN);

// cross staff
int staffMove = 0;
Expand Down Expand Up @@ -1806,7 +1806,7 @@ void OveToMScore::convertArticulation(
}
case OVE::Articulation_Arpeggio :{
// there can be only one
if (!(static_cast<Chord*>(cr))->arpeggio()) {
if (!(static_cast<Ms::Chord*>(cr))->arpeggio()) {
Arpeggio* a = new Arpeggio(score_);
a->setArpeggioType(ArpeggioType::NORMAL);
/* if (art->getPlacementAbove()){
Expand Down
4 changes: 2 additions & 2 deletions mstyle/frameshadow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void SunkenFrameShadow::updateGeometry() {
cr.setLeft(cr.right() - SHADOW_SIZE_RIGHT + 1);
cr.adjust(0, SHADOW_SIZE_TOP, 1, -SHADOW_SIZE_BOTTOM);
break;
case Unknown:
case UnknownArea:
default:
return;
}
Expand Down Expand Up @@ -459,7 +459,7 @@ void FlatFrameShadow::updateGeometry() {
cr.setTop(cr.bottom() - SHADOW_SIZE_BOTTOM + 4);
break;

case Unknown:
case UnknownArea:
default:
return;
}
Expand Down
2 changes: 1 addition & 1 deletion mstyle/frameshadow.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

//! shadow area
enum ShadowArea {
Unknown,
UnknownArea,
Left,
Top,
Right,
Expand Down
3 changes: 3 additions & 0 deletions thirdparty/diff/diff_match_patch.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
* Diff(Operation.EQUAL, " world.")}
* which means: delete "Hello", add "Goodbye" and keep " world."
*/
#undef DELETE
#undef INSERT
#undef EQUAL
enum Operation {
DELETE, INSERT, EQUAL
};
Expand Down

0 comments on commit 0cdad25

Please sign in to comment.