forked from MarioVilas/winappdbg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.bat
77 lines (70 loc) · 1.8 KB
/
install.bat
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
@echo off
setlocal EnableExtensions
setlocal EnableDelayedExpansion
if not "%~2" == "" goto Help
if "%~1" == "" goto Default
if "%~1" == "all" goto All
if "%~1" == "All" goto All
if "%~1" == "ALL" goto All
if "%~1" == "/?" goto Help
if "%~1" == "/h" goto Help
if "%~1" == "/H" goto Help
if "%~1" == "-h" goto Help
if "%~1" == "--help" goto Help
if "%~1" == "/help" goto Help
if "%~1" == "/HELP" goto Help
if not exist "%~1" goto NotExistHelp
if exist "%~1\*" goto NotExistHelp
goto Specific
:NotExistHelp
echo Error: Python interpreter not found: %1
echo.
echo Run %0 /? for more help.
goto Exit
:Help
echo Installer script for WinAppDbg
echo.
echo To install on your default Python installation, run:
echo %0
echo.
echo To install on a specific Python installation, run:
echo %0 ^<Full path to Python interpreter^>
echo.
echo To Install on every detected Python installation, run:
echo %0 all
echo.
echo Python installations detected in this machine:
for /f "delims=#" %%P in (install.cfg) do cmd /c if exist %%P echo %%P
goto Exit
:Default
echo Installing on the default Python installation...
echo.
python setup.py install
python test.py
goto Exit
:Specific
echo Installing on: %~1
echo.
%1 setup.py install
%1 test.py
goto Exit
:All
echo Installing...
echo.
for /f "delims=#" %%P in (install.cfg) do (
cmd /c if exist %%P echo Interpreter: %%P
cmd /c if exist %%P %%P setup.py install
cmd /c if exist %%P echo.
)
echo -------------------------------------------------------------------------------
echo.
echo Testing installation success...
echo.
for /f "delims=#" %%P in (install.cfg) do (
cmd /c if exist %%P echo Interpreter: %%P
cmd /c if exist %%P %%P test.py
cmd /c if exist %%P echo.
)
echo Done.
goto Exit
:Exit