diff options
author | RJ Skerry-Ryan <rryan@mixxx.org> | 2018-05-09 03:37:51 -0700 |
---|---|---|
committer | RJ Skerry-Ryan <rryan@mixxx.org> | 2018-05-20 18:53:46 -0700 |
commit | f665ab1e4fdd3b7c3e1a7265fc4fd2207de5a76c (patch) | |
tree | 61c362672b2752822ab24c8603a36d62389b5337 | |
parent | 65fee00aec8a149116b9b87105b7c07e6a1a41b0 (diff) |
Enable Qt5 build on Windows.
-rw-r--r-- | appveyor.yml | 2 | ||||
-rw-r--r-- | build/appveyor/build_mixxx.bat | 5 | ||||
-rw-r--r-- | build/depends.py | 68 | ||||
-rw-r--r-- | build/qt5.py | 6 | ||||
-rw-r--r-- | build/windows/golden_environment | 2 | ||||
-rw-r--r-- | src/mixxxapplication.cpp | 17 |
6 files changed, 86 insertions, 14 deletions
diff --git a/appveyor.yml b/appveyor.yml index 9f8934646e..a390855e12 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -22,7 +22,7 @@ configuration: # - release # - debug environment: - ENVIRONMENTS_URL: https://downloads.mixxx.org/builds/buildserver/2.1.x-windows/ + ENVIRONMENTS_URL: https://downloads.mixxx.org/builds/buildserver/2.2.x-windows/ ENVIRONMENTS_PATH: C:\mixxx-buildserver matrix: - platform: x64 diff --git a/build/appveyor/build_mixxx.bat b/build/appveyor/build_mixxx.bat index ae5b79db76..1ef7887762 100644 --- a/build/appveyor/build_mixxx.bat +++ b/build/appveyor/build_mixxx.bat @@ -89,7 +89,7 @@ set WINLIB_DIR=%3 SET BIN_DIR=%WINLIB_DIR%\bin SET LIB_DIR=%WINLIB_DIR%\lib SET INCLUDE_DIR=%WINLIB_DIR%\include -set QT_VERSION=4.8.7 +set QT_VERSION=5.10.1 SET QTDIR=%WINLIB_DIR%\Qt-%QT_VERSION% if NOT EXIST "%BIN_DIR%\scons.py" ( @@ -140,8 +140,7 @@ set CXXFLAGS=/MP /FS /EHsc /Zc:threadSafeInit- set CFLAGS=/MP /FS /EHsc /Zc:threadSafeInit- set PATH=%BIN_DIR%;%PATH% -REM TODO(rryan): Windows is stuck on Qt4 until mixxxdj/buildserver#36 is fixed. -scons.py mixxx makerelease qt5=0 toolchain=msvs winlib=%WINLIB_DIR% build=%BUILD_TYPE% staticlibs=1 staticqt=1 debug_assertions_fatal=1 verbose=0 machine=%MACHINE_TYPE% qtdir=%QTDIR% hss1394=1 mediafoundation=1 opus=1 localecompare=1 optimize=fastbuild virtualize=0 test=1 qt_sqlite_plugin=0 mssdk_dir="%MSSDK_DIR%" build_number_in_title_bar=0 bundle_pdbs=1 +scons.py mixxx makerelease toolchain=msvs winlib=%WINLIB_DIR% build=%BUILD_TYPE% staticlibs=1 staticqt=1 debug_assertions_fatal=1 verbose=0 machine=%MACHINE_TYPE% qtdir=%QTDIR% hss1394=1 mediafoundation=1 opus=1 localecompare=1 optimize=fastbuild virtualize=0 test=1 qt_sqlite_plugin=0 mssdk_dir="%MSSDK_DIR%" build_number_in_title_bar=0 bundle_pdbs=1 IF ERRORLEVEL 1 ( echo ============================== diff --git a/build/depends.py b/build/depends.py index c7814ba179..c3b3e695aa 100644 --- a/build/depends.py +++ b/build/depends.py @@ -233,12 +233,32 @@ class Qt(Dependence): def enabled_modules(build): qt5 = Qt.qt5_enabled(build) qt_modules = [ - 'QtCore', 'QtGui', 'QtOpenGL', 'QtXml', 'QtSvg', - 'QtSql', 'QtScript', 'QtNetwork', - 'QtTest', 'QtScriptTools' + # Keep alphabetized. + 'QtCore', + 'QtGui', + 'QtNetwork', + 'QtOpenGL', + 'QtScript', + 'QtScriptTools', + 'QtSql', + 'QtSvg', + 'QtTest', + 'QtXml', ] if qt5: - qt_modules.extend(['QtWidgets', 'QtConcurrent']) + qt_modules.extend([ + # Keep alphabetized. + 'QtConcurrent', + 'QtWidgets', + ]) + if build.platform_is_windows: + qt_modules.extend([ + # Keep alphabetized. + 'QtAccessibilitySupport', + 'QtEventDispatcherSupport', + 'QtFontDatabaseSupport', + 'QtThemeSupport', + ]) return qt_modules @staticmethod @@ -391,6 +411,22 @@ class Qt(Dependence): # QtNetwork openssl-linked build.env.Append(LIBS = 'crypt32') + # New libraries required by Qt5. + if qt5: + build.env.Append(LIBS = 'dwmapi') # qtwindows + build.env.Append(LIBS = 'iphlpapi') # qt5network + build.env.Append(LIBS = 'libEGL') # qt5opengl + build.env.Append(LIBS = 'libGLESv2') # qt5opengl + build.env.Append(LIBS = 'netapi32') # qt5core + build.env.Append(LIBS = 'userenv') # qt5core + build.env.Append(LIBS = 'uxtheme') # ? + build.env.Append(LIBS = 'version') # ? + + build.env.Append(LIBS = 'qtfreetype') + build.env.Append(LIBS = 'qtharfbuzz') + build.env.Append(LIBS = 'qtlibpng') + build.env.Append(LIBS = 'qtpcre2') + # NOTE(rryan): If you are adding a plugin here, you must also # update src/mixxxapplication.cpp to define a Q_IMPORT_PLUGIN # for it. Not all imageformats plugins are built as .libs when @@ -409,11 +445,27 @@ class Qt(Dependence): build.env.Append(LIBS = 'qico') build.env.Append(LIBS = 'qsvg') build.env.Append(LIBS = 'qtga') + build.env.Append(LIBS = 'qgif') + build.env.Append(LIBS = 'qjpeg') + + # accessibility plugins (gone in Qt5) + if not qt5: + build.env.Append(LIBPATH=[ + os.path.join(build.env['QTDIR'],'plugins/accessible')]) + build.env.Append(LIBS = 'qtaccessiblewidgets') + + # platform plugins (new in Qt5 for Windows) + if qt5: + build.env.Append(LIBPATH=[ + os.path.join(build.env['QTDIR'],'plugins/platforms')]) + build.env.Append(LIBS = 'qwindows') + + # sqldrivers (new in Qt5? or did we just start enabling them) + if qt5: + build.env.Append(LIBPATH=[ + os.path.join(build.env['QTDIR'],'plugins/sqldrivers')]) + build.env.Append(LIBS = 'qsqlite') - # accessibility plugins - build.env.Append(LIBPATH=[ - os.path.join(build.env['QTDIR'],'plugins/accessible')]) - build.env.Append(LIBS = 'qtaccessiblewidgets') # Set the rpath for linux/bsd/osx. diff --git a/build/qt5.py b/build/qt5.py index 674abef60a..c080e3243f 100644 --- a/build/qt5.py +++ b/build/qt5.py @@ -881,14 +881,18 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, staticdeps= 'QtWebKitWidgets', 'QtWidgets', # Qt Add-Ons + 'QtAccessibilitySupport', 'QtConcurrent', 'QtDBus', + 'QtEventDispatcherSupport', + 'QtFontDatabaseSupport', 'QtOpenGL', 'QtPrintSupport', 'QtDeclarative', 'QtScript', 'QtScriptTools', 'QtSvg', + 'QtThemeSupport', 'QtUiTools', 'QtXml', 'QtXmlPatterns', @@ -967,7 +971,7 @@ def enable_modules(self, modules, debug=False, crosscompiling=False, staticdeps= modules.append("QtAssistantClient") self.AppendUnique(LIBS=['qtmain'+debugSuffix]) self.AppendUnique(LIBS=[lib.replace("Qt","Qt5")+debugSuffix for lib in modules if lib not in staticModules]) - self.PrependUnique(LIBS=[lib+debugSuffix for lib in modules if lib in staticModules]) + self.PrependUnique(LIBS=[lib.replace("Qt", "Qt5")+debugSuffix for lib in modules if lib in staticModules]) if 'QtOpenGL' in modules: self.AppendUnique(LIBS=['opengl32']) self.AppendUnique(CPPPATH=[ '$QT5DIR/include/']) diff --git a/build/windows/golden_environment b/build/windows/golden_environment index 64fb3bc643..8b8ca3243d 100644 --- a/build/windows/golden_environment +++ b/build/windows/golden_environment @@ -1 +1 @@ -2.1-j00023-PLATFORM-CONFIGURATION-static-1b6c054-minimal
\ No newline at end of file +2.2-j00009-PLATFORM-CONFIGURATION-static-ed0283e-minimal
\ No newline at end of file diff --git a/src/mixxxapplication.cpp b/src/mixxxapplication.cpp index f6a2281f3a..c2d1c83ffa 100644 --- a/src/mixxxapplication.cpp +++ b/src/mixxxapplication.cpp @@ -11,6 +11,22 @@ // plugins we link in build/depends.py. #ifdef QT_NODLL #include <QtPlugin> +#if QT_VERSION >= 0x050000 +// sqldrivers plugins +Q_IMPORT_PLUGIN(QSQLiteDriverPlugin) +// platform plugins +Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin) +// imageformats plugins +Q_IMPORT_PLUGIN(QSvgPlugin) +Q_IMPORT_PLUGIN(QSvgIconPlugin) +Q_IMPORT_PLUGIN(QICOPlugin) +Q_IMPORT_PLUGIN(QTgaPlugin) +Q_IMPORT_PLUGIN(QJpegPlugin) +Q_IMPORT_PLUGIN(QGifPlugin) +// accessible plugins +// TODO(rryan): This is supposed to exist but does not in our builds. +//Q_IMPORT_PLUGIN(AccessibleFactory) +#else // iconengines plugins Q_IMPORT_PLUGIN(qsvgicon) // imageformats plugins @@ -20,6 +36,7 @@ Q_IMPORT_PLUGIN(qtga) // accessible plugins Q_IMPORT_PLUGIN(qtaccessiblewidgets) #endif +#endif MixxxApplication::MixxxApplication(int& argc, char** argv) |