forked from versx/WhMgr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.bat
42 lines (32 loc) · 1.24 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
@echo off
SET prjDir=%CD%\WhMgr
SET binDir=%prjDir%\bin\debug\netcoreapp2.1
:: Download .NET Core 2.1 installer
echo "Downloading .NET Core 2.1 installer..."
powershell -Command "iwr -outf ~/Desktop/dotnet-install.ps1 https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.ps1"
:: Make installer executable
:: Install .NET Core 2.1.0
echo "Launching .NET Core installer..."
powershell -ExecutionPolicy RemoteSigned -File dotnet-install.ps1 -Version 2.1.803
:: Delete .NET Core 2.1.0 installer
echo "Deleting .NET Core installer..."
del dotnet-install.ps1
:: Clone repository
echo "Cloning repository..."
git clone https://github.com/versx/WhMgr
:: Change directory into cloned repository
echo "Changing directory..."
cd %prjDir%
:: Build WhMgr.dll
echo "Building WhMgr..."
dotnet build
:: Copy example config
echo "Copying example files..."
xcopy /s /e %prjDir%\examples\alerts\* %binDir%\alerts\
xcopy /s /e %prjDir%\examples\filters\* %binDir%\filters\
xcopy /s /e %prjDir%\examples\geofences\* %binDir%\geofences\
xcopy /s /e %prjDir%\static\* %binDir%\static\
xcopy %prjDir%\alarms.example.json %binDir%\alarms.json*
xcopy %prjDir%\config.example.json %binDir%\config.json*
echo "Changing directory to build folder..."
cd %binDir%