mirror of
https://gitee.com/gfdgd-xi/deep-wine-runner
synced 2025-01-12 17:48:27 +08:00
用于检测VB6的demo完成
This commit is contained in:
parent
7b20666c87
commit
314a685395
@ -20,11 +20,14 @@ import PyQt5.QtWidgets as QtWidgets
|
||||
from UI.AutoConfig import *
|
||||
from Model import *
|
||||
|
||||
urlSources = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto",
|
||||
urlSourcesList = [
|
||||
"https://code.gitlink.org.cn/gfdgd_xi/wine-runner-list/raw/branch/master/auto", # Gitlink 源
|
||||
"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 源
|
||||
"http://gfdgdxi.msns.cn/wine-runner-list/auto/", # 备用源,纯 IPv6 源
|
||||
"http://127.0.0.1/wine-runner-list/auto/" # 本地测试源
|
||||
][0]
|
||||
]
|
||||
urlSources = urlSourcesList[0]
|
||||
lists = []
|
||||
class ProgramRunStatusUpload():
|
||||
msgWindow = None
|
||||
@ -323,6 +326,26 @@ def readtxt(path):
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
def ChangeSources():
|
||||
global urlSources
|
||||
sources = [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action]
|
||||
for i in range(0, len(sources)):
|
||||
if sources[i].isChecked():
|
||||
urlSources = urlSourcesList[i]
|
||||
# 解析云列表
|
||||
try:
|
||||
# 获取列表
|
||||
lists = json.loads(requests.get(f"{urlSources}/list.json").text)
|
||||
# 解释列表并显示在 GUI 上
|
||||
nmodel = QtGui.QStandardItemModel(window)
|
||||
for i in lists:
|
||||
nmodel.appendRow(QtGui.QStandardItem(i[0]))
|
||||
ui.searchList.setModel(nmodel)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
QtWidgets.QMessageBox.critical(window, "提示", "无法连接服务器")
|
||||
break
|
||||
|
||||
if __name__ == "__main__":
|
||||
homePath = os.path.expanduser('~')
|
||||
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
|
||||
@ -343,6 +366,18 @@ if __name__ == "__main__":
|
||||
window.setWindowIcon(QtGui.QIcon(f"{programPath}/deepin-wine-runner.svg"))
|
||||
iconPath = "{}/deepin-wine-runner.svg".format(programPath)
|
||||
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.action_IPv6)
|
||||
sourcesGroup.addAction(ui.action)
|
||||
sourcesGroup.triggered.connect(ChangeSources)
|
||||
sourcesGroup.setExclusive(True)
|
||||
#for i in [ui.actionGitlink, ui.actionGitee, ui.actionGithub, ui.action_IPv6, ui.action]:
|
||||
#i.triggered.connect(ChangeSources)
|
||||
#pass
|
||||
# 连接信号和槽
|
||||
ui.saerchBotton.clicked.connect(Connect.SearchBotton_Clicked)
|
||||
ui.uploadFen.clicked.connect(UploadFen)
|
||||
|
@ -50,10 +50,12 @@ class Ui_MainWindow(object):
|
||||
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
|
||||
MainWindow.setCentralWidget(self.centralwidget)
|
||||
self.menubar = QtWidgets.QMenuBar(MainWindow)
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 33))
|
||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 36))
|
||||
self.menubar.setObjectName("menubar")
|
||||
self.menu = QtWidgets.QMenu(self.menubar)
|
||||
self.menu.setObjectName("menu")
|
||||
self.menu_2 = QtWidgets.QMenu(self.menubar)
|
||||
self.menu_2.setObjectName("menu_2")
|
||||
MainWindow.setMenuBar(self.menubar)
|
||||
self.about = QtWidgets.QAction(MainWindow)
|
||||
self.about.setObjectName("about")
|
||||
@ -63,10 +65,32 @@ class Ui_MainWindow(object):
|
||||
self.help.setObjectName("help")
|
||||
self.openFile = QtWidgets.QAction(MainWindow)
|
||||
self.openFile.setObjectName("openFile")
|
||||
self.actionGitlink = QtWidgets.QAction(MainWindow)
|
||||
self.actionGitlink.setCheckable(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.setObjectName("actionGithub")
|
||||
self.action_IPv6 = QtWidgets.QAction(MainWindow)
|
||||
self.action_IPv6.setCheckable(True)
|
||||
self.action_IPv6.setObjectName("action_IPv6")
|
||||
self.action = QtWidgets.QAction(MainWindow)
|
||||
self.action.setCheckable(True)
|
||||
self.action.setObjectName("action")
|
||||
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.action_IPv6)
|
||||
self.menu_2.addAction(self.action)
|
||||
self.menubar.addAction(self.menu.menuAction())
|
||||
self.menubar.addAction(self.menu_2.menuAction())
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
@ -81,8 +105,14 @@ class Ui_MainWindow(object):
|
||||
self.uploadFen.setText(_translate("MainWindow", "提交选中项的评分"))
|
||||
self.runBotton.setText(_translate("MainWindow", "部署此方案"))
|
||||
self.menu.setTitle(_translate("MainWindow", "程序"))
|
||||
self.menu_2.setTitle(_translate("MainWindow", "切换源"))
|
||||
self.about.setText(_translate("MainWindow", "关于"))
|
||||
self.exitProgram.setText(_translate("MainWindow", "退出程序"))
|
||||
self.help.setText(_translate("MainWindow", "帮助"))
|
||||
self.openFile.setText(_translate("MainWindow", "打开本地部署脚本"))
|
||||
self.actionGitlink.setText(_translate("MainWindow", "Gitlink 源"))
|
||||
self.actionGitee.setText(_translate("MainWindow", "Gitee 源"))
|
||||
self.actionGithub.setText(_translate("MainWindow", "Github 源"))
|
||||
self.action_IPv6.setText(_translate("MainWindow", "备用源(只限IPv6用户)"))
|
||||
self.action.setText(_translate("MainWindow", "本地测试源"))
|
||||
|
||||
|
@ -92,7 +92,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>33</height>
|
||||
<height>36</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
@ -103,7 +103,18 @@
|
||||
<addaction name="separator"/>
|
||||
<addaction name="exitProgram"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
<property name="title">
|
||||
<string>切换源</string>
|
||||
</property>
|
||||
<addaction name="actionGitlink"/>
|
||||
<addaction name="actionGitee"/>
|
||||
<addaction name="actionGithub"/>
|
||||
<addaction name="action_IPv6"/>
|
||||
<addaction name="action"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="menu_2"/>
|
||||
</widget>
|
||||
<action name="about">
|
||||
<property name="text">
|
||||
@ -125,6 +136,49 @@
|
||||
<string>打开本地部署脚本</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGitlink">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gitlink 源</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGitee">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Gitee 源</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionGithub">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Github 源</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_IPv6">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>备用源(只限IPv6用户)</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>本地测试源</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
Binary file not shown.
126
demo/CheckVB6/Form1.frm
Normal file
126
demo/CheckVB6/Form1.frm
Normal file
@ -0,0 +1,126 @@
|
||||
VERSION 5.00
|
||||
Begin VB.Form Form1
|
||||
Caption = "Form1"
|
||||
ClientHeight = 3600
|
||||
ClientLeft = 60
|
||||
ClientTop = 345
|
||||
ClientWidth = 5880
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":0000
|
||||
LinkTopic = "Form1"
|
||||
ScaleHeight = 3600
|
||||
ScaleWidth = 5880
|
||||
StartUpPosition = 3 '窗口缺省
|
||||
Begin VB.DriveListBox Drive1
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":000F
|
||||
Height = 300
|
||||
Left = 4080
|
||||
TabIndex = 8
|
||||
Top = 1680
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.ComboBox Combo1
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":001E
|
||||
Height = 300
|
||||
Left = 4920
|
||||
TabIndex = 7
|
||||
Text = "Combo1"
|
||||
Top = 840
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.ListBox List1
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":002D
|
||||
Height = 420
|
||||
Left = 3720
|
||||
TabIndex = 6
|
||||
Top = 720
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.OptionButton Option2
|
||||
Caption = "Option2"
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":003C
|
||||
Height = 255
|
||||
Left = 1920
|
||||
TabIndex = 5
|
||||
Top = 3240
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.OptionButton Option1
|
||||
Caption = "Option1"
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":004B
|
||||
Height = 255
|
||||
Left = 480
|
||||
TabIndex = 4
|
||||
Top = 3240
|
||||
Width = 975
|
||||
End
|
||||
Begin VB.CheckBox Check1
|
||||
Caption = "Check1"
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":005A
|
||||
Height = 375
|
||||
Left = 2400
|
||||
TabIndex = 3
|
||||
Top = 2520
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.TextBox Text1
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":0069
|
||||
Height = 495
|
||||
Left = 2520
|
||||
TabIndex = 2
|
||||
Text = "Text1"
|
||||
Top = 1680
|
||||
Width = 1335
|
||||
End
|
||||
Begin VB.CommandButton Command1
|
||||
Caption = "Command1"
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":0078
|
||||
Height = 615
|
||||
Left = 2520
|
||||
TabIndex = 1
|
||||
Top = 720
|
||||
Width = 855
|
||||
End
|
||||
Begin VB.Image Image1
|
||||
BorderStyle = 1 'Fixed Single
|
||||
Height = 1905
|
||||
Left = 240
|
||||
Picture = "Form1.frx":0087
|
||||
Stretch = -1 'True
|
||||
Top = 840
|
||||
Width = 1905
|
||||
End
|
||||
Begin VB.Label Label1
|
||||
Caption = "此程序用于判断 Wine 内是否能正确运行 Visual Basic 6 程序"
|
||||
BeginProperty Font
|
||||
EndProperty
|
||||
Font = "Form1.frx":558B
|
||||
Height = 375
|
||||
Left = 120
|
||||
TabIndex = 0
|
||||
Top = 120
|
||||
Width = 5655
|
||||
End
|
||||
End
|
||||
Attribute VB_Name = "Form1"
|
||||
Attribute VB_GlobalNameSpace = False
|
||||
Attribute VB_Creatable = False
|
||||
Attribute VB_PredeclaredId = True
|
||||
Attribute VB_Exposed = False
|
BIN
demo/CheckVB6/Form1.frx
Normal file
BIN
demo/CheckVB6/Form1.frx
Normal file
Binary file not shown.
BIN
demo/CheckVB6/工程1.exe
Executable file
BIN
demo/CheckVB6/工程1.exe
Executable file
Binary file not shown.
29
demo/CheckVB6/工程1.vbp
Normal file
29
demo/CheckVB6/工程1.vbp
Normal file
@ -0,0 +1,29 @@
|
||||
Type=Exe
|
||||
Form=Form1.frm
|
||||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\windows\system32\stdole2.tlb#OLE Automation
|
||||
Startup="Form1"
|
||||
Command32=""
|
||||
Name="¹¤³Ì1"
|
||||
HelpContextID="0"
|
||||
CompatibleMode="0"
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
RevisionVer=0
|
||||
AutoIncrementVer=0
|
||||
ServerSupportFiles=0
|
||||
VersionCompanyName="FREE"
|
||||
CompilationType=0
|
||||
OptimizationType=0
|
||||
FavorPentiumPro(tm)=0
|
||||
CodeViewDebugInfo=0
|
||||
NoAliasing=0
|
||||
BoundsCheck=0
|
||||
OverflowCheck=0
|
||||
FlPointCheck=0
|
||||
FDIVCheck=0
|
||||
UnroundedFP=0
|
||||
StartMode=0
|
||||
Unattended=0
|
||||
Retained=0
|
||||
ThreadPerObject=0
|
||||
MaxNumberOfThreads=1
|
BIN
spark-deepin-wine-runner-new.png
Normal file
BIN
spark-deepin-wine-runner-new.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user