2018-04-08 16:50:58 -05:00
|
|
|
set SolutionDir=%1
|
2018-04-16 15:31:14 -05:00
|
|
|
set ProjectDir=%2
|
|
|
|
set TargetDir=%3
|
2018-10-05 22:10:39 -05:00
|
|
|
set CurrentConfiguration=%4
|
|
|
|
SET COPYCMD=/Y
|
2018-04-16 15:31:14 -05:00
|
|
|
|
|
|
|
echo Deleting extra language files
|
2018-04-24 17:01:27 -05:00
|
|
|
|
|
|
|
if exist "%SolutionDir%Publish\Windows\en-US\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\en-US'
|
2018-04-16 15:31:14 -05:00
|
|
|
if exist "%SolutionDir%Publish\Windows\de\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\de'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\es\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\es'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\fr\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\fr'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\it\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\it'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\ja\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\ja'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\ko\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\ko'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\ru\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\ru'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\zh-Hans\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\zh-Hans'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\zh-Hant\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\zh-Hant'
|
|
|
|
|
2018-04-24 17:01:27 -05:00
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\en-US\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\en-US'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\de\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\de'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\es\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\es'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\fr\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\fr'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\it\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\it'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\ja\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\ja'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\ko\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\ko'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\ru\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\ru'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\zh-Hans\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\zh-Hans'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\zh-Hant\" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\zh-Hant'
|
|
|
|
|
2018-04-16 15:31:14 -05:00
|
|
|
echo Deleting extra runtime files
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\linux-arm" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\linux-arm'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\linux-arm64" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\linux-arm64'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\linux-armel" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\linux-armel'
|
|
|
|
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\osx" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\osx'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\osx-x64" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\osx-x64'
|
|
|
|
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\win-arm" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\win-arm'
|
|
|
|
if exist "%SolutionDir%Publish\Windows\runtimes\win-arm64" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\Windows\runtimes\win-arm64'
|
|
|
|
|
2018-04-24 17:01:27 -05:00
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\linux-arm" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\linux-arm'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\linux-arm64" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\linux-arm64'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\linux-armel" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\linux-armel'
|
|
|
|
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\osx" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\osx'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\osx-x64" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\osx-x64'
|
|
|
|
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\win-arm" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\win-arm'
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\runtimes\win-arm64" powershell Remove-Item -Force -Recurse '%SolutionDir%Publish\WindowsPrerelease\runtimes\win-arm64'
|
|
|
|
|
2018-04-16 15:31:14 -05:00
|
|
|
echo Deleting misc files
|
|
|
|
if exist "%SolutionDir%Publish\Windows\web.config" del "%SolutionDir%Publish\Windows\web.config"
|
|
|
|
del "%SolutionDir%Publish\Windows\*pdb"
|
2018-04-24 17:01:27 -05:00
|
|
|
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\web.config" del "%SolutionDir%Publish\WindowsPrerelease\web.config"
|
|
|
|
del "%SolutionDir%Publish\WindowsPrerelease\*pdb"
|
2018-05-15 23:57:37 -05:00
|
|
|
|
2018-10-05 22:10:39 -05:00
|
|
|
echo setting up library folders
|
|
|
|
|
2018-10-12 18:59:17 -05:00
|
|
|
if "%CurrentConfiguration%" == "Prerelease" (
|
|
|
|
echo PR-Config
|
|
|
|
if not exist "%SolutionDir%Publish\WindowsPrerelease\Configuration" md "%SolutionDir%Publish\WindowsPrerelease\Configuration"
|
|
|
|
move "%SolutionDir%Publish\WindowsPrerelease\DefaultSettings.json" "%SolutionDir%Publish\WindowsPrerelease\Configuration\"
|
|
|
|
)
|
2018-10-05 22:10:39 -05:00
|
|
|
|
2018-10-12 18:59:17 -05:00
|
|
|
if "%CurrentConfiguration%" == "Release" (
|
2018-10-05 22:10:39 -05:00
|
|
|
echo R-Config
|
|
|
|
if not exist "%SolutionDir%Publish\Windows\Configuration" md "%SolutionDir%Publish\Windows\Configuration"
|
|
|
|
if exist "%SolutionDir%Publish\Windows\DefaultSettings.json" move "%SolutionDir%Publish\Windows\DefaultSettings.json" "%SolutionDir%Publish\Windows\Configuration\DefaultSettings.json"
|
|
|
|
)
|
|
|
|
|
2018-10-12 18:59:17 -05:00
|
|
|
if "%CurrentConfiguration%" == "Prerelease" (
|
|
|
|
echo PR-LIB
|
|
|
|
if not exist "%SolutionDir%Publish\WindowsPrerelease\Lib\" md "%SolutionDir%Publish\WindowsPrerelease\Lib\"
|
|
|
|
move "%SolutionDir%Publish\WindowsPrerelease\*.dll" "%SolutionDir%Publish\WindowsPrerelease\Lib\"
|
|
|
|
move "%SolutionDir%Publish\WindowsPrerelease\*.json" "%SolutionDir%Publish\WindowsPrerelease\Lib\"
|
|
|
|
)
|
2018-10-05 22:10:39 -05:00
|
|
|
|
2018-10-12 18:59:17 -05:00
|
|
|
if "%CurrentConfiguration%" == "Release" (
|
2018-10-05 22:10:39 -05:00
|
|
|
echo R-LIB
|
|
|
|
if not exist "%SolutionDir%Publish\Windows\Lib\" md "%SolutionDir%Publish\Windows\Lib\"
|
|
|
|
move "%SolutionDir%Publish\Windows\*.dll" "%SolutionDir%Publish\Windows\Lib\"
|
|
|
|
move "%SolutionDir%Publish\Windows\*.json" "%SolutionDir%Publish\Windows\Lib\"
|
|
|
|
)
|
|
|
|
|
2018-10-12 18:59:17 -05:00
|
|
|
if "%CurrentConfiguration%" == "Prerelease" (
|
|
|
|
echo PR-RT
|
|
|
|
move "%SolutionDir%Publish\WindowsPrerelease\runtimes" "%SolutionDir%Publish\WindowsPrerelease\Lib\runtimes"
|
|
|
|
if exist "%SolutionDir%Publish\WindowsPrerelease\refs" move "%SolutionDir%Publish\WindowsPrerelease\refs" "%SolutionDir%Publish\WindowsPrerelease\Lib\refs"
|
|
|
|
)
|
2018-10-06 15:31:05 -05:00
|
|
|
|
2018-10-05 22:10:39 -05:00
|
|
|
|
2018-10-12 18:59:17 -05:00
|
|
|
if "%CurrentConfiguration%" == "Release" (
|
2018-10-05 22:10:39 -05:00
|
|
|
echo R-RT
|
2018-10-06 15:31:05 -05:00
|
|
|
move "%SolutionDir%Publish\Windows\runtimes" "%SolutionDir%Publish\Windows\Lib\runtimes"
|
|
|
|
if exist "%SolutionDir%Publish\Windows\refs" move "%SolutionDir%Publish\Windows\refs" "%SolutionDir%Publish\Windows\Lib\refs"
|
2018-10-05 22:10:39 -05:00
|
|
|
)
|
|
|
|
|
2019-04-25 13:00:54 -05:00
|
|
|
if "%CurrentConfiguration%" == "Prerelease" (
|
|
|
|
echo PR-LOC
|
|
|
|
if not exist "%SolutionDir%Publish\WindowsPrerelease\Localization" md "%SolutionDir%Publish\WindowsPrerelease\Localization"
|
|
|
|
)
|
|
|
|
|
|
|
|
if "%CurrentConfiguration%" == "Release" (
|
|
|
|
echo R-LOC
|
|
|
|
if not exist "%SolutionDir%Publish\Windows\Localization" md "%SolutionDir%Publish\Windows\Localization"
|
|
|
|
)
|
|
|
|
|
2018-09-08 20:20:11 -05:00
|
|
|
echo making start scripts
|
2019-05-08 20:34:17 -05:00
|
|
|
@(echo @echo off && echo @title IW4MAdmin && echo set DOTNET_CLI_TELEMETRY_OPTOUT=1 && echo dotnet Lib\IW4MAdmin.dll && echo pause) > "%SolutionDir%Publish\WindowsPrerelease\StartIW4MAdmin.cmd"
|
|
|
|
@(echo @echo off && echo @title IW4MAdmin && echo set DOTNET_CLI_TELEMETRY_OPTOUT=1 && echo dotnet Lib\IW4MAdmin.dll && echo pause) > "%SolutionDir%Publish\Windows\StartIW4MAdmin.cmd"
|
2018-09-08 20:20:11 -05:00
|
|
|
|
2019-06-14 18:16:47 -05:00
|
|
|
@(echo #!/bin/bash&& echo export DOTNET_CLI_TELEMETRY_OPTOUT=1&& echo dotnet Lib/IW4MAdmin.dll) > "%SolutionDir%Publish\WindowsPrerelease\StartIW4MAdmin.sh"
|
|
|
|
dos2unix "%SolutionDir%Publish\WindowsPrerelease\StartIW4MAdmin.sh"
|
|
|
|
@(echo #!/bin/bash&& echo export DOTNET_CLI_TELEMETRY_OPTOUT=1&& echo dotnet Lib/IW4MAdmin.dll) > "%SolutionDir%Publish\Windows\StartIW4MAdmin.sh"
|
|
|
|
dos2unix "%SolutionDir%Publish\Windows\StartIW4MAdmin.sh"
|
|
|
|
|
|
|
|
echo setting permissions...
|
|
|
|
cacls "%SolutionDir%Publish\WindowsPrerelease" /t /e /p Everyone:F
|
|
|
|
cacls "%SolutionDir%Publish\Windows" /t /e /p Everyone:F
|