mirror of
https://github.com/YACReader/yacreader
synced 2026-03-01 18:33:09 -05:00
Migrate the build system to cmake
This commit is contained in:
@ -14,14 +14,13 @@ RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake \
|
||||
desktop-file-utils \
|
||||
gcc \
|
||||
g++ \
|
||||
git \
|
||||
qt6-tools-dev \
|
||||
qt6-base-dev-tools \
|
||||
qmake6 \
|
||||
qmake6-bin \
|
||||
qt6-base-dev \
|
||||
qt6-multimedia-dev \
|
||||
qt6-tools-dev-tools \
|
||||
@ -60,24 +59,22 @@ RUN git clone https://github.com/YACReader/yacreader.git /src/git && \
|
||||
cd /src/git && \
|
||||
git checkout $YACR_VERSION
|
||||
|
||||
# get 7zip source
|
||||
RUN cd /src/git/compressed_archive && \
|
||||
wget "https://github.com/YACReader/yacreader-7z-deps/blob/main/7z2301-src.7z?raw=true" -O /src/git/compressed_archive/7z2301-src.7z && \
|
||||
7z x /src/git/compressed_archive/7z2301-src.7z -o/src/git/compressed_archive/lib7zip
|
||||
|
||||
# build yacreaderlibraryserver
|
||||
RUN cd /src/git/YACReaderLibraryServer && \
|
||||
qmake6 PREFIX=/app CONFIG+="7zip server_standalone" YACReaderLibraryServer.pro && \
|
||||
qmake6 -v && \
|
||||
make && \
|
||||
make install
|
||||
# build yacreaderlibraryserver (7zip source is auto-downloaded by CMake FetchContent)
|
||||
RUN cd /src/git && \
|
||||
cmake -B build \
|
||||
-DCMAKE_INSTALL_PREFIX=/app \
|
||||
-DDECOMPRESSION_BACKEND=7zip \
|
||||
-DBUILD_SERVER_STANDALONE=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release && \
|
||||
cmake --build build --parallel && \
|
||||
cmake --install build
|
||||
|
||||
# install 7z.so with RAR support
|
||||
RUN echo "Building and installing 7z.so with RAR support..." && \
|
||||
cd "/src/git/compressed_archive/lib7zip/CPP/7zip/Bundles/Format7zF" && \
|
||||
make -f makefile.gcc && \
|
||||
mkdir -p /app/lib/7zip && \
|
||||
cp ./_o/7z.so /app/lib/7zip
|
||||
cp ./_o/7z.so /app/lib/7zip
|
||||
|
||||
# Stage 2: Runtime stage
|
||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:noble
|
||||
@ -95,7 +92,7 @@ RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
libqt6core5compat6 \
|
||||
libpoppler-qt6-3t64 \
|
||||
qt6-image-formats-plugins \
|
||||
qt6-image-formats-plugins \
|
||||
libqt6network6t64 \
|
||||
libqt6sql6-sqlite && \
|
||||
apt-get clean && \
|
||||
|
||||
@ -14,15 +14,17 @@ RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
build-essential \
|
||||
cmake \
|
||||
desktop-file-utils \
|
||||
gcc \
|
||||
g++ \
|
||||
git \
|
||||
qt6-tools-dev \
|
||||
qt6-base-dev-tools \
|
||||
qmake6 \
|
||||
qt6-base-dev \
|
||||
qt6-multimedia-dev \
|
||||
qt6-tools-dev-tools \
|
||||
libgl-dev \
|
||||
qt6-l10n-tools \
|
||||
qt6-declarative-dev \
|
||||
libqt6svg6-dev \
|
||||
@ -54,16 +56,15 @@ RUN git clone https://github.com/YACReader/yacreader.git /src/git && \
|
||||
cd /src/git && \
|
||||
git checkout $YACR_VERSION
|
||||
|
||||
# get 7zip source
|
||||
RUN cd /src/git/compressed_archive && \
|
||||
wget "https://github.com/YACReader/yacreader-7z-deps/blob/main/7z2301-src.7z?raw=true" -O /src/git/compressed_archive/7z2301-src.7z && \
|
||||
7z x /src/git/compressed_archive/7z2301-src.7z -o/src/git/compressed_archive/lib7zip
|
||||
|
||||
# build yacreaderlibraryserver
|
||||
RUN cd /src/git/YACReaderLibraryServer && \
|
||||
qmake6 PREFIX=/app CONFIG+="7zip server_standalone" YACReaderLibraryServer.pro && \
|
||||
make && \
|
||||
make install
|
||||
# build yacreaderlibraryserver (7zip source is auto-downloaded by CMake FetchContent)
|
||||
RUN cd /src/git && \
|
||||
cmake -B build \
|
||||
-DCMAKE_INSTALL_PREFIX=/app \
|
||||
-DDECOMPRESSION_BACKEND=7zip \
|
||||
-DBUILD_SERVER_STANDALONE=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release && \
|
||||
cmake --build build --parallel && \
|
||||
cmake --install build
|
||||
|
||||
# install 7z.so with RAR support
|
||||
RUN echo "Building and installing 7z.so with RAR support..." && \
|
||||
|
||||
Reference in New Issue
Block a user