mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-20 16:35:47 +08:00
box and wine initial support
This commit is contained in:
@@ -8,12 +8,13 @@ sudo apt reinstall -y libc6-dev
|
||||
|
||||
mkdir $HOME/.local/share/tiny/cross
|
||||
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
git clone https://github.com/ptitSeb/box86
|
||||
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box86
|
||||
if [ $? -ne 0 ]; then
|
||||
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box86
|
||||
git clone https://github.com/ptitSeb/box86
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '仓库克隆失败...退出安装...'
|
||||
@@ -21,9 +22,9 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
git clone https://github.com/ptitSeb/box64
|
||||
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box64
|
||||
if [ $? -ne 0 ]; then
|
||||
git clone https://mirror.ghproxy.com/https://github.com/ptitSeb/box64
|
||||
git clone https://github.com/ptitSeb/box64
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '仓库克隆失败...退出安装...'
|
||||
@@ -35,17 +36,19 @@ cd box86
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DARM64=1 -DBAD_SIGNAL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
make
|
||||
make -j
|
||||
cd ../..
|
||||
mv box86/build/box86 ../cross
|
||||
mv box86/x86lib ../cross
|
||||
|
||||
cd box64
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DARM64=1 -DBAD_SIGNAL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
make
|
||||
make -j
|
||||
cd ../..
|
||||
mv box64/build/box64 ../cross
|
||||
mv box64/x64lib ../cross
|
||||
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
|
||||
@@ -4,12 +4,23 @@ sudo apt update
|
||||
sudo apt upgrade -y
|
||||
sudo apt install -y nano cabextract libfreetype6 libfreetype6:armhf libfontconfig libfontconfig:armhf libxext6 libxext6:armhf libxinerama-dev libxinerama-dev:armhf libxxf86vm1 libxxf86vm1:armhf libxrender1 libxrender1:armhf libxcomposite1 libxcomposite1:armhf libxrandr2 libxrandr2:armhf libxi6 libxi6:armhf libxcursor1 libxcursor1:armhf libvulkan-dev libvulkan-dev:armhf zenity
|
||||
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
wget https://github.com/Kron4ek/Wine-Builds/releases/download/8.20/wine-8.20-x86.tar.xz
|
||||
MIRROR_SITE=https://mirror.ghproxy.com
|
||||
LATEST_WINE_NAME=$(curl -L https://github.com/Kron4ek/Wine-Builds/releases | grep "amd64\.tar\.xz" | grep "proton" | head -n 1 | awk '{print $NF}')
|
||||
LATEST_WINE_TAG=$(echo $LATEST_WINE_NAME | cut -d "-" -f 2)
|
||||
|
||||
if [ $LATEST_WINE_TAG == proton ]; then
|
||||
LATEST_WINE_TAG=proton-$(echo $LATEST_WINE_NAME | cut -d "-" -f 3)-$(echo $LATEST_WINE_NAME | cut -d "-" -f 4)
|
||||
fi
|
||||
|
||||
LATEST_WINE_LINK=https://github.com/Kron4ek/Wine-Builds/releases/download/$LATEST_WINE_TAG/$LATEST_WINE_NAME
|
||||
|
||||
wget $MIRROR_SITE/$LATEST_WINE_LINK
|
||||
if [ $? -ne 0 ]; then
|
||||
wget https://mirror.ghproxy.com/https://github.com/Kron4ek/Wine-Builds/releases/download/8.20/wine-8.20-x86.tar.xz
|
||||
wget $LATEST_WINE_LINK
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
@@ -17,9 +28,9 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
wget https://github.com/Kron4ek/Wine-Builds/releases/download/8.20/wine-8.20-amd64.tar.xz
|
||||
wget $MIRROR_SITE/https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
if [ $? -ne 0 ]; then
|
||||
wget https://mirror.ghproxy.com/https://github.com/Kron4ek/Wine-Builds/releases/download/8.20/wine-8.20-amd64.tar.xz
|
||||
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
@@ -27,52 +38,28 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
if [ $? -ne 0 ]; then
|
||||
wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
tar xvf wine-8.20-x86.tar.xz
|
||||
tar xvf wine-8.20-amd64.tar.xz
|
||||
mv wine-8.20-x86 ../cross/wine32
|
||||
mv wine-8.20-amd64 ../cross/wine64
|
||||
tar xvf $LATEST_WINE_NAME
|
||||
mv wine-$LATEST_WINE_TAG-amd64 ../cross/wine
|
||||
mv winetricks ../cross/winetricks-executable
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks-executable
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
|
||||
echo '#!/bin/bash
|
||||
export WINEPREFIX=~/.wine32
|
||||
box86 '"$HOME/.local/share/tiny/cross/wine32 "'"$@"' > $HOME/.local/share/tiny/cross/wine32-executable
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine32-executable
|
||||
export WINEPREFIX=~/.wine
|
||||
box86 '"$HOME/.local/share/tiny/cross/wine/bin/wine "'"$@"' > $HOME/.local/share/tiny/cross/wine-executable
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine-executable
|
||||
|
||||
echo '#!/bin/bash
|
||||
export WINEPREFIX=~/.wine64
|
||||
box64 '"$HOME/.local/share/tiny/cross/wine64 "'"$@"' > $HOME/.local/share/tiny/cross/wine64-executable
|
||||
export WINEPREFIX=~/.wine
|
||||
box64 '"$HOME/.local/share/tiny/cross/wine/bin/wine64 "'"$@"' > $HOME/.local/share/tiny/cross/wine64-executable
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine64-executable
|
||||
|
||||
echo '#!/bin/bash
|
||||
export BOX86_NOBANNER=1 WINE=wine32 WINEPREFIX=~/.wine32 WINESERVER=~/.local/share/tiny/cross/wine32/bin/wineserver
|
||||
wine32 '"$HOME/.local/share/tiny/cross/winetricks-executable "'"$@"' > $HOME/.local/share/tiny/cross/winetricks32-executable
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks32-executable
|
||||
|
||||
echo '#!/bin/bash
|
||||
export BOX64_NOBANNER=1 WINE=wine64 WINEPREFIX=~/.wine64 WINESERVER=~/.local/share/tiny/cross/wine64/bin/wineserver
|
||||
export BOX64_NOBANNER=1 WINE=wine64 WINEPREFIX=~/.wine WINESERVER=~/.local/share/tiny/cross/wine/bin/wineserver
|
||||
wine64 '"$HOME/.local/share/tiny/cross/winetricks-executable "'"$@"' > $HOME/.local/share/tiny/cross/winetricks64-executable
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks64-executable
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=Wine32 启动器
|
||||
Exec=wine32 start /unix %F
|
||||
Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/wine32.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine32.desktop
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=Wine64 启动器
|
||||
Exec=wine64 start /unix %F
|
||||
@@ -80,13 +67,6 @@ Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/wine64.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine64.desktop
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=Wine32 winetricks 实用工具
|
||||
Exec=winetricks32
|
||||
Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/winetricks32.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks32.desktop
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=Wine64 winetricks 实用工具
|
||||
Exec=winetricks64
|
||||
@@ -94,4 +74,6 @@ Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/winetricks64.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks64.desktop
|
||||
|
||||
echo '安装完成'
|
||||
echo '安装完成,在启用wine后可以点击exe文件选择用wine启动。'
|
||||
echo '程序的运行可能依赖一些配置或组件。比如,一些使用directx的游戏可能需要安装dxvk。'
|
||||
echo '如果缺失可以尝试使用winetricks安装。请务必保持耐心。'
|
||||
|
||||
Reference in New Issue
Block a user