Drop rye lockfiles and [tool.rye], add uv.lock, and resolve current latest packages (pandas 3, beaupy 3.12, etc.). Setup/build scripts use uv sync. Co-authored-by: Diaco Soltanpour <s-diaco@users.noreply.github.com>
55 lines
1.4 KiB
Batchfile
55 lines
1.4 KiB
Batchfile
@echo off
|
|
REM Build dist\XlsxClean\XlsxClean.exe on Windows with uv, then Desktop shortcut.
|
|
setlocal
|
|
cd /d "%~dp0\.."
|
|
|
|
where uv >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo uv was not found on PATH.
|
|
echo Install uv from https://docs.astral.sh/uv/getting-started/installation/
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Syncing project + desktop extras with uv...
|
|
uv sync --extra desktop
|
|
if errorlevel 1 (
|
|
echo uv sync failed.
|
|
pause
|
|
exit /b 1
|
|
)
|
|
|
|
echo Building executable with PyInstaller...
|
|
uv run 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';" ^
|
|
"$ico=Join-Path '%CD%' 'desktop\xlsx-clean.ico';" ^
|
|
"$w=New-Object -ComObject WScript.Shell;" ^
|
|
"$s=$w.CreateShortcut($lnk);" ^
|
|
"$s.TargetPath='%EXE%';" ^
|
|
"$s.WorkingDirectory='%~dp0..\dist\XlsxClean';" ^
|
|
"$s.Description='Open xlsx-clean';" ^
|
|
"if (Test-Path $ico) { $s.IconLocation = $ico };" ^
|
|
"$s.Save();" ^
|
|
"Write-Host Created $lnk"
|
|
|
|
echo.
|
|
echo Done. Double-click the XlsxClean icon on your Desktop.
|
|
echo Exe folder: dist\XlsxClean\
|
|
pause
|