Dockerfile: zbar static compile
continuous-integration/drone/push Build is running Details

qr-code-scan
tobtoht 4 years ago
parent 7f0bef2a1f
commit 0b0e62f8ef

@ -10,12 +10,11 @@ ENV SOURCE_DATE_EPOCH=1397818193
RUN apt-get update
RUN apt-get install -y nano vim ccache software-properties-common
RUN add-apt-repository ppa:git-core/ppa
RUN apt-get update
RUN apt install -y automake git pkg-config python xutils-dev && \
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
git clone -b xorgproto-2020.1 --depth 1 https://gitlab.freedesktop.org/xorg/proto/xorgproto && \
cd xorgproto && \
git reset --hard c62e8203402cafafa5ba0357b6d1c019156c9f36 && \
./autogen.sh && \
@ -210,7 +209,7 @@ RUN apt install -y libgl1-mesa-dev libglib2.0-dev mesa-common-dev && \
-no-opengl -qpa xcb --xcb -xcb-xlib -feature-xlib -openssl-linked -I /usr/local/openssl/include \
-L /usr/local/openssl/lib -system-freetype -fontconfig -glib \
-no-dbus -no-sql-sqlite -no-use-gold-linker -no-kms \
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib \
-qt-harfbuzz -qt-libjpeg -qt-libpng -qt-pcre -qt-zlib -gstreamer \
-skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d \
-skip qtdoc -skip qtquickcontrols -skip qtquickcontrols2 -skip qtspeech -skip qtgamepad \
-skip qtlocation -skip qtmacextras -skip qtnetworkauth -skip qtpurchasing -optimize-size \
@ -346,3 +345,12 @@ RUN git clone https://git.wownero.com/feather/monero-seed.git && \
make -Cbuild -j$THREADS && \
make -Cbuild install && \
rm -rf $(pwd)
RUN git clone -b stable-0.21 --recursive https://github.com/mchehab/zbar.git && \
cd zbar && \
git reset --hard 505f1a87b32cb7bb0edbaf37e20ccdd46bbae2a3 && \
autoreconf -vfi && \
CFLAGS='-fPIC' CXXFLAGS='-fPIC' ./configure --enable-static --disable-shared --without-imagemagick --with-gtk=no --with-python=no --enable-doc=no && \
make -j$THREADS && \
make install && \
rm -rf $(pwd)

@ -167,6 +167,7 @@ target_compile_definitions(feather
${Qt5Xml_DEFINITIONS}
${Qt5WebSockets_DEFINITIONS}
${Qt5Multimedia_DEFINITIONS}
${Qt5MultimediaWidgets_DEFINITIONS}
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")

@ -2,9 +2,8 @@
#include "ui_qrcodescandialog.h"
#include <QMessageBox>
#include <QtMultimedia/QCameraInfo>
#include <QtMultimedia/QCamera>
#include <QCameraImageCapture>
#include <QtMultimedia/QCameraInfo>
QrCodeScanDialog::QrCodeScanDialog(QWidget *parent)
: QDialog(parent)
@ -15,8 +14,8 @@ QrCodeScanDialog::QrCodeScanDialog(QWidget *parent)
auto cameras = QCameraInfo::availableCameras();
if (cameras.count() < 1) {
QMessageBox::warning(this, "QR code scanner","No available cameras found.");
this->reject();
QMessageBox::warning(parent, "QR code scanner","No available cameras found.");
return;
}
m_camera = new QCamera(cameras.first(), this);
@ -37,6 +36,5 @@ void QrCodeScanDialog::onDecoded(int type, const QString &data) {
QrCodeScanDialog::~QrCodeScanDialog()
{
m_camera->stop();
delete ui;
}

Loading…
Cancel
Save