Commit 741f84e4 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

android: These sudo calls shouldn't be needed anymore

parent 0a389438
Pipeline #1279 skipped with stage
......@@ -131,7 +131,7 @@ RUN cd && mkdir androiddeployqt && cd androiddeployqt \
&& echo "cmake_minimum_required(VERSION 3.11)\n\
find_package(Qt5Core REQUIRED)\n\
add_executable(androiddeployqt main.cpp)\n\
target_link_libraries(androiddeployqt Qt5::Core)\n" > CMakeLists.txt && cmake . -DQt5Core_DIR=/opt/nativetooling/lib/cmake/Qt5Core && make && sudo cp androiddeployqt /opt/Qt/${QT_VERSION}/android_armv7/bin/androiddeployqt \
target_link_libraries(androiddeployqt Qt5::Core)\n" > CMakeLists.txt && cmake . -DQt5Core_DIR=/opt/nativetooling/lib/cmake/Qt5Core && make && cp androiddeployqt /opt/Qt/${QT_VERSION}/android_armv7/bin/androiddeployqt \
&& cd && rm -rf androiddeployqt
COPY build-cmake-native /opt/helpers/
......@@ -154,12 +154,12 @@ RUN cd && git clone https://github.com/libexpat/libexpat.git --single-branch &&
RUN EXTRA_CMAKE_SUBDIR=cmake GIT_EXTRA="--branch dbus-1.12.10" /opt/helpers/build-cmake dbus git://anongit.freedesktop.org/git/dbus/dbus -DEXPAT_INCLUDE_DIR=/opt/kdeandroid-deps/include -DEXPAT_LIBRARY=/opt/kdeandroid-deps/lib/libexpat.so
#build qtdbus
RUN sudo sed -i.bak "s|#define QT_NO_DBUS|//#define QT_NO_DBUS //we install it separate from the SDK|g" $QT_ANDROID/include/QtCore/qconfig.h \
&& sudo sed -i.bak "s/QT_FEATURE_dbus -1/QT_FEATURE_dbus 1/g" $QT_ANDROID/include/QtCore/${QT_VERSION}/QtCore/private/qconfig_p.h \
&& sudo sed -i.bak "s/QT_FEATURE_dbus_linked -1/QT_FEATURE_dbus_linked 1/g" $QT_ANDROID/include/QtCore/${QT_VERSION}/QtCore/private/qconfig_p.h \
&& cd && git clone git://code.qt.io/qt/qtbase.git --single-branch --branch ${QT_TAG} && cd qtbase/src/dbus && qmake && make -j`nproc` && sudo make install && cd && rm -rf qtbase \
&& sudo ln -s /opt/nativetooling/bin/qdbusxml2cpp $QT_ANDROID/bin/ \
&& sudo ln -s /opt/nativetooling/bin/qdbuscpp2xml $QT_ANDROID/bin/
RUN sed -i.bak "s|#define QT_NO_DBUS|//#define QT_NO_DBUS //we install it separate from the SDK|g" $QT_ANDROID/include/QtCore/qconfig.h \
&& sed -i.bak "s/QT_FEATURE_dbus -1/QT_FEATURE_dbus 1/g" $QT_ANDROID/include/QtCore/${QT_VERSION}/QtCore/private/qconfig_p.h \
&& sed -i.bak "s/QT_FEATURE_dbus_linked -1/QT_FEATURE_dbus_linked 1/g" $QT_ANDROID/include/QtCore/${QT_VERSION}/QtCore/private/qconfig_p.h \
&& cd && git clone git://code.qt.io/qt/qtbase.git --single-branch --branch ${QT_TAG} && cd qtbase/src/dbus && qmake && make -j`nproc` && make install && cd && rm -rf qtbase \
&& ln -s /opt/nativetooling/bin/qdbusxml2cpp $QT_ANDROID/bin/ \
&& ln -s /opt/nativetooling/bin/qdbuscpp2xml $QT_ANDROID/bin/
# needs to be after building qt, otherwise it breaks weirdly
ENV QMAKESPEC android-clang
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment