mirror of
				https://gitee.com/gfdgd-xi/deep-wine-runner
				synced 2025-11-04 15:32:23 +08:00 
			
		
		
		
	支持调用deepin-wine-staging
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Has been cancelled
				
			
		
			
				
	
				Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Has been cancelled
				
			
		
			
				
	
				Building Wine Runner Off-line Pages(arm64) / Explore-GitHub-Actions (push) Has been cancelled
				
			
		
			
				
	
				Building Wine Runner Off-line Pages(amd64) / Explore-GitHub-Actions (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Has been cancelled
				
			Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Has been cancelled
				
			Building Wine Runner Off-line Pages(arm64) / Explore-GitHub-Actions (push) Has been cancelled
				
			Building Wine Runner Off-line Pages(amd64) / Explore-GitHub-Actions (push) Has been cancelled
				
			This commit is contained in:
		
							parent
							
								
									4d30f1c04d
								
							
						
					
					
						commit
						6c0549afe6
					
				
							
								
								
									
										120
									
								
								ShellList/turn-amd64-to-all.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										120
									
								
								ShellList/turn-amd64-to-all.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,120 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# A simple loongarch64 => loong64 .deb converter to help traverse the worlds.
 | 
			
		||||
#
 | 
			
		||||
# Mingcong Bai <jeffbai@aosc.io>, 2024
 | 
			
		||||
 | 
			
		||||
_display_usage() {
 | 
			
		||||
	printf "\
 | 
			
		||||
Usage:
 | 
			
		||||
 | 
			
		||||
	loong64-it [PACKAGE1] [PACKAGE2] ...
 | 
			
		||||
 | 
			
		||||
        - PACKAGE{1..N}: Path to the old-world .deb package to convert.
 | 
			
		||||
 | 
			
		||||
"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Autobuild-like echo functions.
 | 
			
		||||
abwarn() { echo -e "[\e[33mWARN\e[0m]:  \e[1m$*\e[0m"; }
 | 
			
		||||
aberr()  { echo -e "[\e[31mERROR\e[0m]: \e[1m$*\e[0m"; exit 1; }
 | 
			
		||||
abinfo() { echo -e "[\e[96mINFO\e[0m]:  \e[1m$*\e[0m"; }
 | 
			
		||||
abdbg()  { echo -e "[\e[32mDEBUG\e[0m]: \e[1m$*\e[0m"; }
 | 
			
		||||
 | 
			
		||||
_convert_loong64() {
 | 
			
		||||
	PKG_PATH=$(realpath $1)
 | 
			
		||||
 	PKG_NAME=$(dpkg-deb -f "$PKG_PATH" Package)
 | 
			
		||||
  	VERSION=$(dpkg-deb -f "$PKG_PATH" Version)
 | 
			
		||||
  	BASEDIR=$(dirname $PKG_PATH)
 | 
			
		||||
	abinfo "Examining package information: $1 ..."
 | 
			
		||||
	dpkg -I "$PKG_PATH" || \
 | 
			
		||||
		aberr "Invalid dpkg package: control (metadata) archive not found: $?"
 | 
			
		||||
	CONTROL_EXT="$(ar t "$PKG_PATH" | grep control.tar* | cut -f3 -d'.')"
 | 
			
		||||
	case "${CONTROL_EXT}" in
 | 
			
		||||
		gz)
 | 
			
		||||
			TAR_COMP_FLAG="z"
 | 
			
		||||
			;;
 | 
			
		||||
		xz)
 | 
			
		||||
			TAR_COMP_FLAG="J"
 | 
			
		||||
			;;
 | 
			
		||||
		bz2)
 | 
			
		||||
			TAR_COMP_FLAG="j"
 | 
			
		||||
			;;
 | 
			
		||||
		"")
 | 
			
		||||
			TAR_COMP_FLAG=""
 | 
			
		||||
			;;
 | 
			
		||||
		*)
 | 
			
		||||
			aberr "Invalid control archive extension ${CONTROL_EXT}!"
 | 
			
		||||
			;;
 | 
			
		||||
	esac
 | 
			
		||||
 | 
			
		||||
	abinfo "Unpacking: $1 ..."
 | 
			
		||||
	cd $(mktemp -d) || \
 | 
			
		||||
		aberr "Failed to create temporary directory to unpack $1: $?."
 | 
			
		||||
	DEBDIR="$(pwd)"
 | 
			
		||||
	ar xv "$PKG_PATH" || \
 | 
			
		||||
		aberr "Failed to unpack $1: $?."
 | 
			
		||||
 | 
			
		||||
	abinfo "Unpacking metadata archive: $1 ..."
 | 
			
		||||
	mkdir "$DEBDIR"/metadata || \
 | 
			
		||||
		aberr "Failed to create temporary directory for extracting the metdata archive from $1: $?."
 | 
			
		||||
	tar -C "$DEBDIR"/metadata -xvf control.tar."${CONTROL_EXT}" || \
 | 
			
		||||
		aberr "Failed to unpack metadata archive from $1: $?."
 | 
			
		||||
 | 
			
		||||
	abinfo "Converting dpkg Architecture key: $1 ..."
 | 
			
		||||
	#if ! egrep '^Architecture: loongarch64$' "$DEBDIR"/metadata/control; then
 | 
			
		||||
	#	aberr "Failed to detect a \"loongarch64\" architecture signature in control file - this is not a valid old-world LoongArch package!"
 | 
			
		||||
	#fi
 | 
			
		||||
	sed -e 's|^Architecture: amd64$|Architecture: all|g' \
 | 
			
		||||
	    -i "$DEBDIR"/metadata/control
 | 
			
		||||
	
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	abinfo "Building metadata archive (control.tar.${CONTROL_EXT}): $1 ..."
 | 
			
		||||
	cd "$DEBDIR"/metadata
 | 
			
		||||
	tar cvf${TAR_COMP_FLAG} "$DEBDIR"/control.tar."${CONTROL_EXT}" * || \
 | 
			
		||||
		aberr "Failed to build metadata archive (control.tar.${CONTROL_EXT}) for $1: $?."
 | 
			
		||||
	cd "$DEBDIR"
 | 
			
		||||
 | 
			
		||||
	abinfo "Rebuilding dpkg package $1"
 | 
			
		||||
	ar rv "$PKG_PATH" control.tar.${CONTROL_EXT} || \
 | 
			
		||||
		aberr "Failed to rebuild dpkg package $1: $?."
 | 
			
		||||
 | 
			
		||||
        #abinfo "Cleaning up: $1 ..."
 | 
			
		||||
        #rm -r "$DEBDIR"
 | 
			
		||||
