Skip to content

Crownelius/ABC-Patcher-Installer

Repository files navigation

IPL Stack - Install-Patch-Launch for Ultima Online/ServUO

An all-in-one cross-platform Install-Patch-Launch stack for Ultima Online servers using ServUO. The IPL stack is built around one shared patch core that knows how to read manifests, compare hashes, and stream differences. That core is compiled once and reused by both sides: the cross-platform launcher that players run, and the HTTP/HTTPS patch server that administrators host.

Supports: Windows, Linux, and macOS

Architecture

The IPL stack consists of several components:

  1. IPL.Core - Shared library for manifest reading, hash comparison, and diff streaming (cross-platform)
  2. IPL.Server - HTTP/HTTPS patch server with endpoint configuration and Discord integration (cross-platform)
  3. IPL.Launcher - WPF launcher for Windows players with channel validation, registry detection, and assistant launchers
  4. IPL.Launcher.Web - Cross-platform web-based launcher (Windows, Linux, macOS) accessible via browser
  5. IPL.ServerClient - Server-side client for ServUO operators with DataPath.cfg resolution, cross-platform service management, and syncing
  6. IPL.CLI - Command-line toolkit for manifest generation, hash refreshes, and ServUO syncing (cross-platform)
  7. IPL.Admin - Web-based admin dashboard for managing patch servers (cross-platform)

Features

Server Side

  • Configurable Endpoints: Define multiple endpoints via scoped .cfg files for client, staging, or server channels
  • HTTPS Support: Full HTTPS support with certificate management (uses HTTPS instead of plaintext HTTP)
  • Manifest Generation: Automatic manifest generation from directory contents
  • Delta Patching: Block-based delta patching for efficient updates (only download what changed)
  • Hash Computation: SHA256 hash calculation for all files
  • Discord Integration: Webhook notifications for server events
  • Auto-Refresh: Configurable manifest refresh intervals

Player Side (WPF Launcher)

  • Channel Validation: Validates launcher channel matches server
  • Registry Detection: Automatically detects client installations from registry and shortcuts
  • Account Management: Store and manage multiple accounts
  • Assistant Launchers: Full support for ClassicUO, Razor, and Steam clients
  • Real-time Status: Progress reporting during patching
  • Delta Patching: Automatic delta patch application for faster updates
  • Shard Links: Custom shard links in launcher UI

Server Client Flavor

  • DataPath.cfg Resolution: Automatically resolves ServUO DataPath configuration
  • Service Management: Stop/start Windows services during patching
  • Task Management: Stop/start scheduled tasks during patching
  • Directory Backup: Backup directories before patching
  • Sync Support: Sync from live patch server or local "gold master" folder

Web-Based Admin Dashboard

  • Modern Web UI: Beautiful, responsive dashboard accessible from any browser
  • Endpoint Management: View and manage all patch server endpoints
  • Manifest Generation: Generate manifests directly from the web interface
  • Real-Time Statistics: View file counts, sizes, delta patch information, and version details
  • Config Editor: View and edit server configuration files through the web interface
  • Status Monitoring: Monitor server status and endpoint health
  • Quick Actions: One-click manifest generation for all endpoints

CLI Toolkit

  • Manifest Generation: ipl manifest <directory> [options] - with optional delta patch generation
  • Hash Refresh: ipl hash <manifest.json> [options]
  • ServUO Sync: ipl sync <server-url> <target> [options]
  • Delta Patch Generation: ipl delta <base-file> <target-file> <output-patch>

Quick Start

Server Setup

  1. Create a server.cfg.json file based on server.cfg.example.json
  2. Configure endpoints with base directories and ports
  3. Generate or provide SSL certificates for HTTPS
  4. Optionally configure Discord webhook
  5. Run: dotnet run --project IPL.Server

Launcher Setup

  1. Build the launcher: dotnet build IPL.Launcher
  2. Configure server URL and channel
  3. Select client type (ClassicUO, Razor, or Steam)
  4. Click "Check for Updates" to validate channel and download patches
  5. Click "Play" to launch the client

