px30.v3
setlocal enabledelayedexpansion
set sdllxml=Panda.WebUI.WebAPI.xml
set sdllxml2=Panda.Extensions.xml
set sdllxml3=Panda.Model.DTO.xml
set sdllxml4=Panda.Model.DTO.Response.xml
set sdllxml5=Panda.Model.DTO.Extensions.xml
set curWebPath=$(TargetDir)
cd /d $(TargetDir)
cd ..
set rootPath=%cd%
set netversion=net6.0
::clear::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
rd /s /q $(TargetDir)\cs
rd /s /q $(TargetDir)\de
rd /s /q $(TargetDir)\es
rd /s /q $(TargetDir)\fr
rd /s /q $(TargetDir)\it
rd /s /q $(TargetDir)\ja
rd /s /q $(TargetDir)\ko
rd /s /q $(TargetDir)\pl
rd /s /q $(TargetDir)\pt-BR
rd /s /q $(TargetDir)\ru
rd /s /q $(TargetDir)\tr
rd /s /q $(TargetDir)\logs
rd /s /q $(TargetDir)\log
rd /s /q $(TargetDir)\zh-hant
rd /s /q $(TargetDir)\log
::rd /s /q $(TargetDir)\runtimes
rd /s /q $(TargetDir)\Properties
::del /s /q $(TargetDir)\*.pdb
del /s /q $(TargetDir)\*.xml
::Swagger::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist %rootPath%\%sdllxml% (
copy /y %rootPath%\%sdllxml% %curWebPath%\configs\
copy /y %rootPath%\%sdllxml% %curWebPath%\
)
::del /q %rootPath%\%sdllxml%
if exist %rootPath%\%sdllxml2% (
copy /y %rootPath%\%sdllxml2% %curWebPath%\configs\
del /q %rootPath%\%sdllxml2%
)
if exist %rootPath%\%sdllxml3% (
copy /y %rootPath%\%sdllxml3% %curWebPath%\configs\
del /q %rootPath%\%sdllxml3%
)
if exist %rootPath%\%sdllxml4% (
copy /y %rootPath%\%sdllxml4% %curWebPath%\configs\
del /q %rootPath%\%sdllxml4%
)
if exist %rootPath%\%sdllxml5% (
copy /y %rootPath%\%sdllxm5% %curWebPath%\configs\
del /q %rootPath%\%sdllxml5%
)
cd /d $(ProjectDir)
set wwwroot=%cd%\wwwroot
if exist %wwwroot% (
md %curWebPath%\wwwroot
cd /d c:\Windows\System32
xcopy %wwwroot%\* %curWebPath%\wwwroot /e /y
)
::Factory::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
set factory=$(SolutionDir)
cd /d $(TargetDir)
cd ..
cd ..
cd ..
set factoryRoot=%cd%
set factoryPathRepository=%factoryRoot%\9.published\Factorys\Panda.Repository\%netversion%
echo factoryPathRepository=%factoryPathRepository%
if exist %factoryPathRepository% (
echo %factoryPathRepository%
cd /d c:\Windows\System32
xcopy %factoryPathRepository%\*.dll %curWebPath% /e /y
)
set factoryPathServices=%factoryRoot%\9.published\Factorys\Panda.Services\%netversion%
echo factoryPathServices=%factoryPathServices%
if exist %factoryPathServices% (
echo %factoryPathServices%
cd /d c:\Windows\System32
xcopy %factoryPathServices%\*.dll %curWebPath% /e /y
)
set controllerPathPAN=%factoryRoot%\9.published\Controller\PAN\%netversion%
echo controllerPathPAN=%controllerPathPAN%
if exist %controllerPathPAN% (
echo %controllerPathPAN%
cd /d c:\Windows\System32
xcopy %controllerPathPAN%\*.dll %curWebPath% /e /y
echo %curWebPath%\configs
xcopy %controllerPathPAN%\*.xml %curWebPath%\configs /e /y
)
set controllerPathv1=%factoryRoot%\9.published\Controller\default.v1\%netversion%
echo controllerPathv1=%controllerPathv1%
if exist %controllerPathv1% (
echo %controllerPathv1%
cd /d c:\Windows\System32
xcopy %controllerPathv1%\*.dll %curWebPath% /e /y
echo %curWebPath%\configs
xcopy %controllerPathv1%\*.xml %curWebPath%\configs /e /y
)
set controllerPathv2=%factoryRoot%\9.published\Controller\default.v2\%netversion%
echo controllerPathv2=%controllerPathv2%
if exist %controllerPathv2% (
echo %controllerPathv2%
cd /d c:\Windows\System32
xcopy %controllerPathv2%\*.dll %curWebPath% /e /y
echo %curWebPath%\configs
xcopy %controllerPathv2%\*.xml %curWebPath%\configs /e /y
)
set controllerPathdbfirst=%factoryRoot%\9.published\Controller\default.dbfirst\%netversion%
echo controllerPathdbfirst=%controllerPathdbfirst%
if exist %controllerPathdbfirst% (
echo %controllerPathdbfirst%
cd /d c:\Windows\System32
xcopy %controllerPathdbfirst%\*.dll %curWebPath% /e /y
echo %curWebPath%\configs
xcopy %controllerPathdbfirst%\*.xml %curWebPath%\configs /e /y
)
set controllerPath=%factoryRoot%\9.published\Controller\HW.V5\%netversion%
echo controllerPath=%controllerPath%
if exist %controllerPath% (
echo %controllerPath%
cd /d c:\Windows\System32
xcopy %controllerPath%\*.dll %curWebPath% /e /y
echo %curWebPath%\configs
xcopy %controllerPath%\*.xml %curWebPath%\configs /e /y
rd %curWebPath%\configs\configs
xcopy %controllerPath%\Configs\*.json %curWebPath%\configs\ /e /y
)
set controllerPath1=%factoryRoot%\9.published\Controller\Default\Panda.WebUI.Controllers.xml
echo controllerPath1=%controllerPath1%
if exist %controllerPath1% (
copy /y %controllerPath1% %curWebPath%\configs\
)
::::::::CS V1
set controllerPathCS1=%factoryRoot%\9.published\Controller\CS.V1\%netversion%
echo %controllerPathCS1%
if exist %controllerPathCS1% (
echo controllerPathCS1=%controllerPathCS1%
cd /d c:\Windows\System32
xcopy %controllerPathCS1%\*.dll %curWebPath% /e /y
xcopy %controllerPathCS1%\*.xml %curWebPath%\configs /e /y
xcopy %controllerPathCS1%\*.deps.json %curWebPath%\configs /e /y
)
::::::::LogCenter V1
set controllerPathLogCenter1=%factoryRoot%\9.published\Controller\LogCenter.V1\%netversion%
echo %controllerPathLogCenter1%
if exist %controllerPathLogCenter1% (
echo controllerPathLogCenter1=%controllerPathLogCenter1%
cd /d c:\Windows\System32
xcopy %controllerPathLogCenter1%\*.dll %curWebPath% /e /y
xcopy %controllerPathLogCenter1%\*.xml %curWebPath%\configs /e /y
xcopy %controllerPathLogCenter1%\*.deps.json %curWebPath%\configs /e /y
)
::::::::Device V1
set controllerPathDevice1=%factoryRoot%\9.published\Controller\Device.V1\%netversion%
echo %controllerPathDevice1%
if exist %controllerPathDevice1% (
echo controllerPathDevice1=%controllerPathDevice1%
cd /d c:\Windows\System32
xcopy %controllerPathDevice1%\*.dll %curWebPath% /e /y
xcopy %controllerPathDevice1%\*.xml %curWebPath%\configs /e /y
xcopy %controllerPathDevice1%\*.deps.json %curWebPath%\configs /e /y
)
set controllerPathDevice1=%factoryRoot%\9.published\Factorys\Device\%netversion%
echo %controllerPathDevice1%
if exist %controllerPathDevice1% (
echo controllerPathDevice1=%controllerPathDevice1%
cd /d c:\Windows\System32
xcopy %controllerPathDevice1%\*.dll %curWebPath% /e /y
xcopy %controllerPathDevice1%\*.xml %curWebPath%\configs /e /y
xcopy %controllerPathDevice1%\*.deps.json %curWebPath%\configs /e /y
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::END
::打包发布
set publishedPathRootLinux=D:\SATLIC.COM.v3
set publishedPathLinux=%publishedPathRootLinux%\rcms\app.cloudapi\
if exist %publishedPathLinux% (
del /q %publishedPathLinux%\*
)
md %publishedPathLinux%
echo======================================
set oldVersion="1.0.0.0"
echo======================================
echo %publishedPathRootLinux%
del /q %publishedPathRootLinux%\*.txt
set configVersion=%factoryRoot%\8.version\versiontemp.txt
echo %configVersion%
if exist %configVersion% (
for /f %%i in (%configVersion%) do (
set tag1=%%i
)
set oldVersion=!tag1!
)
echo======================================
set fileName=$(PlatformName)_$(ConfigurationName)_%netversion%_%oldVersion%
cd /d %publishedPathRootLinux%
echo $(AssemblyVersion)
echo $(PlatformName)_$(ConfigurationName)>>%fileName%.txt
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist %curWebPath%publish\ (
cd /d c:\Windows\System32
xcopy %curWebPath%publish\* %publishedPathLinux% /e /y
)
if exist %curWebPath%publish11 (
rd /s /q %curWebPath%publish
)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist %publishedPathLinux% (
cd /d c:\Windows\System32
xcopy %curWebPath%* %publishedPathLinux% /e /y
)
if not exist %publishedPathRootLinux%\database (
md %publishedPathRootLinux%\database
) else (
rd /s /q %publishedPathRootLinux%\database
md %publishedPathRootLinux%\database
)
if exist %publishedPathRootLinux%\rcms\configs (
rd /s /q %publishedPathRootLinux%\rcms\configs
md %publishedPathRootLinux%\rcms\configs
)
if not exist %publishedPathRootLinux%\rcms\configs (
md %publishedPathRootLinux%\rcms\configs
)
if exist %publishedPathRootLinux%\rcms\configs (
rd /s /q %publishedPathRootLinux%\rcms\configs
md %publishedPathRootLinux%\rcms\configs
)
if not exist %publishedPathRootLinux%\rcms\configs (
md %publishedPathRootLinux%\rcms\configs
)
if not exist %publishedPathRootLinux%\rcms\app.touchui (
md %publishedPathRootLinux%\rcms\app.touchui
)
if exist %factoryRoot%\4.resources\Readme\UI界面应用.txt (
cd /d c:\Windows\System32
xcopy %factoryRoot%\4.resources\Readme\UI界面应用.txt %publishedPathRootLinux%\rcms\app.touchui\ /e /y
)
if exist %factoryRoot%\4.resources\Configs\published.configs (
cd /d c:\Windows\System32
xcopy %factoryRoot%\4.resources\Configs\published.configs\* %publishedPathRootLinux%\rcms\configs\ /e /y
)
if not exist %publishedPathRootLinux%\rcms\data (
md %publishedPathLinux%\data
)
if exist %publishedPathLinux%\data\crms.db.sqlite3 (
cd /d c:\Windows\System32
xcopy %publishedPathLinux%\data\crms.db.sqlite3 %publishedPathRootLinux%\rcms\data\ /e /y
rd /s /q %publishedPathLinux%\data
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::脚本
rd /s /q %publishedPathRootLinux%\database
md %publishedPathRootLinux%\database
if not exist %publishedPathRootLinux%\database\0.baklist (
md %publishedPathRootLinux%\database\0.baklist
)
if exist %factoryRoot%\2.database (
cd /d c:\Windows\System32
xcopy %factoryRoot%\2.database\* %publishedPathRootLinux%\database\ /e /y
del /s /q %publishedPathRootLinux%\database\Readme.txt
)
if exist %factoryRoot%\3.tools\v3.tools.publish\打包上传程序.bat (
copy %factoryRoot%\3.tools\v3.tools.publish\打包上传程序.bat %publishedPathRootLinux%\ /y
)
if exist %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.不杀进程.bat (
copy %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.不杀进程.bat %publishedPathRootLinux%\ /y
)
if exist %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.bat (
copy %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.bat %publishedPathRootLinux%\ /y
)
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
if exist %factoryRoot%\9.published\WebApiUI\net6.0\publish11 (
rd /s /q %factoryRoot%\9.published\WebApiUI\net6.0\publish
)
del /q %rootPath%\%sdllxml%
rd /s /q %publishedPathRootLinux%\logs
rd /s /q %publishedPathRootLinux%\LOGS
rd /s /q %publishedPathLinux%\cs
rd /s /q %publishedPathLinux%\de
rd /s /q %publishedPathLinux%\es
rd /s /q %publishedPathLinux%\fr
rd /s /q %publishedPathLinux%\it
rd /s /q %publishedPathLinux%\ja
rd /s /q %publishedPathLinux%\ko
rd /s /q %publishedPathLinux%\pl
rd /s /q %publishedPathLinux%\pt-BR
rd /s /q %publishedPathLinux%\ru
rd /s /q %publishedPathLinux%\tr
rd /s /q %publishedPathLinux%\logs
rd /s /q %publishedPathLinux%\log
rd /s /q %publishedPathLinux%\zh-hant
rd /s /q %publishedPathLinux%\log
rd /s /q %publishedPathLinux%\publish
rd /s /q %publishedPathLinux%\publish99999
rd /s /q %publishedPathLinux%\logs
rd /s /q %publishedPathLinux%\configs\configs
rd /s /q %publishedPathLinux%\configs\ref