mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-20 16:35:47 +08:00
Turnip Option Added
This commit is contained in:
@@ -12,26 +12,46 @@ rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box86
|
||||
if [ $? -ne 0 ]; then
|
||||
git clone https://github.com/ptitSeb/box86
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '仓库克隆失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
box86_url="https://github.com/ptitSeb/box86"
|
||||
box64_url="https://github.com/ptitSeb/box64"
|
||||
|
||||
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box64
|
||||
if [ $? -ne 0 ]; then
|
||||
git clone https://github.com/ptitSeb/box64
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '仓库克隆失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
local url="${mirror}${box86_url}"
|
||||
echo "尝试从 $url 下载box86..."
|
||||
git clone "${url}"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "成功下载box86"
|
||||
break
|
||||
fi
|
||||
if [ -z "$mirror" ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '仓库克隆失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
local url="${mirror}${box64_url}"
|
||||
echo "尝试从 $url 下载box64..."
|
||||
git clone "${url}"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "成功下载box64"
|
||||
break
|
||||
fi
|
||||
if [ -z "$mirror" ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '仓库克隆失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
echo "正在编译box86..."
|
||||
cd box86
|
||||
mkdir build
|
||||
cd build
|
||||
@@ -41,6 +61,7 @@ cd ../..
|
||||
mv box86/build/box86 ../cross
|
||||
mv box86/x86lib ../cross
|
||||
|
||||
echo "正在编译box64..."
|
||||
cd box64
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
@@ -4,25 +4,35 @@ rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
MIRROR_SITE=https://mirror.ghproxy.com
|
||||
RELEASE_PAGE=https://github.com/doitsujin/dxvk/releases
|
||||
LATEST_DXVK_TAG=$(curl -L $RELEASE_PAGE | grep -oP 'Version \K[^"]*</h2>' | cut -d "<" -f 1 | head -n 1)
|
||||
if [ -z "$LATEST_DXVK_TAG" ]
|
||||
then
|
||||
LATEST_DXVK_TAG="2.3"
|
||||
LATEST_DXVK_TAG="2.4"
|
||||
fi
|
||||
LATEST_DXVK_NAME="dxvk-$LATEST_DXVK_TAG.tar.gz"
|
||||
LATEST_DXVK_LINK="https://github.com/doitsujin/dxvk/releases/download/v$LATEST_DXVK_TAG/$LATEST_DXVK_NAME"
|
||||
|
||||
wget $MIRROR_SITE/$LATEST_DXVK_LINK
|
||||
if [ $? -ne 0 ]; then
|
||||
wget $LATEST_DXVK_LINK
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
local url="${mirror}$LATEST_DXVK_LINK"
|
||||
echo "尝试从 $url 下载dxvk..."
|
||||
wget "${url}"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "成功下载dxvk"
|
||||
break
|
||||
fi
|
||||
if [ -z "$mirror" ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
wineboot
|
||||
tar xvf $LATEST_DXVK_NAME
|
||||
|
||||
@@ -32,7 +32,6 @@ rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
MIRROR_SITE=https://mirror.ghproxy.com
|
||||
RELEASE_PAGE=https://github.com/Kron4ek/Wine-Builds/releases
|
||||
#LATEST_WINE_TAG=proton-$(curl -L $RELEASE_PAGE | grep -oP 'Proton \K[^"]*</h2>' | cut -d "<" -f 1 | head -n 1) #proton
|
||||
LATEST_WINE_TAG=$(curl -L $RELEASE_PAGE | grep -oP 'Wine \K[^"]*</h2>' | cut -d "<" -f 1 | head -n 1) #vanilla
|
||||
@@ -43,15 +42,26 @@ fi
|
||||
LATEST_WINE_NAME=wine-$LATEST_WINE_TAG-amd64.tar.xz
|
||||
LATEST_WINE_LINK=$RELEASE_PAGE/download/$LATEST_WINE_TAG/$LATEST_WINE_NAME
|
||||
|
||||
wget $MIRROR_SITE/$LATEST_WINE_LINK
|
||||
if [ $? -ne 0 ]; then
|
||||
wget $LATEST_WINE_LINK
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
local url="${mirror}$LATEST_WINE_LINK"
|
||||
echo "尝试从 $url 下载wine..."
|
||||
wget "${url}"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "成功下载wine"
|
||||
break
|
||||
fi
|
||||
if [ -z "$mirror" ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
tar xvf $LATEST_WINE_NAME
|
||||
mv wine-$LATEST_WINE_TAG-amd64 ../cross/wine
|
||||
|
||||
Reference in New Issue
Block a user