Remove logos-install; logos is now self-bootstrapping

On first run, logos auto-creates the WINE prefix and launches the
installer if Logos.exe isn't found. No separate install step needed.

nix run github:sscoble/logos-app  -- that's it.
This commit is contained in:
cos Agent 2026-05-15 20:59:28 -07:00
parent f79a4784b4
commit 505b33e4dc
2 changed files with 104 additions and 69 deletions

61
flake.lock generated Normal file
View file

@ -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": 1778443072,
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
"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
}

112
flake.nix
View file

@ -11,11 +11,10 @@
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
# Shared user data path for persistent storage
dataDir = "$HOME/.local/share/logos-app"; dataDir = "$HOME/.local/share/logos-app";
# ── Electron web wrapper ────────────────────────── # ── Electron web wrapper ──────────────────────────
logos-electron = pkgs.writeShellApplication { logos-web = pkgs.writeShellApplication {
name = "logos-web"; name = "logos-web";
runtimeInputs = [ pkgs.electron ]; runtimeInputs = [ pkgs.electron ];
text = '' text = ''
@ -24,64 +23,56 @@
''; '';
}; };
# ── WINE launcher (after desktop install) ────────── # ── WINE launcher (self-bootstrapping) ────────────
logos-wine = pkgs.writeShellApplication { logos = pkgs.writeShellApplication {
name = "logos"; name = "logos";
runtimeInputs = [ pkgs.wineWow64Packages.stagingFull ]; runtimeInputs = with pkgs; [
wineWow64Packages.stagingFull
winetricks
wget
];
text = '' text = ''
WINEPREFIX="''${WINEPREFIX:-$HOME/.local/share/logos-wine}" WINEPREFIX="''${WINEPREFIX:-$HOME/.local/share/logos-wine}"
export WINEPREFIX WINEARCH=win64 export WINEPREFIX WINEARCH=win64
LOGOS_EXE="$WINEPREFIX/drive_c/users/$USER/AppData/Local/Logos/Logos.exe" LOGOS_EXE="$WINEPREFIX/drive_c/users/$USER/AppData/Local/Logos/Logos.exe"
if [ ! -f "$LOGOS_EXE" ]; then # ── Self-bootstrap: create prefix if missing ──
echo "Logos not installed yet. Run: logos-install"
exit 1
fi
exec wine "$LOGOS_EXE" "$@"
'';
};
# ── Installer script ───────────────────────────────
logos-install = pkgs.writeShellApplication {
name = "logos-install";
runtimeInputs = with pkgs; [ wineWow64Packages.stagingFull winetricks wget ];
text = ''
set -e
WINEPREFIX="''${WINEPREFIX:-$HOME/.local/share/logos-wine}"
export WINEPREFIX WINEARCH=win64
if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
echo "ERROR: No display. Run from your desktop, not SSH."
exit 1
fi
echo "=== Logos Installer ==="
# Init WINE prefix
if [ ! -d "$WINEPREFIX" ]; then if [ ! -d "$WINEPREFIX" ]; then
echo "[1/3] Creating WINE prefix..." echo "═══ First run: initializing WINE prefix ═══"
wineboot -i && wineserver -w wineboot -i && wineserver -w
winecfg -v win10 winecfg -v win10
winetricks -q corefonts winetricks -q corefonts 2>/dev/null
else echo "✓ WINE prefix ready"
echo "[1/3] WINE prefix exists" echo ""
fi fi
# Download installer # ── Self-bootstrap: download + run installer if Logos missing ──
INSTALLER="/tmp/LogosSetup.exe" if [ ! -f "$LOGOS_EXE" ]; then
if [ ! -f "$INSTALLER" ]; then echo "═══ Logos not installed — launching installer ═══"
echo "[2/3] Downloading Logos installer..." INSTALLER="''${XDG_CACHE_HOME:-$HOME/.cache}/LogosSetup.exe"
wget -q --show-progress -O "$INSTALLER" \ mkdir -p "$(dirname "$INSTALLER")"
"https://downloads.logoscdn.com/LBS10/Installer/LogosSetup.exe" if [ ! -f "$INSTALLER" ]; then
else echo "Downloading installer..."
echo "[2/3] Installer cached" wget -q --show-progress -O "$INSTALLER" \
"https://downloads.logoscdn.com/LBS10/Installer/LogosSetup.exe"
fi
echo ""
echo "→ Follow the Logos setup wizard to sign in and download your library."
echo "→ Next time you run 'logos' it will launch directly."
echo ""
wine "$INSTALLER" || {
echo "Installer exited. If Logos is installed, re-run 'logos'."
exit 1
}
fi fi
echo "[3/3] Running installer — follow the GUI..." if [ -f "$LOGOS_EXE" ]; then
wine "$INSTALLER" exec wine "$LOGOS_EXE" "$@"
echo "Done. Launch with: logos" else
echo "Logos not found after install. Try running again."
exit 1
fi
''; '';
}; };
@ -109,35 +100,18 @@
in in
{ {
packages = { packages = {
default = logos-wine; default = logos;
logos = logos-wine; logos = logos;
logos-web = logos-electron; logos-web = logos-web;
logos-install = logos-install;
logos-full = pkgs.symlinkJoin { logos-full = pkgs.symlinkJoin {
name = "logos-full"; name = "logos-full";
paths = [ paths = [ logos logos-web logos-desktop logos-web-desktop ];
logos-wine
logos-electron
logos-install
logos-desktop
logos-web-desktop
];
}; };
}; };
apps = { apps = {
default = { default = { type = "app"; program = "${logos}/bin/logos"; };
type = "app"; web = { type = "app"; program = "${logos-web}/bin/logos-web"; };
program = "${logos-wine}/bin/logos";
};
web = {
type = "app";
program = "${logos-electron}/bin/logos-web";
};
install = {
type = "app";
program = "${logos-install}/bin/logos-install";
};
}; };
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {