mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-17 04:21:37 +08:00
Compare commits
8 Commits
96319869b6
...
4.1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 058f025353 | |||
| d8360c6e59 | |||
| 7fa1edb3f8 | |||
| 82bd073ff8 | |||
| ebed98fd25 | |||
| 1ec62bbf86 | |||
| f79bac9d6c | |||
| 6863e58413 |
4
Makefile
4
Makefile
@@ -139,7 +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 main.py deb/opt/apps/deepin-wine-runner/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
|
||||
|
||||
@@ -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],
|
||||
f"{programPath}/../launch.sh\" \"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 == "":
|
||||
|
||||
17
README.md
17
README.md
@@ -157,6 +157,21 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
|
||||

|
||||
|
||||
## 更新日志
|
||||
### 4.1.0(2024/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.0(2024/07/22)
|
||||
**※1、优化运行器窗口大小机制**
|
||||
**※2、Wine 安装器支持根据机器实际情况自动推荐适合的 Wine**
|
||||
@@ -830,8 +845,6 @@ 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" >
|
||||
|
||||
### 广告
|
||||
支付宝官方活动,扫描获得支付红包!
|
||||
|
||||
12
StartVM.sh
12
StartVM.sh
@@ -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 \
|
||||
|
||||
12
VM/qemu.py
12
VM/qemu.py
@@ -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")
|
||||
|
||||
290
VM/test-kvm.asm
Normal file
290
VM/test-kvm.asm
Normal 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 ; 设备ID,1:所有设备
|
||||
; 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
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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/')]],
|
||||
["@@@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/')]],
|
||||
["@@@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 包……")
|
||||
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,9 +774,13 @@ 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
|
||||
try:
|
||||
if os.path.isdir(fileOrFolderPath):
|
||||
with os.scandir(fileOrFolderPath) as dirEntryList:
|
||||
for curSubEntry in dirEntryList:
|
||||
@@ -761,6 +792,8 @@ def getFileFolderSize(fileOrFolderPath):
|
||||
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"))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "4.0.0.2",
|
||||
"Version": "4.1.0.0",
|
||||
"Time": "未知",
|
||||
"Thank": [
|
||||
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
||||
|
||||
2
main.py
2
main.py
@@ -148,7 +148,7 @@ class LeftWidget(QtWidgets.QWidget):
|
||||
self.setLayout(self.mainLayout)
|
||||
|
||||
# 左侧标题
|
||||
self.lab1 = QtWidgets.QLabel("<h3>页面导航区</h3>")
|
||||
self.lab1 = QtWidgets.QLabel("<h2>页面导航区</h2>")
|
||||
self.mainLayout.addWidget(self.lab1)
|
||||
|
||||
# 新建页面面按钮
|
||||
|
||||
@@ -2478,23 +2478,23 @@ 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、修复在 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 若干
|
||||
''')
|
||||
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>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "4.0.0.2",
|
||||
"Version": "4.1.0.0",
|
||||
"Time": "未知",
|
||||
"Thank": [
|
||||
"感谢 @り哥拽的冇气质° 和 @杨 提供了 3a5000(新世界的测试机器)",
|
||||
|
||||
@@ -130,7 +130,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"
|
||||
|
||||
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user