-
-
Notifications
You must be signed in to change notification settings - Fork 46
150 lines (147 loc) · 4.83 KB
/
build.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: build
on:
push:
branches: ["*"]
pull_request:
workflow_call:
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-22.04
name: Ubuntu
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build git pkg-config \
libfuse2 libgtk-3-dev libglfw3-dev libfreetype6-dev libmpv-dev
- name: Build ImPlay
env:
DEPLOY_GTK_VERSION: 3
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCREATE_PACKAGE=ON -G Ninja ..
cmake --build . --target package
cmake --install . --prefix AppDir/usr
curl -LO https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
curl -LO https://raw.githubusercontent.com/linuxdeploy/linuxdeploy-plugin-gtk/master/linuxdeploy-plugin-gtk.sh
chmod +x linuxdeploy-x86_64.AppImage linuxdeploy-plugin-gtk.sh
./linuxdeploy-x86_64.AppImage --appdir $(pwd)/AppDir --plugin gtk --output appimage
mv ImPlay*.AppImage $(echo ImPlay-*.deb | sed 's/deb/AppImage/')
- uses: actions/upload-artifact@v3
with:
name: ImPlay-linux
path: |
build/ImPlay-*.AppImage
build/ImPlay-*.deb
macos:
runs-on: macos-12
name: macOS
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install dependencies
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
run: |
brew install cmake ninja git mpv freetype2 pkg-config
- name: Build ImPlay
env:
PKG_CONFIG_PATH: /usr/local/opt/libarchive/lib/pkgconfig
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DUSE_PATCHED_GLFW=ON -DCREATE_PACKAGE=ON -G Ninja ..
cmake --build . --target package
- uses: actions/upload-artifact@v3
with:
name: ImPlay-macOS
path: build/ImPlay-*.dmg
win:
runs-on: windows-2019
name: Windows
steps:
- name: Prepare git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: mingw64
install: >-
base-devel
git
p7zip
mingw-w64-x86_64-gcc
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
mingw-w64-x86_64-freetype
update: true
- name: Build ImPlay
shell: msys2 {0}
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE -DUSE_PATCHED_GLFW=ON -DUSE_OPENGL_ES3=ON -DCREATE_PACKAGE=ON -G Ninja ..
cmake --build . --target package
- uses: actions/upload-artifact@v3
with:
name: ImPlay-win64
path: |
build/ImPlay-*.msi
build/ImPlay-*.zip
publish:
needs: [linux, macos, win]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- run: |
for f in ImPlay-*/*; do
mv "$f" "${f/ImPlay-*-/ImPlay-dev-}"
done
- uses: rickstaa/action-create-tag@v1
with:
tag: continuous
force_push_tag: true
- uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
tag: continuous
artifacts: "ImPlay-dev-*"
allowUpdates: true
prerelease: true
name: Continuous build
body: |
> WARNING: This is the DEV version, may contains bugs or unfinished features, [Stable version](https://github.com/tsl0922/ImPlay/releases/latest).
# Install
## Windows
- MSI
- Download the msi executable
- Run the MSI installer
- Run ImPlay from Start Menu
- Zip
- Download the windows zip
- Extract the zip
- Run `ImPlay.exe`
## macOS
- Download the dmg file
- Double click the dmg to show it's contents
- Drag ImPlay to `Applications` folder
- Run ImPlay from Launchpad
## Linux
- Debian Package
- Download the deb file
- Install: `sudo apt install ./ImPlay-*.deb`
- Run `ImPlay`
- AppImage
- Download the AppImage file
- Run `chmod u+x ImPlay-*.AppImage && ./ImPlay-*.AppImage`