diff --git a/LICENSE b/LICENSE
index a6cfb45..4db5774 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,127 +1,127 @@
- 木兰宽松许可证, 第2版
-
- 木兰宽松许可证, 第2版
- 2020年1月 http://license.coscl.org.cn/MulanPSL2
-
-
- 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:
-
- 0. 定义
-
- “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
-
- “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
-
- “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
-
- “法人实体”是指提交贡献的机构及其“关联实体”。
-
- “关联实体”是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
-
- 1. 授予版权许可
-
- 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
-
- 2. 授予专利许可
-
- 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
-
- 3. 无商标许可
-
- “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
-
- 4. 分发限制
-
- 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
-
- 5. 免责声明与责任限制
-
- “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
-
- 6. 语言
- “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
-
- 条款结束
-
- 如何将木兰宽松许可证,第2版,应用到您的软件
-
- 如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:
-
- 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
-
- 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;
-
- 3, 请将如下声明文本放入每个源文件的头部注释中。
-
- Copyright (c) 2024 dengrb1
- Pmcl is licensed under 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:
- 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.
- See the Mulan PSL v2 for more details.
-
-
- Mulan Permissive Software License,Version 2
-
- Mulan Permissive Software License,Version 2 (Mulan PSL v2)
- 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:
-
- 0. Definition
-
- 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.
-
- 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.
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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
-
- 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 IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 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.
-
- END OF THE TERMS AND CONDITIONS
-
- How to Apply the Mulan Permissive Software License,Version 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:
-
- 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;
-
- iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
-
-
- Copyright (c) [Year] [name of copyright holder]
- [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 may obtain a copy of Mulan PSL v2 at:
- 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.
- See the Mulan PSL v2 for more details.
+ 木兰宽松许可证, 第2版
+
+ 木兰宽松许可证, 第2版
+ 2020年1月 http://license.coscl.org.cn/MulanPSL2
+
+
+ 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束:
+
+ 0. 定义
+
+ “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。
+
+ “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。
+
+ “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。
+
+ “法人实体”是指提交贡献的机构及其“关联实体”。
+
+ “关联实体”是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。
+
+ 1. 授予版权许可
+
+ 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。
+
+ 2. 授予专利许可
+
+ 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。
+
+ 3. 无商标许可
+
+ “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。
+
+ 4. 分发限制
+
+ 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。
+
+ 5. 免责声明与责任限制
+
+ “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。
+
+ 6. 语言
+ “本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。
+
+ 条款结束
+
+ 如何将木兰宽松许可证,第2版,应用到您的软件
+
+ 如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步:
+
+ 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字;
+
+ 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中;
+
+ 3, 请将如下声明文本放入每个源文件的头部注释中。
+
+ Copyright (c) 2024 dengrb1
+ Pmcl is licensed under 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:
+ 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.
+ See the Mulan PSL v2 for more details.
+
+
+ Mulan Permissive Software License,Version 2
+
+ Mulan Permissive Software License,Version 2 (Mulan PSL v2)
+ 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:
+
+ 0. Definition
+
+ 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.
+
+ 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.
+
+ 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
+
+ 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
+
+ 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
+
+ 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
+
+ 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
+
+ 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 IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+ 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.
+
+ END OF THE TERMS AND CONDITIONS
+
+ How to Apply the Mulan Permissive Software License,Version 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:
+
+ 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;
+
+ iii Attach the statement to the appropriate annotated syntax at the beginning of each source file.
+
+
+ Copyright (c) [Year] [name of copyright holder]
+ [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 may obtain a copy of Mulan PSL v2 at:
+ 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.
+ See the Mulan PSL v2 for more details.
diff --git a/README.md b/README.md
index e6dc379..c9d5997 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,25 @@
# Pmcl:Python minecraft launcher
-------------------------
-#### 介绍
+## 介绍
用python制作的我的世界1.8.9启动器
可以把我的世界1.8.9forge版启动!
支持vape一键注入!!
### Gitee库
-此项目在Github上面也已开源,主要更新在Gitee,所以GitHub更新会慢一些
-项目地址:[https://github.com/dengrb1/pmcl](https://)
-
-
+此项目在Gitee上面也已开源,主要更新在Gitee,所以GitHub更新会慢一些
+项目地址:[https://gitee.com/dengrb1/pmcl](https://)
#### 安装教程
1. 从[https://gitee.com/dengrb1/pmcl/releases](http://)里下载最新版本 _**(注:文件开头是“Pmcl”全都要下载!!)**_
2. 打开**pmcl_setup.7z.001** 文件并解压
-3. 打开安装包安装完成即可使用
+3. 打开安装包安装完成即可使用
+**因为gitee的总附件只有1GB的存储空间,所以现在无法发送安装包(问题以后可能会修复)**
#### 更新日志
+更新日志可能不是最新,请到[https://gitee.com/dengrb1/pmcl/releases](http://)里查看最新版本的更新日志!!
1.0.0 没什么好说的,自己看
-1.0.1 加入游戏启动检测,并增加程序自由性
+1.0.1 加入游戏启动检测,并增加程序自由性
+1.0.2 加入检测vape是否启动;加入保存配置功能(测试);修复无法启动vape lite的BUG
diff --git a/fix.bat b/fix.bat
index 39e52eb..790f493 100644
--- a/fix.bat
+++ b/fix.bat
@@ -1,2 +1,2 @@
-set mypath=%cd%
+set mypath=%cd%
start /d "%mypath%\fix\" server.exe
\ No newline at end of file
diff --git a/jc.py b/jc.py
index bf400bc..0df8074 100644
--- a/jc.py
+++ b/jc.py
@@ -4,16 +4,41 @@ from time import sleep
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('可能会被360等杀毒软件杀掉,使用前请关闭杀毒软件或把此启动器的所有文件加入白名单!')
+ty = input('是否同意使用本软件(y/n):')
-with shelve.open('main') as db:
- db['startgame'] = False
- # db['vape_run'] = False
- db.close()
-
-
-print('初始化已完成!')
-sleep(1.5)
-os.startfile('pmcl_main.exe')
-sys.exit()
+if ty == 'y' or ty == 'Y':
+ print('欢迎使用Python Minecraft Launcher!')
+ print('项目地址:https://gitee.com/dengrb1/pmcl')
+ print('作者:dengrb1')
+ print('本项目完全没有病毒,您可以放心使用!!')
+ with shelve.open('main') as db:
+ db['startgame'] = False
+ db['vaper'] = False
+ db.close()
+ run()
+elif ty == 'n' or ty == 'N':
+ print('已拒绝!')
+ sleep(1)
+ sys.exit()
+else:
+ print('输入错误!')
+ sleep(1)
+ sys.exit()
diff --git a/kg.py b/kg.py
deleted file mode 100644
index ccdb6b1..0000000
--- a/kg.py
+++ /dev/null
@@ -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')
diff --git a/kg.ui b/kg.ui
new file mode 100644
index 0000000..c1f0a5f
--- /dev/null
+++ b/kg.ui
@@ -0,0 +1,134 @@
+
+
Python minecraft launcher V1.0.1
")) - self.label_3.setText(_translate("MainWindow", "游戏姓名:")) - self.username.setText(_translate("MainWindow", "sb001")) - self.label_2.setText(_translate("MainWindow", - "游戏版本:
")) - self.game_c.setItemText(0, _translate("MainWindow", "1.8.9 Forge")) - self.game_c.setItemText(1, _translate("MainWindow", "1.12.2 Forge")) - self.run_game.setText(_translate("MainWindow", "开始游戏")) - self.pushButton.clicked.connect(self.kg) - self.run_game.clicked.connect(self.run) - - -if __name__ == '__main__': - app = QtWidgets.QApplication(sys.argv) - mainloop = QtWidgets.QMainWindow() - ui = Ui_MainWindow() - ui.setupUi(mainloop) - mainloop.show() - sys.exit(app.exec_()) +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'pmcl_main.ui' +# +# Created by: PyQt5 UI code generator 5.15.9 +# +# 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. + + +import os +import shelve +import sys + +from PyQt5 import QtCore, QtWidgets +from PyQt5.QtWidgets import QMessageBox +from PyQt5.QtGui import QPalette, QColor +from PyQt5.QtWidgets import QWidget, QGraphicsBlurEffect +from PyQt5.QtCore import Qt + +from time import sleep + + +class Ui_MainWindow(QtWidgets.QMainWindow): + def __init__(self): + super(Ui_MainWindow, self).__init__() + self.setupUi(self) + + def setupUi(self, MainWindow): + MainWindow.setObjectName("MainWindow") + MainWindow.resize(534, 226) + self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget.setObjectName("centralwidget") + self.gridLayout = QtWidgets.QGridLayout(self.centralwidget) + self.gridLayout.setObjectName("gridLayout") + self.horizontalLayout_2 = QtWidgets.QHBoxLayout() + self.horizontalLayout_2.setObjectName("horizontalLayout_2") + self.label_3 = QtWidgets.QLabel(self.centralwidget) + self.label_3.setObjectName("label_3") + self.horizontalLayout_2.addWidget(self.label_3) + self.username = QtWidgets.QLineEdit(self.centralwidget) + self.username.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.username.setObjectName("username") + self.horizontalLayout_2.addWidget(self.username) + self.gridLayout.addLayout(self.horizontalLayout_2, 1, 2, 1, 3) + self.label = QtWidgets.QLabel(self.centralwidget) + self.label.setObjectName("label") + self.gridLayout.addWidget(self.label, 0, 1, 1, 4) + self.horizontalLayout = QtWidgets.QHBoxLayout() + self.horizontalLayout.setObjectName("horizontalLayout") + self.label_2 = QtWidgets.QLabel(self.centralwidget) + self.label_2.setObjectName("label_2") + self.horizontalLayout.addWidget(self.label_2) + self.game_c = QtWidgets.QComboBox(self.centralwidget) + self.game_c.setStyleSheet("QComboBox {\n" +" background-color: white;\n" +" color: black;\n" +" border: 1px solid lightgray;\n" +" border-radius: 15px;\n" +" padding-left: 15px;\n" +" }\n" +" \n" +" QComboBox:on {\n" +" border: 1px solid #63acfb;\n" +" }\n" +"\n" +" QComboBox::drop-down {\n" +" width: 22px;\n" +" border-left: 1px solid lightgray;\n" +" border-top-right-radius: 15px;\n" +" border-bottom-right-radius: 15px;\n" +" }\n" +" \n" +" QComboBox::drop-down:on {\n" +" border-left: 1px solid #63acfb;\n" +" }\n" +"\n" +" QComboBox::down-arrow {\n" +" width: 16px;\n" +" height: 16px;\n" +" image: url(PATH_TO_IMG);\n" +" }\n" +"\n" +" QComboBox::down-arrow:on {\n" +" image: url(PATH_TO_IMG);\n" +" }\n" +"\n" +" QComboBox QAbstractItemView {\n" +" color: black;\n" +" border: none;\n" +" outline: none;\n" +" background-color: whitesmoke;\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.game_c.setObjectName("game_c") + self.game_c.addItem("") + self.game_c.addItem("") + self.horizontalLayout.addWidget(self.game_c) + self.gridLayout.addLayout(self.horizontalLayout, 2, 1, 1, 2) + self.pushButton = QtWidgets.QPushButton(self.centralwidget) + self.pushButton.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.setObjectName("pushButton") + self.gridLayout.addWidget(self.pushButton, 4, 3, 1, 1) + self.settings = QtWidgets.QPushButton(self.centralwidget) + self.settings.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.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", "Python minecraft launcher V1.1
")) + self.label_2.setText(_translate("MainWindow", "游戏版本:
")) + 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", "设置
")) + 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", "请选择外挂
")) + self.label_2.setText(_translate( + "Form", "版本:
")) + 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_()) \ No newline at end of file diff --git a/pmcl_main.ui b/pmcl_main.ui index 4d6d1a3..4665187 100644 --- a/pmcl_main.ui +++ b/pmcl_main.ui @@ -1,125 +1,270 @@ - -