Update flie on 2024/2/19

This commit is contained in:
dengrb1 2024-02-19 22:30:12 +08:00 committed by dengrb1
parent 2647109751
commit ff96b1665c
10 changed files with 1239 additions and 433 deletions

254
LICENSE
View File

@ -1,127 +1,127 @@
木兰宽松许可证, 第2版 木兰宽松许可证, 第2版
木兰宽松许可证, 第2版 木兰宽松许可证, 第2版
2020年1月 http://license.coscl.org.cn/MulanPSL2 2020年1月 http://license.coscl.org.cn/MulanPSL2
您对“软件”的复制、使用、修改及分发受木兰宽松许可证第2版“本许可证”的如下条款的约束 您对“软件”的复制、使用、修改及分发受木兰宽松许可证第2版“本许可证”的如下条款的约束
0. 定义 0. 定义
“软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
“贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
“贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
“法人实体”是指提交贡献的机构及其“关联实体”。 “法人实体”是指提交贡献的机构及其“关联实体”。
“关联实体”是指对“本许可证”下的行为方而言控制、受控制或与其共同受控制的机构此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 “关联实体”是指对“本许可证”下的行为方而言控制、受控制或与其共同受控制的机构此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
1. 授予版权许可 1. 授予版权许可
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
2. 授予专利许可 2. 授予专利许可
每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
3. 无商标许可 3. 无商标许可
“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可但您为满足第4条规定的声明义务而必须使用除外。 “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可但您为满足第4条规定的声明义务而必须使用除外。
4. 分发限制 4. 分发限制
您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
5. 免责声明与责任限制 5. 免责声明与责任限制
“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
6. 语言 6. 语言
“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
条款结束 条款结束
如何将木兰宽松许可证第2版应用到您的软件 如何将木兰宽松许可证第2版应用到您的软件
如果您希望将木兰宽松许可证第2版应用到您的新软件为了方便接收者查阅建议您完成如下三步 如果您希望将木兰宽松许可证第2版应用到您的新软件为了方便接收者查阅建议您完成如下三步
1 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; 1 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
2 请您在软件包的一级目录下创建以“LICENSE”为名的文件将整个许可证文本放入该文件中 2 请您在软件包的一级目录下创建以“LICENSE”为名的文件将整个许可证文本放入该文件中
3 请将如下声明文本放入每个源文件的头部注释中。 3 请将如下声明文本放入每个源文件的头部注释中。
Copyright (c) 2024 dengrb1 Copyright (c) 2024 dengrb1
Pmcl is licensed under Mulan PSL v2. Pmcl is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at: You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. See the Mulan PSL v2 for more details.
Mulan Permissive Software LicenseVersion 2 Mulan Permissive Software LicenseVersion 2
Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2) Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2)
January 2020 http://license.coscl.org.cn/MulanPSL2 January 2020 http://license.coscl.org.cn/MulanPSL2
Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:
0. Definition 0. Definition
Software means the program and related documents which are licensed under this License and comprise all Contribution(s). Software means the program and related documents which are licensed under this License and comprise all Contribution(s).
Contribution means the copyrightable work licensed by a particular Contributor under this License. Contribution means the copyrightable work licensed by a particular Contributor under this License.
Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License.
Legal Entity means the entity making a Contribution and all its Affiliates. Legal Entity means the entity making a Contribution and all its Affiliates.
Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, control means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, control means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.
1. Grant of Copyright License 1. Grant of Copyright License
Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.
2. Grant of Patent License 2. Grant of Patent License
Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.
3. No Trademark License 3. No Trademark License
No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in Section 4.
4. Distribution Restriction 4. Distribution Restriction
You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.
5. Disclaimer of Warranty and Limitation of Liability 5. Disclaimer of Warranty and Limitation of Liability
THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW ITS CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW ITS CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
6. Language 6. Language
THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.
END OF THE TERMS AND CONDITIONS END OF THE TERMS AND CONDITIONS
How to Apply the Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2) to Your Software How to Apply the Mulan Permissive Software LicenseVersion 2 (Mulan PSL v2) to Your Software
To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps:
i Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; i Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner;
ii Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package; ii Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package;
iii Attach the statement to the appropriate annotated syntax at the beginning of each source file. iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
Copyright (c) [Year] [name of copyright holder] Copyright (c) [Year] [name of copyright holder]
[Software Name] is licensed under Mulan PSL v2. [Software Name] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at: You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details. See the Mulan PSL v2 for more details.

View File

