mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2026-06-23 06:33:53 +08:00
支持p7zip-legacy
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
source /opt/durapps/transhell/transhell.sh
|
||||
load_transhell_debug
|
||||
source $(dirname $0)/log-function.bashimport
|
||||
|
||||
BOTTLENAME="$1"
|
||||
WINEPREFIX="$HOME/.deepinwine/$1"
|
||||
@@ -24,6 +25,13 @@ WINE_CMD="deepin-wine"
|
||||
LOG_FILE=$0
|
||||
PUBLIC_DIR="/var/public"
|
||||
|
||||
if [ -e /opt/p7zip-legacy/bin/7z ];then
|
||||
log.debug "Using p7zip-legacy as unpacker"
|
||||
UNPACK_CMD=/opt/p7zip-legacy/bin/7z
|
||||
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
|
||||
@@ -81,7 +89,7 @@ debug_log_to_file()
|
||||
|
||||
debug_log()
|
||||
{
|
||||
echo "${1}"
|
||||
log.debug "${1}"
|
||||
}
|
||||
################log相关功能
|
||||
HelpApp()
|
||||
@@ -257,7 +265,7 @@ ExtractApp()
|
||||
{
|
||||
local tmp_log=$(mktemp)
|
||||
mkdir -p "$1"
|
||||
(7z x "$APPDIR/$APPTAR" -o"$1" -bsp1 -bb1 -bse2 | grep --line-buffered -oP "(\d+(\.\d+)?(?=%))" > $tmp_log)&
|
||||
(${UNPACK_CMD} x "$APPDIR/$APPTAR" -o"$1" -bsp1 -bb1 -bse2 | grep --line-buffered -oP "(\d+(\.\d+)?(?=%))" > $tmp_log)&
|
||||
|
||||
cmd_pid=$!
|
||||
(while kill -0 $cmd_pid 2> /dev/null; do
|
||||
|
||||
Reference in New Issue
Block a user