-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cmd
More file actions
30 lines (28 loc) · 798 Bytes
/
build.cmd
File metadata and controls
30 lines (28 loc) · 798 Bytes
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
@echo off
setlocal
:: Check for Rust installation
where cargo >nul 2>nul
if errorlevel 1 (
echo Rust is not installed. Please install Rust from https://rustup.rs/
exit /b 1
)
echo Updating dependencies...
::cargo update
:: Build the project in release mode
echo Building project...
cargo build --release
:: Check if build succeeded
if errorlevel 1 (
echo Build failed.
exit /b 1
)
:: Optional: copy binary to a friendly location
set BIN_NAME=MinerLauncher
set DEST=%~dp0
mkdir %DEST% >nul 2>nul
copy target\release\%BIN_NAME%.exe %DEST% >nul
CertUtil -hashfile "%~dp0%BIN_NAME%.exe" SHA256 > "%~dp0%BIN_NAME%.exe.sha256.txt"
echo Build complete. The executable is located at %DEST%\%BIN_NAME%.exe
type "%~dp0%BIN_NAME%.exe.sha256.txt"
endlocal
::pause