You've already forked linuxdeploy-plugin-qt
mirror of
https://github.com/encounter/linuxdeploy-plugin-qt.git
synced 2026-03-30 11:19:03 -07:00
Compare commits
6 Commits
restructuring
...
centos6
| Author | SHA1 | Date | |
|---|---|---|---|
| 3919cb0eba | |||
| 59430de4d1 | |||
| a716e088e5 | |||
| bed665d924 | |||
| 17beb503b0 | |||
| ed38c45be4 |
@@ -1,2 +1,3 @@
|
|||||||
*build*/
|
*build*/
|
||||||
.idea/
|
.idea/
|
||||||
|
*.AppImage
|
||||||
|
|||||||
+42
-38
@@ -1,10 +1,37 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
sudo: required
|
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: ARCH=x86_64
|
- name: Build x86_64 AppImage on CentOS 6
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
env: ARCH=x86_64 BUILD_TYPE=centos6
|
||||||
|
script: travis/build-centos6-docker.sh
|
||||||
|
after_success:
|
||||||
|
- ls -lh
|
||||||
|
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
||||||
|
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||||
|
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||||
|
- bash upload.sh linuxdeploy*.AppImage*
|
||||||
|
|
||||||
|
- name: Build i386 AppImage on CentOS 6
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
env: ARCH=i386 BUILD_TYPE=centos6
|
||||||
|
script: travis/build-centos6-docker.sh
|
||||||
|
after_success:
|
||||||
|
- ls -lh
|
||||||
|
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
||||||
|
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
||||||
|
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
||||||
|
- bash upload.sh linuxdeploy*.AppImage*
|
||||||
|
|
||||||
|
# TODO: build and test on i386 as well!
|
||||||
|
- name: Build and test on Ubuntu xenial (no binaries uploaded)
|
||||||
|
dist: xenial
|
||||||
|
sudo: required
|
||||||
|
env: ARCH=x86_64 BUILD_TYPE=test
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
update: true
|
update: true
|
||||||
@@ -25,42 +52,19 @@ matrix:
|
|||||||
- mesa-common-dev
|
- mesa-common-dev
|
||||||
- libgl1-mesa-dev # <-- that's for xenial to provide the x86_64-linux-gnu/libGL.so symlink
|
- libgl1-mesa-dev # <-- that's for xenial to provide the x86_64-linux-gnu/libGL.so symlink
|
||||||
- # libglvnd-dev # <-- that's for bionic to provide aforementioned symlink
|
- # libglvnd-dev # <-- that's for bionic to provide aforementioned symlink
|
||||||
- env: ARCH=i386
|
install:
|
||||||
addons:
|
- git clone https://github.com/NixOS/patchelf.git -b 0.8
|
||||||
apt:
|
- cd patchelf
|
||||||
update: true
|
- ./bootstrap.sh
|
||||||
packages:
|
- if [ "$ARCH" == "i386" ]; then export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"); fi
|
||||||
- libmagic-dev:i386
|
- ./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
|
||||||
- libjpeg-dev:i386
|
- make -j$(nproc)
|
||||||
- libpng-dev:i386
|
- sudo make install
|
||||||
- automake # required for patchelf
|
- cd ..
|
||||||
- libfuse2:i386
|
- rm -rf patchelf
|
||||||
- libcairo2:i386
|
script:
|
||||||
- gcc-multilib
|
- bash -xe travis/build.sh
|
||||||
- g++-multilib
|
- bash -xe travis/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage
|
||||||
|
|
||||||
install:
|
|
||||||
- git clone https://github.com/NixOS/patchelf.git -b 0.8
|
|
||||||
- cd patchelf
|
|
||||||
- ./bootstrap.sh
|
|
||||||
- if [ "$ARCH" == "i386" ]; then export EXTRA_CONFIGURE_ARGS=("--build=i686-pc-linux-gnu" "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"); fi
|
|
||||||
- ./configure --prefix=/usr "${EXTRA_CONFIGURE_ARGS[@]}"
|
|
||||||
- make -j$(nproc)
|
|
||||||
- sudo make install
|
|
||||||
- cd ..
|
|
||||||
- rm -rf patchelf
|
|
||||||
|
|
||||||
script:
|
|
||||||
- bash -xe travis/build.sh
|
|
||||||
# TODO: allow for cross-compiling the test projects and install i386 packages for build dependencies, then remove $ARCH check
|
|
||||||
- if [ "$ARCH" == "x86_64" ]; then bash -xe travis/test.sh linuxdeploy-plugin-qt-"$ARCH".AppImage; fi
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- ls -lh
|
|
||||||
# make sure only pushes to rewrite create a new release, otherwise pretend PR and upload to transfer.sh
|
|
||||||
- if [ "$TRAVIS_TAG" != "$TRAVIS_BRANCH" ] && [ "$TRAVIS_BRANCH" != "master" ]; then export TRAVIS_EVENT_TYPE=pull_request; fi
|
|
||||||
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
|
||||||
- bash upload.sh linuxdeploy*.AppImage*
|
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
FROM centos:6
|
||||||
|
|
||||||
|
RUN yum install -y centos-release-scl-rh && \
|
||||||
|
yum install -y devtoolset-7 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git && \
|
||||||
|
wget https://artifacts.assassinate-you.net/artifactory/cmake-centos6/cmake-v3.15.3-x86_64.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||||
|
|
||||||
|
ENV ARCH=x86_64
|
||||||
|
COPY entrypoint.sh /
|
||||||
|
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
RUN yum install -y gcc-c++ && \
|
||||||
|
git clone https://github.com/NixOS/patchelf.git && \
|
||||||
|
pushd patchelf && \
|
||||||
|
# cannot use -b since it's not supported in really old versions of git
|
||||||
|
git checkout 0.8 && \
|
||||||
|
./bootstrap.sh && \
|
||||||
|
./configure --prefix=/usr/local && \
|
||||||
|
make -j $(nproc) && \
|
||||||
|
make install && \
|
||||||
|
popd && \
|
||||||
|
rm -r patchelf/
|
||||||
|
|
||||||
|
CMD ["bash"]
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
FROM i386/centos:6
|
||||||
|
|
||||||
|
SHELL ["/bin/bash", "-x", "-c"]
|
||||||
|
|
||||||
|
# during Docker build, yum doesn't detect it's an i386 environment on x86_64 machines, and tries to install x86_64 packages, which can't work
|
||||||
|
# this little command fixes this
|
||||||
|
RUN sed -i 's/$basearch/i386/g' /etc/yum.repos.d/CentOS-Base.repo
|
||||||
|
|
||||||
|
# thanks CloudLinux, you're really helping us poor AppImage creators seeking for maximum compatibility by providing devtoolset i386 builds
|
||||||
|
RUN yum install -y yum-utils && \
|
||||||
|
rpm --import https://repo.cloudlinux.com/cloudlinux/security/RPM-GPG-KEY-CloudLinux && \
|
||||||
|
yum-config-manager --add-repo https://www.repo.cloudlinux.com/cloudlinux/6/sclo/devtoolset-7/i386/ && \
|
||||||
|
yum install -y devtoolset-7 wget curl patchelf vim-common fuse libfuse2 libtool autoconf automake zlib-devel libjpeg-devel libpng-devel nano git
|
||||||
|
|
||||||
|
# the shell wrapper takes care of enabling devtoolset and running a shell properly
|
||||||
|
# unfortunately this is the easiest and most solid workaround to the limitations of the scl command
|
||||||
|
COPY entrypoint.sh /
|
||||||
|
ENV ARCH=i386
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
SHELL ["/entrypoint.sh", "bash", "-x", "-c"]
|
||||||
|
|
||||||
|
RUN wget https://artifacts.assassinate-you.net/artifactory/cmake-centos6/cmake-v3.15.3-i386.tar.gz -O- | tar xz --strip-components=1 -C/usr/local
|
||||||
|
|
||||||
|
RUN git clone https://github.com/NixOS/patchelf.git && \
|
||||||
|
pushd patchelf && \
|
||||||
|
# cannot use -b since it's not supported in really old versions of git
|
||||||
|
git checkout 0.8 && \
|
||||||
|
./bootstrap.sh && \
|
||||||
|
./configure --prefix=/usr/local && \
|
||||||
|
make -j $(nproc) && \
|
||||||
|
make install && \
|
||||||
|
popd && \
|
||||||
|
rm -r patchelf/
|
||||||
|
|
||||||
|
CMD ["bash"]
|
||||||
Executable
+18
@@ -0,0 +1,18 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
old_cwd=$(readlink -f .)
|
||||||
|
here=$(readlink -f $(dirname "$0"))
|
||||||
|
|
||||||
|
DOCKERFILE="$here"/Dockerfile.centos6
|
||||||
|
IMAGE=linuxdeploy-build-centos6
|
||||||
|
|
||||||
|
if [ "$ARCH" == "i386" ]; then
|
||||||
|
DOCKERFILE="$DOCKERFILE"-i386
|
||||||
|
IMAGE="$IMAGE"-i386
|
||||||
|
fi
|
||||||
|
|
||||||
|
(cd "$here" && docker build -f "$DOCKERFILE" -t "$IMAGE" .)
|
||||||
|
|
||||||
|
docker run --rm -it -v "$here"/..:/ws:ro -v "$old_cwd":/out -e CI=1 -e OUTDIR_OWNER=$(id -u) "$IMAGE" /bin/bash -xe -c "cd /out && /ws/travis/build-centos6.sh"
|
||||||
Executable
+59
@@ -0,0 +1,59 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [ "$ARCH" == "" ]; then
|
||||||
|
echo 'Error: $ARCH is not set'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# use RAM disk if possible
|
||||||
|
if [ "$CI" == "" ] && [ -d /dev/shm ]; then
|
||||||
|
TEMP_BASE=/dev/shm
|
||||||
|
else
|
||||||
|
TEMP_BASE=/tmp
|
||||||
|
fi
|
||||||
|
|
||||||
|
BUILD_DIR=$(mktemp -d -p "$TEMP_BASE" linuxdeploy-plugin-qt-build-XXXXXX)
|
||||||
|
|
||||||
|
cleanup () {
|
||||||
|
if [ -d "$BUILD_DIR" ]; then
|
||||||
|
rm -rf "$BUILD_DIR"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
# store repo root as variable
|
||||||
|
REPO_ROOT=$(readlink -f $(dirname $(dirname "$0")))
|
||||||
|
OLD_CWD=$(readlink -f .)
|
||||||
|
|
||||||
|
pushd "$BUILD_DIR"
|
||||||
|
|
||||||
|
cmake "$REPO_ROOT" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo "${EXTRA_CMAKE_ARGS[@]}" -DUSE_SYSTEM_CIMG=Off
|
||||||
|
|
||||||
|
make -j$(nproc)
|
||||||
|
|
||||||
|
ctest -V
|
||||||
|
|
||||||
|
make install DESTDIR=AppDir
|
||||||
|
|
||||||
|
strip_path=$(which strip)
|
||||||
|
|
||||||
|
export UPD_INFO="gh-releases-zsync|linuxdeploy|linuxdeploy-plugin-qt|continuous|linuxdeploy-plugin-qt-$ARCH.AppImage"
|
||||||
|
|
||||||
|
# we're in Docker...
|
||||||
|
export APPIMAGE_EXTRACT_AND_RUN=1
|
||||||
|
|
||||||
|
wget https://github.com/TheAssassin/linuxdeploy/releases/download/continuous/linuxdeploy-"$ARCH".AppImage
|
||||||
|
chmod +x linuxdeploy*.AppImage
|
||||||
|
sed -i 's|AI\x02|\x00\x00\x00|' *.AppImage
|
||||||
|
./linuxdeploy-"$ARCH".AppImage --appdir AppDir \
|
||||||
|
-d "$REPO_ROOT"/resources/linuxdeploy-plugin-qt.desktop \
|
||||||
|
-i "$REPO_ROOT"/resources/linuxdeploy-plugin-qt.svg \
|
||||||
|
-e $(which patchelf) \
|
||||||
|
-e "$strip_path" \
|
||||||
|
--output appimage
|
||||||
|
|
||||||
|
mv linuxdeploy-plugin-qt-"$ARCH".AppImage* "$OLD_CWD"/
|
||||||
+2
-2
@@ -26,7 +26,7 @@ cleanup () {
|
|||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
# store repo root as variable
|
# store repo root as variable
|
||||||
REPO_ROOT=$(readlink -f $(dirname $(dirname $0)))
|
REPO_ROOT=$(readlink -f $(dirname $(dirname "$0")))
|
||||||
OLD_CWD=$(readlink -f .)
|
OLD_CWD=$(readlink -f .)
|
||||||
|
|
||||||
pushd "$BUILD_DIR"
|
pushd "$BUILD_DIR"
|
||||||
@@ -70,4 +70,4 @@ chmod +x linuxdeploy*.AppImage
|
|||||||
-e "$strip_path" \
|
-e "$strip_path" \
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|
||||||
mv linuxdeploy-plugin-qt-"$ARCH".AppImage "$OLD_CWD"/
|
mv linuxdeploy-plugin-qt-"$ARCH".AppImage* "$OLD_CWD"/
|
||||||
|
|||||||
Executable
+9
@@ -0,0 +1,9 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
# get a compiler that allows for using modern-ish C++ (>= 11) on a distro that doesn't normally support it
|
||||||
|
# before you ask: yes, the binaries will work on CentOS 6 even without devtoolset (they somehow partially link C++
|
||||||
|
# things statically while using others from the system...)
|
||||||
|
# so, basically, it's magic!
|
||||||
|
source /opt/rh/devtoolset-*/enable
|
||||||
|
|
||||||
|
exec "$@"
|
||||||
Reference in New Issue
Block a user