Compare commits
38 Commits
5.6.4.3-5.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f4725118b | |||
| 7460dc7f1d | |||
| 0fd138fee1 | |||
| 4d7dbc82cc | |||
| 8a905f9908 | |||
| 83a04c88ef | |||
| 6c1771c869 | |||
| ada388d347 | |||
| 935c27d04c | |||
| 2d7a7b0c00 | |||
| bfb3ed8b87 | |||
| 84002bd9d5 | |||
| e57bc6e1ae | |||
| 93410c090d | |||
| bff5b2848f | |||
| 8fc7dc9435 | |||
| dfcecf30db | |||
| 3b19f5f26c | |||
| d584b6757b | |||
| a67cf6b6c9 | |||
| f4a3b9ec7f | |||
| 6c59b8378a | |||
| 34eb09779e | |||
| 3481696e75 | |||
| 36c912e762 | |||
| a5893503ed | |||
| d3353b0033 | |||
| 73f28e7c1f | |||
| 6407bf0720 | |||
| 61faeee4fc | |||
| 29629d4dd1 | |||
| 7fc796b0b2 | |||
| 7402323bb5 | |||
| 6218d5f12d | |||
| 248dab68b6 | |||
| 449e84775f | |||
| 7d19e765cb | |||
| c7b766c4e7 |
@@ -2,6 +2,6 @@
|
||||
if [ ! -d /opt/deepinwine/tools ];then
|
||||
mkdir -p /opt/deepinwine/tools
|
||||
fi
|
||||
if [ ! -e /opt/deepinwine/tools/spark_run_v4.sh ];then
|
||||
ln -sv /opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_run_v4.sh /opt/deepinwine/tools/spark_run_v4.sh
|
||||
fi
|
||||
|
||||
ln -svf /opt/spark-dwine-helper/spark_run_v4.sh /opt/deepinwine/tools/spark_run_v4.sh
|
||||
ln -svf /opt/spark-dwine-helper/spark_kill.sh /opt/deepinwine/tools/spark_kill.sh
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -e /opt/deepinwine/tools/spark_run_v4.sh ];then
|
||||
|
||||
unlink /opt/deepinwine/tools/spark_run_v4.sh
|
||||
fi
|
||||
unlink /opt/deepinwine/tools/spark_kill.sh
|
||||
@@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh"
|
||||
Icon=store.spark-app.spark-dwine-helper
|
||||
MimeType=
|
||||
Name=Spark Wine App Launcher
|
||||
Name[zh_CN]=星火Wine应用启动器
|
||||
StartupWMClass=store.spark-app.spark-dwine-helper
|
||||
Terminal=False
|
||||
Type=Application
|
||||
NoDisplay=false
|
||||
X-Deepin-Vendor=user-custom
|
||||
|
Before Width: | Height: | Size: 57 KiB |
@@ -1,39 +0,0 @@
|
||||
# ===== Log =====
|
||||
# log.info xxx
|
||||
# log.warn xxx
|
||||
# log.info xxx
|
||||
# log.debug xxx
|
||||
# 带颜色的echo
|
||||
function log.color_output() {
|
||||
local color=$1
|
||||
shift 1
|
||||
|
||||
echo >&2 -e "\033[${color}m$@\033[0m"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Log is named without prefix "utils." for convenience
|
||||
# Usage: log.log <level> ...content
|
||||
function log.log() {
|
||||
if [[ $# < 2 ]]; then
|
||||
return -1
|
||||
fi
|
||||
|
||||
local level=$1
|
||||
shift 1
|
||||
|
||||
case $level in
|
||||
error) log.color_output "0;31" "[ERROR] $@" ;;
|
||||
warn) log.color_output "1;33" "[WARN] $@" ;;
|
||||
info) log.color_output "1;37" "[INFO] $@" ;;
|
||||
debug) log.color_output "1;30" "[DEBUG] $@" ;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function log.error() { log.log "error" "$@"; }
|
||||
function log.warn() { log.log "warn" $@; }
|
||||
function log.info() { log.log "info" $@; }
|
||||
function log.debug() { log.log "debug" $@; }
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#!/bin/bash
|
||||
source $(dirname $0)/log-function.bashimport
|
||||
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'
|
||||
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Get_Dist_Name
|
||||
## 1. If WINEPREFIX is not set, use ~/.wine
|
||||
if [ "$WINEPREFIX" = "" ];then
|
||||
export WINEPREFIX=$HOME/.wine
|
||||
fi
|
||||
|
||||
|
||||
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ];then
|
||||
|
||||
|
||||
log.warn "WARNING:USING BOX64 INSTEAD OF DEEPIN-BOX64,SOME APP MAY FAIL TO LAUNCH"
|
||||
|
||||
spark-box64 /opt/deepin-wine8-stable/bin/wine "$@"
|
||||
else
|
||||
deepin-wine8-stable "$@"
|
||||
fi
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
# ===== Log =====
|
||||
# log.info xxx
|
||||
# log.warn xxx
|
||||
# log.info xxx
|
||||
# log.debug xxx
|
||||
# 带颜色的echo
|
||||
function log.color_output() {
|
||||
local color=$1
|
||||
shift 1
|
||||
|
||||
echo >&2 -e "\033[${color}m$@\033[0m"
|
||||
return 0
|
||||
}
|
||||
|
||||
# Log is named without prefix "utils." for convenience
|
||||
# Usage: log.log <level> ...content
|
||||
function log.log() {
|
||||
if [[ $# < 2 ]]; then
|
||||
return -1
|
||||
fi
|
||||
|
||||
local level=$1
|
||||
shift 1
|
||||
|
||||
case $level in
|
||||
error) log.color_output "0;31" "[ERROR] $@" ;;
|
||||
warn) log.color_output "1;33" "[WARN] $@" ;;
|
||||
info) log.color_output "1;37" "[INFO] $@" ;;
|
||||
debug) log.color_output "1;30" "[DEBUG] $@" ;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
function log.error() { log.log "error" "$@"; }
|
||||
function log.warn() { log.log "warn" $@; }
|
||||
function log.info() { log.log "info" $@; }
|
||||
function log.debug() { log.log "debug" $@; }
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
#/bin/bash
|
||||
source ${SHELL_DIR}/bashimport/transhell.bashimport
|
||||
load_transhell_debug
|
||||
|
||||
#########>>>>>>>函数段
|
||||
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'
|
||||
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
#########<<<<<<<
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
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
|
||||
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
|
||||
echo "检测到已经设置过全局参数,直接复制"
|
||||
echo "全局参数的位置在$HOME/.config/spark-wine/scale.txt,如果需要更换请删除此文件重新生成"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
Get_Dist_Name
|
||||
if [ "$DISTRO" = "UniontechOS" ];then
|
||||
echo 1.0 > $HOME/.config/spark-wine/scale.txt
|
||||
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
|
||||
#####就是1倍缩放
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
|
||||
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
|
||||
scale_factor=`zenity --list \
|
||||
--width=700 \
|
||||
--height=350 \
|
||||
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
|
||||
--column="${TRANSHELL_CONTENT_OPTION}" \
|
||||
1.0 \
|
||||
1.25 \
|
||||
1.5 \
|
||||
1.75 \
|
||||
2.0 \
|
||||
2.5 \
|
||||
3.0 \
|
||||
3.5 \
|
||||
4.0`
|
||||
|
||||
case "$scale_factor" in
|
||||
"")
|
||||
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
|
||||
scale_factor="1.0"
|
||||
;;
|
||||
*)
|
||||
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}!${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
|
||||
;;
|
||||
esac
|
||||
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
|
||||
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
log.warn() { echo -e "[\e[33mWARN\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.error() { echo -e "[\e[31mERROR\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.info() { echo -e "[\e[96mINFO\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.debug() { echo -e "[\e[32mDEBUG\e[0m]: \e[1m$*\e[0m"; }
|
||||
|
Before Width: | Height: | Size: 195 KiB After Width: | Height: | Size: 195 KiB |
@@ -0,0 +1,107 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 导入 transhell.bashimport 脚本并加载调试模式
|
||||
source ${SHELL_DIR}/bashimport/transhell.bashimport
|
||||
load_transhell_debug
|
||||
|
||||
#########>>>>>>> 函数段
|
||||
# 获取当前系统的发行版名称
|
||||
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'
|
||||
elif grep -Eqi "GXDE" /etc/issue || grep -Eq "GXDE" /etc/*-release; then
|
||||
DISTRO='GXDE'
|
||||
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}
|
||||
|
||||
# 检测常见的缩放环境变量
|
||||
Check_Scale_Env_Vars()
|
||||
{
|
||||
if [ -n "$DEEPIN_WINE_SCALE" ]; then
|
||||
echo "$DEEPIN_WINE_SCALE"
|
||||
return 0
|
||||
elif [ -n "$GDK_SCALE" ]; then
|
||||
echo "$GDK_SCALE"
|
||||
return 0
|
||||
elif [ -n "$QT_SCALE_FACTOR" ]; then
|
||||
echo "$QT_SCALE_FACTOR"
|
||||
return 0
|
||||
elif [ -n "$WINIT_X11_SCALE_FACTOR" ]; then
|
||||
echo "$WINIT_X11_SCALE_FACTOR"
|
||||
return 0
|
||||
elif [ -n "$ELM_SCALE" ]; then
|
||||
echo "$ELM_SCALE"
|
||||
return 0
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
######<<<<<<<
|
||||
|
||||
# 提示全局参数的位置
|
||||
echo "全局参数的位置在 $HOME/.config/spark-wine/scale.txt"
|
||||
|
||||
# 创建配置目录
|
||||
mkdir -p $HOME/.config/spark-wine/
|
||||
|
||||
# 检查是否已经设置过全局参数
|
||||
if [ -f "$HOME/.config/spark-wine/scale.txt" ]; then
|
||||
echo "已经设置过全局参数,使用"
|
||||
echo "全局参数的位置在 $HOME/.config/spark-wine/scale.txt,如果需要更换请删除此文件重新生成"
|
||||
exit
|
||||
fi
|
||||
|
||||
# 检测常见的缩放环境变量
|
||||
scale_value=$(Check_Scale_Env_Vars)
|
||||
if [ -n "$scale_value" ]; then
|
||||
echo "$scale_value" > $HOME/.config/spark-wine/scale.txt
|
||||
echo "检测到缩放环境变量,使用 $scale_value 作为缩放比例"
|
||||
exit
|
||||
fi
|
||||
|
||||
# 如果环境变量未设置,则根据系统发行版设置默认缩放比例
|
||||
Get_Dist_Name
|
||||
if [ "$DISTRO" = "UniontechOS" ] || [ "$DISTRO" = "GXDE" ]; then
|
||||
echo "1.0" > $HOME/.config/spark-wine/scale.txt
|
||||
echo "检测到 UniontechOS 或 GXDE 系统,使用 1.0 作为默认缩放比例"
|
||||
exit
|
||||
fi
|
||||
|
||||
# 获取当前显示器的分辨率
|
||||
dimensions=$(xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/')
|
||||
|
||||
# 使用 Zenity 弹窗让用户选择缩放比例
|
||||
scale_factor=$(zenity --list \
|
||||
--width=700 \
|
||||
--height=350 \
|
||||
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
|
||||
--column="${TRANSHELL_CONTENT_OPTION}" \
|
||||
1.0 \
|
||||
1.25 \
|
||||
1.5 \
|
||||
1.75 \
|
||||
2.0 \
|
||||
2.5 \
|
||||
3.0 \
|
||||
3.5 \
|
||||
4.0)
|
||||
|
||||
# 处理用户的选择
|
||||
case "$scale_factor" in
|
||||
"")
|
||||
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
|
||||
scale_factor="1.0"
|
||||
;;
|
||||
*)
|
||||
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}!${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
|
||||
;;
|
||||
esac
|
||||
|
||||
# 将用户选择的缩放比例保存到配置文件中
|
||||
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
|
||||
@@ -48,36 +48,17 @@ parse_args() {
|
||||
################
|
||||
parse_args "$@"
|
||||
|
||||
#####先看看PATH对不对
|
||||
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
|
||||
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
|
||||
|
||||
|
||||
if [ "$appointed_scale_factor" = "" ];then
|
||||
#########未指定下,读取$CONTAINER_PATH/scale.txt。如果没有,优先$DEEPIN_WINE_SCALE设置,然后是手动
|
||||
|
||||
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 get-scale.sh to Set "
|
||||
echo "错误:没有检测到DEEPIN_WINE_SCALE,用get-scale.sh设置"
|
||||
${SHELL_DIR}/spark-dwine-helper/scale-set-helper/get-scale.sh "$CONTAINER_PATH"
|
||||
wine_scale=`cat $CONTAINER_PATH/scale.txt`
|
||||
|
||||
${SHELL_DIR}/spark-dwine-helper/scale-set-helper/get-scale.sh
|
||||
wine_scale=$(cat $HOME/.config/spark-wine/scale.txt)
|
||||
echo "检测到的缩放倍数为:$wine_scale"
|
||||
echo "Scale is $wine_scale"
|
||||
else
|
||||
echo "$DEEPIN_WINE_SCALE" > $CONTAINER_PATH/scale.txt
|
||||
wine_scale=`cat $CONTAINER_PATH/scale.txt`
|
||||
echo "检测到的缩放倍数为:$wine_scale"
|
||||
echo "Scale is $wine_scale"
|
||||
fi
|
||||
else
|
||||
wine_scale=`cat $CONTAINER_PATH/scale.txt`
|
||||
|
||||
@@ -111,59 +92,8 @@ fi
|
||||
########如果环境变量里没指定了APPRUN_CMD(在run.sh中)就替换,如果有就直接用来设置
|
||||
|
||||
if [ "$APPRUN_CMD" = "" ];then
|
||||
echo "没有检测到APPRUN_CMD环境变量,执行sed替换。如果要使用wine原生提供的方法,请在环境变量中指定(export)"
|
||||
case "$wine_scale" in
|
||||
1.0*)
|
||||
reg_text="\"LogPixels\"=dword:00000060"
|
||||
;;
|
||||
1.25*)
|
||||
reg_text="\"LogPixels\"=dword:00000078"
|
||||
;;
|
||||
1.5*)
|
||||
reg_text="\"LogPixels\"=dword:00000090"
|
||||
;;
|
||||
1.75*)
|
||||
reg_text="\"LogPixels\"=dword:000000A8"
|
||||
;;
|
||||
2.0*)
|
||||
reg_text="\"LogPixels\"=dword:000000C0"
|
||||
;;
|
||||
2.5*)
|
||||
reg_text="\"LogPixels\"=dword:000000F0"
|
||||
;;
|
||||
3.0*)
|
||||
reg_text="\"LogPixels\"=dword:00000120"
|
||||
;;
|
||||
3.5*)
|
||||
reg_text="\"LogPixels\"=dword:00000150"
|
||||
;;
|
||||
4.0*)
|
||||
reg_text="\"LogPixels\"=dword:00000180"
|
||||
;;
|
||||
*)
|
||||
reg_text="\"LogPixels\"=dword:00000060"
|
||||
#可能不是Xorg
|
||||
;;
|
||||
esac
|
||||
|
||||
#####根据scale设置dword值
|
||||
|
||||
|
||||
LogPixels_line=(`sed -n -e "/"LogPixels"/=" $CONTAINER_PATH/user.reg`)
|
||||
#####关键词行数取得
|
||||
until [ "${#LogPixels_line[@]}" = "0" ];do
|
||||
|
||||
|
||||
line_num=${LogPixels_line[0]}
|
||||
|
||||
sed -i "$line_num"c\ "$reg_text" "$CONTAINER_PATH/user.reg"
|
||||
LogPixels_line=(${LogPixels_line[@]:1})
|
||||
done
|
||||
|
||||
echo "已经完成替换。位置:$CONTAINER_PATH/user.reg"
|
||||
echo "在以下行数进行了替换,内容为$reg_text"
|
||||
echo `sed -n -e "/"LogPixels"/=" $CONTAINER_PATH/user.reg`
|
||||
echo "---------------------------------------"
|
||||
echo "没有检测到APPRUN_CMD环境变量,请在环境变量中指定(export),本脚本退出"
|
||||
exit 1
|
||||
|
||||
else
|
||||
#####用wine提供的方法
|
||||
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 定义日志函数
|
||||
log.warn() { echo -e "[\e[33mWARN\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.error() { echo -e "[\e[31mERROR\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.info() { echo -e "[\e[96mINFO\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.debug() { echo -e "[\e[32mDEBUG\e[0m]: \e[1m$*\e[0m"; }
|
||||
|
||||
desktop_dir="${HOME}/.local/share/applications/wine/Programs"
|
||||
|
||||
find "$desktop_dir" -type f -name "*.desktop" | while read -r desktop_file; do
|
||||
log.debug "处理文件: $desktop_file"
|
||||
|
||||
exec_line=$(grep -i '^Exec=' "$desktop_file" | cut -d'=' -f2- | xargs)
|
||||
wineprefix=$(echo "$exec_line" | grep -o 'WINEPREFIX=[^ ]*' | cut -d'=' -f2)
|
||||
|
||||
# 核心修复:使用正则表达式提取完整Windows路径
|
||||
exe_win_path=$(echo "$exec_line" | grep -o 'C:\\\\.*\.lnk' | head -1)
|
||||
|
||||
log.debug "WINEPREFIX: '$wineprefix'"
|
||||
log.debug "原始 Windows 路径: '$exe_win_path'"
|
||||
|
||||
if [[ -z "$wineprefix" || -z "$exe_win_path" ]]; then
|
||||
log.warn "参数不完整,跳过"
|
||||
continue
|
||||
fi
|
||||
|
||||
# 路径转换:处理转义字符和路径分隔符
|
||||
exe_win_path_unix=$(printf "%b" "$exe_win_path" | sed -e 's/\\/\//g' -e 's/^[cC]://')
|
||||
exe_path_unix="${wineprefix}/dosdevices/c:/${exe_win_path_unix}"
|
||||
|
||||
log.debug "转换后的 UNIX 路径: $exe_path_unix"
|
||||
|
||||
if [[ ! -f "$exe_path_unix" ]]; then
|
||||
log.info "文件不存在: $exe_path_unix, 删除 $desktop_file"
|
||||
rm "$desktop_file"
|
||||
else
|
||||
log.debug "文件存在: $exe_path_unix"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -vf ${HOME}/.local/share/applications/wine-*
|
||||
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/spark-dwine-helper/spark-dwine-helper/wine-app-launcher/spark-wine-launcher winecfg"
|
||||
Icon=spark-wine-configure
|
||||
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;
|
||||
Name=Configure Windows App
|
||||
Name[zh_CN]=Windows 控制面板
|
||||
StartupWMClass=spark-wine-launcher
|
||||
Terminal=False
|
||||
Type=Application
|
||||
NoDisplay=false
|
||||
@@ -0,0 +1,12 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/spark-dwine-helper/spark-dwine-helper/wine-app-launcher/spark-wine-launcher %F"
|
||||
Icon=spark-wine-launcher
|
||||
MimeType=application/x-ms-dos-executable;application/x-msi;application/x-ms-shortcut;
|
||||
Name=Launch Windows App
|
||||
Name[zh_CN]=启动Windows应用
|
||||
StartupWMClass=spark-wine-launcher
|
||||
Terminal=False
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/spark-dwine-helper/spark-dwine-helper/wine-app-launcher/spark-wine-launcher uninstaller"
|
||||
Icon=spark-wine-uninstaller
|
||||
MimeType=
|
||||
Name=Uninstall Windows App
|
||||
Name[zh_CN]=卸载Windows应用
|
||||
NoDisplay=false
|
||||
StartupWMClass=spark-wine-uninstaller
|
||||
Terminal=False
|
||||
Type=Application
|
||||
X-Deepin-Vendor=user-custom
|
||||
@@ -0,0 +1,66 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ===== Log Functions with Colors =====
|
||||
log.warn() { echo -e "[\e[33mWARN\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.error() { echo -e "[\e[31mERROR\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.info() { echo -e "[\e[96mINFO\e[0m]: \e[1m$*\e[0m"; }
|
||||
log.debug() { echo -e "[\e[32mDEBUG\e[0m]: \e[1m$*\e[0m"; }
|
||||
|
||||
# Zenity wrapper function
|
||||
gui_dialog() {
|
||||
if command -v garma &>/dev/null; then
|
||||
garma "$@"
|
||||
else
|
||||
zenity "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check if no arguments were passed
|
||||
if [[ $# -eq 0 ]]; then
|
||||
gui_dialog --info --text="使用方法:\nUsage:\n\nspark-wine9 <application.exe>\n\n请提供要运行的 Windows 应用程序。\nPlease provide the Windows application to run."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if spark-wine9 is installed
|
||||
if [[ ! -e "/usr/bin/spark-wine9" ]]; then
|
||||
gui_dialog --question --text="您尚未安装 spark-wine9 ,是否安装以运行 Windows 应用?\nYou haven't installed spark-wine9 yet. Would you like to install it to run Windows applications?"
|
||||
if [[ $? -ne 0 ]]; then
|
||||
log.error "User refused to install. Exiting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Install spark-wine with progress indicator
|
||||
pkexec bash -c "aptss update && aptss install spark-wine9 spark-wine9-mono -y" | gui_dialog --progress --pulsate --auto-close --no-cancel --text="正在安装,请保持网络畅通,耐心等待\nInstalling, please keep network connection and wait patiently"
|
||||
INSTALL_STATUS=${PIPESTATUS[0]}
|
||||
|
||||
# Check the installation status correctly
|
||||
if [[ $INSTALL_STATUS -ne 0 ]]; then
|
||||
gui_dialog --error --text="安装出错,请手动执行以下指令查看错误并反馈:\nError occurred during installation. Please execute the command below to view the error log:\n\nsudo aptss install spark-wine9 spark-wine9-mono -y"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
# Run spark-wine with WINEPREFIX
|
||||
export WINEPREFIX="${WINEPREFIX:=$HOME/.deepinwine/spark-wine-custom}"
|
||||
export APPRUN_CMD="/usr/bin/spark-wine9"
|
||||
export SHELL_DIR="/opt/spark-dwine-helper"
|
||||
|
||||
if [[ "$WINEPREFIX" != $HOME/.deepinwine/spark-wine-custom ]];then
|
||||
${APPRUN_CMD} "$@"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
|
||||
(
|
||||
mkdir -p ${WINEPREFIX}
|
||||
${SHELL_DIR}/spark-dwine-helper/scale-set-helper/set-wine-scale.sh ${WINEPREFIX} &
|
||||
# ${APPRUN_CMD} reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /f &
|
||||
wait
|
||||
) | gui_dialog --progress --pulsate --auto-close --no-cancel --text="正在准备应用...\nPreparing Windows APP..."
|
||||
|
||||
${APPRUN_CMD} "$@"
|
||||
/opt/spark-dwine-helper/spark-dwine-helper/spark-wine-desktop-auto-cleanner
|
||||
@@ -0,0 +1,78 @@
|
||||
#/bin/bash
|
||||
SHELL_DIR=$(dirname $(realpath $0))
|
||||
|
||||
source /opt/bashimport/transhell.sh
|
||||
load_transhell_debug
|
||||
|
||||
until [ "$IS_CLOSE" = "1" ];do
|
||||
|
||||
CHOSEN_SETTINGS=`zenity --list \
|
||||
--width=700 \
|
||||
--height=350 \
|
||||
--title="${TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN}" \
|
||||
--column="${TRANSHELL_CONTENT_OPTION}" \
|
||||
"${TRANSHELL_CONTENT_SET_APP}" \
|
||||
"${TRANSHELL_CONTENT_SET_GLOBAL_SCALE}" \
|
||||
"${TRANSHELL_CONTENT_REMOVE_GLOBAL_SCALE}" \
|
||||
"${TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL}" \
|
||||
"${TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}" `
|
||||
|
||||
echo "$CHOSEN_SETTINGS"
|
||||
case "$CHOSEN_SETTINGS" in
|
||||
"${TRANSHELL_CONTENT_SET_GLOBAL_SCALE}")
|
||||
########
|
||||
|
||||
|
||||
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
|
||||
scale_factor=`zenity --list \
|
||||
--width=700 \
|
||||
--height=350 \
|
||||
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
|
||||
--column="${TRANSHELL_CONTENT_OPTION}" \
|
||||
1.0 \
|
||||
1.25 \
|
||||
1.5 \
|
||||
1.75 \
|
||||
2.0`
|
||||
|
||||
case "$scale_factor" in
|
||||
"")
|
||||
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}" --width=500 --height=150
|
||||
scale_factor="1.0"
|
||||
;;
|
||||
*)
|
||||
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}" --width=500 --height=150
|
||||
;;
|
||||
esac
|
||||
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
|
||||
|
||||
|
||||
;;
|
||||
########
|
||||
|
||||
|
||||
|
||||
|
||||
"${TRANSHELL_CONTENT_SET_APP}")
|
||||
bash "${SHELL_DIR}/wine-app-launcher.sh"
|
||||
;;
|
||||
"${TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL}")
|
||||
find ${HOME}/.deepinwine/ -name "scale.txt" -type f -print -exec rm -rf {} \;
|
||||
zenity --info --text="${TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL}:\n`cd ${HOME}/.deepinwine/ && ls`" --width=500 --height=150
|
||||
;;
|
||||
"${TRANSHELL_CONTENT_REMOVE_GLOBAL_SCALE}")
|
||||
rm -fv $HOME/.config/spark-wine/scale.txt
|
||||
zenity --info --text="${TRANSHELL_CONTENT_REMOVED}" --width=500 --height=150
|
||||
|
||||
;;
|
||||
"${TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}")
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
IS_CLOSE="1"
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
done
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="Welcome to spark wine helper settings,Please choose one option below to excute"
|
||||
TRANSHELL_CONTENT_OPTION="Options"
|
||||
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="Set global scale"
|
||||
TRANSHELL_CONTENT_REMOVE_GLOBAL_SCALE="Remove global scale, follow the detected ENV_VAR"
|
||||
TRANSHELL_CONTENT_SET_APP="Single App Settings"
|
||||
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="Sync all the wine app scale with global scale in one key"
|
||||
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="Note: The options above only take effect on spark-dwine-helper apps"
|
||||
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="Your dimension is :"
|
||||
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="Please choose one option below"
|
||||
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="Setting 1.0 scale as default"
|
||||
TRANSHELL_CONTENT_SCALE_IS="Scale multiple is "
|
||||
TRANSHELL_CONTENT_SAVED="Saved."
|
||||
TRANSHELL_CONTENT_REMOVED="Removed."
|
||||
TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY="Please choose the directory the app you want to adjust in(Please choose DIRECTORY instead of file)"
|
||||
TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE="E:user.reg can not be found.This is not a wine bottle"
|
||||
TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL="Sync with global scale settings"
|
||||
TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL="Will sync with global scale settings"
|
||||
TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL="The scale settings of apps in bottle below is already syncd with global scale settings"
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="欢迎使用星火wine助手控制中心,请在以下选项中选择一个执行!"
|
||||
TRANSHELL_CONTENT_OPTION="选项"
|
||||
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="设置全局缩放"
|
||||
TRANSHELL_CONTENT_REMOVE_GLOBAL_SCALE="删除全局缩放设置,跟随检测到的环境变量设置"
|
||||
TRANSHELL_CONTENT_SET_APP="设置单个应用"
|
||||
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="一键将所有已安装应用的缩放设置改为与全局缩放一致"
|
||||
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="备注:以上操作仅对使用了spark-dwine-helper的应用生效"
|
||||
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="您的分辨率是:"
|
||||
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="请在以下选项中选择一个"
|
||||
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="默认为1倍缩放。"
|
||||
TRANSHELL_CONTENT_SCALE_IS="缩放倍数为"
|
||||
TRANSHELL_CONTENT_SAVED="已保存"
|
||||
TRANSHELL_CONTENT_REMOVED="已删除"
|
||||
TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY="请在接下来的文件选择框选中所需的应用所在的容器文件夹(注意要选择文件夹)"
|
||||
TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE="错误:找不到user.reg.这不是一个wine容器"
|
||||
TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL="与全局设置同步"
|
||||
TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL="将会与全局设置同步"
|
||||
TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL="以下容器中的应用的缩放设置已与全局设置同步"
|
||||
@@ -2,10 +2,9 @@
|
||||
|
||||
SHELL_DIR=$(dirname $(realpath $0))
|
||||
|
||||
# 函数:获取所有应用列表
|
||||
# 函数:获取所有应用列表
|
||||
apps_list=()
|
||||
get_apps_list() {
|
||||
local apps_list=()
|
||||
|
||||
local app_dirs=($(find /opt/apps -mindepth 1 -maxdepth 1 -type d -exec test -f {}/files/run.sh \; -print))
|
||||
|
||||
if [ ${#app_dirs[@]} -eq 0 ]; then
|
||||
@@ -28,17 +27,16 @@ get_apps_list() {
|
||||
version="无法读取"
|
||||
fi
|
||||
# START_SHELL_PATH=XXX/spark_run_v4.sh
|
||||
if grep START_SHELL_PATH= "$run_script" | grep spark_run_v4.sh; then
|
||||
if grep spark_run_v4.sh "$run_script" >/dev/null 2>&1 ; then
|
||||
use_spark="是"
|
||||
fi
|
||||
fi
|
||||
|
||||
local app_name=$(get_app_name "$package_name")
|
||||
|
||||
apps_list+=("$app_name" "$package_name" "$bottle_name" "$version" "$use_spark")
|
||||
apps_list+=("$app_name" "$package_name" "$bottle_name" "$version" "$use_spark")
|
||||
done
|
||||
|
||||
echo "${apps_list[@]}"
|
||||
|
||||
}
|
||||
|
||||
# 函数:获取应用名称
|
||||
@@ -58,14 +56,18 @@ get_app_name() {
|
||||
|
||||
# 函数:选择应用
|
||||
select_app() {
|
||||
local apps_list=($(get_apps_list))
|
||||
local app=$(zenity --print-column=2 --width=800 --height=600 --list --title="选择应用" --text="选择要执行的应用" --column="应用名" --column="包名" --column="容器名" --column="版本号" --column="是否使用星火wine助手" "${apps_list[@]}")
|
||||
get_apps_list
|
||||
for (( i = 0; i < ${#apps_list[@]}; i++ )); do
|
||||
echo ${apps_list[$i]}
|
||||
done
|
||||
|
||||
local app=$(zenity --print-column=2 --width=800 --height=600 --list --title="选择应用" --text="选择要执行的应用" --column="应用名" --column="包名" --column="容器名" --column="版本号" --column="是否使用星火wine助手" "${apps_list[@]}")
|
||||
|
||||
if [ -n "$app" ]; then
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local use_spark="否"
|
||||
if if grep START_SHELL_PATH= "$run_script" | grep spark_run_v4.sh; then
|
||||
if grep spark_run_v4.sh "$run_script" >/dev/null 2>&1 ; then
|
||||
use_spark="是"
|
||||
fi
|
||||
if [ "$use_spark" == "是" ]; then
|
||||
@@ -74,6 +76,8 @@ select_app() {
|
||||
select_non_spark_action "$app" "$(get_app_name $app)"
|
||||
fi
|
||||
fi
|
||||
### 还原分隔符
|
||||
IFS="$IFS_OLD"
|
||||
}
|
||||
|
||||
select_non_spark_action(){
|
||||
@@ -121,7 +125,7 @@ select_non_spark_action(){
|
||||
select_spark_action() {
|
||||
local app="$1"
|
||||
local app_name="$2"
|
||||
local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "修改应用缩放" "修改全局缩放" "更多操作")
|
||||
local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "修改应用缩放" "更多操作")
|
||||
local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}")
|
||||
|
||||
case "$choice" in
|
||||
@@ -147,9 +151,9 @@ select_spark_action() {
|
||||
"修改应用缩放")
|
||||
select_scale_action "应用" "$app"
|
||||
;;
|
||||
"修改全局缩放")
|
||||
select_scale_action "全局" "$app"
|
||||
;;
|
||||
# "修改全局缩放")
|
||||
# select_scale_action "全局" "$app"
|
||||
# ;;
|
||||
"更多操作")
|
||||
if [ -e /usr/bin/deepin-wine-runner ];then
|
||||
/usr/bin/deepin-wine-runner
|
||||
@@ -183,7 +187,7 @@ select_scale_action() {
|
||||
if [ "$scale_factor" == "恢复默认" ];then
|
||||
rm $HOME/.deepinwine/$bottle_name/scale.txt
|
||||
else
|
||||
$SHELL_DIR/scale-set-helper/set-wine-scale.sh -s "$scale_factor" "$HOME/.deepinwine/$bottle_name"
|
||||
echo "$scale_factor" > "$HOME/.deepinwine/$bottle_name/scale.txt"
|
||||
fi
|
||||
elif [ "$scale_type" == "全局" ]; then
|
||||
if [ "$scale_factor" == "恢复默认" ];then
|
||||
@@ -24,6 +24,8 @@ function get_app_name() {
|
||||
|
||||
if [ -z "$app_name_i18n" ]; then
|
||||
app_name="$app_name_orig"
|
||||
elif [ -z "$app_name_orig" ]; then
|
||||
app_name="自定义应用"
|
||||
else
|
||||
app_name="$app_name_i18n"
|
||||
fi
|
||||
@@ -31,12 +33,12 @@ function get_app_name() {
|
||||
echo "$app_name"
|
||||
}
|
||||
######### Vars
|
||||
BOTTLENAME=""
|
||||
BOTTLENAME="$1"
|
||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
||||
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
||||
APPVER=""
|
||||
APPTAR="files.7z"
|
||||
BOTTLENAME=""
|
||||
WINE_CMD="deepin-wine"
|
||||
#这里会被后续覆盖
|
||||
LOG_FILE=$0
|
||||
@@ -65,14 +67,6 @@ if [ $APPRUN_CMD ]; then
|
||||
WINE_CMD=$APPRUN_CMD
|
||||
fi
|
||||
|
||||
#####################
|
||||
|
||||
if [ "$WINE_CMD" = "deepin-wine8-stable" ] && [ "$(arch)" != "x86_64" ];then
|
||||
|
||||
WINE_CMD="${SHELL_DIR}/spark-dwine-helper/deepin-wine8-stable-wrapper/deepin-wine8-stable"
|
||||
log.warn "Using deepin-wine8-stable wrapper to fix arm problem"
|
||||
fi
|
||||
|
||||
|
||||
##################### Functions
|
||||
progressbar()
|
||||
@@ -261,7 +255,7 @@ CallProcess()
|
||||
|
||||
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
|
||||
${SHELL_DIR}/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX"
|
||||
$SHELL_DIR/spark-wine-banner &
|
||||
#$SHELL_DIR/spark-wine-banner &
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@"
|
||||
|
||||
#start autobottle
|
||||
1
spark-dwine-helper/s-wine-helper/usr/bin/spark-wine-launcher
Symbolic link
@@ -0,0 +1 @@
|
||||
../../opt/spark-dwine-helper/spark-dwine-helper/wine-app-launcher/spark-wine-launcher
|
||||
@@ -0,0 +1,13 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/spark-dwine-helper/spark-dwine-helper/wine-app-settings/settings.sh"
|
||||
Icon=spark-dwine-helper
|
||||
MimeType=
|
||||
Name=Spark Store Wine App Settings
|
||||
Name[zh_CN]=星火商店Wine应用设置
|
||||
NoDisplay=false
|
||||
StartupWMClass=spark-dwine-helper
|
||||
Terminal=False
|
||||
Type=Application
|
||||
X-Deepin-Vendor=user-custom
|
||||
@@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/wine-app-launcher/wine-app-launcher.sh"
|
||||
Icon=store.spark-app.spark-dwine-helper
|
||||
MimeType=
|
||||
Name=Spark Wine App Launcher
|
||||
Name[zh_CN]=星火Wine应用启动器
|
||||
StartupWMClass=store.spark-app.spark-dwine-helper
|
||||
Terminal=False
|
||||
Type=Application
|
||||
NoDisplay=false
|
||||
X-Deepin-Vendor=user-custom
|
||||
|
After Width: | Height: | Size: 416 KiB |
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg width="800px" height="800px" viewBox="0 0 72 72" id="emoji" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="color">
|
||||
<path fill="#D0CFCE" stroke="none" d="M13.8627,12.1552c-1.1508,0-2.0876,0.9362-2.0876,2.0876v43.5128c0,1.1508,0.9368,2.0876,2.0876,2.0876 h43.5139c1.1508,0,2.0876-0.9368,2.0876-2.0876V14.2428c0-1.1514-0.9368-2.0876-2.0876-2.0876H13.8627z"/>
|
||||
<path fill="#9B9B9A" stroke="none" d="M18.3877,47.8604c0-0.5528,1.4504,2.0709,1.4504,2.0709s2.3432,2.9292,4.5493,2.9292s5-2.794,5-5 c0-2.2061-0.7639-4.5707-2.97-4.5707c-0.5527,0-2.5849-1.4257-2.0346-1.4285c-0.0067,0-0.0132-0.0009-0.0198-0.0009 c-1.5741,0-3.002,0.6109-4.0723,1.6024l-1.2249,1.5816c-0.4475,0.84-0.703,1.7979-0.703,2.8161"/>
|
||||
<path fill="#9B9B9A" stroke="none" d="M50.8994,43.6182c0.3906,0.3906-1.0234,0.5113-1.414,0.1206c-1.5118-1.5117-4.1456-1.7685-5.6573-0.2568 c-0.7558,0.7559-2.3559,2.969-2.3559,4.0374c0,1.0683,0.8929,3.1207,1.6487,3.8766c1.5586,1.5585,4.7518,1.8046,6.3124,0.2461 c0.3906-0.3907,1.8563,0.0683,1.4677,0.459c0.8179-0.8186,1.3997-1.8728,1.6368-3.0517l0.0579-1.9982 c-0.2074-1.5344-0.9886-2.8865-2.128-3.8247C50.6166,43.3495,50.761,43.4797,50.8994,43.6182z"/>
|
||||
<path fill="#9B9B9A" stroke="none" d="M30.302,24.7566c-0.1589-1.1738-0.6542-2.2388-1.3899-3.095c0.2868,0.4086-0.9581,0.4745-1.3262,0.0629 c-0.7139-0.7949-1.6947-1.0792-2.7611-1.1373c-1.0722-0.0499-2.9824,0.2682-3.7783,0.981 c-0.7949,0.7139-1.6015,2.4796-1.6591,3.5465c-0.0586,1.0674-0.1538,2.4763,0.5601,3.2713 c0.7138,0.7954,3.157,2.3541,4.2244,2.4117c1.0576,0.0508,4.6217-1.235,4.2928-0.8597c0.891-0.8364,1.5295-1.9377,1.7797-3.1826 L30.302,24.7566z"/>
|
||||
<path fill="#9B9B9A" stroke="none" d="M51.7237,22.3636l-1.3348-1.4893c-0.9584-0.7633-2.1552-1.235-3.4612-1.2935 c0.5337,0.0405-1.3506,1.1086-1.3506,1.1086s-3.8299,2.4771-3.9168,4.6807c-0.086,2.2031,2.6346,5.145,4.8387,5.2329 c2.2002,0.0898,4.958-1.7837,5.0449-3.9873c0.0215-0.5522,1.1056-1.3812,1.1023-0.8443c0.0024-0.0684,0.0104-0.1352,0.0104-0.2042 C52.6566,24.3878,52.3115,23.2913,51.7237,22.3636z"/>
|
||||
</g>
|
||||
<g id="hair"/>
|
||||
<g id="skin"/>
|
||||
<g id="skin-shadow"/>
|
||||
<g id="line">
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M56.4636,59.8432h-41.688c-1.6569,0-3-1.3431-3-3v-41.688c0-1.6569,1.3431-3,3-3h41.688c1.6569,0,3,1.3431,3,3v41.688 C59.4636,58.5001,58.1205,59.8432,56.4636,59.8432z"/>
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M51.6525,25.7643c-0.1089,2.7593-2.434,4.9079-5.1932,4.799c-2.7594-0.1089-4.9079-2.434-4.799-5.1932 c0.1089-2.7593,2.4339-4.9079,5.1932-4.799"/>
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M27.7268,29.2886c-2.0552,1.8442-5.2165,1.6732-7.0608-0.382c-1.8442-2.0552-1.6732-5.2165,0.382-7.0608 c2.0552-1.8442,5.2165-1.6732,7.0608,0.382"/>
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M50.1919,51.396c-1.9526,1.9527-5.1184,1.9526-7.071,0c-1.9527-1.9526-1.9527-5.1184,0-7.071c1.9526-1.9526,5.1184-1.9527,7.071,0"/>
|
||||
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2" d="M24.3874,42.8605c2.7614,0,5,2.2386,5,5c0,2.7615-2.2386,5-5,5c-2.7614,0-5-2.2385-5-5"/>
|
||||
<line x1="24.3874" x2="18.7823" y1="47.8605" y2="43.5674" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||
<line x1="53.492" x2="46.6564" y1="48.0799" y2="47.8605" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||
<line x1="31.3463" x2="24.1665" y1="25.7985" y2="25.5152" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||
<line x1="51.6564" x2="46.6564" y1="21.0804" y2="25.5672" fill="none" stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2"/>
|
||||
</g>
|
||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="144px" height="144px"><g id="Layer_1"><linearGradient id="SVGID_1_" x1="6.001" x2="22.807" y1="29.396" y2="29.396" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#33bef0"/><stop offset="1" stop-color="#22a5e2"/></linearGradient><path fill="url(#SVGID_1_)" d="M22.8,24.5l-3.5,12.1c-3-2.1-6.3-3.7-13.3-0.8l3.4-11.9l0,0C16.4,20.9,19.8,22.4,22.8,24.5z"/><linearGradient id="SVGID_00000064344804604185625220000003582743550301639556_" x1="39.149" x2="17.839" y1="32.84" y2="32.84" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fede00"/><stop offset="1" stop-color="#ffd000"/></linearGradient><path fill="url(#SVGID_00000064344804604185625220000003582743550301639556_)" d="M24.6,25.7l-3.4,11.9 c3,2.1,6.4,3.7,13.4,0.8l3.3-11.6C30.8,29.2,27.7,27.7,24.6,25.7z"/><linearGradient id="SVGID_00000067194281375023334940000000214048285996100276_" x1="10.011" x2="26.828" y1="15.169" y2="15.169" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#f44f5a"/><stop offset=".443" stop-color="#ee3d4a"/><stop offset="1" stop-color="#e52030"/></linearGradient><path fill="url(#SVGID_00000067194281375023334940000000214048285996100276_)" d="M23.4,22.3l3.4-12 c-3-2.1-6.4-3.7-13.4-0.8l-3.4,12c2.8-1.2,5-1.7,6.8-1.7C19.6,19.9,21.6,21.1,23.4,22.3z"/><linearGradient id="SVGID_00000104673114758685606420000016406648196720083331_" x1="35.787" x2="19.822" y1="18.835" y2="18.835" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#21ad64"/><stop offset="1" stop-color="#088242"/></linearGradient><path fill="url(#SVGID_00000104673114758685606420000016406648196720083331_)" d="M28.6,11.6l-3.4,12 c3,2.1,6.7,3.8,13.4,0.7l3.4-12C35,15.3,31.7,13.7,28.6,11.6z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg width="100" height="100" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<!-- 背景 -->
|
||||
<rect width="24" height="24" rx="5" fill="#f2f2f2"/>
|
||||
|
||||
<!-- 盖子 -->
|
||||
<path d="M8 4L9 3h6l1 1h3v2H5V4h3z" fill="#888"/>
|
||||
|
||||
<!-- 垃圾桶主体(加宽底部) -->
|
||||
<path d="M6 7h12l-1.5 12H7.5L6 7z" fill="#555"/>
|
||||
|
||||
<!-- 竖线,增强立体感 -->
|
||||
<path d="M8 9v8M10 9v8M12 9v8M14 9v8M16 9v8" stroke="#777" stroke-width="1"/>
|
||||
|
||||
<!-- 红色 X 代表卸载 -->
|
||||
<circle cx="18" cy="6" r="4" fill="#ff5f5f"/>
|
||||
<path d="M16.5 4.5l3 3m0-3l-3 3" stroke="white" stroke-width="1.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 57 KiB |
@@ -1,13 +1,14 @@
|
||||
function Remove_Bottle_Before_Update(){
|
||||
chmod -R +w $HOME/.deepinwine/容器名
|
||||
rm -rf $HOME/.deepinwine/容器名
|
||||
local BOTTLENAME="容器名"
|
||||
echo "$HOME/.deepinwine/${BOTTLENAME} is going to be deleted before Update"
|
||||
chmod -R +w $HOME/.deepinwine/${BOTTLENAME}
|
||||
rm -rf $HOME/.deepinwine/${BOTTLENAME}
|
||||
}
|
||||
|
||||
|
||||
#########这是个例子,对于那些需要删除容器再更新的软件用的,不是每个都需要
|
||||
|
||||
function CallPreUpdate(){
|
||||
echo "$HOME/.deepinwine/容器名 is going to be deleted before Update"
|
||||
|
||||
Remove_Bottle_Before_Update
|
||||
DeployApp
|
||||
|
||||
22
打包用例/run.sh
@@ -48,6 +48,8 @@ Get_Dist_Name()
|
||||
DISTRO='Deepin'
|
||||
elif grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
elif grep -Eqi "GXDE" /etc/issue || grep -Eq "GXDE" /etc/*-release; then
|
||||
DISTRO='GXDE'
|
||||
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
@@ -66,18 +68,18 @@ BOTTLENAME="容器名"
|
||||
APPVER="版本号"
|
||||
EXEC_PATH="启动路径"
|
||||
##### 软件在wine中的启动路径
|
||||
## Priority Policy: 软件自带>spark-dwine-helper>deepin-wine-helper
|
||||
SHELL_DIR=$(dirname $(realpath $0))
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh" ## Fallback
|
||||
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
|
||||
fi
|
||||
## If exist spark dwine helper, then use it as default
|
||||
if [ -e "$SHELL_DIR/deepinwine/tools/spark_run_v4.sh" ] ;then
|
||||
# 如果 helper 在 run.sh 相同目录的 deepinwine/tools/spark_run_v4.sh 则可以调用
|
||||
START_SHELL_PATH="$SHELL_DIR/deepinwine/tools/spark_run_v4.sh"
|
||||
fi
|
||||
if [ -e "/opt/deepinwine/tools/run_v4.sh" ] ;then
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
|
||||
fi
|
||||
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
|
||||
fi
|
||||
## If
|
||||
ENABLE_DOT_NET=""
|
||||
####若使用spark-wine时需要用到.net,则请把ENABLE_DOT_NET设为true,同时在依赖中写spark-wine7-mono
|
||||
#export BOX86_EMU_CMD="/opt/spark-box86/box86"
|
||||
@@ -109,7 +111,7 @@ DISABLE_ATTACH_FILE_DIALOG=""
|
||||
##############<<<<<<<<<禁用文件选择工具开始
|
||||
Get_Dist_Name
|
||||
#此功能实现参见开头函数段
|
||||
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ];then
|
||||
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ]&& [ "$DISTRO" != "GXDE" ];then
|
||||
DISABLE_ATTACH_FILE_DIALOG="1"
|
||||
echo "非deepin/UOS,默认关闭系统自带的文件选择工具,使用Wine的"
|
||||
echo "如果你想改变这个行为,请到/opt/apps/$DEB_PACKAGE_NAME/files/$0处修改"
|
||||
@@ -120,7 +122,7 @@ fi
|
||||
|
||||
##############<<<<<<<<<屏蔽mono和gecko安装器开始
|
||||
##默认屏蔽mono和gecko安装器
|
||||
if [ "$APPRUN_CMD" = "spark-wine7-devel" ] || [ "$APPRUN_CMD" = "spark-wine" ]|| [ "$APPRUN_CMD" = "spark-wine8" ] && [ -z "$ENABLE_DOT_NET" ];then
|
||||
if [ "$APPRUN_CMD" = "spark-wine9" ] || [ "$APPRUN_CMD" = "spark-wine" ]|| [ "$APPRUN_CMD" = "spark-wine8" ] && [ -z "$ENABLE_DOT_NET" ];then
|
||||
|
||||
#export WINEDLLOVERRIDES="mscoree=d,mshtml=d,control.exe=d"
|
||||
export WINEDLLOVERRIDES="control.exe=d"
|
||||
@@ -154,7 +156,7 @@ if [ -n "$EXEC_PATH" ];then
|
||||
if [ -z "${EXEC_PATH##*.lnk*}" ];then
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
|
||||
else
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
|
||||
fi
|
||||
else
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
|
||||
|
||||