mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2025-12-18 21:11:39 +08:00
Compare commits
38 Commits
5.6.3-1.2
...
5.6.4.5-5.
| Author | SHA1 | Date | |
|---|---|---|---|
| 449e84775f | |||
| 7d19e765cb | |||
| c7b766c4e7 | |||
| 7975c46cd4 | |||
| 8d334aebf8 | |||
| 51d0936e2e | |||
| ac3caf46ac | |||
| 03704b2692 | |||
| 222b5f10a6 | |||
| cd2e804407 | |||
| cd1d78b64c | |||
| 0a203effd1 | |||
| 9cfa2f8327 | |||
| 08d12d068e | |||
| 41e3b3265b | |||
| 7f6d469b22 | |||
| 42ddcb2db3 | |||
| 402e571d8d | |||
| 7526b84fe6 | |||
| 9be1a7a739 | |||
| 719ec216f2 | |||
| 00598891ff | |||
| b82aac8f6f | |||
| 65d88b222f | |||
| 1af2d8e446 | |||
| 5898087510 | |||
| 4e54c62c47 | |||
| a23503e298 | |||
| 0705e9c9ab | |||
| 933497abcf | |||
| c0c0ce9a72 | |||
| 67957b914c | |||
| 5ef1f8aef9 | |||
| 05f3d707d0 | |||
| 11e49d7e3d | |||
| f04b5173b7 | |||
| 16eb5abe05 | |||
| 1860bcb111 |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.deb
|
||||
@@ -15,7 +15,7 @@ version="$1"
|
||||
######################################################
|
||||
echo "build debian package"
|
||||
mkdir -p pkg/DEBIAN
|
||||
cp -r ./s-wine-helper pkg/opt
|
||||
cp -r ./s-wine-helper/* pkg/
|
||||
SIZE=`du -s ./pkg`
|
||||
SIZE=`echo ${SIZE%%.*}`
|
||||
|
||||
@@ -25,10 +25,10 @@ Version: $version
|
||||
Architecture: all
|
||||
Maintainer: shenmo <shenmo@spark-app.store>
|
||||
Installed-Size: $SIZE
|
||||
Depends: zenity, p7zip-legacy (>= 16.02+dfsg-8+Mejituu-2024022216) | p7zip-full (<< 16.02+transitional.1), fonts-noto-cjk, transhell, python3
|
||||
Depends: zenity, p7zip-legacy (>= 16.02+dfsg-8+Mejituu-2024022216) | p7zip-full (<< 16.02+transitional.1), fonts-noto-cjk, transhell, python3, wmctrl
|
||||
Recommends: python3-pyqt5
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Recommends: spark-dwine-helper-settings
|
||||
Multi-Arch: foreign
|
||||
Provides: store.spark-app.spark-dwine-helper(=$version)
|
||||
Replaces: store.spark-app.spark-dwine-helper(<=$version)
|
||||
@@ -38,27 +38,26 @@ Description: Spark Deepin Wine Helper
|
||||
|
||||
EOF
|
||||
|
||||
cp postrm pkg/DEBIAN/postrm
|
||||
|
||||
cp postinst pkg/DEBIAN/postinst
|
||||
cp prerm pkg/DEBIAN/prerm
|
||||
|
||||
chmod +x pkg/DEBIAN/postrm
|
||||
|
||||
chmod +x pkg/DEBIAN/postinst
|
||||
chmod +x pkg/DEBIAN/prerm
|
||||
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
|
||||
cd ..
|
||||
|
||||
echo "普通deb包已经准备好,正在生成UOS deb包"
|
||||
rm -rf pkg/
|
||||
#################################################################
|
||||
mkdir -p pkg/DEBIAN
|
||||
cp -r uos-package-assets/opt pkg/
|
||||
cp -r s-wine-helper/* pkg/opt
|
||||
|
||||
|
||||
|
||||
cat << EOF >pkg/opt/apps/store.spark-app.spark-dwine-helper/info
|
||||
{
|
||||
"appid": "store.spark-app.spark-dwine-helper",
|
||||
"name": "store.spark-app.spark-dwine-helper",
|
||||
"version": "$version",
|
||||
"arch": ["amd64,arm64,mipsel64,sw64"],
|
||||
"arch": ["amd64,arm64"],
|
||||
"permissions": {
|
||||
"autostart": false,
|
||||
"notification": false,
|
||||
@@ -86,9 +85,9 @@ Architecture: all
|
||||
Maintainer: shenmo <shenmo@spark-app.store>
|
||||
Installed-Size: $SIZE
|
||||
Depends: zenity, p7zip-legacy (>= 16.02+dfsg-8+Mejituu-2024022216) | p7zip-full (<< 16.02+transitional.1), fonts-noto-cjk, transhell, python3
|
||||
Recommends: wmctrl,python3-pyqt5
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Recommends: spark-dwine-helper-settings
|
||||
Provides: spark-dwine-helper(=$version)
|
||||
Conflicts: spark-dwine-helper
|
||||
Replaces: spark-dwine-helper(<=$version)
|
||||
@@ -104,31 +103,5 @@ cd ..
|
||||
|
||||
echo "UOS deb包已经准备好"
|
||||
rm -rf pkg/
|
||||
########################################
|
||||
mkdir -p pkg/DEBIAN
|
||||
cp -r spark-dwine-helper-settings/* pkg/
|
||||
SIZE=`du -s ./pkg`
|
||||
SIZE=`echo ${SIZE%%.*}`
|
||||
|
||||
cat << EOF >pkg/DEBIAN/control
|
||||
Package: spark-dwine-helper-settings
|
||||
Version: 1.3.2
|
||||
Architecture: all
|
||||
Maintainer: shenmo <shenmo@spark-app.store>
|
||||
Installed-Size: $SIZE
|
||||
Depends: spark-dwine-helper(>=1.6),transhell,zenity
|
||||
Section: utils
|
||||
Priority: extra
|
||||
Multi-Arch: foreign
|
||||
Homepage: https://gitee.com/deepin-community-store/spark-wine
|
||||
Description: Spark Deepin Wine Helper
|
||||
|
||||
|
||||
|
||||
EOF
|
||||
|
||||
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
|
||||
cd ..
|
||||
|
||||
echo "helper deb包已经准备好"
|
||||
rm -rf pkg/
|
||||
|
||||
7
spark-dwine-helper/postinst
Normal file
7
spark-dwine-helper/postinst
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
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
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
|
||||
|
||||
echo "清理卸载残留"
|
||||
for username in $(ls /home)
|
||||
do
|
||||
echo /home/$username
|
||||
if [ -d /home/$username/.config/spark-wine ]
|
||||
then
|
||||
rm -rf /home/$username/.config/spark-wine
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "非卸载,跳过清理"
|
||||
fi
|
||||
5
spark-dwine-helper/prerm
Normal file
5
spark-dwine-helper/prerm
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -e /opt/deepinwine/tools/spark_run_v4.sh ];then
|
||||
unlink /opt/deepinwine/tools/spark_run_v4.sh
|
||||
fi
|
||||
@@ -0,0 +1,13 @@
|
||||
[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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
##load transhell
|
||||
function load_transhell_debug()
|
||||
{
|
||||
local WORK_PATH="$(dirname $(realpath $0))"
|
||||
echo $WORK_PATH
|
||||
local CURRENT_LANG="$(echo ${LANG%.*})"
|
||||
if [ -e "/usr/share/$(basename $0)/transhell/$(basename $0)_en_US.transhell" ]; then source /usr/share/$(basename $0)/transhell/$(basename $0)_en_US.transhell; echo "Loading transhell from /usr/share/$(basename $0)/transhell/$(basename $0)_en_US.transhell ..."; fi
|
||||
if [ -e "/usr/share/$(basename $0)/transhell/$(basename $0)_$CURRENT_LANG.transhell" ]; then source /usr/share/$(basename $0)/transhell/$(basename $0)_$CURRENT_LANG.transhell; echo "Loading transhell from /usr/share/$(basename $0)/transhell/$(basename $0)_$CURRENT_LANG.transhell ..."; fi
|
||||
if [ -e "${WORK_PATH}/transhell/$(basename $0)_en_US.transhell" ]; then source ${WORK_PATH}/transhell/$(basename $0)_en_US.transhell; echo "Loading transhell from ${WORK_PATH}/transhell/$(basename $0)_en_US.transhell ..."; fi
|
||||
if [ -e "${WORK_PATH}/transhell/$(basename $0)_$CURRENT_LANG.transhell" ]; then source ${WORK_PATH}/transhell/$(basename $0)_$CURRENT_LANG.transhell; echo "Loading transhell from ${WORK_PATH}/transhell/$(basename $0)_$CURRENT_LANG.transhell ..."; fi
|
||||
|
||||
echo "-----------------------------------------------------------------------------"
|
||||
}
|
||||
|
||||
function load_transhell()
|
||||
{
|
||||
local WORK_PATH="$(dirname $(realpath $0))"
|
||||
local CURRENT_LANG="$(echo ${LANG%.*})"
|
||||
if [ -e "/usr/share/$(basename $0)/transhell/$(basename $0)_en_US.transhell" ]; then source /usr/share/$(basename $0)/transhell/$(basename $0)_en_US.transhell; fi
|
||||
if [ -e "/usr/share/$(basename $0)/transhell/$(basename $0)_$CURRENT_LANG.transhell" ]; then source /usr/share/$(basename $0)/transhell/$(basename $0)_$CURRENT_LANG.transhell; fi
|
||||
if [ -e "${WORK_PATH}/transhell/$(basename $0)_en_US.transhell" ]; then source ${WORK_PATH}/transhell/$(basename $0)_en_US.transhell; fi
|
||||
if [ -e "${WORK_PATH}/transhell/$(basename $0)_$CURRENT_LANG.transhell" ]; then source ${WORK_PATH}/transhell/$(basename $0)_$CURRENT_LANG.transhell; fi
|
||||
|
||||
}
|
||||
|
||||
function update_transhell()
|
||||
{
|
||||
load_transhell $@
|
||||
}
|
||||
|
||||
@@ -6,6 +6,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
|
||||
@@ -24,7 +26,7 @@ export WINEPREFIX=$HOME/.wine
|
||||
fi
|
||||
|
||||
|
||||
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ];then
|
||||
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ]&& [ "$DISTRO" != "GXDE" ];then
|
||||
|
||||
|
||||
log.warn "WARNING:USING BOX64 INSTEAD OF DEEPIN-BOX64,SOME APP MAY FAIL TO LAUNCH"
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 195 KiB |
@@ -0,0 +1,127 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import subprocess
|
||||
import threading
|
||||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtCore import *
|
||||
from PyQt5.QtWidgets import *
|
||||
|
||||
|
||||
|
||||
|
||||
def check_window():
|
||||
# 使用 wmctrl 命令列出所有窗口,并使用 grep 过滤出特定的 WMCLASS
|
||||
windows = subprocess.getoutput(f'wmctrl -lx | grep "{target_wmclass}"')
|
||||
# 如果窗口存在,则关闭提示
|
||||
if windows.replace("\n", "").replace(" ", "") != "":
|
||||
# 提取窗口ID
|
||||
window_id = windows.replace(" ", " ").split(" ")[0]
|
||||
|
||||
print(f"Window with WMCLASS '{target_wmclass}' found")
|
||||
return 1
|
||||
# else:
|
||||
# print(f"Window with WMCLASS '{target_wmclass}' not found.")
|
||||
|
||||
|
||||
def check_wmclass():
|
||||
if timeout:
|
||||
time.sleep(timeout)
|
||||
window.close()
|
||||
return
|
||||
# 循环检测窗口是否存在的函数
|
||||
# 每隔一段时间检测一次窗口是否存在
|
||||
showtimeout = 20 # 为防止因为应用无法打开而无法正常关闭窗口,于是设置 time out
|
||||
while True:
|
||||
if check_window():
|
||||
break
|
||||
# 等待一段时间后再次检测
|
||||
time.sleep(1)
|
||||
AppInfoShowerRefresh()
|
||||
showtimeout -= 1
|
||||
if showtimeout <= 0:
|
||||
break
|
||||
window.close()
|
||||
|
||||
|
||||
timeout = 0
|
||||
if os.getenv("WAYLAND_DISPLAY"):
|
||||
timeout = 3
|
||||
|
||||
if os.system("which wmctrl"):
|
||||
print("No wmctrl installed. Do not check wmclass")
|
||||
timeout = 3
|
||||
|
||||
target_wmclass = os.getenv("WINE_WMCLASS")
|
||||
|
||||
def GetRecommendWindowSize(window: QMainWindow):
|
||||
# 计算屏幕分辨率
|
||||
screen = QGuiApplication.primaryScreen()
|
||||
width = screen.geometry().width()
|
||||
height = screen.geometry().height()
|
||||
# 如果为竖状屏幕
|
||||
if width < height:
|
||||
temp = height
|
||||
height = width
|
||||
width = temp
|
||||
return [int(width / 4), window.geometry().height()]
|
||||
|
||||
def SetWindowSize(window: QMainWindow):
|
||||
# 计算比例
|
||||
size = GetRecommendWindowSize(window)
|
||||
window.resize(size[0], size[1])
|
||||
|
||||
def MoveCenter(window: QMainWindow):
|
||||
# 计算屏幕分辨率
|
||||
screen = QGuiApplication.primaryScreen()
|
||||
width = screen.geometry().width()
|
||||
height = screen.geometry().height()
|
||||
print(window.geometry().height())
|
||||
# 计算窗口坐标
|
||||
window.move(int(width / 2 - window.geometry().width() / 2),
|
||||
int(height / 2.8 - window.geometry().height() / 2)
|
||||
)
|
||||
|
||||
def AppInfoShowerRefresh():
|
||||
global appInfoShowerTime
|
||||
appInfoShower.setText(f"<h3 align='center'>星火Windows应用兼容助手</h3><p align='center'>正在为您启动以下应用:{os.getenv('WINE_APP_NAME')} {'.' * (appInfoShowerTime % 3 + 1)}</p>")
|
||||
|
||||
appInfoShowerTime += 1
|
||||
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
# 构建窗口
|
||||
window = QMainWindow()
|
||||
widget = QWidget()
|
||||
layout = QGridLayout()
|
||||
|
||||
appInfoShower = QLabel()
|
||||
appInfoShowerTime = 0
|
||||
AppInfoShowerRefresh()
|
||||
|
||||
# GXDE 彩蛋
|
||||
if os.path.exists("/usr/share/gxde-resources/spark-dwine-helper.png"):
|
||||
backgroundImgPath = "/usr/share/gxde-resources/spark-dwine-helper.png"
|
||||
##########
|
||||
if os.path.exists(f"{programPath}/fallback.png"):
|
||||
backgroundImgPath = f"{programPath}/fallback.png"
|
||||
if os.path.exists(f"/opt/apps/{os.getenv('DEB_PACKAGE_NAME')}/files/banner.png"):
|
||||
backgroundImgPath = f"/opt/apps/{os.getenv('DEB_PACKAGE_NAME')}/files/banner.png"
|
||||
window.setWindowTitle("星火Windows应用兼容助手")
|
||||
layout.addWidget(QLabel(f""), 1, 0)
|
||||
layout.addWidget(appInfoShower, 2, 0)
|
||||
layout.addWidget(QLabel(f"<hr>由 Wine 运行器提供支持"), 4, 0)
|
||||
widget.setLayout(layout)
|
||||
window.setCentralWidget(widget)
|
||||
window.setWindowFlags(Qt.CustomizeWindowHint | Qt.WindowStaysOnTopHint)
|
||||
MoveCenter(window)
|
||||
SetWindowSize(window)
|
||||
window.show()
|
||||
|
||||
|
||||
layout.addWidget(QLabel(f"<p align='center'><img width='{window.geometry().width()}' src='{backgroundImgPath}'></p>"), 0, 0)
|
||||
threading.Thread(target=check_wmclass).start()
|
||||
MoveCenter(window)
|
||||
app.exec_()
|
||||
@@ -1,5 +1,5 @@
|
||||
#/bin/bash
|
||||
source /opt/durapps/transhell/transhell.sh
|
||||
source ${SHELL_DIR}/bashimport/transhell.bashimport
|
||||
load_transhell_debug
|
||||
|
||||
#########>>>>>>>函数段
|
||||
@@ -47,7 +47,7 @@ fi
|
||||
|
||||
|
||||
Get_Dist_Name
|
||||
if [ "$DISTRO" = "Deepin" ] || [ "$DISTRO" = "UniontechOS" ];then
|
||||
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倍缩放
|
||||
@@ -66,7 +66,11 @@ scale_factor=`zenity --list \
|
||||
1.25 \
|
||||
1.5 \
|
||||
1.75 \
|
||||
2.0`
|
||||
2.0 \
|
||||
2.5 \
|
||||
3.0 \
|
||||
3.5 \
|
||||
4.0`
|
||||
|
||||
case "$scale_factor" in
|
||||
"")
|
||||
@@ -4,14 +4,14 @@ help() {
|
||||
cat <<EOF
|
||||
用法:$0 [-h|--help] [-s|--set-scale-factor] path
|
||||
-h|--help 显示这个帮助
|
||||
-s|--set-scale-factor 直接指定缩放。支持1.0,1.25,1.5,1.75,2.0
|
||||
-s|--set-scale-factor 直接指定缩放。支持1.0,1.25,1.5,1.75,2.0,2.5,3.0,3.5,4.0
|
||||
path 容器目录
|
||||
|
||||
本脚本具有超级兔力。
|
||||
--------------------------------------------------------------------
|
||||
Usage: $0 [-h|--help] [-s|--set-scale-factor] path
|
||||
-h|--help Show this text
|
||||
-s|--set-scale-factor Set scale factor direcly. Support 1.0,1.25,1.5,1.75,2.0
|
||||
-s|--set-scale-factor Set scale factor direcly. Support 1.0,1.25,1.5,1.75,2.0,2.5,3.0,3.5,4.0
|
||||
path Wine Container directory path
|
||||
|
||||
This script have super bunny power.
|
||||
@@ -32,7 +32,7 @@ parse_args() {
|
||||
;;
|
||||
|
||||
"bunny")
|
||||
cat /opt/durapps/spark-dwine-helper/scale-set-helper/bunny.txt
|
||||
cat ${SHELL_DIR}/spark-dwine-helper/scale-set-helper/bunny.txt
|
||||
exit
|
||||
|
||||
;;
|
||||
@@ -68,7 +68,7 @@ if [ ! -f "$CONTAINER_PATH/scale.txt" ];then
|
||||
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设置"
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh "$CONTAINER_PATH"
|
||||
${SHELL_DIR}/spark-dwine-helper/scale-set-helper/get-scale.sh "$CONTAINER_PATH"
|
||||
wine_scale=`cat $CONTAINER_PATH/scale.txt`
|
||||
echo "检测到的缩放倍数为:$wine_scale"
|
||||
echo "Scale is $wine_scale"
|
||||
@@ -96,7 +96,7 @@ echo "使用了--set-scale-factor,直接指定"
|
||||
echo "--set-scale-factor detected. Arrange directly"
|
||||
|
||||
|
||||
if [ "$appointed_scale_factor" != "1.0" ] && [ "$appointed_scale_factor" != "1.25" ] && [ "$appointed_scale_factor" != "1.5" ] && [ "$appointed_scale_factor" != "1.75" ] && [ "$appointed_scale_factor" != "2.0" ] ;then
|
||||
if [ "$appointed_scale_factor" != "1.0" ] && [ "$appointed_scale_factor" != "1.25" ] && [ "$appointed_scale_factor" != "1.5" ] && [ "$appointed_scale_factor" != "1.75" ] && [ "$appointed_scale_factor" != "2.0" ] && [ "$appointed_scale_factor" != "2.5" ] && [ "$appointed_scale_factor" != "3.0" ] && [ "$appointed_scale_factor" != "3.5" ] && [ "$appointed_scale_factor" != "4.0" ];then
|
||||
echo "无法识别的倍数:$appointed_scale_factor,请参看$0 -h"
|
||||
echo "Unrecognizable number. Use $0 -h to get help"
|
||||
exit 1
|
||||
@@ -128,6 +128,18 @@ case "$wine_scale" in
|
||||
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
|
||||
@@ -172,6 +184,18 @@ case "$wine_scale" in
|
||||
2.0*)
|
||||
dpi="192"
|
||||
;;
|
||||
2.5*)
|
||||
dpi="240"
|
||||
;;
|
||||
3.0*)
|
||||
dpi="288"
|
||||
;;
|
||||
3.5*)
|
||||
dpi="336"
|
||||
;;
|
||||
4.0*)
|
||||
dpi="384"
|
||||
;;
|
||||
*)
|
||||
dpi="96"
|
||||
#可能不是Xorg或者是其他错误
|
||||
@@ -0,0 +1,205 @@
|
||||
#!/bin/bash
|
||||
|
||||
SHELL_DIR=$(dirname $(realpath $0))
|
||||
|
||||
apps_list=()
|
||||
get_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
|
||||
zenity --error --text="请至少在应用商店安装一个wine应用后启动" --width 200
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for app_dir in "${app_dirs[@]}"; do
|
||||
local package_name=$(basename "$app_dir")
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local bottle_name="无法读取"
|
||||
local version="无法读取"
|
||||
local use_spark="否"
|
||||
|
||||
if [ -f "$run_script" ]; then
|
||||
bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||
version=$(grep -oP 'APPVER="\K[^"]+' "$run_script")
|
||||
|
||||
if [ -z "$version" ]; then
|
||||
version="无法读取"
|
||||
fi
|
||||
# START_SHELL_PATH=XXX/spark_run_v4.sh
|
||||
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")
|
||||
done
|
||||
|
||||
|
||||
}
|
||||
|
||||
# 函数:获取应用名称
|
||||
get_app_name() {
|
||||
local app_name_orig=$(grep -m 1 '^Name=' "/usr/share/applications/$1.desktop" | cut -d '=' -f 2)
|
||||
local app_name_i18n=$(grep -m 1 "^Name\[$LANGUAGE\]\=" "/usr/share/applications/$1.desktop" | cut -d '=' -f 2)
|
||||
local app_name=""
|
||||
|
||||
if [ -z "$app_name_i18n" ]; then
|
||||
app_name="$app_name_orig"
|
||||
else
|
||||
app_name="$app_name_i18n"
|
||||
fi
|
||||
|
||||
echo "$app_name"
|
||||
}
|
||||
|
||||
# 函数:选择应用
|
||||
select_app() {
|
||||
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 grep spark_run_v4.sh "$run_script" >/dev/null 2>&1 ; then
|
||||
use_spark="是"
|
||||
fi
|
||||
if [ "$use_spark" == "是" ]; then
|
||||
select_spark_action "$app" "$(get_app_name $app)"
|
||||
else
|
||||
select_non_spark_action "$app" "$(get_app_name $app)"
|
||||
fi
|
||||
fi
|
||||
### 还原分隔符
|
||||
IFS="$IFS_OLD"
|
||||
}
|
||||
|
||||
select_non_spark_action(){
|
||||
local app="$1"
|
||||
local app_name="$2"
|
||||
local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "更多操作")
|
||||
local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}")
|
||||
case "$choice" in
|
||||
"在终端中打开")
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
x-terminal-emulator -e "$run_script"
|
||||
;;
|
||||
"打开容器目录")
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||
xdg-open file:///home/$(whoami)/.deepinwine/${bottle_name}
|
||||
;;
|
||||
"清理并重置容器目录")
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||
$SHELL_DIR/../kill.sh ${bottle_name}
|
||||
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
|
||||
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
||||
;;
|
||||
"更多操作")
|
||||
if [ -e /usr/bin/deepin-wine-runner ];then
|
||||
/usr/bin/deepin-wine-runner
|
||||
elif [ $(command -v spark-store) ];then
|
||||
spark-store spk://store/tools/spark-deepin-wine-runner
|
||||
elif [ $(command -v deepin-home-appstore-client) ];then
|
||||
xdg-open appstore://deepin-home-appstore-client?app_detail_info/spark-deepin-wine-runner
|
||||
else
|
||||
xdg-open https://gitee.com/gfdgd-xi/deep-wine-runner/releases
|
||||
fi
|
||||
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
# 函数:选择星火wine助手操作
|
||||
select_spark_action() {
|
||||
local app="$1"
|
||||
local app_name="$2"
|
||||
local options=("在终端中打开" "打开容器目录" "清理并重置容器目录" "修改应用缩放" "修改全局缩放" "更多操作")
|
||||
local choice=$(zenity --width=800 --height=600 --list --title="选择操作" --text="选择要对$app_name执行的操作" --column="操作" "${options[@]}")
|
||||
|
||||
case "$choice" in
|
||||
"在终端中打开")
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
x-terminal-emulator -e "$run_script"
|
||||
;;
|
||||
"打开容器目录")
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||
xdg-open file:///home/$(whoami)/.deepinwine/${bottle_name}
|
||||
;;
|
||||
"清理并重置容器目录")
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||
$SHELL_DIR/../spark_kill.sh ${bottle_name}
|
||||
rm -rf /home/$(whoami)/.deepinwine/${bottle_name}/*
|
||||
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
||||
;;
|
||||
"修改应用缩放")
|
||||
select_scale_action "应用" "$app"
|
||||
;;
|
||||
"修改全局缩放")
|
||||
select_scale_action "全局" "$app"
|
||||
;;
|
||||
"更多操作")
|
||||
if [ -e /usr/bin/deepin-wine-runner ];then
|
||||
/usr/bin/deepin-wine-runner
|
||||
elif [ $(command -v spark-store) ];then
|
||||
spark-store spk://store/tools/spark-deepin-wine-runner
|
||||
elif [ $(command -v deepin-home-appstore-client) ];then
|
||||
xdg-open appstore://deepin-home-appstore-client?app_detail_info/spark-deepin-wine-runner
|
||||
else
|
||||
xdg-open https://gitee.com/gfdgd-xi/deep-wine-runner/releases
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# 函数:选择缩放操作
|
||||
select_scale_action() {
|
||||
local scale_type="$1"
|
||||
local app="$2"
|
||||
local app_dir="/opt/apps/$app"
|
||||
local run_script="$app_dir/files/run.sh"
|
||||
local bottle_name=$(grep -oP 'BOTTLENAME="\K[^"]+' "$run_script")
|
||||
local scale_factors=("1.0" "1.25" "1.5" "1.75" "2.0" "2.5" "3.0" "3.5" "4.0" "恢复默认")
|
||||
local choice=$(zenity --width=800 --height=600 --list --title="选择缩放比例" --text="选择要设置的缩放比例" --column="比例" "${scale_factors[@]}")
|
||||
|
||||
if [ -n "$choice" ]; then
|
||||
local scale_factor="$choice"
|
||||
|
||||
if [ "$scale_type" == "应用" ]; then
|
||||
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"
|
||||
fi
|
||||
elif [ "$scale_type" == "全局" ]; then
|
||||
if [ "$scale_factor" == "恢复默认" ];then
|
||||
rm $HOME/.config/spark-wine/scale.txt
|
||||
else
|
||||
echo "$scale_factor" > "$HOME/.config/spark-wine/scale.txt"
|
||||
find "$HOME/.deepinwine/" -name "scale.txt" -type f -print -exec rm -rf {} \;
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
zenity --info --width=300 --text="操作已完成,请重启Wine应用查看"
|
||||
}
|
||||
|
||||
select_app
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
##### 若有pybanner则尝试启动
|
||||
#if [ -e ${SHELL_DIR}/spark-dwine-helper/pybanner/pybanner.py ];then
|
||||
#echo "Protocol upgrade: Trying to activate python banner..."
|
||||
#python3 ${SHELL_DIR}/spark-dwine-helper/pybanner/pybanner.py
|
||||
#if [ "$?" = "0" ];then
|
||||
#exit
|
||||
#else
|
||||
#echo "Failed to activate. Fallback to normal zenity."
|
||||
#fi
|
||||
#fi
|
||||
|
||||
|
||||
if [ ! -z "$WAYLAND_DISPLAY" ]; then
|
||||
echo "Wayland detected. Do not check wmclass"
|
||||
zenity --progress --title="星火Windows应用兼容助手" --text="正在为您启动以下应用:$WINE_APP_NAME" --pulsate --width=400 --auto-close --no-cancel --timeout=3
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$(which wmctrl)" ]; then
|
||||
echo "No wmctrl installed. Do not check wmclass"
|
||||
zenity --progress --title="星火Windows应用兼容助手" --text="正在为您启动以下应用:$WINE_APP_NAME" --pulsate --width=400 --auto-close --no-cancel --timeout=3
|
||||
exit
|
||||
fi
|
||||
|
||||
target_wmclass="$WINE_WMCLASS"
|
||||
|
||||
|
||||
function check_window() {
|
||||
# 使用 wmctrl 命令列出所有窗口,并使用 grep 过滤出特定的 WMCLASS
|
||||
windows=$(wmctrl -lx | grep "$target_wmclass")
|
||||
|
||||
# 如果窗口存在,则关闭提示
|
||||
if [ -n "$windows" ]; then
|
||||
# 提取窗口ID
|
||||
window_id=$(echo "$windows" | awk '{print $1}')
|
||||
|
||||
echo "Window with WMCLASS '$target_wmclass' found"
|
||||
exit
|
||||
else
|
||||
echo "Window with WMCLASS '$target_wmclass' not found."
|
||||
fi
|
||||
}
|
||||
|
||||
function check_wmclass(){
|
||||
# 递归检测窗口是否存在的函数
|
||||
|
||||
# 每隔一段时间检测一次窗口是否存在
|
||||
while true; do
|
||||
check_window
|
||||
# 等待一段时间后再次检测
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
check_wmclass | zenity --progress --title="星火Windows应用兼容助手" --text="正在为您启动以下应用:$WINE_APP_NAME" --pulsate --width=400 --auto-close --no-cancel --timeout=3
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,19 @@
|
||||
#/bin/bash
|
||||
|
||||
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"
|
||||
|
||||
init_runtime
|
||||
init_32bit_config
|
||||
echo "use deepinwine runtime"
|
||||
"$WINELDPATH" ./gl-wine32
|
||||
exit $?
|
||||
fi
|
||||
|
||||
./gl-wine32
|
||||
exit $?
|
||||
@@ -2,11 +2,6 @@
|
||||
#####因为arm版本的deepin-wine-helper不带这个,又不想破坏x86兼容性,故改名
|
||||
APP_NAME="QQ"
|
||||
LOG_FILE=$0
|
||||
SHELL_DIR=${0%/*}
|
||||
if [ $SPECIFY_SHELL_DIR ]; then
|
||||
SHELL_DIR=$SPECIFY_SHELL_DIR
|
||||
fi
|
||||
|
||||
PUBLIC_DIR="/var/public"
|
||||
|
||||
UsePublicDir()
|
||||
@@ -9,11 +9,28 @@
|
||||
# Modifier: shenmo <shenmo@spark-app.store>
|
||||
#
|
||||
#
|
||||
SHELL_DIR=$(dirname $(realpath $0))
|
||||
|
||||
source /opt/durapps/transhell/transhell.sh
|
||||
export SHELL_DIR
|
||||
source ${SHELL_DIR}/bashimport/log-function.bashimport
|
||||
source ${SHELL_DIR}/bashimport/transhell.bashimport
|
||||
load_transhell_debug
|
||||
source $(dirname $0)/log-function.bashimport
|
||||
|
||||
#########Preload functions
|
||||
function get_app_name() {
|
||||
local app_name_orig=$(grep -m 1 '^Name=' "/usr/share/applications/$1.desktop" | cut -d '=' -f 2)
|
||||
local app_name_i18n=$(grep -m 1 "^Name\[$LANGUAGE\]\=" "/usr/share/applications/$1.desktop" | cut -d '=' -f 2)
|
||||
local app_name=""
|
||||
|
||||
if [ -z "$app_name_i18n" ]; then
|
||||
app_name="$app_name_orig"
|
||||
else
|
||||
app_name="$app_name_i18n"
|
||||
fi
|
||||
|
||||
echo "$app_name"
|
||||
}
|
||||
######### Vars
|
||||
BOTTLENAME="$1"
|
||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
||||
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
||||
@@ -21,9 +38,19 @@ APPVER=""
|
||||
APPTAR="files.7z"
|
||||
BOTTLENAME=""
|
||||
WINE_CMD="deepin-wine"
|
||||
#这里会被后续覆盖,似乎没啥用
|
||||
#这里会被后续覆盖
|
||||
LOG_FILE=$0
|
||||
PUBLIC_DIR="/var/public"
|
||||
if [ -z $WINE_WMCLASS ];then
|
||||
export WINE_WMCLASS="$DEB_PACKAGE_NAME"
|
||||
fi
|
||||
export WINE_APP_NAME=$(get_app_name ${DEB_PACKAGE_NAME})
|
||||
if [ -z "$WINE_APP_NAME" ];then
|
||||
export WINE_APP_NAME=$BOTTLENAME
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -e /opt/p7zip-legacy/bin/7z ];then
|
||||
log.debug "Using p7zip-legacy as unpacker"
|
||||
@@ -32,42 +59,28 @@ else
|
||||
UNPACK_CMD=7z
|
||||
log.debug "Using system 7z as unpacker"
|
||||
fi
|
||||
SHELL_DIR=$(dirname $0)
|
||||
SHELL_DIR=$(realpath "$SHELL_DIR")
|
||||
if [ $SPECIFY_SHELL_DIR ]; then
|
||||
SHELL_DIR=$SPECIFY_SHELL_DIR
|
||||
fi
|
||||
|
||||
|
||||
if [ $APPRUN_CMD ]; then
|
||||
WINE_CMD=$APPRUN_CMD
|
||||
fi
|
||||
|
||||
#####################
|
||||
|
||||
if [ "$WINE_CMD" = "deepin-wine8-stable" ] && [ "$(arch)" != "x86_64" ];then
|
||||
|
||||
WINE_CMD="/opt/durapps/spark-dwine-helper/deepin-wine8-stable-wrapper/deepin-wine8-stable"
|
||||
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
|
||||
|
||||
#####################
|
||||
|
||||
if [ $SPECIFY_SHELL_DIR ]; then
|
||||
SHELL_DIR=$SPECIFY_SHELL_DIR
|
||||
fi
|
||||
|
||||
# Check if some visual feedback is possible
|
||||
if command -v zenity >/dev/null 2>&1; then
|
||||
##################### Functions
|
||||
progressbar()
|
||||
{
|
||||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close --no-cancel ||
|
||||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
|
||||
}
|
||||
|
||||
else
|
||||
progressbar()
|
||||
{
|
||||
cat -
|
||||
}
|
||||
fi
|
||||
|
||||
_DeleteRegistry()
|
||||
{
|
||||
@@ -132,8 +145,14 @@ FixLink()
|
||||
{
|
||||
if [ -d ${WINEPREFIX} ]; then
|
||||
CUR_DIR=$PWD
|
||||
cd "${WINEPREFIX}/dosdevices"
|
||||
# Link to Document
|
||||
cd "${WINEPREFIX}/dosdevices"
|
||||
check_link ../drive_c c:
|
||||
check_link / z:
|
||||
check_link $HOME y:
|
||||
cd "../drive_c/users/$USER"
|
||||
check_link "$HOME/Desktop" Desktop
|
||||
check_link "$HOME/Downloads" Downloads
|
||||
# Link to Document
|
||||
if [ -L "$WINEPREFIX/drive_c/users/$(whoami)/My Documents" ]; then
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\My Documents" /f
|
||||
|
||||
@@ -141,10 +160,6 @@ else
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\Documents" /f
|
||||
|
||||
fi
|
||||
rm c: z: y:
|
||||
ln -s -f ../drive_c c:
|
||||
ln -s -f / z:
|
||||
ln -s -f $HOME y:
|
||||
cd $CUR_DIR
|
||||
#ls -l "${WINEPREFIX}/dosdevices"
|
||||
fi
|
||||
@@ -164,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
|
||||
@@ -176,6 +195,29 @@ is_autostart()
|
||||
return 1
|
||||
}
|
||||
#########自动启动相关,等用到了再研究
|
||||
|
||||
Test_GL_wine()
|
||||
{
|
||||
gl_wine_path="${SHELL_DIR}/spark_gl-wine"
|
||||
|
||||
#如果不支持32的GLX,d3d改为gdi的实现
|
||||
if [[ ! -f "${WINEPREFIX}/.init_d3d" ]];then
|
||||
if [[ $WINE_CMD == *"deepin-wine8-stable"* ]];then
|
||||
gl_wine="${gl_wine_path}/gl-wine64"
|
||||
else
|
||||
gl_wine="${gl_wine_path}/run_gl.sh"
|
||||
fi
|
||||
|
||||
run_gl=`${gl_wine} 2>&1`
|
||||
|
||||
#如果opengl测试程序运行失败,所有进程的渲染方式改为gdi渲染模式
|
||||
if [ $? != 0 ];then
|
||||
WINEPREFIX="$WINEPREFIX" $WINE_CMD regedit /S "${gl_wine_path}/gdid3d.reg"
|
||||
fi
|
||||
|
||||
touch "${WINEPREFIX}/.init_d3d"
|
||||
fi
|
||||
}
|
||||
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||
#######url转义
|
||||
|
||||
@@ -194,7 +236,11 @@ CallProcess()
|
||||
if [[ $autostart -ne 0 ]] && [[ "$1" != *"pluginloader.exe" ]];then
|
||||
$SHELL_DIR/spark_kill.sh "$BOTTLENAME" block
|
||||
fi
|
||||
|
||||
#run gl-wine for test opengl
|
||||
get_arch=`uname -m`
|
||||
if [[ $get_arch = "x86_64" ]];then
|
||||
Test_GL_wine
|
||||
fi
|
||||
#change current dir to excute path
|
||||
path=$(dirname "$path")
|
||||
cd "$path"
|
||||
@@ -205,16 +251,17 @@ CallProcess()
|
||||
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
|
||||
fi
|
||||
# Disable winemenubuilder
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /f
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /f
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
debug_log_to_file "Starting process $* ..."
|
||||
debug_log "Starting process $* ..."
|
||||
|
||||
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX"
|
||||
${SHELL_DIR}/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX"
|
||||
$SHELL_DIR/spark-wine-banner &
|
||||
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@"
|
||||
|
||||
#start autobottle
|
||||
@@ -256,9 +303,11 @@ CallApp()
|
||||
source "/opt/apps/${DEB_PACKAGE_NAME}/files/pre_run.sh"
|
||||
CallPreRun "$@"
|
||||
fi
|
||||
|
||||
if [ -e "/opt/deepinwine/tools/spark_run_v4_app_configs/${BOTTLENAME}.sh" ];then
|
||||
APP_CONFIG_PATH="/opt/deepinwine/tools/spark_run_v4_app_configs/${BOTTLENAME}.sh"
|
||||
|
||||
else
|
||||
APP_CONFIG_PATH="${SHELL_DIR}/spark_run_v4_app_configs/${BOTTLENAME}.sh"
|
||||
fi
|
||||
if [ -f "$APP_CONFIG_PATH" ]; then
|
||||
echo "执行 ${BOTTLENAME}.sh ..."
|
||||
source $APP_CONFIG_PATH
|
||||
@@ -271,6 +320,8 @@ fi
|
||||
}
|
||||
ExtractApp()
|
||||
{
|
||||
|
||||
|
||||
local tmp_log=$(mktemp)
|
||||
mkdir -p "$1"
|
||||
(${UNPACK_CMD} x "$APPDIR/$APPTAR" -o"$1" -bsp1 -bb1 -bse2 | grep --line-buffered -oP "(\d+(\.\d+)?(?=%))" > $tmp_log)&
|
||||
@@ -279,7 +330,7 @@ local tmp_log=$(mktemp)
|
||||
(while kill -0 $cmd_pid 2> /dev/null; do
|
||||
tail -n 1 "${tmp_log}"
|
||||
sleep 1
|
||||
done)| zenity --progress --title="${TRANSHELL_CONTENT_SPARK_WINDOWS_COMPATIBILITY_TOOL}" --text="${TRANSHELL_CONTENT_UNPACKING} $BOTTLENAME..." --width=600 --auto-close --no-cancel
|
||||
done)| zenity --progress --title="${TRANSHELL_CONTENT_SPARK_WINDOWS_COMPATIBILITY_TOOL}" --text="${TRANSHELL_CONTENT_UNPACKING} $WINE_APP_NAME..." --width=600 --auto-close --no-cancel
|
||||
rm $tmp_log
|
||||
|
||||
|
||||
@@ -311,12 +362,13 @@ ResetApp()
|
||||
}
|
||||
UpdateApp()
|
||||
{
|
||||
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
|
||||
return
|
||||
fi
|
||||
if [ -d "${WINEPREFIX}.tmpdir" ]; then
|
||||
rm -rf "${WINEPREFIX}.tmpdir"
|
||||
fi
|
||||
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -f "/opt/apps/${DEB_PACKAGE_NAME}/files/pre_update.sh" ];then
|
||||
source "/opt/apps/${DEB_PACKAGE_NAME}/files/pre_update.sh"
|
||||
CallPreUpdate
|
||||
@@ -341,14 +393,19 @@ UpdateApp()
|
||||
}
|
||||
RunApp()
|
||||
{
|
||||
|
||||
|
||||
progpid=$(ps -ef | grep "zenity --progress --title=${BOTTLENAME}" | grep -v grep)
|
||||
debug_log "run ${BOTTLENAME} progress pid $progpid"
|
||||
if [ -n "$progpid" ]; then
|
||||
debug_log "$BOTTLENAME is running"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -d "$WINEPREFIX" ]; then
|
||||
UpdateApp
|
||||
if [ ! -f "$WINEPREFIX/PACKAGE_VERSION" ] || [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" != "$APPVER" ]; then
|
||||
UpdateApp
|
||||
fi
|
||||
else
|
||||
DeployApp
|
||||
fi
|
||||
@@ -359,7 +416,9 @@ RunApp()
|
||||
CreateBottle()
|
||||
{
|
||||
if [ -d "$WINEPREFIX" ]; then
|
||||
UpdateApp
|
||||
if [ ! -f "$WINEPREFIX/PACKAGE_VERSION" ] || [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" != "$APPVER" ]; then
|
||||
UpdateApp
|
||||
fi
|
||||
else
|
||||
DeployApp
|
||||
fi
|
||||
@@ -380,7 +439,7 @@ ParseArgs()
|
||||
fi
|
||||
}
|
||||
|
||||
init_log_file
|
||||
#init_log_file
|
||||
|
||||
|
||||
|
||||
@@ -392,9 +451,6 @@ if [ $# -lt 3 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BOTTLENAME="$1"
|
||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
||||
|
||||
|
||||
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
||||
if [ -f "$APPDIR/files.md5sum" ];then
|
||||
@@ -405,6 +461,7 @@ fi
|
||||
|
||||
debug_log "Run $*"
|
||||
|
||||
|
||||
#执行lnk文件通过判断第5个参数是否是“/Unix”来判断
|
||||
if [ "$4" == "/Unix" ];then
|
||||
RunApp "$3" "$4" "$5"
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_UNPACKING="正在为您准备以下应用:"
|
||||
TRANSHELL_CONTENT_SPARK_WINDOWS_COMPATIBILITY_TOOL="星火Windows应用兼容助手"
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
[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
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
@@ -1,109 +0,0 @@
|
||||
#/bin/bash
|
||||
|
||||
source /opt/durapps/transhell/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_GLOBAL_SCALE}" \
|
||||
"${TRANSHELL_CONTENT_SET_APP_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}")
|
||||
########
|
||||
zenity --info --text="${TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST}" --width=500 --height=150
|
||||
|
||||
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_SCALE}")
|
||||
zenity --info --text="${TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY}" --width=500 --height=150
|
||||
CONTAINER_PATH=`zenity --file-selection --filename="$HOME/.deepinwine/" --directory`
|
||||
|
||||
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
|
||||
zenity --info --text="${TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE}" --width=500 --height=150
|
||||
|
||||
else
|
||||
|
||||
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 \
|
||||
${TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL} `
|
||||
|
||||
case "$scale_factor" in
|
||||
"")
|
||||
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}。" --width=500 --height=150
|
||||
scale_factor="1.0"
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s $scale_factor $CONTAINER_PATH
|
||||
;;
|
||||
"${TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL}")
|
||||
zenity --info --text="${TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL}" --width=500 --height=150
|
||||
rm $CONTAINER_PATH/scale.txt
|
||||
;;
|
||||
*)
|
||||
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}" --width=500 --height=150
|
||||
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s $scale_factor $CONTAINER_PATH
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
fi
|
||||
;;
|
||||
"${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_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}")
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
IS_CLOSE="1"
|
||||
;;
|
||||
|
||||
|
||||
esac
|
||||
done
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/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_SET_APP_SCALE="Set app scale"
|
||||
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_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST="Note:This option is invalid in deepin/UOS,for the script will read deepin/UOS scale settings first"
|
||||
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_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"
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/bin/bash
|
||||
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="欢迎使用星火wine助手控制中心,请在以下选项中选择一个执行!"
|
||||
TRANSHELL_CONTENT_OPTION="选项"
|
||||
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="设置全局缩放"
|
||||
TRANSHELL_CONTENT_SET_APP_SCALE="设置单独应用缩放"
|
||||
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="一键将所有已安装应用的缩放设置改为与全局缩放一致"
|
||||
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="备注:以上操作仅对使用了spark-dwine-helper的应用生效"
|
||||
TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST="请注意:此选项对deepin/UOS无效,会优先读取deepin/UOS的缩放设置进行缩放"
|
||||
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_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="以下容器中的应用的缩放设置已与全局设置同步"
|
||||
@@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=bash -c "/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"
|
||||
Icon=spark-dwine-helper-settings
|
||||
MimeType=
|
||||
Name=Spark Wine Helper Settings
|
||||
Name[zh_CN]=星火wine助手设置
|
||||
StartupWMClass=spark-dwine-helper-settings
|
||||
Terminal=False
|
||||
Type=Application
|
||||
NoDisplay=false
|
||||
X-Deepin-Vendor=user-custom
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB |
@@ -1,13 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Categories=Utility;
|
||||
Encoding=UTF-8
|
||||
Exec=sh -c "/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"
|
||||
Icon=store.spark-app.spark-dwine-helper
|
||||
MimeType=
|
||||
Name=Spark Wine Helper Settings
|
||||
Name[zh_CN]=星火wine助手设置
|
||||
StartupWMClass=spark-dwine-helper-settings
|
||||
Terminal=False
|
||||
Type=Application
|
||||
NoDisplay=true
|
||||
X-Deepin-Vendor=user-custom
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 47 KiB |
@@ -40,8 +40,8 @@ echo "W: 没有指定容器,跳过清理容器。请手动前往 ~/.deepinwine
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -e /opt/deepinwine/tools/spark_kill.sh ];then
|
||||
/opt/deepinwine/tools/spark_kill.sh $BOTTLE_NAME
|
||||
if [ -e /opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_kill.sh ];then
|
||||
/opt/apps/store.spark-app.spark-dwine-helper/files/deepinwine/tools/spark_kill.sh $BOTTLE_NAME
|
||||
###这里注意,如果没写BOTTLE_NAME,会把QQ杀了
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
function Remove_Bottle_Before_Update(){
|
||||
chmod -R +w $HOME/.deepinwine/$BOTTLENAME
|
||||
rm -rf $HOME/.deepinwine/$BOTTLENAME
|
||||
chmod -R +w $HOME/.deepinwine/容器名
|
||||
rm -rf $HOME/.deepinwine/容器名
|
||||
}
|
||||
|
||||
|
||||
#########这是个例子,对于那些需要删除容器再更新的软件用的,不是每个都需要
|
||||
|
||||
function CallPreUpdate(){
|
||||
echo "$HOME/.deepinwine/$BOTTLENAME is going to be deleted before Update"
|
||||
echo "$HOME/.deepinwine/容器名 is going to be deleted before Update"
|
||||
|
||||
Remove_Bottle_Before_Update
|
||||
DeployApp
|
||||
|
||||
53
打包用例/run.sh
53
打包用例/run.sh
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (C) 2016 Deepin, Inc.
|
||||
#
|
||||
@@ -16,12 +16,40 @@
|
||||
|
||||
#######################函数段。下文调用的额外功能会在此处声明
|
||||
|
||||
version_gt() { test "$(echo "$@" | tr " " "
|
||||
" | sort -V | head -n 1)" != "$1"; }
|
||||
|
||||
extract_archive()
|
||||
{
|
||||
archive=$1
|
||||
version_file=$2
|
||||
dest_dir=$3
|
||||
if [ -f "$archive" ] && [ -n "$dest_dir" ] && [ "$dest_dir" != "." ];then
|
||||
archive_version=`cat $version_file`
|
||||
if [ -d "$dest_dir" ];then
|
||||
if [ -f "$dest_dir/VERSION" ];then
|
||||
dest_version=`cat $dest_dir/VERSION`
|
||||
if version_gt "$archive_version" "$dest_version";then
|
||||
7z x "$archive" -o/"$dest_dir" -aoa
|
||||
echo "$archive_version" > "$dest_dir/VERSION"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
mkdir -p $dest_dir
|
||||
7z x "$archive" -o/"$dest_dir" -aoa
|
||||
echo "$archive_version" > "$dest_dir/VERSION"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
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
|
||||
@@ -40,7 +68,18 @@ BOTTLENAME="容器名"
|
||||
APPVER="版本号"
|
||||
EXEC_PATH="启动路径"
|
||||
##### 软件在wine中的启动路径
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
|
||||
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"
|
||||
@@ -72,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处修改"
|
||||
@@ -92,6 +131,14 @@ export WINEDLLOVERRIDES="control.exe=d"
|
||||
fi
|
||||
##############>>>>>>>>>屏蔽mono和gecko安装器结束
|
||||
|
||||
##############<<<<<<<<<解压自行封装的 Wine(如果存在的话)
|
||||
if [[ -e "$ARCHIVE_FILE_DIR/wine_archive.7z" ]]; then
|
||||
WINE_BIN_DIR=`dirname $APPRUN_CMD`
|
||||
WINE_DIR=`dirname $WINE_BIN_DIR`
|
||||
extract_archive "$ARCHIVE_FILE_DIR/wine_archive.7z" "$ARCHIVE_FILE_DIR/wine_archive.md5sum" "$WINE_DIR"
|
||||
fi
|
||||
##############>>>>>>>>>
|
||||
|
||||
#########################执行段
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user