mv $1 ${BASEDIR}/${PKG_NAME}_${VERSION}_loong64.deb
 | 
			
		||||
	abinfo """Your requested package:
 | 
			
		||||
 | 
			
		||||
    $1
 | 
			
		||||
    
 | 
			
		||||
Has been successfully converted as a loong64 package and renamed as ${PKG_NAME}_${VERSION}_loong64.deb
 | 
			
		||||
 | 
			
		||||
However, you may still need to install libLoL for old-world applications to
 | 
			
		||||
work properly. Please refer to the libLoL home page:
 | 
			
		||||
 | 
			
		||||
    https://liblol.aosc.io
 | 
			
		||||
 | 
			
		||||
For details on how to install and configure libLoL.
 | 
			
		||||
"""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Display usage info if `-h' or `--help' is specified.
 | 
			
		||||
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
 | 
			
		||||
	_display_usage
 | 
			
		||||
	exit 0
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Display usage info with directions if no option is specified.
 | 
			
		||||
if [ -z "$1" ]; then
 | 
			
		||||
	abwarn "Please specify package(s) to convert.\n"
 | 
			
		||||
	_display_usage
 | 
			
		||||
	exit 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Record working directory.
 | 
			
		||||
SRCDIR="$(pwd)"
 | 
			
		||||
 | 
			
		||||
# Rebuilding all requested packages.
 | 
			
		||||
for i in "$@"; do
 | 
			
		||||
	_convert_loong64 $i
 | 
			
		||||
done
 | 
			
		||||
@ -42,7 +42,7 @@ Recommends: winbind,
 | 
			
		||||
 qemu,
 | 
			
		||||
 alien, 
 | 
			
		||||
 spark-deepin-wine-runner-qemu-system-extra, 
 | 
			
		||||
 deepin-wine8-stable | spark-wine | spark-wine9 | spark-wine9-wow | spark-wine8 | spark-wine8-wow | spark-wine7-devel | deepin-wine6-stable | deepin-wine5-stable | deepin-wine5 | deepin-wine | wine, 
 | 
			
		||||
 deepin-wine-staging | deepin-wine8-stable | spark-wine | spark-wine9 | spark-wine9-wow | spark-wine8 | spark-wine8-wow | spark-wine7-devel | deepin-wine6-stable | deepin-wine5-stable | deepin-wine5 | deepin-wine | wine, 
 | 
			
		||||
 spark-dwine-helper | store.spark-app.spark-dwine-helper | deepin-wine-helper | com.wine-helper.deepin
 | 
			
		||||
Section: utils
 | 
			
		||||
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner-termux, termux-exec
 | 
			
		||||
 | 
			
		||||
