-
Notifications
You must be signed in to change notification settings - Fork 31
91 lines (77 loc) · 3.84 KB
/
Linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Linux Release
on:
workflow_dispatch:
branches: [ "master" ]
env:
SOURCE_DIR: ${{ github.workspace }}/platform
ARTIFACT: ${{ github.workspace }}/platform/build/MLVApp.AppImage
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Fix APT sources
run: |
sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup
echo "deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu focal-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
sudo apt-get update
- name: Install compiler & Qt
run: |
sudo apt-get install --fix-missing --no-install-recommends make g++ qt5-qmake qtbase5-dev qtmultimedia5-dev libqt5multimedia5 libqt5multimedia5-plugins libqt5opengl5-dev libqt5designer5 libqt5svg5-dev libfuse2 libxkbcommon-x11-0 appstream
- name: Inspect Qt plugin directories
run: |
ls -l /usr/lib/x86_64-linux-gnu/qt5/plugins/
ls -l /usr/lib/x86_64-linux-gnu/qt5/plugins/audio
ls -l /usr/lib/x86_64-linux-gnu/qt5/plugins/mediaservice
ls -l /usr/lib/x86_64-linux-gnu/qt5/plugins/playlistformats
- name: Create build directory
run: mkdir ${{ env.SOURCE_DIR }}/build
- name: Build
working-directory: ${{ env.SOURCE_DIR }}/build
run: |
qmake ${{ env.SOURCE_DIR }}/qt/MLVApp.pro
make -j8
ls -al
mkdir image
cd image
cp ${{ env.SOURCE_DIR }}/qt/RetinaIMG/MLVAPP.png .
cp ${{ env.SOURCE_DIR }}/qt/mlvapp.desktop .
ls -al
mkdir usr
cd usr
mkdir bin
cd bin
tar -C ${{ env.SOURCE_DIR }}/qt/FFmpeg/ -xvJf ${{ env.SOURCE_DIR }}/qt/FFmpeg/ffmpegLinux.tar.xz --strip=1 --wildcards */ffmpeg
chmod a+x ${{ env.SOURCE_DIR }}/qt/FFmpeg/ffmpeg
mv ${{ env.SOURCE_DIR }}/qt/FFmpeg/ffmpeg .
tar -C ${{ env.SOURCE_DIR }}/qt/raw2mlv/ -xvJf ${{ env.SOURCE_DIR }}/qt/raw2mlv/raw2mlvLinux.tar.xz --strip=1 --wildcards */raw2mlv
chmod a+x ${{ env.SOURCE_DIR }}/qt/raw2mlv/raw2mlv
mv ${{ env.SOURCE_DIR }}/qt/raw2mlv/raw2mlv .
ls -al
- name: Copy Qt multimedia plugins
working-directory: ${{ env.SOURCE_DIR }}/build
run: |
mkdir -p image/usr/plugins/audio
mkdir -p image/usr/plugins/mediaservice
mkdir -p image/usr/plugins/playlistformats
cp -r /usr/lib/x86_64-linux-gnu/qt5/plugins/audio/* image/usr/plugins/audio/ || true
cp -r /usr/lib/x86_64-linux-gnu/qt5/plugins/mediaservice/* image/usr/plugins/mediaservice/ || true
cp -r /usr/lib/x86_64-linux-gnu/qt5/plugins/playlistformats/* image/usr/plugins/playlistformats/ || true
- name: Install LinuxDeploy
uses: miurahr/[email protected]
with:
plugins: qt appimage
- name: Create Appimage
working-directory: ${{ env.SOURCE_DIR }}/build
run: |
export QT_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
linuxdeploy-x86_64.AppImage --desktop-file=image/mlvapp.desktop --executable=mlvapp --appdir=image --plugin=qt --output=appimage --verbosity=3 --icon-file=image/MLVAPP.png
cp MLVApp-*.AppImage ${{ env.ARTIFACT }}
- name: Save build artifact
uses: actions/upload-artifact@master
with:
name: MLVApp
path: ${{ env.ARTIFACT }}