-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.bat
57 lines (47 loc) · 1.14 KB
/
setup.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
@echo off
SETLOCAL
REM Check Python installation
python --version >nul 2>&1
IF %errorlevel% NEQ 0 (
echo Python is not installed or not on PATH
EXIT /B 1
)
REM Check pip installation
pip --version >nul 2>&1
IF %errorlevel% NEQ 0 (
echo Pip is not installed or not on PATH
EXIT /B 1
)
REM Check if virtual environment already exists
IF NOT EXIST envir (
REM Create virtual environment
python -m venv envir
)
REM Activate virtual environment
CALL envir\Scripts\activate
REM Install Python requirements if not already satisfied
pip list > temp.txt
FOR /F %%i IN (requirements.txt) DO (
FIND "%%i" temp.txt >nul 2>&1
IF %errorlevel% NEQ 0 (
pip install %%i
)
)
DEL temp.txt
REM Check if Go is installed
go version >nul 2>&1
IF %errorlevel% NEQ 0 (
echo Go is not installed. Installing...
choco install golang
)
REM Build and run Go scripts
go mod init seedFileGenerator
go get github.com/ethereum/go-ethereum/crypto/secp256k1
go get github.com/farces/mt19937_64
go build seedFileGenerator\main.go
main.exe
go build sortBinary\main.go
main.exe
REM Deactivate Python virtual environment
CALL deactivate
ENDLOCAL