mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2026-06-25 15:43:52 +08:00
+8
-6
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
SHELL_DIR=$(dirname $(realpath $0))
|
||||||
|
|
||||||
# 函数:获取所有应用列表
|
# 函数:获取所有应用列表
|
||||||
# 函数:获取所有应用列表
|
# 函数:获取所有应用列表
|
||||||
get_apps_list() {
|
get_apps_list() {
|
||||||
@@ -25,8 +27,8 @@ get_apps_list() {
|
|||||||
if [ -z "$version" ]; then
|
if [ -z "$version" ]; then
|
||||||
version="无法读取"
|
version="无法读取"
|
||||||
fi
|
fi
|
||||||
|
# START_SHELL_PATH=XXX/spark_run_v4.sh
|
||||||
if grep -q "START_SHELL_PATH=\"/opt/deepinwine/tools/spark_run_v4.sh\"" "$run_script"; then
|
if grep START_SHELL_PATH= "$run_script" | grep spark_run_v4.sh; then
|
||||||
use_spark="是"
|
use_spark="是"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -63,7 +65,7 @@ select_app() {
|
|||||||
local app_dir="/opt/apps/$app"
|
local app_dir="/opt/apps/$app"
|
||||||
local run_script="$app_dir/files/run.sh"
|
local run_script="$app_dir/files/run.sh"
|
||||||
local use_spark="否"
|
local use_spark="否"
|
||||||
if grep -q "START_SHELL_PATH=\"/opt/deepinwine/tools/spark_run_v4.sh\"" "$run_script"; then
|
if if grep START_SHELL_PATH= "$run_script" | grep spark_run_v4.sh; then
|
||||||
use_spark="是"
|
use_spark="是"
|
||||||
fi
|
fi
|
||||||
if [ "$use_spark" == "是" ]; then
|
if [ "$use_spark" == "是" ]; then
|
||||||
@@ -95,7 +97,7 @@ select_non_spark_action(){
|
|||||||
local app_dir="/opt/apps/$app"
|
local app_dir="/opt/apps/$app"
|
||||||
local run_script="$app_dir/files/run.sh"
|
local run_script="$app_dir/files/run.sh"
|
||||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||||
/opt/deepinwine/tools/kill.sh ${bottle_name}
|
$SHELL_DIR/../kill.sh ${bottle_name}
|
||||||
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
|
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
|
||||||
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
||||||
;;
|
;;
|
||||||
@@ -138,7 +140,7 @@ select_spark_action() {
|
|||||||
local app_dir="/opt/apps/$app"
|
local app_dir="/opt/apps/$app"
|
||||||
local run_script="$app_dir/files/run.sh"
|
local run_script="$app_dir/files/run.sh"
|
||||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||||
/opt/deepinwine/tools/spark_kill.sh ${bottle_name}
|
$SHELL_DIR/../spark_kill.sh ${bottle_name}
|
||||||
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
|
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
|
||||||
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
||||||
;;
|
;;
|
||||||
@@ -181,7 +183,7 @@ select_scale_action() {
|
|||||||
if [ "$scale_factor" == "恢复默认" ];then
|
if [ "$scale_factor" == "恢复默认" ];then
|
||||||
rm $HOME/.deepinwine/$bottle_name/scale.txt
|
rm $HOME/.deepinwine/$bottle_name/scale.txt
|
||||||
else
|
else
|
||||||
/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s "$scale_factor" "$HOME/.deepinwine/$bottle_name"
|
$SHELL_DIR/scale-set-helper/set-wine-scale.sh -s "$scale_factor" "$HOME/.deepinwine/$bottle_name"
|
||||||
fi
|
fi
|
||||||
elif [ "$scale_type" == "全局" ]; then
|
elif [ "$scale_type" == "全局" ]; then
|
||||||
if [ "$scale_factor" == "恢复默认" ];then
|
if [ "$scale_factor" == "恢复默认" ];then
|
||||||
|
|||||||
+2
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
SHELL_DIR=$(dirname $(realpath $0))
|
||||||
runtime_path=/opt/deepinwine/runtime-i386
|
runtime_path=/opt/deepinwine/runtime-i386
|
||||||
|
echo $runtime_path
|
||||||
if [ -f "$runtime_path/init_runtime.sh" ];then
|
if [ -f "$runtime_path/init_runtime.sh" ];then
|
||||||
source "$runtime_path/init_runtime.sh"
|
source "$runtime_path/init_runtime.sh"
|
||||||
|
|
||||||
|
|||||||
+4
@@ -179,6 +179,10 @@ DisableWrite()
|
|||||||
is_autostart()
|
is_autostart()
|
||||||
{
|
{
|
||||||
AUTOSTART="/opt/deepinwine/tools/autostart"
|
AUTOSTART="/opt/deepinwine/tools/autostart"
|
||||||
|
if [[ -f "$SHELL_DIR/autostart" ]]; then
|
||||||
|
# 如果打包时自带 autostart,则使用自带的
|
||||||
|
AUTOSTART="$SHELL_DIR/autostart"
|
||||||
|
fi
|
||||||
if [ -f "$AUTOSTART.all" ]&&[ -f "/opt/apps/$1/files/run.sh" ];then
|
if [ -f "$AUTOSTART.all" ]&&[ -f "/opt/apps/$1/files/run.sh" ];then
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
+9
-2
@@ -40,10 +40,17 @@ BOTTLENAME="容器名"
|
|||||||
APPVER="版本号"
|
APPVER="版本号"
|
||||||
EXEC_PATH="启动路径"
|
EXEC_PATH="启动路径"
|
||||||
##### 软件在wine中的启动路径
|
##### 软件在wine中的启动路径
|
||||||
|
SHELL_DIR=$(dirname $(realpath $0))
|
||||||
|
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
|
||||||
|
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
|
if [ -e "/opt/deepinwine/tools/spark_run_v4.sh" ] ;then
|
||||||
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
|
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
|
||||||
else
|
|
||||||
START_SHELL_PATH="/opt/deepinwine/tools/run_v4.sh"
|
|
||||||
fi
|
fi
|
||||||
ENABLE_DOT_NET=""
|
ENABLE_DOT_NET=""
|
||||||
####若使用spark-wine时需要用到.net,则请把ENABLE_DOT_NET设为true,同时在依赖中写spark-wine7-mono
|
####若使用spark-wine时需要用到.net,则请把ENABLE_DOT_NET设为true,同时在依赖中写spark-wine7-mono
|
||||||
|
|||||||
Reference in New Issue
Block a user