diff --git a/Dockerfiles/ubuntu2204.dockerfile b/Dockerfiles/ubuntu2204.dockerfile index c6da2a8..7fe7f66 100644 --- a/Dockerfiles/ubuntu2204.dockerfile +++ b/Dockerfiles/ubuntu2204.dockerfile @@ -8,7 +8,7 @@ ENV WT_VERSION=4.11.1 RUN sed -i "s@http://.*archive.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list \ && sed -i "s@http://.*security.ubuntu.com@http://mirrors.tuna.tsinghua.edu.cn@g" /etc/apt/sources.list \ && apt update \ - && apt install -y cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \ + && apt install -y gcc g++ gdb cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \ wget curl rsync lsb-release ubuntu-keyring gnupg2 bzip2 unzip zsh libssl-dev zlib1g-dev gettext jq htop tini \ && install -m 0755 -d /etc/apt/keyrings \ && curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \ @@ -49,18 +49,6 @@ RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master && echo 'if [ -f /etc/profile ]; then source /etc/profile; fi' >> /etc/zsh/zprofile \ && chsh -s /bin/zsh root -RUN cd /root \ - && apt update \ - && apt install -y software-properties-common \ - && add-apt-repository -y ppa:ubuntu-toolchain-r/test \ - && apt install -y gcc-13 g++-13 gdb \ - && update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 60 \ - && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 60 \ - && update-alternatives --config gcc \ - && update-alternatives --config g++ \ - && apt clean \ - && rm -fr /var/lib/apt/lists/* /tmp/* /var/tmp/* - RUN cd /opt \ && git clone --depth=1 https://github.com/emscripten-core/emsdk.git \ && cd /opt/emsdk \ diff --git a/resources/build.sh b/resources/build.sh index 8bb3e0f..d090b4d 100755 --- a/resources/build.sh +++ b/resources/build.sh @@ -71,15 +71,15 @@ function init() { # ssh root@amass.fun "systemctl daemon-reload; systemctl enable older; systemctl start older" paths=( - "/opt/Libraries/wt-4.11.1/lib" - "/opt/Libraries/boost_1_86_0/lib" + "/opt/Libraries/wt-4.11.1/lib" + "/opt/Libraries/boost_1_86_0/lib" ) for path in "${paths[@]}"; do ssh root@amass.fun "grep -q '$path' /etc/profile || echo 'export LD_LIBRARY_PATH=$path:\$LD_LIBRARY_PATH' | sudo tee -a /etc/profile" done } -function build_docker_images(){ +function build_docker_images() { local DOCKERFILE=$1 echo "build $DOCKERFILE" if [[ $DOCKERFILE == *"act_runner.dockerfile" ]]; then @@ -107,17 +107,19 @@ function build_docker_images(){ docker push registry.cn-shenzhen.aliyuncs.com/amass_toolset/yoctools:22.04 else echo "not found steps for build $DOCKERFILE ..." - fi + fi } -function lvgl(){ - rm ${build_path}/LvglApplication/lvglapp.html +function lvgl() { + local lvgl_page="${build_path}/LvglApplication/lvglapp.html" + if [ -f "$lvgl_page" ]; then + rm "$lvgl_page" + fi 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 } - function main() { local cmd=$1 shift 1