2020-12-30 08:15:51 +13:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
BRANCH=`echo ${GITHUB_REF##*/}`
|
2021-07-11 11:12:36 +12:00
|
|
|
build_date=$(date +%F -r .)
|
2020-12-30 08:15:51 +13:00
|
|
|
|
2020-12-30 11:52:33 +13:00
|
|
|
ver=$(cat /yuzu/README.md | grep -o 'early-access [[:digit:]]*' | cut -c 14-17)
|
2020-12-30 09:23:31 +13:00
|
|
|
title="yuzu Early Access $ver"
|
2020-12-30 08:15:51 +13:00
|
|
|
|
2020-12-30 08:39:55 +13:00
|
|
|
yuzupatch=( $(ls -d patches/* ) )
|
2020-12-30 09:14:44 +13:00
|
|
|
for i in "${yuzupatch[@]}"; do patch -p1 < "$i"; done
|
2020-12-30 08:15:51 +13:00
|
|
|
|
2021-05-11 12:43:31 +12:00
|
|
|
find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror$/-W/g' {} +
|
|
|
|
find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror=.*)$/ )/g' {} +
|
|
|
|
find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/^.*-Werror=.*$/ /g' {} +
|
|
|
|
find . -name "CMakeLists.txt" ! -path "*/externals/*" -exec sed -i 's/-Werror/-W/g' {} +
|
2020-12-31 09:25:13 +13:00
|
|
|
|
2021-12-09 03:19:15 +13:00
|
|
|
# Add cache if does not exist
|
|
|
|
if [[ ! -e ~/.ccache ]]; then
|
|
|
|
mkdir ~/.ccache
|
|
|
|
fi
|
|
|
|
CACHEDIR=~/.ccache
|
|
|
|
ls -al $CACHEDIR
|
2021-12-09 02:57:24 +13:00
|
|
|
###############################################
|
|
|
|
# Install SDL
|
|
|
|
SDL2VER=2.0.18
|
|
|
|
#SDL2
|
|
|
|
cd $CACHEDIR
|
|
|
|
if [[ ! -e SDL2-${SDL2VER} ]]; then
|
|
|
|
curl -sLO https://libsdl.org/release/SDL2-${SDL2VER}.tar.gz
|
|
|
|
tar -xzf SDL2-${SDL2VER}.tar.gz
|
|
|
|
cd SDL2-${SDL2VER}
|
|
|
|
./configure --prefix=/usr
|
|
|
|
make && cd ../
|
|
|
|
rm SDL2-${SDL2VER}.tar.gz
|
|
|
|
fi
|
2021-12-09 03:19:15 +13:00
|
|
|
make -C SDL2-${SDL2VER} install
|
2021-12-09 02:57:24 +13:00
|
|
|
sdl2-config --version
|
|
|
|
cd /yuzu
|
|
|
|
###############################################
|
|
|
|
|
2021-10-03 06:06:59 +13:00
|
|
|
pip3 install conan --upgrade
|
|
|
|
|
2020-12-30 08:15:51 +13:00
|
|
|
mkdir build && cd build
|
|
|
|
|
2021-02-15 18:52:39 +13:00
|
|
|
cmake .. \
|
2021-05-07 02:26:03 +12:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2021-02-16 08:10:14 +13:00
|
|
|
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
2021-02-15 18:52:39 +13:00
|
|
|
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
|
|
|
-DTITLE_BAR_FORMAT_IDLE="$title" \
|
|
|
|
-DTITLE_BAR_FORMAT_RUNNING="$title | {3}" \
|
|
|
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
|
|
|
-DGIT_BRANCH="HEAD" \
|
|
|
|
-DGIT_DESC="$msvc" \
|
|
|
|
-DUSE_DISCORD_PRESENCE=ON \
|
|
|
|
-DENABLE_QT_TRANSLATION=ON \
|
|
|
|
-DBUILD_DATE="$build_date" \
|
|
|
|
-DYUZU_USE_QT_WEB_ENGINE=OFF \
|
2021-12-09 03:19:15 +13:00
|
|
|
-DYUZU_USE_EXTERNAL_SDL2=OFF \
|
2021-02-15 18:52:39 +13:00
|
|
|
-G Ninja
|
2020-12-30 09:23:31 +13:00
|
|
|
|
|
|
|
ninja
|
|
|
|
|
|
|
|
|
|
|
|
cd /tmp
|
|
|
|
curl -sLO "https://raw.githubusercontent.com/$GITHUB_REPOSITORY/$BRANCH/.github/workflows/appimage.sh"
|
|
|
|
chmod a+x appimage.sh
|
|
|
|
./appimage.sh
|