mirror of
https://github.com/xgui4/LCE-Qt-Launcher.git
synced 2026-07-16 02:40:38 +00:00
update the package build dep and add git manager for the instance data :)
This commit is contained in:
@@ -12,6 +12,7 @@ depends=(
|
|||||||
'python-vdf'
|
'python-vdf'
|
||||||
'python-platformdirs'
|
'python-platformdirs'
|
||||||
'python-rich'
|
'python-rich'
|
||||||
|
'git'
|
||||||
)
|
)
|
||||||
makedepends=(
|
makedepends=(
|
||||||
'git'
|
'git'
|
||||||
|
|||||||
14
src/lce_qt_launcher/managers/git_manager.py
Normal file
14
src/lce_qt_launcher/managers/git_manager.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import subprocess
|
||||||
|
|
||||||
|
from lce_qt_launcher.models.app_data import AppData
|
||||||
|
|
||||||
|
def verify_git_installation():
|
||||||
|
print(subprocess.getoutput("git --version"))
|
||||||
|
|
||||||
|
def clone_repo(repo_url : str, path : str, appData : AppData):
|
||||||
|
subprocess.run(["git", "clone", repo_url, path], cwd=appData.appDataDirs[0])
|
||||||
|
|
||||||
|
def update_repo(appData : AppData):
|
||||||
|
subprocess.run(["git", "pull"], cwd=appData.appDataDirs[0])
|
||||||
|
|
||||||
|
verify_git_installation()
|
||||||
@@ -24,6 +24,8 @@ from PySide6.QtGui import QFontDatabase
|
|||||||
|
|
||||||
from lce_qt_launcher.views.setup_view import SetupView
|
from lce_qt_launcher.views.setup_view import SetupView
|
||||||
|
|
||||||
|
from lce_qt_launcher.models.app_data import AppData
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
app = QApplication()
|
app = QApplication()
|
||||||
@@ -36,8 +38,10 @@ def main():
|
|||||||
else:
|
else:
|
||||||
family = QFontDatabase.applicationFontFamilies(font_id)[0]
|
family = QFontDatabase.applicationFontFamilies(font_id)[0]
|
||||||
app.setFont(family)
|
app.setFont(family)
|
||||||
|
|
||||||
SetupView()
|
appData = AppData()
|
||||||
|
|
||||||
|
SetupView(appData)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ from PySide6.QtWidgets import QMessageBox, QWizard
|
|||||||
from PySide6.QtGui import QPixmap
|
from PySide6.QtGui import QPixmap
|
||||||
|
|
||||||
from lce_qt_launcher.ui_setup import Ui_LCE_Qt_Launcher_Wizard
|
from lce_qt_launcher.ui_setup import Ui_LCE_Qt_Launcher_Wizard
|
||||||
|
from lce_qt_launcher.models.app_data import AppData
|
||||||
|
import lce_qt_launcher.managers.git_manager as git_manager
|
||||||
|
|
||||||
|
|
||||||
class SetupView(QWizard):
|
class SetupView(QWizard):
|
||||||
@@ -14,7 +16,7 @@ class SetupView(QWizard):
|
|||||||
QDialog (_type_): _description_ inherited from QDialog
|
QDialog (_type_): _description_ inherited from QDialog
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self, appData : AppData) -> None:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.ui_dialog: Ui_LCE_Qt_Launcher_Wizard = Ui_LCE_Qt_Launcher_Wizard()
|
self.ui_dialog: Ui_LCE_Qt_Launcher_Wizard = Ui_LCE_Qt_Launcher_Wizard()
|
||||||
self.dialog: QWizard = QWizard()
|
self.dialog: QWizard = QWizard()
|
||||||
@@ -42,6 +44,8 @@ class SetupView(QWizard):
|
|||||||
username: str = self.ui_dialog.usernameInputBox.text()
|
username: str = self.ui_dialog.usernameInputBox.text()
|
||||||
|
|
||||||
QMessageBox(QMessageBox.Icon.Information, "LCE Qt Launcher", f"Data Source : {dataSource}\nUsername : {username}").exec()
|
QMessageBox(QMessageBox.Icon.Information, "LCE Qt Launcher", f"Data Source : {dataSource}\nUsername : {username}").exec()
|
||||||
|
|
||||||
|
git_manager.clone_repo(dataSource, "data", appData)
|
||||||
|
|
||||||
self.dialog.finished.connect(generate_config)
|
self.dialog.finished.connect(generate_config)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user