From b3d7b9859d8949aac191d25afbce83d1e75f1cad Mon Sep 17 00:00:00 2001 From: Infactum Date: Fri, 1 Mar 2019 23:29:38 +0500 Subject: [PATCH] CI update support for AppImage build --- appveyor.yml | 23 +++++++++++++---------- buildenv/Dockerfile.centos6 | 7 ++++--- buildenv/app.desktop | 7 ------- buildenv/gen_db.desktop | 8 ++++++++ buildenv/tg2sip.desktop | 8 ++++++++ 5 files changed, 33 insertions(+), 20 deletions(-) delete mode 100644 buildenv/app.desktop create mode 100644 buildenv/gen_db.desktop create mode 100644 buildenv/tg2sip.desktop diff --git a/appveyor.yml b/appveyor.yml index 1da1d42..72ce178 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,7 +37,7 @@ install: build_script: - sh: >- - if [ "$target_name" = "AppImage" ] ; then exit 0; fi ; + if [ "$target_name" != "AppImage" ] ; then mkdir build; docker run --rm -v "$(pwd)":/src "$docker_image":"$docker_tag" /bin/bash -c " mkdir build && cd build; @@ -48,9 +48,10 @@ build_script: cp tg2sip /src/build; cp gen_db /src/build;" 7z a tg2sip.zip ./build/tg2sip ./build/gen_db ./settings.ini; + fi; - - sh: >- - if [ "$target_name" != "AppImage" ] ; then exit 0; fi ; + - sh: >- + if [ "$target_name" = "AppImage" ] ; then mkdir build; docker run --rm -v "$(pwd)":/src "$docker_image":"$docker_tag" /bin/bash -c " mkdir build && cd build; @@ -59,16 +60,18 @@ build_script: chmod +x tg2sip; chmod +x gen_db; linuxdeploy --appdir /src/build/tg2sip -e tg2sip; - linuxdeploy --appdir /src/build/tg2sip -e gen_db;" + linuxdeploy --appdir /src/build/gen_db -e gen_db;" wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool.AppImage; chmod +x appimagetool.AppImage; - wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O chmod +x linuxdeploy.AppImage; + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O linuxdeploy.AppImage; chmod +x linuxdeploy.AppImage; - ./linuxdeploy.AppImage --appdir ./build/tg2sip -d ./buildenv/app.desktop -i ./buildenv/icon.svg; - ./linuxdeploy.AppImage --appdir ./build/gen_db -d ./buildenv/app.desktop -i ./buildenv/icon.svg; - ./appimagetool.AppImage tg2sip; - ./appimagetool.AppImage gen_db; - 7z a tg2sip.zip ./build/tg2sip-x86_64.AppImage ./build/gen_db-x86_64.AppImage ./settings.ini; + sudo chown -R "$(id -u)":"$(id -g)" ./build; + ./linuxdeploy.AppImage --appdir ./build/tg2sip -d ./buildenv/tg2sip.desktop -i ./buildenv/icon.svg; + ./linuxdeploy.AppImage --appdir ./build/gen_db -d ./buildenv/gen_db.desktop -i ./buildenv/icon.svg; + ./appimagetool.AppImage ./build/tg2sip; + ./appimagetool.AppImage ./build/gen_db; + 7z a tg2sip.zip ./tg2sip-x86_64.AppImage ./gen_db-x86_64.AppImage ./settings.ini; + fi; after_build: - sh: docker push "$docker_image":"$docker_tag" diff --git a/buildenv/Dockerfile.centos6 b/buildenv/Dockerfile.centos6 index 8b3b14e..7f29128 100644 --- a/buildenv/Dockerfile.centos6 +++ b/buildenv/Dockerfile.centos6 @@ -5,14 +5,15 @@ RUN yum -y install centos-release-scl yum-utils \ && yum-config-manager --enable rhel-server-rhscl-7-rpms \ && yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++ -RUN yum install -y \ +RUN set -xe \ + && yum install -y \ make \ git wget \ zlib-devel openssl-devel gperf \ pkgconfig ccache gperf unzip \ - libpng-devel libjpeg-devel patchelf \ + libpng-devel libjpeg-devel \ epel-release \ - && yum install -y opus-devel + && yum install -y opus-devel patchelf RUN wget https://cmake.org/files/v3.9/cmake-3.9.6-Linux-x86_64.sh \ && sh cmake-3.9.6-Linux-x86_64.sh --prefix=/usr --exclude-subdir diff --git a/buildenv/app.desktop b/buildenv/app.desktop deleted file mode 100644 index 252dfb2..0000000 --- a/buildenv/app.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Name= -Exec= -Terminal=true -Type=Application -Icon=icon -Categories=AudioVideo; \ No newline at end of file diff --git a/buildenv/gen_db.desktop b/buildenv/gen_db.desktop new file mode 100644 index 0000000..8e5c3aa --- /dev/null +++ b/buildenv/gen_db.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=gen_db +Exec=gen_db +Comment=TG2SIP DB generator +Terminal=true +Type=Application +Icon=icon +Categories=AudioVideo; \ No newline at end of file diff --git a/buildenv/tg2sip.desktop b/buildenv/tg2sip.desktop new file mode 100644 index 0000000..f9ac64f --- /dev/null +++ b/buildenv/tg2sip.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=tg2sip +Exec=tg2sip +Comment=TG2SIP Voice Gateway +Terminal=true +Type=Application +Icon=icon +Categories=AudioVideo; \ No newline at end of file