Skip to content

Commit

Permalink
Update code to v1.0.19
Browse files Browse the repository at this point in the history
hangover, wechat, termux x11 xfce fix, locale.gen fix...
  • Loading branch information
Cateners committed Nov 10, 2024
1 parent a911efd commit a5a3816
Show file tree
Hide file tree
Showing 14 changed files with 299 additions and 520 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ lib目录:
`split -b 98M debian.tar.xz`

还需要对flutter的一些默认配置作修改,因为其与项目中build.gradle的一些设置冲突。
- 删除`flutter\packages\flutter_tools\gradle\src\main\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。
- 删除`flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy`路径下与`ShrinkResources`相关的`if`代码块。

接下来就可以编译了。我使用的命令如下:

Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
// remove flutter's default ShrinkResources settings at flutter\packages\flutter_tools\gradle\src\main\flutter.groovy
// remove flutter's default ShrinkResources settings at flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy
postprocessing {
removeUnusedCode true
removeUnusedResources true
Expand Down
12 changes: 6 additions & 6 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
android:name=".MainApplication"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true"

android:launchMode="singleInstance"
android:theme="@style/App.Theme">
<activity
android:name=".MainActivity"
Expand Down Expand Up @@ -73,19 +73,18 @@
<activity android:name="com.gaurav.avnc.ui.about.AboutActivity" />
<activity
android:name="com.termux.x11.MainActivity"
android:taskAffinity="com.termux.x11.MainActivity"
android:launchMode="singleInstance"
android:supportsPictureInPicture="true"
android:configChanges="fontScale|orientation|screenSize|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|screenLayout|touchscreen|uiMode|smallestScreenSize|density"
android:resizeableActivity="true"
android:windowSoftInputMode="stateHidden"
android:process=":x11">
<!-- android:taskAffinity="com.termux.x11.MainActivity" -->
<!-- android:launchMode="singleInstance" -->
</activity>
<activity
android:name="com.termux.x11.XrActivity"
android:configChanges="density|orientation|screenSize|keyboard|keyboardHidden|uiMode"
android:exported="true"
android:launchMode="singleTask"
android:resizeableActivity="false"
android:screenOrientation="landscape"
android:process=":vr_process">
Expand All @@ -94,19 +93,20 @@
<category android:name="com.oculus.intent.category.VR" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- android:launchMode="singleTask" -->
</activity>
<activity
android:theme="@style/Theme.AppCompat.DayNight"
android:excludeFromRecents="true"
android:name="com.termux.x11.LoriePreferences"
android:taskAffinity="com.termux.x11.LoriePreferences"
android:supportsPictureInPicture="false"
android:resizeableActivity="true"
android:process=":x11">
<intent-filter>
<action android:name="android.intent.action.APPLICATION_PREFERENCES" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
<!-- android:excludeFromRecents="true" -->
<!-- android:taskAffinity="com.termux.x11.LoriePreferences" -->
</activity>
<meta-data android:name="com.samsung.android.multidisplay.keep_process_alive" android:value="false"/>
<meta-data android:name="android.allow_multiple_resumed_activities" android:value="true" />
Expand Down
Binary file modified assets/patch.tar.gz
Binary file not shown.
77 changes: 0 additions & 77 deletions extra/cross/install-box

This file was deleted.

45 changes: 0 additions & 45 deletions extra/cross/install-dxvk

This file was deleted.

67 changes: 67 additions & 0 deletions extra/cross/install-hangover
Original file line number Diff line number Diff line change
@@ -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 changes: 51 additions & 0 deletions extra/cross/install-hangover-stable
Original file line number Diff line number Diff line change
@@ -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 "安装完成"
80 changes: 0 additions & 80 deletions extra/cross/install-wine

This file was deleted.

Loading

0 comments on commit a5a3816

Please sign in to comment.