mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-12-15 03:22:04 +08:00
Compare commits
140 Commits
3.2.1alpha
...
3.3.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 881ff84efd | |||
| 38fed35de8 | |||
| 60836b448f | |||
| 89627200ad | |||
| 40de39fd19 | |||
| 16386b8557 | |||
| c1dc157c71 | |||
| 851105e7bd | |||
| 45594618f8 | |||
|
|
0960218c64 | ||
| 6d4dc4d7d9 | |||
| 995aad5273 | |||
| 851bf9fcc6 | |||
| 00da7fc010 | |||
| 9fd8f5144f | |||
| b31c4bf134 | |||
| 66ace92775 | |||
| 74e82aca00 | |||
| e175a80e57 | |||
| 27cd65a48f | |||
| a5cb1f81f8 | |||
| 2fb32f84d7 | |||
| 6c6b5ff67e | |||
| d3790780dd | |||
| 00245232bf | |||
| 5cb05e9956 | |||
| 72208fd378 | |||
| f63cdff0aa | |||
| 6c43ce51b4 | |||
| a85a7aeb0c | |||
| 70014b29ef | |||
| 808471c330 | |||
| cf0be8a2f1 | |||
| fffb56c098 | |||
| 2dab9ef7ce | |||
|
|
1964dfc866 | ||
|
|
efd22ba3a6 | ||
|
|
2a9ece428a | ||
| adf35abfc7 | |||
| 6ef513d6f5 | |||
| 550827f97c | |||
| 29f42c95b4 | |||
| ee68f6e26a | |||
| aff9996515 | |||
| 075478029d | |||
| f766e8577c | |||
| 08191c17ed | |||
| 7665dbe6d9 | |||
| 7711c186fd | |||
| 93d41ac3e2 | |||
| 59ec3d5822 | |||
| a5d1a04573 | |||
| e434aa9116 | |||
| dc789132d3 | |||
| 9b5beadbcc | |||
| 635171998d | |||
| b757d09901 | |||
| 84f0eefc27 | |||
| f9cac7619c | |||
| 8ae5efe50c | |||
| 58798dd0c6 | |||
| fdced1f2c3 | |||
| aaa5b724e4 | |||
| bbff9aa85f | |||
| 4a469f2a82 | |||
| 58400ed5ff | |||
| 2de9de6633 | |||
| eba3d9f728 | |||
| d8dce3b62c | |||
| 81f49ae83c | |||
| 160d2ecf9d | |||
| d31be64151 | |||
| 77ec7ff2bf | |||
| 6201ec2ed6 | |||
| ed344e7a6c | |||
| ed61089844 | |||
| e3435ad29a | |||
| 0e705a955a | |||
| 77d91f31b2 | |||
| c0b7c99c43 | |||
| cfbffc1a68 | |||
| 490b6ce28d | |||
| 75ae205cbf | |||
| ee49a4aec1 | |||
| 364983ac5b | |||
| ef375f32b9 | |||
| 4ff2d0815d | |||
| 8df919cadb | |||
| 89b812e6a6 | |||
| 803eb09b5a | |||
| 6397130bb2 | |||
| 8a4a5f4ee3 | |||
| 3529dc1503 | |||
| 09eb12d750 | |||
| bf95889b93 | |||
| 76d3fd556e | |||
| 45befa142f | |||
| 9785ad98fc | |||
| 201328afea | |||
| 4d10470776 | |||
| 85895b5ae2 | |||
| b785779d8a | |||
| b1b07d482b | |||
| 137193c993 | |||
| 9e9f2e2732 | |||
| 95ddbb7246 | |||
| b1142664ac | |||
| 97f85bc640 | |||
| 7d80d24ff6 | |||
| 64e1c56c8e | |||
| e9d8bc1ee3 | |||
| d10beed003 | |||
| 1f4e209f6c | |||
|
|
f54e589e3d | ||
| 6dd18d9e8f | |||
| 0360eaf5e0 | |||
| d00baaf2ce | |||
| e0a977b7ea | |||
| 787de003e3 | |||
| b7dfe86710 | |||
| ee16593767 | |||
| c64b5670d9 | |||
| 1bfb04e588 | |||
| 03dbe8d6ef | |||
| 1d2f8a46f2 | |||
| d554a8c5da | |||
| cbb81c6261 | |||
| 95e7d42a52 | |||
| 07f0c4eb2d | |||
| 466a7c5596 | |||
| 5443654791 | |||
| 0d3e798644 | |||
| 73551e9a12 | |||
| e755cea8f1 | |||
| fb653fe6ec | |||
| 044bc860ef | |||
| fd8e74d05f | |||
| d2929f83c6 | |||
| 53836dac4d | |||
| 321a840b7d |
30
.github/workflows/auto-building.yml
vendored
Normal file
30
.github/workflows/auto-building.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: Auto Building Wine Runner
|
||||
run-name: ${{ github.actor }} Auto Building Wine Runner 🚀
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
Explore-GitHub-Actions:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Building DEB
|
||||
env:
|
||||
GUSER: ${{ secrets.GUSER }}
|
||||
PASSWORD: ${{ secrets.PASSWORD }}
|
||||
UPLOADURL: ${{ secrets.UPLOADURL }}
|
||||
run: |
|
||||
# 配置环境
|
||||
sudo apt update
|
||||
sudo apt install git dpkg-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qt5-qmake -y
|
||||
git clone https://github.com/gfdgd-xi/deep-wine-runner
|
||||
cd deep-wine-runner
|
||||
make build
|
||||
mv spark-deepin-wine-runner.deb ~
|
||||
- name: upload result
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: spark-deepin-wine-runner.deb
|
||||
path: /home/runner/spark-deepin-wine-runner.deb
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.4.0
|
||||
# 更新时间:2022年10月15日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
|
||||
21
AddWineDebMirrorForDeepin20.sh
Executable file
21
AddWineDebMirrorForDeepin20.sh
Executable file
@@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
echo 网址:http://deb.wine.wine-runner.gfdgdxi.top/
|
||||
if [[ ! -f /etc/apt/sources.list.d/gfdgdxi-list-winehq.list ]]; then
|
||||
echo 未添加源,现在开始添加!
|
||||
sudo apt update
|
||||
sudo apt install wget gpg
|
||||
if [[ -f /tmp/github.sh ]]; then
|
||||
rm -v /tmp/github.sh
|
||||
fi
|
||||
cd /tmp
|
||||
wget http://deb.wine.wine-runner.gfdgdxi.top/sources/github.sh
|
||||
bash github.sh
|
||||
rm github.sh
|
||||
echo 添加完成,现在安装 Wine!
|
||||
else
|
||||
echo 已添加源,忽略,现在安装 Wine!
|
||||
sudo apt update
|
||||
fi
|
||||
sudo apt install winehq-devel -y
|
||||
echo 安装完成,按回车键退出!
|
||||
read
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:1.8.0
|
||||
# 更新时间:2022年08月01日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -35,7 +35,7 @@ def CleanTerminal():
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装指定应用")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.4.0
|
||||
# 更新时间:2022年10月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -29,9 +29,9 @@ except:
|
||||
webeng = False
|
||||
|
||||
urlSourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto", # Gitlink 源
|
||||
"http://www.gfdgdxi.top/deep-wine-runner-auto-configuration-script/", # Github 源
|
||||
"https://gitee.com/gfdgd-xi/deep-wine-runner-auto-configuration-script/raw/master/", # Gitee 源
|
||||
"https://gfdgd-xi.github.io/deep-wine-runner-auto-configuration-script/", # Github 源
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto", # Gitlink 源
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/auto/", # 备用源1,纯 IPv6 源
|
||||
"http://gfdgdxi.free.idcfengye.com/deep-wine-runner-auto-configuration-script/", # 备用源2
|
||||
"http://gfdgdxi.free.idcfengye.com/wine-runner-list/auto/", # 备用源 3
|
||||
@@ -139,7 +139,7 @@ class InformationWindow():
|
||||
about = f"<h1>关于“{choose}”的介绍</h1>\n<p>暂无此程序的介绍</p>"
|
||||
try:
|
||||
import requests as r
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
fenlists = requests.get("http://data.download.gfdgdxi.top/BashAppFen/" + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8"), timeout=1000).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
fenlists = [0, 0, 0, 0, 0]
|
||||
@@ -159,19 +159,19 @@ class InformationWindow():
|
||||
if maxHead > 5:
|
||||
for i in range(end):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/BadStar.svg' width=50>\n"
|
||||
starHtml += f"<img src='http://wine-runner.gfdgdxi.top/BadStar.svg' width=50>\n"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/BadStar.svg' width=50>\n"
|
||||
else:
|
||||
for i in range(maxHead):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/Star.svg' width=50>\n"
|
||||
starHtml += f"<img src='http://wine-runner.gfdgdxi.top/Star.svg' width=50>\n"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/Star.svg' width=50>\n"
|
||||
head = maxHead
|
||||
for i in range(head, end):
|
||||
if webeng:
|
||||
starHtml += f"<img src='https://code.gitlink.org.cn/gfdgd_xi/deep-wine-runner/raw/branch/main/Icon/UnStar.svg' width=50>"
|
||||
starHtml += f"<img src='http://wine-runner.gfdgdxi.top/UnStar.svg' width=50>"
|
||||
else:
|
||||
starHtml += f"<img src='{programPath}/Icon/UnStar.svg' width=50>"
|
||||
about += f"\n<hr/><h1>评分情况</h1>\n<p align='center'>{starHtml}</p>\n<p align='center'>{tipsInfo}</p>"
|
||||
@@ -253,7 +253,7 @@ class ProgramRunStatusShow():
|
||||
fileName = i[1]
|
||||
break
|
||||
try:
|
||||
fenlists = requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Jhc2hBcHBGZW4v").decode("utf-8") + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
fenlists = requests.get("http://data.download.gfdgdxi.top/BashAppFen/" + urllib.request.quote(fileName) + base64.b64decode("L2FsbC5qc29u").decode("utf-8")).json()
|
||||
tipsInfo = ""
|
||||
except:
|
||||
#traceback.print_exc()
|
||||
@@ -311,7 +311,7 @@ class ProgramRunStatusShow():
|
||||
else:
|
||||
# 显示最新的3条评论
|
||||
try:
|
||||
all = int(requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/data.txt").text)
|
||||
all = int(requests.get(f"http://bashpinlun.gfdgdxi.top/{urllib.request.quote(fileName)}/data.txt").text)
|
||||
now = all - 3
|
||||
print(all)
|
||||
if all < 3:
|
||||
@@ -322,7 +322,7 @@ class ProgramRunStatusShow():
|
||||
uploadList = []
|
||||
for i in range(all - 1, start - 1, -1):
|
||||
print(f"第 {i + 1} 条评论:")
|
||||
info = requests.get(f"{base64.b64decode('aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy9iYXNocGlubHVuL3Jhdy9icmFuY2gvbWFzdGVyLw==').decode('utf-8')}{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
info = requests.get(f"http://bashpinlun.gfdgdxi.top/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
print(info)
|
||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||
Add(uploadList)
|
||||
@@ -379,7 +379,7 @@ def UpdateFen():
|
||||
uploadList = []
|
||||
for i in range(now + 2, now - 1, -1):
|
||||
print(f"第 {i + 1} 条评论:")
|
||||
info = requests.get(f"https://code.gitlink.org.cn/gfdgd-xi/bashpinlun/raw/branch/master/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
info = requests.get(f"http://bashpinlun.gfdgdxi.top/{urllib.request.quote(fileName)}/pf-{i}.txt").text.strip()
|
||||
print(info)
|
||||
uploadList.append([f"用户{i + 1}", i + 1, info])
|
||||
#ProgramRunStatusShow.pingLunLayout.removeItem(ProgramRunStatusShow.pingLunLayout.itemAt(2))
|
||||
@@ -516,7 +516,7 @@ def readtxt(path):
|
||||
|
||||
def ChangeSources():
|
||||
global urlSources
|
||||
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
|
||||
sources = [ui.actionGitee, ui.actionGithub, ui.actionGitlink, ui.action_IPv6, ui.action_2, ui.action_3, ui.action]
|
||||
for i in range(0, len(sources)):
|
||||
if sources[i].isChecked():
|
||||
urlSources = urlSourcesList[i]
|
||||
@@ -557,9 +557,10 @@ if __name__ == "__main__":
|
||||
window.show()
|
||||
#ui.actionGitlink.setExclusive(True)
|
||||
sourcesGroup = QtWidgets.QActionGroup(window)
|
||||
sourcesGroup.addAction(ui.actionGitlink)
|
||||
|
||||
sourcesGroup.addAction(ui.actionGitee)
|
||||
sourcesGroup.addAction(ui.actionGithub)
|
||||
sourcesGroup.addAction(ui.actionGitlink)
|
||||
sourcesGroup.addAction(ui.action_IPv6)
|
||||
sourcesGroup.addAction(ui.action_2)
|
||||
sourcesGroup.addAction(ui.action_3)
|
||||
|
||||
@@ -24,8 +24,8 @@ programEnv = [
|
||||
["PROGRAMPATH", programPath],
|
||||
["VERSION", version],
|
||||
["THANK", thankText.replace("\n", "\\n")],
|
||||
["MAKER", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["MAKER", "gfdgd xi"],
|
||||
["COPYRIGHT", f"©2020~{time.strftime('%Y')} gfdgd xi"],
|
||||
["PLATFORM", platform.system()],
|
||||
["DEBUG", str(int("--debug" in sys.argv))]
|
||||
]
|
||||
@@ -37,8 +37,8 @@ programEnv = [
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($MAKER)", "gfdgd xi"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi"],
|
||||
["?", "0"],
|
||||
["PLATFORM)", platform.system()],
|
||||
["DEBUG)", str(int("--debug" in sys.argv))]
|
||||
@@ -61,7 +61,7 @@ commandEnv += f"PATH=\"{programPath}/command:$PATH\" "
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境(基于 Bash)")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi")
|
||||
print("--------------------------------------------------------------")
|
||||
os.system(f"{commandEnv} bash ")
|
||||
exit()
|
||||
@@ -70,6 +70,6 @@ for i in sys.argv[1:]:
|
||||
command += f"\"{i}\" "
|
||||
print("Wine 运行器自动配置文件解析器(基于 Bash)")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi")
|
||||
print("--------------------------------------------------------------")
|
||||
os.system(f"{commandEnv} bash {command}")
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.5.0
|
||||
# 更新时间:2022年11月18日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env deepin-wine-runner-auto-install-bash
|
||||
# 使用 Wine 运行器的语言解析器
|
||||
##########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 更新时间:2022年11月19日
|
||||
##########################################################################################
|
||||
# 用于判断是否为 bash 解释器
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env deepin-wine-runner-auto-install-bash
|
||||
# 使用 Wine 运行器的语言解析器
|
||||
##########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 更新时间:2022年11月03日
|
||||
##########################################################################################
|
||||
# 用于判断是否为 bash 解释器
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env deepin-wine-runner-auto-install-bash
|
||||
# 使用 Wine 运行器的语言解析器
|
||||
##########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 更新时间:2022年11月19日
|
||||
##########################################################################################
|
||||
# 用于判断是否为 bash 解释器
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:3.0.1
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -43,8 +43,8 @@ programEnv = [
|
||||
["($PROGRAMPATH)", programPath],
|
||||
["($VERSION)", version],
|
||||
["($THANK)", thankText],
|
||||
["($MAKER)", "RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢"],
|
||||
["($MAKER)", "gfdgd xi"],
|
||||
["($COPYRIGHT)", f"©2020~{time.strftime('%Y')} gfdgd xi"],
|
||||
["($?)", "0"],
|
||||
["($PLATFORM)", platform.system()],
|
||||
["($DEBUG)", "1"]
|
||||
@@ -301,7 +301,7 @@ class Command():
|
||||
|
||||
def Version(self):
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi")
|
||||
return 0
|
||||
|
||||
def Pause(self) -> int:
|
||||
@@ -650,7 +650,7 @@ if __name__ == "__main__":
|
||||
if len(sys.argv) - optionAll < 2:
|
||||
print("Wine 运行器自动配置文件解析器交互环境")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} RacoonGX 团队,By gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} By gfdgd xi")
|
||||
print("--------------------------------------------------------------")
|
||||
while True:
|
||||
commandLine = input(">")
|
||||
@@ -669,7 +669,7 @@ if __name__ == "__main__":
|
||||
sys.exit(1)
|
||||
print("Wine 运行器自动配置文件解析器")
|
||||
print(f"版本:{version}")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print(f"©2020~{time.strftime('%Y')} gfdgd xi")
|
||||
print("--------------------------------------------------------------")
|
||||
com.Run(com.GetCommandList(), programEnv[0][1], programEnv[1][1])
|
||||
sys.exit(int(programEnv[9][1]))
|
||||
47
InstallBox86-cn.sh
Executable file
47
InstallBox86-cn.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
if [[ `whoami` != root ]]; then
|
||||
echo 请以 root 权限运行
|
||||
echo 按任意键退出
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
PCArch=`dpkg --print-architecture`
|
||||
if [[ $PCArch != "aarch64" ]] && [[ $PCArch != "arm64" ]]; then
|
||||
echo 非 ARM 架构,无法继续
|
||||
echo 按任意键退出
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
which box86
|
||||
if [[ $? == 0 ]]; then
|
||||
echo 已安装,结束
|
||||
echo 按回车键退出
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
echo 使用国内源
|
||||
#sudo wget https://ryanfortner.github.io/box86-debs/box86.list -O /etc/apt/sources.list.d/box86.list
|
||||
sudo bash -c "echo deb http://jihulab.com/gfdgd-xi/box86-debs/-/raw/master/debian ./ > /etc/apt/sources.list.d/box86.list"
|
||||
wget -qO- http://jihulab.com/gfdgd-xi/box86-debs/-/raw/master/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg
|
||||
echo "adding key..."
|
||||
installBox=box86-generic-arm
|
||||
if [[ $PCArch == "arm64" ]]; then
|
||||
sudo bash -c "echo deb http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box64-debs/debian ./ > /etc/apt/sources.list.d/box64.list"
|
||||
wget -qO- http://seafile.jyx2048.com:2345/spark-deepin-wine-runner/data/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
|
||||
installBox="box86-generic-arm box64-generic-arm libc6:armhf"
|
||||
sudo dpkg --add-architecture armhf
|
||||
fi
|
||||
echo " + sudo apt update"
|
||||
sudo apt update
|
||||
sudo apt install binfmt-support -y
|
||||
echo apt 源添加完毕!按回车键继续安装 Box86/Box64,若想要停止安装,则请按 Ctrl+C 或按终端右上角 ×(叉叉)退出
|
||||
echo 按回车键后将会自动安装包名为 box86-generic-arm、box64-generic-arm(box64 要在 aarch64 系统才可安装)的 Box86/Box64 包(适用于通用 ARM 系统)
|
||||
echo 其他特殊版本及其包名可见如下链接(如适用于 rk3399 的版本):
|
||||
echo " - Box64:https://github.com/ryanfortner/box64-debs/"
|
||||
echo " - Box86:https://github.com/ryanfortner/box86-debs/"
|
||||
echo " - Box64(国内镜像):https://jihulab.com/gfdgd-xi/box64-debs"
|
||||
echo " - Box64(国内镜像):https://jihulab.com/gfdgd-xi/box86-debs"
|
||||
read
|
||||
sudo apt install -y $installBox
|
||||
echo 安装完成!按回车键退出
|
||||
read
|
||||
@@ -19,17 +19,29 @@ if [[ $? == 0 ]]; then
|
||||
read
|
||||
exit 1
|
||||
fi
|
||||
#sudo wget https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list
|
||||
echo deb https://code.gitlink.org.cn/gfdgd_xi/weekly-box86-debs/raw/branch/main/debian / > /etc/apt/sources.list.d/box86.list
|
||||
echo 使用 Github 源
|
||||
#sudo wget https://ryanfortner.github.io/box86-debs/box86.list -O /etc/apt/sources.list.d/box86.list
|
||||
sudo wget https://ryanfortner.github.io/box86-debs/box86.list -O /etc/apt/sources.list.d/box86.list
|
||||
wget -qO- https://ryanfortner.github.io/box86-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg
|
||||
echo "adding key..."
|
||||
wget -qO- https://code.gitlink.org.cn/gfdgd_xi/weekly-box86-debs/raw/branch/main/debian/KEY.gpg | sudo apt-key add -
|
||||
installBox=box86
|
||||
installBox=box86-generic-arm
|
||||
if [[ $PCArch == "arm64" ]]; then
|
||||
installBox="box86 box64"
|
||||
sudo wget https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list
|
||||
wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg
|
||||
installBox="box86-generic-arm box64-generic-arm"
|
||||
sudo dpkg --add-architecture armhf
|
||||
fi
|
||||
echo " + sudo apt update"
|
||||
sudo apt update
|
||||
sudo apt install binfmt-support -y
|
||||
echo apt 源添加完毕!按回车键继续安装 Box86/Box64,若想要停止安装,则请按 Ctrl+C 或按终端右上角 ×(叉叉)退出
|
||||
echo 按回车键后将会自动安装包名为 box86-generic-arm、box64-generic-arm(box64 要在 aarch64 系统才可安装)的 Box86/Box64 包(适用于通用 ARM 系统)
|
||||
echo 其他特殊版本及其包名可见如下链接(如适用于 rk3399 的版本):
|
||||
echo " - Box64:https://github.com/ryanfortner/box64-debs/"
|
||||
echo " - Box86:https://github.com/ryanfortner/box86-debs/"
|
||||
echo " - Box64(国内镜像):https://jihulab.com/gfdgd-xi/box64-debs"
|
||||
echo " - Box64(国内镜像):https://jihulab.com/gfdgd-xi/box86-debs"
|
||||
read
|
||||
sudo apt install -y $installBox
|
||||
echo 安装完成!按回车键退出
|
||||
read
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -23,6 +23,7 @@ def exit():
|
||||
sys.exit()
|
||||
# 获取云列表
|
||||
sourcesList = [
|
||||
"http://dll.wine-runner.gfdgdxi.top",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/dlls",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/dlls"
|
||||
]
|
||||
@@ -31,7 +32,8 @@ print("获取列表中……", end="")
|
||||
try:
|
||||
lists = json.loads(requests.get(f"{url}/list.json").text)
|
||||
except:
|
||||
print("\r列表获取失败!")
|
||||
print("\r列表获取失败!按回车键退出")
|
||||
input()
|
||||
exit()
|
||||
print("\r列表获取成功!")
|
||||
|
||||
@@ -63,7 +65,7 @@ def exit():
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装指定应用")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -18,26 +18,66 @@ import updatekiller
|
||||
import req as requests
|
||||
homePath = os.path.expanduser('~')
|
||||
try:
|
||||
sources = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/fonts/list.json",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/fonts/list.json"
|
||||
sourcesList = [
|
||||
"http://fonts.wine-runner.gfdgdxi.top/list.json",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/fonts/list.json"
|
||||
]
|
||||
fontList = json.loads(requests.get(sources[0]).text)
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
fontList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
fontList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
fontList = [
|
||||
["fake_simsun.ttc", "https://gitlink.org.cn/api/attachments/392168", "simsun.ttc", "fake_simsun.ttc(会替换容器内的宋体,且与 deepin 有问题)"],
|
||||
["simsun.ttc", "https://gitlink.org.cn/api/attachments/392181", "simsun.ttc", "simsun.ttc"],
|
||||
["simsunb.ttf", "https://gitlink.org.cn/api/attachments/392180", "simsunb.ttf", "simsunb.ttf"],
|
||||
["msyh.ttc", "https://gitlink.org.cn/api/attachments/392182", "msyh.ttc", "msyh.ttc"],
|
||||
["msyhl.ttc", "https://gitlink.org.cn/api/attachments/392184", "msyhl.ttc", "msyhl.ttc"],
|
||||
["msyhbd.ttc", "https://gitlink.org.cn/api/attachments/392183", "msyhbd.ttc", "msyhbd.ttc"]
|
||||
[
|
||||
"fake_simsun.ttc",
|
||||
"http://fonts.wine-runner.gfdgdxi.top/fake_simsun.ttc",
|
||||
"simsun.ttc",
|
||||
"fake_simsun.ttc(会替换容器内的宋体)"
|
||||
],
|
||||
[
|
||||
"simsun.ttc",
|
||||
"http://fonts.wine-runner.gfdgdxi.top/simsun.ttc",
|
||||
"simsun.ttc",
|
||||
"simsun.ttc"
|
||||
],
|
||||
[
|
||||
"simsunb.ttf",
|
||||
"http://fonts.wine-runner.gfdgdxi.top/simsunb.ttf",
|
||||
"simsunb.ttf",
|
||||
"simsunb.ttf"
|
||||
],
|
||||
[
|
||||
"msyh.ttc",
|
||||
"http://fonts.wine-runner.gfdgdxi.top/msyh.ttc",
|
||||
"msyh.ttc",
|
||||
"msyh.ttc"
|
||||
],
|
||||
[
|
||||
"msyhl.ttc",
|
||||
"http://fonts.wine-runner.gfdgdxi.top/msyhl.ttc",
|
||||
"msyhl.ttc",
|
||||
"msyhl.ttc"
|
||||
],
|
||||
[
|
||||
"msyhbd.ttc",
|
||||
"http://fonts.wine-runner.gfdgdxi.top/msyhbd.ttc",
|
||||
"msyhbd.ttc",
|
||||
"msyhbd.ttc"
|
||||
]
|
||||
]
|
||||
def Download(wineBotton: str, id: int) -> int:
|
||||
return os.system(f"aria2c -x 16 -s 16 -d '{wineBotton}/drive_c/windows/Fonts/' -o '{fontList[id][0]}' \"{fontList[id][1]}\"")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装指定应用")
|
||||
sys.exit()
|
||||
|
||||
105
InstallFoxpro.py
Executable file
105
InstallFoxpro.py
Executable file
@@ -0,0 +1,105 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 构建
|
||||
###########################################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import updatekiller
|
||||
import req as requests
|
||||
try:
|
||||
sourcesList = [
|
||||
"http://foxpro.wine-runner.gfdgdxi.top/list.json",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/Visual FoxPro/list.json"
|
||||
]
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
netList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
netList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
netList = [
|
||||
["3.0 Runtime Service Pack 1", "http://foxpro.wine-runner.gfdgdxi.top/VFP3SP1RT.EXE", "VFP3SP1RT.EXE"],
|
||||
["5.0 Runtime Service Pack 1", "http://foxpro.wine-runner.gfdgdxi.top/VFP5SP1RT.EXE", "VFP5SP1RT.EXE"],
|
||||
["6.0 Runtime Service Pack 5", "http://foxpro.wine-runner.gfdgdxi.top/VFP6SP5RT.EXE", "VFP6SP5RT.EXE"],
|
||||
["7.0 Runtime Service Pack 0", "http://foxpro.wine-runner.gfdgdxi.top/VFP7SP0RT.EXE", "VFP7SP0RT.EXE"],
|
||||
["7.0 Runtime Service Pack 1", "http://foxpro.wine-runner.gfdgdxi.top/VFP7SP1RT.EXE", "VFP7SP1RT.EXE"],
|
||||
["8.0 Runtime Service Pack 0", "http://foxpro.wine-runner.gfdgdxi.top/VFP8SP0RT.EXE", "VFP8SP0RT.EXE"],
|
||||
["8.0 Runtime Service Pack 1", "http://foxpro.wine-runner.gfdgdxi.top/VFP8SP1RT.EXE", "VFP8SP1RT.EXE"],
|
||||
["9.0 Runtime Service Pack 1", "http://foxpro.wine-runner.gfdgdxi.top/VFP9SP1RT.EXE", "VFP9SP1RT.EXE"],
|
||||
["9.0 Runtime Service Pack 2 with Hotfixes", "http://foxpro.wine-runner.gfdgdxi.top/VFP9SP2RT.EXE", "VFP9SP2RT.EXE"]
|
||||
]
|
||||
def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||
try:
|
||||
os.remove(f"/tmp/deepin-wine-runner-FoxPro/{netList[id][2]}")
|
||||
except:
|
||||
pass
|
||||
os.system(f"aria2c -x 16 -s 16 -d '/tmp/deepin-wine-runner-FoxPro' -o '{netList[id][2]}' \"{netList[id][1]}\"")
|
||||
return os.system(f"WINEPREFIX='{wineBotton}' {wine} '/tmp/deepin-wine-runner-FoxPro/{netList[id][2]}'")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装 Visual FoxPro")
|
||||
sys.exit()
|
||||
if len(sys.argv) <= 2 or sys.argv[1] == "" or sys.argv[2] == "":
|
||||
print("您未指定需要安装 Visual FoxPro 的容器和使用的 wine,无法继续")
|
||||
print("参数:")
|
||||
print("XXX 参数一 参数二 参数三(可略)")
|
||||
print("参数一为需要安装的容器,参数二为需要使用的wine,参数三为是否缓存(可略),三个参数位置不能颠倒")
|
||||
sys.exit()
|
||||
|
||||
homePath = os.path.expanduser('~')
|
||||
print('''
|
||||
mmmmmm mmmmm
|
||||
# mmm m m # "# m mm mmm
|
||||
#mmmmm #" "# #m# #mmm#" #" " #" "#
|
||||
# # # m#m # # # #
|
||||
# "#m#" m" "m # # "#m#"
|
||||
|
||||
|
||||
''')
|
||||
|
||||
print("请选择以下的 Visual FoxPro 进行安装(不保证能正常安装运行)")
|
||||
for i in range(0, len(netList)):
|
||||
print(f"{i} Visual FoxPro {netList[i][0]}")
|
||||
while True:
|
||||
try:
|
||||
choose = input("请输入要选择的 Visual FoxPro 版本(输入“exit”退出):").lower()
|
||||
if choose == "exit":
|
||||
break
|
||||
choose = int(choose)
|
||||
except:
|
||||
print("输入错误,请重新输入")
|
||||
continue
|
||||
if 0 <= choose and choose < len(netList):
|
||||
break
|
||||
if choose == "exit":
|
||||
exit()
|
||||
print(f"您选择了 Visual FoxPro {netList[choose][0]}")
|
||||
if os.path.exists(f"{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}"):
|
||||
print("已经缓存,使用本地版本")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
input("安装结束,按回车键退出")
|
||||
exit()
|
||||
print("开始下载")
|
||||
os.system(f"rm -rf '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
os.system(f"mkdir -p '{homePath}/.cache/deepin-wine-runner/vcpp'")
|
||||
os.system(f"aria2c -x 16 -s 16 -d '{homePath}/.cache/deepin-wine-runner/vcpp' -o '{netList[choose][2]}' \"{netList[choose][1]}\"")
|
||||
os.system(f"WINEPREFIX='{sys.argv[1]}' {sys.argv[2]} '{homePath}/.cache/deepin-wine-runner/vcpp/{netList[choose][2]}'")
|
||||
input("安装结束,按回车键退出")
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,7 +17,7 @@ import traceback
|
||||
import pyquery
|
||||
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装 mono、gecko")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,24 +17,36 @@ import updatekiller
|
||||
import req as requests
|
||||
try:
|
||||
sourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/msxml/list.json",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/msxml/list.json"
|
||||
"http://msxml.wine-runner.gfdgdxi.top/list.json",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/msxml/list.json"
|
||||
]
|
||||
msxmlList = json.loads(requests.get(sourcesList[0]).text)
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
msxmlList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
msxmlList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
msxmlList = [
|
||||
["MSXML 4.0 SP2", "https://www.gitlink.org.cn/api/attachments/390679?gfdgd_xi", "msxml6.0.msi"],
|
||||
["MSXML 4.0 SP3", "https://www.gitlink.org.cn/api/attachments/390678?gfdgd_xi", "msxml4.0SP3.msi"],
|
||||
["MSXML 6.0", "https://www.gitlink.org.cn/api/attachments/390681?gfdgd_xi", "msxml6_x64.msi"]
|
||||
["MSXML 4.0 SP2", "http://msxml.wine-runner.gfdgdxi.top/msxml6.0.msi", "msxml6.0.msi"],
|
||||
["MSXML 4.0 SP3", "http://msxml.wine-runner.gfdgdxi.top/msxml4.0SP3.msi", "msxml4.0SP3.msi"],
|
||||
["MSXML 6.0", "http://msxml.wine-runner.gfdgdxi.top/msxml6_x64.msi", "msxml6_x64.msi"],
|
||||
["MSXML 3.0", "http://msxml.wine-runner.gfdgdxi.top/msxml3.msi", "msxml3.msi"]
|
||||
]
|
||||
|
||||
|
||||
def Download(wineBotton: str, id: int, wine: str):
|
||||
os.system(f"aria2c -x 16 -s 16 -d \"/tmp/deepin-wine-runner-msxml/\" -o \"{msxmlList[id][2]}\" \"{msxmlList[id][1]}\"")
|
||||
return os.system(f"WINEPREFIX='{wineBotton}' {wine} msiexec /i \"/tmp/deepin-wine-runner-msxml/{msxmlList[id][2]}\"")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装 MSXML")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -18,10 +18,21 @@ import req as requests
|
||||
try:
|
||||
sourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/net/list.json",
|
||||
"http://net.wine-runner.gfdgdxi.top/list.json",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/net/list.json"
|
||||
]
|
||||
netList = json.loads(requests.get(sourcesList[0]).text)
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
netList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
netList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
netList = [
|
||||
["Microsoft® .NET Framework 1.1 版可转散发套件", "https://download.microsoft.com/download/8/2/7/827bb1ef-f5e1-4464-9788-40ef682930fd/dotnetfx.exe"],
|
||||
["Microsoft .NET Framework 2.0 Service Pack 1 (x86)", "https://download.microsoft.com/download/0/8/c/08c19fa4-4c4f-4ffb-9d6c-150906578c9e/NetFx20SP1_x86.exe"],
|
||||
@@ -57,7 +68,7 @@ def Download(wineBotton: str, id: int, wine: str):
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装 .net framework")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 bash 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.2.0
|
||||
# 更新时间:2022年09月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,7 +17,9 @@ echo '" #"# # # #" # #" # #mmmm# # #'
|
||||
echo ' ## ##" # # # #"""" # # # #'
|
||||
echo ' # # mm#mm # # "#mm" # # #mm#"'
|
||||
echo ' # '
|
||||
|
||||
echo
|
||||
echo "WineHQ 官网:https://wiki.winehq.org/"
|
||||
echo 当前使用国内镜像源:https://mirrors-i.tuna.tsinghua.edu.cn/help/wine-builds/
|
||||
|
||||
ubuntuSource=(
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/ubuntu/ jammy main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
@@ -28,11 +30,11 @@ ubuntuSource=(
|
||||
debianSource=(
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/ buster main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/ bullseye main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources"
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/ bookworm main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
)
|
||||
# 选择发行版
|
||||
echo "WineHQ 官网:https://wiki.winehq.org/"
|
||||
echo "国内镜像源:https://mirrors-i.tuna.tsinghua.edu.cn/help/wine-builds/"
|
||||
#echo "WineHQ 官网:https://wiki.winehq.org/"
|
||||
#echo "国内镜像源:https://mirrors-i.tuna.tsinghua.edu.cn/help/wine-builds/"
|
||||
echo
|
||||
echo "选择发行版:"
|
||||
echo "0. Debian"
|
||||
@@ -43,7 +45,7 @@ echo "选择系统版本"
|
||||
if [ $system = "0" ]; then
|
||||
echo "0. Debian 10 (Buster)"
|
||||
echo "1. Debian 11 (Bullseye)"
|
||||
echo "2. Debian Testing (Bookworm)"
|
||||
echo "2. Debian 12 (Bookworm)"
|
||||
fi
|
||||
if [ $system = "1" ]; then
|
||||
echo "0. Ubuntu 22.04"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 bash 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.2.0
|
||||
# 更新时间:2022年09月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,17 +17,19 @@ echo '" #"# # # #" # #" # #mmmm# # #'
|
||||
echo ' ## ##" # # # #"""" # # # #'
|
||||
echo ' # # mm#mm # # "#mm" # # #mm#"'
|
||||
echo ' # '
|
||||
|
||||
echo
|
||||
echo "WineHQ 官网:https://wiki.winehq.org/"
|
||||
echo 当前不使用国内镜像源
|
||||
|
||||
ubuntuSource=(
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/ubuntu/ jammy main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources"
|
||||
"sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/impish/winehq-impish.sources"
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/ubuntu/ focal main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/ubuntu/ bionic main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/focal/winehq-focal.sources"
|
||||
"sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/bionic/winehq-bionic.sources"
|
||||
)
|
||||
debianSource=(
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/ buster main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"echo deb [arch=amd64,i386 signed-by=/usr/share/keyrings/winehq-archive.key] https://mirrors.tuna.tsinghua.edu.cn/wine-builds/debian/ bullseye main | sudo tee /etc/apt/sources.list.d/winehq.list"
|
||||
"sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/buster/winehq-buster.sources"
|
||||
"sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bullseye/winehq-bullseye.sources"
|
||||
"sudo wget -nc -P /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources"
|
||||
)
|
||||
# 选择发行版
|
||||
@@ -43,7 +45,7 @@ echo "选择系统版本"
|
||||
if [ $system = "0" ]; then
|
||||
echo "0. Debian 10 (Buster)"
|
||||
echo "1. Debian 11 (Bullseye)"
|
||||
echo "2. Debian Testing (Bookworm)"
|
||||
echo "2. Debian 12 (Bookworm)"
|
||||
fi
|
||||
if [ $system = "1" ]; then
|
||||
echo "0. Ubuntu 22.04"
|
||||
@@ -61,7 +63,9 @@ read programVersion
|
||||
# 初步配置
|
||||
sudo apt-key del "D43F 6401 4536 9C51 D786 DDEA 76F1 A20F F987 672F"
|
||||
sudo dpkg --add-architecture i386
|
||||
sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
||||
#sudo wget -nc -O /usr/share/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
||||
sudo mkdir -pm755 /etc/apt/keyrings
|
||||
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
|
||||
# 检测 apt-fast 或 ss-apt-fast 是否存在
|
||||
apt="apt"
|
||||
which apt-fast > /dev/null
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,11 +17,22 @@ import updatekiller
|
||||
import req as requests
|
||||
try:
|
||||
sourcesList = [
|
||||
"http://other.wine-runner.gfdgdxi.top/list.json",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/other/list.json",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/other/list.json"
|
||||
]
|
||||
msxmlList = json.loads(requests.get(sourcesList[0]).text)
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
msxmlList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
msxmlList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
msxmlList = [
|
||||
["Windows Script 5.7 for Windows XP", "https://download.microsoft.com/download/f/f/e/ffea3abf-b55f-4924-b5a5-bde0805ad67c/scripten.exe", "exe", "scripten.exe"],
|
||||
["Windows Management Instrumentation 1.50.1131", "https://www.gitlink.org.cn/api/attachments/390680", "exe", "WMITools.exe"]
|
||||
@@ -39,7 +50,7 @@ def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||
return os.system(f"WINEPREFIX='{wineBotton}' {wine} msiexec /i '/tmp/deepin-wine-runner-other/{msxmlList[id][3]}'")
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装运行库")
|
||||
sys.exit()
|
||||
@@ -66,6 +77,8 @@ if __name__ == "__main__":
|
||||
while True:
|
||||
try:
|
||||
choose = input("请输入要选择要安装的应用(输入“exit”退出):").lower()
|
||||
if choose == "exit":
|
||||
break
|
||||
choose = int(choose)
|
||||
except:
|
||||
print("输入错误,请重新输入")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
arch=amd64
|
||||
libPath=/usr/lib/x86_64-linux-gnu/
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
version=1.0.1
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=arm64
|
||||
libPath=/usr/lib/aarch64-linux-gnu
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=armhf
|
||||
libPath=/usr/lib/arm-linux-gnueabihf/
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=i386
|
||||
libPath=/usr/lib/i386-linux-gnu/
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=mips64el
|
||||
libPath=/usr/lib/mips64el-linux-gnuabi64
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=ppc64el
|
||||
libPath=/usr/lib/powerpc64le-linux-gnu/
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=riscv64
|
||||
libPath=/usr/lib/riscv64-linux-gnu/
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
arch=s390x
|
||||
libPath=/usr/lib/s390x-linux-gnu/
|
||||
version=1.0.0
|
||||
url="https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
url="https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/$arch-runtime-for-qemu_${version}_all.deb"
|
||||
fileName=`basename $url`
|
||||
|
||||
if [[ -d $libPath ]]; then
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年10月05日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,17 +17,27 @@ import updatekiller
|
||||
import req as requests
|
||||
try:
|
||||
sourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/list.json",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/vb/list.json"
|
||||
"http://vb.wine-runner.gfdgdxi.top/list.json",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/list.json"
|
||||
]
|
||||
netList = json.loads(requests.get().text)
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
netList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
netList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
netList = [
|
||||
["Visual Basic 1(DOS application)", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun100.exe", "vbrun100.exe"],
|
||||
["Visual Basic 2(DOS application)", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun200.exe", "vbrun200.exe"],
|
||||
["Visual Basic 3", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vb3run.exe", "vb3run.exe"],
|
||||
["Visual Basic 4", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vb4run.exe", "vb4run.exe"],
|
||||
["Visual Basic 6", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vb/vbrun60sp4.exe", "vbrun60sp4.exe"]
|
||||
["Visual Basic 1", "http://vb.wine-runner.gfdgdxi.top/vbrun100.exe", "vbrun100.exe"],
|
||||
["Visual Basic 2", "http://vb.wine-runner.gfdgdxi.top/vbrun200.exe", "vbrun200.exe"],
|
||||
["Visual Basic 3", "http://vb.wine-runner.gfdgdxi.top/vb3run.exe", "vb3run.exe"],
|
||||
["Visual Basic 4", "http://vb.wine-runner.gfdgdxi.top/vb4run.exe", "vb4run.exe"],
|
||||
["Visual Basic 6", "http://vb.wine-runner.gfdgdxi.top/vbrun60sp4.exe", "vbrun60sp4.exe"]
|
||||
]
|
||||
def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||
try:
|
||||
@@ -39,7 +49,7 @@ def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装 Visual Basic Runtime")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -17,13 +17,23 @@ import updatekiller
|
||||
import req as requests
|
||||
try:
|
||||
sourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vscpp/list.json",
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/vscpp/list.json"
|
||||
"http://vcpp.wine-runner.gfdgdxi.top/list.json",
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vscpp/list.json"
|
||||
]
|
||||
netList = json.loads(requests.get(sourcesList[0]).text)
|
||||
change = False
|
||||
for i in sourcesList:
|
||||
try:
|
||||
netList = json.loads(requests.get(i).text)
|
||||
change = True
|
||||
break
|
||||
except:
|
||||
pass
|
||||
if not change:
|
||||
netList = json.loads(requests.get(sourcesList[0]).text)
|
||||
except:
|
||||
print("使用离线列表")
|
||||
netList = [
|
||||
["VC6 运行库", "https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/vscpp/VC6RedistSetup_deu.exe", "VC6RedistSetup_deu.exe"],
|
||||
["VC6 运行库", "http://vcpp.wine-runner.gfdgdxi.top/VC6RedistSetup_deu.exe", "VC6RedistSetup_deu.exe"],
|
||||
["2005 Service Pack 1 Redistributable Package MFC 安全更新", "https://download.microsoft.com/download/4/A/2/4A22001F-FA3B-4C13-BF4E-42EC249D51C4/vcredist_x86.EXE", "vcredist05_x86.exe"],
|
||||
["2008 (VC++ 9.0) SP1 (不再支持) X86", "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe", "vcredist08_x86.exe"],
|
||||
["2008 (VC++ 9.0) SP1 (不再支持) X64", "https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe", "vcredist08_x86.exe"],
|
||||
@@ -47,7 +57,7 @@ def Download(wineBotton: str, id: int, wine: str) -> int:
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "--help" in sys.argv:
|
||||
print("作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢")
|
||||
print("作者:gfdgd xi")
|
||||
print("版本:1.0.0")
|
||||
print("本程序可以更方便的在 wine 容器中安装 Visual Studio C++")
|
||||
sys.exit()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.1.0
|
||||
# 更新时间:2022年08月25日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# 使用系统默认的 python3 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.5.0
|
||||
# 更新时间:2022年11月15日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
|
||||
16
Makefile
16
Makefile
@@ -12,8 +12,10 @@ package:
|
||||
#cd VM-source && make
|
||||
#cd wine && make
|
||||
make clean -j$(nproc)
|
||||
mkdir deb/opt/apps/deepin-wine-runner/LANG -pv
|
||||
cp -rv helperset deb/opt/apps/deepin-wine-runner/
|
||||
#cp -rv VM-source/VirtualMachine VM
|
||||
|
||||
cp -rv VM-source/deepin-wine-runner.svg VM
|
||||
cp -rv VM-source/Windows7X64Auto.iso VM
|
||||
cp -rv VM-source/Windows7X86Auto.iso VM
|
||||
@@ -21,6 +23,7 @@ package:
|
||||
cp -rv Test/ deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv information.json package-script
|
||||
zip -v -q -r package-script.zip package-script
|
||||
cp -rv InstallBox86-cn.sh deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv VM deb/opt/apps/deepin-wine-runner
|
||||
cp -rv 2048 deb/opt/apps/deepin-wine-runner/
|
||||
cp -rv Download.py deb/opt/apps/deepin-wine-runner/
|
||||
@@ -30,6 +33,8 @@ package:
|
||||
cp -rv QemuRun.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv kill.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv updatekiller.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv AddWineDebMirrorForDeepin20.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallNewWineHQOrg.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallWineOnDeepin23Alpha.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv wrestool deb/opt/apps/deepin-wine-runner
|
||||
cp -rv Mount.sh deb/opt/apps/deepin-wine-runner
|
||||
@@ -45,6 +50,8 @@ package:
|
||||
rm -rfv deb/opt/apps/deepin-wine-runner/wine/winelist.json
|
||||
cp -rv req deb/opt/apps/deepin-wine-runner
|
||||
cp -rv pardus-chroot deb/opt/apps/deepin-wine-runner
|
||||
cp -rv WineLib deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallFoxpro.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv BuildDesktop.py deb/opt/apps/deepin-wine-runner
|
||||
cp -rv ChangePassword.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv trans deb/opt/apps/deepin-wine-runner
|
||||
@@ -110,9 +117,14 @@ package:
|
||||
cp -rv RemoveQemuUser.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallBox86.sh deb/opt/apps/deepin-wine-runner
|
||||
cp -rv InstallRuntime deb/opt/apps/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
|
||||
python3 RemovePycacheFile.py
|
||||
sudo rm -rfv /tmp/spark-deepin-wine-runner-builder/
|
||||
cp -rv deb /tmp/spark-deepin-wine-runner-builder
|
||||
rm -rfv deb/opt/apps/deepin-wine-runner/*
|
||||
rm -rfv package-script.zip
|
||||
mkdir -pv /tmp/spark-deepin-wine-runner-builder/usr/bin
|
||||
ln -s /opt/apps/deepin-wine-runner/deepin-wine-packager.py /tmp/spark-deepin-wine-runner-builder/usr/bin/deepin-wine-package-builder
|
||||
ln -s /opt/apps/deepin-wine-runner/deepin-wine-easy-packager.py /tmp/spark-deepin-wine-runner-builder/usr/bin/deepin-wine-packager-easy-builder
|
||||
@@ -136,15 +148,15 @@ package:
|
||||
|
||||
sudo chown -R root:root /tmp/spark-deepin-wine-runner-builder
|
||||
|
||||
dpkg -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner.deb
|
||||
dpkg-deb -Z xz -b /tmp/spark-deepin-wine-runner-builder spark-deepin-wine-runner.deb
|
||||
sudo rm -rfv /tmp/spark-deepin-wine-runner-builder
|
||||
|
||||
|
||||
install:
|
||||
make build -j$(nproc)
|
||||
sudo apt update ; true
|
||||
#sudo dpkg -i spark-deepin-wine-runner.deb
|
||||
sudo apt reinstall ./spark-deepin-wine-runner.deb -y --allow-downgrades
|
||||
rm spark-deepin-wine-runner.deb -vf
|
||||
|
||||
remove:
|
||||
sudo apt purge spark-deepin-wine-runner -y
|
||||
|
||||
10
PackageConfig/0/DEBIAN/control
Normal file
10
PackageConfig/0/DEBIAN/control
Normal file
@@ -0,0 +1,10 @@
|
||||
Package: @@PACKAGE@@
|
||||
Version: @@VERSION@@
|
||||
Architecture: @@ARCH@@
|
||||
Maintainer: @@MAKER@@
|
||||
Depends: @@DEPENDS@@
|
||||
Section: non-free/otherosfs
|
||||
Priority: optional
|
||||
Multi-Arch: foreign
|
||||
Installed-Size: @@SIZE@@
|
||||
Description: @@DESCRIPTION@@
|
||||
@@ -0,0 +1,14 @@
|
||||
[Desktop Entry]
|
||||
Categories=;
|
||||
Comment=@@NAME@@
|
||||
Encoding=UTF-8
|
||||
Exec="/opt/apps/@@PACKAGE@@/files/run.sh" --uri
|
||||
GenericName=@@NAME@@
|
||||
Icon=@@ICONLIST@@
|
||||
MimeType=@@MIMETYPE@@
|
||||
Name=@@NAME@@.desktop
|
||||
StartupNotify=false
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-Created-By=
|
||||
X-Deepin-Vendor=user-custom
|
||||
113
PackageConfig/0/opt/apps/@@PACKAGE@@/files/run.sh
Normal file
113
PackageConfig/0/opt/apps/@@PACKAGE@@/files/run.sh
Normal file
@@ -0,0 +1,113 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2016 Deepin, Inc.
|
||||
#
|
||||
# Author: Li LongYu <lilongyu@linuxdeepin.com>
|
||||
# Peng Hao <penghao@linuxdeepin.com>
|
||||
#
|
||||
#
|
||||
# Copyright (C) 2022 The Spark Project
|
||||
#
|
||||
#
|
||||
# Modifier shenmo <shenmo@spark-app.store>
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
#######################函数段。下文调用的额外功能会在此处声明
|
||||
|
||||
Get_Dist_Name()
|
||||
{{
|
||||
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
|
||||
DISTRO='Deepin'
|
||||
elif grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release; then
|
||||
DISTRO='UniontechOS'
|
||||
else
|
||||
DISTRO='OtherOS'
|
||||
fi
|
||||
}}
|
||||
|
||||
|
||||
####获得发行版名称
|
||||
|
||||
#########################预设值段
|
||||
|
||||
version_gt() { test "$(echo "$@" | tr " " "
|
||||
" | sort -V | head -n 1)" != "$1"; }
|
||||
####用于比较版本?未实装
|
||||
BOTTLENAME="@@@BOTTLENAME@@@"
|
||||
APPVER="@@@APPVER@@@"
|
||||
EXEC_PATH="@@@EXEC_PATH@@@"
|
||||
##### 软件在wine中的启动路径
|
||||
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
|
||||
export MIME_TYPE=""
|
||||
#####没什么用
|
||||
export DEB_PACKAGE_NAME="@@@DEB_PACKAGE_NAME@@@"
|
||||
####这里写包名才能在启动的时候正确找到files.7z,似乎也和杀残留进程有关
|
||||
export APPRUN_CMD="@@@APPRUN_CMD@@@"
|
||||
#####wine启动指令,建议
|
||||
EXPORT_ENVS=""
|
||||
|
||||
export SPECIFY_SHELL_DIR=`dirname $START_SHELL_PATH`
|
||||
|
||||
ARCHIVE_FILE_DIR="/opt/apps/$DEB_PACKAGE_NAME/files"
|
||||
|
||||
export WINEDLLPATH=/opt/$APPRUN_CMD/lib:/opt/$APPRUN_CMD/lib64
|
||||
|
||||
export WINEPREDLL="$ARCHIVE_FILE_DIR/dlls"
|
||||
|
||||
DISABLE_ATTACH_FILE_DIALOG=""
|
||||
##默认为空。若为1,则不使用系统自带的文件选择,而是使用wine的
|
||||
##对于deepin/UOS,大部分的应用都不需要使用wine的,如果有需求(比如wine应用选择的限定种类文件系统的文管不支持)
|
||||
##请填1。
|
||||
##注意:因为非DDE的环境不确定,所以默认会在非Deepin/UOS发行版上禁用这个功能。如果你确认在适配的发行版上可以正常启动,请注释或者删除下面这段
|
||||
|
||||
##############<<<<<<<<<禁用文件选择工具开始
|
||||
Get_Dist_Name
|
||||
#此功能实现参见结尾函数段
|
||||
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ];then
|
||||
DISABLE_ATTACH_FILE_DIALOG="1"
|
||||
echo "非deepin/UOS,默认关闭系统自带的文件选择工具,使用Wine的"
|
||||
echo "如果你想改变这个行为,请到/opt/apps/$DEB_PACKAGE_NAME/files/$0处修改"
|
||||
echo "To打包者:如果你要打开自带请注意在适配的发行版上进行测试"
|
||||
echo "To用户:打包者没有打开这个功能,这证明启用这个功能可能造成运行问题。如果你要修改这个行为,请确保你有一定的动手能力"
|
||||
fi
|
||||
##############>>>>>>>>>禁用文件选择工具结束
|
||||
|
||||
##############<<<<<<<<<屏蔽mono和gecko安装器开始
|
||||
##默认屏蔽mono和gecko安装器
|
||||
{['''#if [ "$APPRUN_CMD" = "spark-wine7-devel" ];then
|
||||
|
||||
#export WINEDLLOVERRIDES="mscoree,mshtml="
|
||||
#echo "为了降低打包体积,默认关闭gecko和momo,如有需要,注释此行(仅对spark-wine7-devel有效)"
|
||||
|
||||
#fi''', '''if [ "$APPRUN_CMD" = "spark-wine7-devel" ];then
|
||||
|
||||
export WINEDLLOVERRIDES="mscoree,mshtml="
|
||||
echo "为了降低打包体积,默认关闭gecko和momo,如有需要,注释此行(仅对spark-wine7-devel有效)"
|
||||
|
||||
fi'''][int(disabledMono.isChecked())]}
|
||||
##############>>>>>>>>>屏蔽mono和gecko安装器结束
|
||||
|
||||
#########################执行段
|
||||
|
||||
|
||||
|
||||
|
||||
if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then
|
||||
export ATTACH_FILE_DIALOG=1
|
||||
fi
|
||||
|
||||
if [ -n "$EXPORT_ENVS" ];then
|
||||
export $EXPORT_ENVS
|
||||
fi
|
||||
|
||||
if [ -n "$EXEC_PATH" ];then
|
||||
if [ -z "${{EXEC_PATH##*.lnk*}}" ];then
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
|
||||
else
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
|
||||
fi
|
||||
else
|
||||
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
|
||||
fi
|
||||
13
PackageConfig/list.json
Normal file
13
PackageConfig/list.json
Normal file
@@ -0,0 +1,13 @@
|
||||
[
|
||||
"@@PACKAGE@@",
|
||||
"@@VERSION@@",
|
||||
"@@ARCH@@",
|
||||
"@@MAKER@@",
|
||||
"@@DEPENDS@@",
|
||||
"@@SIZE@@",
|
||||
"@@DESCRIPTION@@"
|
||||
"@@ICONLIST@@",
|
||||
"@@NAME@@",
|
||||
"@@MIMETYPE@@",
|
||||
"@@CATEGORIES@@"
|
||||
]
|
||||
@@ -15,7 +15,7 @@ class ProgramRunStatusShow():
|
||||
try:
|
||||
fenlists = []
|
||||
for i in range(6):
|
||||
fenlists.append(int(requests.get(base64.b64decode("aHR0cHM6Ly9jb2RlLmdpdGxpbmsub3JnLmNuL2dmZGdkLXhpLW9yZy93aW5lLXJ1bm5lci1kb3dubG9hZHMtb2YtcnVubmVyL3Jhdy9icmFuY2gvbWFzdGVyL0Zlbi9GZW4=").decode("utf-8") + f"{i}.txt").text))
|
||||
fenlists.append(int(requests.get("http://data.download.gfdgdxi.top/Fen/Fen" + f"{i}.txt").text))
|
||||
tipsInfo = ""
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
||||
@@ -92,7 +92,7 @@ class Ui_MainWindow(object):
|
||||
|
||||
self.menu = MainWindow.menuBar()
|
||||
self.changeSources = self.menu.addMenu(_translate("MainWindow", "更换源"))
|
||||
self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Gitlink 源(推荐)"))
|
||||
self.gitlinkAction = QtWidgets.QAction(_translate("MainWindow", "Github 源(推荐)"))
|
||||
self.ipv6Action = QtWidgets.QAction(_translate("MainWindow", "备用源(只支持 IPv6 用户)"))
|
||||
self.localAction = QtWidgets.QAction(_translate("MainWindow", "本地测试源(127.0.0.1)"))
|
||||
self.changeSources.addAction(self.gitlinkAction)
|
||||
@@ -324,7 +324,10 @@ def on_addButton_clicked():
|
||||
# ui.deleteZip.setChecked(False)
|
||||
# ui.unzip.setChecked(False)
|
||||
arch = internetJsonList[choose][2]
|
||||
downloadUrl = f"{internetWineSource}/{arch}/{downloadName}"
|
||||
if "://" in downloadName:
|
||||
downloadUrl = downloadName
|
||||
else:
|
||||
downloadUrl = f"{internetWineSource}/{arch}/{downloadName}"
|
||||
dialog = QtWidgets.QProgressDialog()
|
||||
cancel = QtWidgets.QPushButton("取消")
|
||||
cancel.setDisabled(True)
|
||||
@@ -393,7 +396,7 @@ if __name__ == "__main__":
|
||||
localJsonList = []
|
||||
internetJsonList = []
|
||||
internetWineSourceList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/deepin-wine-runner-ubuntu-image/raw/branch/master/Sandbox",
|
||||
"http://chroot.gfdgdxi.top",
|
||||
"http://gfdgdxi.msns.cn/deepin-wine-runner-ubuntu-image/Sandbox", # 备用源,纯 IPv6 源
|
||||
"http://127.0.0.1/deepin-wine-runner-ubuntu-image/Sandbox/" # 本地测试源
|
||||
]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
pkexec apt install qemu-system -y
|
||||
pkexec apt update
|
||||
pkexec apt install qemu-system qemu-user qemu-user-static -y
|
||||
echo 安装完成!按回车键退出
|
||||
read
|
||||
read
|
||||
|
||||
77
README.md
77
README.md
@@ -1,17 +1,17 @@
|
||||
<p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
|
||||
<h1 align="center">Wine 运行器 3.2.0</h1>
|
||||
<h1 align="center">Wine 运行器 3.3.0.1</h1>
|
||||
<hr>
|
||||
|
||||
## 介绍
|
||||
Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序,内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。
|
||||
它同时还内置了基于VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作。
|
||||
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低)。
|
||||
此外,它还简化了如下命令,让你可以更简便地使用Wine:
|
||||
```bash
|
||||
env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
|
||||
```
|
||||
让你可以简易方便的使用 wine
|
||||
是使用 Python3 的 PyQt5 构建的
|
||||
(测试平台:deepin 20.8;UOS 家庭版 21.3.1;Ubuntu 22.04;Ubuntu 20.04;UOS 专业版 1050;openkylin)
|
||||
(测试平台:deepin 20.8;UOS 家庭版 22;Ubuntu 22.04;Ubuntu 20.04;Ubuntu 23.04;UOS 专业版 1050;openkylin;cuteos;yoyo os)
|
||||

|
||||
而打包器可以方便的把您的 wine 容器打包成 deb 包供他人使用,程序创建的 deb 构建临时文件夹目录树如下:
|
||||
```bash
|
||||
@@ -44,6 +44,9 @@ env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
|
||||
理论上支持全架构,如果 Python 能运行的话
|
||||
非 X86 架构会利用到 `box86`、`exagear`、`qemu` 等技术
|
||||
|
||||
## Wine 运行器自动构建(Newest)
|
||||
此只供尝鲜,不保证能用:https://github.com/gfdgd-xi/deep-wine-runner/actions/workflows/auto-building.yml
|
||||
|
||||
## 目前实现功能(部分)
|
||||
1. 用 Wine 运行 EXE
|
||||
2. 支持下载/安装 Wine
|
||||
@@ -70,7 +73,10 @@ env WINEPREFIX=容器路径 wine(wine的路径) 可执行文件路径
|
||||

|
||||
|
||||
### 龙芯应用合作社
|
||||
(找时间再补图)
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## 分支介绍
|
||||
### main 分支
|
||||
@@ -130,6 +136,53 @@ desktop文件中StartupWMClass字段。用于让桌面组件将窗口类名与de
|
||||

|
||||
|
||||
## 更新日志
|
||||
### 3.3.0.1(2023年07月25日)
|
||||
**※1、修复运行器打开主界面不进行任何操作但 CPU 占用率过高的问题**
|
||||
**※2、修复运行器运行器(局部)无法正常移除的问题**
|
||||
|
||||
### 3.3.0(2023年07月12日)
|
||||
**※1、简易打包器支持选择 Wine 版本以及修改打包生成的 deb 包的架构为 all;**
|
||||
**※2、修改容器自动配置脚本的 Gitlink 源为 Gitee 源**
|
||||
**※3、在安装更多 Wine 处安装 Wine 后主窗口 Wine 版本下拉框自动更新**
|
||||
**※4、设置打包器在 Ubuntu 依旧打包 xz 格式的 deb 包**
|
||||
**※5、修复 Wine 简易打包器 control 文件 Installed-Size 格式不规范的问题**
|
||||
**※6、更换 Box86 源并支持安装 Box64(如果为 aarch64 架构)**
|
||||
**※7、新增 Wine 自建源(支持 Debian10、Deepin20)**
|
||||
**※8、修改 WineHQ 安装器使其支持选择国内清华大学镜像源或 WineHQ 官方源**
|
||||
**※9、新增 Visual FoxPro 安装器**
|
||||
**※10、新增安装局部运行库以解决部分低版本系统运行高版本 Wine 的问题且不与其他运行库和兼容层冲突**
|
||||
**※11、支持调用原版的 Exagear 以及 Qemu User(i386、x86_64) 运行 Wine**
|
||||
12、新增自动构建:https://github.com/gfdgd-xi/deep-wine-runner/actions/workflows/auto-building.yml(只供尝鲜)
|
||||
13、新增 Wine 日构建(在“安装更多 Wine”处可以获取,目前有 i386、amd64、i386+amd64、amd64+wow64 mode、aarch64)
|
||||
14、优化容器清理脚本
|
||||
15、修复部分组件没完全换源的问题,部分组件支持自动换可用源
|
||||

|
||||

|
||||
### 3.2.2(2023年05月12日)
|
||||
**※1. 修改源地址(迁出 Gitlink);**
|
||||
**※2. 修复非 X86 架构运行器主页面虚拟机工具禁用的问题;**
|
||||
3、部分组件支持选择最优源。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 3.2.1(2023年04月29日)
|
||||
**※1、Windows 虚拟机安装工具支持非 X86 架构;**
|
||||
**※2、应用打包器可以与星火应用商店配合构建 arm/all 全架构的 Wine 包;**
|
||||
**※3、Windows 虚拟机安装工具支持调用 Qemu;**
|
||||
**※4、新增 Qemu User 运行 Wine 的帮助入口;**
|
||||
**※5、修复 Windows 虚拟机的自动配置镜像缺少 aria2c.exe 的故障;**
|
||||
**※6、支持在更新程序版本时自动关闭程序进程;**
|
||||
7、运行器和打包器支持调用 spark-wine8;
|
||||
8、修改作者信息;
|
||||
9、新增安装包构建时间;
|
||||
10、优化 Wine 运行器更新策略。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 3.2.0(2023年03月19日)
|
||||
**※1、Windows 应用适配工具新增系统资源显示;**
|
||||
**※2、Windows 应用适配工具使用 C++ 重写;**
|
||||
@@ -563,14 +616,14 @@ Gitlink:https://www.gitlink.org.cn/gfdgd_xi/deep-wine-runner
|
||||
## 运行库下载
|
||||
| 架构 | 运行库下载 |
|
||||
|-|-|
|
||||
| i386 | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/i386-runtime-for-qemu_1.0.0_all.deb |
|
||||
| amd64 | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/amd64-runtime-for-qemu_1.0.0_all.deb |
|
||||
| armhf | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/armhf-runtime-for-qemu_1.0.0_all.deb |
|
||||
| arm64 | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/arm64-runtime-for-qemu_1.0.0_all.deb |
|
||||
| mips64el | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/mips64el-runtime-for-qemu_1.0.0_all.deb |
|
||||
| ppc64el | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/ppc64el-runtime-for-qemu_1.0.0_all.deb |
|
||||
| riscv64 | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/riscv64-runtime-for-qemu_1.0.0_all.deb |
|
||||
| s390x | https://code.gitlink.org.cn/gfdgd_xi/runtime-for-qemu/raw/branch/master/s390x-runtime-for-qemu_1.0.0_all.deb |
|
||||
| i386 | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/i386-runtime-for-qemu_1.0.0_all.deb |
|
||||
| amd64 | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/amd64-runtime-for-qemu_1.0.0_all.deb |
|
||||
| armhf | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/armhf-runtime-for-qemu_1.0.0_all.deb |
|
||||
| arm64 | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/arm64-runtime-for-qemu_1.0.0_all.deb |
|
||||
| mips64el | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/mips64el-runtime-for-qemu_1.0.0_all.deb |
|
||||
| ppc64el | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/ppc64el-runtime-for-qemu_1.0.0_all.deb |
|
||||
| riscv64 | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/riscv64-runtime-for-qemu_1.0.0_all.deb |
|
||||
| s390x | https://jihulab.com/gfdgd-xi/qemu-runtime/-/raw/main/s390x-runtime-for-qemu_1.0.0_all.deb |
|
||||
|
||||
## 附:用于编译 Wine 的 Docker 容器(Debian10)
|
||||
内安装了编译 Wine 所需要的依赖,Wine 编译教程:https://wiki.winehq.org/Building_Wine
|
||||
|
||||
15
RunVM.sh
15
RunVM.sh
@@ -1,17 +1,18 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 bash 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.4.1
|
||||
# 更新时间:2022年11月06日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 tkinter 构建
|
||||
###########################################################################################
|
||||
cd `dirname $0`
|
||||
which VBoxManage
|
||||
if test $? == 0 ; then
|
||||
VM/VirtualMachine
|
||||
exit
|
||||
fi
|
||||
zenity --info --no-wrap --text="未安装 VirtualBox,请自行安装 VirtualBox 并重新运行"
|
||||
#which VBoxManage
|
||||
#if test $? == 0 ; then
|
||||
# VM/VirtualMachine
|
||||
# exit
|
||||
#fi
|
||||
#zenity --info --no-wrap --text="未安装 VirtualBox,请自行安装 VirtualBox 并重新运行"
|
||||
#./launch.sh deepin-terminal -C "pkexec apt install virtualbox-6.1 -y && zenity --info --text=\"安装完毕,关闭此对话框和安装终端重新运行程序即可\" --no-wrap" --keep-open
|
||||
VM/VirtualMachine
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 bash 运行
|
||||
###########################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:1.7.0
|
||||
# 更新时间:2022年07月15日
|
||||
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
|
||||
@@ -29,11 +29,11 @@ if [[ -f "$HOME/Qemu/Windows/Windows.qcow2" ]]; then
|
||||
use=$(echo "scale=4; $MemTotal / 3" | bc)
|
||||
if [[ `arch` == "x86_64" ]]; then
|
||||
echo X86 架构,使用 kvm 加速
|
||||
kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb
|
||||
kvm --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb -nic model=rtl8139
|
||||
exit
|
||||
fi
|
||||
echo 非 X86 架构,不使用 kvm 加速
|
||||
qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb
|
||||
qemu-system-x86_64 --hda "$HOME/Qemu/Windows/Windows.qcow2" -soundhw all -smp $CpuCount -m ${use}G -net user,hostfwd=tcp::3389-:3389 -display vnc=:5 -display gtk -usb -nic model=rtl8139
|
||||
exit
|
||||
fi
|
||||
zenity --question --no-wrap --text="检查到您未创建所指定的虚拟机,是否创建虚拟机并继续?\n如果不创建将无法使用"
|
||||
@@ -42,4 +42,4 @@ if [[ 1 == $? ]]; then
|
||||
exit
|
||||
fi
|
||||
cd `dirname $0`
|
||||
./VM/VirtualMachine
|
||||
./VM/VirtualMachine
|
||||
|
||||
@@ -64,13 +64,14 @@ class Ui_MainWindow(object):
|
||||
self.openFile.setObjectName("openFile")
|
||||
self.actionGitlink = QtWidgets.QAction(MainWindow)
|
||||
self.actionGitlink.setCheckable(True)
|
||||
self.actionGitlink.setChecked(True)
|
||||
#self.actionGitlink.setChecked(True)
|
||||
self.actionGitlink.setObjectName("actionGitlink")
|
||||
self.actionGitee = QtWidgets.QAction(MainWindow)
|
||||
self.actionGitee.setCheckable(True)
|
||||
self.actionGitee.setObjectName("actionGitee")
|
||||
self.actionGithub = QtWidgets.QAction(MainWindow)
|
||||
self.actionGithub.setCheckable(True)
|
||||
self.actionGithub.setChecked(True)
|
||||
self.actionGithub.setObjectName("actionGithub")
|
||||
self.action_IPv6 = QtWidgets.QAction(MainWindow)
|
||||
self.action_IPv6.setCheckable(True)
|
||||
@@ -88,9 +89,11 @@ class Ui_MainWindow(object):
|
||||
self.menu.addAction(self.openFile)
|
||||
self.menu.addSeparator()
|
||||
self.menu.addAction(self.exitProgram)
|
||||
self.menu_2.addAction(self.actionGitlink)
|
||||
self.menu_2.addAction(self.actionGitee)
|
||||
self.menu_2.addAction(self.actionGithub)
|
||||
self.menu_2.addAction(self.actionGitlink)
|
||||
|
||||
|
||||
self.menu_2.addAction(self.action_IPv6)
|
||||
self.menu_2.addAction(self.action_2)
|
||||
self.menu_2.addAction(self.action_3)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#############################################################################
|
||||
# Makefile for building: VirtualMachine
|
||||
# Generated by qmake (3.1) (Qt 5.15.6)
|
||||
# Generated by qmake (3.1) (Qt 5.15.8)
|
||||
# Project: VirtualMachine.pro
|
||||
# Template: app
|
||||
# Command: /usr/lib/qt5/bin/qmake -o Makefile VirtualMachine.pro
|
||||
@@ -86,8 +86,10 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Attica.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_BluezQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KArchive.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KAuth.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KBookmarks.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCMUtils.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCompletion.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri \
|
||||
@@ -95,6 +97,7 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigWidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDeclarative.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGlobalAccel.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGuiAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri \
|
||||
@@ -153,6 +156,7 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkdeclarative.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||
@@ -203,6 +207,10 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandclient.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandclient_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandcompositor.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandcompositor_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webengine.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginecore.pri \
|
||||
@@ -218,6 +226,7 @@ DIST = /usr/lib/x86_64-linux-gnu/qt5/mkspecs/features/spec_pre.prf \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_ModemManagerQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_QApt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_QuickAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Solid.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetCore.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetUi.pri \
|
||||
@@ -280,8 +289,10 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Attica.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_BluezQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KArchive.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KAuth.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KBookmarks.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCMUtils.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCompletion.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri \
|
||||
@@ -289,6 +300,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigWidgets.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDeclarative.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGlobalAccel.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGuiAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri \
|
||||
@@ -347,6 +359,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkdeclarative.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri \
|
||||
@@ -397,6 +410,10 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandclient.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandclient_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandcompositor.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandcompositor_private.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webengine.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginecore.pri \
|
||||
@@ -412,6 +429,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_ModemManagerQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_QApt.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_QuickAddons.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Solid.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetCore.pri \
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetUi.pri \
|
||||
@@ -452,8 +470,10 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/qconfig.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Attica.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_BluezQt.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KArchive.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KAuth.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KBookmarks.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCMUtils.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCodecs.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCompletion.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigCore.pri:
|
||||
@@ -461,6 +481,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KConfigWidgets.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KCoreAddons.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDBusAddons.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KDeclarative.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGlobalAccel.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KGuiAddons.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_KI18n.pri:
|
||||
@@ -519,6 +540,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_devicediscovery_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcommon.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkcore.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkdeclarative.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkgui.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_dtkwidget.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_edid_support_private.pri:
|
||||
@@ -569,6 +591,10 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uiplugin.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_uitools.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_vulkan_support_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandclient.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandclient_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandcompositor.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_waylandcompositor_private.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webchannel.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webengine.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_lib_webenginecore.pri:
|
||||
@@ -584,6 +610,7 @@ Makefile: VirtualMachine.pro /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++/qma
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_ModemManagerQt.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_NetworkManagerQt.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_QApt.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_QuickAddons.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_Solid.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetCore.pri:
|
||||
/usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/qt_SonnetUi.pri:
|
||||
@@ -691,17 +718,17 @@ compiler_moc_header_clean:
|
||||
moc_mainwindow.cpp: mainwindow.h \
|
||||
moc_predefs.h \
|
||||
/usr/lib/qt5/bin/moc
|
||||
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include mainwindow.h -o moc_mainwindow.cpp
|
||||
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/x86_64-linux-gnu/include -I/usr/include/x86_64-linux-gnu -I/usr/include mainwindow.h -o moc_mainwindow.cpp
|
||||
|
||||
moc_infoutils.cpp: infoutils.h \
|
||||
moc_predefs.h \
|
||||
/usr/lib/qt5/bin/moc
|
||||
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include infoutils.h -o moc_infoutils.cpp
|
||||
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/x86_64-linux-gnu/include -I/usr/include/x86_64-linux-gnu -I/usr/include infoutils.h -o moc_infoutils.cpp
|
||||
|
||||
moc_qemusetting.cpp: qemusetting.h \
|
||||
moc_predefs.h \
|
||||
/usr/lib/qt5/bin/moc
|
||||
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/include/x86_64-linux-gnu -I/usr/include qemusetting.h -o moc_qemusetting.cpp
|
||||
/usr/lib/qt5/bin/moc $(DEFINES) --include /home/gfdgd_xi/Desktop/deep-wine-runner/VM-source/moc_predefs.h -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/home/gfdgd_xi/Desktop/deep-wine-runner/VM-source -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/c++/8 -I/usr/include/x86_64-linux-gnu/c++/8 -I/usr/include/c++/8/backward -I/usr/lib/gcc/x86_64-linux-gnu/8/include -I/usr/local/include -I/usr/lib/gcc/x86_64-linux-gnu/8/include-fixed -I/usr/x86_64-linux-gnu/include -I/usr/include/x86_64-linux-gnu -I/usr/include qemusetting.h -o moc_qemusetting.cpp
|
||||
|
||||
compiler_moc_objc_header_make_all:
|
||||
compiler_moc_objc_header_clean:
|
||||
@@ -759,7 +786,8 @@ qemu.o: qemu.cpp qemu.h \
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qemu.o qemu.cpp
|
||||
|
||||
qemusetting.o: qemusetting.cpp qemusetting.h \
|
||||
ui_qemusetting.h
|
||||
ui_qemusetting.h \
|
||||
infoutils.h
|
||||
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o qemusetting.o qemusetting.cpp
|
||||
|
||||
qrc_图标.o: qrc_图标.cpp
|
||||
|
||||
@@ -23,4 +23,4 @@ make -j4
|
||||
## 预编译版本
|
||||
https://gitee.com/gfdgd-xi/deep-wine-runner/tree/main/VM
|
||||
|
||||
# ©2020~2023 gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# ©2020~2023 gfdgd xi
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 4.8.2, 2023-04-22T21:23:25. -->
|
||||
<!-- Written by QtCreator 4.8.2, 2023-07-12T19:05:39. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
@@ -128,7 +128,7 @@
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||
</valuemap>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:1.0
|
||||
# 依照 GPL V3 协议开源
|
||||
################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include <sys/sysinfo.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef BUILDVBOX_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include "command.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef COMMAND_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include "mainwindow.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#include "mainwindow.h"
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QJsonArray>
|
||||
#include <QDesktopServices>
|
||||
#include <QMessageBox>
|
||||
#include <iostream>
|
||||
#include "qemusetting.h"
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
@@ -201,3 +202,69 @@ void MainWindow::on_qemuSetting_clicked()
|
||||
show->show();
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::on_addQemuDisk_triggered()
|
||||
{
|
||||
if(QFile::exists(QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
if(QMessageBox::question(this, "提示", "磁盘文件已存在,是否覆盖?\n覆盖后将无法恢复!") == QMessageBox::No){
|
||||
return;
|
||||
}
|
||||
}
|
||||
QString path = QFileDialog::getOpenFileName(this, "选择 Qemu 镜像", QDir::homePath(), "Qemu镜像(*.qcow2 *.img *.raw *.qcow *.qed *.vdi *.vhdx *.vmdk);;所有文件(*.*)");
|
||||
qDebug() << path;
|
||||
if(path == ""){
|
||||
return;
|
||||
}
|
||||
QDir dir(QDir::homePath() + "/Qemu/Windows");
|
||||
if(!dir.exists()){
|
||||
dir.mkpath(QDir::homePath() + "/Qemu/Windows");
|
||||
}
|
||||
if(QFile::exists(QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
if(!QFile::remove(QDir::homePath() + "/Qemu/Windows/Windows.qcow2") | !QFile::copy(path, QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
QMessageBox::critical(this, "提示", "添加错误!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(!QFile::copy(path, QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
QMessageBox::critical(this, "提示", "添加错误!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
QMessageBox::information(this, "提示", "添加完成!");
|
||||
}
|
||||
|
||||
void MainWindow::on_delQemuDisk_triggered()
|
||||
{
|
||||
if(!QFile::exists(QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
QMessageBox::information(this, "提示", "不存在磁盘文件,无法导出");
|
||||
return;
|
||||
}
|
||||
std::system(("xdg-open \"" + QDir::homePath() + "/Qemu/Windows/\"").toUtf8());
|
||||
}
|
||||
|
||||
void MainWindow::on_addQemuDiskButton_clicked()
|
||||
{
|
||||
MainWindow::on_addQemuDisk_triggered();
|
||||
}
|
||||
|
||||
void MainWindow::on_saveQemuDiskButton_clicked()
|
||||
{
|
||||
MainWindow::on_delQemuDisk_triggered();
|
||||
}
|
||||
|
||||
void MainWindow::on_delQemuDiskButton_clicked()
|
||||
{
|
||||
if(!QFile::exists(QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
QMessageBox::information(this, "提示", "不存在磁盘文件,无法移除");
|
||||
return;
|
||||
}
|
||||
if(QMessageBox::question(this, "提示", "是否删除?\n删除后将无法恢复!") == QMessageBox::No){
|
||||
return;
|
||||
}
|
||||
if(!QFile::remove(QDir::homePath() + "/Qemu/Windows/Windows.qcow2")){
|
||||
QMessageBox::critical(this, "提示", "移除失败");
|
||||
return;
|
||||
}
|
||||
QMessageBox::information(this, "提示", "移除成功");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef MAINWINDOW_H
|
||||
@@ -34,6 +34,16 @@ private slots:
|
||||
|
||||
void on_qemuSetting_clicked();
|
||||
|
||||
void on_addQemuDisk_triggered();
|
||||
|
||||
void on_delQemuDisk_triggered();
|
||||
|
||||
void on_addQemuDiskButton_clicked();
|
||||
|
||||
void on_saveQemuDiskButton_clicked();
|
||||
|
||||
void on_delQemuDiskButton_clicked();
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
long m_cpuAll;
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>807</width>
|
||||
<height>429</height>
|
||||
<width>1058</width>
|
||||
<height>512</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -142,6 +142,13 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="getQemu">
|
||||
<property name="text">
|
||||
<string>安装 Qemu</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="qemuSetting">
|
||||
<property name="text">
|
||||
@@ -150,9 +157,23 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="getQemu">
|
||||
<widget class="QPushButton" name="addQemuDiskButton">
|
||||
<property name="text">
|
||||
<string>安装 Qemu</string>
|
||||
<string>添加/覆盖Qemu磁盘</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saveQemuDiskButton">
|
||||
<property name="text">
|
||||
<string>导出Qemu磁盘</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="delQemuDiskButton">
|
||||
<property name="text">
|
||||
<string>移除Qemu磁盘</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -353,7 +374,7 @@ p, li { white-space: pre-wrap; }
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Github:<a href="https://github.com/gfdgd-xi/deep-wine-runner"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">https://github.com/gfdgd-xi/deep-wine-runner</span></a></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Gitlink:<a href="https://gitlink.org.cn/gfdgd_xi/deep-wine-runner"><span style=" font-size:11pt; text-decoration: underline; color:#0082fa;">https://gitlink.org.cn/gfdgd_xi/deep-wine-runner</span></a></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">此组件也有非常大的缺点,就是相比于 Wine,会需要占用大量的空间、安装需要大量的时间、某些情况下需要相比于 Wine 需要消耗更多的系统资源,但可以更加完美、流畅的运行 Windows 应用,会尽量减少因为缺少或未实现导致的 Windows exe 程序运行异常</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">该组件制作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">该组件制作者:gfdgd xi</p>
|
||||
<hr />
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">参考文献:</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Droid Sans Mono','monospace','monospace'; font-size:11pt; color:#6a9955;">https://juejin.cn/post/7080484519328874510</span></p></body></html></string>
|
||||
@@ -384,6 +405,16 @@ p, li { white-space: pre-wrap; }
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="addQemuDisk">
|
||||
<property name="text">
|
||||
<string>导入/覆盖</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="delQemuDisk">
|
||||
<property name="text">
|
||||
<string>导出</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
*/
|
||||
#include "qemu.h"
|
||||
#include <QDir>
|
||||
@@ -72,7 +72,7 @@ int qemu::Start(bool unShown){
|
||||
if(Command().GetCommand("arch").replace("\n", "").replace(" ", "") == "x86_64"){
|
||||
return system(("kvm " + commandOption + " &").toLatin1());
|
||||
}
|
||||
return system(("qemu-system-x86_64 " + commandOption + " &").toLatin1());
|
||||
return system(("qemu-system-x86_64 -nic model=rtl8139 " + commandOption + " &").toLatin1());
|
||||
}
|
||||
int qemu::Stop(){
|
||||
system("killall qemu-system-x86_64 -9");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef QEMU_H
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
*/
|
||||
#include "vbox.h"
|
||||
#include "command.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
* gfdgd xi
|
||||
* 依照 GPLV3 开源
|
||||
*/
|
||||
#ifndef VBOX_H
|
||||
|
||||
@@ -21,7 +21,7 @@ except:
|
||||
print("无法读取配置")
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
option = f"--hda \"$HOME/Qemu/Windows/Windows.qcow2\" -usb -m {setting['Memory']}M -smp {setting['CPU']} "
|
||||
option = f"-nic model=rtl8139 --hda \"$HOME/Qemu/Windows/Windows.qcow2\" -usb -m {setting['Memory']}M -smp {setting['CPU']} "
|
||||
if setting["EnableKVM"]:
|
||||
command = "kvm"
|
||||
if setting["EnableRDP"]:
|
||||
@@ -30,4 +30,4 @@ if setting["EnableVNC"]:
|
||||
option += f"-display gtk -display vnc=:{setting['VNC']} "
|
||||
if setting["EnableSound"]:
|
||||
option += "-soundhw all "
|
||||
os.system(f"{command} {option}")
|
||||
os.system(f"{command} {option}")
|
||||
|
||||
2
VM/VirtualMachine
Normal file → Executable file
2
VM/VirtualMachine
Normal file → Executable file
@@ -11,4 +11,4 @@ if os.path.exists("/usr/lib/x86_64-linux-gnu/") and not os.system("which qemu-x8
|
||||
os.system(f"qemu-x86_64 '{programPath}/VirtualMachine-x86_64'")
|
||||
exit()
|
||||
print("未安装环境,立即安装!")
|
||||
os.system(f"python3 '{programPath}/../RunCommandWithTerminal.py' '{programPath}/../InstallRuntime/amd64.sh'")
|
||||
os.system(f"python3 '{programPath}/../RunCommandWithTerminal.py' '{programPath}/../InstallRuntime/amd64.sh'")
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18
WineLib/install.sh
Executable file
18
WineLib/install.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
cd $CURRENT_DIR
|
||||
if [[ -f $CURRENT_DIR/usr/ ]]; then
|
||||
echo 运行库已安装,按回车键退出
|
||||
read
|
||||
exit
|
||||
fi
|
||||
aria2c -x 16 -s 16 -d /tmp https://jihulab.com/gfdgd-xi/bwrapruntime/-/raw/main/library.tar.xz
|
||||
if [[ $? != 0 ]]; then
|
||||
echo 安装包下载失败!按回车键退出
|
||||
read
|
||||
fi
|
||||
chmod 777 -Rv .
|
||||
tar -xvf /tmp/library.tar.xz
|
||||
rm -vf /tmp/library.tar.xz
|
||||
echo 安装完成!按回车键退出
|
||||
read
|
||||
14
WineLib/remove.sh
Executable file
14
WineLib/remove.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
cd $CURRENT_DIR
|
||||
if [[ ! -d $CURRENT_DIR/usr/ ]]; then
|
||||
echo 运行库未安装,按回车键退出
|
||||
read
|
||||
exit
|
||||
fi
|
||||
rm -rfv lib
|
||||
rm -rfv lib64
|
||||
rm -rfv usr
|
||||
chmod 777 -Rv ../WineLib
|
||||
echo 删除完成!按回车键退出
|
||||
read
|
||||
27
WineLib/run-more.sh
Executable file
27
WineLib/run-more.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR=$1
|
||||
if [[ ! -d "$CURRENT_DIR/usr" ]]; then
|
||||
zenity --info --text=未安装运行库,无法运行 --no-wrap
|
||||
exit
|
||||
fi
|
||||
if [[ ! -d "$CURRENT_DIR/usr/lib64" ]]; then
|
||||
bwrap --dev-bind / / \
|
||||
--ro-bind "$CURRENT_DIR/usr/lib" /lib \
|
||||
--ro-bind "$CURRENT_DIR/usr" /usr \
|
||||
--ro-bind /usr/share /usr/share \
|
||||
--ro-bind /usr/bin /usr/bin \
|
||||
--ro-bind /usr/sbin /usr/sbin \
|
||||
-- "$@"
|
||||
exit
|
||||
fi
|
||||
if [[ ! -f /lib64 ]] && [[ ! -d /lib64 ]] && [[ ! -L /lib64 ]]; then
|
||||
pkexec ln -s /usr/lib64 /lib64
|
||||
fi
|
||||
bwrap --dev-bind / / \
|
||||
--ro-bind "$CURRENT_DIR/usr/lib" /lib \
|
||||
--ro-bind "$CURRENT_DIR/usr/lib64" /lib \
|
||||
--ro-bind "$CURRENT_DIR/usr" /usr \
|
||||
--ro-bind /usr/share /usr/share \
|
||||
--ro-bind /usr/bin /usr/bin \
|
||||
--ro-bind /usr/sbin /usr/sbin \
|
||||
-- "$@"
|
||||
86
WineLib/run.sh
Executable file
86
WineLib/run.sh
Executable file
@@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
CURRENT_DIR=$(cd $(dirname $0); pwd)
|
||||
if [[ ! -d "$CURRENT_DIR/usr" ]]; then
|
||||
zenity --info --text=未安装运行库,无法运行 --no-wrap
|
||||
exit
|
||||
fi
|
||||
systemNeedCommand=""
|
||||
for libr in `ls /usr/lib`
|
||||
do
|
||||
if [[ -f /usr/lib/$libr/libc.so.6 ]]; then
|
||||
if [[ ! -f "$CURRENT_DIR/usr/lib/$libr/libc.so.6" ]]; then
|
||||
echo $libr
|
||||
systemNeedCommand="$systemNeedCommand --ro-bind /usr/lib/$libr/ /usr/lib/$libr/ "
|
||||
mkdir -p "$CURRENT_DIR/usr/lib/$libr"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
for libr in `ls /usr/lib/ld*.so*`
|
||||
do
|
||||
if [[ -f $libr ]]; then
|
||||
if [[ ! -f "$CURRENT_DIR/$libr" ]]; then
|
||||
systemNeedCommand="$systemNeedCommand --ro-bind $libr $libr "
|
||||
touch "$CURRENT_DIR/$libr"
|
||||
else
|
||||
if [[ ! -s "$CURRENT_DIR/$libr" ]]; then
|
||||
systemNeedCommand="$systemNeedCommand --ro-bind $libr $libr "
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [[ -d /usr/lib64 ]] && [[ ! -d "$CURRENT_DIR/usr/lib64" ]]; then
|
||||
mkdir -p "$CURRENT_DIR/usr/lib64"
|
||||
fi
|
||||
if [[ -d /usr/lib64/ ]]; then
|
||||
for libr in `ls /usr/lib64/ld*.so*`
|
||||
do
|
||||
if [[ -f $libr ]]; then
|
||||
if [[ ! -f "$CURRENT_DIR/$libr" ]]; then
|
||||
systemNeedCommand="$systemNeedCommand --ro-bind $libr $libr "
|
||||
touch "$CURRENT_DIR/$libr"
|
||||
else
|
||||
if [[ ! -s "$CURRENT_DIR/$libr" ]]; then
|
||||
systemNeedCommand="$systemNeedCommand --ro-bind $libr $libr "
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [[ ! -d "$CURRENT_DIR/usr/lib/locale" ]]; then
|
||||
systemNeedCommand="$systemNeedCommand --ro-bind /usr/lib/locale /usr/lib/locale "
|
||||
fi
|
||||
|
||||
if [[ ! -d "$CURRENT_DIR/usr/lib64" ]]; then
|
||||
bwrap --dev-bind / / \
|
||||
--bind "$CURRENT_DIR/usr/lib" /lib \
|
||||
--bind "$CURRENT_DIR/usr" /usr \
|
||||
--ro-bind /usr/share /usr/share \
|
||||
--ro-bind /usr/bin /usr/bin \
|
||||
--ro-bind /usr/sbin /usr/sbin \
|
||||
$systemNeedCommand \
|
||||
-- "$@"
|
||||
exit
|
||||
fi
|
||||
if [[ ! -f /lib64 ]] && [[ ! -d /lib64 ]] && [[ ! -L /lib64 ]]; then
|
||||
pkexec ln -s /usr/lib64 /lib64
|
||||
fi
|
||||
if [[ -L /lib64 ]] || [[ -d /lib64 ]] || [[ -f /lib64 ]];then
|
||||
bwrap --dev-bind / / \
|
||||
--bind "$CURRENT_DIR/usr/lib" /lib \
|
||||
--bind "$CURRENT_DIR/usr/lib64" /lib \
|
||||
--bind "$CURRENT_DIR/usr" /usr \
|
||||
--ro-bind /usr/share /usr/share \
|
||||
--ro-bind /usr/bin /usr/bin \
|
||||
--ro-bind /usr/sbin /usr/sbin \
|
||||
$systemNeedCommand \
|
||||
-- "$@"
|
||||
exit
|
||||
fi
|
||||
bwrap --dev-bind / / \
|
||||
--bind "$CURRENT_DIR/usr/lib" /lib \
|
||||
--bind "$CURRENT_DIR/usr" /usr \
|
||||
--ro-bind /usr/share /usr/share \
|
||||
--ro-bind /usr/bin /usr/bin \
|
||||
--ro-bind /usr/sbin /usr/sbin \
|
||||
$systemNeedCommand \
|
||||
-- "$@"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
if [ $WINE = "" ]; then
|
||||
WINE_CMD="deepin-wine5"
|
||||
WINE_CMD="deepin-wine6-stable"
|
||||
else
|
||||
WINE_CMD=$WINE
|
||||
fi
|
||||
@@ -55,7 +55,6 @@ clean_common_temp()
|
||||
#remove_file "$BottleBase/users/${USER}"
|
||||
purge_dir "$BottleBase/users/Public/Temp"
|
||||
remove_file "$BottleBase/../PACKAGE_VERSION"
|
||||
remove_file "$BottleBase/../update.policy"
|
||||
purge_dir "$BottleBase/deepin"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +1,19 @@
|
||||
Package: spark-deepin-wine-runner
|
||||
Version: 3.2.1~alpha2
|
||||
Version: 3.3.0.1
|
||||
Maintainer: gfdgd xi <3025613752@qq.com>
|
||||
Homepage: https://gitee.com/gfdgd-xi-org/deep-wine-runner
|
||||
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner
|
||||
Architecture: all
|
||||
Severity: serious
|
||||
Certainty: possible
|
||||
Check: binaries
|
||||
Type: binary, udeb
|
||||
Priority: optional
|
||||
Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo, python3-pyperclip
|
||||
Recommends: winbind, wimtools, python3-pyqt5.qtwebengine, qemu-user, binfmt-support, qemu-user-static
|
||||
Depends: python3, python3-pil, libc6, python3-pil.imagetk, python3-pyquery, aria2, curl, unrar | unrar-free , unzip, python3-requests, python3-pyqt5, python3-psutil, deepin-terminal | mate-terminal | gnome-terminal | xfce4-terminal, python3-dbus, python3-pip, p7zip-full, sudo, python3-pyperclip, bubblewrap, zenity
|
||||
Recommends: winbind, wimtools, python3-pyqt5.qtwebengine, binfmt-support, libc6:i386
|
||||
Section: utils
|
||||
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner
|
||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52, spark-deepin-wine-runner
|
||||
Installed-Size: 25856
|
||||
Description: gfdgd xi、为什么您不喜欢熊出没和阿布呢 制作的 wine 运行器
|
||||
3.2.0 更新内容:
|
||||
※1、Windows 应用适配工具新增系统资源显示;
|
||||
※2、Windows 应用适配工具使用 C++ 重写;
|
||||
※3、修复打包器(基于官方生态适配脚本)无法打开的问题;
|
||||
※4、新增运行库功能安装,以实现使用 Qemu User 跨架构运行 Wine 的功能(理论上支持 3a4000 了,但没试过);
|
||||
※5、修复 Chroot 容器的一些问题;
|
||||
※6、修复在 Debian11 安装时缺失依赖 rar 的问题;
|
||||
※7、新增安装 box86、box64 的功能;
|
||||
※8、修复故障反馈功能错误的问题;
|
||||
9、修改程序内的部分网址;
|
||||
10、作者信息变更;
|
||||
11、支持禁用程序的多语言支持(默认禁用,因为是机翻的);
|
||||
12、支持在程序本地翻译缺失的情况下自动机翻缺失语句;
|
||||
13、从此版本开始不再区分吾爱版、Spark 版和 UOS 版;
|
||||
14、新增下载量查询;
|
||||
15、更新程序公告;
|
||||
16、新增断网彩蛋。
|
||||
更新时间:2023年01月19日
|
||||
作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
Conflicts: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
||||
Replaces: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
||||
Provides: spark.deepin-venturi-setter, spark-deepin-wine5-application-packer, spark-deepin-wine-runner-52
|
||||
Installed-Size: 76512
|
||||
Description: Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序,内置了对Wine图形化的支持、各种Wine工具、自制的Wine程序打包器和运行库安装工具等。
|
||||
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低)。
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# 使用系统默认的 sh 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:3.0.0
|
||||
# 更新时间:2022年10月02日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
@@ -9,7 +9,7 @@
|
||||
#################################################################################################################
|
||||
# 非强制性的必应组件,所以成功不成功都行
|
||||
# 程序版本号
|
||||
version=3.2.0
|
||||
version=3.3.0
|
||||
echo 安装组件
|
||||
python3 -m pip install --upgrade pynput --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
|
||||
python3 -m pip install --upgrade xpinyin --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple > /dev/null 2>&1 | true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# 使用系统默认的 sh 运行
|
||||
#################################################################################################################
|
||||
# 作者:gfdgd xi、为什么您不喜欢熊出没和阿布呢
|
||||
# 作者:gfdgd xi
|
||||
# 版本:2.2.0
|
||||
# 更新时间:2022年09月24日
|
||||
# 感谢:感谢 wine、deepin-wine 以及星火团队,提供了 wine、deepin-wine、spark-wine-devel 给大家使用,让我能做这个程序
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
.sass-cache/
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"esnext": true,
|
||||
"indent": 2,
|
||||
"maxlen": 80,
|
||||
"freeze": true,
|
||||
"camelcase": true,
|
||||
"unused": true,
|
||||
"eqnull": true,
|
||||
"proto": true,
|
||||
"supernew": true,
|
||||
"noyield": true,
|
||||
"evil": true,
|
||||
"node": true,
|
||||
"boss": true,
|
||||
"expr": true,
|
||||
"loopfunc": true,
|
||||
"white": true,
|
||||
"maxdepth": 4
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
# Contributing
|
||||
Changes and improvements are more than welcome! Feel free to fork and open a pull request.
|
||||
|
||||
Please follow the house rules to have a bigger chance of your contribution being merged.
|
||||
|
||||
## House rules
|
||||
|
||||
### How to make changes
|
||||
- To make changes, create a new branch based on `master` (do not create one from `gh-pages` unless strictly necessary) and make them there, then create a Pull Request to master.
|
||||
`gh-pages` is different from master in that it contains sharing features, analytics and other things that have no direct bearing with the game. `master` is the "pure" version of the game.
|
||||
- If you want to modify the CSS, please edit the SCSS files present in `style/`: `main.scss` and others. Don't edit the `main.css`, because it's supposed to be generated.
|
||||
In order to compile your SCSS modifications, you need to use the `sass` gem (install it by running `gem install sass` once Ruby is installed).
|
||||
To run SASS, simply use the following command:
|
||||
`sass --unix-newlines --watch style/main.scss`
|
||||
SASS will automatically recompile your css when changed.
|
||||
- `Rakefile` contains some tasks that help during development. Feel free to add useful tasks if needed.
|
||||
- Please use 2-space indentation when editing the JavaScript. A `.jshintrc` file is present, which will help your code to follow the guidelines if you install and run `jshint`.
|
||||
- Please test your modification thoroughly before submitting your Pull Request.
|
||||
|
||||
### Changes that might not be accepted
|
||||
We have to be conservative with the core game. This means that some modifications won't be merged, or will have to be evaluated carefully before being merged:
|
||||
|
||||
- Undo/redo features
|
||||
- Save/reload features
|
||||
- Changes to how the tiles look or their contents
|
||||
- Changes to the layout
|
||||
- Changes to the grid size
|
||||
|
||||
### Changes that are welcome
|
||||
- Bug fixes
|
||||
- Compatibility improvements
|
||||
- "Under the hood" enhancements
|
||||
- Small changes that don't have an impact on the core gameplay
|
||||
@@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Gabriele Cirulli
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -1,38 +0,0 @@
|
||||
# 2048
|
||||
A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone).
|
||||
|
||||
Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/)
|
||||
|
||||
The official app can also be found on the [Play Store](https://play.google.com/store/apps/details?id=com.gabrielecirulli.app2048) and [App Store!](https://itunes.apple.com/us/app/2048-by-gabriele-cirulli/id868076805)
|
||||
|
||||
### Contributions
|
||||
|
||||
[Anna Harren](https://github.com/iirelu/) and [sigod](https://github.com/sigod) are maintainers for this repository.
|
||||
|
||||
Other notable contributors:
|
||||
|
||||
- [TimPetricola](https://github.com/TimPetricola) added best score storage
|
||||
- [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile
|
||||
- [marcingajda](https://github.com/marcingajda) made swipes work on Windows Phone
|
||||
- [mgarciaisaia](https://github.com/mgarciaisaia) added support for Android 2.3
|
||||
|
||||
Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions.
|
||||
|
||||
### Screenshot
|
||||
|
||||
<p align="center">
|
||||
<img src="https://cloud.githubusercontent.com/assets/1175750/8614312/280e5dc2-26f1-11e5-9f1f-5891c3ca8b26.png" alt="Screenshot"/>
|
||||
</p>
|
||||
|
||||
That screenshot is fake, by the way. I never reached 2048 :smile:
|
||||
|
||||
## Contributing
|
||||
Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process.
|
||||
|
||||
You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md)
|
||||
|
||||
## License
|
||||
2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt)
|
||||
|
||||
## Donations
|
||||
I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much!
|
||||
@@ -1,11 +0,0 @@
|
||||
require "date"
|
||||
|
||||
namespace :appcache do
|
||||
desc "update the date in the appcache file (in the gh-pages branch)"
|
||||
task :update do
|
||||
appcache = File.read("cache.appcache")
|
||||
updated = "# Updated: #{DateTime.now}"
|
||||
|
||||
File.write("cache.appcache", appcache.sub(/^# Updated:.*$/, updated))
|
||||
end
|
||||
end
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.2 KiB |
@@ -1,99 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>2048</title>
|
||||
|
||||
<link href="style/main.css" rel="stylesheet" type="text/css">
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<link rel="apple-touch-icon" href="meta/apple-touch-icon.png">
|
||||
<link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x1096.png" media="(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)"> <!-- iPhone 5+ -->
|
||||
<link rel="apple-touch-startup-image" href="meta/apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)"> <!-- iPhone, retina -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<meta name="HandheldFriendly" content="True">
|
||||
<meta name="MobileOptimized" content="320">
|
||||
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0, maximum-scale=1, user-scalable=no, minimal-ui">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="heading">
|
||||
<h1 class="title">2048</h1>
|
||||
<div class="scores-container">
|
||||
<div class="score-container">0</div>
|
||||
<div class="best-container">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="above-game">
|
||||
<p class="game-intro">Join the numbers and get to the <strong>2048 tile!</strong></p>
|
||||
<a class="restart-button">New Game</a>
|
||||
</div>
|
||||
|
||||
<div class="game-container">
|
||||
<div class="game-message">
|
||||
<p></p>
|
||||
<div class="lower">
|
||||
<a class="keep-playing-button">Keep going</a>
|
||||
<a class="retry-button">Try again</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-container">
|
||||
<div class="grid-row">
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
</div>
|
||||
<div class="grid-row">
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
</div>
|
||||
<div class="grid-row">
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
</div>
|
||||
<div class="grid-row">
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
<div class="grid-cell"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tile-container">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="game-explanation">
|
||||
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
<strong class="important">Note:</strong> This site is the official version of 2048. You can play it on your phone via <a href="http://git.io/2048">http://git.io/2048.</a> All other apps or sites are derivatives or fakes, and should be used with caution.
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script src="js/bind_polyfill.js"></script>
|
||||
<script src="js/classlist_polyfill.js"></script>
|
||||
<script src="js/animframe_polyfill.js"></script>
|
||||
<script src="js/keyboard_input_manager.js"></script>
|
||||
<script src="js/html_actuator.js"></script>
|
||||
<script src="js/grid.js"></script>
|
||||
<script src="js/tile.js"></script>
|
||||
<script src="js/local_storage_manager.js"></script>
|
||||
<script src="js/game_manager.js"></script>
|
||||
<script src="js/application.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +0,0 @@
|
||||
(function () {
|
||||
var lastTime = 0;
|
||||
var vendors = ['webkit', 'moz'];
|
||||
for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
|
||||
window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
|
||||
window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] ||
|
||||
window[vendors[x] + 'CancelRequestAnimationFrame'];
|
||||
}
|
||||
|
||||
if (!window.requestAnimationFrame) {
|
||||
window.requestAnimationFrame = function (callback) {
|
||||
var currTime = new Date().getTime();
|
||||
var timeToCall = Math.max(0, 16 - (currTime - lastTime));
|
||||
var id = window.setTimeout(function () {
|
||||
callback(currTime + timeToCall);
|
||||
},
|
||||
timeToCall);
|
||||
lastTime = currTime + timeToCall;
|
||||
return id;
|
||||
};
|
||||
}
|
||||
|
||||
if (!window.cancelAnimationFrame) {
|
||||
window.cancelAnimationFrame = function (id) {
|
||||
clearTimeout(id);
|
||||
};
|
||||
}
|
||||
}());
|
||||
@@ -1,4 +0,0 @@
|
||||
// Wait till the browser is ready to render the game (avoids glitches)
|
||||
window.requestAnimationFrame(function () {
|
||||
new GameManager(4, KeyboardInputManager, HTMLActuator, LocalStorageManager);
|
||||
});
|
||||
@@ -1,9 +0,0 @@
|
||||
Function.prototype.bind = Function.prototype.bind || function (target) {
|
||||
var self = this;
|
||||
return function (args) {
|
||||
if (!(args instanceof Array)) {
|
||||
args = [args];
|
||||
}
|
||||
self.apply(target, args);
|
||||
};
|
||||
};
|
||||
@@ -1,71 +0,0 @@
|
||||
(function () {
|
||||
if (typeof window.Element === "undefined" ||
|
||||
"classList" in document.documentElement) {
|
||||
return;
|
||||
}
|
||||
|
||||
var prototype = Array.prototype,
|
||||
push = prototype.push,
|
||||
splice = prototype.splice,
|
||||
join = prototype.join;
|
||||
|
||||
function DOMTokenList(el) {
|
||||
this.el = el;
|
||||
// The className needs to be trimmed and split on whitespace
|
||||
// to retrieve a list of classes.
|
||||
var classes = el.className.replace(/^\s+|\s+$/g, '').split(/\s+/);
|
||||
for (var i = 0; i < classes.length; i++) {
|
||||
push.call(this, classes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
DOMTokenList.prototype = {
|
||||
add: function (token) {
|
||||
if (this.contains(token)) return;
|
||||
push.call(this, token);
|
||||
this.el.className = this.toString();
|
||||
},
|
||||
contains: function (token) {
|
||||
return this.el.className.indexOf(token) != -1;
|
||||
},
|
||||
item: function (index) {
|
||||
return this[index] || null;
|
||||
},
|
||||
remove: function (token) {
|
||||
if (!this.contains(token)) return;
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == token) break;
|
||||
}
|
||||
splice.call(this, i, 1);
|
||||
this.el.className = this.toString();
|
||||
},
|
||||
toString: function () {
|
||||
return join.call(this, ' ');
|
||||
},
|
||||
toggle: function (token) {
|
||||
if (!this.contains(token)) {
|
||||
this.add(token);
|
||||
} else {
|
||||
this.remove(token);
|
||||
}
|
||||
|
||||
return this.contains(token);
|
||||
}
|
||||
};
|
||||
|
||||
window.DOMTokenList = DOMTokenList;
|
||||
|
||||
function defineElementGetter(obj, prop, getter) {
|
||||
if (Object.defineProperty) {
|
||||
Object.defineProperty(obj, prop, {
|
||||
get: getter
|
||||
});
|
||||
} else {
|
||||
obj.__defineGetter__(prop, getter);
|
||||
}
|
||||
}
|
||||
|
||||
defineElementGetter(HTMLElement.prototype, 'classList', function () {
|
||||
return new DOMTokenList(this);
|
||||
});
|
||||
})();
|
||||
@@ -1,272 +0,0 @@
|
||||
function GameManager(size, InputManager, Actuator, StorageManager) {
|
||||
this.size = size; // Size of the grid
|
||||
this.inputManager = new InputManager;
|
||||
this.storageManager = new StorageManager;
|
||||
this.actuator = new Actuator;
|
||||
|
||||
this.startTiles = 2;
|
||||
|
||||
this.inputManager.on("move", this.move.bind(this));
|
||||
this.inputManager.on("restart", this.restart.bind(this));
|
||||
this.inputManager.on("keepPlaying", this.keepPlaying.bind(this));
|
||||
|
||||
this.setup();
|
||||
}
|
||||
|
||||
// Restart the game
|
||||
GameManager.prototype.restart = function () {
|
||||
this.storageManager.clearGameState();
|
||||
this.actuator.continueGame(); // Clear the game won/lost message
|
||||
this.setup();
|
||||
};
|
||||
|
||||
// Keep playing after winning (allows going over 2048)
|
||||
GameManager.prototype.keepPlaying = function () {
|
||||
this.keepPlaying = true;
|
||||
this.actuator.continueGame(); // Clear the game won/lost message
|
||||
};
|
||||
|
||||
// Return true if the game is lost, or has won and the user hasn't kept playing
|
||||
GameManager.prototype.isGameTerminated = function () {
|
||||
return this.over || (this.won && !this.keepPlaying);
|
||||
};
|
||||
|
||||
// Set up the game
|
||||
GameManager.prototype.setup = function () {
|
||||
var previousState = this.storageManager.getGameState();
|
||||
|
||||
// Reload the game from a previous game if present
|
||||
if (previousState) {
|
||||
this.grid = new Grid(previousState.grid.size,
|
||||
previousState.grid.cells); // Reload grid
|
||||
this.score = previousState.score;
|
||||
this.over = previousState.over;
|
||||
this.won = previousState.won;
|
||||
this.keepPlaying = previousState.keepPlaying;
|
||||
} else {
|
||||
this.grid = new Grid(this.size);
|
||||
this.score = 0;
|
||||
this.over = false;
|
||||
this.won = false;
|
||||
this.keepPlaying = false;
|
||||
|
||||
// Add the initial tiles
|
||||
this.addStartTiles();
|
||||
}
|
||||
|
||||
// Update the actuator
|
||||
this.actuate();
|
||||
};
|
||||
|
||||
// Set up the initial tiles to start the game with
|
||||
GameManager.prototype.addStartTiles = function () {
|
||||
for (var i = 0; i < this.startTiles; i++) {
|
||||
this.addRandomTile();
|
||||
}
|
||||
};
|
||||
|
||||
// Adds a tile in a random position
|
||||
GameManager.prototype.addRandomTile = function () {
|
||||
if (this.grid.cellsAvailable()) {
|
||||
var value = Math.random() < 0.9 ? 2 : 4;
|
||||
var tile = new Tile(this.grid.randomAvailableCell(), value);
|
||||
|
||||
this.grid.insertTile(tile);
|
||||
}
|
||||
};
|
||||
|
||||
// Sends the updated grid to the actuator
|
||||
GameManager.prototype.actuate = function () {
|
||||
if (this.storageManager.getBestScore() < this.score) {
|
||||
this.storageManager.setBestScore(this.score);
|
||||
}
|
||||
|
||||
// Clear the state when the game is over (game over only, not win)
|
||||
if (this.over) {
|
||||
this.storageManager.clearGameState();
|
||||
} else {
|
||||
this.storageManager.setGameState(this.serialize());
|
||||
}
|
||||
|
||||
this.actuator.actuate(this.grid, {
|
||||
score: this.score,
|
||||
over: this.over,
|
||||
won: this.won,
|
||||
bestScore: this.storageManager.getBestScore(),
|
||||
terminated: this.isGameTerminated()
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
// Represent the current game as an object
|
||||
GameManager.prototype.serialize = function () {
|
||||
return {
|
||||
grid: this.grid.serialize(),
|
||||
score: this.score,
|
||||
over: this.over,
|
||||
won: this.won,
|
||||
keepPlaying: this.keepPlaying
|
||||
};
|
||||
};
|
||||
|
||||
// Save all tile positions and remove merger info
|
||||
GameManager.prototype.prepareTiles = function () {
|
||||
this.grid.eachCell(function (x, y, tile) {
|
||||
if (tile) {
|
||||
tile.mergedFrom = null;
|
||||
tile.savePosition();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// Move a tile and its representation
|
||||
GameManager.prototype.moveTile = function (tile, cell) {
|
||||
this.grid.cells[tile.x][tile.y] = null;
|
||||
this.grid.cells[cell.x][cell.y] = tile;
|
||||
tile.updatePosition(cell);
|
||||
};
|
||||
|
||||
// Move tiles on the grid in the specified direction
|
||||
GameManager.prototype.move = function (direction) {
|
||||
// 0: up, 1: right, 2: down, 3: left
|
||||
var self = this;
|
||||
|
||||
if (this.isGameTerminated()) return; // Don't do anything if the game's over
|
||||
|
||||
var cell, tile;
|
||||
|
||||
var vector = this.getVector(direction);
|
||||
var traversals = this.buildTraversals(vector);
|
||||
var moved = false;
|
||||
|
||||
// Save the current tile positions and remove merger information
|
||||
this.prepareTiles();
|
||||
|
||||
// Traverse the grid in the right direction and move tiles
|
||||
traversals.x.forEach(function (x) {
|
||||
traversals.y.forEach(function (y) {
|
||||
cell = { x: x, y: y };
|
||||
tile = self.grid.cellContent(cell);
|
||||
|
||||
if (tile) {
|
||||
var positions = self.findFarthestPosition(cell, vector);
|
||||
var next = self.grid.cellContent(positions.next);
|
||||
|
||||
// Only one merger per row traversal?
|
||||
if (next && next.value === tile.value && !next.mergedFrom) {
|
||||
var merged = new Tile(positions.next, tile.value * 2);
|
||||
merged.mergedFrom = [tile, next];
|
||||
|
||||
self.grid.insertTile(merged);
|
||||
self.grid.removeTile(tile);
|
||||
|
||||
// Converge the two tiles' positions
|
||||
tile.updatePosition(positions.next);
|
||||
|
||||
// Update the score
|
||||
self.score += merged.value;
|
||||
|
||||
// The mighty 2048 tile
|
||||
if (merged.value === 2048) self.won = true;
|
||||
} else {
|
||||
self.moveTile(tile, positions.farthest);
|
||||
}
|
||||
|
||||
if (!self.positionsEqual(cell, tile)) {
|
||||
moved = true; // The tile moved from its original cell!
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if (moved) {
|
||||
this.addRandomTile();
|
||||
|
||||
if (!this.movesAvailable()) {
|
||||
this.over = true; // Game over!
|
||||
}
|
||||
|
||||
this.actuate();
|
||||
}
|
||||
};
|
||||
|
||||
// Get the vector representing the chosen direction
|
||||
GameManager.prototype.getVector = function (direction) {
|
||||
// Vectors representing tile movement
|
||||
var map = {
|
||||
0: { x: 0, y: -1 }, // Up
|
||||
1: { x: 1, y: 0 }, // Right
|
||||
2: { x: 0, y: 1 }, // Down
|
||||
3: { x: -1, y: 0 } // Left
|
||||
};
|
||||
|
||||
return map[direction];
|
||||
};
|
||||
|
||||
// Build a list of positions to traverse in the right order
|
||||
GameManager.prototype.buildTraversals = function (vector) {
|
||||
var traversals = { x: [], y: [] };
|
||||
|
||||
for (var pos = 0; pos < this.size; pos++) {
|
||||
traversals.x.push(pos);
|
||||
traversals.y.push(pos);
|
||||
}
|
||||
|
||||
// Always traverse from the farthest cell in the chosen direction
|
||||
if (vector.x === 1) traversals.x = traversals.x.reverse();
|
||||
if (vector.y === 1) traversals.y = traversals.y.reverse();
|
||||
|
||||
return traversals;
|
||||
};
|
||||
|
||||
GameManager.prototype.findFarthestPosition = function (cell, vector) {
|
||||
var previous;
|
||||
|
||||
// Progress towards the vector direction until an obstacle is found
|
||||
do {
|
||||
previous = cell;
|
||||
cell = { x: previous.x + vector.x, y: previous.y + vector.y };
|
||||
} while (this.grid.withinBounds(cell) &&
|
||||
this.grid.cellAvailable(cell));
|
||||
|
||||
return {
|
||||
farthest: previous,
|
||||
next: cell // Used to check if a merge is required
|
||||
};
|
||||
};
|
||||
|
||||
GameManager.prototype.movesAvailable = function () {
|
||||
return this.grid.cellsAvailable() || this.tileMatchesAvailable();
|
||||
};
|
||||
|
||||
// Check for available matches between tiles (more expensive check)
|
||||
GameManager.prototype.tileMatchesAvailable = function () {
|
||||
var self = this;
|
||||
|
||||
var tile;
|
||||
|
||||
for (var x = 0; x < this.size; x++) {
|
||||
for (var y = 0; y < this.size; y++) {
|
||||
tile = this.grid.cellContent({ x: x, y: y });
|
||||
|
||||
if (tile) {
|
||||
for (var direction = 0; direction < 4; direction++) {
|
||||
var vector = self.getVector(direction);
|
||||
var cell = { x: x + vector.x, y: y + vector.y };
|
||||
|
||||
var other = self.grid.cellContent(cell);
|
||||
|
||||
if (other && other.value === tile.value) {
|
||||
return true; // These two tiles can be merged
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
GameManager.prototype.positionsEqual = function (first, second) {
|
||||
return first.x === second.x && first.y === second.y;
|
||||
};
|
||||
@@ -1,117 +0,0 @@
|
||||
function Grid(size, previousState) {
|
||||
this.size = size;
|
||||
this.cells = previousState ? this.fromState(previousState) : this.empty();
|
||||
}
|
||||
|
||||
// Build a grid of the specified size
|
||||
Grid.prototype.empty = function () {
|
||||
var cells = [];
|
||||
|
||||
for (var x = 0; x < this.size; x++) {
|
||||
var row = cells[x] = [];
|
||||
|
||||
for (var y = 0; y < this.size; y++) {
|
||||
row.push(null);
|
||||
}
|
||||
}
|
||||
|
||||
return cells;
|
||||
};
|
||||
|
||||
Grid.prototype.fromState = function (state) {
|
||||
var cells = [];
|
||||
|
||||
for (var x = 0; x < this.size; x++) {
|
||||
var row = cells[x] = [];
|
||||
|
||||
for (var y = 0; y < this.size; y++) {
|
||||
var tile = state[x][y];
|
||||
row.push(tile ? new Tile(tile.position, tile.value) : null);
|
||||
}
|
||||
}
|
||||
|
||||
return cells;
|
||||
};
|
||||
|
||||
// Find the first available random position
|
||||
Grid.prototype.randomAvailableCell = function () {
|
||||
var cells = this.availableCells();
|
||||
|
||||
if (cells.length) {
|
||||
return cells[Math.floor(Math.random() * cells.length)];
|
||||
}
|
||||
};
|
||||
|
||||
Grid.prototype.availableCells = function () {
|
||||
var cells = [];
|
||||
|
||||
this.eachCell(function (x, y, tile) {
|
||||
if (!tile) {
|
||||
cells.push({ x: x, y: y });
|
||||
}
|
||||
});
|
||||
|
||||
return cells;
|
||||
};
|
||||
|
||||
// Call callback for every cell
|
||||
Grid.prototype.eachCell = function (callback) {
|
||||
for (var x = 0; x < this.size; x++) {
|
||||
for (var y = 0; y < this.size; y++) {
|
||||
callback(x, y, this.cells[x][y]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Check if there are any cells available
|
||||
Grid.prototype.cellsAvailable = function () {
|
||||
return !!this.availableCells().length;
|
||||
};
|
||||
|
||||
// Check if the specified cell is taken
|
||||
Grid.prototype.cellAvailable = function (cell) {
|
||||
return !this.cellOccupied(cell);
|
||||
};
|
||||
|
||||
Grid.prototype.cellOccupied = function (cell) {
|
||||
return !!this.cellContent(cell);
|
||||
};
|
||||
|
||||
Grid.prototype.cellContent = function (cell) {
|
||||
if (this.withinBounds(cell)) {
|
||||
return this.cells[cell.x][cell.y];
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
// Inserts a tile at its position
|
||||
Grid.prototype.insertTile = function (tile) {
|
||||
this.cells[tile.x][tile.y] = tile;
|
||||
};
|
||||
|
||||
Grid.prototype.removeTile = function (tile) {
|
||||
this.cells[tile.x][tile.y] = null;
|
||||
};
|
||||
|
||||
Grid.prototype.withinBounds = function (position) {
|
||||
return position.x >= 0 && position.x < this.size &&
|
||||
position.y >= 0 && position.y < this.size;
|
||||
};
|
||||
|
||||
Grid.prototype.serialize = function () {
|
||||
var cellState = [];
|
||||
|
||||
for (var x = 0; x < this.size; x++) {
|
||||
var row = cellState[x] = [];
|
||||
|
||||
for (var y = 0; y < this.size; y++) {
|
||||
row.push(this.cells[x][y] ? this.cells[x][y].serialize() : null);
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
size: this.size,
|
||||
cells: cellState
|
||||
};
|
||||
};
|
||||
@@ -1,139 +0,0 @@
|
||||
function HTMLActuator() {
|
||||
this.tileContainer = document.querySelector(".tile-container");
|
||||
this.scoreContainer = document.querySelector(".score-container");
|
||||
this.bestContainer = document.querySelector(".best-container");
|
||||
this.messageContainer = document.querySelector(".game-message");
|
||||
|
||||
this.score = 0;
|
||||
}
|
||||
|
||||
HTMLActuator.prototype.actuate = function (grid, metadata) {
|
||||
var self = this;
|
||||
|
||||
window.requestAnimationFrame(function () {
|
||||
self.clearContainer(self.tileContainer);
|
||||
|
||||
grid.cells.forEach(function (column) {
|
||||
column.forEach(function (cell) {
|
||||
if (cell) {
|
||||
self.addTile(cell);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
self.updateScore(metadata.score);
|
||||
self.updateBestScore(metadata.bestScore);
|
||||
|
||||
if (metadata.terminated) {
|
||||
if (metadata.over) {
|
||||
self.message(false); // You lose
|
||||
} else if (metadata.won) {
|
||||
self.message(true); // You win!
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
// Continues the game (both restart and keep playing)
|
||||
HTMLActuator.prototype.continueGame = function () {
|
||||
this.clearMessage();
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.clearContainer = function (container) {
|
||||
while (container.firstChild) {
|
||||
container.removeChild(container.firstChild);
|
||||
}
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.addTile = function (tile) {
|
||||
var self = this;
|
||||
|
||||
var wrapper = document.createElement("div");
|
||||
var inner = document.createElement("div");
|
||||
var position = tile.previousPosition || { x: tile.x, y: tile.y };
|
||||
var positionClass = this.positionClass(position);
|
||||
|
||||
// We can't use classlist because it somehow glitches when replacing classes
|
||||
var classes = ["tile", "tile-" + tile.value, positionClass];
|
||||
|
||||
if (tile.value > 2048) classes.push("tile-super");
|
||||
|
||||
this.applyClasses(wrapper, classes);
|
||||
|
||||
inner.classList.add("tile-inner");
|
||||
inner.textContent = tile.value;
|
||||
|
||||
if (tile.previousPosition) {
|
||||
// Make sure that the tile gets rendered in the previous position first
|
||||
window.requestAnimationFrame(function () {
|
||||
classes[2] = self.positionClass({ x: tile.x, y: tile.y });
|
||||
self.applyClasses(wrapper, classes); // Update the position
|
||||
});
|
||||
} else if (tile.mergedFrom) {
|
||||
classes.push("tile-merged");
|
||||
this.applyClasses(wrapper, classes);
|
||||
|
||||
// Render the tiles that merged
|
||||
tile.mergedFrom.forEach(function (merged) {
|
||||
self.addTile(merged);
|
||||
});
|
||||
} else {
|
||||
classes.push("tile-new");
|
||||
this.applyClasses(wrapper, classes);
|
||||
}
|
||||
|
||||
// Add the inner part of the tile to the wrapper
|
||||
wrapper.appendChild(inner);
|
||||
|
||||
// Put the tile on the board
|
||||
this.tileContainer.appendChild(wrapper);
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.applyClasses = function (element, classes) {
|
||||
element.setAttribute("class", classes.join(" "));
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.normalizePosition = function (position) {
|
||||
return { x: position.x + 1, y: position.y + 1 };
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.positionClass = function (position) {
|
||||
position = this.normalizePosition(position);
|
||||
return "tile-position-" + position.x + "-" + position.y;
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.updateScore = function (score) {
|
||||
this.clearContainer(this.scoreContainer);
|
||||
|
||||
var difference = score - this.score;
|
||||
this.score = score;
|
||||
|
||||
this.scoreContainer.textContent = this.score;
|
||||
|
||||
if (difference > 0) {
|
||||
var addition = document.createElement("div");
|
||||
addition.classList.add("score-addition");
|
||||
addition.textContent = "+" + difference;
|
||||
|
||||
this.scoreContainer.appendChild(addition);
|
||||
}
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.updateBestScore = function (bestScore) {
|
||||
this.bestContainer.textContent = bestScore;
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.message = function (won) {
|
||||
var type = won ? "game-won" : "game-over";
|
||||
var message = won ? "You win!" : "Game over!";
|
||||
|
||||
this.messageContainer.classList.add(type);
|
||||
this.messageContainer.getElementsByTagName("p")[0].textContent = message;
|
||||
};
|
||||
|
||||
HTMLActuator.prototype.clearMessage = function () {
|
||||
// IE only takes one value to remove at a time.
|
||||
this.messageContainer.classList.remove("game-won");
|
||||
this.messageContainer.classList.remove("game-over");
|
||||
};
|
||||
@@ -1,144 +0,0 @@
|
||||
function KeyboardInputManager() {
|
||||
this.events = {};
|
||||
|
||||
if (window.navigator.msPointerEnabled) {
|
||||
//Internet Explorer 10 style
|
||||
this.eventTouchstart = "MSPointerDown";
|
||||
this.eventTouchmove = "MSPointerMove";
|
||||
this.eventTouchend = "MSPointerUp";
|
||||
} else {
|
||||
this.eventTouchstart = "touchstart";
|
||||
this.eventTouchmove = "touchmove";
|
||||
this.eventTouchend = "touchend";
|
||||
}
|
||||
|
||||
this.listen();
|
||||
}
|
||||
|
||||
KeyboardInputManager.prototype.on = function (event, callback) {
|
||||
if (!this.events[event]) {
|
||||
this.events[event] = [];
|
||||
}
|
||||
this.events[event].push(callback);
|
||||
};
|
||||
|
||||
KeyboardInputManager.prototype.emit = function (event, data) {
|
||||
var callbacks = this.events[event];
|
||||
if (callbacks) {
|
||||
callbacks.forEach(function (callback) {
|
||||
callback(data);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
KeyboardInputManager.prototype.listen = function () {
|
||||
var self = this;
|
||||
|
||||
var map = {
|
||||
38: 0, // Up
|
||||
39: 1, // Right
|
||||
40: 2, // Down
|
||||
37: 3, // Left
|
||||
75: 0, // Vim up
|
||||
76: 1, // Vim right
|
||||
74: 2, // Vim down
|
||||
72: 3, // Vim left
|
||||
87: 0, // W
|
||||
68: 1, // D
|
||||
83: 2, // S
|
||||
65: 3 // A
|
||||
};
|
||||
|
||||
// Respond to direction keys
|
||||
document.addEventListener("keydown", function (event) {
|
||||
var modifiers = event.altKey || event.ctrlKey || event.metaKey ||
|
||||
event.shiftKey;
|
||||
var mapped = map[event.which];
|
||||
|
||||
if (!modifiers) {
|
||||
if (mapped !== undefined) {
|
||||
event.preventDefault();
|
||||
self.emit("move", mapped);
|
||||
}
|
||||
}
|
||||
|
||||
// R key restarts the game
|
||||
if (!modifiers && event.which === 82) {
|
||||
self.restart.call(self, event);
|
||||
}
|
||||
});
|
||||
|
||||
// Respond to button presses
|
||||
this.bindButtonPress(".retry-button", this.restart);
|
||||
this.bindButtonPress(".restart-button", this.restart);
|
||||
this.bindButtonPress(".keep-playing-button", this.keepPlaying);
|
||||
|
||||
// Respond to swipe events
|
||||
var touchStartClientX, touchStartClientY;
|
||||
var gameContainer = document.getElementsByClassName("game-container")[0];
|
||||
|
||||
gameContainer.addEventListener(this.eventTouchstart, function (event) {
|
||||
if ((!window.navigator.msPointerEnabled && event.touches.length > 1) ||
|
||||
event.targetTouches.length > 1) {
|
||||
return; // Ignore if touching with more than 1 finger
|
||||
}
|
||||
|
||||
if (window.navigator.msPointerEnabled) {
|
||||
touchStartClientX = event.pageX;
|
||||
touchStartClientY = event.pageY;
|
||||
} else {
|
||||
touchStartClientX = event.touches[0].clientX;
|
||||
touchStartClientY = event.touches[0].clientY;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
gameContainer.addEventListener(this.eventTouchmove, function (event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
|
||||
gameContainer.addEventListener(this.eventTouchend, function (event) {
|
||||
if ((!window.navigator.msPointerEnabled && event.touches.length > 0) ||
|
||||
event.targetTouches.length > 0) {
|
||||
return; // Ignore if still touching with one or more fingers
|
||||
}
|
||||
|
||||
var touchEndClientX, touchEndClientY;
|
||||
|
||||
if (window.navigator.msPointerEnabled) {
|
||||
touchEndClientX = event.pageX;
|
||||
touchEndClientY = event.pageY;
|
||||
} else {
|
||||
touchEndClientX = event.changedTouches[0].clientX;
|
||||
touchEndClientY = event.changedTouches[0].clientY;
|
||||
}
|
||||
|
||||
var dx = touchEndClientX - touchStartClientX;
|
||||
var absDx = Math.abs(dx);
|
||||
|
||||
var dy = touchEndClientY - touchStartClientY;
|
||||
var absDy = Math.abs(dy);
|
||||
|
||||
if (Math.max(absDx, absDy) > 10) {
|
||||
// (right : left) : (down : up)
|
||||
self.emit("move", absDx > absDy ? (dx > 0 ? 1 : 3) : (dy > 0 ? 2 : 0));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
KeyboardInputManager.prototype.restart = function (event) {
|
||||
event.preventDefault();
|
||||
this.emit("restart");
|
||||
};
|
||||
|
||||
KeyboardInputManager.prototype.keepPlaying = function (event) {
|
||||
event.preventDefault();
|
||||
this.emit("keepPlaying");
|
||||
};
|
||||
|
||||
KeyboardInputManager.prototype.bindButtonPress = function (selector, fn) {
|
||||
var button = document.querySelector(selector);
|
||||
button.addEventListener("click", fn.bind(this));
|
||||
button.addEventListener(this.eventTouchend, fn.bind(this));
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user