From b7296c7c30c14412e9f506e48fcf0ee651a625fc Mon Sep 17 00:00:00 2001 From: amass Date: Sat, 23 Nov 2024 04:44:59 +0800 Subject: [PATCH] add env to env. --- Dockerfiles/ubuntu2204.dockerfile | 13 +++++++++---- Dockerfiles/ubuntu2404.dockerfile | 13 +++++++++---- resources/build.sh | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Dockerfiles/ubuntu2204.dockerfile b/Dockerfiles/ubuntu2204.dockerfile index 9fcd8b9..e41adfc 100644 --- a/Dockerfiles/ubuntu2204.dockerfile +++ b/Dockerfiles/ubuntu2204.dockerfile @@ -65,7 +65,8 @@ RUN cd /opt \ && git clone --depth=1 https://github.com/emscripten-core/emsdk.git \ && cd /opt/emsdk \ && ./emsdk install latest \ - && ./emsdk activate latest + && ./emsdk activate latest \ + && echo 'export PATH=/opt/emsdk:/opt/emsdk/node/20.18.0_64bit/bin:/opt/emsdk/upstream/emscripten:$PATH' >> /etc/profile ENV PATH=/opt/emsdk:/opt/emsdk/node/20.18.0_64bit/bin:/opt/emsdk/upstream/emscripten:$PATH RUN cd /root \ @@ -80,7 +81,9 @@ RUN cd /root \ && ./configure -prefix /opt/Qt/6.8.0/gcc_64 -opensource -debug-and-release -confirm-license -nomake examples -nomake tests -skip qtwebengine -skip qtcoap -skip qtopcua \ && cmake --build . --parallel \ && ninja install \ - && rm -fr /root/qt-everywhere-src-6.8.0* + && rm -fr /root/qt-everywhere-src-6.8.0* \ + && echo 'export PATH=/opt/Qt/6.8.0/gcc_64/bin:$PATH' >> /etc/profile \ + && echo 'export LD_LIBRARY_PATH=/opt/Qt/6.8.0/gcc_64/lib:$LD_LIBRARY_PATH' >> /etc/profile ENV PATH=/opt/Qt/6.8.0/gcc_64/bin:$PATH ENV LD_LIBRARY_PATH=/opt/Qt/6.8.0/gcc_64/lib:$LD_LIBRARY_PATH @@ -90,7 +93,8 @@ RUN cd /root \ && cd /root/boost_1_86_0 \ && ./bootstrap.sh --prefix=/opt/Libraries/boost_1_86_0 \ && ./b2 install -q --prefix=/opt/Libraries/boost_1_86_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC \ - && rm -fr /root/boost_1_86_0* + && rm -fr /root/boost_1_86_0* \ + && echo 'export LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:LD_LIBRARY_PATH' >> /etc/profile ENV LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:LD_LIBRARY_PATH RUN cd /root \ @@ -136,7 +140,8 @@ RUN cd /root \ && cmake -G Ninja -B build -S . -DENABLE_OPENSSL=true -DENABLE_WEBRTC=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/opt/Libraries/ZLMediaKit" \ && cmake --build build --target all \ && cmake --install build \ - && rm -fr /root/ZLMediaKit + && rm -fr /root/ZLMediaKit \ + && echo 'export LD_LIBRARY_PATH=/opt/Libraries/ZLMediaKit/lib:$LD_LIBRARY_PATH' >> /etc/profile ENV LD_LIBRARY_PATH=/opt/Libraries/ZLMediaKit/lib:$LD_LIBRARY_PATH ENV LANG=C.UTF-8 diff --git a/Dockerfiles/ubuntu2404.dockerfile b/Dockerfiles/ubuntu2404.dockerfile index 88c674d..daf4213 100644 --- a/Dockerfiles/ubuntu2404.dockerfile +++ b/Dockerfiles/ubuntu2404.dockerfile @@ -52,7 +52,8 @@ RUN cd /opt \ && git clone --depth=1 https://github.com/emscripten-core/emsdk.git \ && cd /opt/emsdk \ && ./emsdk install latest \ - && ./emsdk activate latest + && ./emsdk activate latest \ + && echo 'export PATH=/opt/emsdk:/opt/emsdk/node/20.18.0_64bit/bin:/opt/emsdk/upstream/emscripten:$PATH' >> /etc/profile ENV PATH=/opt/emsdk:/opt/emsdk/node/20.18.0_64bit/bin:/opt/emsdk/upstream/emscripten:$PATH RUN cd /root \ @@ -67,7 +68,9 @@ RUN cd /root \ && ./configure -prefix /opt/Qt/6.8.0/gcc_64 -opensource -debug-and-release -confirm-license -nomake examples -nomake tests -skip qtwebengine -skip qtcoap -skip qtopcua \ && cmake --build . --parallel \ && ninja install \ - && rm -fr /root/qt-everywhere-src-6.8.0* + && rm -fr /root/qt-everywhere-src-6.8.0* \ + && echo 'export PATH=/opt/Qt/6.8.0/gcc_64/bin:$PATH' >> /etc/profile \ + && echo 'export LD_LIBRARY_PATH=/opt/Qt/6.8.0/gcc_64/lib:$LD_LIBRARY_PATH' >> /etc/profile ENV PATH=/opt/Qt/6.8.0/gcc_64/bin:$PATH ENV LD_LIBRARY_PATH=/opt/Qt/6.8.0/gcc_64/lib:$LD_LIBRARY_PATH @@ -77,7 +80,8 @@ RUN cd /root \ && cd /root/boost_1_86_0 \ && ./bootstrap.sh --prefix=/opt/Libraries/boost_1_86_0 \ && ./b2 install -q --prefix=/opt/Libraries/boost_1_86_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC \ - && rm -fr /root/boost_1_86_0* + && rm -fr /root/boost_1_86_0* \ + && echo 'export LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:LD_LIBRARY_PATH' >> /etc/profile ENV LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:LD_LIBRARY_PATH RUN cd /root \ @@ -123,7 +127,8 @@ RUN cd /root \ && cmake -G Ninja -B build -S . -DENABLE_OPENSSL=true -DENABLE_WEBRTC=true -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/opt/Libraries/ZLMediaKit" \ && cmake --build build --target all \ && cmake --install build \ - && rm -fr /root/ZLMediaKit + && rm -fr /root/ZLMediaKit \ + && echo 'export LD_LIBRARY_PATH=/opt/Libraries/ZLMediaKit/lib:$LD_LIBRARY_PATH' >> /etc/profile ENV LD_LIBRARY_PATH=/opt/Libraries/ZLMediaKit/lib:$LD_LIBRARY_PATH ENV LANG=C.UTF-8 diff --git a/resources/build.sh b/resources/build.sh index 2c6f65b..246a5a3 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -113,7 +113,7 @@ function build_docker_images(){ function lvgl(){ rm ${build_path}/LvglApplication/lvglapp.html - emcmake cmake -DSDL2_DIR=/home/amass/emsdk/upstream/emscripten/system/lib/cmake/SDL2 -S LvglApplication -B ${build_path}/LvglApplication + emcmake cmake -G Ninja -DSDL2_DIR=/home/amass/emsdk/upstream/emscripten/system/lib/cmake/SDL2 -S LvglApplication -B ${build_path}/LvglApplication cmake --build ${build_path}/LvglApplication --target all # python3 -m http.server -d ./build/LvglApplication }