Skip to content

Troytmoneys/TroyLauncher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Troy Launcher

Troy Launcher is a Windows-focused Minecraft launcher written in Python. It provides a modern dashboard similar to Lunar Client with integrated Microsoft authentication, curated servers, Java tuning, and automatic Troy Projects mod deployment before the game starts.

Features

  • Version presets for Minecraft 1.21, 1.16.5, 1.12.2, and 1.8.9 (labelled as 1.8 PvP) with automatic asset downloading.
  • Microsoft login using your own Azure OAuth application and device-safe PKCE redirects.
  • Automatic mod sync that downloads the Troy Projects mod from https://launcher.troyprojects.com/mod.jar for the selected version.
  • Quick join servers that pass --server and --port flags directly to the vanilla client.
  • Java configuration including executable override and min/max RAM allocation sliders.
  • Update checking against https://launcher.troyprojects.com/updates/check.php with MSI publishing utilities.
  • Persistent settings stored under %APPDATA%/TroyLauncher/config.json (or ~/.config/TroyLauncher on non-Windows systems).

Prerequisites

  • Windows 10/11 with Python 3.10+ installed. (Other platforms work for development but Minecraft Java Edition is supported on Windows for this build.)
  • Java runtime compatible with the selected Minecraft versions.
  • pip install -r requirements.txt
  • An Azure Active Directory application configured for Microsoft login.

Azure configuration

  1. Create an Azure AD application in the Azure Portal.
  2. Add a redirect URI of https://login.microsoftonline.com/common/oauth2/nativeclient or a custom URI you plan to paste back into the launcher.
  3. Copy the Client ID into the launcher settings panel.
  4. If you use a custom redirect, paste it into the Redirect URI field in settings.

The launcher opens the Microsoft login flow in your default browser. After authenticating, copy the final redirect URL and paste it into the prompt to finish linking your account. Refresh tokens are stored securely in the local config file and refreshed automatically.

Running the launcher

python -m venv .venv
.\.venv\Scripts\activate  # PowerShell on Windows
pip install -r requirements.txt
python main.py

On first launch, sign in with Microsoft, pick your preferred version, optionally choose a quick-join server, and hit Launch Minecraft. The launcher will:

  1. Ensure the requested Minecraft version is installed locally using minecraft-launcher-lib.
  2. Download the Troy Projects mod JAR into the appropriate mods/<version>/ folder (tracked via ETag/Last-Modified headers to avoid unnecessary downloads).
  3. Launch Minecraft with your configured Java executable and RAM limits.

Note: If the Troy Projects mod targets Forge or Fabric you must install the matching loader for the selected version. The launcher installs vanilla Minecraft builds; drop the appropriate Forge/Fabric libraries into the version folder if required.

Update server utilities

The updates directory contains optional PHP tooling for Troy Projects to publish MSI installers:

  • check.php — returns JSON describing the latest release in updates/releases/latest.json and adds an updateAvailable flag when the launcher sends its current version.
  • index.php — simple upload form for a new MSI and version number. Successful uploads store the installer in updates/releases/ and refresh latest.json.

Deploy these scripts to https://launcher.troyprojects.com/updates/ (or adjust UPDATE_ENDPOINT in launcher/updater.py). Protect the upload endpoint behind authentication before going live.

Configuration file

The config file captures:

  • Microsoft refresh token, profile ID, and display name
  • Java executable path
  • Min/max RAM values
  • Preferred Minecraft version and quick-join server
  • Azure Client ID and redirect URI
  • Cached metadata for the Troy Projects mod (to avoid redundant downloads)

You can delete the config file to reset the launcher to defaults.

Packaging for Windows

For distribution, package main.py with tools such as PyInstaller or MSIX Packaging Tool. After building an MSI, upload it via updates/index.php so future clients discover the update.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors