- logos: WINE-based desktop app (offline-capable) - logos-web: Electron wrapper for web app - logos-install: one-time GUI installer
80 lines
2.6 KiB
Bash
Executable file
80 lines
2.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Logos Bible Software — WINE installer for NixOS
|
|
# Run this from your desktop terminal (not SSH — needs display)
|
|
|
|
set -e
|
|
|
|
WINEPREFIX="${WINEPREFIX:-$HOME/.local/share/logos-wine}"
|
|
WINEARCH="win64"
|
|
LOGOS_INSTALLER_URL="https://downloads.logoscdn.com/LBS10/Installer/LogosSetup.exe"
|
|
|
|
echo "=== Logos Bible Software Installer for NixOS ==="
|
|
echo "WINE prefix: $WINEPREFIX"
|
|
echo ""
|
|
|
|
# Check for display
|
|
if [ -z "$DISPLAY" ]; then
|
|
echo "ERROR: No display found. Run this from your desktop, not SSH."
|
|
exit 1
|
|
fi
|
|
|
|
# Step 1: Initialize WINE prefix if needed
|
|
if [ ! -d "$WINEPREFIX" ]; then
|
|
echo "[1/4] Creating WINE prefix..."
|
|
nix-shell -p wineWow64Packages.stagingFull winetricks --command "
|
|
export WINEPREFIX='$WINEPREFIX'
|
|
export WINEARCH='$WINEARCH'
|
|
wineboot -i
|
|
wineserver -w
|
|
winecfg -v win10
|
|
winetricks -q corefonts
|
|
"
|
|
echo "✓ WINE prefix ready"
|
|
else
|
|
echo "[1/4] ✓ WINE prefix exists"
|
|
fi
|
|
|
|
# Step 2: Download installer (skip if exists)
|
|
INSTALLER="/tmp/LogosSetup.exe"
|
|
if [ ! -f "$INSTALLER" ]; then
|
|
echo "[2/4] Downloading Logos installer..."
|
|
wget -q --show-progress -O "$INSTALLER" "$LOGOS_INSTALLER_URL" || {
|
|
echo "Download failed. Trying alternate URL..."
|
|
wget -q --show-progress -O "$INSTALLER" "https://downloads.logoscdn.com/LBS10/Installer/Logos-x64.msi"
|
|
}
|
|
echo "✓ Downloaded"
|
|
else
|
|
echo "[2/4] ✓ Installer already downloaded"
|
|
fi
|
|
|
|
# Step 3: Install Logos
|
|
echo "[3/4] Running Logos installer — follow the GUI prompts..."
|
|
nix-shell -p wineWow64Packages.stagingFull --command "
|
|
export WINEPREFIX='$WINEPREFIX'
|
|
export WINEARCH='$WINEARCH'
|
|
wine '$INSTALLER'
|
|
"
|
|
echo "✓ Installation complete"
|
|
|
|
# Step 4: Create launcher
|
|
echo "[4/4] Creating desktop launcher..."
|
|
LAUNCHER="$HOME/.local/share/applications/logos-bible.desktop"
|
|
cat > "$LAUNCHER" << DESKTOPEOF
|
|
[Desktop Entry]
|
|
Name=Logos Bible Software
|
|
Comment=Bible study and research tool (WINE)
|
|
Exec=nix-shell -p wineWow64Packages.stagingFull --command "WINEPREFIX=$WINEPREFIX WINEARCH=$WINEARCH wine C:\\\\users\\\\$USER\\\\AppData\\\\Local\\\\Logos\\\\Logos.exe"
|
|
Icon=logos-bible
|
|
Terminal=false
|
|
Type=Application
|
|
Categories=Education;Office;
|
|
StartupWMClass=logos.exe
|
|
DESKTOPEOF
|
|
|
|
echo "✓ Desktop launcher created at $LAUNCHER"
|
|
echo ""
|
|
echo "=== Done! ==="
|
|
echo "Launch Logos from your application menu, or run:"
|
|
echo " nix-shell -p wineWow64Packages.stagingFull --command \"WINEPREFIX=$WINEPREFIX wine 'C:\\\\users\\\\$USER\\\\AppData\\\\Local\\\\Logos\\\\Logos.exe'\""
|
|
echo ""
|
|
echo "First launch: sign in with your Faithlife account, then download your library for offline use."
|