add gitignore

This commit is contained in:
Lenrui committed 2026-11-06 00:18:31 -08:00
1 parent 0d1ff65479
commit f2c44dbc0d
8 files changed
+839 -77

No files matched your search

+9 -37
View File
@@ -1,48 +1,20 @@
@echo off
rem ==========================================================================
rem build.bat - builds gitdesk into a single Windows executable: dist\gitdesk.exe
rem
rem Needs Python 3.9+ installed. Double-click it or run it from this folder.
rem It makes its own throwaway environment in .build-venv, so it doesn't touch
rem your normal Python packages.
rem ==========================================================================
rem build.bat - builds dist\gitdesk.exe. Double-click it, or run it from a terminal.
rem In PowerShell type .\build.bat (PowerShell won't run it without the .\ in front).
rem Needs Python 3.9+. The real work is done by build.py; everything is logged to build.log.
setlocal
cd /d "%~dp0"
set "PY="
where py >nul 2>&1 && set "PY=py -3"
if not defined PY where python >nul 2>&1 && set "PY=python"
if not defined PY (
echo Python 3 was not found. Install it from https://www.python.org/downloads/
goto :fail
echo and tick "Add python.exe to PATH" during setup.
pause
exit /b 1
)
echo [1/3] Creating the build environment - .build-venv ...
if not exist ".build-venv\Scripts\python.exe" %PY% -m venv .build-venv
if not exist ".build-venv\Scripts\python.exe" goto :fail
set "VPY=.build-venv\Scripts\python.exe"
echo [2/3] Installing PyInstaller and Textual...
"%VPY%" -m pip install --quiet --upgrade pip
"%VPY%" -m pip install --quiet pyinstaller -r requirements.txt
if errorlevel 1 goto :fail
echo [3/3] Building gitdesk.exe...
rem Textual and Rich load some of their modules on demand, so bundle all of them.
"%VPY%" -m PyInstaller --noconfirm --clean --onefile --name gitdesk ^
--collect-submodules textual --collect-data textual --collect-submodules rich ^
--specpath build --workpath build --distpath dist ^
gitdesk.py
if errorlevel 1 goto :fail
%PY% "%~dp0build.py" %*
set "RC=%errorlevel%"
echo.
echo Done: %CD%\dist\gitdesk.exe
echo Copy it anywhere - a folder on your PATH is handy - and run "gitdesk" inside a repo.
pause
exit /b 0
:fail
echo.
echo Build failed - see the messages above.
pause
exit /b 1
exit /b %RC%