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