CLI Usage

# Generate manifest
ipl manifest ./dist/client --channel client --version 1.0.0

# Generate manifest with delta patches (requires base manifest)
ipl manifest ./dist/client --channel client --version 1.0.1 --delta ./dist/client/manifest.json

# Generate standalone delta patch
ipl delta ./old/client.exe ./new/client.exe ./client.exe.delta

# Refresh hashes
ipl hash manifest.json --directory ./dist/client

# Sync ServUO from server
ipl sync https://patches.yourserver.com ./ServUO --channel server

Delta Patching

IPL Stack supports delta patching - a block-based algorithm that only transfers changed parts of files. This significantly reduces download sizes for large files with small changes.

How It Works

Delta patching works by:

  1. Block Division: Files are divided into blocks (default 64KB)
  2. Hash Comparison: Each block's hash is compared between base and target files
  3. Reference Blocks: Unchanged blocks are referenced from the base file
  4. Data Blocks: Changed or new blocks contain the actual data
  5. Compression: Delta patches are compressed using GZip

Benefits

  • Bandwidth Savings: Only download what changed, not entire files
  • Faster Updates: Smaller patches mean faster downloads
  • Automatic Fallback: If delta patching fails, automatically falls back to full file download
  • Selective Application: Only files > 1MB are eligible for delta patches (smaller files download faster as-is)

Usage

Generate manifest with delta patches:

ipl manifest ./dist/client --channel client --version 1.0.1 --delta ./dist/client/manifest.json

Generate standalone delta patch:

ipl delta ./old/client.exe ./new/client.exe ./client.exe.delta

Launcher automatically uses delta patches when available and the local file exists. If delta patching fails or the file doesn't exist locally, it falls back to full file download.

Server Configuration

Delta patches are stored in a delta/ subdirectory of your base directory and served via the /delta/{path} endpoint. The server automatically includes delta patch URLs in manifests when generating with --delta option.

HTTPS Certificate Management

Since this system uses HTTPS (not plaintext HTTP), you'll need to generate certificates:

Option 1: OpenSSL (Development)

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem

Option 2: Windows Certificate Store

Use makecert or New-SelfSignedCertificate PowerShell cmdlet:

New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My" -NotAfter (Get-Date).AddYears(1)
Export-Certificate -Cert (Get-ChildItem Cert:\LocalMachine\My\<Thumbprint>) -FilePath cert.cer

Project Structure

IPL.Stack/
├── IPL.Core/              # Shared patch core library
│   ├── Models/           # Manifest and diff models
│   ├── PatchCore/        # ManifestReader, HashComparator, DiffStreamer
│   └── Certificate/      # Certificate management
├── IPL.Server/           # HTTP/HTTPS patch server
│   ├── Models/           # Server configuration models
│   └── Services/         # Discord service
├── IPL.Launcher/         # WPF player launcher (Windows only)
│   ├── Services/         # Client detection, patch processing
│   └── Models/           # Launcher configuration
├── IPL.Launcher.Web/     # Cross-platform web-based launcher
│   ├── Controllers/      # REST API controllers
│   ├── Services/         # Launcher service logic
│   └── wwwroot/          # Web UI files
├── IPL.ServerClient/     # Server-side client for ServUO operators (cross-platform)
├── IPL.CLI/              # Command-line toolkit (cross-platform)
└── IPL.Admin/            # Web-based admin dashboard (cross-platform)

Building

# Build all projects
dotnet build

# Build specific project
dotnet build IPL.Launcher

# Publish launcher (single file)
dotnet publish IPL.Launcher -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true

License

This project is open source and licensed under the MIT License. See LICENSE file for details.

Feel free to modify and distribute as needed for your shard.

Contributing

Contributions welcome! Please submit issues or pull requests for improvements.


Made for ServUO shards - Enjoy your shard!

About

Installer, Patcher and more for Servuo Ultima Online servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors