-
Notifications
You must be signed in to change notification settings - Fork 90
100 lines (98 loc) · 5.44 KB
/
vangers_macos_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
name: Vangers MacOS Build
on: [push, pull_request]
env:
MACOSX_DEPLOYMENT_TARGET: 11
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
# - name: update repos
# run: |
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# brew update
- name: install libs
run: |
brew install ninja yasm dylibbundler
- name: install our libs
run: |
# brew reinstall -s ./formulas/libsndfile.rb --force --verbose --debug
# brew reinstall -s ./formulas/libogg.rb --force --verbose --debug
# brew reinstall -s ./formulas/libvorbis.rb --force --verbose --debug
# brew install -s ./formulas/sdl2.rb --force --verbose --debug
# brew install -s ./formulas/sdl2_net.rb --force --verbose --debug
brew install sdl2 sdl2_net libvorbis libogg libsndfile
- name: clunk -- download lib
run: git clone --depth 1 https://github.com/stalkerg/clunk.git clunk
- name: clunk -- create build dir
run: mkdir clunk/build
- name: clunk -- build and install
run: cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G Ninja .. && ninja && sudo ninja install
working-directory: clunk/build
env:
MACOSX_DEPLOYMENT_TARGET: 10.12
- name: ffmpeg -- download
run: git clone --depth 1 --branch n4.2.3 https://git.ffmpeg.org/ffmpeg.git ffmpeg
- name: ffmpeg -- configure
run: ./configure --enable-shared --prefix=/usr/local
--cc=clang
--arch=x86_64
--cpu=westmere
--disable-everything
--enable-swscale
--enable-zlib
--enable-demuxer=avi,rawvideo
--enable-decoder=png,rawvideo,h264
--enable-parser=png
--enable-protocol=file
--disable-d3d11va
--disable-dxva2
--disable-avx
--disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg
--disable-static --disable-bzlib --disable-libopenjpeg --disable-iconv
working-directory: ffmpeg
- name: ffmpeg -- build and install
run: |
make -j4
sudo make install
working-directory: ffmpeg
- name: configure
run: mkdir build && cd build && cmake -G Ninja ..
- name: make
run: ninja
working-directory: build
- name: vangers -- prepare release folder
run: |
mkdir Vangers.app/Contents/Frameworks
mkdir Vangers.app/Contents/Libs
cp -L /usr/local/lib/libSDL2-2.0.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libSDL2_net-2.0.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libavcodec.58.54.100.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libavformat.58.29.100.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libavutil.56.31.100.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libogg.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libvorbis.0.dylib Vangers.app/Contents/Libs/
cp -L /usr/local/lib/libvorbisfile.3.dylib Vangers.app/Contents/Libs/
cp clunk/build/libclunk.dylib Vangers.app/Contents/Libs/
cp build/src/vangers Vangers.app/Contents/MacOS/Vangers
dylibbundler -x Vangers.app/Contents/MacOS/Vangers
strip Vangers.app/Contents/MacOS/Vangers
sudo chmod 777 Vangers.app/Contents/Libs/*
install_name_tool -change /usr/local/opt/libogg/lib/libogg.0.dylib "@executable_path/../Libs/libogg.0.dylib" Vangers.app/Contents/Libs/libvorbis.0.dylib
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.6/lib/libvorbis.0.dylib "@executable_path/../Libs/libvorbis.0.dylib" Vangers.app/Contents/Libs/libvorbisfile.3.dylib
install_name_tool -change /usr/local/opt/libogg/lib/libogg.0.dylib "@executable_path/../Libs/libogg.0.dylib" Vangers.app/Contents/Libs/libvorbisfile.3.dylib
mv Vangers.app/Contents/Libs/libavcodec.58.54.100.dylib Vangers.app/Contents/Libs/libavcodec.58.dylib
mv Vangers.app/Contents/Libs/libavformat.58.29.100.dylib Vangers.app/Contents/Libs/libavformat.58.dylib
mv Vangers.app/Contents/Libs/libavutil.56.31.100.dylib Vangers.app/Contents/Libs/libavutil.56.dylib
install_name_tool -change "@executable_path/../libs/libavcodec.58.54.100.dylib" "@executable_path/../Libs/libavcodec.58.dylib" Vangers.app/Contents/MacOS/Vangers
install_name_tool -change "@executable_path/../libs/libavformat.58.29.100.dylib" "@executable_path/../Libs/libavformat.58.dylib" Vangers.app/Contents/MacOS/Vangers
install_name_tool -change "@executable_path/../libs/libavutil.56.31.100.dylib" "@executable_path/../Libs/libavutil.56.dylib" Vangers.app/Contents/MacOS/Vangers
install_name_tool -change "/usr/local/lib/libavutil.56.dylib" "@executable_path/../Libs/libavutil.56.dylib" Vangers.app/Contents/Libs/libavcodec.58.dylib
install_name_tool -change "/usr/local/lib/libavutil.56.dylib" "@executable_path/../Libs/libavutil.56.dylib" Vangers.app/Contents/Libs/libavformat.58.dylib
install_name_tool -change "/usr/local/lib/libavcodec.58.dylib" "@executable_path/../Libs/libavcodec.58.dylib" Vangers.app/Contents/Libs/libavformat.58.dylib
install_name_tool -change "/usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib" "@executable_path/../Libs/libSDL2-2.0.0.dylib" Vangers.app/Contents/Libs/libSDL2_net-2.0.0.dylib
tar -cvf Vangers.app.tar Vangers.app
- uses: actions/upload-artifact@v2
with:
name: Vangers.app.tar
path: Vangers.app.tar