-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuilder.bat
More file actions
54 lines (44 loc) · 1.32 KB
/
builder.bat
File metadata and controls
54 lines (44 loc) · 1.32 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
@echo off
setlocal enabledelayedexpansion
:: Load configuration from config.txt
for /f "tokens=1,* delims==" %%A in (config.txt) do (
set "%%A=%%B"
)
:: Parse arguments
if "%1"=="--build" (
echo Running: pip install -e .
pip install -e .
goto :eof
)
if "%1"=="--run" (
echo Running: python sqlmap_gui
python sqlmap_gui
goto :eof
)
if "%1"=="--exe" (
set "CMD=pyinstaller"
:: Required
if defined name set "CMD=!CMD! --name !name!"
if defined icon set "CMD=!CMD! --icon=!icon!"
:: Optional
if defined distpath set "CMD=!CMD! --distpath !distpath!"
if defined workpath set "CMD=!CMD! --workpath !workpath!"
if defined add-data set "CMD=!CMD! --add-data !add-data!"
if defined paths set "CMD=!CMD! --paths !paths!"
:: Default flags
set "CMD=!CMD! --onefile --windowed sqlmap_gui/main.py"
echo Running: !CMD!
call !CMD!
goto :eof
)
if "%1"=="--activate" (
echo Activating virtual environment: sqlmap_env\Scripts\Activate
call sqlmap_env\Scripts\Activate
goto :eof
)
:: Default help message
echo Usage:
echo builder.bat --build ^(pip install -e .^)
echo builder.bat --run ^(python sqlmap_gui^)
echo builder.bat --exe ^(build executable with pyinstaller^)
echo builder.bat --activate ^(sqlmap_env\Scripts\Activate^)