forked from octra-labs/wallet-gen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
106 lines (91 loc) · 2.34 KB
/
start.bat
File metadata and controls
106 lines (91 loc) · 2.34 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
@echo off
setlocal enabledelayedexpansion
REM Octra Wallet Generator Setup Script
REM Automated setup: security warning, build from source, run, and open browser
echo === Octra Wallet Generator Setup ===
echo.
REM Show security warning first
echo === ⚠️ SECURITY WARNING ⚠️ ===
echo.
echo This tool generates real cryptographic keys. Always:
echo - Keep your private keys secure
echo - Never share your mnemonic phrase
echo - Don't store wallet files on cloud services
echo - Use on a secure, offline computer for production wallets
echo.
pause
echo.
REM Function to install Bun
:install_bun
echo Installing Bun...
bun --version >nul 2>&1
if %errorlevel% equ 0 (
echo Bun is already installed. Version:
bun --version
) else (
echo Installing Bun...
powershell -Command "irm bun.sh/install.ps1 | iex"
if %errorlevel% neq 0 (
echo Failed to install Bun. Please install manually from https://bun.sh
pause
exit /b 1
)
echo Bun installed successfully!
)
goto :eof
REM Build from source
echo === Building from Source ===
echo.
REM Install Bun if not present
call :install_bun
echo.
echo Installing dependencies...
bun install
if %errorlevel% neq 0 (
echo Failed to install dependencies
pause
exit /b 1
)
echo.
echo Building standalone executable...
bun run build
if %errorlevel% neq 0 (
echo Failed to build executable
pause
exit /b 1
)
echo.
echo Build complete!
echo.
REM Execute binary
echo === Starting Wallet Generator ===
echo.
echo Starting wallet generator server...
REM Start the binary in the background
start "Wallet Generator" wallet-generator.exe
if %errorlevel% neq 0 (
echo Failed to start wallet generator
pause
exit /b 1
)
REM Wait a moment for the server to start
timeout /t 2 /nobreak >nul
REM Open browser
echo Opening browser at http://localhost:8888
start http://localhost:8888
echo.
echo Wallet generator is running in the background.
echo Close this window or press Ctrl+C to stop monitoring.
echo To stop the wallet generator, close the "Wallet Generator" window.
echo.
REM Keep the script running to show status
:monitor
timeout /t 5 /nobreak >nul
tasklist /FI "WINDOWTITLE eq Wallet Generator*" 2>nul | find /i "wallet-generator.exe" >nul
if %errorlevel% equ 0 (
goto monitor
) else (
echo Wallet generator has stopped.
pause
exit /b 0
)