@ -698,6 +698,7 @@ logText.setStyleSheet("""
 | 
			
		||||
    color: white;
 | 
			
		||||
""")
 | 
			
		||||
wineChooserList = [
 | 
			
		||||
    "使用 Deepin Wine Staging 打包应用",
 | 
			
		||||
    "使用 Deepin Wine8 Stable 打包应用",
 | 
			
		||||
    "使用 Spark Wine9 wow 打包应用",
 | 
			
		||||
    "使用 Spark Wine9 打包应用",
 | 
			
		||||
@ -710,7 +711,7 @@ wineChooserList = [
 | 
			
		||||
    "使用 Spark Wine 打包应用"
 | 
			
		||||
]
 | 
			
		||||
wineChooserIndex = 2
 | 
			
		||||
wineList = ["deepin-wine8-stable", "spark-wine9-wow", "spark-wine9", "spark-wine8", "spark-wine7-devel", "deepin-wine6-stable", "deepin-wine6-vannila", "spark-wine8-wow", "deepin-wine5-stable", "deepin-wine5", "deepin-wine", "spark-wine"]
 | 
			
		||||
wineList = ["deepin-wine-staging", "deepin-wine8-stable", "spark-wine9-wow", "spark-wine9", "spark-wine8", "spark-wine7-devel", "deepin-wine6-stable", "deepin-wine6-vannila", "spark-wine8-wow", "deepin-wine5-stable", "deepin-wine5", "deepin-wine", "spark-wine"]
 | 
			
		||||
for i in range(len(wineList)):
 | 
			
		||||
    if not os.system(f"which '{wineList[i]}'"):
 | 
			
		||||
        wineChooserIndex = i
 | 
			
		||||
 | 
			
		||||
@ -1332,8 +1332,8 @@ bottleNameLock = False
 | 
			
		||||
###############
 | 
			
		||||
programPath = os.path.split(os.path.realpath(__file__))[0]  # 返回 string
 | 
			
		||||
# 如果要添加其他 wine,请在字典添加其名称和执行路径
 | 
			
		||||
wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine9": "spark-wine9", "spark-wine9-wow": "spark-wine9-wow", "spark-wine": "spark-wine"}
 | 
			
		||||
wineValue = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5-stable": "deepin-wine5 stable", "deepin-wine6-stable": "deepin-wine6 stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine": "spark-wine"}
 | 
			
		||||
wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine9": "spark-wine9", "spark-wine9-wow": "spark-wine9-wow", "spark-wine": "spark-wine", "deepin-wine-staging": "deepin-wine-staging"}
 | 
			
		||||
wineValue = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5-stable": "deepin-wine5 stable", "deepin-wine6-stable": "deepin-wine6 stable", "spark-wine7-devel": "spark-wine7-devel", "ukylin-wine": "ukylin-wine", "okylin-wine": "okylin-wine", "spark-wine8": "spark-wine8", "spark-wine8-wow": "spark-wine8-wow", "deepin-wine6-vannila": "deepin-wine6-vannila", "deepin-wine8-stable": "deepin-wine8-stable", "spark-wine": "spark-wine", "deepin-wine-staging": "deepin-wine-staging"}
 | 
			
		||||
# 读取 wine 本地列表
 | 
			
		||||
try:
 | 
			
		||||
    for i in os.listdir("/opt"):
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
{
 | 
			
		||||
    "Version": "4.1.3",
 | 
			
		||||
    "Version": "4.1.4",
 | 
			
		||||
    "Time": "未知",
 | 
			
		||||
    "Thank": [
 | 
			
		||||
        "感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
 | 
			
		||||
 | 
			
		||||
@ -2219,6 +2219,7 @@ def CheckWine():
 | 
			
		||||
            "基于 UOS box86 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 /opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ",
 | 
			
		||||
            "基于 UOS exagear 的 deepin-wine6-stable": f"WINEPREDLL='{programPath}/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix {get_home()}/.deepinwine/debian-buster --utmp-paths-list {get_home()}/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list {get_home()}/.deepinwine/debian-buster/.exagear/vpaths-list --opaths-list {get_home()}/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ",
 | 
			
		||||
            "使用 Flatpak 安装的 Wine": "flatpak run org.winehq.Wine",
 | 
			
		||||
            "deepin-wine-staging": "deepin-wine-staging",
 | 
			
		||||
            "deepin-wine8-stable": "deepin-wine8-stable",
 | 
			
		||||
            "deepin-wine6 stable": "deepin-wine6-stable", 
 | 
			
		||||
            "deepin-wine6-vannila": "deepin-wine6-vannila",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user