Add desktop shortcut and Windows exe packaging

Operators can double-click XlsxClean without using the terminal: Windows
VBS/BAT launchers plus Install-DesktopShortcut, Linux .desktop installer,
and a PyInstaller spec/build script for a standalone Windows exe.

Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-07-22 08:12:44 +00:00
parent 1be0c3ca0f
commit afec00b50f
13 changed files with 352 additions and 5 deletions

View File

@@ -0,0 +1,44 @@
@echo off
REM Build dist\XlsxClean\XlsxClean.exe on Windows, then copy a Desktop shortcut.
setlocal
cd /d "%~dp0\.."
echo Installing packaging deps...
py -3 -m pip install -e ".[desktop]"
if errorlevel 1 (
echo pip install failed. Ensure Python 3.12+ is installed.
pause
exit /b 1
)
echo Building executable with PyInstaller...
py -3 -m PyInstaller --noconfirm packaging\xlsx_clean.spec
if errorlevel 1 (
echo PyInstaller build failed.
pause
exit /b 1
)
set EXE=%CD%\dist\XlsxClean\XlsxClean.exe
if not exist "%EXE%" (
echo Expected exe not found: %EXE%
pause
exit /b 1
)
echo Creating Desktop shortcut to the exe...
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$desk=[Environment]::GetFolderPath('Desktop');" ^
"$lnk=Join-Path $desk 'XlsxClean.lnk';" ^
"$w=New-Object -ComObject WScript.Shell;" ^
"$s=$w.CreateShortcut($lnk);" ^
"$s.TargetPath='%EXE%';" ^
"$s.WorkingDirectory='%~dp0..\dist\XlsxClean';" ^
"$s.Description='Open xlsx-clean';" ^
"$s.Save();" ^
"Write-Host Created $lnk"
echo.
echo Done. Double-click the XlsxClean icon on your Desktop.
echo Exe folder: dist\XlsxClean\
pause