-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.bat
62 lines (50 loc) · 1.2 KB
/
build.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
REM the expression %~dp0 returns the drive and folder in which this batch file is located
cd %~dp0
pushd ..
REM Compile the program
D:\Programs\Lazarus-1.6\lazbuild --build-all --build-mode=Release "MiningVisualizer.lpi"
IF ERRORLEVEL 1 GOTO ERROR
REM delete the contents of the Release folder
del Release\*.* /S /Q
FOR /D %%p IN ("Release\*.*") DO rmdir "%%p" /s /q
copy MiningVisualizer.exe Release
IF ERRORLEVEL 1 GOTO ERROR
xcopy /i /s Rainmeter Release\Rainmeter
IF ERRORLEVEL 1 GOTO ERROR
xcopy /i /s WebApp Release\WebApp
IF ERRORLEVEL 1 GOTO ERROR
xcopy /i /s SSL-Certs Release\SSL-Certs
IF ERRORLEVEL 1 GOTO ERROR
del MiningVisualizer-vxxx-win64.zip
powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('.\Release', 'MiningVisualizer-vxxx-win64.zip'); }"
move MiningVisualizer-vxxx-win64.zip Release
popd
@ECHO OFF
echo.
echo.
echo =============================================
echo.
echo.
echo All Done!
echo.
echo.
echo.
echo.
echo.
goto OUT
:ERROR
popd
@ECHO OFF
echo.
echo.
echo =============================================
echo.
echo.
echo ERRORS WERE ENCOUNTERED !!!
echo.
echo.
echo.
echo.
echo.
:OUT
pause