mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2025-12-18 21:11:39 +08:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a0d3f4055 | |||
| a3b83b1b91 | |||
| 6694c47fe4 | |||
| 04b3e1dd9b | |||
| 09dadd36e8 | |||
| 18845940e1 | |||
| d8671e5863 | |||
| 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.3
|
||||
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
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
___
|
||||
( )
|
||||
| | .-. ___ ___ .--. .--.
|
||||
| |/ \ ( )( ) / \ / \
|
||||
| .-. . | | | | ; ,-. ' | .-. ;
|
||||
| | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | |/ |
|
||||
| | | | | | | | | | | | | ' _.'
|
||||
| | | | | | ; ' | ' | | | .'.-.
|
||||
| | | | ' `-' / ' `-' | ' `-' /
|
||||
(___)(___) '.__.' `.__. | `.__.'
|
||||
( `-' ;
|
||||
`.__.
|
||||
___
|
||||
( )
|
||||
| |.-. .---. ___ .-. .--. ___ .-.
|
||||
| / \ / .-, \ ( ) \ / \ ( ) \
|
||||
| .-. | (__) ; | | ' .-. ; | .-. ; | .-. .
|
||||
| | | | .'` | | / (___) | | | | | | | |
|
||||
| | | | / .'| | | | | | | | | | | |
|
||||
| | | | | / | | | | | | | | | | | |
|
||||
| ' | | ; | ; | | | | ' | | | | | |
|
||||
' `-' ; ' `-' | | | ' `-' / | | | |
|
||||
`.__. `.__.'_. (___) `.__.' (___)(___)
|
||||
|
||||
|
||||
___
|
||||
( )
|
||||
| |.-. ___ ___ ___ .-. ___ .-. ___ ___
|
||||
| / \ ( )( ) ( ) \ ( ) \ ( )( )
|
||||
| .-. | | | | | | .-. . | .-. . | | | |
|
||||
| | | | | | | | | | | | | | | | | | | |
|
||||
| | | | | | | | | | | | | | | | | ' | |
|
||||
| | | | | | | | | | | | | | | | ' `-' |
|
||||
| ' | | | | ; ' | | | | | | | | `.__. |
|
||||
' `-' ; ' `-' / | | | | | | | | ___ | |
|
||||
`.__. '.__.' (___)(___) (___)(___) ( )' |
|
||||
; `-' '
|
||||
.__.'
|
||||
............ .....]OOOo]`....
|
||||
... ........ ...=OOOOOOOOO\..
|
||||
.../OOOOOOO`.... ..=OOO@/[\OOOOO.
|
||||
..=OOOOOOOOO\... .,@OO^/....O@O@`
|
||||
..OOOOOO[[OOO@`. .=OO@,...=.OOOO.
|
||||
..OOOOO./O^,@OO` .=OO^....,.@OO^.
|
||||
..\OOO@^...=OOOO.... .OOO^*..,`/OOO..
|
||||
...\OOOOOOOooooO^... .=OO^...`=OO@`..
|
||||
..=@O@OooOOOOO@`...........=@@O]].,@O@`...
|
||||
.,@OoOO`...O@^......,]]]]/OOOOOOO@@... .
|
||||
...\OO@]]]OOOO@@@@@@@@@@@@@@@@@@@OO.....
|
||||
.....[@@OOO@@@@@@@@@@@@@@@@@@@@@@@@@@`..
|
||||
..OOO@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`....
|
||||
.,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\...
|
||||
....=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^..
|
||||
...=@@@@@@@@@@@@@@@@@@@@@@`,\@@@@@@@@@@@@@^.
|
||||
..,@@@@@@@@@@@@@@@@@@@@@@@O,[].\@@@@@@@@@@@.
|
||||
../@@@@@@@@@@@@O@@@@@@@@@@@......\@@@@@@@@@^
|
||||
.,@@@@@@@@@@@O`.\@@@@@@@@@/........\@@@@@@@@...
|
||||
.=@@@@@@@@@/.....\@@@@@@@@/`...[O`..\@@@@@@@`...
|
||||
.=@@@@@@@^,O[..,`.,@@@@@/../@@O[`...,@@@@@@@....
|
||||
....@@@@@@@O`,@@O[]..,@/[`..=oo@O`,^...@@@@@@@@`..
|
||||
....O@@@@@@@@`,OOO@^*\.........\..../.../@`.=^..
|
||||
.. ...,@^=@@@^.\`...,^...........[[......O]//...
|
||||
..,\]@@@\...[`....................=@@/....
|
||||
.=@@\............,]/`........../@@@\.. .
|
||||
.....@@@@@\.....................,/@@@@@@\...
|
||||
...=@@@@@@@@\]..............]@@@@@@@@@@@@`.
|
||||
...,@@@@@@@@@@@@@@/[\O@@O/[*./@@@@@@@@@@@@@\.......
|
||||
...@@@@@@@@@@@@@@@^.,O@@@@^../@@@@@@@@@@@@@@@\.....
|
||||
..........@@@@@@@@@@@@@@@@@`..`\/`../@@@@@@@@@@@@@@@@@@@@]]
|
||||
........,@@@@@@@@@@@@@@@@/*[\].,`]/[[@@@@@@@@@@@@@@,[[[[`..
|
||||
..,O\/@@@@@@@@@@@@@@@@@@@`...........O@@O@@@@@@@@@@\....
|
||||
.....\@@@@@@@@@@@@@@@@@@@OO\`,O.. .,@OOO@@@@@@@@@@. ..
|
||||
..../@@@@@@@@@@@@@@OO@`.^,O. ..=@OOO@@@@@@@@@.. .
|
||||
...=@@@@@@@@@@@@@@@@@O[[.... ...\@@@@@@@@@@@/.. .
|
||||
...=@@@@@@@@@@@@@@,^ ....O...\@@@@@@`
|
||||
....@@@@@@@@@@@@@/.. ...^/\]/[\@@@@`.
|
||||
.@@@@/@@@@@@@^O..... ...,@@^]..]@/...
|
||||
...\@`.[@@@@@@...... .=`@@@@@^..^....
|
||||
....`....[@@@O\.[,..........OO@@@@@^.,[[....
|
||||
............\@@@\`...,`**,]@@@@@@@^.........
|
||||
.. .,@@@@@@@@@@@@@@@@@@/...
|
||||
..O@@@@@@@@@@@@@@@@@^...
|
||||
..O@@@@@@^...=@@@@@@@...
|
||||
..@@@@@@@\...=@@@@@@@^..
|
||||
.=@@@@@@@@...=@@@@@@@O..
|
||||
.=@@@@@@@@`..=@@@@@@@@..
|
||||
.=@@@O@@@@^..=@@OO@@@@^.
|
||||
.O@OOOOO@O^..=@OOOOOOO^.
|
||||
.Oo/[\O/\O@..=/[\O/\o*O.
|
||||
.O^......=O...^......*/.
|
||||
.=\.....]O^...\\...]//.. .. ........
|
||||
@@ -1,21 +1,42 @@
|
||||
#/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使用"
|
||||
echo "无参数,无法启动。这是一个set-wine-scale的组件,一般来说,你不会需要单独启动这个脚本"
|
||||
echo "请参考set-wine-scale.sh使用"
|
||||
echo "参数为CONTAINER_PATH"
|
||||
echo "只读取第一个,其他参数会被放弃"
|
||||
fi
|
||||
|
||||
CONTAINER_PATH="$1"
|
||||
|
||||
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
|
||||
echo "错误:找不到user.reg,退出。你应当在文件解压结束后调用此脚本"
|
||||
echo "E: Can not find user.reg. Exit. You should use this script after the extraction"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
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 +75,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
|
||||
}
|
||||
@@ -7,14 +7,14 @@ help() {
|
||||
-s|--set-scale-factor 直接指定缩放。支持1.0,1.25,1.5,1.75,2.0
|
||||
path 容器目录
|
||||
|
||||
|
||||
本脚本具有超级兔力。
|
||||
--------------------------------------------------------------------
|
||||
Usage: $0 [-h|--help] [-s|--set-scale-factor] path
|
||||
-h|--help Show this text
|
||||
-s|--set-scale-factor Set scale factor direcly. Support 1.0,1.25,1.5,1.75,2.0
|
||||
path Wine Container directory path
|
||||
|
||||
|
||||
This script have super bunny power.
|
||||
EOF
|
||||
}
|
||||
#########################帮助文件结束#############################
|
||||
@@ -30,6 +30,13 @@ parse_args() {
|
||||
appointed_scale_factor="$2"
|
||||
|
||||
;;
|
||||
|
||||
"bunny")
|
||||
cat /opt/durapps/spark-dwine-helper/scale-set-helper/bunny.txt
|
||||
exit
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
CONTAINER_PATH="$1"
|
||||
|
||||
@@ -43,8 +50,10 @@ parse_args "$@"
|
||||
|
||||
#####先看看PATH对不对
|
||||
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
|
||||
echo "错误:找不到user.reg,退出。你应当在文件解压结束后调用此脚本"
|
||||
echo "错误:找不到user.reg,退出。你应当在文件解压结束后调用此脚本。"
|
||||
echo "如果你不清楚如何使用这个脚本,请使用 $0 -h"
|
||||
echo "E: Can not find user.reg. Exit. You should use this script after the extraction"
|
||||
echo "If you don't know how to use this script, try $0 -h"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -52,14 +61,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 +80,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 +185,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