Skip to content

Commit

Permalink
* Add support for Windows to presets for Qt (issue #862)
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed May 30, 2020
1 parent 310e5b7 commit 6ba1a22
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ environment:
OS: windows-x86_64
- PROJ: "liquidfun"
OS: windows-x86_64
- PROJ: "qt"
OS: windows-x86_64
- PROJ: "cpu_features,systems"
OS: windows-x86_64

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Add support for Windows to presets for Qt ([issue #862](https://github.com/bytedeco/javacpp-presets/issues/862))
* Fix JPMS modules for CUDA, ARPACK-NG, GSL, SciPy, Gym, MXNet ([pull #880](https://github.com/bytedeco/javacpp-presets/pull/880) and [pull #881](https://github.com/bytedeco/javacpp-presets/pull/881))
* Build OpenBLAS with a `TARGET` even for `DYNAMIC_ARCH` to avoid SIGILL ([issue eclipse/deeplearning4j#8747](https://github.com/eclipse/deeplearning4j/issues/8747))
* Upgrade presets for FFmpeg 4.2.3, Arrow 0.17.1, Hyperscan 5.3.0, MKL-DNN 0.21.5, DNNL 1.4, NumPy 1.18.4, Gym 0.17.2, TensorFlow 1.15.3, ONNX 1.7.0 ([pull #882](https://github.com/bytedeco/javacpp-presets/pull/882)), ONNX Runtime 1.3.0 ([pull #887](https://github.com/bytedeco/javacpp-presets/pull/887)), Qt 5.15.0, Skia 1.68.3, and their dependencies
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,7 @@
<module>ale</module>
<module>onnxruntime</module>
<module>liquidfun</module>
<module>qt</module>
<module>cpu_features</module>
<module>systems</module>
</modules>
Expand Down
12 changes: 9 additions & 3 deletions qt/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,25 @@ sedinplace '/backtrace_from_fp/d' qtbase/src/corelib/kernel/qcore_mac.mm
sedinplace 's/(__builtin_available(.*)/(0)/g' qtbase/src/corelib/kernel/qcore_mac.mm
sedinplace 's/kIOSurfaceSuccess/KERN_SUCCESS/g' qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm

QT_OPTIONS="-prefix .. -qt-zlib -qt-libjpeg -qt-libpng -qt-pcre -qt-harfbuzz -opensource -confirm-license -nomake examples -nomake tests -nomake tools -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip websockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-icu -no-framework -release -silent"
QT_OPTIONS="-qt-zlib -qt-libjpeg -qt-libpng -qt-pcre -qt-harfbuzz -opensource -confirm-license -nomake examples -nomake tests -nomake tools -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdeclarative -skip qtdoc -skip qtgamepad -skip qtgraphicaleffects -skip qtimageformats -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtquickcontrols -skip qtquickcontrols2 -skip qtremoteobjects -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qtsvg -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebglplugin -skip websockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns -no-icu -no-framework -release -silent"

case $PLATFORM in
linux-x86_64)
./configure $QT_OPTIONS -xcb
./configure -prefix .. $QT_OPTIONS -xcb
make -j $MAKEJ
make install
;;
macosx-*)
./configure $QT_OPTIONS
./configure -prefix .. $QT_OPTIONS
make -j $MAKEJ
make install
;;
windows-x86_64)
# Qt can only be built from very short paths on Windows
PLATFORM= cmd.exe //c "mklink /j c:\\qt ."
PLATFORM= cmd.exe //c "cd c:\\qt & configure.bat -prefix $(cygpath -w $INSTALL_PATH) $QT_OPTIONS & nmake & nmake install"
PLATFORM= cmd.exe //c "rmdir c:\\qt"
;;
*)
echo "Error: Platform \"$PLATFORM\" is not supported"
;;
Expand Down
9 changes: 8 additions & 1 deletion qt/platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
<version>${project.version}</version>
<classifier>${javacpp.platform.macosx-x86_64}</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>${javacpp.moduleId}</artifactId>
<version>${project.version}</version>
<classifier>${javacpp.platform.windows-x86_64}</classifier>
</dependency>
</dependencies>

<build>
Expand All @@ -54,7 +60,7 @@
<configuration>
<archive>
<manifestEntries>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-x86_64.jar</Class-Path>
<Class-Path>${javacpp.moduleId}.jar ${javacpp.moduleId}-linux-x86_64.jar ${javacpp.moduleId}-macosx-x86_64.jar ${javacpp.moduleId}-windows-x86_64.jar</Class-Path>
</manifestEntries>
</archive>
</configuration>
Expand Down Expand Up @@ -101,6 +107,7 @@
module org.bytedeco.${javacpp.moduleId}.platform {
requires org.bytedeco.${javacpp.moduleId}.linux.x86_64;
requires org.bytedeco.${javacpp.moduleId}.macosx.x86_64;
requires org.bytedeco.${javacpp.moduleId}.windows.x86_64;
}
</moduleInfoSource>
</module>
Expand Down
3 changes: 2 additions & 1 deletion qt/src/main/java/org/bytedeco/qt/presets/Qt5Gui.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@
link = "Qt5Gui@.5",
preload = {"Qt5DBus@.5", "Qt5Gui@.5", "Qt5XcbQpa@.5", "Qt5Widgets@.5", "Qt5PrintSupport@.5",
"qmacstyle", "qcocoa", "cocoaprintersupport", "qgtk3", "qxdgdesktopportal",
"qxcb", "qlinuxfb", "qminimalegl", "qminimal", "qoffscreen",
"qxcb", "qlinuxfb", "qminimalegl", "qminimal", "qoffscreen", // "qtuiotouchplugin",
"composeplatforminputcontextplugin", "ibusplatforminputcontextplugin",
"qxcb-egl-integration", "qxcb-glx-integration", "qgif", "qico", "qjpeg",
"qdirect2d", "qwindows", "qwindowsvistastyle", "windowsprintersupport", // "qgenericbearer",
"qevdevkeyboardplugin", "qevdevmouseplugin", "qevdevtabletplugin", "qevdevtouchplugin"}
)
}
Expand Down

0 comments on commit 6ba1a22

Please sign in to comment.