mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2025-12-18 21:11:39 +08:00
跟随上有
This commit is contained in:
Binary file not shown.
BIN
spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_gl-wine/gl-wine32
Executable file
BIN
spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_gl-wine/gl-wine32
Executable file
Binary file not shown.
BIN
spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_gl-wine/gl-wine64
Executable file
BIN
spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_gl-wine/gl-wine64
Executable file
Binary file not shown.
17
spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_gl-wine/run_gl.sh
Executable file
17
spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_gl-wine/run_gl.sh
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#/bin/bash
|
||||||
|
|
||||||
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
runtime_path=/opt/deepinwine/runtime-i386
|
||||||
|
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 $?
|
||||||
@@ -21,10 +21,13 @@ APPVER=""
|
|||||||
APPTAR="files.7z"
|
APPTAR="files.7z"
|
||||||
BOTTLENAME=""
|
BOTTLENAME=""
|
||||||
WINE_CMD="deepin-wine"
|
WINE_CMD="deepin-wine"
|
||||||
#这里会被后续覆盖,似乎没啥用
|
#这里会被后续覆盖
|
||||||
LOG_FILE=$0
|
LOG_FILE=$0
|
||||||
PUBLIC_DIR="/var/public"
|
PUBLIC_DIR="/var/public"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [ -e /opt/p7zip-legacy/bin/7z ];then
|
if [ -e /opt/p7zip-legacy/bin/7z ];then
|
||||||
log.debug "Using p7zip-legacy as unpacker"
|
log.debug "Using p7zip-legacy as unpacker"
|
||||||
UNPACK_CMD=/opt/p7zip-legacy/bin/7z
|
UNPACK_CMD=/opt/p7zip-legacy/bin/7z
|
||||||
@@ -54,20 +57,13 @@ if [ $SPECIFY_SHELL_DIR ]; then
|
|||||||
SHELL_DIR=$SPECIFY_SHELL_DIR
|
SHELL_DIR=$SPECIFY_SHELL_DIR
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if some visual feedback is possible
|
|
||||||
if command -v zenity >/dev/null 2>&1; then
|
|
||||||
progressbar()
|
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 --no-cancel ||
|
||||||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
|
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
|
||||||
progressbar()
|
|
||||||
{
|
|
||||||
cat -
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
_DeleteRegistry()
|
_DeleteRegistry()
|
||||||
{
|
{
|
||||||
@@ -132,8 +128,14 @@ FixLink()
|
|||||||
{
|
{
|
||||||
if [ -d ${WINEPREFIX} ]; then
|
if [ -d ${WINEPREFIX} ]; then
|
||||||
CUR_DIR=$PWD
|
CUR_DIR=$PWD
|
||||||
cd "${WINEPREFIX}/dosdevices"
|
cd "${WINEPREFIX}/dosdevices"
|
||||||
# Link to Document
|
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
|
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
|
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 +143,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
|
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
|
fi
|
||||||
rm c: z: y:
|
|
||||||
ln -s -f ../drive_c c:
|
|
||||||
ln -s -f / z:
|
|
||||||
ln -s -f $HOME y:
|
|
||||||
cd $CUR_DIR
|
cd $CUR_DIR
|
||||||
#ls -l "${WINEPREFIX}/dosdevices"
|
#ls -l "${WINEPREFIX}/dosdevices"
|
||||||
fi
|
fi
|
||||||
@@ -176,6 +174,29 @@ is_autostart()
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
#########自动启动相关,等用到了再研究
|
#########自动启动相关,等用到了再研究
|
||||||
|
|
||||||
|
Test_GL_wine()
|
||||||
|
{
|
||||||
|
gl_wine_path="/opt/deepinwine/tools/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}"; }
|
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
|
||||||
#######url转义
|
#######url转义
|
||||||
|
|
||||||
@@ -194,7 +215,11 @@ CallProcess()
|
|||||||
if [[ $autostart -ne 0 ]] && [[ "$1" != *"pluginloader.exe" ]];then
|
if [[ $autostart -ne 0 ]] && [[ "$1" != *"pluginloader.exe" ]];then
|
||||||
$SHELL_DIR/spark_kill.sh "$BOTTLENAME" block
|
$SHELL_DIR/spark_kill.sh "$BOTTLENAME" block
|
||||||
fi
|
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
|
#change current dir to excute path
|
||||||
path=$(dirname "$path")
|
path=$(dirname "$path")
|
||||||
cd "$path"
|
cd "$path"
|
||||||
@@ -211,7 +236,7 @@ CallProcess()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
debug_log_to_file "Starting process $* ..."
|
debug_log "Starting process $* ..."
|
||||||
|
|
||||||
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
|
############# 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"
|
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX"
|
||||||
@@ -311,12 +336,13 @@ ResetApp()
|
|||||||
}
|
}
|
||||||
UpdateApp()
|
UpdateApp()
|
||||||
{
|
{
|
||||||
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
if [ -d "${WINEPREFIX}.tmpdir" ]; then
|
if [ -d "${WINEPREFIX}.tmpdir" ]; then
|
||||||
rm -rf "${WINEPREFIX}.tmpdir"
|
rm -rf "${WINEPREFIX}.tmpdir"
|
||||||
fi
|
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
|
if [ -f "/opt/apps/${DEB_PACKAGE_NAME}/files/pre_update.sh" ];then
|
||||||
source "/opt/apps/${DEB_PACKAGE_NAME}/files/pre_update.sh"
|
source "/opt/apps/${DEB_PACKAGE_NAME}/files/pre_update.sh"
|
||||||
CallPreUpdate
|
CallPreUpdate
|
||||||
@@ -348,7 +374,9 @@ RunApp()
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ -d "$WINEPREFIX" ]; then
|
if [ -d "$WINEPREFIX" ]; then
|
||||||
UpdateApp
|
if [ ! -f "$WINEPREFIX/PACKAGE_VERSION" ] || [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" != "$APPVER" ]; then
|
||||||
|
UpdateApp
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
DeployApp
|
DeployApp
|
||||||
fi
|
fi
|
||||||
@@ -359,7 +387,9 @@ RunApp()
|
|||||||
CreateBottle()
|
CreateBottle()
|
||||||
{
|
{
|
||||||
if [ -d "$WINEPREFIX" ]; then
|
if [ -d "$WINEPREFIX" ]; then
|
||||||
UpdateApp
|
if [ ! -f "$WINEPREFIX/PACKAGE_VERSION" ] || [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" != "$APPVER" ]; then
|
||||||
|
UpdateApp
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
DeployApp
|
DeployApp
|
||||||
fi
|
fi
|
||||||
@@ -380,7 +410,7 @@ ParseArgs()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
init_log_file
|
#init_log_file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -392,9 +422,6 @@ if [ $# -lt 3 ]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BOTTLENAME="$1"
|
|
||||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
|
||||||
|
|
||||||
|
|
||||||
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
|
||||||
if [ -f "$APPDIR/files.md5sum" ];then
|
if [ -f "$APPDIR/files.md5sum" ];then
|
||||||
@@ -405,6 +432,10 @@ fi
|
|||||||
|
|
||||||
debug_log "Run $*"
|
debug_log "Run $*"
|
||||||
|
|
||||||
|
if [ -z "$WINE_WMCLASS" ]; then
|
||||||
|
export WINE_WMCLASS="$DEB_PACKAGE_NAME"
|
||||||
|
fi
|
||||||
|
|
||||||
#执行lnk文件通过判断第5个参数是否是“/Unix”来判断
|
#执行lnk文件通过判断第5个参数是否是“/Unix”来判断
|
||||||
if [ "$4" == "/Unix" ];then
|
if [ "$4" == "/Unix" ];then
|
||||||
RunApp "$3" "$4" "$5"
|
RunApp "$3" "$4" "$5"
|
||||||
|
|||||||
Reference in New Issue
Block a user