-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.bat
More file actions
127 lines (111 loc) · 2.87 KB
/
build.bat
File metadata and controls
127 lines (111 loc) · 2.87 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
@echo off
REM Windows build script for HackingGPT Desktop Application
REM This script automates the entire build process
echo ============================================
echo HackingGPT Desktop Application Builder
echo ============================================
echo.
REM Check if Python is installed
python --version >nul 2>&1
if errorlevel 1 (
echo ERROR: Python is not installed or not in PATH
echo Please install Python 3.8+ and try again
pause
exit /b 1
)
echo Python found:
python --version
echo.
REM Create virtual environment
echo Creating virtual environment...
if not exist "venv" (
python -m venv venv
if errorlevel 1 (
echo ERROR: Failed to create virtual environment
pause
exit /b 1
)
) else (
echo Virtual environment already exists
)
REM Activate virtual environment
echo Activating virtual environment...
call venv\Scripts\activate.bat
if errorlevel 1 (
echo ERROR: Failed to activate virtual environment
pause
exit /b 1
)
REM Upgrade pip
echo Upgrading pip...
python -m pip install --upgrade pip
REM Install dependencies
echo Installing dependencies...
pip install -r requirements_webview.txt
if errorlevel 1 (
echo ERROR: Failed to install dependencies
pause
exit /b 1
)
REM Install PyInstaller
echo Installing PyInstaller...
pip install pyinstaller==6.2.0
if errorlevel 1 (
echo ERROR: Failed to install PyInstaller
pause
exit /b 1
)
REM Create assets directory and placeholder icon
if not exist "assets" mkdir assets
if not exist "assets\icon.ico" (
echo Creating placeholder icon...
echo. > assets\icon.ico
)
REM Check if required files exist
if not exist "webview_app.py" (
echo ERROR: webview_app.py not found!
echo Please make sure all required files are in the current directory
pause
exit /b 1
)
if not exist "app.py" (
echo ERROR: app.py not found!
echo Please make sure the Flask application file is present
pause
exit /b 1
)
if not exist "templates" (
echo ERROR: templates directory not found!
echo Please make sure the templates directory exists
pause
exit /b 1
)
REM Run the build script
echo Starting build process...
python build_executable.py
if errorlevel 1 (
echo ERROR: Build process failed
pause
exit /b 1
)
echo.
echo ============================================
echo BUILD COMPLETED SUCCESSFULLY!
echo ============================================
echo.
echo Executable location: dist\HackingGPT.exe
echo Installer script: HackingGPT_installer.nsi
echo.
echo To create Windows installer:
echo 1. Install NSIS (Nullsoft Scriptable Install System)
echo 2. Right-click on HackingGPT_installer.nsi
echo 3. Select "Compile NSIS Script"
echo.
echo To test the application:
echo 1. Navigate to dist\ folder
echo 2. Run HackingGPT.exe
echo.
REM Deactivate virtual environment
deactivate
echo Press any key to exit...
pause >nul