mirror of
https://github.com/Cateners/tiny_computer.git
synced 2026-05-20 16:35:47 +08:00
Update code to v1.0.19
hangover, wechat, termux x11 xfce fix, locale.gen fix...
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo dpkg --add-architecture armhf
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
sudo apt install -y cmake gcc-arm-linux-gnueabihf libc6:armhf
|
||||
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
|
||||
|
||||
box86_url="https://github.com/ptitSeb/box86"
|
||||
box64_url="https://github.com/ptitSeb/box64"
|
||||
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
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
|
||||
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
|
||||
cmake .. -DARM64=1 -DBAD_SIGNAL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
make -j
|
||||
cd ../..
|
||||
mv box86/build/box86 ../cross
|
||||
mv box86/x86lib ../cross
|
||||
|
||||
echo "正在编译box64..."
|
||||
cd box64
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DARM64=1 -DBAD_SIGNAL=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
make -j
|
||||
cd ../..
|
||||
mv box64/build/box64 ../cross
|
||||
mv box64/x64lib ../cross
|
||||
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
|
||||
echo '安装完成'
|
||||
@@ -1,45 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
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.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"
|
||||
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
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
|
||||
|
||||
wine64 wineboot
|
||||
tar xvf $LATEST_DXVK_NAME
|
||||
mv dxvk-$LATEST_DXVK_TAG/x32/* ~/.wine/drive_c/windows/syswow64
|
||||
mv dxvk-$LATEST_DXVK_TAG/x64/* ~/.wine/drive_c/windows/system32
|
||||
|
||||
cd ~
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
|
||||
echo '安装完成,建议前往wine配置更新配置。'
|
||||
67
extra/cross/install-hangover
Normal file
67
extra/cross/install-hangover
Normal file
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "正在更新软件包..."
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
|
||||
REPO="AndreRH/hangover"
|
||||
API_URL="https://api.github.com/repos/$REPO/releases/latest"
|
||||
|
||||
# 获取最新release的版本号并储存在变量中
|
||||
latest_version=$(wget -qO- $API_URL | grep -oP '"tag_name": "\Khangover-\K([^"]+)' )
|
||||
|
||||
# 检查是否成功获取版本号
|
||||
if [ -z "$latest_version" ]; then
|
||||
echo "无法获取到最新版本号。"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "最新版本: $latest_version"
|
||||
|
||||
hangover_url="https://github.com/AndreRH/hangover/releases/download/hangover-${latest_version}/hangover_${latest_version}_debian12_bookworm_arm64.tar"
|
||||
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
mkdir -p /tmp/hangover
|
||||
cd /tmp/hangover
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
url="${mirror}${hangover_url}"
|
||||
echo "尝试从 $url 下载Hangover..."
|
||||
wget "${url}" -O hangover.tar
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "成功下载Hangover"
|
||||
break
|
||||
fi
|
||||
if [ -z "$mirror" ]; then
|
||||
cd /tmp
|
||||
rm -rf /tmp/hangover
|
||||
echo "下载失败...退出安装..."
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
echo "正在安装Hangover..."
|
||||
tar xvf hangover.tar
|
||||
sudo apt install -y ./hangover-wine_${latest_version}~bookworm_arm64.deb ./hangover-libarm64ecfex_${latest_version}_arm64.deb
|
||||
if [ $? -ne 0 ]; then
|
||||
cd /tmp
|
||||
rm -rf /tmp/hangover
|
||||
echo "安装失败...退出安装..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "正在初始化Wine..."
|
||||
wineboot --init
|
||||
|
||||
echo "正在修复字体..."
|
||||
regedit "Z:\\home\\tiny\\.local\\share\\tiny\\extra\\chn_fonts.reg" && wine reg delete "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes" /va /f
|
||||
|
||||
cd /tmp
|
||||
rm -rf /tmp/hangover
|
||||
echo "安装完成"
|
||||
51
extra/cross/install-hangover-stable
Normal file
51
extra/cross/install-hangover-stable
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "正在更新软件包..."
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
hangover_url="https://github.com/AndreRH/hangover/releases/download/hangover-9.20.1/hangover_9.20.1_debian12_bookworm_arm64.tar"
|
||||
latest_version="9.20.1"
|
||||
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
mkdir -p /tmp/hangover
|
||||
cd /tmp/hangover
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
url="${mirror}${hangover_url}"
|
||||
echo "尝试从 $url 下载Hangover..."
|
||||
wget "${url}" -O hangover.tar
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "成功下载Hangover"
|
||||
break
|
||||
fi
|
||||
if [ -z "$mirror" ]; then
|
||||
cd /tmp
|
||||
rm -rf /tmp/hangover
|
||||
echo "下载失败...退出安装..."
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
echo "正在安装Hangover..."
|
||||
tar xvf hangover.tar
|
||||
sudo apt install -y ./hangover-wine_${latest_version}~bookworm_arm64.deb ./hangover-libarm64ecfex_${latest_version}_arm64.deb
|
||||
if [ $? -ne 0 ]; then
|
||||
cd /tmp
|
||||
rm -rf /tmp/hangover
|
||||
echo "安装失败...退出安装..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "正在初始化Wine..."
|
||||
wineboot --init
|
||||
|
||||
echo "正在修复字体..."
|
||||
regedit "Z:\\home\\tiny\\.local\\share\\tiny\\extra\\chn_fonts.reg" && wine reg delete "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes" /va /f
|
||||
|
||||
echo "安装完成"
|
||||
@@ -1,80 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
# Wine的64位依赖。box64会将amd64调用转换为arm64,所以只需安装arm64库即可
|
||||
# 依赖来自 dpkg-deb -I wine-stable-amd64_8.0.2~bookworm-1_amd64.deb
|
||||
sudo apt install -y libasound2:arm64 libc6:arm64 libglib2.0-0:arm64 libgphoto2-6:arm64 libgphoto2-port12:arm64 \
|
||||
libgstreamer-plugins-base1.0-0:arm64 libgstreamer1.0-0:arm64 libpcap0.8:arm64 libpulse0:arm64 libsane1:arm64 \
|
||||
libudev1:arm64 libunwind8:arm64 libusb-1.0-0:arm64 libx11-6:arm64 libxext6:arm64 ocl-icd-libopencl1:arm64 \
|
||||
libasound2-plugins:arm64 libncurses6:arm64 libcapi20-3:arm64 libcups2:arm64 libdbus-1-3:arm64 libfontconfig1:arm64 \
|
||||
libfreetype6:arm64 libglu1-mesa:arm64 libgnutls30:arm64 libgsm1:arm64 libgssapi-krb5-2:arm64 libjpeg62-turbo:arm64 \
|
||||
libkrb5-3:arm64 libodbc1:arm64 libosmesa6:arm64 libpng16-16:arm64 libsdl2-2.0-0:arm64 libv4l-0:arm64 \
|
||||
libxcomposite1:arm64 libxcursor1:arm64 libxfixes3:arm64 libxi6:arm64 libxinerama1:arm64 libxrandr2:arm64 \
|
||||
libxrender1:arm64 libxslt1.1:arm64 libxxf86vm1:arm64
|
||||
|
||||
# Wine的32位依赖。同理安装armhf而不是i386
|
||||
# 依赖来自 dpkg-deb -I wine-stable-i386_8.0.2~bookworm-1_i386.deb
|
||||
sudo apt install -y libasound2:armhf libc6:armhf libglib2.0-0:armhf libgphoto2-6:armhf libgphoto2-port12:armhf \
|
||||
libgstreamer-plugins-base1.0-0:armhf libgstreamer1.0-0:armhf libpcap0.8:armhf libpulse0:armhf libsane1:armhf \
|
||||
libudev1:armhf libusb-1.0-0:armhf libx11-6:armhf libxext6:armhf ocl-icd-libopencl1:armhf libasound2-plugins:armhf \
|
||||
libncurses6:armhf libcapi20-3:armhf libcups2:armhf libdbus-1-3:armhf libfontconfig1:armhf libfreetype6:armhf \
|
||||
libglu1-mesa:armhf libgnutls30:armhf libgsm1:armhf libgssapi-krb5-2:armhf libjpeg62-turbo:armhf libkrb5-3:armhf \
|
||||
libodbc1:armhf libosmesa6:armhf libpng16-16:armhf libsdl2-2.0-0:armhf libv4l-0:armhf libxcomposite1:armhf \
|
||||
libxcursor1:armhf libxfixes3:armhf libxi6:armhf libxinerama1:armhf libxrandr2:armhf libxrender1:armhf libxslt1.1:armhf \
|
||||
libxxf86vm1:armhf
|
||||
|
||||
# 其他测试时认为可能需要的依赖
|
||||
sudo apt install -y libvulkan1 libvulkan1:armhf
|
||||
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
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
|
||||
if [ -z "$LATEST_WINE_TAG" ] || [ "$LATEST_WINE_TAG" == "proton-" ]
|
||||
then
|
||||
LATEST_WINE_TAG=proton-8.0-4
|
||||
fi
|
||||
LATEST_WINE_NAME=wine-$LATEST_WINE_TAG-amd64.tar.xz
|
||||
LATEST_WINE_LINK=$RELEASE_PAGE/download/$LATEST_WINE_TAG/$LATEST_WINE_NAME
|
||||
|
||||
mirror_sites=(
|
||||
"https://github.moeyy.xyz/"
|
||||
"https://mirror.ghproxy.com/"
|
||||
""
|
||||
)
|
||||
|
||||
for mirror in "${mirror_sites[@]}"; do
|
||||
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
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=Wine 启动器
|
||||
Exec=wine64 start /unix %f
|
||||
Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/wine.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine.desktop
|
||||
|
||||
echo '安装完成,在启用wine后可以点击exe文件选择用wine启动。'
|
||||
echo '初次运行时会自动进行一段时间的初始化工作。'
|
||||
echo '程序的运行可能依赖一些配置或组件。比如,一些使用directx的游戏可能需要安装dxvk。'
|
||||
@@ -1,83 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
sudo apt update
|
||||
sudo apt upgrade -y
|
||||
|
||||
# Wine的64位依赖。box64会将amd64调用转换为arm64,所以只需安装arm64库即可
|
||||
# 依赖来自 dpkg-deb -I wine-stable-amd64_8.0.2~bookworm-1_amd64.deb
|
||||
sudo apt install -y libasound2:arm64 libc6:arm64 libglib2.0-0:arm64 libgphoto2-6:arm64 libgphoto2-port12:arm64 \
|
||||
libgstreamer-plugins-base1.0-0:arm64 libgstreamer1.0-0:arm64 libpcap0.8:arm64 libpulse0:arm64 libsane1:arm64 \
|
||||
libudev1:arm64 libunwind8:arm64 libusb-1.0-0:arm64 libx11-6:arm64 libxext6:arm64 ocl-icd-libopencl1:arm64 \
|
||||
libasound2-plugins:arm64 libncurses6:arm64 libcapi20-3:arm64 libcups2:arm64 libdbus-1-3:arm64 libfontconfig1:arm64 \
|
||||
libfreetype6:arm64 libglu1-mesa:arm64 libgnutls30:arm64 libgsm1:arm64 libgssapi-krb5-2:arm64 libjpeg62-turbo:arm64 \
|
||||
libkrb5-3:arm64 libodbc1:arm64 libosmesa6:arm64 libpng16-16:arm64 libsdl2-2.0-0:arm64 libv4l-0:arm64 \
|
||||
libxcomposite1:arm64 libxcursor1:arm64 libxfixes3:arm64 libxi6:arm64 libxinerama1:arm64 libxrandr2:arm64 \
|
||||
libxrender1:arm64 libxslt1.1:arm64 libxxf86vm1:arm64
|
||||
|
||||
# Wine的32位依赖。同理安装armhf而不是i386
|
||||
# 依赖来自 dpkg-deb -I wine-stable-i386_8.0.2~bookworm-1_i386.deb
|
||||
sudo apt install -y libasound2:armhf libc6:armhf libglib2.0-0:armhf libgphoto2-6:armhf libgphoto2-port12:armhf \
|
||||
libgstreamer-plugins-base1.0-0:armhf libgstreamer1.0-0:armhf libpcap0.8:armhf libpulse0:armhf libsane1:armhf \
|
||||
libudev1:armhf libusb-1.0-0:armhf libx11-6:armhf libxext6:armhf ocl-icd-libopencl1:armhf libasound2-plugins:armhf \
|
||||
libncurses6:armhf libcapi20-3:armhf libcups2:armhf libdbus-1-3:armhf libfontconfig1:armhf libfreetype6:armhf \
|
||||
libglu1-mesa:armhf libgnutls30:armhf libgsm1:armhf libgssapi-krb5-2:armhf libjpeg62-turbo:armhf libkrb5-3:armhf \
|
||||
libodbc1:armhf libosmesa6:armhf libpng16-16:armhf libsdl2-2.0-0:armhf libv4l-0:armhf libxcomposite1:armhf \
|
||||
libxcursor1:armhf libxfixes3:armhf libxi6:armhf libxinerama1:armhf libxrandr2:armhf libxrender1:armhf libxslt1.1:armhf \
|
||||
libxxf86vm1:armhf
|
||||
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
mkdir $HOME/.local/share/tiny/tmp
|
||||
cd $HOME/.local/share/tiny/tmp
|
||||
|
||||
LNKA="https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/dists/bookworm/main/binary-amd64/"
|
||||
DEB_A1="wine-stable-amd64_8.0.2~bookworm-1_amd64.deb"
|
||||
DEB_A2="wine-stable_8.0.2~bookworm-1_amd64.deb"
|
||||
|
||||
LNKB="https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/dists/bookworm/main/binary-i386/"
|
||||
DEB_B1="wine-stable-i386_8.0.2~bookworm-1_i386.deb"
|
||||
|
||||
# Install amd64-wine (64-bit) alongside i386-wine (32-bit)
|
||||
echo -e "下载wine..."
|
||||
wget ${LNKA}${DEB_A1}
|
||||
wget ${LNKA}${DEB_A2}
|
||||
wget ${LNKB}${DEB_B1}
|
||||
|
||||
wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
if [ $? -ne 0 ]; then
|
||||
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
|
||||
if [ $? -ne 0 ]; then
|
||||
rm -rf $HOME/.local/share/tiny/tmp
|
||||
echo '下载失败...退出安装...'
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -e "解压wine..."
|
||||
dpkg-deb -x ${DEB_A1} wine-installer
|
||||
dpkg-deb -x ${DEB_A2} wine-installer
|
||||
dpkg-deb -x ${DEB_B1} wine-installer
|
||||
echo -e "安装wine..."
|
||||
mv wine-installer/opt/wine* ../cross/wine
|
||||
|
||||
mv winetricks ../cross
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks
|
||||
cd ..
|
||||
rm -rf tmp
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=Wine 启动器
|
||||
Exec=wine start /unix %f
|
||||
Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/wine.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/wine.desktop
|
||||
|
||||
echo '[Desktop Entry]
|
||||
Name=winetricks 实用工具
|
||||
Exec=winetricks
|
||||
Icon=wine
|
||||
Type=Application' > $HOME/.local/share/tiny/cross/winetricks.desktop
|
||||
chmod +x $HOME/.local/share/tiny/cross/winetricks.desktop
|
||||
|
||||
echo '安装完成,在启用wine后可以点击exe文件选择用wine启动。'
|
||||
echo '程序的运行可能依赖一些配置或组件。比如,一些使用directx的游戏可能需要安装dxvk。'
|
||||
echo '如果缺失可以尝试使用winetricks安装。请务必保持耐心。'
|
||||
Reference in New Issue
Block a user