deepin-superuser
deepin
2022-05-31 03:38 TIM 退出时有进程残留,可以这个用搞吗?
Reply Like 0 View the author
TIM 退出时有进程残留,可以这个用搞吗?
TIM 退出时有进程残留,可以这个用搞吗?
CallTIM()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
$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
touch $WINEPREFIX/../.QQ_run
fi
CallProcess "$@"
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"
}
官方的这里似乎没有这个逻辑,你可以手动杀一下试试
/opt/deepinwine/tools/kill.sh Deepin-TIM block
欢迎给spark_run_v4.sh提pr!打包应用时选择spark_run_v4.sh即可
在Call段新增这个逻辑,然后在case $BOTTLENAME in这里写上容器名然后调用Call即可
在依赖中加入spark-dwine-helper即可使用spark_run_v4.sh
TIM 退出时有进程残留,可以这个用搞吗?
等下,进程残留这个似乎会默认清理的
CallProcess()
{
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
is_autostart $DEB_PACKAGE_NAME
autostart=$?
if [ $autostart -ne 0 ];then
$SHELL_DIR/kill.sh "$BOTTLENAME" block
fi
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
#start autobottle
if [ $autostart -eq 0 ];then
$SHELL_DIR/autostart_wine.sh $DEB_PACKAGE_NAME
fi
}
如果你没有用官方的TIM容器,应该是自动清理的

Popular Ranking
ChangePopular Events
More
https://shenmo7192.gitee.io/categories/spark-dwine-helper%E6%96%87%E6%A1%A3/
这里会放关于deepin-wine和辅助工具的文档
正文:
发布时间: 2022-05-30T18:26:37+08:00
对于QQ等退出会残留进程(没有窗口也没有托盘,还在后台跑)的流氓软件,deepin-wine也做了相应的调整,在启动时杀死,防止出错
位置:/opt/deepinwine/tools/kill.sh
行为:
block,会检测是不是正在残留进程(如果被标注的bottle不活跃(没有Window,也没有托盘)则认为是残留;如果发现这个bottle有Window或者托盘,则认为这是活跃中的应用,不是残留进程),则尝试杀死。用例:在
run_v4.sh中,如果发现应用容器为Deepin-WXWork",则执行CallWXWork(),代码片段如下如果是自动启动,则直接打开
如果不是,先杀死残留进程(如果有)再执行启动
以此原理,在spark_run_v4.sh中添加这样的
case+Call启动,即可做到对星火wine应用的定制化启动,比如以后可以在星火的QQ启动脚本中添加此功能