@ -1,24 +1,25 @@
# Pmcl:Python minecraft launcher # Pmcl:Python minecraft launcher
------------------------- -------------------------
#### 介绍 ## 介绍
用python制作的我的世界1.8.9启动器 用python制作的我的世界1.8.9启动器
可以把我的世界1.8.9forge版启动! 可以把我的世界1.8.9forge版启动!
支持vape一键注入 支持vape一键注入
### Gitee库 ### Gitee库
此项目在Github上面也已开源主要更新在Gitee所以GitHub更新会慢一些 此项目在Gitee上面也已开源主要更新在Gitee所以GitHub更新会慢一些
项目地址:[https://github.com/dengrb1/pmcl](https://) 项目地址:[https://gitee.com/dengrb1/pmcl](https://)
#### 安装教程 #### 安装教程
1. 从[https://gitee.com/dengrb1/pmcl/releases](http://)里下载最新版本 _**文件开头是“Pmcl”全都要下载**_ 1. 从[https://gitee.com/dengrb1/pmcl/releases](http://)里下载最新版本 _**文件开头是“Pmcl”全都要下载**_
2. 打开**pmcl_setup.7z.001** 文件并解压 2. 打开**pmcl_setup.7z.001** 文件并解压
3. 打开安装包安装完成即可使用 3. 打开安装包安装完成即可使用
**因为gitee的总附件只有1GB的存储空间所以现在无法发送安装包问题以后可能会修复**
#### 更新日志 #### 更新日志
更新日志可能不是最新,请到[https://gitee.com/dengrb1/pmcl/releases](http://)里查看最新版本的更新日志!!
1.0.0 没什么好说的,自己看 1.0.0 没什么好说的,自己看
1.0.1 加入游戏启动检测,并增加程序自由性 1.0.1 加入游戏启动检测,并增加程序自由性
1.0.2 加入检测vape是否启动加入保存配置功能测试修复无法启动vape lite的BUG

View File

@ -1,2 +1,2 @@
set mypath=%cd% set mypath=%cd%
start /d "%mypath%\fix\" server.exe start /d "%mypath%\fix\" server.exe

47
jc.py
View File

@ -4,16 +4,41 @@ from time import sleep
import shelve import shelve
print('版本:V1.0.1') def run():
try:
os.startfile('pmcl_main.exe')
except:
error()
print('初始化已完成!')
sleep(1.2)
sys.exit()
def error():
print('==================================')
print('启动失败!')
print('请检查文件是否完整再重启!')
sleep(1)
sys.exit()
print('版本:V1.1')
print('正在初始化...') print('正在初始化...')
print('可能会被360等杀毒软件杀掉使用前请关闭杀毒软件或把此启动器的所有文件加入白名单')
ty = input('是否同意使用本软件y/n')
with shelve.open('main') as db: if ty == 'y' or ty == 'Y':
db['startgame'] = False print('欢迎使用Python Minecraft Launcher')
# db['vape_run'] = False print('项目地址:https://gitee.com/dengrb1/pmcl')
db.close() print('作者:dengrb1')
print('本项目完全没有病毒,您可以放心使用!!')
with shelve.open('main') as db:
print('初始化已完成!') db['startgame'] = False
sleep(1.5) db['vaper'] = False
os.startfile('pmcl_main.exe') db.close()
sys.exit() run()
elif ty == 'n' or ty == 'N':
print('已拒绝!')
sleep(1)
sys.exit()
else:
print('输入错误!')
sleep(1)
sys.exit()

18
kg.py
View File

@ -1,18 +0,0 @@
import os
import shelve
import sys
from time import sleep
DIR = os.getcwd()
print(DIR)
with shelve.open('main') as db:
startgame = db.get('startgame')
if startgame == False:
print("没有检测到运行我的世界")
print('请在启动器里启动后在注入!!')
sleep(3)
sys.exit()
else:
os.startfile('fix.bat')
os.system('start vape\lite\start.bat')

134
kg.ui Normal file
View File

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>306</width>
<height>250</height>
</rect>
</property>
<property name="windowTitle">
<string>选择外挂</string>
</property>
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>90</x>
<y>190</y>
<width>121</width>
<height>23</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);
color: white;
font-size: 20px;
font-weight: bold;
border-radius: 25px;
}
QPushButton:hover {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);
}
QPushButton:pressed {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>确定</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>70</x>
<y>20</y>
<width>171</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt; font-weight:600; color:#ff0000;&quot;&gt;请选择外挂&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>70</x>
<y>100</y>
<width>51</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;版本:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox">
<property name="geometry">
<rect>
<x>120</x>
<y>100</y>
<width>111</width>
<height>22</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">QComboBox {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:1, stop:0 #f5f5f7, stop:1 #dedee0);
border: 1px solid whitesmoke;
border-radius: 3px;
padding-left: 15px;
color: gray;
}
QComboBox::drop-down {
width: 22px;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
QComboBox::down-arrow {
width: 16px;
height: 16px;
image: url(PATH_TO_IMG);
}
QComboBox QAbstractItemView {
color: gray;
border: none;
outline: none;
background-color: #dedee0;
}
QComboBox QScrollBar:vertical {
width: 2px;
background-color: white;
}
QComboBox QScrollBar::handle:vertical {
background-color: #b2bdaf;
}
&quot;&quot;&quot;)</string>
</property>
<item>
<property name="text">
<string>Vape lite</string>
</property>
</item>
<item>
<property name="text">
<string>Vape V4</string>
</property>
</item>
</widget>
</widget>
<resources/>
<connections/>
</ui>

687
pmcl.py
View File

