@echo off
if not "%~0"=="#SETTINGS.cmd" goto INCORRECT_INTERNAL_CALL
::==================================================================================================
call :CHECK_SET_LOCAL_MODE
if %errorlevel% neq 0 goto ERROR
::--------------------------------------------------------------------------------------------------

set #ProjectName=BookRegistry.Server
set #FrameworkFolderName=net5.0-windows

set #ProjectFileName=!#ProjectName!.csproj
set #TargetModuleName=!#ProjectName!.exe

set #PublishPlatform=x64
set #PublishConfiguration=Debug
rem set #PublishConfiguration=Release
set #PublishRID=win-x64
set #Publish_AdditionalKeys=
rem set #Publish_AdditionalKeys=%#Publish_AdditionalKeys% --self-contained
rem set #PublishPlatform=x86
rem set #PublishRID=win-x86

set #TargetDir_D=bin\Debug\!#FrameworkFolderName!\
set #TargetDir_R=bin\Release\!#FrameworkFolderName!\

set #TargetModulePath_D=!#TargetDir_D!!#TargetModuleName!
set #TargetModulePath_R=!#TargetDir_R!!#TargetModuleName!
set #TargetModulePath_X=!#TargetModulePath_D!
rem set #TargetModulePath_X=!#TargetModulePath_R!

set #URL=https://localhost:5001
set #URLFileName=!localhost_5001.Home.url
rem set #URL=http://localhost:5000
rem set #URLFileName=!localhost_5000.Home.url
set #URL_D=https://localhost:5001
set #URLFileName_D=!localhost_5001.Home.url
rem set #URL_D=http://localhost:5000
rem set #URLFileName_D=!localhost_5000.Home.url

set #BaseTitle=BookRegistry web-service

set #StartArgs_Auto=
if defined #URL set #StartArgs_Auto=!#StartArgs_Auto! --urls !#URL!

set #StartCmdKeys=
rem set #StartCmdKeys=!#StartCmdKeys! /min

::-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
set #UseMsBuild=1
rem set #UseMsBuild=
::-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
set ASPNETCORE_ENVIRONMENT=
::--------------------------------------------------------------------------------------------------
goto :EOF
::==================================================================================================
:CHECK_SET_LOCAL_MODE
set CheckSetLocalMode_Value=
if "!CheckSetLocalMode_Value!"=="" (
call :RESET_ERROR
goto :EOF )
echo.
echo ## Incorrect mode of "setlocal"-command.
echo ("%~dpnx0")
goto ERROR
::==================================================================================================
:RESET_ERROR
set errorlevel=0
set errorlevel=
goto :EOF
::==================================================================================================
:INCORRECT_INTERNAL_CALL
echo.
echo ## Incorrect internal call of "%~nx0" (auxiliary batch).
goto ERROR
::==================================================================================================
:ERROR
echo 
pause
EXIT 255
::==================================================================================================
