mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
新增程序翻译
This commit is contained in:
parent
9254aa0cdf
commit
daa04ec6fd
BIN
LANG/deepin-wine-runner-en_US.qm
Normal file
BIN
LANG/deepin-wine-runner-en_US.qm
Normal file
Binary file not shown.
664
LANG/deepin-wine-runner-en_US.ts
Normal file
664
LANG/deepin-wine-runner-en_US.ts
Normal file
@ -0,0 +1,664 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN" sourcelanguage="zh_CN">
|
||||
<context>
|
||||
<name>U</name>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1419"/>
|
||||
<source>????</source>
|
||||
<translation type="obsolete">Fast Run</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="201"/>
|
||||
<source>确定</source>
|
||||
<translation>OK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="383"/>
|
||||
<source>如果安装字体?只需要把字体文件复制到此字体目录
|
||||
按下“OK”按钮可以打开字体目录</source>
|
||||
<translation>If you want to install Font, you only copy font files to this directory
|
||||
Check "OK " to open fonts directory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="713"/>
|
||||
<source>更新(更新过程中会关闭所有Python应用,包括这个应用)</source>
|
||||
<translation>Update (it will kill all python program when you're installing)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="721"/>
|
||||
<source>此为最新版本,无需更新</source>
|
||||
<translation>It's newest program now, you don't need to update program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1088"/>
|
||||
<source>错误</source>
|
||||
<translation>Error</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="727"/>
|
||||
<source>无法连接服务器!</source>
|
||||
<translation>Can't connect the Program Server!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="734"/>
|
||||
<source>检查更新</source>
|
||||
<translation>Check Update</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="790"/>
|
||||
<source>ISO镜像:</source>
|
||||
<translation>ISO Image FIle:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1438"/>
|
||||
<source>浏览</source>
|
||||
<translation>Browser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="799"/>
|
||||
<source>读取/挂载ISO镜像</source>
|
||||
<translation>Read/Mount ISO Image File</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="800"/>
|
||||
<source>关闭/卸载ISO镜像</source>
|
||||
<translation>Close/Unmount ISO Image File</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="802"/>
|
||||
<source>查找</source>
|
||||
<translation>Find</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="804"/>
|
||||
<source>保存到 wine 容器中</source>
|
||||
<translation>Save DLL for wine botton</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="805"/>
|
||||
<source>设置 wine 容器</source>
|
||||
<translation>Setting Wine Botton</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="827"/>
|
||||
<source>查找DLL
|
||||
(为空则代表不查找,
|
||||
将显示全部内容):</source>
|
||||
<translation>Find DLL
|
||||
(Nothing means don't find,will show all dlls):</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1081"/>
|
||||
<source>提示</source>
|
||||
<translation>Tips</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="940"/>
|
||||
<source>关闭/卸载成功!</source>
|
||||
<translation>Close/Remove Success!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="967"/>
|
||||
<source>暂时还没有该软件的运行情况信息
|
||||
是否自己上传该软件的运行情况?</source>
|
||||
<translation>No body update this program running status now
|
||||
Do you want to update first?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="987"/>
|
||||
<source>点此上传运行情况</source>
|
||||
<translation>Click here to update</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="989"/>
|
||||
<source>综合评价:</source>
|
||||
<translation>User Thinking:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1038"/>
|
||||
<source>上传</source>
|
||||
<translation>Update</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1048"/>
|
||||
<source>如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可</source>
|
||||
<translation>You can try press "NULL" if you can't to update because program name</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1059"/>
|
||||
<source>程序名:</source>
|
||||
<translation>Program Name:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1067"/>
|
||||
<source>上传程序运行情况</source>
|
||||
<translation>Fast Run</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1088"/>
|
||||
<source>数据上传失败!</source>
|
||||
<translation>Update Error!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1119"/>
|
||||
<source>选择 Wine 容器版本:</source>
|
||||
<translation>Choose Wine Version:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1120"/>
|
||||
<source>wine DEBUG 信息输出:</source>
|
||||
<translation>Show Wine Debug Information:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1121"/>
|
||||
<source>默认 Wine:</source>
|
||||
<translation>Default Wine Version:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1122"/>
|
||||
<source>默认 Wine 容器:</source>
|
||||
<translation>Defualt Wine Botton:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1123"/>
|
||||
<source>使用终端打开:</source>
|
||||
<translation>Use Terminal To Open Program:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1124"/>
|
||||
<source>自定义 wine 参数:</source>
|
||||
<translation>More Wine Command Option:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1125"/>
|
||||
<source>程序主题:</source>
|
||||
<translation>Program Theme:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1126"/>
|
||||
<source>Wine 默认 Mono 和 Gecko 安装器:</source>
|
||||
<translation>Using Wine Defult Mono And Gecko Installer:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1127"/>
|
||||
<source>忽略未安装的 Wine:</source>
|
||||
<translation>Unsee Not Install Wine Version:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1128"/>
|
||||
<source>下载缓存:</source>
|
||||
<translation>Download Cache:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1130"/>
|
||||
<source>开启 DEBUG 输出</source>
|
||||
<translation>Show Wine Debug Info</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1136"/>
|
||||
<source>保存</source>
|
||||
<translation>Save</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1140"/>
|
||||
<source>测试(重启后变回设置的主题)</source>
|
||||
<translation>Test(Restarting will show setting themes)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1142"/>
|
||||
<source>使用终端打开(deepin 终端)</source>
|
||||
<translation>Use Terminal To Open(Deepin Terminal)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1144"/>
|
||||
<source>屏蔽 Wine 默认 Mono 和 Gecko 安装器</source>
|
||||
<translation>Don't Use Wine Default Mono And Gecko Installer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1145"/>
|
||||
<source>不显示未检测到的 Wine</source>
|
||||
<translation>Don't Show Unknown Wine Version</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1146"/>
|
||||
<source>开启下载缓存</source>
|
||||
<translation>Start Download Cache</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1178"/>
|
||||
<source>选择 Wine 容器</source>
|
||||
<translation>Choose Wine Botton</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1423"/>
|
||||
<source>快速启动</source>
|
||||
<translation>Fast Run</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1427"/>
|
||||
<source>请选择容器路径:</source>
|
||||
<translation>Choose Wine Botton Path:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1434"/>
|
||||
<source>请选择要执行的程序:</source>
|
||||
<translation>Choose EXE Files:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1441"/>
|
||||
<source>请选择WINE版本:</source>
|
||||
<translation>Choose Wine Version:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1453"/>
|
||||
<source>高级功能</source>
|
||||
<translation>More Function</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1457"/>
|
||||
<source>创建快捷方式(Desktop文件):</source>
|
||||
<translation>Create Program Link(.desktop file):</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1464"/>
|
||||
<source>创建到桌面</source>
|
||||
<translation>Create To Desktop</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1467"/>
|
||||
<source>创建到开始菜单</source>
|
||||
<translation>Create To Launcher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1473"/>
|
||||
<source>程序管理:</source>
|
||||
<translation>Program Manager:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1474"/>
|
||||
<source>提取图标</source>
|
||||
<translation>Get Program Icon</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1478"/>
|
||||
<source>窗口透明工具</source>
|
||||
<translation>Window Transparent Tools</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1481"/>
|
||||
<source>卸载程序</source>
|
||||
<translation>Remove Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1485"/>
|
||||
<source>微型应用商店</source>
|
||||
<translation>Mini App Store</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1490"/>
|
||||
<source>获取该程序运行情况</source>
|
||||
<translation>Get Choosed Program Running Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1494"/>
|
||||
<source>WINE配置:</source>
|
||||
<translation>Wine Config:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1495"/>
|
||||
<source>配置容器</source>
|
||||
<translation>Config Wine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1498"/>
|
||||
<source>字体商店</source>
|
||||
<translation>Fonts Store</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1583"/>
|
||||
<source>安装自定义字体</source>
|
||||
<translation>Install More Fonts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1504"/>
|
||||
<source>星火wine配置</source>
|
||||
<translation>Spark Wine Config</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1521"/>
|
||||
<source>在此可以看到wine安装应用时的终端输出内容</source>
|
||||
<translation>You can see wine running return things here</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1538"/>
|
||||
<source>运行程序</source>
|
||||
<translation>Run Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1541"/>
|
||||
<source>终止程序</source>
|
||||
<translation>Stop Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1548"/>
|
||||
<source>程序(&P)</source>
|
||||
<translation>Program(&P)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1549"/>
|
||||
<source>安装 wine(&I)</source>
|
||||
<translation>Install Wine(&I)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1550"/>
|
||||
<source>安装 wine(只限Deepin23)</source>
|
||||
<translation>Install Wine(Only For Deepin 23)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1551"/>
|
||||
<source>安装 WineHQ</source>
|
||||
<translation>Install WineHQ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1552"/>
|
||||
<source>安装更多 Wine</source>
|
||||
<translation>Install More Wine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1553"/>
|
||||
<source>设置程序(&S)</source>
|
||||
<translation>Setting Program(&S)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1554"/>
|
||||
<source>清空软件历史记录(&C)</source>
|
||||
<translation>Clean Program History Data(&C)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1555"/>
|
||||
<source>清空软件缓存</source>
|
||||
<translation>Clean Program Cache</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1556"/>
|
||||
<source>删除程序组件</source>
|
||||
<translation>Remove Program Function</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1557"/>
|
||||
<source>退出程序(&E)</source>
|
||||
<translation>Exit Program(&E)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1580"/>
|
||||
<source>Wine(&W)</source>
|
||||
<translation>Wine(&W)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1581"/>
|
||||
<source>打开 Wine 容器目录</source>
|
||||
<translation>Open Wine Botton Directory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1582"/>
|
||||
<source>安装常见字体</source>
|
||||
<translation>Install Fonts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1584"/>
|
||||
<source>删除选择的 Wine 容器</source>
|
||||
<translation>Delete Choose Wine Botton</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1585"/>
|
||||
<source>清理 Wine 容器(基于 Wine 适配活动脚本)</source>
|
||||
<translation>Clean Wine Botton(By UOS Wine Activity Shell)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1586"/>
|
||||
<source>打包 wine 应用</source>
|
||||
<translation>Build Windows Program Installer For Linux By Wine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1587"/>
|
||||
<source>使用官方 Wine 适配活动的脚本进行打包</source>
|
||||
<translation>Build Windows Program Installer For Linux By Wine(By UOS Wine Activity Shell)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1588"/>
|
||||
<source>从镜像获取DLL(只支持Windows XP、Windows Server 2003官方安装镜像)</source>
|
||||
<translation>Get Dll For ISO Images(Only Support Windows XP And Windows Server 2003 Microsoft Installer)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1589"/>
|
||||
<source>从 Geek Uninstaller 官网升级程序</source>
|
||||
<translation>Update Geek Uninstaller From Geek Websize</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1590"/>
|
||||
<source>删除所有 Wine 程序在启动器的快捷方式</source>
|
||||
<translation>Delete All Wine Program Links On Launcher</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1604"/>
|
||||
<source>在指定 Wine、容器安装组件</source>
|
||||
<translation>Install Runtime With Choose Wine Botton And Version</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1605"/>
|
||||
<source>在指定wine、指定容器安装 .net framework</source>
|
||||
<translation>Install .Net Framework</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1606"/>
|
||||
<source>在指定wine、指定容器安装 Visual Studio C++</source>
|
||||
<translation>Install Visual Studio C++ Runtime</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1607"/>
|
||||
<source>在指定wine、指定容器安装 MSXML</source>
|
||||
<translation>Install MSXML</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1608"/>
|
||||
<source>在指定wine、指定容器安装 gecko</source>
|
||||
<translation>Install Gecko</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1609"/>
|
||||
<source>在指定wine、指定容器安装 mono</source>
|
||||
<translation>Install Mono</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1610"/>
|
||||
<source>在指定wine、指定容器安装其它运行库</source>
|
||||
<translation>Install Other Runtime</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1617"/>
|
||||
<source>在指定 Wine、容器运行基础应用</source>
|
||||
<translation>Run Basic Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1618"/>
|
||||
<source>打开指定wine、指定容器的控制面板</source>
|
||||
<translation>Run Control</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1619"/>
|
||||
<source>打开指定wine、指定容器的浏览器</source>
|
||||
<translation>Run Web Browser</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1620"/>
|
||||
<source>打开指定wine、指定容器的注册表</source>
|
||||
<translation>Run Regedit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1621"/>
|
||||
<source>打开指定wine、指定容器的任务管理器</source>
|
||||
<translation>Run Taskmgr</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1622"/>
|
||||
<source>打开指定wine、指定容器的资源管理器</source>
|
||||
<translation>Run File Explorer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1623"/>
|
||||
<source>打开指定wine、指定容器的关于 wine</source>
|
||||
<translation>Run About Wine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1631"/>
|
||||
<source>设置 run_v3.sh 的文管为 Deepin 默认文管</source>
|
||||
<translation>Set Deepin File Dialog Defult On run_v3.sh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1632"/>
|
||||
<source>设置 run_v3.sh 的文管为 Wine 默认文管</source>
|
||||
<translation>Set Wine File Dialog Defult On run_v3.sh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1633"/>
|
||||
<source>重新安装 deepin-wine-helper</source>
|
||||
<translation>Reinstall deepin-wine-helper</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1634"/>
|
||||
<source>使用winetricks打开指定容器</source>
|
||||
<translation>Using Winetricks</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1641"/>
|
||||
<source>启用/禁用 opengl</source>
|
||||
<translation>Enabled/Disbled OpenGL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1642"/>
|
||||
<source>开启 opengl</source>
|
||||
<translation>Enabled OpenGL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1643"/>
|
||||
<source>禁用 opengl</source>
|
||||
<translation>Disbled OpenGL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1646"/>
|
||||
<source>安装/卸载 winbind</source>
|
||||
<translation>Install/Uninstall Winbind</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1647"/>
|
||||
<source>安装 winbind</source>
|
||||
<translation>Install Winbind</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1648"/>
|
||||
<source>卸载 winbind</source>
|
||||
<translation>Uninstall Winbind</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1651"/>
|
||||
<source>安装/卸载 DXVK</source>
|
||||
<translation>Install/Uninstall DXVK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1652"/>
|
||||
<source>安装 DXVK</source>
|
||||
<translation>Install DXVK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1653"/>
|
||||
<source>卸载 DXVK</source>
|
||||
<translation>Uninstall DXVK</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1691"/>
|
||||
<source>虚拟机(&V)</source>
|
||||
<translation>Virtual Machine(&V)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1692"/>
|
||||
<source>使用 Virtualbox 虚拟机运行 Windows 应用</source>
|
||||
<translation>Run Windows Program By VirtualBox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1696"/>
|
||||
<source>云沙箱(&C)</source>
|
||||
<translation>Cloud Sandbox(&C)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1697"/>
|
||||
<source>360 沙箱云</source>
|
||||
<translation>360 Cloud Sandbox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1698"/>
|
||||
<source>微步云沙箱</source>
|
||||
<translation>ThreatBook Cloud Sandbox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1699"/>
|
||||
<source>VIRUSTOTAL</source>
|
||||
<translation>VIRUSTOTAL</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1707"/>
|
||||
<source>帮助(&H)</source>
|
||||
<translation>Help(&H)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1708"/>
|
||||
<source>程序官网</source>
|
||||
<translation>Program Websize</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1709"/>
|
||||
<source>小提示</source>
|
||||
<translation>Program Tips</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1710"/>
|
||||
<source>更新内容</source>
|
||||
<translation>Program New Things</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1711"/>
|
||||
<source>谢明名单</source>
|
||||
<translation>Thank List</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1712"/>
|
||||
<source>更新这个程序</source>
|
||||
<translation>UPdate This Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1713"/>
|
||||
<source>反馈这个程序的建议和问题</source>
|
||||
<translation>Update Advices And Problem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1714"/>
|
||||
<source>关于这个程序</source>
|
||||
<translation>About This Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1715"/>
|
||||
<source>关于 Qt</source>
|
||||
<translation>About Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1727"/>
|
||||
<source>更多生态适配应用</source>
|
||||
<translation>More Deepin/UOS Program</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.py" line="1728"/>
|
||||
<source>运行 Android 应用:UEngine 运行器</source>
|
||||
<translation>Run Android Program: UEngine Runner</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
BIN
LANG/installwine-en_US.qm
Normal file
BIN
LANG/installwine-en_US.qm
Normal file
Binary file not shown.
32
LANG/installwine-en_US.ts
Normal file
32
LANG/installwine-en_US.ts
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN">
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../wine-source/mainwindow.ui" line="14"/>
|
||||
<source>下载 Wine</source>
|
||||
<translation type="unfinished">Download Wine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wine-source/mainwindow.ui" line="41"/>
|
||||
<source><<</source>
|
||||
<translation type="unfinished"><<</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wine-source/mainwindow.ui" line="48"/>
|
||||
<source>>></source>
|
||||
<translation type="unfinished">>></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wine-source/mainwindow.ui" line="77"/>
|
||||
<source>不解压Wine资源文件</source>
|
||||
<translation type="unfinished">Don't Unzip Wine File</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../wine-source/mainwindow.ui" line="84"/>
|
||||
<source>删除下载的资源包,只解压保留(两个选项都选相互抵消)</source>
|
||||
<translation type="unfinished">Delete Download Zip File And Only Unzip</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
#########################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布
|
||||
# 版本:2.0.0
|
||||
# 版本:2.0.1
|
||||
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 PyQt5 构建
|
||||
#########################################################################
|
||||
@ -10,6 +10,7 @@
|
||||
#################
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import shutil
|
||||
import random
|
||||
@ -77,9 +78,12 @@ class QT:
|
||||
thread = None
|
||||
|
||||
savePath = ""
|
||||
savePathBlock = False
|
||||
def SavePathGet(temp):
|
||||
global savePath
|
||||
savePath = QtWidgets.QFileDialog.getExistingDirectory(widget, "选择模板生成位置", "~")
|
||||
global savePathBlock
|
||||
savePath = QtWidgets.QFileDialog.getExistingDirectory(widget, "选择模板生成位置", get_home())
|
||||
savePathBlock = True
|
||||
|
||||
def ErrorMsg(info):
|
||||
QtWidgets.QMessageBox.critical(widget, "错误", info)
|
||||
@ -758,14 +762,27 @@ fi
|
||||
self.label.emit("正在删除对构建 deb 包有影响的文件……")
|
||||
if self.build:
|
||||
global savePath
|
||||
global savePathBlock
|
||||
savePathBlock = False
|
||||
self.getSavePath.emit("")
|
||||
# 必须保证信号完全执行才可以继续
|
||||
# 所以自制信号锁
|
||||
while not savePathBlock:
|
||||
time.sleep(0.1)
|
||||
#
|
||||
if savePath == "":
|
||||
self.disabled_or_NORMAL_all.emit(False)
|
||||
print("ggg")
|
||||
self.disabled_or_NORMAL_all.emit(True)
|
||||
return
|
||||
print("aaa")
|
||||
debPackagePath = savePath
|
||||
print("g")
|
||||
else:
|
||||
debPackagePath = f"/tmp/{random.randint(0, 9999)}"
|
||||
self.run_command(f"rm -rfv /tmp/{debPackagePath}")
|
||||
#self.run_command(f"rm -rfv /tmp/{debPackagePath}")
|
||||
print("f")
|
||||
self.run_command(f"rm -rfv '{debPackagePath}'")
|
||||
print("d")
|
||||
###############
|
||||
# 创建目录
|
||||
###############
|
||||
@ -857,7 +874,8 @@ fi
|
||||
# 写入文本文档
|
||||
################
|
||||
self.label.emit("正在写入文件……")
|
||||
write_txt(f"{debPackagePath}/DEBIAN/control", f'''Package: {e1_text.text()}
|
||||
if debRecommend.text() == "":
|
||||
write_txt(f"{debPackagePath}/DEBIAN/control", f'''Package: {e1_text.text()}
|
||||
Version: {e2_text.text()}
|
||||
Architecture: {debInformation[debArch.currentIndex()]["Architecture"]}
|
||||
Maintainer: {e4_text.text()}
|
||||
@ -867,6 +885,19 @@ Priority: optional
|
||||
Multi-Arch: foreign
|
||||
Installed-Size: {size}
|
||||
Description: {e3_text.text()}
|
||||
''')
|
||||
else:
|
||||
write_txt(f"{debPackagePath}/DEBIAN/control", f'''Package: {e1_text.text()}
|
||||
Version: {e2_text.text()}
|
||||
Architecture: {debInformation[debArch.currentIndex()]["Architecture"]}
|
||||
Maintainer: {e4_text.text()}
|
||||
Depends: {debInformation[debArch.currentIndex()]["Depends"]}
|
||||
Recommends: {debRecommend.text()}
|
||||
Section: non-free/otherosfs
|
||||
Priority: optional
|
||||
Multi-Arch: foreign
|
||||
Installed-Size: {size}
|
||||
Description: {e3_text.text()}
|
||||
''')
|
||||
if debInformation[debArch.currentIndex()]["postinst"] != "":
|
||||
write_txt(f"{debPackagePath}/DEBIAN/postinst", debInformation[debArch.currentIndex()]["postinst"])
|
||||
@ -895,7 +926,7 @@ Description: {e3_text.text()}
|
||||
################
|
||||
self.label.emit("完成构建!")
|
||||
self.disabled_or_NORMAL_all.emit(True)
|
||||
self.infoMsg.emit(widget, "提示", "打包完毕!")
|
||||
self.infoMsg.emit("打包完毕!")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
self.errorMsg.emit("程序出现错误,错误信息:\n{}".format(traceback.format_exc()))
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"Version": "2.0.0-2",
|
||||
"Version": "2.0.1",
|
||||
"Thank": [
|
||||
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
|
||||
"感谢 @zhangs https://bbs.deepin.org/post/227948",
|
||||
|
314
mainwindow.py
314
mainwindow.py
@ -26,7 +26,8 @@ import urllib.parse as parse
|
||||
import PyQt5.QtGui as QtGui
|
||||
import PyQt5.QtCore as QtCore
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
|
||||
# 方便一些,单独把 tr 抽出来
|
||||
from PyQt5.QtCore import QObject
|
||||
###################
|
||||
# 程序所需事件
|
||||
###################
|
||||
@ -194,7 +195,7 @@ def about_this_program()->"显示“关于这个程序”窗口":
|
||||
aboutInfo = QtWidgets.QTextBrowser(messageWidget)
|
||||
aboutInfo.setHtml(about)
|
||||
messageLayout.addWidget(aboutInfo, 0, 1, 1, 1)
|
||||
ok = QtWidgets.QPushButton("确定")
|
||||
ok = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "确定"))
|
||||
ok.clicked.connect(QT.message.close)
|
||||
messageLayout.addWidget(ok, 1, 1, 1, 1, QtCore.Qt.AlignBottom | QtCore.Qt.AlignRight)
|
||||
messageWidget.setLayout(messageLayout)
|
||||
@ -372,7 +373,7 @@ def OpenWineFontPath():
|
||||
wineBottonPath = setting["DefultBotton"]
|
||||
else:
|
||||
wineBottonPath = e1.currentText()
|
||||
QtWidgets.QMessageBox.information(widget, "提示", "如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录")
|
||||
QtWidgets.QMessageBox.information(widget, "提示", QtCore.QCoreApplication.translate("U", "如果安装字体?只需要把字体文件复制到此字体目录\n按下“OK”按钮可以打开字体目录"))
|
||||
os.system("xdg-open \"" + wineBottonPath.replace("\'", "\\\'") + "/drive_c/windows/Fonts\"")
|
||||
|
||||
class RunWineProgramThread(QtCore.QThread):
|
||||
@ -696,28 +697,28 @@ class UpdateWindow():
|
||||
updateWidgetLayout = QtWidgets.QGridLayout()
|
||||
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:未知\n更新内容:")
|
||||
updateText = QtWidgets.QTextBrowser()
|
||||
ok = QtWidgets.QPushButton("更新(更新过程中会关闭所有Python应用,包括这个应用)")
|
||||
ok = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "更新(更新过程中会关闭所有Python应用,包括这个应用)"))
|
||||
ok.clicked.connect(UpdateWindow.Update)
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.clicked.connect(UpdateWindow.update.close)
|
||||
try:
|
||||
UpdateWindow.data = json.loads(requests.get("http://120.25.153.144/spark-deepin-wine-runner/update.json").text)
|
||||
UpdateWindow.data = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci91cGRhdGUuanNvbg==").decode("utf-8")).text)
|
||||
versionLabel = QtWidgets.QLabel(f"当前版本:{version}\n最新版本:{UpdateWindow.data['Version']}\n更新内容:")
|
||||
if UpdateWindow.data["Version"] == version:
|
||||
updateText.setText("此为最新版本,无需更新")
|
||||
updateText.setText(QtCore.QCoreApplication.translate("U", "此为最新版本,无需更新"))
|
||||
ok.setDisabled(True)
|
||||
else:
|
||||
updateText.setText(UpdateWindow.data["New"].replace("\\n", "\n"))
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(updateWidget, "错误", "无法连接服务器!")
|
||||
QtWidgets.QMessageBox.critical(updateWidget, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "无法连接服务器!"))
|
||||
updateWidgetLayout.addWidget(versionLabel, 0, 0, 1, 1)
|
||||
updateWidgetLayout.addWidget(updateText, 1, 0, 1, 3)
|
||||
updateWidgetLayout.addWidget(ok, 2, 2, 1, 1)
|
||||
updateWidgetLayout.addWidget(cancel, 2, 1, 1, 1)
|
||||
updateWidget.setLayout(updateWidgetLayout)
|
||||
UpdateWindow.update.setCentralWidget(updateWidget)
|
||||
UpdateWindow.update.setWindowTitle("检查更新")
|
||||
UpdateWindow.update.setWindowTitle(QtCore.QCoreApplication.translate("U", "检查更新"))
|
||||
UpdateWindow.update.resize(updateWidget.frameGeometry().width(), int(updateWidget.frameGeometry().height() * 1.5))
|
||||
UpdateWindow.update.show()
|
||||
|
||||
@ -772,22 +773,22 @@ class GetDllFromWindowsISO:
|
||||
以及不要拷贝/替换太多的 dll,否则可能会导致 wine 容器异常
|
||||
最后,拷贝/替换 dll 后,建议点击下面“设置 wine 容器”按钮==》函数库 进行设置
|
||||
当前选择的 Wine 容器:{GetDllFromWindowsISO.wineBottonPath}"""), 0, 0, 1, 5)
|
||||
isoLabel = QtWidgets.QLabel("ISO镜像:")
|
||||
isoLabel = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "ISO镜像:"))
|
||||
GetDllFromWindowsISO.isoPath = QtWidgets.QComboBox()
|
||||
GetDllFromWindowsISO.browser = QtWidgets.QPushButton("浏览")
|
||||
GetDllFromWindowsISO.browser = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览"))
|
||||
isoControl = QtWidgets.QWidget()
|
||||
isoControlLayout = QtWidgets.QHBoxLayout()
|
||||
isoControl.setLayout(isoControlLayout)
|
||||
dllControl = QtWidgets.QWidget()
|
||||
dllControlLayout = QtWidgets.QHBoxLayout()
|
||||
dllControl.setLayout(dllControlLayout)
|
||||
GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton("读取/挂载ISO镜像")
|
||||
umountButton = QtWidgets.QPushButton("关闭/卸载ISO镜像")
|
||||
GetDllFromWindowsISO.mountButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "读取/挂载ISO镜像"))
|
||||
umountButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "关闭/卸载ISO镜像"))
|
||||
GetDllFromWindowsISO.dllFound = QtWidgets.QComboBox()
|
||||
GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton("查找")
|
||||
GetDllFromWindowsISO.foundButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "查找"))
|
||||
GetDllFromWindowsISO.dllList = QtWidgets.QListView()
|
||||
GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton("保存到 wine 容器中")
|
||||
GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton("设置 wine 容器")
|
||||
GetDllFromWindowsISO.saveDll = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "保存到 wine 容器中"))
|
||||
GetDllFromWindowsISO.setWineBotton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "设置 wine 容器"))
|
||||
isoLabel.setSizePolicy(size)
|
||||
GetDllFromWindowsISO.isoPath.setEditable(True)
|
||||
GetDllFromWindowsISO.isoPath.addItems(isoPath)
|
||||
@ -809,7 +810,7 @@ class GetDllFromWindowsISO:
|
||||
widgetLayout.addWidget(GetDllFromWindowsISO.isoPath, 1, 1, 1, 1)
|
||||
widgetLayout.addWidget(GetDllFromWindowsISO.browser, 1, 2, 1, 1)
|
||||
widgetLayout.addWidget(isoControl, 2, 1, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("查找DLL\n(为空则代表不查找,\n将显示全部内容):"), 3, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "查找DLL\n(为空则代表不查找,\n将显示全部内容):")), 3, 0, 1, 1)
|
||||
widgetLayout.addWidget(GetDllFromWindowsISO.dllFound, 3, 1, 1, 1)
|
||||
widgetLayout.addWidget(GetDllFromWindowsISO.foundButton, 3, 2, 1, 1)
|
||||
widgetLayout.addWidget(GetDllFromWindowsISO.dllList, 4, 1, 1, 1)
|
||||
@ -917,12 +918,12 @@ class GetDllFromWindowsISO:
|
||||
shutil.rmtree("/tmp/wine-runner-getdll")
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, "错误", f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}")
|
||||
QtWidgets.QMessageBox.critical(GetDllFromWindowsISO.message, QtCore.QCoreApplication.translate("U", "错误"), f"关闭/卸载镜像失败,报错如下:\n{traceback.format_exc()}")
|
||||
return
|
||||
GetDllFromWindowsISO.DisbledDown(True)
|
||||
GetDllFromWindowsISO.DisbledUp(False)
|
||||
GetDllFromWindowsISO.mount = False
|
||||
QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, "提示", "关闭/卸载成功!")
|
||||
QtWidgets.QMessageBox.information(GetDllFromWindowsISO.message, QtCore.QCoreApplication.translate("U", "提示"), QtCore.QCoreApplication.translate("U", "关闭/卸载成功!"))
|
||||
|
||||
def CopyDll():
|
||||
choose = GetDllFromWindowsISO.dllList.selectionModel().selectedIndexes()[0].data()
|
||||
@ -944,23 +945,24 @@ class ProgramRunStatusShow():
|
||||
return
|
||||
try:
|
||||
sha = ProgramRunStatusUpload.GetSHA1(e2.currentText())
|
||||
lists = json.loads(requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/app/{sha}/all.json").text)
|
||||
r = requests.get(f"http://120.25.153.144/spark-deepin-wine-runner/app/{sha}/title.txt")
|
||||
lists = json.loads(requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).text)
|
||||
r = requests.get(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0L3NwYXJrLWRlZXBpbi13aW5lLXJ1bm5lci9hcHAv").decode("utf-8") + sha + base64.b64decode("L3RpdGxlLnR4dA==").decode("utf-8"))
|
||||
r.encoding = "utf-8"
|
||||
title = r.text
|
||||
except:
|
||||
if QtWidgets.QMessageBox.question(widget, "提示", "暂时还没有该软件的运行情况信息\n是否自己上传该软件的运行情况?") == QtWidgets.QMessageBox.Yes:
|
||||
if QtWidgets.QMessageBox.question(widget, QtCore.QCoreApplication.translate("U", "提示"), QtCore.QCoreApplication.translate("U", "暂时还没有该软件的运行情况信息\n是否自己上传该软件的运行情况?")) == QtWidgets.QMessageBox.Yes:
|
||||
ProgramRunStatusUpload.ShowWindow(sha)
|
||||
return
|
||||
informationList = ["0分:无法运行并且也没有报错,自己无法解决",
|
||||
"1分:无法运行但有报错,自己无法解决",
|
||||
"2分:可以运行但是效果很差,几乎无法使用",
|
||||
"3分:可以运行且勉强可以使用",
|
||||
"4分:可以运行,体验大差不差,还是有点小问题",
|
||||
"5分:可以运行且完全没有bug和问题,和在 Windows 上一样",
|
||||
"含有不良内容,不宜安装",
|
||||
"含有病毒、木马等对计算机有害的软件"
|
||||
]
|
||||
informationList = [
|
||||
"0分:无法运行并且也没有报错,自己无法解决",
|
||||
"1分:无法运行但有报错,自己无法解决",
|
||||
"2分:可以运行但是效果很差,几乎无法使用",
|
||||
"3分:可以运行且勉强可以使用",
|
||||
"4分:可以运行,体验大差不差,还是有点小问题",
|
||||
"5分:可以运行且完全没有bug和问题,和在 Windows 上一样",
|
||||
"含有不良内容,不宜安装",
|
||||
"含有病毒、木马等对计算机有害的软件"
|
||||
]
|
||||
if title.lower() == "null":
|
||||
title = "未知应用"
|
||||
maxHead = lists.index(max(lists))
|
||||
@ -968,9 +970,9 @@ class ProgramRunStatusShow():
|
||||
msgWidget = QtWidgets.QWidget()
|
||||
msgWidgetLayout = QtWidgets.QGridLayout()
|
||||
starLayout = QtWidgets.QHBoxLayout()
|
||||
uploadButton = QtWidgets.QPushButton("点此上传运行情况")
|
||||
uploadButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "点此上传运行情况"))
|
||||
uploadButton.clicked.connect(lambda: ProgramRunStatusUpload.ShowWindow(sha, title))
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel("综合评价:"), 0, 0)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "综合评价:")), 0, 0)
|
||||
msgWidgetLayout.addLayout(starLayout, 0, 1)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(informationList[maxHead]), 1, 0, 1, 2)
|
||||
msgWidgetLayout.addWidget(uploadButton, 2, 0, 1, 2)
|
||||
@ -1018,7 +1020,7 @@ class ProgramRunStatusUpload():
|
||||
ProgramRunStatusUpload.programName = QtWidgets.QLineEdit()
|
||||
ProgramRunStatusUpload.fen = QtWidgets.QComboBox()
|
||||
ProgramRunStatusUpload.starLayout = QtWidgets.QHBoxLayout()
|
||||
upload = QtWidgets.QPushButton("上传")
|
||||
upload = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "上传"))
|
||||
upload.clicked.connect(ProgramRunStatusUpload.Upload)
|
||||
if title != "":
|
||||
ProgramRunStatusUpload.programName.setText(title)
|
||||
@ -1028,7 +1030,7 @@ class ProgramRunStatusUpload():
|
||||
ProgramRunStatusUpload.starList.append(QtWidgets.QLabel(f"<img src='{programPath}/Icon/{['Un', ''][i]}Star.svg' width=25>"))
|
||||
ProgramRunStatusUpload.starLayout.addWidget(ProgramRunStatusUpload.starList[-1])
|
||||
ProgramRunStatusUpload.starLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||
ProgramRunStatusUpload.programName.setPlaceholderText("如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可")
|
||||
ProgramRunStatusUpload.programName.setPlaceholderText(QtCore.QCoreApplication.translate("U", "如果这个程序和程序名确实是合法还是检测到敏感词,改为“NULL”即可"))
|
||||
ProgramRunStatusUpload.fen.addItems(["0分:无法运行并且也没有报错,自己无法解决",
|
||||
"1分:无法运行但有报错,自己无法解决",
|
||||
"2分:可以运行但是效果很差,几乎无法使用",
|
||||
@ -1039,15 +1041,15 @@ class ProgramRunStatusUpload():
|
||||
"含有病毒、木马等对计算机有害的软件"])
|
||||
ProgramRunStatusUpload.fen.setCurrentIndex(4)
|
||||
ProgramRunStatusUpload.fen.currentIndexChanged.connect(ProgramRunStatusUpload.ChangeStar)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel("程序名:"), 0, 0)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel("评分:"), 1, 0)
|
||||
msgWidgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序名:")), 0, 0)
|
||||
msgWidgetLayout.addWidget(QtCore.QCoreApplication.translate("U", QtWidgets.QLabel("评分:")), 1, 0)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.programName, 0, 1)
|
||||
msgWidgetLayout.addWidget(ProgramRunStatusUpload.fen, 1, 1)
|
||||
msgWidgetLayout.addLayout(ProgramRunStatusUpload.starLayout, 2, 1)
|
||||
msgWidgetLayout.addWidget(upload, 3, 1)
|
||||
msgWidget.setLayout(msgWidgetLayout)
|
||||
ProgramRunStatusUpload.msgWindow.setCentralWidget(msgWidget)
|
||||
ProgramRunStatusUpload.msgWindow.setWindowTitle("上传程序运行情况")
|
||||
ProgramRunStatusUpload.msgWindow.setWindowTitle(QtCore.QCoreApplication.translate("U", "上传程序运行情况"))
|
||||
ProgramRunStatusUpload.msgWindow.setWindowIcon(QtGui.QIcon(iconPath))
|
||||
ProgramRunStatusUpload.msgWindow.show()
|
||||
|
||||
@ -1055,17 +1057,20 @@ class ProgramRunStatusUpload():
|
||||
if not os.path.exists(e2.currentText()):
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "exe 文件不存在!")
|
||||
return
|
||||
if ProgramRunStatusUpload.programName.text() == "":
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "程序名称不能为空!")
|
||||
return
|
||||
try:
|
||||
if ProgramRunStatusUpload.sha1Value == "":
|
||||
ProgramRunStatusUpload.sha1Value = ProgramRunStatusUpload.GetSHA1(e2.currentText())
|
||||
QtWidgets.QMessageBox.information(None, "提示", json.loads(requests.post("http://120.25.153.144:30250", {
|
||||
QtWidgets.QMessageBox.information(None, QtCore.QCoreApplication.translate("U", "提示"), json.loads(requests.post(base64.b64decode("aHR0cDovLzEyMC4yNS4xNTMuMTQ0OjMwMjUw").decode("utf-8"), {
|
||||
"SHA1": ProgramRunStatusUpload.sha1Value,
|
||||
"Name": ProgramRunStatusUpload.programName.text(),
|
||||
"Fen": ProgramRunStatusUpload.fen.currentIndex(),
|
||||
"Wine": o1.currentText()
|
||||
}).text)["Error"])
|
||||
except:
|
||||
QtWidgets.QMessageBox.critical(None, "错误", "数据上传失败!")
|
||||
QtWidgets.QMessageBox.critical(None, QtCore.QCoreApplication.translate("U", "错误"), QtCore.QCoreApplication.translate("U", "数据上传失败!"))
|
||||
|
||||
def GetSHA1(filePath):
|
||||
sha1 = hashlib.sha1()
|
||||
@ -1096,34 +1101,34 @@ class ProgramSetting():
|
||||
ProgramSetting.message = QtWidgets.QMainWindow()
|
||||
widget = QtWidgets.QWidget()
|
||||
widgetLayout = QtWidgets.QGridLayout()
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("选择 Wine 容器版本:"), 0, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("wine DEBUG 信息输出:"), 1, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("默认 Wine:"), 2, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("默认 Wine 容器:"), 3, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("使用终端打开:"), 4, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("自定义 wine 参数:"), 5, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("程序主题:"), 6, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("Wine 默认 Mono 和 Gecko 安装器:"), 7, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("忽略未安装的 Wine:"), 8, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel("下载缓存:"), 9, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "选择 Wine 容器版本:")), 0, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "wine DEBUG 信息输出:")), 1, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "默认 Wine:")), 2, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "默认 Wine 容器:")), 3, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "使用终端打开:")), 4, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "自定义 wine 参数:")), 5, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序主题:")), 6, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "Wine 默认 Mono 和 Gecko 安装器:")), 7, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "忽略未安装的 Wine:")), 8, 0, 1, 1)
|
||||
widgetLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "下载缓存:")), 9, 0, 1, 1)
|
||||
ProgramSetting.wineBottonA = QtWidgets.QComboBox()
|
||||
ProgramSetting.wineDebug = QtWidgets.QCheckBox("开启 DEBUG 输出")
|
||||
ProgramSetting.wineDebug = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "开启 DEBUG 输出"))
|
||||
ProgramSetting.defultWine = QtWidgets.QComboBox()
|
||||
ProgramSetting.defultBotton = QtWidgets.QLineEdit()
|
||||
ProgramSetting.theme = QtWidgets.QComboBox()
|
||||
ProgramSetting.theme.addItems(QtWidgets.QStyleFactory.keys())
|
||||
ProgramSetting.theme.setCurrentText(setting["Theme"])
|
||||
save = QtWidgets.QPushButton("保存")
|
||||
save = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "保存"))
|
||||
save.clicked.connect(ProgramSetting.Save)
|
||||
defultBottonButton = QtWidgets.QPushButton("浏览")
|
||||
defultBottonButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览"))
|
||||
defultBottonButton.clicked.connect(ProgramSetting.Browser)
|
||||
themeTry = QtWidgets.QPushButton("测试(重启后变回设置的主题)")
|
||||
themeTry = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "测试(重启后变回设置的主题)"))
|
||||
themeTry.clicked.connect(ProgramSetting.Try)
|
||||
ProgramSetting.terminalOpen = QtWidgets.QCheckBox("使用终端打开(deepin 终端)")
|
||||
ProgramSetting.terminalOpen = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "使用终端打开(deepin 终端)"))
|
||||
ProgramSetting.wineOption = QtWidgets.QLineEdit()
|
||||
ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox("屏蔽 Wine 默认 Mono 和 Gecko 安装器")
|
||||
ProgramSetting.autoWine = QtWidgets.QCheckBox("不显示未检测到的 Wine")
|
||||
ProgramSetting.runtimeCache = QtWidgets.QCheckBox("开启下载缓存")
|
||||
ProgramSetting.monogeckoInstaller = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "屏蔽 Wine 默认 Mono 和 Gecko 安装器"))
|
||||
ProgramSetting.autoWine = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "不显示未检测到的 Wine"))
|
||||
ProgramSetting.runtimeCache = QtWidgets.QCheckBox(QtCore.QCoreApplication.translate("U", "开启下载缓存"))
|
||||
ProgramSetting.wineBottonA.addItems(["Auto", "win32", "win64"])
|
||||
ProgramSetting.wineBottonA.setCurrentText(setting["Architecture"])
|
||||
ProgramSetting.wineDebug.setChecked(setting["Debug"])
|
||||
@ -1155,7 +1160,7 @@ class ProgramSetting():
|
||||
ProgramSetting.message.show()
|
||||
|
||||
def Browser():
|
||||
path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, "选择 Wine 容器", json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"])
|
||||
path = QtWidgets.QFileDialog.getExistingDirectory(ProgramSetting.message, QtCore.QCoreApplication.translate("U", "选择 Wine 容器"), json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"])
|
||||
if path == "" or path == None or path == "()" or path == ():
|
||||
return
|
||||
ProgramSetting.defultBotton.setText(path)
|
||||
@ -1329,11 +1334,16 @@ exe路径\' 参数 \'
|
||||
<b>千万不要中断后不删除源的情况下 apt upgrade !!!</b>中断后只需重新打开脚本输入 repair 或者随意安装一个 Wine(会自动执行恢复操作)即可
|
||||
以及此脚本安装的 Wine 无法保证 100% 能使用,以及副作用是会提示
|
||||
<code>N: 鉴于仓库 'https://community-packages.deepin.com/beige beige InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的获取。</code>'''
|
||||
updateThingsString = '''<b>※</b>
|
||||
updateThingsString = '''<b>※1、新增新的 Wine 安装器,并支持将安装的 Wine 打包到 Wine 程序 deb 包中
|
||||
※2、Wine 打包器打包 Windows 应用支持将 Wine 打包入 deb 内,可以不依赖 Wine(一般不推荐把 Wine 打包入内,推荐用依赖的形式),并支持设置自定义依赖和生成模板</b>
|
||||
3、修改错别字(图形话=>图形化)
|
||||
3、修复评分功能名称为空也可以上传评分的问题
|
||||
4、去除 toilet 依赖,使在 Deepin 23 Preview 上运行更佳
|
||||
5、支持删除所有由 Wine 创建的启动器快捷方式
|
||||
'''
|
||||
for i in information["Thank"]:
|
||||
thankText += f"{i}\n"
|
||||
updateTime = "2022年08月17日"
|
||||
updateTime = "2022年08月22日"
|
||||
about = f'''<h1>关于</h1>
|
||||
<p>一个能让Linux用户更加方便运行Windows应用的程序,内置了对wine图形化的支持和各种Wine工具和自制Wine程序打包器、运行库安装工具等等</p>
|
||||
<p>同时也内置了基于VirtualBox制作的小白Windows虚拟机安装工具,可以做到只需要用户下载系统镜像并点击安装即可,无需顾及虚拟机安装、创建、虚拟机的分区等等</p>
|
||||
@ -1375,6 +1385,10 @@ except:
|
||||
# 读取主题
|
||||
# Qt 窗口
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
# 语言载入
|
||||
trans = QtCore.QTranslator()
|
||||
trans.load(f"{programPath}/LANG/deepin-wine-runner-en_US.qm")
|
||||
app.installTranslator(trans)
|
||||
window = QtWidgets.QMainWindow()
|
||||
widget = QtWidgets.QWidget()
|
||||
window.setCentralWidget(widget)
|
||||
@ -1390,25 +1404,25 @@ leftUp = QtWidgets.QWidget()
|
||||
mainLayout.addWidget(leftUp, 0, 0, 1, 1)
|
||||
leftUpLayout = QtWidgets.QGridLayout()
|
||||
leftUp.setLayout(leftUpLayout)
|
||||
fastLabel = QtWidgets.QLabel("快速启动")
|
||||
fastLabel = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "快速启动"))
|
||||
fastLabel.setStyleSheet("font: 30px;")
|
||||
leftUpLayout.addWidget(fastLabel, 0, 0, 1, 2)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel("<hr>"), 1, 0, 1, 2)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel("请选择容器路径:"), 2, 0, 1, 1)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择容器路径:")), 2, 0, 1, 1)
|
||||
e1 = QtWidgets.QComboBox()
|
||||
e1.setEditable(True)
|
||||
leftUpLayout.addWidget(e1, 3, 0, 1, 1)
|
||||
button1 = QtWidgets.QPushButton("浏览")
|
||||
button1.clicked.connect(liulanbutton)
|
||||
leftUpLayout.addWidget(button1, 3, 1, 1, 1)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel("请选择要执行的程序:"), 4, 0, 1, 1)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择要执行的程序:")), 4, 0, 1, 1)
|
||||
e2 = QtWidgets.QComboBox()
|
||||
e2.setEditable(True)
|
||||
leftUpLayout.addWidget(e2, 5, 0, 1, 1)
|
||||
button2 = QtWidgets.QPushButton("浏览")
|
||||
button2 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "浏览"))
|
||||
button2.clicked.connect(liulanexebutton)
|
||||
leftUpLayout.addWidget(button2, 5, 1, 1, 1)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel("请选择WINE版本:"), 6, 0, 1, 1)
|
||||
leftUpLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "请选择WINE版本:")), 6, 0, 1, 1)
|
||||
o1 = QtWidgets.QComboBox()
|
||||
leftUpLayout.addWidget(o1, 7, 0, 1, 1)
|
||||
# 设置空间权重
|
||||
@ -1420,58 +1434,58 @@ leftDown = QtWidgets.QWidget()
|
||||
mainLayout.addWidget(leftDown, 1, 0, 1, 1)
|
||||
leftDownLayout = QtWidgets.QVBoxLayout()
|
||||
leftDown.setLayout(leftDownLayout)
|
||||
highLabel = QtWidgets.QLabel("高级功能")
|
||||
highLabel = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "高级功能"))
|
||||
highLabel.setStyleSheet("font: 30px;")
|
||||
leftDownLayout.addWidget(highLabel)
|
||||
leftDownLayout.addWidget(QtWidgets.QLabel("<hr>"))
|
||||
leftDownLayout.addWidget(QtWidgets.QLabel("创建快捷方式(Desktop文件):"))
|
||||
leftDownLayout.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "创建快捷方式(Desktop文件):")))
|
||||
createDesktopLink = QtWidgets.QHBoxLayout()
|
||||
label_r_2 = QtWidgets.QLabel("名称:")
|
||||
label_r_2 = QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "名称:"))
|
||||
createDesktopLink.addWidget(label_r_2)
|
||||
combobox1 = QtWidgets.QComboBox()
|
||||
combobox1.setEditable(True)
|
||||
createDesktopLink.addWidget(combobox1)
|
||||
button5 = QtWidgets.QPushButton("创建到桌面")
|
||||
button5 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "创建到桌面"))
|
||||
button5.clicked.connect(make_desktop_on_desktop)
|
||||
createDesktopLink.addWidget(button5)
|
||||
saveDesktopFileOnLauncher = QtWidgets.QPushButton("创建到开始菜单")
|
||||
saveDesktopFileOnLauncher = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "创建到开始菜单"))
|
||||
saveDesktopFileOnLauncher.clicked.connect(make_desktop_on_launcher)
|
||||
createDesktopLink.addWidget(saveDesktopFileOnLauncher)
|
||||
leftDownLayout.addLayout(createDesktopLink)
|
||||
programManager = QtWidgets.QGridLayout()
|
||||
leftDownLayout.addLayout(programManager)
|
||||
programManager.addWidget(QtWidgets.QLabel("程序管理:"), 0, 0, 1, 1)
|
||||
getProgramIcon = QtWidgets.QPushButton("提取图标")
|
||||
programManager.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "程序管理:")), 0, 0, 1, 1)
|
||||
getProgramIcon = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "提取图标"))
|
||||
getProgramIcon.clicked.connect(lambda: RunWineProgram(f"{programPath}/BeCyIconGrabber.exe' 'z:/{e2.currentText()}"))
|
||||
programManager.addWidget(getProgramIcon, 1, 0, 1, 1)
|
||||
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 1, 1, 1)
|
||||
trasButton = QtWidgets.QPushButton("窗口透明工具")
|
||||
trasButton = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "窗口透明工具"))
|
||||
trasButton.clicked.connect(lambda: RunWineProgram(f"{programPath}/窗体透明度设置工具.exe"))
|
||||
programManager.addWidget(trasButton, 1, 2, 1, 1)
|
||||
uninstallProgram = QtWidgets.QPushButton("卸载程序")
|
||||
uninstallProgram = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "卸载程序"))
|
||||
uninstallProgram.clicked.connect(lambda: RunWineProgram(f"{programPath}/geek.exe"))
|
||||
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 3, 1, 1)
|
||||
programManager.addWidget(uninstallProgram, 1, 4, 1, 1)
|
||||
miniAppStore = QtWidgets.QPushButton("微型应用商店")
|
||||
miniAppStore = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "微型应用商店"))
|
||||
miniAppStore.clicked.connect(lambda: threading.Thread(target=MiniAppStore).start())
|
||||
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 5, 1, 1)
|
||||
programManager.addWidget(miniAppStore, 1, 6, 1, 1)
|
||||
programManager.addWidget(QtWidgets.QLabel(" "*5), 1, 7, 1, 1)
|
||||
getProgramStatus = QtWidgets.QPushButton("获取该程序运行情况")
|
||||
getProgramStatus = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "获取该程序运行情况"))
|
||||
getProgramStatus.clicked.connect(ProgramRunStatusShow.ShowWindow)
|
||||
programManager.addWidget(getProgramStatus, 1, 8, 1, 1)
|
||||
programManager.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum), 1, 9, 1, 1)
|
||||
programManager.addWidget(QtWidgets.QLabel("WINE配置:"), 2, 0, 1, 1)
|
||||
wineConfig = QtWidgets.QPushButton("配置容器")
|
||||
programManager.addWidget(QtWidgets.QLabel(QtCore.QCoreApplication.translate("U", "WINE配置:")), 2, 0, 1, 1)
|
||||
wineConfig = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "配置容器"))
|
||||
wineConfig.clicked.connect(lambda: RunWineProgram("winecfg"))
|
||||
programManager.addWidget(wineConfig, 3, 0, 1, 1)
|
||||
fontAppStore = QtWidgets.QPushButton("字体商店")
|
||||
fontAppStore = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "字体商店"))
|
||||
fontAppStore.clicked.connect(FontAppStore)
|
||||
programManager.addWidget(fontAppStore, 3, 2, 1, 1)
|
||||
button_r_6 = QtWidgets.QPushButton("安装自定义字体")
|
||||
button_r_6 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "安装自定义字体"))
|
||||
button_r_6.clicked.connect(OpenWineFontPath)
|
||||
programManager.addWidget(button_r_6, 3, 4, 1, 1)
|
||||
sparkWineSetting = QtWidgets.QPushButton("星火wine配置")
|
||||
sparkWineSetting = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "星火wine配置"))
|
||||
sparkWineSetting.clicked.connect(lambda: threading.Thread(target=os.system, args=["/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"]).start())
|
||||
programManager.addWidget(sparkWineSetting, 3, 6, 1, 1)
|
||||
# 权重
|
||||
@ -1488,7 +1502,7 @@ returnText.setStyleSheet("""
|
||||
background-color: black;
|
||||
color: white;
|
||||
""")
|
||||
returnText.setText("在此可以看到wine安装应用时的终端输出内容")
|
||||
returnText.setText(QtCore.QCoreApplication.translate("U", "在此可以看到wine安装应用时的终端输出内容"))
|
||||
mainLayout.setRowStretch(0, 2)
|
||||
mainLayout.setRowStretch(1, 1)
|
||||
mainLayout.setColumnStretch(0, 2)
|
||||
@ -1496,7 +1510,7 @@ mainLayout.setColumnStretch(1, 1)
|
||||
mainLayout.addWidget(returnText, 0, 1, 2, 1)
|
||||
|
||||
# 版权
|
||||
copy = QtWidgets.QLabel(f"""\n程序版本:{version}
|
||||
copy = QtWidgets.QLabel(f"""\n程序版本:{version},<b>提示:Wine 无法运行所有的 Windows 程序,如果想要运行更多可执行程序,可以考虑虚拟机和双系统</b><br>
|
||||
©2020~{time.strftime("%Y")} gfdgd xi、为什么您不喜欢熊出没和阿布呢""")
|
||||
mainLayout.addWidget(copy, 2, 0, 1, 1)
|
||||
|
||||
@ -1505,26 +1519,26 @@ programRun = QtWidgets.QWidget()
|
||||
programRunLayout = QtWidgets.QHBoxLayout()
|
||||
programRun.setLayout(programRunLayout)
|
||||
programRunLayout.addItem(QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum))
|
||||
button3 = QtWidgets.QPushButton("运行程序")
|
||||
button3 = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "运行程序"))
|
||||
button3.clicked.connect(runexebutton)
|
||||
programRunLayout.addWidget(button3)
|
||||
killProgram = QtWidgets.QPushButton("终止程序")
|
||||
killProgram = QtWidgets.QPushButton(QtCore.QCoreApplication.translate("U", "终止程序"))
|
||||
killProgram.clicked.connect(KillProgram)
|
||||
programRunLayout.addWidget(killProgram)
|
||||
mainLayout.addWidget(programRun, 2, 1, 1, 1)
|
||||
|
||||
# 菜单栏
|
||||
menu = window.menuBar()
|
||||
programmenu = menu.addMenu("程序(&P)")
|
||||
p1 = QtWidgets.QAction("安装 wine(&I)")
|
||||
installWineOnDeepin23 = QtWidgets.QAction("安装 wine(只限Deepin23)")
|
||||
installWineHQ = QtWidgets.QAction("安装 WineHQ")
|
||||
installMoreWine = QtWidgets.QAction("安装更多 Wine")
|
||||
p2 = QtWidgets.QAction("设置程序(&S)")
|
||||
p3 = QtWidgets.QAction("清空软件历史记录(&C)")
|
||||
cleanCache = QtWidgets.QAction("清空软件缓存")
|
||||
cleanProgramUnuse = QtWidgets.QAction("删除程序组件")
|
||||
p4 = QtWidgets.QAction("退出程序(&E)")
|
||||
programmenu = menu.addMenu(QtCore.QCoreApplication.translate("U", "程序(&P)"))
|
||||
p1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 wine(&I)"))
|
||||
installWineOnDeepin23 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 wine(只限Deepin23)"))
|
||||
installWineHQ = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 WineHQ"))
|
||||
installMoreWine = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装更多 Wine"))
|
||||
p2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置程序(&S)"))
|
||||
p3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "清空软件历史记录(&C)"))
|
||||
cleanCache = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "清空软件缓存"))
|
||||
cleanProgramUnuse = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "删除程序组件"))
|
||||
p4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "退出程序(&E)"))
|
||||
programmenu.addAction(p1)
|
||||
programmenu.addAction(installWineOnDeepin23)
|
||||
programmenu.addAction(installWineHQ)
|
||||
@ -1547,17 +1561,17 @@ cleanCache.triggered.connect(CleanProgramCache)
|
||||
cleanProgramUnuse.triggered.connect(CleanProgram)
|
||||
p4.triggered.connect(window.close)
|
||||
|
||||
wineOption = menu.addMenu("Wine(&W)")
|
||||
w1 = QtWidgets.QAction("打开 Wine 容器目录")
|
||||
w2 = QtWidgets.QAction("安装常见字体")
|
||||
w3 = QtWidgets.QAction("安装自定义字体")
|
||||
w4 = QtWidgets.QAction("删除选择的 Wine 容器")
|
||||
cleanBottonUOS = QtWidgets.QAction("清理 Wine 容器(基于 Wine 适配活动脚本)")
|
||||
w5 = QtWidgets.QAction("打包 wine 应用")
|
||||
w6 = QtWidgets.QAction("使用官方 Wine 适配活动的脚本进行打包")
|
||||
w7 = QtWidgets.QAction("从镜像获取DLL(只支持Windows XP、Windows Server 2003官方安装镜像)")
|
||||
updateGeek = QtWidgets.QAction("从 Geek Uninstaller 官网升级程序")
|
||||
deleteDesktopIcon = QtWidgets.QAction("删除所有 Wine 程序在启动器的快捷方式")
|
||||
wineOption = menu.addMenu(QtCore.QCoreApplication.translate("U", "Wine(&W)"))
|
||||
w1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开 Wine 容器目录"))
|
||||
w2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装常见字体"))
|
||||
w3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装自定义字体"))
|
||||
w4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "删除选择的 Wine 容器"))
|
||||
cleanBottonUOS = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "清理 Wine 容器(基于 Wine 适配活动脚本)"))
|
||||
w5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打包 wine 应用"))
|
||||
w6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用官方 Wine 适配活动的脚本进行打包"))
|
||||
w7 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "从镜像获取DLL(只支持Windows XP、Windows Server 2003官方安装镜像)"))
|
||||
updateGeek = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "从 Geek Uninstaller 官网升级程序"))
|
||||
deleteDesktopIcon = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "删除所有 Wine 程序在启动器的快捷方式"))
|
||||
wineOption.addAction(w1)
|
||||
wineOption.addAction(w2)
|
||||
wineOption.addAction(w3)
|
||||
@ -1571,26 +1585,26 @@ wineOption.addAction(w7)
|
||||
wineOption.addSeparator()
|
||||
wineOption.addAction(updateGeek)
|
||||
wineOption.addSeparator()
|
||||
wm1 = wineOption.addMenu("在指定 Wine、容器安装组件")
|
||||
wm1_1 = QtWidgets.QAction("在指定wine、指定容器安装 .net framework")
|
||||
wm1_2 = QtWidgets.QAction("在指定wine、指定容器安装 Visual Studio C++")
|
||||
wm1_3 = QtWidgets.QAction("在指定wine、指定容器安装 MSXML")
|
||||
wm1_4 = QtWidgets.QAction("在指定wine、指定容器安装 gecko")
|
||||
wm1_5 = QtWidgets.QAction("在指定wine、指定容器安装 mono")
|
||||
wm1_6 = QtWidgets.QAction("在指定wine、指定容器安装其它运行库")
|
||||
wm1 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器安装组件"))
|
||||
wm1_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 .net framework"))
|
||||
wm1_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 Visual Studio C++"))
|
||||
wm1_3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 MSXML"))
|
||||
wm1_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 gecko"))
|
||||
wm1_5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装 mono"))
|
||||
wm1_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "在指定wine、指定容器安装其它运行库"))
|
||||
wm1.addAction(wm1_1)
|
||||
wm1.addAction(wm1_2)
|
||||
wm1.addAction(wm1_3)
|
||||
wm1.addAction(wm1_4)
|
||||
wm1.addAction(wm1_5)
|
||||
wm1.addAction(wm1_6)
|
||||
wm2 = wineOption.addMenu("在指定 Wine、容器运行基础应用")
|
||||
wm2_1 = QtWidgets.QAction("打开指定wine、指定容器的控制面板")
|
||||
wm2_2 = QtWidgets.QAction("打开指定wine、指定容器的浏览器")
|
||||
wm2_3 = QtWidgets.QAction("打开指定wine、指定容器的注册表")
|
||||
wm2_4 = QtWidgets.QAction("打开指定wine、指定容器的任务管理器")
|
||||
wm2_5 = QtWidgets.QAction("打开指定wine、指定容器的资源管理器")
|
||||
wm2_6 = QtWidgets.QAction("打开指定wine、指定容器的关于 wine")
|
||||
wm2 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "在指定 Wine、容器运行基础应用"))
|
||||
wm2_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的控制面板"))
|
||||
wm2_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的浏览器"))
|
||||
wm2_3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的注册表"))
|
||||
wm2_4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的任务管理器"))
|
||||
wm2_5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的资源管理器"))
|
||||
wm2_6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "打开指定wine、指定容器的关于 wine"))
|
||||
wm2.addAction(wm2_1)
|
||||
wm2.addAction(wm2_2)
|
||||
wm2.addAction(wm2_3)
|
||||
@ -1598,29 +1612,29 @@ wm2.addAction(wm2_4)
|
||||
wm2.addAction(wm2_5)
|
||||
wm2.addAction(wm2_6)
|
||||
wineOption.addSeparator()
|
||||
w8 = QtWidgets.QAction("设置 run_v3.sh 的文管为 Deepin 默认文管")
|
||||
w9 = QtWidgets.QAction("设置 run_v3.sh 的文管为 Wine 默认文管")
|
||||
w10 = QtWidgets.QAction("重新安装 deepin-wine-helper")
|
||||
w11 = QtWidgets.QAction("使用winetricks打开指定容器")
|
||||
w8 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置 run_v3.sh 的文管为 Deepin 默认文管"))
|
||||
w9 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "设置 run_v3.sh 的文管为 Wine 默认文管"))
|
||||
w10 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "重新安装 deepin-wine-helper"))
|
||||
w11 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用winetricks打开指定容器"))
|
||||
wineOption.addAction(w8)
|
||||
wineOption.addAction(w9)
|
||||
wineOption.addAction(w10)
|
||||
wineOption.addSeparator()
|
||||
wineOption.addAction(w11)
|
||||
wineOption.addSeparator()
|
||||
wm3 = wineOption.addMenu("启用/禁用 opengl")
|
||||
wm3_1 = QtWidgets.QAction("开启 opengl")
|
||||
wm3_2 = QtWidgets.QAction("禁用 opengl")
|
||||
wm3 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "启用/禁用 opengl"))
|
||||
wm3_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "开启 opengl"))
|
||||
wm3_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "禁用 opengl"))
|
||||
wm3.addAction(wm3_1)
|
||||
wm3.addAction(wm3_2)
|
||||
wm4 = wineOption.addMenu("安装/卸载 winbind")
|
||||
wm4_1 = QtWidgets.QAction("安装 winbind")
|
||||
wm4_2 = QtWidgets.QAction("卸载 winbind")
|
||||
wm4 = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 winbind"))
|
||||
wm4_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 winbind"))
|
||||
wm4_2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 winbind"))
|
||||
wm4.addAction(wm4_1)
|
||||
wm4.addAction(wm4_2)
|
||||
dxvkMenu = wineOption.addMenu("安装/卸载 DXVK")
|
||||
installDxvk = QtWidgets.QAction("安装 DXVK")
|
||||
uninstallDxvk = QtWidgets.QAction("卸载 DXVK")
|
||||
dxvkMenu = wineOption.addMenu(QtCore.QCoreApplication.translate("U", "安装/卸载 DXVK"))
|
||||
installDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "安装 DXVK"))
|
||||
uninstallDxvk = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "卸载 DXVK"))
|
||||
dxvkMenu.addAction(installDxvk)
|
||||
dxvkMenu.addAction(uninstallDxvk)
|
||||
wineOption.addSeparator()
|
||||
@ -1658,15 +1672,15 @@ installDxvk.triggered.connect(InstallDXVK)
|
||||
uninstallDxvk.triggered.connect(UninstallDXVK)
|
||||
deleteDesktopIcon.triggered.connect(DeleteDesktopIcon)
|
||||
|
||||
virtualMachine = menu.addMenu("虚拟机(&V)")
|
||||
v1 = QtWidgets.QAction("使用 Virtualbox 虚拟机运行 Windows 应用")
|
||||
virtualMachine = menu.addMenu(QtCore.QCoreApplication.translate("U", "虚拟机(&V)"))
|
||||
v1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "使用 Virtualbox 虚拟机运行 Windows 应用"))
|
||||
virtualMachine.addAction(v1)
|
||||
v1.triggered.connect(RunVM)
|
||||
|
||||
safeWebsize = menu.addMenu("云沙箱(&C)")
|
||||
s1 = QtWidgets.QAction("360 沙箱云")
|
||||
s2 = QtWidgets.QAction("微步云沙箱")
|
||||
s3 = QtWidgets.QAction("VIRUSTOTAL")
|
||||
safeWebsize = menu.addMenu(QtCore.QCoreApplication.translate("U", "云沙箱(&C)"))
|
||||
s1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "360 沙箱云"))
|
||||
s2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "微步云沙箱"))
|
||||
s3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "VIRUSTOTAL"))
|
||||
safeWebsize.addAction(s1)
|
||||
safeWebsize.addAction(s2)
|
||||
safeWebsize.addAction(s3)
|
||||
@ -1674,15 +1688,15 @@ s1.triggered.connect(lambda: webbrowser.open_new_tab("https://ata.360.net/"))
|
||||
s2.triggered.connect(lambda: webbrowser.open_new_tab("https://s.threatbook.cn/"))
|
||||
s3.triggered.connect(lambda: webbrowser.open_new_tab("https://www.virustotal.com/"))
|
||||
|
||||
help = menu.addMenu("帮助(&H)")
|
||||
h1 = QtWidgets.QAction("程序官网")
|
||||
h2 = QtWidgets.QAction("小提示")
|
||||
h3 = QtWidgets.QAction("更新内容")
|
||||
h4 = QtWidgets.QAction("谢明名单")
|
||||
h5 = QtWidgets.QAction("更新这个程序")
|
||||
h6 = QtWidgets.QAction("反馈这个程序的建议和问题")
|
||||
h7 = QtWidgets.QAction("关于这个程序")
|
||||
h8 = QtWidgets.QAction("关于 Qt")
|
||||
help = menu.addMenu(QtCore.QCoreApplication.translate("U", "帮助(&H)"))
|
||||
h1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "程序官网"))
|
||||
h2 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "小提示"))
|
||||
h3 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "更新内容"))
|
||||
h4 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "谢明名单"))
|
||||
h5 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "更新这个程序"))
|
||||
h6 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "反馈这个程序的建议和问题"))
|
||||
h7 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "关于这个程序"))
|
||||
h8 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "关于 Qt"))
|
||||
help.addAction(h1)
|
||||
help.addSeparator()
|
||||
help.addAction(h2)
|
||||
@ -1694,8 +1708,8 @@ help.addAction(h6)
|
||||
help.addAction(h7)
|
||||
help.addAction(h8)
|
||||
help.addSeparator()
|
||||
hm1 = help.addMenu("更多生态适配应用")
|
||||
hm1_1 = QtWidgets.QAction("运行 Android 应用:UEngine 运行器")
|
||||
hm1 = help.addMenu(QtCore.QCoreApplication.translate("U", "更多生态适配应用"))
|
||||
hm1_1 = QtWidgets.QAction(QtCore.QCoreApplication.translate("U", "运行 Android 应用:UEngine 运行器"))
|
||||
hm1.addAction(hm1_1)
|
||||
h1.triggered.connect(OpenProgramURL)
|
||||
h2.triggered.connect(helps)
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"Version": "2.0.0-2"
|
||||
"Version": "2.0.1"
|
||||
}
|
||||
|
BIN
wine/installwine
Executable file → Normal file
BIN
wine/installwine
Executable file → Normal file
Binary file not shown.
BIN
wine/installwine.out
Executable file
BIN
wine/installwine.out
Executable file
Binary file not shown.
@ -1,18 +0,0 @@
|
||||
# 本来是用C++写的,但在非deepin/UOS编译/运行就是下载不了https文件,只能用python重写
|
||||
import sys
|
||||
import PyQt5.QtWidgets as QtWidgets
|
||||
|
||||
import mainwindowui
|
||||
|
||||
# 继承至界面文件的主窗口类
|
||||
class MyMainWindow(mainwindowui.Ui_MainWindow):
|
||||
def __init__(self, parent=None):
|
||||
#pass
|
||||
super(MyMainWindow, self).__init__(parent)
|
||||
#self.setupUi(self)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
window = MyMainWindow()
|
||||
window.show()
|
||||
app.exec_()
|
@ -1,258 +0,0 @@
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import requests
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(693, 404)
|
||||
self.centralWidget = QtWidgets.QWidget(MainWindow)
|
||||
self.centralWidget.setObjectName("centralWidget")
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.centralWidget)
|
||||
self.verticalLayout_2.setContentsMargins(11, 11, 11, 11)
|
||||
self.verticalLayout_2.setSpacing(6)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout_2.setSpacing(6)
|
||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||
self.localWineList = QtWidgets.QListView(self.centralWidget)
|
||||
self.localWineList.setObjectName("localWineList")
|
||||
self.horizontalLayout_2.addWidget(self.localWineList)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout()
|
||||
self.verticalLayout.setSpacing(6)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem)
|
||||
self.addButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.addButton.setObjectName("addButton")
|
||||
self.verticalLayout.addWidget(self.addButton)
|
||||
self.delButton = QtWidgets.QPushButton(self.centralWidget)
|
||||
self.delButton.setObjectName("delButton")
|
||||
self.verticalLayout.addWidget(self.delButton)
|
||||
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
||||
self.verticalLayout.addItem(spacerItem1)
|
||||
self.horizontalLayout_2.addLayout(self.verticalLayout)
|
||||
self.internetWineList = QtWidgets.QListView(self.centralWidget)
|
||||
self.internetWineList.setObjectName("internetWineList")
|
||||
self.horizontalLayout_2.addWidget(self.internetWineList)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout_2)
|
||||
self.horizontalLayout = QtWidgets.QHBoxLayout()
|
||||
self.horizontalLayout.setSpacing(6)
|
||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||
self.unzip = QtWidgets.QCheckBox(self.centralWidget)
|
||||
self.unzip.setObjectName("unzip")
|
||||
self.horizontalLayout.addWidget(self.unzip)
|
||||
self.deleteZip = QtWidgets.QCheckBox(self.centralWidget)
|
||||
self.deleteZip.setChecked(True)
|
||||
self.deleteZip.setTristate(False)
|
||||
self.deleteZip.setObjectName("deleteZip")
|
||||
self.horizontalLayout.addWidget(self.deleteZip)
|
||||
spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
||||
self.horizontalLayout.addItem(spacerItem2)
|
||||
self.verticalLayout_2.addLayout(self.horizontalLayout)
|
||||
MainWindow.setCentralWidget(self.centralWidget)
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "下载 Wine"))
|
||||
self.addButton.setText(_translate("MainWindow", "<<"))
|
||||
self.delButton.setText(_translate("MainWindow", ">>"))
|
||||
self.unzip.setText(_translate("MainWindow", "不解压Wine资源文件"))
|
||||
self.deleteZip.setText(_translate("MainWindow", "删除下载的资源包,只解压保留(两个选项都选相互抵消)"))
|
||||
|
||||
def ReadLocalInformation():
|
||||
global localJsonList
|
||||
file = open(f"{programPath}/winelist.json", "r")
|
||||
localJsonList = json.loads(file.read())
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in localJsonList:
|
||||
item = QtGui.QStandardItem(i)
|
||||
nmodel.appendRow(item)
|
||||
ui.localWineList.setModel(nmodel)
|
||||
file.close()
|
||||
|
||||
def ReadInternetInformation():
|
||||
global internetJsonList
|
||||
# C++ 版本是用 curl 的,考虑到 Python 用 requests 反而方便,于是不用 curl
|
||||
internetJsonList = json.loads(requests.get(f"{internetWineSource}/information.json").text)
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in internetJsonList:
|
||||
item = QtGui.QStandardItem(i[0])
|
||||
nmodel.appendRow(item)
|
||||
ui.internetWineList.setModel(nmodel)
|
||||
|
||||
class DownloadThread(QtCore.QThread):
|
||||
MessageBoxInfo = QtCore.pyqtSignal(str)
|
||||
MessageBoxError = QtCore.pyqtSignal(str)
|
||||
ChangeDialog = QtCore.pyqtSignal(QtWidgets.QProgressDialog, int, int, int)
|
||||
Finish = QtCore.pyqtSignal()
|
||||
def __init__(self, progressDialog: QtWidgets.QProgressDialog,
|
||||
url: str, savePath: str, fileName: str, view: QtWidgets.QListView, deleteZip: bool,
|
||||
unzip: bool, localList) -> None:
|
||||
self.dialog = progressDialog
|
||||
self.fileUrl = url
|
||||
self.fileSavePath = savePath
|
||||
self.fileSaveName = fileName
|
||||
self.localView = view
|
||||
self.downloadDeleteZip = deleteZip
|
||||
self.downloadUnzip = unzip
|
||||
self.localJsonList = localList
|
||||
super().__init__()
|
||||
|
||||
def ReadLocalInformation(self):
|
||||
file = open(f"{programPath}/winelist.json", "r");
|
||||
nmodel = QtGui.QStandardItemModel()
|
||||
localJsonList = json.loads(file.read())
|
||||
for i in localJsonList:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i))
|
||||
self.localView.setModel(nmodel)
|
||||
file.close()
|
||||
|
||||
def run(self):
|
||||
# 创建文件夹
|
||||
dir = QtCore.QDir()
|
||||
savePath = f"{programPath}/{self.fileSaveName}"
|
||||
# 文件下载
|
||||
timeout = 0
|
||||
f = requests.get(self.fileUrl, stream=True)
|
||||
allSize = int(f.headers["content-length"]) # 文件总大小
|
||||
bytesRead = 0
|
||||
with open(savePath, "wb") as filePart:
|
||||
for chunk in f.iter_content(chunk_size=1024):
|
||||
if chunk:
|
||||
#progressbar.update(int(part / show))
|
||||
filePart.write(chunk)
|
||||
bytesRead += 1024
|
||||
self.ChangeDialog.emit(self.dialog, bytesRead / allSize * 100, bytesRead / 1024 / 1024, allSize / 1024 / 1024)
|
||||
# 写入配置文件
|
||||
rfile = open(f"{programPath}/winelist.json", "r")
|
||||
list = json.loads(rfile.read())
|
||||
rfile.close()
|
||||
# C++ 版注释:不直接用 readwrite 是因为不能覆盖写入
|
||||
file = open(f"{programPath}/winelist.json", "w")
|
||||
list.append(self.fileSaveName.replace(".7z", ""))
|
||||
file.write(json.dumps(list))
|
||||
file.close()
|
||||
# 读取配置文件
|
||||
self.ReadLocalInformation()
|
||||
self.localJsonList = list
|
||||
# 解压文件
|
||||
shellCommand = ""
|
||||
if self.downloadUnzip:
|
||||
path = f"{programPath}/{self.fileSaveName.replace('.7z', '')}"
|
||||
shellCommand += f"""mkdir -p \"{path}\"
|
||||
7z x \"{savePath}\" -o\"{path}\"
|
||||
"""
|
||||
if self.downloadDeleteZip:
|
||||
shellCommand += f"rm -rf \"{savePath}\"\n"
|
||||
shellFile = open("/tmp/depein-wine-runner-wine-install.sh", "w")
|
||||
shellFile.write(shellCommand)
|
||||
shellFile.close()
|
||||
process = QtCore.QProcess()
|
||||
command = ["deepin-terminal", "-e", "bash", "/tmp/depein-wine-runner-wine-install.sh"]
|
||||
process.start(f"{programPath}/../launch.sh", command)
|
||||
process.waitForFinished()
|
||||
self.Finish.emit()
|
||||
|
||||
|
||||
def MessageBoxInfo(info):
|
||||
QtWidgets.QMessageBox.information(window, "提示", info)
|
||||
|
||||
def MessageBoxError(info):
|
||||
QtWidgets.QMessageBox.critical(window, "错误", info)
|
||||
|
||||
def ChangeDialog(dialog: QtWidgets.QProgressDialog, value, downloadBytes, totalBytes):
|
||||
dialog.setValue(value)
|
||||
dialog.setLabelText(f"{downloadBytes}MB/{totalBytes}MB")
|
||||
|
||||
def DownloadFinish():
|
||||
ui.centralWidget.setEnabled(True)
|
||||
|
||||
class QT:
|
||||
thread = None
|
||||
|
||||
def on_addButton_clicked():
|
||||
choose = ui.internetWineList.currentIndex().row()
|
||||
if choose < 0:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您未选中任何项,无法继续")
|
||||
return
|
||||
downloadName = internetJsonList[choose][1]
|
||||
ReadLocalInformation()
|
||||
for i in localJsonList:
|
||||
if i == internetJsonList[choose][0]:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您已经安装了这个Wine了!无需重复安装!")
|
||||
return
|
||||
if(ui.deleteZip.isChecked() + ui.unzip.isChecked() == 2):
|
||||
ui.deleteZip.setChecked(False)
|
||||
ui.unzip.setChecked(False)
|
||||
downloadUrl = internetWineSource + downloadName
|
||||
dialog = QtWidgets.QProgressDialog()
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.setDisabled(True)
|
||||
dialog.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||
dialog.setCancelButton(cancel)
|
||||
dialog.setWindowTitle(f"正在下载“{internetJsonList[choose][0]}”")
|
||||
QT.thread = DownloadThread(
|
||||
dialog,
|
||||
downloadUrl,
|
||||
"",
|
||||
internetJsonList[choose][1],
|
||||
ui.localWineList,
|
||||
ui.deleteZip.isChecked(),
|
||||
not ui.unzip.isChecked(),
|
||||
localJsonList
|
||||
)
|
||||
QT.thread.MessageBoxInfo.connect(MessageBoxInfo)
|
||||
QT.thread.MessageBoxError.connect(MessageBoxError)
|
||||
QT.thread.ChangeDialog.connect(ChangeDialog)
|
||||
QT.thread.Finish.connect(DownloadFinish)
|
||||
ui.centralWidget.setDisabled(True)
|
||||
QT.thread.start()
|
||||
|
||||
def on_delButton_clicked():
|
||||
if QtWidgets.QMessageBox.question(window, "提示", "你确定要删除吗?") == QtWidgets.QMessageBox.No:
|
||||
return
|
||||
if ui.localWineList.currentIndex().row() < 0:
|
||||
QtWidgets.QMessageBox.information(window, "提示", "您未选择任何项")
|
||||
return
|
||||
name = f"{programPath}/{localJsonList[ui.localWineList.currentIndex().row()]}"
|
||||
dir = QtCore.QDir(name)
|
||||
dir.removeRecursively()
|
||||
QtCore.QFile.remove(name + ".7z")
|
||||
del localJsonList[ui.localWineList.currentIndex().row()]
|
||||
file = open(f"{programPath}/winelist.json", "w")
|
||||
file.write(json.dumps(localJsonList))
|
||||
file.close()
|
||||
ReadLocalInformation()
|
||||
QtWidgets.QMessageBox.information(window, "提示", "删除成功!")
|
||||
|
||||
if __name__ == "__main__":
|
||||
localJsonList = []
|
||||
internetJsonList = []
|
||||
internetWineSource = "https://code.gitlink.org.cn/gfdgd_xi/wine-mirrors/raw/branch/master/"
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
# 窗口构建
|
||||
window = QtWidgets.QMainWindow()
|
||||
ui = Ui_MainWindow()
|
||||
ui.setupUi(window)
|
||||
window.show()
|
||||
# 连接信号
|
||||
ui.addButton.clicked.connect(on_addButton_clicked)
|
||||
ui.delButton.clicked.connect(on_delButton_clicked)
|
||||
## 加载内容
|
||||
# 设置列表双击不会编辑
|
||||
ui.localWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
ui.internetWineList.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
|
||||
# 读取信息
|
||||
ReadLocalInformation()
|
||||
ReadInternetInformation()
|
||||
# 图标
|
||||
ui.centralWidget.setWindowIcon(QtGui.QIcon(f"{programPath}/../deepin-wine-runner.svg"))
|
||||
|
||||
app.exec_()
|
Loading…
Reference in New Issue
Block a user