Compare commits

...

15 Commits
1.5 ... 1.6.2

Author SHA1 Message Date
04b3e1dd9b update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-12 01:14:22 +00:00
09dadd36e8 update spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh. 2022-06-12 01:13:57 +00:00
18845940e1 update spark-dwine-launch/run-template_v1.sh. 2022-06-11 14:32:54 +00:00
d8671e5863 update spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh. 2022-06-11 08:44:50 +00:00
c863f369b6 update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-10 12:28:44 +00:00
3ec2118ddb update spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh. 2022-06-10 12:27:52 +00:00
93f096bca5 修改: spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh
重命名:   spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh -> spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh
	重命名:   spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh -> spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh
	修改:     spark-dwine-helper/spark_run_custom.sh
2022-06-10 19:51:09 +08:00
43e11b2e7f update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-10 11:45:04 +00:00
39be413b97 update spark-dwine-helper/spark_run_custom.sh. 2022-06-10 11:44:27 +00:00
63b63d7cfa update spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh. 2022-06-10 11:43:44 +00:00
ec73153de1 update spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh. 2022-06-10 11:03:56 +00:00
6ad27cca3f update spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh. 2022-06-10 10:59:47 +00:00
ad9535b5a0 update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-07 07:13:32 +00:00
e6673676bd 修改: spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh
修改:     spark-dwine-launch/run-template_v1.sh
2022-05-31 22:39:35 +08:00
01761b00ab 修改: spark-dwine-helper/pkg/DEBIAN/control
修改:     spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh
	修改:     spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh
2022-05-31 22:27:40 +08:00
6 changed files with 73 additions and 120 deletions

View File

@@ -1,5 +1,5 @@
Package: spark-dwine-helper
Version: 1.5
Version: 1.6.2
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

View File

@@ -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
@@ -238,6 +212,23 @@ CallQQ()
CallProcess "$@"
}
CallTiktokCN()
{
if [ ! -f "$WINEPREFIX/../.TiktokCN_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
$SHELL_DIR/fontconfig
touch "$WINEPREFIX/../.TiktokCN_run"
fi
chmod 555 /home/${USER}/.deepinwine/Spark-tiktokCN/drive_c/users/${USER}/Application\ Data/douyin
chmod 555 /home/${USER}/.deepinwine/Spark-tiktokCN/drive_c/users/@surrent_user@/Application\ Data/douyin
chmod 555 /home/${USER}/.deepinwine/Spark-tiktokCN.tmpdir/drive_c/users/${USER}/Application\ Data/douyin
chmod 555 /home/${USER}/.deepinwine/Spark-tiktokCN.tmpdir/drive_c/users/@surrent_user@/Application\ Data/douyin
CallProcess "$@"
}
CallTIM()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
@@ -377,14 +368,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 +401,7 @@ CallPsCs6()
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
CallProcess "$@"
}
#arg 1: exec file path
@@ -425,6 +416,9 @@ CallApp()
"Deepin-WangWang")
CallWangWang "$@"
;;
"Spark-tiktokCN")
CallTiktokCN "$@"
;;
"Deepin-ZhuMu")
CallZhuMu "$@"
;;
@@ -499,10 +493,6 @@ DeployApp()
{
ExtractApp "$WINEPREFIX"
if UsePublicDir;then
chgrp -R users "$WINEPREFIX"
chmod -R 0775 "$WINEPREFIX"
fi
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
@@ -531,7 +521,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" | "Spark-weixin")
rm -rf "$WINEPREFIX"
DeployApp
return
@@ -541,10 +531,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 +548,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 +599,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

View File

@@ -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
}

View File

@@ -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_SCALEspark-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

View File

@@ -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

View File

@@ -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
}
####获得发行版名称