mirror of
https://github.com/xgui4/LCE-Qt-Launcher.git
synced 2026-07-16 02:40:38 +00:00
bump version to 0.2026.5.14, update nightly build scripts, and add custom skin option in mod manager
This commit is contained in:
5
.github/workflows/nightly.yml
vendored
5
.github/workflows/nightly.yml
vendored
@@ -112,10 +112,9 @@ jobs:
|
||||
> For NixOS/Nixpkg you need to build it yourself by downloading the source files
|
||||
and then run `./nix-helper install` \n
|
||||
\n
|
||||
Experimental Build (Nightly) generated by GitHub Action. The nighy build are experimental nuitka compilation from the nighly branch.
|
||||
Package for GNU/Linux and Installer for Windows is coming late. \n
|
||||
Experimental Build (Nightly) generated by GitHub Action. The nighy build are experimental nuitka compilation from the nighly branch.\n
|
||||
\n
|
||||
Now includes installers."
|
||||
Now includes installers. (currently workflow broken)"
|
||||
files: |
|
||||
./artifacts/****.exe
|
||||
./artifacts/****.zip
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
pkgs.python3Packages.buildPythonApplication rec {
|
||||
pname = "lce-qt-launcher";
|
||||
version = "0.2026.5.13";
|
||||
version = "0.2026.5.14";
|
||||
format = "pyproject";
|
||||
|
||||
src = ./.;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
PORTNAME= lce-qt-launcher-nightly
|
||||
DISTVERSION= 26.5.13b0
|
||||
DISTVERSION= 26.5.14b0
|
||||
CATEGORIES= games python
|
||||
|
||||
MAINTAINER= xgui4-dev@example.com
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
; Non-commercial use only
|
||||
|
||||
#define MyAppName "LCE Qt Launcher (Nightly)"
|
||||
#define MyAppVersion "2026.5.13"
|
||||
#define MyAppVersion "2026.5.14"
|
||||
#define MyAppPublisher "Xgui4"
|
||||
#define MyAppURL "https://github.com/xgui4/lce-qt-launcher"
|
||||
#define MyAppExeName "main.exe"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
; Non-commercial use only
|
||||
|
||||
#define MyAppName "LCE Qt Launcher (Nightly)"
|
||||
#define MyAppVersion "2026.5.13"
|
||||
#define MyAppVersion "2026.5.14"
|
||||
#define MyAppPublisher "Xgui4"
|
||||
#define MyAppURL "https://github.com/xgui4/lce-qt-launcher"
|
||||
#define MyAppExeName "main.exe"
|
||||
|
||||
@@ -7,7 +7,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "LCE-Qt-Launcher"
|
||||
version = "26.5.13a0"
|
||||
version = "26.5.14a0"
|
||||
description = "This is a custom Free/Libre Minecraft LCE Launcher written in Python and Qt. (Nightly Build)"
|
||||
requires-python = ">3.10, <3.13"
|
||||
license = "GPL-3.0-or-later"
|
||||
@@ -42,6 +42,10 @@ run-app = "python run.py"
|
||||
|
||||
[tool.pyright]
|
||||
reportImportCycles="hint"
|
||||
reportUnusedCallResult="hint"
|
||||
reportAny="hint"
|
||||
reportUnknownMemberType="hint"
|
||||
reportUnknownVariableType="hint"
|
||||
|
||||
[tool.hatch.build]
|
||||
artifacts = [
|
||||
|
||||
@@ -21,7 +21,7 @@ let
|
||||
in
|
||||
pkgs.mkShell rec {
|
||||
pname = "lce-qt-launcher";
|
||||
version = "0.2026.5.13";
|
||||
version = "0.2026.5.14";
|
||||
format = "pyproject";
|
||||
|
||||
src = ./.;
|
||||
|
||||
@@ -92,6 +92,11 @@
|
||||
<string>Mod</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Custom Skin</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
|
||||
@@ -627,8 +627,8 @@
|
||||
<item>
|
||||
<layout class="QGridLayout" name="marketplacesFrameGrid">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="marketplaceFrameRow">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="marketplacesGridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QWebEngineView" name="marketplacesWebsiteEngine">
|
||||
<property name="url">
|
||||
<url>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from enum import StrEnum
|
||||
|
||||
FALLBACK_APP_NAME = "LCE Qt Launcher"
|
||||
FALLBACK_VERSION_NUMBER = "2026.5.13b0"
|
||||
FALLBACK_VERSION_NUMBER = "2026.5.14b0"
|
||||
FALLBACK_LICENSE = "GPLv3"
|
||||
FALLBACK_LICENSE_LINK = "https://www.gnu.org/licenses/gpl-3.0"
|
||||
FALLBACK_GIT_REPO_URL = "https://github.com/xgui4/LCE-QT-Launcher"
|
||||
|
||||
@@ -101,8 +101,8 @@ def main() -> None:
|
||||
os.environ["QTWEBENGINE_DISABLE_SANDBOX"] = "1"
|
||||
|
||||
app = App(appContext.theme, appContext, sys.argv)
|
||||
app.setStyle("Fusion") # pyright: ignore[reportUnusedCallResult]
|
||||
app.aboutToQuit.connect(about_to_quit_event) # pyright: ignore[reportUnusedCallResult]
|
||||
app.setStyle("Fusion")
|
||||
app.aboutToQuit.connect(about_to_quit_event)
|
||||
|
||||
font_id = QFontDatabase.addApplicationFont(":/fonts/monocraft.ttc")
|
||||
|
||||
|
||||
@@ -23,16 +23,17 @@ import argparse
|
||||
from enum import StrEnum
|
||||
from zipfile import ZipFile, BadZipFile
|
||||
|
||||
DLC_LOCATION = os.path.join("Windows64Media", "DLC")
|
||||
WORLD_LOCATION = os.path.join("Windows64", "GameHDD")
|
||||
MOD_LOCATION = os.path.join("Windows64", "Media")
|
||||
DLC_LOCATION: str = os.path.join("Windows64Media", "DLC")
|
||||
WORLD_LOCATION: str = os.path.join("Windows64", "GameHDD")
|
||||
MOD_LOCATION: str = os.path.join("Windows64", "Media")
|
||||
CUSTOM_SKIN_LOCATION: str = os.path.join("Common","res","mob")
|
||||
|
||||
class ContentType(StrEnum):
|
||||
DLC = DLC_LOCATION
|
||||
WORLD = WORLD_LOCATION
|
||||
MOD = MOD_LOCATION
|
||||
CUSTOM_SKIN = CUSTOM_SKIN_LOCATION
|
||||
NONE = "0"
|
||||
CUSTOM_SKIN = "-1" # Temporaly placeholder DO NOT USE,
|
||||
|
||||
def from_str_to_enum(string : str) -> ContentType:
|
||||
print(string)
|
||||
@@ -43,10 +44,10 @@ def from_str_to_enum(string : str) -> ContentType:
|
||||
return ContentType.WORLD
|
||||
case "Mod":
|
||||
return ContentType.MOD
|
||||
case "None" :
|
||||
return ContentType.NONE
|
||||
case "Skin":
|
||||
case "Default Skin":
|
||||
return ContentType.CUSTOM_SKIN
|
||||
case "None":
|
||||
return ContentType.NONE
|
||||
case _ :
|
||||
raise RuntimeError("Invalid Argument")
|
||||
|
||||
@@ -113,16 +114,16 @@ def main():
|
||||
|
||||
parsed_cmd_args = parser.parse_known_intermixed_args()
|
||||
|
||||
contentType : str = parsed_cmd_args[0].content_type
|
||||
contentType = parsed_cmd_args[0].content_type
|
||||
|
||||
contentTypeEnum : ContentType = ContentType.NONE
|
||||
contentTypeEnum = ContentType.NONE
|
||||
|
||||
if parsed_cmd_args[0].content_type == "None":
|
||||
print(r"""
|
||||
1. Install Maps/World
|
||||
2. Install DLC
|
||||
3. Install Mods
|
||||
4. Install Custom Skin (Coming Soon)
|
||||
4. Install Custom Skin
|
||||
5. Cancel
|
||||
""")
|
||||
|
||||
@@ -134,6 +135,8 @@ def main():
|
||||
contentTypeEnum = ContentType.DLC
|
||||
if user_input == "3":
|
||||
contentTypeEnum = ContentType.MOD
|
||||
if user_input == "4":
|
||||
contentTypeEnum = ContentType.CUSTOM_SKIN
|
||||
else:
|
||||
exit("Operation Canceled")
|
||||
|
||||
@@ -143,6 +146,8 @@ def main():
|
||||
contentTypeEnum = ContentType.WORLD
|
||||
if (contentType == "Mod"):
|
||||
contentTypeEnum = ContentType.MOD
|
||||
if (contentType == "Custom Skin"):
|
||||
contentTypeEnum = ContentType.CUSTOM_SKIN
|
||||
else:
|
||||
pass
|
||||
|
||||
@@ -151,7 +156,7 @@ def main():
|
||||
if instance_path == "None":
|
||||
instance_path = input("Enter the Instance path.")
|
||||
|
||||
file : str = parsed_cmd_args[0].file
|
||||
file = parsed_cmd_args[0].file
|
||||
|
||||
if file == "None":
|
||||
file = input(f"Enter the archive of the {contentTypeEnum.name}")
|
||||
@@ -161,7 +166,7 @@ def main():
|
||||
1. Install Maps/World
|
||||
2. Install DLC
|
||||
3. Install Mods
|
||||
4. Install Custom Skin (Coming Soon)
|
||||
4. Install Custom Skin
|
||||
5. Cancel
|
||||
""")
|
||||
|
||||
@@ -173,6 +178,8 @@ def main():
|
||||
contentTypeEnum = ContentType.DLC
|
||||
if user_input == "3":
|
||||
contentTypeEnum = ContentType.MOD
|
||||
if user_input == "4":
|
||||
contentTypeEnum = ContentType.CUSTOM_SKIN
|
||||
else:
|
||||
exit("Operation Canceled")
|
||||
|
||||
@@ -189,4 +196,4 @@ def main():
|
||||
install_content(instance_path, contentTypeEnum, file)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
# pyright: reportUnusedCallResult=hint
|
||||
# pyright: reportAny=hint
|
||||
# pyright: reportAttributeAccessIssue=false
|
||||
# pyright: reportUnknownMemberType=false
|
||||
# pyright: reportUnknownVariableType=false
|
||||
|
||||
from PySide6.QtWidgets import (
|
||||
QApplication,
|
||||
QFileDialog,
|
||||
@@ -14,11 +8,13 @@ from PySide6.QtWidgets import (
|
||||
QInputDialog,
|
||||
QMessageBox
|
||||
)
|
||||
|
||||
from PySide6.QtGui import (
|
||||
QPalette,
|
||||
QPixmap,
|
||||
QBrush
|
||||
)
|
||||
|
||||
from PySide6.QtCore import (
|
||||
qVersion,
|
||||
Qt,
|
||||
@@ -26,6 +22,8 @@ from PySide6.QtCore import (
|
||||
QIODevice
|
||||
)
|
||||
|
||||
from PySide6.QtWebEngineCore import QWebEngineProfile, QWebEngineDownloadRequest
|
||||
|
||||
import sys
|
||||
import platform
|
||||
import json
|
||||
@@ -59,7 +57,7 @@ class LauncherView(QMainWindow):
|
||||
|
||||
Args:
|
||||
QMainWindow (_type_): _description_ Inherited/is a QMainWindow
|
||||
"""
|
||||
"""
|
||||
def __init__(self,
|
||||
appContext : AppContext,
|
||||
appData : AppData,
|
||||
@@ -315,7 +313,7 @@ class LauncherView(QMainWindow):
|
||||
open_github_issues = lambda : webbrowser.open(appContext.buildInfo.git_repo_url + "/issues")
|
||||
self.ui.actionReport_a_Bugs_or_Sugess_a_feature.triggered.connect(open_github_issues)
|
||||
|
||||
loadDefaultInstance = lambda : self.load_instance(dict(), instanceManager)
|
||||
loadDefaultInstance = lambda : self.loadInstanceCommand(dict(), instanceManager)
|
||||
self.ui.actionLoadDefaultInstance.triggered.connect(loadDefaultInstance)
|
||||
|
||||
neoLegacyJson = QFile(":/instances/neoLegacy.lce_inst")
|
||||
@@ -326,7 +324,7 @@ class LauncherView(QMainWindow):
|
||||
else:
|
||||
raw_text_neo = bytes(neoLegacyJson.readAll().data()).decode('utf-8')
|
||||
data_neo = json.loads(raw_text_neo)
|
||||
loadNeoLegacyInstance = lambda : self.load_instance(data_neo, instanceManager)
|
||||
loadNeoLegacyInstance = lambda : self.loadInstanceCommand(data_neo, instanceManager)
|
||||
self.ui.actionLoadNeoLegacyInstance.triggered.connect(loadNeoLegacyInstance)
|
||||
|
||||
hellishEndsJson = QFile(":/instances/hellishends.lce_inst")
|
||||
@@ -337,7 +335,7 @@ class LauncherView(QMainWindow):
|
||||
else:
|
||||
raw_text_hellish_end = bytes(hellishEndsJson.readAll().data()).decode('utf-8')
|
||||
data_hellish_end = json.loads(raw_text_hellish_end)
|
||||
loadhellishEndsInstance = lambda : self.load_instance(data_hellish_end, instanceManager)
|
||||
loadhellishEndsInstance = lambda : self.loadInstanceCommand(data_hellish_end, instanceManager)
|
||||
self.ui.actionLoadHellishEndsInstance.triggered.connect(loadhellishEndsInstance)
|
||||
|
||||
i360RevivedJson = QFile(":/instances/360Revived.lce_inst")
|
||||
@@ -348,7 +346,7 @@ class LauncherView(QMainWindow):
|
||||
else:
|
||||
raw_text_360 = bytes(i360RevivedJson.readAll().data()).decode('utf-8')
|
||||
data_360 = json.loads(raw_text_360)
|
||||
load360RevivedInstance = lambda : self.load_instance(data_360, instanceManager)
|
||||
load360RevivedInstance = lambda : self.loadInstanceCommand(data_360, instanceManager)
|
||||
self.ui.actionLoad360RevivedInstance.triggered.connect(load360RevivedInstance)
|
||||
|
||||
revelationJson = QFile(":/instances/revelations.lce_inst")
|
||||
@@ -359,7 +357,7 @@ class LauncherView(QMainWindow):
|
||||
else:
|
||||
raw_text_rev = bytes(revelationJson.readAll().data()).decode('utf-8')
|
||||
data_rev = json.loads(raw_text_rev)
|
||||
loadRevelationInstance = lambda : self.load_instance(data_rev, instanceManager)
|
||||
loadRevelationInstance = lambda : self.loadInstanceCommand(data_rev, instanceManager)
|
||||
self.ui.actionLoadRevelationsInstance.triggered.connect(loadRevelationInstance)
|
||||
|
||||
aetherJson = QFile(":/instances/aether.lce_inst")
|
||||
@@ -370,7 +368,7 @@ class LauncherView(QMainWindow):
|
||||
else:
|
||||
raw_text_aether = bytes(aetherJson.readAll().data()).decode('utf-8')
|
||||
data_aether = json.loads(raw_text_aether)
|
||||
loadAetherInstance = lambda : self.load_instance(data_aether, instanceManager)
|
||||
loadAetherInstance = lambda : self.loadInstanceCommand(data_aether, instanceManager)
|
||||
self.ui.actionLoadAetherInstance.triggered.connect(loadAetherInstance)
|
||||
|
||||
def addSteamLinkIntegrationButtonCommand():
|
||||
@@ -389,12 +387,29 @@ class LauncherView(QMainWindow):
|
||||
|
||||
self.ui.InstancesList.setEnabled(False)
|
||||
|
||||
self.profile: QWebEngineProfile = self.ui.marketplacesWebsiteEngine.page().profile()
|
||||
self.profile.downloadRequested.connect(self.handleDownloadCommand)
|
||||
|
||||
self.versionlabel: QLabel = QLabel(f"Version {buildInfo.version}")
|
||||
self.ui.statusbar.addPermanentWidget(self.versionlabel)
|
||||
holyday_label: QLabel = QLabel(holiday.get_holiday())
|
||||
self.ui.statusbar.addWidget(holyday_label)
|
||||
|
||||
def load_instance(self, data : dict[str, str], instanceManager : InstanceManager, ) -> None:
|
||||
|
||||
def handleDownloadCommand(self, download: QWebEngineDownloadRequest):
|
||||
"""Processes the PySide6 download stream request."""
|
||||
suggested_path = str(Path.home() / download.suggestedFileName())
|
||||
file_path, _ = QFileDialog.getSaveFileName(self, "Save Downloaded File", suggested_path)
|
||||
|
||||
if file_path:
|
||||
target_path = Path(file_path)
|
||||
download.setDownloadDirectory(str(target_path.parent))
|
||||
download.setDownloadFileName(target_path.name)
|
||||
download.accept()
|
||||
download.finished.connect(lambda: print("File download completed successfully."))
|
||||
else:
|
||||
download.cancel()
|
||||
|
||||
def loadInstanceCommand(self, data : dict[str, str], instanceManager : InstanceManager, ) -> None:
|
||||
instance = Instance()
|
||||
instance.load_inst_from_dict(data)
|
||||
features.load_instance_from_instance(instanceManager, instance)
|
||||
|
||||
Reference in New Issue
Block a user