-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_all
executable file
·56 lines (49 loc) · 1.39 KB
/
build_all
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
#!/bin/bash
# Dependencies:
# - jq
# - meson
# - ninja
# - xorriso
# - zip
# - mingw32-x86_64 toolchain
# - i686-elf-gcc
# - nasm
# - xorriso
# - mtools
VERSION=$(mesonintrospect --projectinfo build | jq -r .version)
rm -rf artifacts
mkdir -p artifacts
# Linux Releases
rm -rf build
LGT_V=faststack-$VERSION-unknown-linux-glibc
mkdir -p artifacts/$LGT_V
meson build -Dfrontend=terminal
ninja -C build
cp build/faststack artifacts/$LGT_V/faststack-terminal
strip artifacts/$LGT_V/faststack-terminal
rm -rf build
meson build -Dfrontend=sdl
ninja -C build
cp build/faststack artifacts/$LGT_V/faststack-sdl2
strip artifacts/$LGT_V/faststack-sdl2
cp examples/fs.ini artifacts/$LGT_V
cd artifacts && tar -czvf $LGT_V.tar.gz $LGT_V && cd ..
rm -rf artifacts/$LGT_V
# Windows Releases
rm -rf build
WG_V=faststack-$VERSION-x86_64-windows-gnu
mkdir -p artifacts/$WG_V
meson build -Dfrontend=sdl --cross-file=meson_cross.txt
ninja -C build
cp build/faststack artifacts/$WG_V/faststack.exe
strip artifacts/$LGT_V/faststack.exe
cp examples/fs.ini artifacts/$WG_V
cp dlls/libfreetype-6.dll dlls/SDL2.dll dlls/SDL2_ttf.dll dlls/zlib1.dll artifacts/$WG_V
cd artifacts && zip -9 -r $WG_V.zip $WG_V && cd ..
rm -rf artifacts/$WG_V
# Iso Releases
make -C src/frontend/kernel iso
cp src/frontend/kernel/stackos.iso artifacts/stackos-$VERSION-x86.iso
# Source Code Releases
ninja -C build dist
cp build/meson-dist/*.tar.xz artifacts