diff --git a/.gitignore b/.gitignore index 2c7e2d8..4527af5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,77 @@ -__pycache__ -# Ignore dynaconf secret files -.secrets.* -.idea +# This file is used to ignore files which are generated +# ---------------------------------------------------------------------------- + +*~ +*.autosave +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*.so.* +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +!core/ +tags +.DS_Store +.directory +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp +Thumbs.db +*.res +*.rc +/.qmake.cache +/.qmake.stash + +# qtcreator generated files +*.pro.user* +CMakeLists.txt.user* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.sdf +*.opensdf +*.vcxproj +*vcxproj.* + +# MinGW generated files +*.Debug +*.Release + +# Python byte code +*.pyc + +# Binaries +# -------- +*.dll +*.exe + +#pyproject +.pyproject +.pyproject.user diff --git a/hlna.py b/hlna.py index e1641de..46f35a6 100755 --- a/hlna.py +++ b/hlna.py @@ -2,7 +2,6 @@ import os import re import sys -import time import zlib import struct import logging @@ -15,6 +14,7 @@ import colorama from pathlib import Path from rcon.source import Client +from PyQt6.QtWidgets import QApplication, QWidget, QMainWindow, QLabel, QPushButton home_dir = Path.home() @@ -333,6 +333,7 @@ def config_password(): password_server = input("Укажите пароль Сервера: \n") return password_server + def config_adminpassword(): adminpassword_server = input("Укажите пароль Сервера: \n") return adminpassword_server @@ -853,5 +854,30 @@ create_dir(dir_server) create_dir(dir_unit) create_dir(dir_logs) + +class MainWindow(QMainWindow): + def __init__(self): + super().__init__() + + self.setWindowTitle("HLN-A") + button = QPushButton("Выход") + button.setCheckable(True) + button.clicked.connect(self.button_click) + self.setCentralWidget(button) + + def button_click(self): + exit() + + +def hlnag(): + if len(sys.argv) > 1: + hlna() + else: + app = QApplication(sys.argv) + hlnag_gui_window = MainWindow() + hlnag_gui_window.show() + sys.exit(app.exec()) + + if __name__ == '__main__': - hlna() + hlnag() diff --git a/hlna.ui b/hlna.ui new file mode 100644 index 0000000..a9eb0c4 --- /dev/null +++ b/hlna.ui @@ -0,0 +1,332 @@ + + + MainWindow + + + + 0 + 0 + 1553 + 1000 + + + + MainWindow + + + + + + 0 + 0 + 1551 + 941 + + + + + 1551 + 941 + + + + 0 + + + + ARK + + + + + 0 + 0 + 1551 + 911 + + + + 0 + + + true + + + true + + + + Tab 1 + + + + + 0 + 0 + 471 + 871 + + + + + + + + + 10 + 30 + 441 + 31 + + + + + + + 10 + 10 + 81 + 18 + + + + Имя сессии + + + true + + + + + + 10 + 80 + 131 + 31 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">7777</p></body></html> + + + + + + 10 + 60 + 81 + 18 + + + + Порт + + + true + + + + + + 170 + 60 + 81 + 18 + + + + Querry порт + + + true + + + + + + 170 + 80 + 131 + 31 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">27015</p></body></html> + + + + + + 330 + 80 + 121 + 31 + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Noto Sans'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">27042</p></body></html> + + + + + + 330 + 60 + 81 + 18 + + + + Rcon порт + + + true + + + + + + 10 + 140 + 221 + 31 + + + + + + + 10 + 120 + 101 + 18 + + + + Пароль сессии + + + true + + + + + + 240 + 120 + 161 + 18 + + + + Пароль администратора + + + true + + + + + + 230 + 140 + 221 + 31 + + + + + + + 10 + 200 + 71 + 31 + + + + + + + 10 + 180 + 131 + 18 + + + + Количество игроков + + + true + + + + + + 140 + 200 + 301 + 31 + + + + Передавать в глобальный список серверов + + + + + + + 470 + 0 + 1071 + 871 + + + + ini + + + + + + Tab 2 + + + + + + + 7 Days to Die + + + + + + + + 0 + 0 + 1553 + 30 + + + + + + + +