@ -1,144 +1,543 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pmcl_main.ui' # Form implementation generated from reading ui file 'pmcl_main.ui'
# #
# Created by: PyQt5 UI code generator 5.15.9 # Created by: PyQt5 UI code generator 5.15.9
# #
# WARNING: Any manual changes made to this file will be lost when pyuic5 is # WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing. # run again. Do not edit this file unless you know what you are doing.
import os import os
import shelve import shelve
import sys import sys
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtCore, QtWidgets
from PyQt5.QtWidgets import QMessageBox from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtGui import QPalette, QColor
from PyQt5.QtWidgets import QWidget, QGraphicsBlurEffect
class Ui_MainWindow(QtWidgets.QMainWindow): from PyQt5.QtCore import Qt
def __init__(self):
super(Ui_MainWindow, self).__init__() from time import sleep
self.setupUi(self)
def setupUi(self, MainWindow): class Ui_MainWindow(QtWidgets.QMainWindow):
MainWindow.setObjectName("MainWindow") def __init__(self):
MainWindow.resize(475, 226) super(Ui_MainWindow, self).__init__()
self.centralwidget = QtWidgets.QWidget(MainWindow) self.setupUi(self)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) def setupUi(self, MainWindow):
self.gridLayout.setObjectName("gridLayout") MainWindow.setObjectName("MainWindow")
self.horizontalLayout_3 = QtWidgets.QHBoxLayout() MainWindow.resize(534, 226)
self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.centralwidget = QtWidgets.QWidget(MainWindow)
self.label_4 = QtWidgets.QLabel(self.centralwidget) self.centralwidget.setObjectName("centralwidget")
self.label_4.setObjectName("label_4") self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.horizontalLayout_3.addWidget(self.label_4) self.gridLayout.setObjectName("gridLayout")
self.maxmb_t = QtWidgets.QLineEdit(self.centralwidget) self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.maxmb_t.setObjectName("maxmb_t") self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.horizontalLayout_3.addWidget(self.maxmb_t) self.label_3 = QtWidgets.QLabel(self.centralwidget)
self.gridLayout.addLayout(self.horizontalLayout_3, 2, 1, 1, 1) self.label_3.setObjectName("label_3")
self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.horizontalLayout_2.addWidget(self.label_3)
self.pushButton.setObjectName("pushButton") self.username = QtWidgets.QLineEdit(self.centralwidget)
self.gridLayout.addWidget(self.pushButton, 4, 4, 1, 1) self.username.setStyleSheet("QLineEdit {\n"
self.label = QtWidgets.QLabel(self.centralwidget) " border-top: none;\n"
self.label.setObjectName("label") " border-left: none;\n"
self.gridLayout.addWidget(self.label, 0, 1, 1, 4) " border-right: none;\n"
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() " border-bottom: 1px solid black;\n"
self.horizontalLayout_2.setObjectName("horizontalLayout_2") " background-color: transparent;\n"
self.label_3 = QtWidgets.QLabel(self.centralwidget) " }\n"
self.label_3.setObjectName("label_3") " \n"
self.horizontalLayout_2.addWidget(self.label_3) " QLineEdit:focus {\n"
self.username = QtWidgets.QLineEdit(self.centralwidget) " border-bottom: 1px solid #2a70f4;\n"
self.username.setObjectName("username") " }\n"
self.horizontalLayout_2.addWidget(self.username) " \"\"\")")
self.gridLayout.addLayout(self.horizontalLayout_2, 2, 2, 1, 3) self.username.setObjectName("username")
spacerItem = QtWidgets.QSpacerItem(454, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addWidget(self.username)
self.gridLayout.addItem(spacerItem, 1, 1, 1, 4) self.gridLayout.addLayout(self.horizontalLayout_2, 1, 2, 1, 3)
self.horizontalLayout = QtWidgets.QHBoxLayout() self.label = QtWidgets.QLabel(self.centralwidget)
self.horizontalLayout.setObjectName("horizontalLayout") self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(self.centralwidget) self.gridLayout.addWidget(self.label, 0, 1, 1, 4)
self.label_2.setObjectName("label_2") self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.addWidget(self.label_2) self.horizontalLayout.setObjectName("horizontalLayout")
self.game_c = QtWidgets.QComboBox(self.centralwidget) self.label_2 = QtWidgets.QLabel(self.centralwidget)
self.game_c.setObjectName("game_c") self.label_2.setObjectName("label_2")
self.game_c.addItem("") self.horizontalLayout.addWidget(self.label_2)
self.game_c.addItem("") self.game_c = QtWidgets.QComboBox(self.centralwidget)
self.horizontalLayout.addWidget(self.game_c) self.game_c.setStyleSheet("QComboBox {\n"
self.gridLayout.addLayout(self.horizontalLayout, 3, 1, 1, 2) " background-color: white;\n"
self.run_game = QtWidgets.QPushButton(self.centralwidget) " color: black;\n"
self.run_game.setObjectName("run_game") " border: 1px solid lightgray;\n"
self.gridLayout.addWidget(self.run_game, 4, 3, 1, 1) " border-radius: 15px;\n"
MainWindow.setCentralWidget(self.centralwidget) " padding-left: 15px;\n"
self.statusbar = QtWidgets.QStatusBar(MainWindow) " }\n"
self.statusbar.setObjectName("statusbar") " \n"
MainWindow.setStatusBar(self.statusbar) " QComboBox:on {\n"
self.label_3.setBuddy(self.username) " border: 1px solid #63acfb;\n"
self.label_2.setBuddy(self.game_c) " }\n"
"\n"
self.retranslateUi(MainWindow) " QComboBox::drop-down {\n"
QtCore.QMetaObject.connectSlotsByName(MainWindow) " width: 22px;\n"
" border-left: 1px solid lightgray;\n"
# def " border-top-right-radius: 15px;\n"
" border-bottom-right-radius: 15px;\n"
def run(self): " }\n"
maxmb = self.maxmb_t.text() " \n"
username_text = self.username.text() " QComboBox::drop-down:on {\n"
version = self.game_c.currentText() " border-left: 1px solid #63acfb;\n"
with open("username.txt", "w") as file: " }\n"
file.write(username_text) "\n"
pass " QComboBox::down-arrow {\n"
with open('maxmb.txt', 'w') as maxmb_f: " width: 16px;\n"
maxmb_f.write(maxmb) " height: 16px;\n"
with open('version.txt', 'w') as version_f: " image: url(PATH_TO_IMG);\n"
version_f.write(version) " }\n"
print(maxmb, username_text, version) "\n"
if version == '1.8.9 Forge': " QComboBox::down-arrow:on {\n"
version = 'vapeV4.04' " image: url(PATH_TO_IMG);\n"
with open('version.txt', 'w') as version_f: " }\n"
version_f.write(version) "\n"
try: " QComboBox QAbstractItemView {\n"
with shelve.open('main') as db: " color: black;\n"
db['startgame'] = True " border: none;\n"
db.close() " outline: none;\n"
os.startfile('start_game.bat') " background-color: whitesmoke;\n"
except: " }\n"
QMessageBox.critical(self, 'ERROR', '无法启动游戏,请尝试重新安装。') "\n"
" QComboBox QScrollBar:vertical {\n"
else: " width: 2px;\n"
QMessageBox.critical(self, 'ERROR', '暂未做完......', QMessageBox.Close) " background-color: white;\n"
" }\n"
def kg(self): "\n"
# run " QComboBox QScrollBar::handle:vertical {\n"
QMessageBox.information(self, 'warning', '启动后请不要关闭server.exe这个程序!!!!', QMessageBox.Ok) " background-color: #b2bdaf;\n"
QMessageBox.warning(self, '注意!', '可能有病毒,请小心使用!!') " }\n"
try: " \"\"\")")
os.startfile('kg.exe') self.game_c.setObjectName("game_c")
except: self.game_c.addItem("")
QMessageBox.critical(self, 'ERROR', '无法启动,请尝试重新安装!', QMessageBox.Ok) self.game_c.addItem("")
self.horizontalLayout.addWidget(self.game_c)
def retranslateUi(self, MainWindow): self.gridLayout.addLayout(self.horizontalLayout, 2, 1, 1, 2)
_translate = QtCore.QCoreApplication.translate self.pushButton = QtWidgets.QPushButton(self.centralwidget)
MainWindow.setWindowTitle(_translate("MainWindow", "Pmcl 1.0.1")) self.pushButton.setStyleSheet("QPushButton {\n"
self.label_4.setText(_translate("MainWindow", "最大内存:")) " background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2);\n"
self.maxmb_t.setText(_translate("MainWindow", "1145")) " color: white;\n"
self.pushButton.setText(_translate("MainWindow", "开vape")) " font-size: 20px;\n"
self.label.setText(_translate("MainWindow", " font-weight: bold;\n"
"<html><head/><body><p><span style=\" font-size:18pt; font-weight:600; color:#1c33fe;\">Python minecraft launcher V1.0.1</span></p></body></html>")) " border-radius: 25px;\n"
self.label_3.setText(_translate("MainWindow", "游戏姓名:")) " }\n"
self.username.setText(_translate("MainWindow", "sb001")) " \n"
self.label_2.setText(_translate("MainWindow", " QPushButton:hover {\n"
"<html><head/><body><p><span style=\" font-size:11pt;\">游戏版本:</span></p></body></html>")) " background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1);\n"
self.game_c.setItemText(0, _translate("MainWindow", "1.8.9 Forge")) " }\n"
self.game_c.setItemText(1, _translate("MainWindow", "1.12.2 Forge")) " \n"
self.run_game.setText(_translate("MainWindow", "开始游戏")) " QPushButton:pressed {\n"
self.pushButton.clicked.connect(self.kg) " background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e);\n"
self.run_game.clicked.connect(self.run) " }\n"
" \"\"\")")
self.pushButton.setObjectName("pushButton")
if __name__ == '__main__': self.gridLayout.addWidget(self.pushButton, 4, 3, 1, 1)
app = QtWidgets.QApplication(sys.argv) self.settings = QtWidgets.QPushButton(self.centralwidget)
mainloop = QtWidgets.QMainWindow() self.settings.setStyleSheet("QPushButton {\n"
ui = Ui_MainWindow() " background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n"
ui.setupUi(mainloop) " color: white;\n"
mainloop.show() " font-size: 20px;\n"
sys.exit(app.exec_()) " font-weight: bold;\n"
" border-radius: 25px;\n"
" }\n"
"\n"
" QPushButton:hover {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n"
" }\n"
"\n"
" QPushButton:pressed {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n"
" }\n"
" \"\"\")")
self.settings.setObjectName("settings")
self.gridLayout.addWidget(self.settings, 4, 4, 1, 1)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.label_4 = QtWidgets.QLabel(self.centralwidget)
self.label_4.setObjectName("label_4")
self.horizontalLayout_3.addWidget(self.label_4)
self.maxmb_t = QtWidgets.QLineEdit(self.centralwidget)
self.maxmb_t.setStyleSheet("QLineEdit {\n"
" border-top: none;\n"
" border-left: none;\n"
" border-right: none;\n"
" border-bottom: 1px solid black;\n"
" background-color: transparent;\n"
" }\n"
" \n"
" QLineEdit:focus {\n"
" border-bottom: 1px solid #2a70f4;\n"
" }\n"
" \"\"\")")
self.maxmb_t.setObjectName("maxmb_t")
self.horizontalLayout_3.addWidget(self.maxmb_t)
self.gridLayout.addLayout(self.horizontalLayout_3, 1, 1, 1, 1)
self.run_game = QtWidgets.QPushButton(self.centralwidget)
self.run_game.setStyleSheet("QPushButton {\n"
" background-color: #57bd6a;\n"
" color: #f9ffff;\n"
" font-size: 20px;\n"
" font-weight: bold;\n"
" border-radius: 5px;\n"
" }\n"
"\n"
" QPushButton:pressed {\n"
" background-color: #4eaa5f;\n"
" }\n"
" \"\"\")")
self.run_game.setObjectName("run_game")
self.gridLayout.addWidget(self.run_game, 4, 1, 1, 1)
self.pushButton_2 = QtWidgets.QPushButton(self.centralwidget)
self.pushButton_2.setStyleSheet("QPushButton {\n"
" background-color: #292929;\n"
" border-radius: 5px;\n"
" font-size: 20px;\n"
" font-weight: bold;\n"
" color: white;\n"
" border: 1px solid white;\n"
" }\n"
"\n"
" QPushButton:pressed {\n"
" background-color: black;\n"
" }\n"
" \"\"\")")
self.pushButton_2.setObjectName("pushButton_2")
self.gridLayout.addWidget(self.pushButton_2, 2, 3, 1, 2)
MainWindow.setCentralWidget(self.centralwidget)
self.statusbar = QtWidgets.QStatusBar(MainWindow)
self.statusbar.setObjectName("statusbar")
MainWindow.setStatusBar(self.statusbar)
self.label_3.setBuddy(self.username)
self.label_2.setBuddy(self.game_c)
self.retranslateUi(MainWindow)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
# def
def run(self):
maxmb = self.maxmb_t.text()
username_text = self.username.text()
version = self.game_c.currentText()
if version == '1.12.2 Forge':
QMessageBox.critical(self, 'Error', '启动失败!版本不支持!')
return 'error'
else:
pass
# 检测maxmb变量是否为数
if username_text == None or maxmb == None or version == None:
QMessageBox.critical(self, 'ERROR', '请填完信息', QMessageBox.Ok)
if maxmb.isnumeric():
pass
else:
QMessageBox.critical(self, 'Error', '最大内存必须是数字!', QMessageBox.Ok)
return 'maxmb'
# 检测maxmb变量是否小于900
if int(maxmb) < 900:
QMessageBox.critical(self, 'ERROR', '内存设置必须要900mb以上', QMessageBox.Ok)
with open("username.txt", "w") as file:
file.write(username_text)
pass
with open('maxmb.txt', 'w') as maxmb_f:
maxmb_f.write(maxmb)
with open('version.txt', 'w') as version_f:
version_f.write(version)
print(maxmb, username_text, version)
try:
self.save_pro()
os.startfile('start_game.bat')
except:
QMessageBox.critical(self, 'Error' ,'启动失败!未知错误?' ,QMessageBox.Ok)
return 'error'
def save_pro(self):
with shelve.open('main') as db:
db['username'] = self.username.text()
db['maxmb'] = self.maxmb_t.text()
db.close()
def dq_pro(self):
# 读取配置
with shelve.open('main') as db:
username = db.get('username')
maxmb = db.get('maxmb')
version = db.get('version')
self.username.setText(username)
self.maxmb_t.setText(maxmb)
self.game_c.setCurrentText(version)
db.close()
def kg(self):
# 打开Kg_Ui窗口
self.kg_ui = Kg_Ui()
self.kg_ui.show()
def open_setting_window(self):
# 打开设置窗口
self.s_ui = setting_UI()
self.s_ui.show()
def retranslateUi(self, MainWindow):
_translate = QtCore.QCoreApplication.translate
MainWindow.setWindowTitle(_translate("MainWindow", "Python minecraft launcher V1.1"))
self.label_3.setText(_translate("MainWindow", "游戏姓名:"))
self.username.setText(_translate("MainWindow", "sb001"))
self.label.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:18pt; font-weight:600; color:#1c33fe;\">Python minecraft launcher V1.1</span></p></body></html>"))
self.label_2.setText(_translate("MainWindow", "<html><head/><body><p><span style=\" font-size:11pt;\">游戏版本:</span></p></body></html>"))
self.game_c.setItemText(0, _translate("MainWindow", "1.8.9 Forge"))
self.game_c.setItemText(1, _translate("MainWindow", "1.12.2 Forge"))
self.pushButton.setText(_translate("MainWindow", "开vape"))
self.settings.setText(_translate("MainWindow", "设置"))
self.label_4.setText(_translate("MainWindow", "最大内存:"))
self.maxmb_t.setText(_translate("MainWindow", "1145"))
self.run_game.setText(_translate("MainWindow", "开始游戏"))
self.pushButton_2.setText(_translate("MainWindow", "读取配置"))
self.pushButton_2.clicked.connect(self.dq_pro)
self.pushButton.clicked.connect(self.kg)
self.run_game.clicked.connect(self.run)
self.settings.clicked.connect(self.open_setting_window)
class setting_UI(QtWidgets.QDialog):
def __init__(self):
super(setting_UI, self).__init__()
self.setupUi(self)
self.setFixedSize(self.width(), self.height())
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(358, 300)
self.layoutWidget = QtWidgets.QWidget(Form)
self.layoutWidget.setGeometry(QtCore.QRect(90, 50, 172, 201))
self.layoutWidget.setObjectName("layoutWidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.pushButton = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton.setStyleSheet("QPushButton {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n"
" color: white;\n"
" font-size: 20px;\n"
" font-weight: bold;\n"
" border-radius: 25px;\n"
" }\n"
"\n"
" QPushButton:hover {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n"
" }\n"
"\n"
" QPushButton:pressed {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n"
" }\n"
" \"\"\")")
self.pushButton.setObjectName("pushButton")
self.verticalLayout.addWidget(self.pushButton)
self.pushButton_2 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_2.setStyleSheet("QPushButton {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n"
" color: white;\n"
" font-size: 20px;\n"
" font-weight: bold;\n"
" border-radius: 25px;\n"
" }\n"
"\n"
" QPushButton:hover {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n"
" }\n"
"\n"
" QPushButton:pressed {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n"
" }\n"
" \"\"\")")
self.pushButton_2.setObjectName("pushButton_2")
self.verticalLayout.addWidget(self.pushButton_2)
self.pushButton_5 = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_5.setStyleSheet("QPushButton {\n"
" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2);\n"
" color: white;\n"
" font-size: 20px;\n"
" font-weight: bold;\n"
" border-radius: 25px;\n"
" }\n"
" \n"
" QPushButton:hover {\n"
" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1);\n"
" }\n"
" \n"
" QPushButton:pressed {\n"
" background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e);\n"
" }\n"
" \"\"\")")
self.pushButton_5.setObjectName("pushButton_5")
self.verticalLayout.addWidget(self.pushButton_5)
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(160, 10, 72, 31))
self.label.setObjectName("label")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def vape(self):
# 重置vape启动状态
QMessageBox.information(self, '提示', '处理成功!', QMessageBox.Ok)
with shelve.open('main') as db:
db['vaper'] = False
db.close()
self.close()
def game(self):
# 重置游戏启动状态
with shelve.open('main') as db:
db['startgame'] = False
db.close()
QMessageBox.information(self, '提示', '处理成功!', QMessageBox.Ok)
self.close()
def del_pro(self):
# 删除配置
with shelve.open('main') as db:
db['username'] = ''
db['maxmb'] = ''
db['version'] = ''
db.close()
QMessageBox.information(self, '提示', '处理成功!')
self.close()
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "设置"))
self.pushButton.setText(_translate("Form", "重置vape启动状态"))
self.pushButton_2.setText(_translate("Form", "重置游戏启动状态"))
self.pushButton_5.setText(_translate("Form", "删除配置"))
self.label.setText(_translate("Form", "<html><head/><body><p><span style=\" font-size:14pt; font-weight:600;\">设置</span></p></body></html>"))
self.pushButton.clicked.connect(self.vape)
self.pushButton_2.clicked.connect(self.game)
self.pushButton_5.clicked.connect(self.del_pro)
class Kg_Ui(QtWidgets.QDialog):
def __init__(self):
super(Kg_Ui, self).__init__()
self.setupUi(self)
self.setFixedSize(self.width(), self.height())
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(306, 250)
self.pushButton = QtWidgets.QPushButton(Form)
self.pushButton.setGeometry(QtCore.QRect(90, 190, 121, 23))
self.pushButton.setStyleSheet("QPushButton {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);\n"
" color: white;\n"
" font-size: 20px;\n"
" font-weight: bold;\n"
" border-radius: 25px;\n"
" }\n"
"\n"
" QPushButton:hover {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);\n"
" }\n"
"\n"
" QPushButton:pressed {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);\n"
" }\n"
" \"\"\")")
self.pushButton.setObjectName("pushButton")
self.label = QtWidgets.QLabel(Form)
self.label.setGeometry(QtCore.QRect(70, 20, 171, 31))
self.label.setObjectName("label")
self.label_2 = QtWidgets.QLabel(Form)
self.label_2.setGeometry(QtCore.QRect(70, 100, 51, 21))
self.label_2.setObjectName("label_2")
self.comboBox = QtWidgets.QComboBox(Form)
self.comboBox.setGeometry(QtCore.QRect(120, 100, 111, 22))
self.comboBox.setStyleSheet("QComboBox {\n"
" background-color: qlineargradient(x1:1, y1:0, x2:1, y2:1, stop:0 #f5f5f7, stop:1 #dedee0);\n"
" border: 1px solid whitesmoke;\n"
" border-radius: 3px;\n"
" padding-left: 15px;\n"
" color: gray;\n"
" }\n"
"\n"
" QComboBox::drop-down {\n"
" width: 22px;\n"
" border-top-right-radius: 3px;\n"
" border-bottom-right-radius: 3px;\n"
" }\n"
"\n"
" QComboBox::down-arrow {\n"
" width: 16px;\n"
" height: 16px;\n"
" image: url(PATH_TO_IMG);\n"
" }\n"
"\n"
" QComboBox QAbstractItemView {\n"
" color: gray;\n"
" border: none;\n"
" outline: none;\n"
" background-color: #dedee0;\n"
" }\n"
"\n"
" QComboBox QScrollBar:vertical {\n"
" width: 2px;\n"
" background-color: white;\n"
" }\n"
"\n"
" QComboBox QScrollBar::handle:vertical {\n"
" background-color: #b2bdaf;\n"
" }\n"
" \"\"\")")
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem("")
self.comboBox.addItem("")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def kg_run(self):
version_kg = self.comboBox.currentText()
if version_kg == 'Vape lite':
'''with shelve.open('main') as db:
db['vape_v'] == 'lite'
db.close()'''
QMessageBox.information(
self, '提示', '外挂获取渠道非官方渠道,请小心使用!', QMessageBox.Ok)
try:
os.startfile('fix.bat')
flie = os.getcwd()
os.system(f"'Kangaroo Patcher.exe' Vape_Lite.exe")
except:
QMessageBox.critical(
self, 'ERROR', '启动失败!请检查文件!', QMessageBox.Ok)
elif version_kg == 'Vape V4':
'''with shelve.open('main') as db:
db['vape_v'] == 'v4'
db.close()'''
QMessageBox.critical(self, 'ERROR', '无法使用!', QMessageBox.Ok)
# 关闭窗口
self.close()
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "选择外挂"))
self.pushButton.setText(_translate("Form", "确定"))
self.label.setText(_translate(
"Form", "<html><head/><body><p><span style=\" font-size:18pt; font-weight:600; color:#ff0000;\">请选择外挂</span></p></body></html>"))
self.label_2.setText(_translate(
"Form", "<html><head/><body><p><span style=\" font-size:11pt;\">版本:</span></p></body></html>"))
self.comboBox.setItemText(0, _translate("Form", "Vape lite"))
self.comboBox.setItemText(1, _translate("Form", "Vape V4"))
self.pushButton.clicked.connect(self.kg_run)
if __name__ == '__main__':
app = QtWidgets.QApplication(sys.argv)
mainloop = QtWidgets.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(mainloop)
mainloop.show()
sys.exit(app.exec_())

