This repository has been archived by the owner on Dec 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb204bc
commit 79624cd
Showing
1 changed file
with
93 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,67 +39,101 @@ jobs: | |
AppImage: | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
version: ['3.8'] | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ubuntu:18.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.version }} | ||
- name: Download dependencies | ||
run: | | ||
sudo apt install libxkbcommon0 libxcb-xkb-dev libxkbcommon-x11-0 libxcb-xkb1 | ||
- name: Test AppImage | ||
run: | | ||
python -m pip install python-appimage | ||
echo $(realpath .) > appimage/requirements.txt | ||
python -m python_appimage build app appimage \ | ||
--linux-tag=manylinux1_x86_64 | ||
- name: Download scrcpy | ||
run: | | ||
wget -c $(curl -sL https://api.github.com/repos/srevinsaju/scrcpy-appimage/releases/latest | jq -r '.assets[].browser_download_url') | ||
chmod +x scrcpy*.AppImage | ||
./scrcpy*.AppImage --appimage-extract | ||
- uses: actions/checkout@v2 | ||
- name: Setup up User | ||
run: | | ||
apt update | ||
apt install -y sudo | ||
echo "github ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
useradd -m github | ||
usermod -aG sudo github | ||
su - github | ||
- name: Install dependencies | ||
run: | | ||
sudo apt -y install git | ||
sudo apt -y install wget curl jq | ||
sudo apt install -y software-properties-common | ||
sudo add-apt-repository ppa:deadsnakes/ppa | ||
sudo apt update | ||
sudo apt install python3.8 python3.8-dev python3.8-venv -y | ||
wget https://bootstrap.pypa.io/get-pip.py | ||
python3.8 get-pip.py | ||
mv `which python3.8` `which python3` | ||
sudo apt install -y libtool libcairo-dev | ||
sudo apt -y install build-essential | ||
git clone https://github.com/srevinsaju/pyappimage --depth=1 pyapim | ||
cd pyapim | ||
python3 -m pip install -r requirements.txt | ||
python3 -m pip install . | ||
cd .. | ||
sed -i 's,qtpy,PySide2,g' ./**/*.py | ||
sed -i 's,qtpy,PySide2,g' **/*.py | ||
sed -i 's,PyQt5,PySide2,g' *.py | ||
python3 -m pyappimage.cli build | ||
ls -a | ||
- name: Bundle scrcpy | ||
run: | | ||
export APPIMAGE_EXTRACT_AND_RUN=1 | ||
wget -c $(curl -sL https://api.github.com/repos/srevinsaju/scrcpy-appimage/releases/latest | jq -r '.assets[].browser_download_url') | ||
chmod +x scrcpy*.AppImage | ||
./scrcpy*.AppImage --appimage-extract | ||
mv squashfs-root scrcpy | ||
mkdir squashfs-root | ||
mv scrcpy squashfs-root/. | ||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage | ||
chmod +x appimagetool-x86_64.AppImage | ||
ARCH=x86_64 ./appimagetool*.AppImage -n guiscrcpy.AppDir | ||
./guiscrcpy*.AppImage --appimage-extract | ||
cd squashfs-root/scrcpy | ||
wget https://github.com/AppImageCrafters/AppRun/releases/download/v1.1.2/AppRun-amd64 -O AppRun && chmod +x AppRun | ||
wget https://github.com/AppImageCrafters/AppRun/releases/download/v1.1.2/libapprun_hooks-amd64.so -O libapprun_hooks.so && chmod +x libapprun_hooks.so | ||
cd ../.. | ||
cp pyappimage/.env.template squashfs-root/scrcpy/.env | ||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage | ||
chmod +x appimagetool-x86_64.AppImage | ||
./appimagetool*.AppImage squashfs-root -n -u 'gh-releases-zsync|srevinsaju|guiscrcpy|continuous|guiscrcpy*.AppImage.zsync' guiscrcpy-$(git describe --tags --match '[0-9]*')-$(uname -m).AppImage | ||
mkdir dist | ||
mv guiscrcpy-$(git describe --tags --match '[0-9]*')-$(uname -m).AppImage* dist/. | ||
- name: Install Destop Environment | ||
run: | | ||
echo "adapted from https://github.com/AppImage/appimage.github.io/blob/master/.travis.yml" | ||
sudo apt-get update | ||
sudo apt-get -qq -y install imagemagick libasound2-dev pulseaudio-utils alsa-utils alsa-oss libjack0 desktop-file-utils xmlstarlet xterm xvfb icewm x11-utils x11-apps netpbm xdotool libgl1-mesa-dri libgl1-mesa-dev mesa-utils libosmesa6 libsdl1.2-dev fonts-wqy-microhei libfile-mimeinfo-perl libx11-xcb1 libxcb-xkb1 libxcb-* libxcb-render-util0 libxkbcommon-x11-0 libxkbcommon0 > /dev/null # appstream # TODO: Cache me! | ||
mkdir $HOME/.icewm/ | ||
echo "ShowTaskBar = 0" > $HOME/.icewm/preferences | ||
echo "TaskBarAutoHide = 1" > $HOME/.icewm/preferences | ||
echo "TaskBarShowWorkspaces = 0" > $HOME/.icewm/preferences | ||
echo "TaskBarShowAllWindows = 0" > $HOME/.icewm/preferences | ||
echo "TaskBarShowClock = 0" > $HOME/.icewm/preferences | ||
echo "TaskBarShowMailboxStatus = 0" > $HOME/.icewm/preferences | ||
echo "TaskBarShowCPUStatus = 0" > $HOME/.icewm/preferences | ||
echo "TaskBarShowWindowListMenu = 0" > $HOME/.icewm/preferences | ||
- name: Run headless test | ||
run: | | ||
export LC_ALL=C.UTF-8 | ||
export LANG=C.UTF-8 | ||
export APPIMAGE_EXTRACT_AND_RUN=1 | ||
chmod +x scripts/display-ci.sh | ||
echo "echo Dummy scrcpy" | sudo tee -a /usr/bin/scrcpy | ||
sudo chmod +x /usr/bin/scrcpy | ||
/usr/bin/xvfb-run --auto-servernum ./scripts/display-ci.sh "$(realpath dist/*.AppImage)" | ||
- name: Extract AppImage | ||
run: | | ||
./guiscrcpy-x86_64.AppImage --appimage-extract | ||
- name: Patch PyQt5 | ||
run: | | ||
cp -L /usr/lib/x86_64-linux-gnu/libxkbcommon* squashfs-root/usr/lib/. | ||
cp -L /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 squashfs-root/usr/lib/. | ||
- name: Remove unwanted stuff | ||
run: | | ||
# from | ||
find squashfs-root/opt/python3.8/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/ -type f -not -name libqxcb.so -delete | ||
rm -rf squashfs-root/opt/python3.8/lib/python3.8/site-packages/PyQt5/Qt/plugins/egldeviceintegrations | ||
rm -rf squashfs-root/opt/python3.8/lib/python3.8/site-packages/PyQt5/Qt/plugins/{audio,gamepads,geometryloaders,geoservices,mediaservice,playlistformats,position,renderplugins,sceneparsers,sensorgestures,sensors,sqldrivers,texttospeech,wayland*,webview,xcbglintegrations} | ||
rm -rf squashfs-root/opt/python3.8/lib/python3.8/site-packages/PyQt5/Qt/qml | ||
rm squashfs-root/opt/python3.8/lib/python3.8/site-packages/PyQt5/Qt/lib/libQt5{Bluetooth,Concurrent,Designer,Help,Location,Multimedia,Network,Nfc,OpenGL,Positioning,Qml,Quick,RemoteObjects,Sensors,SerialPort,Sql,Test,WaylandClient,WebChannel,WebSockets,Xml}* | ||
rm -rf squashfs-root/opt/python3.8/lib/python3.8/site-packages/pip | ||
- name: Download AppImage Tool | ||
run: | | ||
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage | ||
chmod +x ./appimagetool-x86_64.AppImage | ||
- name: Reimage AppImage | ||
run: | | ||
rm ./guiscrcpy-x86_64.AppImage | ||
./appimagetool-x86_64.AppImage squashfs-root -n -u 'gh-releases-zsync|srevinsaju|guiscrcpy|latest|guiscrcpy*.AppImage.zsync' | ||
mkdir -p appimage_dist | ||
mv guiscrcpy*.AppImage* appimage_dist/. | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: guiscrcpy-continuous-x86_64.AppImage | ||
path: 'appimage_dist/' | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: guiscrcpy-continuous-x86_64.AppImage | ||
path: 'dist/' | ||
|
||
|
||
Windows: | ||
|