Skip to content

Commit a4288eb

Browse files
committed
Updated build system
1 parent 2649735 commit a4288eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1676
-214
lines changed

.github/workflows/fsbuild.yml

+273
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,273 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
- stable
9+
pull_request:
10+
branches:
11+
- master
12+
- dev
13+
- stable
14+
15+
jobs:
16+
Linux_x86-64:
17+
runs-on: ubuntu-18.04
18+
19+
steps:
20+
- name: Install deb packages
21+
run: >-
22+
sudo apt install
23+
dos2unix
24+
gettext
25+
intltool
26+
libao-dev
27+
libasound2-dev
28+
libevdev-dev
29+
libgbm-dev
30+
libgl-dev
31+
libglu-dev
32+
libopenal-dev
33+
libpulse-dev
34+
libudev-dev
35+
libusb-1.0-0-dev
36+
libx11-dev
37+
libx11-xcb-dev
38+
libxcb1-dev
39+
libxcb-glx0-dev
40+
libxcb-icccm4-dev
41+
libxcb-image0-dev
42+
libxcb-keysyms1-dev
43+
libxcb-randr0-dev
44+
libxcb-render-util0-dev
45+
libxcb-shape0-dev
46+
libxcb-shm0-dev
47+
libxcb-sync0-dev
48+
libxcb-xfixes0-dev
49+
libxcb-xinerama0-dev
50+
libxcursor-dev
51+
libxext-dev
52+
libxfixes-dev
53+
libxi-dev
54+
libxinerama-dev
55+
libxrandr-dev
56+
libxrender-dev
57+
x11proto-dev
58+
59+
- name: Install pip packages
60+
run: |
61+
sudo python3 -m pip install -U pip setuptools
62+
sudo python3 -m pip install -U meson ninja
63+
64+
- uses: actions/checkout@v2
65+
with:
66+
fetch-depth: 0
67+
68+
- name: Cache dependencies
69+
uses: actions/cache@v2
70+
id: fsdeps_cache
71+
with:
72+
path: fsdeps/_prefix
73+
key: fsdeps_${{ hashFiles('fsdeps/**/*') }}_${{ runner.os }}
74+
75+
- name: Build dependencies
76+
if: steps.fsdeps_cache.outputs.cache-hit != 'true'
77+
run: fsdeps/make
78+
79+
- name: Update version
80+
run: fsbuild/version --update --auto
81+
82+
- name: Bootstrap
83+
run: fsdeps/use fsbuild/bootstrap
84+
85+
- name: Configure
86+
run: fsdeps/use fsbuild/configure
87+
88+
- name: Make
89+
run: fsdeps/use fsbuild/make
90+
91+
- name: Bundle
92+
run: fsdeps/use fsbuild/bundle
93+
94+
- name: Archive
95+
run: fsbuild/archive
96+
97+
- uses: actions/upload-artifact@v2
98+
with:
99+
name: Linux_x86-64
100+
101+
path: fsbuild/_dist/*
102+
103+
- name: Upload build to Dropbox folder
104+
if: >-
105+
github.ref == 'refs/heads/master' ||
106+
github.ref == 'refs/heads/dev' ||
107+
github.ref == 'refs/heads/stable'
108+
run: |
109+
python3 -m pip install dropbox
110+
fsbuild/upload
111+
env:
112+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
113+
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
114+
115+
macOS_x86-64:
116+
runs-on: macos-10.15
117+
118+
steps:
119+
- name: Install brew packages
120+
run: brew install autoconf automake dos2unix meson
121+
122+
- uses: actions/checkout@v2
123+
with:
124+
fetch-depth: 0
125+
126+
- name: Cache dependencies
127+
uses: actions/cache@v2
128+
id: fsdeps_cache
129+
with:
130+
path: fsdeps/_prefix
131+
key: fsdeps_${{ hashFiles('fsdeps/**/*') }}_${{ runner.os }}
132+
133+
- name: Build dependencies
134+
if: steps.fsdeps_cache.outputs.cache-hit != 'true'
135+
run: fsdeps/make
136+
137+
- name: Update version
138+
run: fsbuild/version --update --auto
139+
140+
- name: Bootstrap
141+
run: fsdeps/use fsbuild/bootstrap
142+
143+
- name: Configure
144+
run: fsdeps/use fsbuild/configure
145+
146+
- name: Make
147+
run: fsdeps/use fsbuild/make
148+
149+
- name: Bundle
150+
run: fsbuild/bundle
151+
152+
- name: Prepare signing certificate
153+
run: |
154+
echo $SIGNING_CERTIFICATE_P12_DATA | base64 --decode > certificate.p12
155+
security create-keychain -p $KEYCHAIN_PASSWORD build.keychain
156+
security default-keychain -s build.keychain
157+
security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain
158+
security import certificate.p12 -k build.keychain -P $SIGNING_CERTIFICATE_PASSWORD -T /usr/bin/codesign
159+
security set-key-partition-list -S apple-tool:,apple: -s -k $KEYCHAIN_PASSWORD build.keychain
160+
env:
161+
KEYCHAIN_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
162+
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.MACOS_CERTIFICATE_P12_DATA }}
163+
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
164+
165+
- name: Sign
166+
run: fsbuild/sign
167+
168+
- name: Notarize
169+
run: fsbuild/notarize
170+
env:
171+
NOTARIZATION_PASSWORD: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
172+
NOTARIZATION_PROVIDER: ${{ secrets.MACOS_NOTARIZATION_PROVIDER }}
173+
NOTARIZATION_USERNAME: ${{ secrets.MACOS_NOTARIZATION_USERNAME }}
174+
175+
- name: Archive
176+
run: fsbuild/archive
177+
178+
- uses: actions/upload-artifact@v2
179+
with:
180+
name: macOS_x86-64
181+
path: fsbuild/_dist/*
182+
183+
- name: Upload build to Dropbox folder
184+
if: >-
185+
github.ref == 'refs/heads/master' ||
186+
github.ref == 'refs/heads/dev' ||
187+
github.ref == 'refs/heads/stable'
188+
run: |
189+
python3 -m pip install dropbox
190+
fsbuild/upload
191+
env:
192+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
193+
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}
194+
195+
Windows_x86-64:
196+
runs-on: windows-2016
197+
198+
defaults:
199+
run:
200+
shell: msys2 {0}
201+
202+
steps:
203+
- uses: msys2/setup-msys2@v2
204+
with:
205+
update: true
206+
install: >-
207+
autoconf
208+
automake
209+
base-devel
210+
gettext
211+
git
212+
libtool
213+
make
214+
mingw-w64-x86_64-cmake
215+
mingw-w64-x86_64-gcc
216+
mingw-w64-x86_64-icoutils
217+
mingw-w64-x86_64-meson
218+
mingw-w64-x86_64-openal
219+
mingw-w64-x86_64-pkg-config
220+
mingw-w64-x86_64-python
221+
mingw-w64-x86_64-python-pip
222+
unzip
223+
zip
224+
225+
- uses: actions/checkout@v2
226+
with:
227+
fetch-depth: 0
228+
229+
- name: Cache dependencies
230+
uses: actions/cache@v2
231+
id: fsdeps_cache
232+
with:
233+
path: fsdeps/_prefix
234+
key: fsdeps_${{ hashFiles('fsdeps/**/*') }}_${{ runner.os }}
235+
236+
- name: Build dependencies
237+
if: steps.fsdeps_cache.outputs.cache-hit != 'true'
238+
run: fsdeps/make
239+
240+
- name: Update version
241+
run: fsbuild/version --update --auto
242+
243+
- name: Bootstrap
244+
run: fsdeps/use fsbuild/bootstrap
245+
246+
- name: Configure
247+
run: fsdeps/use fsbuild/configure
248+
249+
- name: Make
250+
run: fsdeps/use fsbuild/make
251+
252+
- name: Bundle
253+
run: fsbuild/bundle
254+
255+
- name: Archive
256+
run: fsbuild/archive
257+
258+
- uses: actions/upload-artifact@v2
259+
with:
260+
name: Windows_x86-64
261+
path: fsbuild/_dist/*
262+
263+
- name: Upload build to Dropbox folder
264+
if: >-
265+
github.ref == 'refs/heads/master' ||
266+
github.ref == 'refs/heads/dev' ||
267+
github.ref == 'refs/heads/stable'
268+
run: |
269+
python3 -m pip install dropbox
270+
fsbuild/upload
271+
env:
272+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
273+
DROPBOX_ACCESS_TOKEN: ${{ secrets.DROPBOX_ACCESS_TOKEN }}

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
*~
22
autom4te.cache
3+
/CAPSImg/configure
4+
/CAPSImg/Makefile
35
config.h
46
config.h.in
57
config.log
68
config.status
7-
configure
89
/dist.fs
910
*.dll
1011
*.dll.a
1112
*.dylib
1213
*.log
13-
Makefile
1414
*.o
1515
*.so
1616
*.so.*

Makefile

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
uname := $(shell uname -a)
2+
ifneq ($(findstring Msys,$(uname)),)
3+
os := Windows
4+
else
5+
ifneq ($(findstring Darwin,$(uname)),)
6+
os := macOS
7+
else
8+
os := Linux
9+
endif
10+
endif
11+
12+
all: build
13+
14+
build:
15+
make -C CAPSImg
16+
ifeq (${os},Windows)
17+
cp CAPSImg/CAPSImg.dll capsimg.dll
18+
else
19+
ifeq (${os},macOS)
20+
cp CAPSImg/libcapsimage.dylib capsimg.so
21+
install_name_tool -id capsimg.so capsimg.so
22+
else
23+
cp CAPSImg/libcapsimage.so.5.1 capsimg.so
24+
endif
25+
endif
26+
27+
clean:
28+
make -C CAPSImg clean
29+
rm -Rf capsimg${dll} dist.fs
30+
31+
distclean: clean
32+
make -C CAPSImg distclean

0 commit comments

Comments
 (0)