mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2025-12-18 21:11:39 +08:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c863f369b6 | |||
| 3ec2118ddb | |||
| 93f096bca5 | |||
| 43e11b2e7f | |||
| 39be413b97 | |||
| 63b63d7cfa | |||
| ec73153de1 | |||
| 6ad27cca3f | |||
| ad9535b5a0 | |||
| e6673676bd | |||
| 01761b00ab |
@@ -1,5 +1,5 @@
|
||||
Package: spark-dwine-helper
|
||||
Version: 1.5
|
||||
Version: 1.6.1
|
||||
Architecture: all
|
||||
Maintainer: shenmo <shenmo@spark-app.store>
|
||||
Installed-Size: 2293
|
||||
@@ -7,5 +7,5 @@ Depends: zenity:amd64, p7zip-full:amd64, fonts-noto-cjk,deepin-wine-helper(>=5.1
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Multi-Arch: foreign
|
||||
Homepage: https://www.spark-app.store/
|
||||
Homepage: https://gitee.com/deepin-community-store/spark-wine
|
||||
Description: Spark Deepin Wine Helper
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#
|
||||
# Modifier: shenmo <shenmo@spark-app.store>
|
||||
#
|
||||
# diff: Now will run set-dwine-scale.sh in stage RunApp before CallApp
|
||||
# Deleted Deepin-* to simplify the script
|
||||
#
|
||||
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
|
||||
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
|
||||
@@ -35,32 +33,7 @@ if [ $SPECIFY_SHELL_DIR ]; then
|
||||
SHELL_DIR=$SPECIFY_SHELL_DIR
|
||||
fi
|
||||
|
||||
UsePublicDir()
|
||||
{
|
||||
if [ -z "$USE_PUBLIC_DIR" ]; then
|
||||
echo "Don't use public dir"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -d "$PUBLIC_DIR" ];then
|
||||
echo "Not found $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -r "$PUBLIC_DIR" ];then
|
||||
echo "Can't read for $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -w "$PUBLIC_DIR" ];then
|
||||
echo "Can't write for $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -x "$PUBLIC_DIR" ];then
|
||||
echo "Can't excute for $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
########关于公共文件夹,暂时意义不明
|
||||
|
||||
_DeleteRegistry()
|
||||
{
|
||||
@@ -171,7 +144,8 @@ CallProcess()
|
||||
fi
|
||||
|
||||
debug_log_to_file "Starting process $* ..."
|
||||
|
||||
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX"
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
|
||||
|
||||
#start autobottle
|
||||
@@ -377,14 +351,14 @@ CallTHS()
|
||||
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
|
||||
fi
|
||||
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
|
||||
CallProcess "$@"
|
||||
}
|
||||
|
||||
CallQQGameV2()
|
||||
{
|
||||
debug_log "run $1"
|
||||
$SHELL_DIR/kill.sh QQMicroGameBox block
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" -action:force_download -appid:${2} -pid:8 -bin_version:1.1.2.4 -loginuin: &
|
||||
CallProcess "$1" -action:force_download -appid:${2} -pid:8 -bin_version:1.1.2.4 -loginuin:
|
||||
}
|
||||
|
||||
CallPsCs6()
|
||||
@@ -410,7 +384,7 @@ CallPsCs6()
|
||||
|
||||
debug_log_to_file "Starting process $* ..."
|
||||
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
|
||||
CallProcess "$@"
|
||||
}
|
||||
|
||||
#arg 1: exec file path
|
||||
@@ -499,10 +473,6 @@ DeployApp()
|
||||
{
|
||||
ExtractApp "$WINEPREFIX"
|
||||
|
||||
if UsePublicDir;then
|
||||
chgrp -R users "$WINEPREFIX"
|
||||
chmod -R 0775 "$WINEPREFIX"
|
||||
fi
|
||||
|
||||
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
|
||||
|
||||
@@ -531,7 +501,7 @@ UpdateApp()
|
||||
fi
|
||||
|
||||
case $BOTTLENAME in
|
||||
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding")
|
||||
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding" | "Wine-QQ" | "Spark-QQ")
|
||||
rm -rf "$WINEPREFIX"
|
||||
DeployApp
|
||||
return
|
||||
@@ -541,10 +511,6 @@ UpdateApp()
|
||||
ExtractApp "${WINEPREFIX}.tmpdir"
|
||||
$SHELL_DIR/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
|
||||
|
||||
if UsePublicDir;then
|
||||
chgrp -R users "$WINEPREFIX"
|
||||
chmod -R 0775 "$WINEPREFIX"
|
||||
fi
|
||||
|
||||
rm -rf "${WINEPREFIX}.tmpdir"
|
||||
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
|
||||
@@ -562,8 +528,6 @@ RunApp()
|
||||
else
|
||||
DeployApp | progressbar $BOTTLENAME "初始化$BOTTLENAME中..."
|
||||
fi
|
||||
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
|
||||
/opt/durapps/spark-dwine-helper/set-dwine-scale.sh "$WINEPREFIX"
|
||||
|
||||
CallApp "$@"
|
||||
}
|
||||
@@ -615,9 +579,6 @@ fi
|
||||
BOTTLENAME="$1"
|
||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
||||
|
||||
if UsePublicDir;then
|
||||
WINEPREFIX="$PUBLIC_DIR/$1"
|
||||
fi
|
||||
|
||||
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
||||
if [ -f "$APPDIR/files.md5sum" ];then
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
#/bin/bash
|
||||
#########>>>>>>>函数段
|
||||
Get_Dist_Name()
|
||||
{
|
||||
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
||||
DISTRO='Deepin'
|
||||
elif grep -Eqi "Uniontech" /etc/issue || grep -Eq "Uniontech" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
#########<<<<<<<
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "无参数,无法启动。请参考set-dwine-scale.sh使用"
|
||||
@@ -13,9 +25,10 @@ mkdir -p $HOME/.config/spark-wine/
|
||||
#####能到这一步的说明已经是没有自定义参数了,直接读全局覆盖没问题
|
||||
#####
|
||||
|
||||
if [ !-f "$HOME/.config/spark-wine/scale.txt" ];then
|
||||
if [ -f "$HOME/.config/spark-wine/scale.txt" ];then
|
||||
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
|
||||
echo "检测到已经设置过全局参数,直接复制"
|
||||
echo "全局参数的位置在$HOME/.config/spark-wine/scale.txt,如果需要更换请删除此文件重新生成"
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -54,14 +67,3 @@ esac
|
||||
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
|
||||
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
|
||||
|
||||
#########>>>>>>>函数段
|
||||
Get_Dist_Name()
|
||||
{
|
||||
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
||||
DISTRO='Deepin'
|
||||
elif grep -Eqi "Uniontech" /etc/issue || grep -Eq "Uniontech" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
@@ -52,14 +52,14 @@ fi
|
||||
if [ "$appointed_scale_factor" = "" ];then
|
||||
#########未指定下,读取$CONTAINER_PATH/scale.txt。如果没有,优先$DEEPIN_WINE_SCALE设置,然后是手动
|
||||
|
||||
if [ !-f "$CONTAINER_PATH/scale.txt" ];then
|
||||
if [ ! -f "$CONTAINER_PATH/scale.txt" ];then
|
||||
|
||||
echo "E: No SCALE profile found. try to use DEEPIN_WINE_SCALE"
|
||||
echo "错误:没有检测到缩放设置,读取DEEPIN_WINE_SCALE"
|
||||
if [ "$DEEPIN_WINE_SCALE" = "" ];then
|
||||
echo "E: No DEEPIN_WINE_SCALE found. Use spark-get-scale to Set "
|
||||
echo "错误:没有检测到DEEPIN_WINE_SCALE,用spark-get-scale设置"
|
||||
/opt/durapps/spark-dwine-helper/spark-get-scale.sh "$CONTAINER_PATH"
|
||||
echo "E: No DEEPIN_WINE_SCALE found. Use get-scale.sh to Set "
|
||||
echo "错误:没有检测到DEEPIN_WINE_SCALE,用get-scale.sh设置"
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh "$CONTAINER_PATH"
|
||||
wine_scale=`cat $CONTAINER_PATH/scale.txt`
|
||||
echo "检测到的缩放倍数为:$wine_scale"
|
||||
echo "Scale is $wine_scale"
|
||||
@@ -71,11 +71,14 @@ if [ !-f "$CONTAINER_PATH/scale.txt" ];then
|
||||
fi
|
||||
else
|
||||
wine_scale=`cat $CONTAINER_PATH/scale.txt`
|
||||
if [ -n "$DEEPIN_WINE_SCALE" ] && [ "$DEEPIN_WINE_SCALE" != "$wine_scale" ];then
|
||||
zenity --info --text="检测到您的缩放设置和Deepin默认的不同。这可能是您的个人设置,因此不会自动同步\n您可以删除$CONTAINER_PATH/scale.txt来同步设置" --width=500 --height=150 --timeout=5 &
|
||||
fi
|
||||
echo "检测到的缩放倍数为:$wine_scale"
|
||||
echo "Scale is $wine_scale"
|
||||
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#####非deepin发行版似乎没有这个变量,暂时不清楚这个变量是哪个组件做的
|
||||
|
||||
|
||||
@@ -173,4 +176,4 @@ echo "env WINEPREFIX="$CONTAINER_PATH" $APPRUN_CMD reg ADD 'HKCU\Control Panel\D
|
||||
|
||||
env WINEPREFIX="$CONTAINER_PATH" $APPRUN_CMD reg ADD 'HKCU\Control Panel\Desktop' /v LogPixels /t REG_DWORD /d $dpi /f
|
||||
|
||||
fi
|
||||
fi
|
||||
@@ -8,8 +8,7 @@
|
||||
#
|
||||
# Modifier: shenmo <shenmo@spark-app.store>
|
||||
#
|
||||
# diff: Now will run set-dwine-scale.sh in stage RunApp before CallApp
|
||||
# Deleted Deepin-* to simplify the script
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
@@ -48,32 +47,7 @@ if [ $SPECIFY_SHELL_DIR ]; then
|
||||
SHELL_DIR=$SPECIFY_SHELL_DIR
|
||||
fi
|
||||
|
||||
UsePublicDir()
|
||||
{
|
||||
if [ -z "$USE_PUBLIC_DIR" ]; then
|
||||
echo "Don't use public dir"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -d "$PUBLIC_DIR" ];then
|
||||
echo "Not found $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -r "$PUBLIC_DIR" ];then
|
||||
echo "Can't read for $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -w "$PUBLIC_DIR" ];then
|
||||
echo "Can't write for $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
if [ ! -x "$PUBLIC_DIR" ];then
|
||||
echo "Can't excute for $PUBLIC_DIR"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
########关于公共文件夹,暂时意义不明
|
||||
|
||||
_DeleteRegistry()
|
||||
{
|
||||
@@ -238,10 +212,7 @@ DeployApp()
|
||||
{
|
||||
ExtractApp "$WINEPREFIX"
|
||||
|
||||
if UsePublicDir;then
|
||||
chgrp -R users "$WINEPREFIX"
|
||||
chmod -R 0775 "$WINEPREFIX"
|
||||
fi
|
||||
|
||||
|
||||
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
|
||||
|
||||
@@ -280,10 +251,7 @@ UpdateApp()
|
||||
ExtractApp "${WINEPREFIX}.tmpdir"
|
||||
$SHELL_DIR/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
|
||||
|
||||
if UsePublicDir;then
|
||||
chgrp -R users "$WINEPREFIX"
|
||||
chmod -R 0775 "$WINEPREFIX"
|
||||
fi
|
||||
|
||||
|
||||
rm -rf "${WINEPREFIX}.tmpdir"
|
||||
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
|
||||
@@ -301,8 +269,8 @@ RunApp()
|
||||
else
|
||||
DeployApp | progressbar $BOTTLENAME "初始化$BOTTLENAME中..."
|
||||
fi
|
||||
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
|
||||
/opt/durapps/spark-dwine-helper/set-dwine-scale.sh "$WINEPREFIX"
|
||||
############# WARNING: Here is the modified content: Now will run set-wine-scale.sh
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX" "$WINEPREFIX"
|
||||
|
||||
CallApp "$@"
|
||||
}
|
||||
@@ -354,9 +322,7 @@ fi
|
||||
BOTTLENAME="$1"
|
||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
||||
|
||||
if UsePublicDir;then
|
||||
WINEPREFIX="$PUBLIC_DIR/$1"
|
||||
fi
|
||||
|
||||
|
||||
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
||||
if [ -f "$APPDIR/files.md5sum" ];then
|
||||
|
||||
@@ -14,6 +14,21 @@
|
||||
#
|
||||
#
|
||||
|
||||
#######################函数段。下文调用的额外功能会在此处声明
|
||||
|
||||
Get_Dist_Name()
|
||||
{
|
||||
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
||||
DISTRO='Deepin'
|
||||
elif grep -Eqi "Uniontech" /etc/issue || grep -Eq "Uniontech" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
|
||||
####获得发行版名称
|
||||
|
||||
#########################预设值段
|
||||
|
||||
version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
|
||||
@@ -79,17 +94,3 @@ else
|
||||
fi
|
||||
|
||||
|
||||
#######################函数段。上文调用的额外功能会在此处声明
|
||||
|
||||
Get_Dist_Name()
|
||||
{
|
||||
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
||||
DISTRO='Deepin'
|
||||
elif grep -Eqi "Uniontech" /etc/issue || grep -Eq "Uniontech" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
|
||||
####获得发行版名称
|
||||
Reference in New Issue
Block a user