diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e4c04d..990569c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,7 @@ endif() if (BUILD_OFD_LOCAL_QR_SCAN OR BUILD_OFD_BINARYEYE_SCAN) if(CMAKE_VERSION VERSION_LESS 3.12) - add_definitions(BUILD_OFD_MODE) + add_definitions(-DBUILD_OFD_MODE) else() add_compile_definitions(BUILD_OFD_MODE) endif() @@ -23,28 +23,28 @@ endif() if (BUILD_EMAIL_TO_TEXT_MODE) if(CMAKE_VERSION VERSION_LESS 3.12) - add_definitions(BUILD_EMAIL_TO_TEXT_MODE) + add_definitions(-DBUILD_EMAIL_TO_TEXT_MODE) else() add_compile_definitions(BUILD_EMAIL_TO_TEXT_MODE) endif() endif() if (BUILD_OCR_MODE) if(CMAKE_VERSION VERSION_LESS 3.12) - add_definitions(BUILD_OCR_MODE) + add_definitions(-DBUILD_OCR_MODE) else() add_compile_definitions(BUILD_OCR_MODE) endif() endif() if (BUILD_OFD_LOCAL_QR_SCAN) if(CMAKE_VERSION VERSION_LESS 3.12) - add_definitions(BUILD_OFD_LOCAL_QR_SCAN) + add_definitions(-DBUILD_OFD_LOCAL_QR_SCAN) else() add_compile_definitions(BUILD_OFD_LOCAL_QR_SCAN) endif() endif() if (BUILD_OFD_BINARYEYE_SCAN) if(CMAKE_VERSION VERSION_LESS 3.12) - add_definitions(BUILD_OFD_BINARYEYE_SCAN) + add_definitions(-DBUILD_OFD_BINARYEYE_SCAN) else() add_compile_definitions(BUILD_OFD_BINARYEYE_SCAN) endif() diff --git a/deploy/appimage/Dockerfile b/deploy/appimage/Dockerfile index 2888a98..edb4211 100644 --- a/deploy/appimage/Dockerfile +++ b/deploy/appimage/Dockerfile @@ -1,9 +1,9 @@ -FROM ubuntu:20.04 +FROM ubuntu:18.04 # Installing dependencies RUN apt update -RUN DEBIAN_FRONTEND=noninteractive apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json3-dev libcurl4-openssl-dev libtesseract-dev libqrencode-dev +RUN DEBIAN_FRONTEND=noninteractive apt install -y qtbase5-dev openssl libmbedtls-dev tesseract-ocr tesseract-ocr-rus libopencv-dev libzbar-dev qttools5-dev nlohmann-json-dev libcurl4-openssl-dev libtesseract-dev libqrencode-dev RUN DEBIAN_FRONTEND=noninteractive apt install -y wget git cmake make gcc g++ fuse # For gcc 12 @@ -53,9 +53,10 @@ COPY settings ./settings COPY scenes ./scenes COPY net ./net COPY translations ./translations +COPY http_server ./http_server COPY utils ./utils -COPY ./*cpp ./*.h ./*.ui ./*.qrc CMakeLists.txt . +COPY ./*.h ./*cpp ./*.ui ./*.qrc CMakeLists.txt . RUN mkdir build WORKDIR /appimage/build @@ -64,13 +65,13 @@ RUN cmake -DBUILD_TRANSLATIONS=on .. && make -j 8 WORKDIR /appimage/AppDir/usr/bin -RUN cp /appimage/build/checks-parser . +RUN cp /appimage/build/checks-parser WORKDIR /appimage RUN linuxdeployqt --appimage-extract-and-run AppDir/usr/bin/checks-parser -no-copy-copyright-files -appimage -RUN mkdir -p /appimage/output -RUN cp Checks_parser-x86_64.AppImage /appimage/output +RUN mkdir -p /output +RUN cp Checks_parser-x86_64.AppImage /output ENTRYPOINT bash diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9e8b429 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +services: + appimage: + build: + dockerfile: deploy/appimage/Dockerfile + context: . + volumes: + - ./binaries:/output