@echo off
:: ============================================================
::  Dark Desires — Uninstaller
::  Run this to completely remove Dark Desires.
::  Your saved stories in the saves\ folder will be deleted too
::  unless you copy them out first.
:: ============================================================

setlocal

set "INSTALL_DIR=%LOCALAPPDATA%\DarkDesires"
set "DESKTOP_LNK=%USERPROFILE%\Desktop\Dark Desires.lnk"
set "START_DIR=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Dark Desires"

echo.
echo  ============================================================
echo   Dark Desires ^| Uninstaller
echo  ============================================================
echo.
echo  This will remove Dark Desires and all its files from:
echo    %INSTALL_DIR%
echo.
echo  Your saved stories will also be deleted.
echo  Copy %INSTALL_DIR%\saves\ somewhere safe first if you want to keep them.
echo.

set /p CONFIRM="  Are you sure you want to uninstall? [Y/N]: "
if /i not "%CONFIRM%"=="Y" (
    echo.
    echo  Uninstall cancelled.
    echo.
    pause & exit /b 0
)

echo.
echo  Removing files...

:: Remove install directory
if exist "%INSTALL_DIR%" (
    rmdir /s /q "%INSTALL_DIR%"
    echo  Removed: %INSTALL_DIR%
) else (
    echo  Not found: %INSTALL_DIR%  ^(already removed?^)
)

:: Remove Desktop shortcut
if exist "%DESKTOP_LNK%" (
    del /f /q "%DESKTOP_LNK%"
    echo  Removed Desktop shortcut.
)

:: Remove Start Menu folder
if exist "%START_DIR%" (
    rmdir /s /q "%START_DIR%"
    echo  Removed Start Menu shortcuts.
)

echo.
echo  ============================================================
echo   Dark Desires has been uninstalled.
echo  ============================================================
echo.
pause
