poc/project/llmclipboard/build.bat
2025-03-02 18:56:33 +08:00

38 lines
1.5 KiB
Batchfile

@echo off
echo Building LLMClipboard v0.1.6...
:: Clean old build files
if exist build rmdir /s /q build
if exist dist rmdir /s /q dist
:: Build with pyinstaller
echo Building application...
.venv\Scripts\python.exe -m PyInstaller --clean --onefile --windowed --name LLMClipboard --icon=resources/icon_256x256.ico --add-data "resources;resources" run_app.py
:: Check if successful
if exist dist\LLMClipboard.exe (
echo Build successful! Executable is at dist\LLMClipboard.exe
:: Copy resources folder to dist
echo Copying resources to dist folder...
if not exist dist\resources mkdir dist\resources
xcopy /s /y resources dist\resources\
:: Create a README.txt in the dist folder
echo Creating README.txt in dist folder...
echo LLMClipboard v0.1.6 > dist\README.txt
echo ====================== >> dist\README.txt
echo. >> dist\README.txt
echo Instructions: >> dist\README.txt
echo 1. Double-click LLMClipboard.exe to start the application >> dist\README.txt
echo 2. The application will run in the system tray >> dist\README.txt
echo 3. Double-click the system tray icon to open the main window >> dist\README.txt
echo 4. Right-click the system tray icon to access the menu >> dist\README.txt
echo. >> dist\README.txt
echo If you encounter any issues, please check error_log.txt and config_error.txt files >> dist\README.txt
) else (
echo Build failed, please check error messages.
)
echo Build process completed.
pause