@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 default config.ini in the dist folder echo Creating default config.ini in dist folder... echo [Settings] > dist\config.ini echo double_click_threshold = 0.3 >> dist\config.ini echo save_location = C:\Users\Documents >> dist\config.ini echo. >> dist\config.ini echo [AI] >> dist\config.ini echo model_type = none >> dist\config.ini echo api_key = >> dist\config.ini echo base_url = https://api.openai.com/v1 >> dist\config.ini echo model = gpt-3.5-turbo >> dist\config.ini :: 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 Configuration: >> dist\README.txt echo - Settings are stored in config.ini in the same folder as the executable >> 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