mirror of
https://gitee.com/spark-store-project/spark-wine
synced 2026-06-22 06:03:52 +08:00
打包用例加入wine自解压支持
This commit is contained in:
+34
@@ -16,6 +16,32 @@
|
|||||||
|
|
||||||
#######################函数段。下文调用的额外功能会在此处声明
|
#######################函数段。下文调用的额外功能会在此处声明
|
||||||
|
|
||||||
|
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()
|
Get_Dist_Name()
|
||||||
{
|
{
|
||||||
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
||||||
@@ -103,6 +129,14 @@ export WINEDLLOVERRIDES="control.exe=d"
|
|||||||
fi
|
fi
|
||||||
##############>>>>>>>>>屏蔽mono和gecko安装器结束
|
##############>>>>>>>>>屏蔽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