commit 4b8d87d5b47cb8de2da66077e73844fcaeaa78d3 Author: Miskolczi Richárd Date: Sun Apr 12 14:59:22 2026 +0200 Adding files diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..6340ace --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +Uhhh + +This is more of a "All rights reserved", than anything else. + +We don't recommend using this source code to build your own Minecraft +launcher due to a good amount of low quality legacy code, but it still +can be used as a reference to build, for example Microsoft authentication +or CurseForge integration. diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..57640e9 --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1775710090, + "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4c1018dae018162ec878d42fec712642d214fdfa", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..325dbb8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,54 @@ +{ + description = "Legacy Minecraft Launcher"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + packages.default = pkgs.stdenvNoCC.mkDerivation { + pname = "legacy-launcher"; + version = "latest"; + + src = pkgs.fetchurl { + url = "https://ely.by/load/launcher/jar"; + sha256 = "sha256-n4J+/I8hsU4EA6eqyUUIScJhvLpkUdmr7u5jiLhQhX4="; + }; + + nativeBuildInputs = [ pkgs.makeWrapper ]; + + dontUnpack = true; + + installPhase = '' + mkdir -p $out/bin + mkdir -p $out/share/{applications,legacy-launcher} + + # Install JAR + install -Dm644 $src \ + $out/share/legacy-launcher/LegacyLauncher_legacy.jar + + # Create launcher wrapper + makeWrapper ${pkgs.jre}/bin/java \ + $out/bin/legacy-launcher \ + --add-flags "-jar $out/share/legacy-launcher/LegacyLauncher_legacy.jar" + + # Desktop entry + install -Dm644 ${./legacy-launcher.desktop} \ + $out/share/applications/legacy-launcher.desktop + ''; + + meta = with pkgs.lib; { + description = "Stable, fast and simple Minecraft Launcher"; + homepage = "https://llaun.ch"; + license = licenses.gpl3Only; + platforms = platforms.all; + }; + }; + } + ); +} diff --git a/legacy-launcher.desktop b/legacy-launcher.desktop new file mode 100644 index 0000000..7e19f7b --- /dev/null +++ b/legacy-launcher.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=Legacy Launcher +Exec=/usr/bin/legacy-launcher +Icon=legacy-launcher +Type=Application +Categories=Game; +Comment=Stable, fast and simple Minecraft Launcher.