Compare commits

...

17 Commits

Author SHA1 Message Date
a515570ee3 漏改了地方
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
2024-10-16 22:25:53 +08:00
c73e32fa39 调整版本号 2024-10-16 22:10:07 +08:00
ca88d5f62c run.sh适配GXDE OS(https://gitee.com/gfdgd-xi/deep-wine-runner/issues/IAW3W3) 2024-10-16 21:56:08 +08:00
df561d3d03 修复APPRUN_CMD值错误的问题(https://gitee.com/gfdgd-xi/deep-wine-runner/issues/IAXE1T) 2024-10-16 21:52:07 +08:00
744d2aa262 修复bug(https://gitee.com/gfdgd-xi/deep-wine-runner/issues/IASRHG)
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
2024-09-22 11:09:48 +08:00
7fb1f60aae 修复没有dxvk的问题
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
2024-09-17 12:21:42 +08:00
058f025353 少一个
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
2024-09-15 17:01:30 +08:00
d8360c6e59 漏改了个地方 2024-09-15 16:53:12 +08:00
7fa1edb3f8 更新更新内容 2024-09-15 16:51:54 +08:00
82bd073ff8 使用gxde-terminal替代deepin-terminal-gtk
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
2024-08-30 22:46:03 +08:00
ebed98fd25 修改错别字
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
2024-08-16 11:29:16 +08:00
1ec62bbf86 修复不存在TMPDIR/tmp文件夹时无法打开程序的问题
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
2024-08-11 09:26:24 +08:00
f79bac9d6c 修复打包缺uos-info.sh文件的问题
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
2024-08-05 12:59:13 +08:00
6863e58413 修复打包器若干bug;修改wine封装入deb机制以便可以被uos商店正常签名
Some checks are pending
Auto Building Wine Runner(rpm) / Explore-GitHub-Actions (push) Waiting to run
Auto Building Wine Runner(deb) / Explore-GitHub-Actions (push) Waiting to run
Building Wine Runner Off-line Pages(arm64) / Explore-GitHub-Actions (push) Waiting to run
Building Wine Runner Off-line Pages(amd64) / Explore-GitHub-Actions (push) Waiting to run
2024-08-04 22:22:37 +08:00
96319869b6 termux默认也使用标签页页面
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
2024-08-03 18:02:02 +08:00
bc5aca0fd7 优化切换的使用体验 2024-08-03 17:46:56 +08:00
bf18411f7a 支持动态读取添加模组 2024-08-03 17:04:46 +08:00
48 changed files with 605 additions and 165 deletions

0
ConfigLanguareRunner-help.json Normal file → Executable file
View File

0
DefaultSetting.py Normal file → Executable file
View File

0
DisabledOpengl.reg Normal file → Executable file
View File

0
Download.py Normal file → Executable file
View File

0
EnabledOpengl.reg Normal file → Executable file
View File

0
IconList.json Normal file → Executable file
View File

0
InstallDeepinWine6OnUbuntu.sh Normal file → Executable file
View File

0
InstallDeepinWineOnUbuntu.sh Normal file → Executable file
View File

View File

@@ -39,6 +39,7 @@ copy-files:
cp -rv wine/ deb/opt/apps/deepin-wine-runner/
cp -rv Test/ deb/opt/apps/deepin-wine-runner/
cp -rv dxvk/ deb/opt/apps/deepin-wine-runner/
cp -rv packager-config/ deb/opt/apps/deepin-wine-runner/
cp -rv information.json package-script
zip -v -q -r package-script.zip package-script
cp -rv InstallBox86-cn.sh deb/opt/apps/deepin-wine-runner/
@@ -97,7 +98,7 @@ copy-files:
cp -rv InstallVisualCPlusPlus.py deb/opt/apps/deepin-wine-runner
cp -rv launch.sh deb/opt/apps/deepin-wine-runner
cp -rv LICENSE deb/opt/apps/deepin-wine-runner
cp -rv mainwindow.py deb/opt/apps/deepin-wine-runner/deepin-wine-runner
cp -rv mainwindow.py deb/opt/apps/deepin-wine-runner/
cp -rv package-script.zip deb/opt/apps/deepin-wine-runner
cp -rv Run.bat deb/opt/apps/deepin-wine-runner
cp -rv RunVM.sh deb/opt/apps/deepin-wine-runner
@@ -138,6 +139,9 @@ copy-files:
cp -rv globalenv.py deb/opt/apps/deepin-wine-runner
cp -rv local deb/opt/apps/deepin-wine-runner
cp -rv WindowModule.py deb/opt/apps/deepin-wine-runner
cp -rv welcome.py deb/opt/apps/deepin-wine-runner
#cp -rv main.py deb/opt/apps/deepin-wine-runner/deepin-wine-runner
cp -rv mainwindow.py deb/opt/apps/deepin-wine-runner/deepin-wine-runner
mkdir -pv deb/opt/apps/deepin-wine-runner/entries/
cp -rv deb/usr/share/applications deb/opt/apps/deepin-wine-runner/entries/applications
python3 UpdateTime.py
@@ -204,7 +208,7 @@ package-termux-deb:
sudo cp -rv deb-termux/usr/share/applications /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/share/applications
# 加入 termux loader
sudo cp -rv mainwindow-termux-loader.sh /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/deepin-wine-runner
sudo cp -rv mainwindow.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/mainwindow.py
sudo cp -rv main.py /tmp/spark-deepin-wine-runner-builder/data/data/com.termux/files/usr/opt/apps/deepin-wine-runner/mainwindow.py
sudo bash builddeb/ChangeDebVersion.sh
dpkg-deb -Z xz -z 9 -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner-termux.deb
make remove-copy-files -j$(nproc)

View File

@@ -14,14 +14,14 @@ programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
terminal = ""
terminalList = [
"deepin-terminal",
"deepin-terminal-gtk",
"gxde-terminal",
"mate-terminal",
"gnome-terminal",
"xfce4-terminal"
]
terminalEnd = {
f"{programPath}/../launch.sh\" \"deepin-terminal": ["-e", 0],
f"{programPath}/../launch.sh\" \"deepin-terminal-gtk": ["-e", 0],
"gxde-terminal": ["-e", 0],
"mate-terminal": ["-e", 1],
"gnome-terminal": ["--", 0],
"xfce4-terminal": ["-e", 1]
@@ -31,7 +31,7 @@ for i in terminalList:
if i == "deepin-terminal":
i = f"{programPath}/../launch.sh\" \"deepin-terminal"
if i == "deepin-terminal-gtk":
i = f"{programPath}/../launch.sh\" \"deepin-terminal-gtk"
i = f"{programPath}/../launch.sh\" \"gxde-terminal"
terminal = i
break
if terminal == "":
@@ -57,4 +57,4 @@ class TurnDeb():
def ToTarZst(self):
if os.system("debtap"):
raise NameError("无法找到 debtap 命令,请先安装 debtap")
os.system(f"debtap -Q '{self.debPath}'")
os.system(f"debtap -Q '{self.debPath}'")

View File

@@ -157,6 +157,21 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
![image.png](https://storage.deepin.org/thread/202207190822204627_image.png)
## 更新日志
### 4.1.02024/09/15
**※1、修复在 GXDE OS 下无法正常调用 gxde-terminal 的问题**
**※2、修复部分机器无法打开应用的问题**
**※3、修改打包器 wine 集成封装 机制以便可以被 uos 商店正确签名**
**※4、打包器支持内置 spark dwine helper**
**※5、重构虚拟机安装模块以支持更多机器**
**6、修复打包器设置依赖无法生效的问题**
**※7、补充图标**
**※8、修复 deb 安装过程中可能出现 dpkg 卡死的问题**
**※9、优化 Wine 安装器检测机制**
**※10、删除部分废弃组件**
**※11、修复 AOSC、Termux 无法正常打开 Wine 运行器的问题**
12、修改文案
13、修复其它 bug 若干
### 4.0.02024/07/22
**※1、优化运行器窗口大小机制**
**※2、Wine 安装器支持根据机器实际情况自动推荐适合的 Wine**
@@ -830,11 +845,9 @@ make install -j4
## 请作者喝杯茶
如果您觉得 Wine 运行器对你有帮助,可以请作者喝杯茶
<img src="Icon/QR/Wechat.png" width="250" />
<img src="Icon/QR/Alipay.jpg" width="250" />
<img src="Icon/QR/QQ.png" width="250" >
### 广告
支付宝官方活动,扫描获得支付红包!
<p><img src="Icon/QR/advertisement0.jpg" width="250" ></p>
# ©2020-Now gfdgd xi
# ©2020-Now gfdgd xi

0
README_en.md Normal file → Executable file
View File

0
RunCommandWithTerminal.py Normal file → Executable file
View File

View File

@@ -70,7 +70,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo X86 架构,使用 kvm 加速
$qemuMore qemu-system-x86_64 --enable-kvm -cpu host --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -nic model=rtl8139 $qemuUEFI \
-m ${use}G -display gtk -nic model=rtl8139 $qemuUEFI \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
-usb \
@@ -100,7 +100,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
echo 不使用 kvm 加速
$qemuPath --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -nic model=rtl8139 $qemuUEFI \
-m ${use}G -display gtk -nic model=rtl8139 $qemuUEFI \
-device AC97 -device ES1370 -device intel-hda -device hda-duplex \
--boot 'splash=VM/boot.jpg,menu=on,splash-time=2000' \
> $TMPDIR/tmp/windows-virtual-machine-installer-for-wine-runner-run.log 2>&1 # 最新的 qemu 已经移除参数 -soundhw all
@@ -122,7 +122,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
$qemuMore qemu-system-arm --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \
-device nec-usb-xhci,id=xhci,addr=0x1b \
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
@@ -134,7 +134,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
fi
$qemuMore qemu-system-arm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt -device virtio-gpu-pci \
-device nec-usb-xhci,id=xhci,addr=0x1b \
-device usb-tablet,id=tablet,bus=xhci.0,port=1 \
@@ -160,7 +160,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
if [[ $? == 0 ]] && [[ `arch` == "aarch64" ]]; then
$qemuMore qemu-system-aarch64 --enable-kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \
-device virtio-gpu-pci \
-device nec-usb-xhci,id=xhci,addr=0x1b \
@@ -173,7 +173,7 @@ if [[ $? == 0 ]] && [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
fi
$qemuMore qemu-system-aarch64 --hda "$HOME/Qemu/Windows/Windows.qcow2" \
-smp $CpuCount,sockets=$CpuSocketNum,cores=$(($CpuCoreNum / $CpuSocketNum)),threads=$(($CpuCount / $CpuCoreNum / $CpuSocketNum)) \
-m ${use}G -display vnc=:5 -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-m ${use}G -display gtk -usb -nic model=rtl8139 $qemuUEFI \
-cpu max -M virt \
-device virtio-gpu-pci \
-device nec-usb-xhci,id=xhci,addr=0x1b \

0
UpdateTime.py Normal file → Executable file
View File

View File

@@ -119,7 +119,7 @@ class buildvbox:
#vm.MountDisk(self.homePath() + "/Qemu/Windows/Windows.qcow2")
vm.MountMainDisk(self.homePath() + "/Qemu/Windows/Windows.qcow2")
if(os.system("/opt/apps/deepin-wine-runner-qemu-system-extra/files/resources/virtio-win.iso")):
if(os.path.exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/resources/virtio-win.iso")):
vm.MountISO("/opt/apps/deepin-wine-runner-qemu-system-extra/files/resources/virtio-win.iso", "storage_controller_2", 1, 3)
if(not setISOAlready):
vm.MountISO(isoPath, "storage_controller_1", 0, 1)

View File

@@ -148,7 +148,7 @@ def on_install_clicked():
QMessageBox.warning(this, ("提示"), ("VirtualBox 不支持该选项!"))
return
archFile.open(QIODevice.WriteOnly)
archFile.write("aarch64")
#archFile.write("aarch64")
archFile.close()
else:
if(ui.vmChooser.currentIndex() == 0 and QFile.exists(QDir.homePath() + "/.config/deepin-wine-runner/QEMU-EFI")):
@@ -330,4 +330,4 @@ if (subprocess.getoutput("arch") != "x86_64"):
i.setVisible(False)
window.show()
if (__name__ == "__main__"):
sys.exit(app.exec_())
sys.exit(app.exec_())

View File

@@ -24,8 +24,8 @@ class qemu:
self.qemuPath = "qemu-system-i386"
if (os.path.exists("/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh")):
# 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-i386"
self.vboxVersion = subprocess.getoutput(qemuPath + " --version")
self.qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-i386"
self.vboxVersion = subprocess.getoutput(self.qemuPath + " --version")
def Create(self, type = "Windows7"):
if(not os.path.exists(self.name)):
@@ -86,9 +86,9 @@ class qemu:
# 如果存在拓展 Qemu则调用此
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-arm"
if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "aarch64" and not os.system((self.applicationDirPath() + "/kvm-ok"))):
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -cpu max -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
def StartAarch64(self):
bootScreenLogo = ""
@@ -107,9 +107,9 @@ class qemu:
print(self.commandOption)
if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "aarch64" and not os.system((self.applicationDirPath() + "/kvm-ok"))):
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -cpu max -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -cpu max -M virt " + self.commandOption + " -device virtio-gpu-pci -device nec-usb-xhci,id=xhci,addr=0x1b -device usb-tablet,id=tablet,bus=xhci.0,port=1 -device usb-kbd,id=keyboard,bus=xhci.0,port=2 > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
def StartLoong64(self):
return 1
@@ -134,8 +134,8 @@ class qemu:
qemuPath = "/opt/apps/deepin-wine-runner-qemu-system-extra/files/run.sh qemu-system-x86_64"
print(self.commandOption)
if(subprocess.getoutput("arch").replace("\n", "").replace(" ", "") == "x86_64" and not os.system((self.applicationDirPath() + "/kvm-ok"))):
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk --enable-kvm -cpu host " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display vnc=:5 -display gtk -nic model=rtl8139 " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk --enable-kvm -cpu host " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
return os.system((qemuPath + " --boot 'splash=" + self.GetBootLogoPath() + ",order=d,menu=on,splash-time=2000' -display gtk -nic model=rtl8139 " + newCommandOption + " > /tmp/windows-virtual-machine-installer-for-wine-runner-install.log 2>&1 &"))
def Stop(self):
os.system("killall qemu-system-x86_64 -9")
@@ -245,4 +245,4 @@ class qemu:
def GetArch(self) -> str:
return subprocess.getoutput("uname -m").replace("\n", "").replace(" ", "")

290
VM/test-kvm.asm Normal file
View File

@@ -0,0 +1,290 @@
mov ax,0xb800
mov es,ax
; 清屏
mov cx,80*25
clean:
mov di,cx
add di,di
mov byte [es:di],''
add di,1
mov byte [es:di],0x0F
loop clean
; 显示上方白条
; 移除(0,0)的S字符
mov byte [es:0x00],''
mov cx,80*2-1
mov di,0
push cx
headtitle:
mov di,cx
mov byte [es:di],0xF0
; 写入空字符
add di,di
mov byte [es:di],''
;inc cx
;sub cx,1
loop headtitle
xor di,di
pop cx
; 显示下方白条
tailtitle:
mov di,cx
add di,80*2*24
mov byte [es:di],0xF0
; 写入空字符
mov di,cx
add di,di
add di,80*2*24
mov byte [es:di],''
loop tailtitle
; 在第一行写入文本
jmp near showHeadText
headText: db 'Wine Runner Webiste:http://gitee.com/gfdgd-xi/deep-wine-runner'
showHeadText:
; 虽然可以简单粗暴的用 movsw但是会出现问题
mov cx,showHeadText-headText
mov ax,0x7c0
mov ds,ax ; 定位到汇编程序所在的内存地址
showHeadTextLoop:
mov dx,cx
mov di,cx
add di,di
mov si,headText
sub dx,1
add si,dx
; inc si
; mov al,1000
mov al,[ds:si]
mov byte [es:di],al
loop showHeadTextLoop
jmp near showTailText
tailText: db '2020~Now gfdgd xi'
showTailText:
mov cx,showTailText-tailText
mov ax,0x7c0
mov ds,ax
showTailTextLoop:
mov dx,cx
mov di,cx
add di,di
add di,80*2*24
mov si,tailText
sub dx,1
add si,dx
mov al,[ds:si]
mov byte [es:di],al
loop showTailTextLoop
; 显示中部提示文本
jmp near showCenterText
centerTextScreenSize:
; 第一位是行数
; 第二位是单行偏移量
db 1, -1
centerText:
db 'Mode: Real Mode Demo', 0x0A
db 'Bit: 16', 0x0A
db 'Virtual Machine: qemu-system-i386'
db 0x03 ; 结束符
showCenterText:
centerTextLong equ showCenterText-centerText
mov cx,centerTextLong
xor ax,ax
loopShowCenterText:
jmp near addScreenLineFinish
addScreenLine:
; 如果检测到换行符
mov dx, [centerTextScreenSize]
add dx,1
mov [centerTextScreenSize], dx
dec cx
mov al,-1
mov [centerTextScreenSize+1],al
; 行数+1偏移量设为 -1从头开始
;ret
addScreenLineFinish:
; 偏移量 + 1
mov al,[centerTextScreenSize+1]
add al,1
mov [centerTextScreenSize+1],al
mov di,centerText
add di,centerTextLong
sub di,cx
mov bl,[di]
; 判断是不是结束符
cmp bl,0x03
je showCenterTextEnd
; 判断是不是换行符
cmp bl,0x0A
je addScreenLine ; 换行符检测
xor ah,ah ; 清空高位
add al,al
mov di,ax
; 计算显示位置
xor dx,dx
mov dl,[centerTextScreenSize]
mov ax,80
mul dx
mov dx,2
mul dx
add ax,2
add di,ax
; 显示
mov byte [es:di], bl
loop loopShowCenterText
showCenterTextEnd:
;mov ax,[cs:0x100]
;mov dx,[cs:0x102]
; mov bx,16
; div bx
; mov ds,ax
; mov es,ax
;xor di,di
;mov si,1
;xor ds,ds
;mov bx,512
;xor bx,bx
;call read_hard_disk_0
get_data:
mov di,80*2*25-2
; 读取秒
mov al,0x00
call read_time
mov byte [es:di-4],':'
mov byte [es:di-2],ah
mov byte [es:di],al
; 读取分钟
mov al,0x02
call read_time
mov byte [es:di-10],':'
mov byte [es:di-8],ah
mov byte [es:di-6],al
; 读取小时
mov al,0x04
call read_time
mov byte [es:di-14],ah
mov byte [es:di-12],al
; 读取日
mov al,0x07
call read_time
mov byte [es:di-22],'.'
mov byte [es:di-20],ah
mov byte [es:di-18],al
; 读取月
mov al,0x08
call read_time
mov byte [es:di-28],'.'
mov byte [es:di-26],ah
mov byte [es:di-24],al
; 读取年
mov al,0x09
call read_time
mov byte [es:di-32],ah
mov byte [es:di-30],al
hlt ; 使用停机指令降低 CPU 使用率
jmp near get_data
read_time:
out 0x70,al
in al,0x71
call bcd_to_ascii
ret
; 用于编码转换BCD=》ASCII
; 输入AL=bcd码
; 输出AX=ascii
bcd_to_ascii:
mov ah,al
and al,0x0f
add al,0x30
shr ah,4
and ah,0x0f
add ah,0x30
ret
;poweroff:
; 关机
; mov ax,5307H ; 高级电源管理功能,设置电源状态
; mov bx,0001H ; 设备ID1所有设备
; mov cx,0003H ; 状态3表示关机
; int 15h
end:
times 510-($-$$) db 0
db 0x55,0xaa
; 后面部分暂时废弃
read_hard_disk_0: ; 从硬盘读取一个逻辑扇区
; 输入DI:SI=起始逻辑扇区号
; DS:BX=目标缓冲区地址
push ax
push bx
push cx
push dx
mov dx,0x1f2
mov al,1
out dx,al ; 读取的扇区数
inc dx ; 0x1f3
mov ax,si
out dx,al ; LBA地址7~0
inc dx ; 0x1f4
mov al,ah
out dx,al ; LBA地址15~8
inc dx ; 0x1f5
mov ax,di
out dx,al ; LBA地址23~16
inc dx ; 0x1f6
mov al,0xe0 ; LBA28模式主盘
or al,ah ; LBA地址27~24
out dx,al
inc dx ; 0x1f7
mov al,0x20 ; 读命令
out dx,al
.waits:
in al,dx ; 此时 dx 为 0x1f7此时为命令端口也是状态窗口
and al,0x88
cmp al,0x08
jnz .waits
; 内部操作期间,会将 0x1f7 端口第 7 位设置为“1”准备就绪后会将此位清零并将第 3 位设为 1
mov cx,256 ; 总计要读取的/字/数
mov dx,0x1f0
.readw:
in ax,dx
mov [bx],ax
add bx,2
loop .readw
pop dx
pop cx
pop bx
pop ax

6
WindowModule.py Normal file → Executable file
View File

@@ -20,14 +20,10 @@ moduleNameList = {
"Name": "虚拟机管理工具",
"RepeatShow": True
},
"VM.show-vm": {
"Name": "虚拟机连接工具VNC",
"RepeatShow": True
},
"wine.installwine": {
"Name": "Wine 安装工具",
"RepeatShow": True
},
}
}
class RunnerWindow:

View File

@@ -18,7 +18,7 @@ Depends: python3,
python3-requests,
python3-pyqt5 | pyqt5,
python3-psutil | pypsutil,
xfce4-terminal | deepin-terminal-gtk | deepin-terminal | mate-terminal | gnome-terminal,
xfce4-terminal | gxde-terminal | deepin-terminal | mate-terminal | gnome-terminal,
python3-dbus,
python3-pip | pip, p7zip-full | p7zip-legacy | p7zip,
sudo,

View File

@@ -36,9 +36,6 @@ fi
if [ -d /opt/apps/deepin-wine-runner/exa ]; then
rm -rf /opt/apps/deepin-wine-runner/exa
fi
if [ -d /opt/apps/deepin-wine-runner/dxvk ]; then
rm -rf /opt/apps/deepin-wine-runner/dxvk
fi
echo 移除完成
# 如果为非 X86 PC可以删除掉一些无用组件主要是用不了
if [[ `arch` != "x86_64" ]]; then

View File

@@ -204,6 +204,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
@@ -266,7 +268,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处修改"
@@ -750,13 +752,13 @@ try:
exePath.setText(sys.argv[1])
except:
pass
if (__name__ != "__main__"):
'''if (__name__ != "__main__"):
# 设置滚动条
areaScroll = QtWidgets.QScrollArea(window)
areaScroll.setWidgetResizable(True)
areaScroll.setWidget(widget)
areaScroll.setFrameShape(QtWidgets.QFrame.NoFrame)
window.setCentralWidget(areaScroll)
window.setCentralWidget(areaScroll)'''
if (__name__ == "__main__"):
window.resize(int(window.frameGeometry().width() * 1.2), int(window.frameGeometry().height() * 1.1))

View File

@@ -424,7 +424,7 @@ class make_deb_threading(QtCore.QThread):
readtxt(f"{programPath}/packager-config/run-old.sh"),
readtxt(f"{programPath}/packager-config/run.sh")
][chooseWineHelperValue.isChecked()],
"info": readtxt(f"{programPath}/packager-config/uos-info.sh")
"info": readtxt(f"{programPath}/packager-config/uos-info.json")
},
{
# ARM64 通用 wine 打包配置文件
@@ -479,7 +479,7 @@ fi
true
""", readtxt(f"{programPath}/packager-config/postrm")][int(rmBash.isChecked())],
"run.sh": readtxt(f"{programPath}/packager-config/run.sh"),
"info": readtxt(f"{programPath}/packager-config/uos-info.sh")
"info": readtxt(f"{programPath}/packager-config/uos-info.json")
}
]
print("c")
@@ -547,11 +547,10 @@ true
self.label.emit("正在处理 Wine")
if os.path.exists(wine[wineVersion.currentText()]):
shutil.copy(f"{programPath}/gtkGetFileNameDlg", f"{debPackagePath}/opt/apps/{e1_text.text()}/files/gtkGetFileNameDlg")
if wine[wineVersion.currentText()][-3:] == ".7z":
# 都有了为什么要打包呢?
shutil.copy(wine[wineVersion.currentText()], f"{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z")
else:
self.run_command(f"7z a -snh -snl '{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z' '{wine[wineVersion.currentText()]}/*'")
#self.run_command(f"7z a -snh -snl '{debPackagePath}/opt/apps/{e1_text.text()}/files/wine_archive.7z' '{wine[wineVersion.currentText()]}/*'")
# 不打包为 7z 资源包以让 UOS 可以签名到这些文件
self.run_command(f"mkdir -pv '{debPackagePath}/opt/apps/{e1_text.text()}/files/wine'")
self.run_command(f"cp -r '{wine[wineVersion.currentText()]}/'* '{debPackagePath}/opt/apps/{e1_text.text()}/files/wine'")
###############
# 复制文件
###############
@@ -617,25 +616,37 @@ Description: {e3_text.text()}
write_txt(f"{debPackagePath}/DEBIAN/prerm", debInformation[debArch.currentIndex()]["prerm"])
except:
pass
line = "\\"
if iconUiList[0][2].text().replace(" ", "") == "":
command = f"--uri {iconUiList[0][2].text()}"
else:
command = iconUiList[0][2].text()
replaceMap = [
["@@@BOTTLENAME@@@", e5_text.text()],
["@@@APPVER@@@", e2_text.text()],
["@@@EXEC_PATH@@@", e7_text.text()],
["@@@DEB_PACKAGE_NAME@@@", e1_text.text()],
["@@@APPRUN_CMD@@@", wine[wineVersion.currentText()]],
["@@@APPRUN_CMD@@@", [
wine[wineVersion.currentText()],
f"/opt/apps/{e1_text.text()}/files/wine/bin/wine"
][os.path.exists(f'{debPackagePath}/opt/apps/{e1_text.text()}/files/wine/')]],
["@@@EXEC_NAME@@@", os.path.basename(e7_text.text().replace("\\", "/"))],
["@@@ARCH@@@", debFirstArch.currentText()],
["@@@APP_NAME@@@", e8_text.text()],
["@@@MAINTAINER@@@", e4_text.text()],
["@@@DESCRIPTION@@@", e3_text.text()],
["@@@ICON@@@", [a, a[0]][type(a) == list]], # a 是图标(为什么当初要取这个变量名)
# 如果只有一个图标则为 str,两个及以上则为 list
["@@@DESKTOP_EXEC@@@",
f'''"/opt/apps/{e1_text.text()}/files/{os.path.splitext(os.path.basename(iconUiList[0][0].text().replace(line, "/")))[0]}.sh" {command}'''],
f'''"/opt/apps/{e1_text.text()}/files/run.sh" {command}'''],
["@@@DESKTOP_NAME@@@", iconUiList[0][3].text()],
["@@@DESKTOP_MIMETYPE@@@", iconUiList[0][5].text()],
["@@@DESKTOP_CATEGORIES@@@", iconUiList[0][1].currentText()]
]
# a 是图标(为什么当初要取这个变量名)
# 如果只有一个图标则为 str,两个及以上则为 list
if (type(a) == list):
replaceMap.append(["@@@ICON@@@", a[0]])
else:
replaceMap.append(["@@@ICON@@@", a])
# 配置 postinst 和 postrm
if debInformation[debArch.currentIndex()]["postinst"] != "":
write_txt(f"{debPackagePath}/DEBIAN/postinst", ReplaceText(debInformation[debArch.currentIndex()]["postinst"], replaceMap))
@@ -653,25 +664,36 @@ Description: {e3_text.text()}
write_txt("{}/opt/apps/{}/entries/applications/{}.desktop".format(debPackagePath, e1_text.text(), e1_text.text()), desktopFile)
else:
for i in iconUiList:
if i[2].text().replace(" ", "") == "":
command = f"--uri {i[2].text()}"
else:
command = i[2].text()
replaceMap = [
["@@@BOTTLENAME@@@", e5_text.text()],
["@@@APPVER@@@", e2_text.text()],
["@@@EXEC_PATH@@@", i[0].text()],
["@@@DEB_PACKAGE_NAME@@@", e1_text.text()],
["@@@APPRUN_CMD@@@", wine[wineVersion.currentText()]],
["@@@APPRUN_CMD@@@", [
wine[wineVersion.currentText()],
f"/opt/apps/{e1_text.text()}/files/wine/bin/wine"
][os.path.exists(f'{debPackagePath}/opt/apps/{e1_text.text()}/files/wine/')]],
["@@@EXEC_NAME@@@", os.path.basename(i[0].text().replace("\\", "/"))],
["@@@ARCH@@@", debFirstArch.currentText()],
["@@@APP_NAME@@@", i[3].text()],
["@@@MAINTAINER@@@", e4_text.text()],
["@@@DESCRIPTION@@@", e3_text.text()],
["@@@ICON@@@", [a, a[0]][type(a) == list]], # a 是图标(为什么当初要取这个变量名)
# 如果只有一个图标则为 str,两个及以上则为 list
["@@@DESKTOP_EXEC@@@",
f'''"/opt/apps/{e1_text.text()}/files/{os.path.splitext(os.path.basename(i[0].text().replace(line, "/")))[0]}.sh" {command}'''],
["@@@DESKTOP_NAME@@@", i[3].text()],
["@@@DESKTOP_MIMETYPE@@@", i[5].text()],
["@@@DESKTOP_CATEGORIES@@@", i[1].currentText()]
]
# a 是图标(为什么当初要取这个变量名)
# 如果只有一个图标则为 str,两个及以上则为 list
if (type(a) == list):
replaceMap.append(["@@@ICON@@@", a[0]])
else:
replaceMap.append(["@@@ICON@@@", a])
line = "\\"
desktopFile = ReplaceText(readtxt(f"{programPath}/packager-config/app.desktop"), replaceMap)
write_txt(f"{debPackagePath}/opt/apps/{e1_text.text()}/files/{os.path.splitext(os.path.basename(i[0].text().replace(line, '/')))[0]}.sh", ReplaceText(debInformation[debArch.currentIndex()]["run.sh"], replaceMap))
@@ -705,13 +727,18 @@ Description: {e3_text.text()}
################
if not self.build:
self.label.emit("正在构建 deb 包……")
self.run_command("bash -c 'dpkg-deb -Z xz -z 0 -b \"{}\" \"{}\"'".format(debPackagePath, e12_text.text()))
print(os.path.exists(wine[wineVersion.currentText()]))
if (os.path.exists(wine[wineVersion.currentText()])):
print("bash -c 'dpkg-deb -Z xz -z 9 -b \"{}\" \"{}\"'".format(debPackagePath, e12_text.text()))
self.run_command("bash -c 'dpkg-deb -Z xz -z 9 -b \"{}\" \"{}\"'".format(debPackagePath, e12_text.text()))
else:
self.run_command("bash -c 'dpkg-deb -Z xz -z 0 -b \"{}\" \"{}\"'".format(debPackagePath, e12_text.text()))
################
# 删除临时文件
################
if not self.build:
self.label.emit("正在删除临时文件……")
self.run_command(f"rm -rfv '{debPackagePath}'")
self.run_command(f"rm -rf '{debPackagePath}'")
################
# 完成构建
################
@@ -747,20 +774,26 @@ def getFileFolderSize(fileOrFolderPath):
totalSize = 0
if not os.path.exists(fileOrFolderPath):
return totalSize
# 排除链接导致层数过多的问题
if (os.path.islink(fileOrFolderPath)):
return totalSize
if os.path.isfile(fileOrFolderPath):
totalSize = os.path.getsize(fileOrFolderPath) # 5041481
return totalSize
if os.path.isdir(fileOrFolderPath):
with os.scandir(fileOrFolderPath) as dirEntryList:
for curSubEntry in dirEntryList:
curSubEntryFullPath = os.path.join(fileOrFolderPath, curSubEntry.name)
if curSubEntry.is_dir():
curSubFolderSize = getFileFolderSize(curSubEntryFullPath) # 5800007
totalSize += curSubFolderSize
elif curSubEntry.is_file():
curSubFileSize = os.path.getsize(curSubEntryFullPath) # 1891
totalSize += curSubFileSize
return totalSize
try:
if os.path.isdir(fileOrFolderPath):
with os.scandir(fileOrFolderPath) as dirEntryList:
for curSubEntry in dirEntryList:
curSubEntryFullPath = os.path.join(fileOrFolderPath, curSubEntry.name)
if curSubEntry.is_dir():
curSubFolderSize = getFileFolderSize(curSubEntryFullPath) # 5800007
totalSize += curSubFolderSize
elif curSubEntry.is_file():
curSubFileSize = os.path.getsize(curSubEntryFullPath) # 1891
totalSize += curSubFileSize
return totalSize
except:
return totalSize
# 显示“提示”窗口
def helps():
@@ -1559,7 +1592,7 @@ else:
uploadSparkStoreProgram = QtWidgets.QAction(transla.transe("U", "使用投稿器投稿(推荐,请先安装投稿器)"))
uploadSparkStoreProgram.setDisabled(True)
tip = QtWidgets.QAction(transla.transe("U", "小提示"))
getPdfHelp = QtWidgets.QAction(transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程小白专用\nBy @舞白沙"))
getPdfHelp = QtWidgets.QAction(transla.transe("U", "Wine运行器和Wine打包器傻瓜式使用教程小白专用\nBy @舞白沙"))
videoHelp = menu.addMenu(transla.transe("U", "视频教程(&V)"))
videoHelpAction = QtWidgets.QAction(QtWidgets.QApplication.style().standardIcon(20), transla.transe("U", "视频教程"))
videoHelpAction.triggered.connect(lambda: webbrowser.open_new_tab("https://space.bilibili.com/695814694/channel/collectiondetail?sid=1610353"))
@@ -1694,8 +1727,7 @@ SetFont(app)
window.setCentralWidget(widget)
# 判断是否为小屏幕,是则设置滚动条并全屏
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9 or
__name__ != "__main__"):
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9):
# 设置滚动条
areaScroll = QtWidgets.QScrollArea(window)
areaScroll.setWidgetResizable(True)

0
deepin-wine-runner_512x512.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

0
geek.exe Normal file → Executable file
View File

0
globalenv.py Normal file → Executable file
View File

2
information.json Normal file → Executable file
View File

@@ -1,5 +1,5 @@
{
"Version": "4.0.0.2",
"Version": "4.1.1.0",
"Time": "未知",
"Thank": [
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000新世界的测试机器",

217
main.py Normal file → Executable file
View File

@@ -1,41 +1,31 @@
#!/usr/bin/env python3
# 库的引用
import os
import PyQt5.QtWidgets as QtWidgets
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
import importlib
import sys
class RunnerWindow:
programPath = os.path.split(os.path.realpath(__file__))[0] # 获取当前程序目录
import globalenv
recycleTime = 0
def __init__(self, app: QtWidgets.QApplication, moduleName: str) -> None:
self.globalenv._init() # globalenv 的 init 是必须的,这样才能正确的 import Wine 运行器的窗口
self.globalenv.set_value("app", app) # 用于将该部分的 app 给子模块的 Qt 控件调用以解决 UI 异常以及其它问题
# 因为 Python 有不允许重复 import 的特性从而导致多次返回的控件实际指向同一对象,所以要通过特殊的方式绕过这一限制
# 将使用指向程序所在文件夹的超链接以改变库名称从而实现每次引入时命名控件不同
# 通过嵌套多个 local.local.local 以解决问题
# 同理可以利用该特性使用 globalenv 传值
if (not os.path.exists(f"{self.programPath}/local")):
# 没有存在该超链接,不启用该机制
self.globalenv.set_value("app", app)
self.mainwindow = __import__(moduleName, fromlist=["mainwindow"])
return
while True:
self.recycleTime += 1
testModuleName = "local." * self.recycleTime + moduleName
if (not testModuleName in sys.modules):
self.mainwindow = __import__(testModuleName, fromlist=["mainwindow"]) # 设置 fromlist 就不会返回最上层节点,及 local
break
def Win(self) -> QtWidgets.QMainWindow:
# 输出窗口
return self.mainwindow.window
import os
import sys
import json
import welcome
import subprocess
import WindowModule
# 读取文本文档
def readtxt(path):
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
def ProgramVersion():
information = json.loads(readtxt(f"{programPath}/information.json"))
return information["Version"]
# 创建界面
class Window(QtWidgets.QWidget):
moduleMapList = {}
def __init__(self):
super().__init__()
self.counter_a = 1
@@ -46,7 +36,7 @@ class Window(QtWidgets.QWidget):
def initUI(self):
self.setMinimumSize(800, 600)
self.setWindowTitle("增减测试")
self.setWindowTitle("Wine 运行器 {}".format(ProgramVersion()))
self.mainLayout = QtWidgets.QHBoxLayout()
self.setLayout(self.mainLayout)
@@ -54,91 +44,163 @@ class Window(QtWidgets.QWidget):
self.leftWidget = LeftWidget()
self.mainLayout.addWidget(self.leftWidget)
self.leftWidget.btn1.clicked.connect(self.addA)
self.leftWidget.btn2.clicked.connect(self.addB)
self.leftWidget.btn3.clicked.connect(self.addC)
self.leftWidget.btn4.clicked.connect(self.delCurrent)
time = 0
for i in WindowModule.moduleNameList.keys():
self.moduleMapList[self.leftWidget.actionList[i].text()] = [i, WindowModule.moduleNameList[i]["Name"]]
self.leftWidget.actionList[i].triggered.connect(lambda: self.add(self.sender().text()))
#self.leftWidget.btn4.clicked.connect(self.delCurrent)
self.leftWidget.list1.itemClicked.connect(self.switchWidget)
# 右侧区域
self.rightWidget = RightWidget()
self.mainLayout.addWidget(self.rightWidget)
# 新增a类界面
def addA(self):
self.newTab = "a类页面#{0}".format(self.counter_a)
self.addWelcome()
# 判断运行器是否为第一次打开,如果不是则默认切换至 Wine 运行器主窗口
# 默认为列表里的第一个控件
if (os.path.exists(get_home() + "/.config/deepin-wine-runner")):
self.add(self.leftWidget.actionList[list(WindowModule.moduleNameList.keys())[0]].text())
self.ConfigureConfigFile()
# 新增欢迎界面
def addWelcome(self):
self.newTab = "欢迎页面"
self.leftWidget.list1.addItem(self.newTab)
self.newWidget = welcome.WinWelcome()
self.widgetList.append(self.newWidget)
self.rightWidget.addWidget(self.newWidget)
# 新增界面
def add(self, actionName: str):
self.newInfo = "{}#{}".format(self.moduleMapList[actionName][1], self.counter_a)
self.newTab = ItemWidget(self.newInfo)
self.newTab.btn.clicked.connect(self.delCurrent)
self.counter_a += 1
self.leftWidget.list1.addItem(self.newTab)
self.leftWidget.list1.setItemWidget(self.newTab, self.newTab.widget)
self.newWidget = RunnerWindow(app, "mainwindow").Win()
print(self.newWidget)
self.newWidget = WindowModule.RunnerWindow(app, self.moduleMapList[actionName][0]).Win()
self.widgetList.append(self.newWidget)
self.rightWidget.addWidget(self.newWidget)
# 新增b类界
def addB(self):
self.newTab = "b类页面#{0}".format(self.counter_b)
self.counter_b += 1
self.leftWidget.list1.addItem(self.newTab)
# 自动切换新打开的页
self.leftWidget.list1.setCurrentRow(self.leftWidget.list1.model().rowCount() - 1) # 设置选择最后一项
self.switchWidget()
self.newWidget = RunnerWindow(app, "deepin-wine-packager").Win()
self.widgetList.append(self.newWidget)
self.rightWidget.addWidget(self.newWidget)
# 新增c类界面
def addC(self):
self.newTab = "c类页面#{0}".format(self.counter_c)
self.counter_c += 1
self.leftWidget.list1.addItem(self.newTab)
self.newWidget = RunnerWindow(app, "VM.mainwindow").Win()
self.widgetList.append(self.newWidget)
self.rightWidget.addWidget(self.newWidget)
# 删除_本页面
def delCurrent(self):
self.length = self.leftWidget.list1.count()
print(self.length)
self.row = self.leftWidget.list1.currentRow()
print(self.row)
if self.row == 0:
return 0
self.leftWidget.list1.takeItem(self.row)
self.rightWidget.removeWidget(self.widgetList[self.row])
self.widgetList.pop(self.row)
# 将新界面的关闭按钮设为可用
if self.row == self.length - 1:
if self.row == 1:
return 0
else:
self.leftWidget.list1.item(self.row - 1).btnEnable()
else:
self.leftWidget.list1.item(self.row).btnEnable()
# 切换页面
def switchWidget(self):
self.row = self.leftWidget.list1.currentRow()
self.rightWidget.setCurrentIndex(self.row)
# 将当前页的关闭按钮设为可用
for i in range(self.leftWidget.list1.count()):
if i == 0:
continue
else:
self.leftWidget.list1.item(i).btnDisable()
if self.row != 0:
self.leftWidget.list1.currentItem().btnEnable()
def ConfigureConfigFile(self):
if not os.path.exists(get_home() + "/.config/"): # 如果没有配置文件夹
os.mkdir(get_home() + "/.config/") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/deepin-wine-runner"): # 如果没有配置文件夹
os.mkdir(get_home() + "/.config/deepin-wine-runner") # 创建配置文件夹
# 左侧区域
class LeftWidget(QtWidgets.QWidget):
actionList = {}
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setFixedWidth(100)
self.setFixedWidth(120)
self.mainLayout = QtWidgets.QVBoxLayout()
self.mainLayout.setContentsMargins(0, 0, 0, 0)
self.setLayout(self.mainLayout)
# 左侧标题
self.lab1 = QtWidgets.QLabel("页面导航区")
self.lab1 = QtWidgets.QLabel("<h2>页面导航区</h2>")
self.mainLayout.addWidget(self.lab1)
# 新建页面面按钮
self.btnAdd = QtWidgets.QPushButton("新建界面")
self.mainLayout.addWidget(self.btnAdd)
self.menuAdd = QtWidgets.QMenu()
self.btnAdd.setMenu(self.menuAdd)
for i in WindowModule.moduleNameList.keys():
action = QtWidgets.QAction("新建{}".format(WindowModule.moduleNameList[i]["Name"]))
self.actionList[i] = action
self.menuAdd.addAction(action)
# 左侧页面列表
self.list1 = QtWidgets.QListWidget()
self.mainLayout.addWidget(self.list1)
# 新增a类按钮
self.btn1 = QtWidgets.QPushButton("新增a类界面")
self.mainLayout.addWidget(self.btn1)
# 新增b类按钮
self.btn2 = QtWidgets.QPushButton("新增b类界面")
self.mainLayout.addWidget(self.btn2)
# 新增c类按钮
self.btn3 = QtWidgets.QPushButton("新增c类界面")
self.mainLayout.addWidget(self.btn3)
# 删_页面按钮
self.btn4 = QtWidgets.QPushButton("删除_本页面")
self.mainLayout.addWidget(self.btn4)
self.archLabel = QtWidgets.QLabel("系统架构:{}".format(subprocess.getoutput("dpkg --print-architecture")))
self.mainLayout.addWidget(self.archLabel)
# 列表项目组件
class ItemWidget(QtWidgets.QListWidgetItem):
def __init__(self, info):
super().__init__()
self.info = info
self.initUI()
def initUI(self):
self.widget = QtWidgets.QWidget()
self.mainLayout = QtWidgets.QHBoxLayout()
self.mainLayout.setContentsMargins(2, 0, 0, 0)
self.widget.setLayout(self.mainLayout)
# 文字标签
self.lab = QtWidgets.QLabel(self.info)
self.mainLayout.addWidget(self.lab)
self.mainLayout.addStretch()
# 关闭按钮
self.btn = QtWidgets.QPushButton("x")
#self.btn.setMaximumWidth(20)
self.btn.setEnabled(False)
self.mainLayout.addWidget(self.btn)
# 将按钮设为可用
def btnEnable(self):
self.btn.setEnabled(True)
# 将按钮设为不可用
def btnDisable(self):
self.btn.setEnabled(False)
# 右侧区域
class RightWidget(QtWidgets.QStackedWidget):
@@ -148,9 +210,18 @@ class RightWidget(QtWidgets.QStackedWidget):
#def initUI(self):
# 获取用户主目录
def get_home():
return os.path.expanduser('~')
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
# 运行程序
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
mainWindow = Window()
mainWindow.setWindowIcon(QtGui.QIcon(iconPath))
mainWindow.show()
mainWindow.resize(int(mainWindow.geometry().width() * 1.2), int(mainWindow.geometry().height() * 1.2))
sys.exit(app.exec())

View File

@@ -21,4 +21,4 @@ if [[ $DISPLAY == "" ]] && [[ $WAYLAND_DISPLAY == "" ]] && [[ -f /data/data/com.
fi
$CURRENT_DIR/VM/novnc/utils/novnc_proxy --vnc localhost:5905 $noVNCOption &
fi
python3 $CURRENT_DIR/mainwindow.py
python3 $CURRENT_DIR/main.py

View File

@@ -2478,23 +2478,14 @@ exe路径\' 参数 \'
5、wine 容器如果没有指定,则会默认为 ~/.wine
6、如果可执行文件比较大的话会出现点击“获取该程序运行情况”出现假死的情况因为正在后台读取 SHA1只需要等一下即可读取速度依照您电脑处理速度、读写速度、可执行文件大小等有关
7、如果非 X86 的用户的 UOS 专业版用户想要使用的话,只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序;''')
updateThingsString = QtCore.QCoreApplication.translate("U", '''※1、优化运行器窗口大小机制
※2、Wine 安装器支持根据机器实际情况自动推荐适合的 Wine
※3、Wine 安装器支持手动导入 Wine 7z 包并提供相应 7z 包的网盘下载地址
※4、兼容 Deepin 终端deepin 15 经典版本deepin-terminal-gtk
※5、跟进 dxvk 2.4
※6、修复 deepin 23 无法使用 Mono/Gecko 安装器的问题
※7、修复 debian testing 打包时会把 / 打入 .7z 包内导致系统死机的问题
※8、支持 AOSC安同、小小电脑、proot 容器
※9、支持在 Termux 直接运行(单独提供安装包)
10、修复虚拟机启动器入口不会调用安装的 Qemu Extra 的问题
11、优化高级打包器容器名称生成机制
12、修复部分机器无法正常打开高级打包器的问题
13、修复高级打包器选择Wine封装入deb模式时helper只能使用spark dwine helper的问题
updateThingsString = QtCore.QCoreApplication.translate("U", '''※1、修复没有 dxvk 的问题
※2、修复虚拟机功能异常的问题https://gitee.com/gfdgd-xi/deep-wine-runner/issues/IASRHG
※3、修复打包器生成的 deb 不可用的问题https://gitee.com/gfdgd-xi/deep-wine-runner/issues/IAXE1T
※4、打包器针对 GXDE OS 进行优化
''')
for i in information["Thank"]:
thankText += f"{i}\n"
updateTime = "2024年07月22"
updateTime = "2024年09月15"
aboutProgram = QtCore.QCoreApplication.translate("U", """<p>Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作且安装过程较为繁琐对小白不友好。于是该运行器为了解决该痛点内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。</p>
<p>它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具可以做到只需下载系统镜像并点击安装即可无需考虑虚拟机的安装、创建、分区等操作也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。</p>
<p>而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。</p>
@@ -2822,7 +2813,7 @@ programmenu.addAction(installWineHQ)
programmenu.addAction(installWineHQOrg)
programmenu.addAction(installMoreWine)
programmenu.addAction(downloadChrootBottle)
programmenu.addAction(installBox86CN)
#programmenu.addAction(installBox86CN)
programmenu.addAction(installBox86)
programmenu.addAction(installLat)
programmenu.addSeparator()
@@ -3360,8 +3351,7 @@ window.setCentralWidget(widget)
# 判断是否为小屏幕,是则设置滚动条并全屏
# 获取为 import 为控件,也默认开启滚动条
if (window.frameGeometry().width() > app.primaryScreen().availableGeometry().size().width() * 0.8 or
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9 or
__name__ != "__main__"):
window.frameGeometry().height() > app.primaryScreen().availableGeometry().size().height() * 0.9):
# 设置滚动条
areaScroll = QtWidgets.QScrollArea(window)
areaScroll.setWidgetResizable(True)

View File

@@ -1,5 +1,5 @@
{
"Version": "4.0.0.2",
"Version": "4.1.1.0",
"Time": "未知",
"Thank": [
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000新世界的测试机器",

View File

@@ -24,6 +24,8 @@ Get_Dist_Name()
DISTRO='UniontechOS'
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
DISTRO='UniontechOS'
elif grep -Eqi "GXDE" /etc/issue || grep -Eq "GXDE" /etc/*-release; then
DISTRO='GXDE'
else
DISTRO='OtherOS'
fi
@@ -70,7 +72,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处修改"

View File

@@ -48,6 +48,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
@@ -109,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处修改"
@@ -130,7 +132,7 @@ fi
##############>>>>>>>>>屏蔽mono和gecko安装器结束
##############<<<<<<<<<解压自行封装的 Wine如果存在的话
if [[ -e "$ARCHIVE_FILE_DIR/wine_archive.7z" ]]; then
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"

0
test.py Normal file → Executable file
View File

View File

@@ -8,6 +8,9 @@ if (TMPDIR == None):
TMPDIR = ""
PIDFILE = TMPDIR + '/tmp/deepin-wine-runner.pid'
if (not os.path.exists(TMPDIR + "/tmp")):
os.makedirs(TMPDIR + "/tmp")
#程序结束时清理pid
@atexit.register
def remove_pid():

0
vkd3d-proton.7z Normal file → Executable file
View File

38
welcome.py Executable file
View File

@@ -0,0 +1,38 @@
# 库的引用
import PyQt5.QtWidgets as QtWidgets
import PyQt5.QtGui as QtGui
import PyQt5.QtCore as QtCore
import sys
# 创建界面
class WinWelcome(QtWidgets.QWidget):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.mainLayout = QtWidgets.QVBoxLayout()
self.mainLayout.setContentsMargins(0, 0, 0, 0)
self.setLayout(self.mainLayout)
# 标签1
self.lab1 = QtWidgets.QLabel("<h3>欢迎使用Wine运行器</h3>")
self.mainLayout.addWidget(self.lab1)
# 文本栏
self.txt = QtWidgets.QTextBrowser()
self.introduction = "Wine运行器\n用于运行一般的Windows程序及安装包exe、msi文件\n\nWine打包器\n将特定的Windows程序打包为deb格式以便存储或分享\n\n虚拟机\n可用于运行无法通过Wine运行的程序或在龙架构上运行x86程序\n请注意,虚拟机可解决兼容性问题,但性能开销较大"
self.txt.setText(self.introduction)
self.mainLayout.addWidget(self.txt)
# 标签2
self.lab2 = QtWidgets.QLabel("请根据您的需求,在左侧打开相应页面")
self.mainLayout.addWidget(self.lab2)
# 测试界面
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
winWelcome = WinWelcome()
winWelcome.show()
sys.exit(app.exec())

0
wineautobuild-action-7z-aarch64-daily.sh Normal file → Executable file
View File

0
wineautobuild-action-7z-aarch64.sh Normal file → Executable file
View File

0
wineautobuild-action-7z-daily.sh Normal file → Executable file
View File

0
wineautobuild-action-7z-wow64-daily.sh Normal file → Executable file
View File

0
wineautobuild-action-7z-wow64.sh Normal file → Executable file
View File

0
wineautobuild-action-7z.sh Normal file → Executable file
View File

0
wineautobuild-action-debian9.sh Normal file → Executable file
View File

0
wineautobuild-action.sh Normal file → Executable file
View File

0
winelist.json Normal file → Executable file
View File

0
其他Windows无法正常创建虚拟机的问题 Normal file → Executable file
View File