-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprepare_archive.bat
More file actions
103 lines (79 loc) · 2.72 KB
/
prepare_archive.bat
File metadata and controls
103 lines (79 loc) · 2.72 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
@setlocal enabledelayedexpansion
@set rid=%1
@if "%rid%" == "" (
@echo runtime identifier needed^^!
@exit /b 1
)
@set "DOTNET=%ProgramFiles%\dotnet\dotnet.exe"
@if not exist "%DOTNET%" (
@echo Failed to find dotnet command
@exit /b 1
)
"%DOTNET%" build .\UI\RVisUI\RVisUI.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" build .\UI\Module\Estimation\Estimation.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" build .\UI\Module\Evidence\Evidence.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" build .\UI\Module\Plot\Plot.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" build .\UI\Module\Sampling\Sampling.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" build .\UI\Module\Sensitivity\Sensitivity.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" build .\R\RVis.Server\RVis.Server.csproj /p:Configuration=Release -r %rid% --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
@if exist rvis_%rid% (
@rmdir /Q /S rvis_%rid%
)
"%DOTNET%" publish .\UI\RVisUI\RVisUI.csproj /p:Configuration=Release /p:SelfContained=true -r %rid% -o .\rvis_%rid%\RVis --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
"%DOTNET%" publish .\R\RVis.Server\RVis.Server.csproj /p:Configuration=Release /p:SelfContained=true -r %rid% -o .\rvis_%rid%\RVis\R --self-contained
@if %ERRORLEVEL% neq 0 (
@pause
@exit /b 1
)
@mkdir .\rvis_%rid%\RVis\module\estimation
@copy UI\module\Estimation\bin\Release\net6.0-windows\%rid%\Estimation.dll .\rvis_%rid%\RVis\module\estimation\ >nul
@mkdir .\rvis_%rid%\RVis\module\evidence
@copy UI\module\Evidence\bin\Release\net6.0-windows\%rid%\Evidence.dll .\rvis_%rid%\RVis\module\evidence\ >nul
@mkdir .\rvis_%rid%\RVis\module\plot
@copy UI\module\Plot\bin\Release\net6.0-windows\%rid%\Plot.dll .\rvis_%rid%\RVis\module\plot\ >nul
@mkdir .\rvis_%rid%\RVis\module\sampling
@copy UI\module\Sampling\bin\Release\net6.0-windows\%rid%\Sampling.dll .\rvis_%rid%\RVis\module\sampling\ >nul
@mkdir .\rvis_%rid%\RVis\module\sensitivity
@copy UI\module\Sensitivity\bin\Release\net6.0-windows\%rid%\Sensitivity.dll .\rvis_%rid%\RVis\module\sensitivity\ >nul
@if exist RVis_%rid%.zip (
@del RVis_%rid%.zip
)
@if not exist "%ProgramFiles%\7-zip\7z.exe" (
@echo Failed to find 7-zip
@exit /b 1
)
"%ProgramFiles%\7-zip\7z.exe" a RVis_%rid%.zip %cd%\rvis_%rid%\RVis\
@rmdir /Q /S rvis_%rid%
@exit /b 0