2019-12-02 16:52:36 -05:00
|
|
|
set PublishDir=%1
|
|
|
|
set SourceDir=%2
|
2018-10-05 23:10:39 -04:00
|
|
|
SET COPYCMD=/Y
|
2018-04-16 16:31:14 -04:00
|
|
|
|
2019-12-02 16:52:36 -05:00
|
|
|
echo deleting extra runtime files
|
|
|
|
if exist "%PublishDir%\runtimes\linux-arm" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\linux-arm'
|
|
|
|
if exist "%PublishDir%\runtimes\linux-arm64" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\linux-arm64'
|
|
|
|
if exist "%PublishDir%\runtimes\linux-armel" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\linux-armel'
|
|
|
|
if exist "%PublishDir%\runtimes\osx" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\osx'
|
|
|
|
if exist "%PublishDir%\runtimes\osx-x64" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\osx-x64'
|
|
|
|
if exist "%PublishDir%\runtimes\win-arm" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\win-arm'
|
|
|
|
if exist "%PublishDir%\runtimes\win-arm64" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\win-arm64'
|
|
|
|
if exist "%PublishDir%\runtimes\alpine-x64" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\alpine-x64'
|
|
|
|
if exist "%PublishDir%\runtimes\linux-musl-x64" powershell Remove-Item -Force -Recurse '%PublishDir%\runtimes\linux-musl-x64'
|
|
|
|
|
|
|
|
echo deleting misc files
|
|
|
|
if exist "%PublishDir%\web.config" del "%PublishDir%\web.config"
|
|
|
|
if exist "%PublishDir%\libman.json" del "%PublishDir%\libman.json"
|
|
|
|
del "%PublishDir%\*.exe"
|
2020-01-11 21:32:27 -05:00
|
|
|
del "%PublishDir%\*.pdb"
|
2019-12-02 16:52:36 -05:00
|
|
|
|
|
|
|
echo setting up default folders
|
|
|
|
if not exist "%PublishDir%\Configuration" md "%PublishDir%\Configuration"
|
|
|
|
move "%PublishDir%\DefaultSettings.json" "%PublishDir%\Configuration\"
|
|
|
|
if not exist "%PublishDir%\Lib\" md "%PublishDir%\Lib\"
|
|
|
|
move "%PublishDir%\*.dll" "%PublishDir%\Lib\"
|
|
|
|
move "%PublishDir%\*.json" "%PublishDir%\Lib\"
|
|
|
|
move "%PublishDir%\runtimes" "%PublishDir%\Lib\runtimes"
|
|
|
|
if exist "%PublishDir%\refs" move "%PublishDir%\refs" "%PublishDir%\Lib\refs"
|
2019-04-25 14:00:54 -04:00
|
|
|
|
2018-09-08 21:20:11 -04:00
|
|
|
echo making start scripts
|
2019-12-02 16:52:36 -05:00
|
|
|
@(echo @echo off && echo @title IW4MAdmin && echo set DOTNET_CLI_TELEMETRY_OPTOUT=1 && echo dotnet Lib\IW4MAdmin.dll && echo pause) > "%PublishDir%\StartIW4MAdmin.cmd"
|
|
|
|
@(echo #!/bin/bash&& echo export DOTNET_CLI_TELEMETRY_OPTOUT=1&& echo dotnet Lib/IW4MAdmin.dll) > "%PublishDir%\StartIW4MAdmin.sh"
|
2018-09-08 21:20:11 -04:00
|
|
|
|
2019-12-02 16:52:36 -05:00
|
|
|
echo moving front-end library dependencies
|
|
|
|
if not exist "%PublishDir%\wwwroot\font" mkdir "%PublishDir%\wwwroot\font"
|
|
|
|
move "WebfrontCore\wwwroot\lib\open-iconic\font\fonts\*.*" "%PublishDir%\wwwroot\font\"
|
|
|
|
if exist "%PublishDir%\wwwroot\lib" rd /s /q "%PublishDir%\wwwroot\lib"
|
2019-06-14 19:16:47 -04:00
|
|
|
|
|
|
|
echo setting permissions...
|
2019-12-02 16:52:36 -05:00
|
|
|
cacls "%PublishDir%" /t /e /p Everyone:F
|