-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_complete.bat
More file actions
76 lines (66 loc) · 1.95 KB
/
build_complete.bat
File metadata and controls
76 lines (66 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@echo off
REM Complete Kotha CLI Distribution Builder
echo.
echo ================================================
echo Kotha CLI Complete Distribution Builder
echo ================================================
echo.
REM Check if Python is installed
python --version >nul 2>&1
if %errorlevel% neq 0 (
echo Error: Python is not installed or not in PATH.
echo Please install Python 3.8+ from https://python.org
echo.
pause
exit /b 1
)
echo Step 1: Installing PyInstaller...
python -m pip install pyinstaller
echo.
echo Step 2: Cleaning previous builds...
if exist build rmdir /s /q build
if exist dist rmdir /s /q dist
if exist kotha-cli-standalone rmdir /s /q kotha-cli-standalone
if exist __pycache__ rmdir /s /q __pycache__
if exist kotha\__pycache__ rmdir /s /q kotha\__pycache__
echo.
echo Step 3: Building standalone executable...
python -m PyInstaller kotha.spec
if %errorlevel% neq 0 (
echo.
echo Error: Failed to build executable
pause
exit /b 1
)
echo.
echo Step 4: Testing executable...
dist\kotha.exe --version
if %errorlevel% neq 0 (
echo.
echo Warning: Executable created but test failed
)
echo.
echo Step 5: Creating distribution package...
mkdir kotha-cli-standalone
copy dist\kotha.exe kotha-cli-standalone\
copy install_standalone.bat kotha-cli-standalone\
copy README_STANDALONE.md kotha-cli-standalone\
echo.
echo Step 6: Creating distribution archive...
powershell Compress-Archive -Path "kotha-cli-standalone\*" -DestinationPath "kotha-cli-standalone-v1.0.0.zip" -Force
echo.
echo ✅ Build completed successfully!
echo.
echo 📦 Distribution files:
echo - kotha-cli-standalone\ (folder)
echo - kotha-cli-standalone-v1.0.0.zip (archive)
echo.
echo 📖 To distribute:
echo 1. Share the ZIP file or the standalone folder
echo 2. Recipients run install_standalone.bat
echo 3. No Python installation required!
echo.
echo 📏 Executable size:
for %%A in (dist\kotha.exe) do echo %%~zA bytes (%%~zA
echo.
pause