新文件: spark-dwine-helper/dwine-helper-backup/README.txt

新文件:   spark-dwine-helper/dwine-helper-backup/run_v4.sh
	修改:     spark-dwine-helper/pkg/DEBIAN/control
	修改:     spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh
	新文件:   spark-dwine-helper/spark_run_custom.sh
This commit is contained in:
2022-05-30 22:44:37 +08:00
parent 0afae32bce
commit b1e08edfbe
5 changed files with 1072 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
Package: spark-dwine-helper
Version: 1.2
Version: 1.3
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: 2293

View File

@@ -9,6 +9,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
#
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
@@ -58,12 +59,13 @@ UsePublicDir()
return 0
}
########关于公共文件夹,暂时意义不明
_DeleteRegistry()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg DELETE "$1" /f &> /dev/null
}
#########功能:删除注册表
init_log_file()
{
if [ ! -d "$DEBUG_LOG" ];then
@@ -89,7 +91,7 @@ debug_log()
{
echo "${1}"
}
################log相关功能
HelpApp()
{
echo " Extra Commands:"
@@ -97,7 +99,7 @@ HelpApp()
echo " -e/--remove Remove deployed app files"
echo " -h/--help Show program help info"
}
#############帮助文件
FixLink()
{
if [ -d ${WINEPREFIX} ]; then
@@ -111,7 +113,7 @@ FixLink()
ls -l "${WINEPREFIX}/dosdevices"
fi
}
###########会在应用启动和解压时执行,驱动器绑定
DisableWrite()
{
if [ -d "${1}" ]; then
@@ -122,7 +124,7 @@ DisableWrite()
mkdir "${1}"
chmod -w "${1}"
}
########如果有该文件夹则删除然后再创建一个不允许写入的这东西是被用在了QQ启动上看来腾讯不怎么好对付
is_autostart()
{
AUTOSTART="/opt/deepinwine/tools/autostart"
@@ -137,6 +139,9 @@ is_autostart()
return 1
}
#########自动启动相关,等用到了再研究
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
#######url转义
#arg 1: windows process file path
#arg 2-*: windows process args
@@ -173,6 +178,9 @@ CallProcess()
$SHELL_DIR/autostart_wine.sh $DEB_PACKAGE_NAME
fi
}
###通用启动APP逻辑。对于没有被case捕捉的非适配APP则直接执行此部分。似乎已经有了防止残留的功能
###一些自定义的应用不会使用这个启动,而另一些则会调用这个
###有设置mimetype和自动启动(这个暂时没分析)的功能
CallZhuMu()
{
@@ -234,7 +242,9 @@ CallTIM()
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
####似乎是给dde-control-center添加快捷键
$SHELL_DIR/fontconfig
####暂时无法得知用途和用法
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
@@ -286,15 +296,19 @@ CallDingTalk()
CallProcess "$@"
}
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
CallMeiTuXiuXiu()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" $path
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi
}
CallFastReadPDF()
@@ -302,16 +316,25 @@ CallFastReadPDF()
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" $path
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi
}
CallEvernote()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" $path
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi
}
CallTencentVideo()
@@ -581,6 +604,8 @@ else
}
fi
#####准备启动进程,分析在 https://shenmo7192.gitee.io/post/deepin-wine6%E7%9A%84run_v4%E8%84%9A%E6%9C%AC%E6%8E%A2%E7%B4%A2%E5%90%AF%E5%8A%A8%E6%96%B9%E5%BC%8F/
if [ $# -lt 3 ]; then
debug_log "参数个数小于3个"
exit 0