View File

@ -1,125 +1,270 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>MainWindow</class> <class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow"> <widget class="QMainWindow" name="MainWindow">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>475</width> <width>534</width>
<height>226</height> <height>226</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>MainWindow</string> <string>Python minecraft launcher V1.1</string>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="2" column="1"> <item row="1" column="2" colspan="3">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
<widget class="QLabel" name="label_4"> <widget class="QLabel" name="label_3">
<property name="text"> <property name="text">
<string>最大内存:</string> <string>游戏姓名:</string>
</property> </property>
</widget> <property name="buddy">
</item> <cstring>username</cstring>
<item> </property>
<widget class="QLineEdit" name="maxmb_t"> </widget>
<property name="text"> </item>
<string>1145</string> <item>
</property> <widget class="QLineEdit" name="username">
</widget> <property name="styleSheet">
</item> <string notr="true">QLineEdit {
</layout> border-top: none;
</item> border-left: none;
<item row="4" column="4"> border-right: none;
<widget class="QPushButton" name="pushButton"> border-bottom: 1px solid black;
<property name="text"> background-color: transparent;
<string>开vape</string> }
</property>
</widget> QLineEdit:focus {
</item> border-bottom: 1px solid #2a70f4;
<item row="0" column="1" colspan="4"> }
<widget class="QLabel" name="label"> &quot;&quot;&quot;)</string>
<property name="text"> </property>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt; font-weight:600; color:#1c33fe;&quot;&gt;python minecraft launcher&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <property name="text">
</property> <string>sb001</string>
</widget> </property>
</item> </widget>
<item row="2" column="2" colspan="3"> </item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> </layout>
<item> </item>
<widget class="QLabel" name="label_3"> <item row="0" column="1" colspan="4">
<property name="text"> <widget class="QLabel" name="label">
<string>游戏姓名:</string> <property name="text">
</property> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:18pt; font-weight:600; color:#1c33fe;&quot;&gt;Python minecraft launcher V1.1&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<property name="buddy"> </property>
<cstring>username</cstring> </widget>
</property> </item>
</widget> <item row="2" column="1" colspan="2">
</item> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QLineEdit" name="username"> <widget class="QLabel" name="label_2">
<property name="text"> <property name="text">
<string>sb001</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;游戏版本:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</widget> <property name="buddy">
</item> <cstring>game_c</cstring>
</layout> </property>
</item> </widget>
<item row="1" column="1" colspan="4"> </item>
<spacer name="horizontalSpacer"> <item>
<property name="orientation"> <widget class="QComboBox" name="game_c">
<enum>Qt::Horizontal</enum> <property name="styleSheet">
</property> <string notr="true">QComboBox {
<property name="sizeHint" stdset="0"> background-color: white;
<size> color: black;
<width>454</width> border: 1px solid lightgray;
<height>20</height> border-radius: 15px;
</size> padding-left: 15px;
</property> }
</spacer>
</item> QComboBox:on {
<item row="3" column="1" colspan="2"> border: 1px solid #63acfb;
<layout class="QHBoxLayout" name="horizontalLayout"> }
<item>
<widget class="QLabel" name="label_2"> QComboBox::drop-down {
<property name="text"> width: 22px;
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:11pt;&quot;&gt;游戏版本:&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> border-left: 1px solid lightgray;
</property> border-top-right-radius: 15px;
<property name="buddy"> border-bottom-right-radius: 15px;
<cstring>game_c</cstring> }
</property>
</widget> QComboBox::drop-down:on {
</item> border-left: 1px solid #63acfb;
<item> }
<widget class="QComboBox" name="game_c">
<item> QComboBox::down-arrow {
<property name="text"> width: 16px;
<string>1.8.9 Forge</string> height: 16px;
</property> image: url(PATH_TO_IMG);
</item> }
<item>
<property name="text"> QComboBox::down-arrow:on {
<string>1.12.2 Forge</string> image: url(PATH_TO_IMG);
</property> }
</item>
</widget> QComboBox QAbstractItemView {
</item> color: black;
</layout> border: none;
</item> outline: none;
<item row="4" column="3"> background-color: whitesmoke;
<widget class="QPushButton" name="run_game"> }
<property name="text">
<string>开始游戏</string> QComboBox QScrollBar:vertical {
</property> width: 2px;
</widget> background-color: white;
</item> }
</layout>
</widget> QComboBox QScrollBar::handle:vertical {
<widget class="QStatusBar" name="statusbar"/> background-color: #b2bdaf;
</widget> }
<resources/> &quot;&quot;&quot;)</string>
<connections/> </property>
</ui> <item>
<property name="text">
<string>1.8.9 Forge</string>
</property>
</item>
<item>
<property name="text">
<string>1.12.2 Forge</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="4" column="3">
<widget class="QPushButton" name="pushButton">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2);
color: white;
font-size: 20px;
font-weight: bold;
border-radius: 25px;
}
QPushButton:hover {
background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1);
}
QPushButton:pressed {
background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e);
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>开vape</string>
</property>
</widget>
</item>
<item row="4" column="4">
<widget class="QPushButton" name="settings">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);
color: white;
font-size: 20px;
font-weight: bold;
border-radius: 25px;
}
QPushButton:hover {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);
}
QPushButton:pressed {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>设置</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>最大内存:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="maxmb_t">
<property name="styleSheet">
<string notr="true">QLineEdit {
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1px solid black;
background-color: transparent;
}
QLineEdit:focus {
border-bottom: 1px solid #2a70f4;
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>1145</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="4" column="1">
<widget class="QPushButton" name="run_game">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #57bd6a;
color: #f9ffff;
font-size: 20px;
font-weight: bold;
border-radius: 5px;
}
QPushButton:pressed {
background-color: #4eaa5f;
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>开始游戏</string>
</property>
</widget>
</item>
<item row="2" column="3" colspan="2">
<widget class="QPushButton" name="pushButton_2">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: #292929;
border-radius: 5px;
font-size: 20px;
font-weight: bold;
color: white;
border: 1px solid white;
}
QPushButton:pressed {
background-color: black;
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>读取配置</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>
<connections/>
</ui>

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
PyQt5~=5.15.9

119
settings.ui Normal file
View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>358</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>设置</string>
</property>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>90</x>
<y>50</y>
<width>172</width>
<height>201</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPushButton" name="pushButton">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);
color: white;
font-size: 20px;
font-weight: bold;
border-radius: 25px;
}
QPushButton:hover {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);
}
QPushButton:pressed {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>重置vape启动状态</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #8a9195, stop:1 black);
color: white;
font-size: 20px;
font-weight: bold;
border-radius: 25px;
}
QPushButton:hover {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #7d8488, stop:1 black);
}
QPushButton:pressed {
background-color: qlineargradient(x1:1, y1:0, x2:1, y2:0.3, stop:0 #6a7073, stop:1 black);
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>重置游戏启动状态</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_5">
<property name="styleSheet">
<string notr="true">QPushButton {
background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #47a7ed, stop: 1 #a967b2);
color: white;
font-size: 20px;
font-weight: bold;
border-radius: 25px;
}
QPushButton:hover {
background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #459ee0, stop: 1 #995da1);
}
QPushButton:pressed {
background-color: qlineargradient(x1:0, y1:0.5, x2:1, y2:0.5, stop:0 #4093d1, stop: 1 #87538e);
}
&quot;&quot;&quot;)</string>
</property>
<property name="text">
<string>删除配置</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>160</x>
<y>10</y>
<width>72</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:14pt; font-weight:600;&quot;&gt;设置&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>