diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ef6cbf1..617579de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.5) project(monero-gui) message(STATUS "Initiating compile using CMake ${CMAKE_VERSION}") @@ -76,7 +76,7 @@ if(STATIC) message(STATUS "Initiating static build") set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_RUNTIME ON) - set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" ${CMAKE_FIND_LIBRARY_SUFFIXES}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ".a") add_definitions(-DMONERO_GUI_STATIC) endif() @@ -300,7 +300,6 @@ if(STATIC) list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects) list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtGraphicalEffects/private) list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtMultimedia) - list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQml) list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick.2) list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Controls) list(APPEND QT5_EXTRA_PATHS ${QT5_PKG_CONFIG_Qt5Qml_PREFIX}/qml/QtQuick/Controls.2) @@ -341,10 +340,6 @@ if(STATIC) windowplugin ) - if(NOT ${Qt5Core_VERSION} VERSION_LESS 5.14) - list(APPEND QT5_EXTRA_LIBRARIES_LIST qmlplugin) - endif() - set(QT5_EXTRA_LIBRARIES) foreach(LIBRARY ${QT5_EXTRA_LIBRARIES_LIST}) find_library(${LIBRARY}_LIBRARY ${LIBRARY} PATHS ${QT5_EXTRA_PATHS} REQUIRED) @@ -372,6 +367,7 @@ if(STATIC) if(UNIX AND NOT APPLE) list(APPEND QT5_INTEGRATION_LIBRARIES_LIST Qt5XcbQpa + xcb-static Qt5ServiceSupport Qt5GlxSupport ) @@ -413,7 +409,7 @@ message(STATUS "Using Boost libraries at ${Boost_LIBRARIES}") include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) if(MINGW) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wa,-mbig-obj") - set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt;winmm) + set(EXTRA_LIBRARIES mswsock;ws2_32;iphlpapi;crypt32;bcrypt) if(DEPENDS) set(ICU_LIBRARIES icuio icui18n icuuc icudata icutu iconv) else() diff --git a/Dockerfile.linux b/Dockerfile.linux index c4ccb96f..116966a7 100644 --- a/Dockerfile.linux +++ b/Dockerfile.linux @@ -1,7 +1,6 @@ FROM ubuntu:16.04 ARG THREADS=1 -ARG QT_VERSION=5.15.2 ENV CFLAGS="-fPIC" ENV CXXFLAGS="-fPIC" @@ -44,70 +43,6 @@ RUN apt install -y libpthread-stubs0-dev && \ make -j$THREADS install && \ rm -rf $(pwd) -RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-util && \ - cd libxcb-util && \ - git reset --hard acf790d7752f36e450d476ad79807d4012ec863b && \ - git submodule init && \ - git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \ - git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \ - ./autogen.sh --disable-shared --enable-static && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - -RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-image && \ - cd libxcb-image && \ - git reset --hard d882052fb2ce439c6483fce944ba8f16f7294639 && \ - git submodule init && \ - git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \ - git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \ - ./autogen.sh --disable-shared --enable-static && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - -RUN git clone -b 0.4.0 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms && \ - cd libxcb-keysyms && \ - git reset --hard 0e51ee5570a6a80bdf98770b975dfe8a57f4eeb1 && \ - git submodule init && \ - git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \ - git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \ - ./autogen.sh --disable-shared --enable-static && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - -RUN git clone -b 0.3.9 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-render-util && \ - cd libxcb-render-util && \ - git reset --hard 0317caf63de532fd7a0493ed6afa871a67253747 && \ - git submodule init && \ - git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \ - git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \ - ./autogen.sh --disable-shared --enable-static && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - -RUN git clone -b 0.4.1 --depth 1 https://gitlab.freedesktop.org/xorg/lib/libxcb-wm && \ - cd libxcb-wm && \ - git reset --hard 24eb17df2e1245885e72c9d4bbb0a0f69f0700f2 && \ - git submodule init && \ - git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/xcb-util-m4 m4 && \ - git -C m4 reset --hard f662e3a93ebdec3d1c9374382dcc070093a42fed && \ - ./autogen.sh --disable-shared --enable-static && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - -RUN apt install -y bison &&\ - git clone -b xkbcommon-0.5.0 --depth 1 https://github.com/xkbcommon/libxkbcommon && \ - cd libxkbcommon && \ - git reset --hard c43c3c866eb9d52cd8f61e75cbef1c30d07f3a28 && \ - ./autogen.sh --prefix=/usr --disable-shared --enable-static --enable-x11 --disable-docs && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - RUN git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib && \ cd zlib && \ git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f && \ @@ -171,28 +106,18 @@ RUN wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz && \ make -j$THREADS install && \ rm -rf $(pwd) -RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \ - git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \ - cd qt5 && \ - git clone git://code.qt.io/qt/qtbase.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtdeclarative.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtgraphicaleffects.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtimageformats.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtmultimedia.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtquickcontrols.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtquickcontrols2.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtsvg.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qttools.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qttranslations.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtx11extras.git -b ${QT_VERSION} --depth 1 && \ - git clone git://code.qt.io/qt/qtxmlpatterns.git -b ${QT_VERSION} --depth 1 && \ +RUN apt install -y libgl1-mesa-dev libglib2.0-dev libxkbcommon-dev && \ + wget https://download.qt.io/archive/qt/5.9/5.9.9/single/qt-everywhere-opensource-src-5.9.9.tar.xz && \ + echo "5ce285209290a157d7f42ec8eb22bf3f1d76f2e03a95fc0b99b553391be01642 qt-everywhere-opensource-src-5.9.9.tar.xz" | sha256sum -c && \ + tar -xf qt-everywhere-opensource-src-5.9.9.tar.xz && \ + rm qt-everywhere-opensource-src-5.9.9.tar.xz && \ + cd qt-everywhere-opensource-src-5.9.9 && \ sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \ sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \ sed -ri s/\(Libs:.*\)/\\1\ -lXau/ /usr/local/lib/pkgconfig/xcb.pc && \ - sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf && \ ./configure --prefix=/usr -platform linux-g++-64 -opensource -confirm-license -release -static -no-avx \ - -opengl desktop -qpa xcb -xcb -xcb-xlib -feature-xlib -system-freetype -fontconfig -glib \ - -no-dbus -no-feature-qml-worker-script -no-linuxfb -no-openssl -no-sql-sqlite -no-kms -no-use-gold-linker \ + -opengl desktop -qpa xcb -system-freetype -fontconfig -glib \ + -no-dbus -no-openssl -no-sql-sqlite -no-use-gold-linker \ -qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \ -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \ -skip qtdoc -skip qtgamepad -skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing \ @@ -280,12 +205,4 @@ RUN git clone -b v3.10.0 --depth 1 https://github.com/protocolbuffers/protobuf & make -j$THREADS install && \ rm -rf $(pwd) -RUN git clone -b v3.18.4 --depth 1 https://github.com/Kitware/CMake && \ - cd CMake && \ - git reset --hard 3cc3d42aba879fff5e85b363ae8f21386a3f9f9b && \ - ./bootstrap && \ - make -j$THREADS && \ - make -j$THREADS install && \ - rm -rf $(pwd) - -RUN apt install -y libusb-1.0-0-dev +RUN apt install -y cmake libusb-1.0-0-dev diff --git a/src/main/main.cpp b/src/main/main.cpp index 8a619b84..bc8f00a9 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -108,10 +108,6 @@ Q_IMPORT_PLUGIN(QTgaPlugin) Q_IMPORT_PLUGIN(QTiffPlugin) Q_IMPORT_PLUGIN(QWbmpPlugin) Q_IMPORT_PLUGIN(QWebpPlugin) - -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) -Q_IMPORT_PLUGIN(QtQmlPlugin) -#endif Q_IMPORT_PLUGIN(QQmlDebuggerServiceFactory) Q_IMPORT_PLUGIN(QQmlInspectorServiceFactory) Q_IMPORT_PLUGIN(QLocalClientConnectionFactory)