-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathPublish.bat
99 lines (86 loc) · 5.6 KB
/
Publish.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
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
@echo off
@echo MultiServer publisher script 07/12/2024
@echo.
@echo Cleaning up directories:
@rmdir /S /Q ~PublishOutput
@echo.
:Build
dotnet restore MultiServer3.sln
dotnet clean MultiServer3.sln
dotnet build "Plugins/HTTP/HomeWebTools/HomeWebTools.csproj" --configuration Debug --property WarningLevel=0
dotnet build "Plugins/HTTP/HomeWebTools/HomeWebTools.csproj" --configuration Release --property WarningLevel=0
dotnet build "Plugins/HTTP/EdNetCRCCalculator/EdNetCRCCalculator.csproj" --configuration Debug --property WarningLevel=0
dotnet build "Plugins/HTTP/EdNetCRCCalculator/EdNetCRCCalculator.csproj" --configuration Release --property WarningLevel=0
dotnet build "Plugins/HTTP/PdfToJpeg/PdfToJpeg.csproj" --configuration Debug --property WarningLevel=0
dotnet build "Plugins/HTTP/PdfToJpeg/PdfToJpeg.csproj" --configuration Release --property WarningLevel=0
@echo off
setlocal enabledelayedexpansion
rem List of RIDs to publish for
set RIDs=win-x64 win-x86 osx-x64 osx-arm64 linux-x64 linux-arm linux-arm64
rem Common parameters
set params=-p:PublishReadyToRun=true -p:DebugType=None -p:DebugSymbols=false --property WarningLevel=0 --self-contained
for %%r in (%RIDs%) do (
@echo Publishing MultiServer for %%r ...
dotnet publish MultiServer3.sln -r %%r -c Debug %params%
dotnet publish MultiServer3.sln -r %%r -c Release %params%
@echo Copying %%r build output to ~PublishOutput...
xcopy /E /Y /I "SpecializedServers/Horizon/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "SpecializedServers/MultiSocks/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "SpecializedServers/QuazalServer/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "SpecializedServers/SSFWServer/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "SpecializedServers/SVO/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "SpecializedServers/MultiSpy/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "WebServers/HTTPSecureServerLite/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "WebServers/HTTPServer/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "WebServers/MitmDNS/bin/Debug/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "SpecializedServers/Horizon/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "SpecializedServers/MultiSocks/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "SpecializedServers/QuazalServer/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "SpecializedServers/SSFWServer/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "SpecializedServers/SVO/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "SpecializedServers/MultiSpy/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "WebServers/HTTPSecureServerLite/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "WebServers/HTTPServer/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
xcopy /E /Y /I "WebServers/MitmDNS/bin/Release/net6.0/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
if exist "Plugins/HTTP/HomeWebTools/bin/Debug/net6.0/static" (
xcopy /E /Y /I "Plugins/HTTP/HomeWebTools/bin/Debug/net6.0/static" "~PublishOutput/MultiServer/%%r/Debug/static"
)
if exist "Plugins/HTTP/HomeWebTools/bin/Release/net6.0/static" (
xcopy /E /Y /I "Plugins/HTTP/HomeWebTools/bin/Release/net6.0/static" "~PublishOutput/MultiServer/%%r/Release/static"
)
if exist "Plugins/HTTP/EdNetCRCCalculator/bin/Debug/net6.0/static" (
xcopy /E /Y /I "Plugins/HTTP/EdNetCRCCalculator/bin/Debug/net6.0/static" "~PublishOutput/MultiServer/%%r/Debug/static"
)
if exist "Plugins/HTTP/EdNetCRCCalculator/bin/Release/net6.0/static" (
xcopy /E /Y /I "Plugins/HTTP/EdNetCRCCalculator/bin/Release/net6.0/static" "~PublishOutput/MultiServer/%%r/Release/static"
)
if exist "Plugins/HTTP/PdfToJpeg/bin/Debug/net6.0/static" (
xcopy /E /Y /I "Plugins/HTTP/PdfToJpeg/bin/Debug/net6.0/static" "~PublishOutput/MultiServer/%%r/Debug/static"
)
if exist "Plugins/HTTP/PdfToJpeg/bin/Release/net6.0/static" (
xcopy /E /Y /I "Plugins/HTTP/PdfToJpeg/bin/Release/net6.0/static" "~PublishOutput/MultiServer/%%r/Release/static"
)
if exist "Plugins/HTTP/PdfToJpeg/bin/Debug/net6.0/runtimes" (
xcopy /E /Y /I "Plugins/HTTP/PdfToJpeg/bin/Debug/net6.0/runtimes" "~PublishOutput/MultiServer/%%r/Debug/runtimes"
)
if exist "Plugins/HTTP/PdfToJpeg/bin/Release/net6.0/runtimes" (
xcopy /E /Y /I "Plugins/HTTP/PdfToJpeg/bin/Release/net6.0/runtimes" "~PublishOutput/MultiServer/%%r/Release/runtimes"
)
if "%%r"=="win-x64" (
xcopy /E /Y /I "RemoteControl/bin/Debug/net6.0-windows/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "PRemoteControl/bin/Release/net6.0-windows/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
)
if "%%r"=="win-x86" (
xcopy /E /Y /I "RemoteControl/bin/Debug/net6.0-windows/%%r/publish" "~PublishOutput/MultiServer/%%r/Debug"
xcopy /E /Y /I "RemoteControl/bin/Release/net6.0-windows/%%r/publish" "~PublishOutput/MultiServer/%%r/Release"
)
)
endlocal
@echo Cleaning up temp build files and directories:
for /d /r . %%d in (bin,obj,".vs") do @if exist "%%d" rd /s/q "%%d"
@echo.
@echo.
@echo All platforms and kinds of packages are processed.
@echo.
@echo Publishing completed successfully.
@pause