px30.v3

  1. setlocal enabledelayedexpansion
  2. set sdllxml=Panda.WebUI.WebAPI.xml
  3. set sdllxml2=Panda.Extensions.xml
  4. set sdllxml3=Panda.Model.DTO.xml
  5. set sdllxml4=Panda.Model.DTO.Response.xml
  6. set sdllxml5=Panda.Model.DTO.Extensions.xml
  7. set curWebPath=$(TargetDir)
  8. cd /d $(TargetDir)
  9. cd ..
  10. set rootPath=%cd%
  11. set netversion=net6.0
  12. ::clear::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  13. rd /s /q $(TargetDir)\cs
  14. rd /s /q $(TargetDir)\de
  15. rd /s /q $(TargetDir)\es
  16. rd /s /q $(TargetDir)\fr
  17. rd /s /q $(TargetDir)\it
  18. rd /s /q $(TargetDir)\ja
  19. rd /s /q $(TargetDir)\ko
  20. rd /s /q $(TargetDir)\pl
  21. rd /s /q $(TargetDir)\pt-BR
  22. rd /s /q $(TargetDir)\ru
  23. rd /s /q $(TargetDir)\tr
  24. rd /s /q $(TargetDir)\logs
  25. rd /s /q $(TargetDir)\log
  26. rd /s /q $(TargetDir)\zh-hant
  27. rd /s /q $(TargetDir)\log
  28. ::rd /s /q $(TargetDir)\runtimes
  29. rd /s /q $(TargetDir)\Properties
  30. ::del /s /q $(TargetDir)\*.pdb
  31. del /s /q $(TargetDir)\*.xml
  32. ::Swagger::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  33. if exist %rootPath%\%sdllxml% (
  34. copy /y %rootPath%\%sdllxml% %curWebPath%\configs\
  35. copy /y %rootPath%\%sdllxml% %curWebPath%\
  36. )
  37. ::del /q %rootPath%\%sdllxml%
  38. if exist %rootPath%\%sdllxml2% (
  39. copy /y %rootPath%\%sdllxml2% %curWebPath%\configs\
  40. del /q %rootPath%\%sdllxml2%
  41. )
  42. if exist %rootPath%\%sdllxml3% (
  43. copy /y %rootPath%\%sdllxml3% %curWebPath%\configs\
  44. del /q %rootPath%\%sdllxml3%
  45. )
  46. if exist %rootPath%\%sdllxml4% (
  47. copy /y %rootPath%\%sdllxml4% %curWebPath%\configs\
  48. del /q %rootPath%\%sdllxml4%
  49. )
  50. if exist %rootPath%\%sdllxml5% (
  51. copy /y %rootPath%\%sdllxm5% %curWebPath%\configs\
  52. del /q %rootPath%\%sdllxml5%
  53. )
  54. cd /d $(ProjectDir)
  55. set wwwroot=%cd%\wwwroot
  56. if exist %wwwroot% (
  57. md %curWebPath%\wwwroot
  58. cd /d c:\Windows\System32
  59. xcopy %wwwroot%\* %curWebPath%\wwwroot /e /y
  60. )
  61. ::Factory::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  62. set factory=$(SolutionDir)
  63. cd /d $(TargetDir)
  64. cd ..
  65. cd ..
  66. cd ..
  67. set factoryRoot=%cd%
  68. set factoryPathRepository=%factoryRoot%\9.published\Factorys\Panda.Repository\%netversion%
  69. echo factoryPathRepository=%factoryPathRepository%
  70. if exist %factoryPathRepository% (
  71. echo %factoryPathRepository%
  72. cd /d c:\Windows\System32
  73. xcopy %factoryPathRepository%\*.dll %curWebPath% /e /y
  74. )
  75. set factoryPathServices=%factoryRoot%\9.published\Factorys\Panda.Services\%netversion%
  76. echo factoryPathServices=%factoryPathServices%
  77. if exist %factoryPathServices% (
  78. echo %factoryPathServices%
  79. cd /d c:\Windows\System32
  80. xcopy %factoryPathServices%\*.dll %curWebPath% /e /y
  81. )
  82. set controllerPathPAN=%factoryRoot%\9.published\Controller\PAN\%netversion%
  83. echo controllerPathPAN=%controllerPathPAN%
  84. if exist %controllerPathPAN% (
  85. echo %controllerPathPAN%
  86. cd /d c:\Windows\System32
  87. xcopy %controllerPathPAN%\*.dll %curWebPath% /e /y
  88. echo %curWebPath%\configs
  89. xcopy %controllerPathPAN%\*.xml %curWebPath%\configs /e /y
  90. )
  91. set controllerPathv1=%factoryRoot%\9.published\Controller\default.v1\%netversion%
  92. echo controllerPathv1=%controllerPathv1%
  93. if exist %controllerPathv1% (
  94. echo %controllerPathv1%
  95. cd /d c:\Windows\System32
  96. xcopy %controllerPathv1%\*.dll %curWebPath% /e /y
  97. echo %curWebPath%\configs
  98. xcopy %controllerPathv1%\*.xml %curWebPath%\configs /e /y
  99. )
  100. set controllerPathv2=%factoryRoot%\9.published\Controller\default.v2\%netversion%
  101. echo controllerPathv2=%controllerPathv2%
  102. if exist %controllerPathv2% (
  103. echo %controllerPathv2%
  104. cd /d c:\Windows\System32
  105. xcopy %controllerPathv2%\*.dll %curWebPath% /e /y
  106. echo %curWebPath%\configs
  107. xcopy %controllerPathv2%\*.xml %curWebPath%\configs /e /y
  108. )
  109. set controllerPathdbfirst=%factoryRoot%\9.published\Controller\default.dbfirst\%netversion%
  110. echo controllerPathdbfirst=%controllerPathdbfirst%
  111. if exist %controllerPathdbfirst% (
  112. echo %controllerPathdbfirst%
  113. cd /d c:\Windows\System32
  114. xcopy %controllerPathdbfirst%\*.dll %curWebPath% /e /y
  115. echo %curWebPath%\configs
  116. xcopy %controllerPathdbfirst%\*.xml %curWebPath%\configs /e /y
  117. )
  118. set controllerPath=%factoryRoot%\9.published\Controller\HW.V5\%netversion%
  119. echo controllerPath=%controllerPath%
  120. if exist %controllerPath% (
  121. echo %controllerPath%
  122. cd /d c:\Windows\System32
  123. xcopy %controllerPath%\*.dll %curWebPath% /e /y
  124. echo %curWebPath%\configs
  125. xcopy %controllerPath%\*.xml %curWebPath%\configs /e /y
  126. rd %curWebPath%\configs\configs
  127. xcopy %controllerPath%\Configs\*.json %curWebPath%\configs\ /e /y
  128. )
  129. set controllerPath1=%factoryRoot%\9.published\Controller\Default\Panda.WebUI.Controllers.xml
  130. echo controllerPath1=%controllerPath1%
  131. if exist %controllerPath1% (
  132. copy /y %controllerPath1% %curWebPath%\configs\
  133. )
  134. ::::::::CS V1
  135. set controllerPathCS1=%factoryRoot%\9.published\Controller\CS.V1\%netversion%
  136. echo %controllerPathCS1%
  137. if exist %controllerPathCS1% (
  138. echo controllerPathCS1=%controllerPathCS1%
  139. cd /d c:\Windows\System32
  140. xcopy %controllerPathCS1%\*.dll %curWebPath% /e /y
  141. xcopy %controllerPathCS1%\*.xml %curWebPath%\configs /e /y
  142. xcopy %controllerPathCS1%\*.deps.json %curWebPath%\configs /e /y
  143. )
  144. ::::::::LogCenter V1
  145. set controllerPathLogCenter1=%factoryRoot%\9.published\Controller\LogCenter.V1\%netversion%
  146. echo %controllerPathLogCenter1%
  147. if exist %controllerPathLogCenter1% (
  148. echo controllerPathLogCenter1=%controllerPathLogCenter1%
  149. cd /d c:\Windows\System32
  150. xcopy %controllerPathLogCenter1%\*.dll %curWebPath% /e /y
  151. xcopy %controllerPathLogCenter1%\*.xml %curWebPath%\configs /e /y
  152. xcopy %controllerPathLogCenter1%\*.deps.json %curWebPath%\configs /e /y
  153. )
  154. ::::::::Device V1
  155. set controllerPathDevice1=%factoryRoot%\9.published\Controller\Device.V1\%netversion%
  156. echo %controllerPathDevice1%
  157. if exist %controllerPathDevice1% (
  158. echo controllerPathDevice1=%controllerPathDevice1%
  159. cd /d c:\Windows\System32
  160. xcopy %controllerPathDevice1%\*.dll %curWebPath% /e /y
  161. xcopy %controllerPathDevice1%\*.xml %curWebPath%\configs /e /y
  162. xcopy %controllerPathDevice1%\*.deps.json %curWebPath%\configs /e /y
  163. )
  164. set controllerPathDevice1=%factoryRoot%\9.published\Factorys\Device\%netversion%
  165. echo %controllerPathDevice1%
  166. if exist %controllerPathDevice1% (
  167. echo controllerPathDevice1=%controllerPathDevice1%
  168. cd /d c:\Windows\System32
  169. xcopy %controllerPathDevice1%\*.dll %curWebPath% /e /y
  170. xcopy %controllerPathDevice1%\*.xml %curWebPath%\configs /e /y
  171. xcopy %controllerPathDevice1%\*.deps.json %curWebPath%\configs /e /y
  172. )
  173. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::END
  174. ::打包发布
  175. set publishedPathRootLinux=D:\SATLIC.COM.v3
  176. set publishedPathLinux=%publishedPathRootLinux%\rcms\app.cloudapi\
  177. if exist %publishedPathLinux% (
  178. del /q %publishedPathLinux%\*
  179. )
  180. md %publishedPathLinux%
  181. echo======================================
  182. set oldVersion="1.0.0.0"
  183. echo======================================
  184. echo %publishedPathRootLinux%
  185. del /q %publishedPathRootLinux%\*.txt
  186. set configVersion=%factoryRoot%\8.version\versiontemp.txt
  187. echo %configVersion%
  188. if exist %configVersion% (
  189. for /f %%i in (%configVersion%) do (
  190. set tag1=%%i
  191. )
  192. set oldVersion=!tag1!
  193. )
  194. echo======================================
  195. set fileName=$(PlatformName)_$(ConfigurationName)_%netversion%_%oldVersion%
  196. cd /d %publishedPathRootLinux%
  197. echo $(AssemblyVersion)
  198. echo $(PlatformName)_$(ConfigurationName)>>%fileName%.txt
  199. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  200. if exist %curWebPath%publish\ (
  201. cd /d c:\Windows\System32
  202. xcopy %curWebPath%publish\* %publishedPathLinux% /e /y
  203. )
  204. if exist %curWebPath%publish11 (
  205. rd /s /q %curWebPath%publish
  206. )
  207. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  208. if exist %publishedPathLinux% (
  209. cd /d c:\Windows\System32
  210. xcopy %curWebPath%* %publishedPathLinux% /e /y
  211. )
  212. if not exist %publishedPathRootLinux%\database (
  213. md %publishedPathRootLinux%\database
  214. ) else (
  215. rd /s /q %publishedPathRootLinux%\database
  216. md %publishedPathRootLinux%\database
  217. )
  218. if exist %publishedPathRootLinux%\rcms\configs (
  219. rd /s /q %publishedPathRootLinux%\rcms\configs
  220. md %publishedPathRootLinux%\rcms\configs
  221. )
  222. if not exist %publishedPathRootLinux%\rcms\configs (
  223. md %publishedPathRootLinux%\rcms\configs
  224. )
  225. if exist %publishedPathRootLinux%\rcms\configs (
  226. rd /s /q %publishedPathRootLinux%\rcms\configs
  227. md %publishedPathRootLinux%\rcms\configs
  228. )
  229. if not exist %publishedPathRootLinux%\rcms\configs (
  230. md %publishedPathRootLinux%\rcms\configs
  231. )
  232. if not exist %publishedPathRootLinux%\rcms\app.touchui (
  233. md %publishedPathRootLinux%\rcms\app.touchui
  234. )
  235. if exist %factoryRoot%\4.resources\Readme\UI界面应用.txt (
  236. cd /d c:\Windows\System32
  237. xcopy %factoryRoot%\4.resources\Readme\UI界面应用.txt %publishedPathRootLinux%\rcms\app.touchui\ /e /y
  238. )
  239. if exist %factoryRoot%\4.resources\Configs\published.configs (
  240. cd /d c:\Windows\System32
  241. xcopy %factoryRoot%\4.resources\Configs\published.configs\* %publishedPathRootLinux%\rcms\configs\ /e /y
  242. )
  243. if not exist %publishedPathRootLinux%\rcms\data (
  244. md %publishedPathLinux%\data
  245. )
  246. if exist %publishedPathLinux%\data\crms.db.sqlite3 (
  247. cd /d c:\Windows\System32
  248. xcopy %publishedPathLinux%\data\crms.db.sqlite3 %publishedPathRootLinux%\rcms\data\ /e /y
  249. rd /s /q %publishedPathLinux%\data
  250. )
  251. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::脚本
  252. rd /s /q %publishedPathRootLinux%\database
  253. md %publishedPathRootLinux%\database
  254. if not exist %publishedPathRootLinux%\database\0.baklist (
  255. md %publishedPathRootLinux%\database\0.baklist
  256. )
  257. if exist %factoryRoot%\2.database (
  258. cd /d c:\Windows\System32
  259. xcopy %factoryRoot%\2.database\* %publishedPathRootLinux%\database\ /e /y
  260. del /s /q %publishedPathRootLinux%\database\Readme.txt
  261. )
  262. if exist %factoryRoot%\3.tools\v3.tools.publish\打包上传程序.bat (
  263. copy %factoryRoot%\3.tools\v3.tools.publish\打包上传程序.bat %publishedPathRootLinux%\ /y
  264. )
  265. if exist %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.不杀进程.bat (
  266. copy %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.不杀进程.bat %publishedPathRootLinux%\ /y
  267. )
  268. if exist %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.bat (
  269. copy %factoryRoot%\3.tools\v3.tools.publish\startup.serverbus.bat %publishedPathRootLinux%\ /y
  270. )
  271. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  272. if exist %factoryRoot%\9.published\WebApiUI\net6.0\publish11 (
  273. rd /s /q %factoryRoot%\9.published\WebApiUI\net6.0\publish
  274. )
  275. del /q %rootPath%\%sdllxml%
  276. rd /s /q %publishedPathRootLinux%\logs
  277. rd /s /q %publishedPathRootLinux%\LOGS
  278. rd /s /q %publishedPathLinux%\cs
  279. rd /s /q %publishedPathLinux%\de
  280. rd /s /q %publishedPathLinux%\es
  281. rd /s /q %publishedPathLinux%\fr
  282. rd /s /q %publishedPathLinux%\it
  283. rd /s /q %publishedPathLinux%\ja
  284. rd /s /q %publishedPathLinux%\ko
  285. rd /s /q %publishedPathLinux%\pl
  286. rd /s /q %publishedPathLinux%\pt-BR
  287. rd /s /q %publishedPathLinux%\ru
  288. rd /s /q %publishedPathLinux%\tr
  289. rd /s /q %publishedPathLinux%\logs
  290. rd /s /q %publishedPathLinux%\log
  291. rd /s /q %publishedPathLinux%\zh-hant
  292. rd /s /q %publishedPathLinux%\log
  293. rd /s /q %publishedPathLinux%\publish
  294. rd /s /q %publishedPathLinux%\publish99999
  295. rd /s /q %publishedPathLinux%\logs
  296. rd /s /q %publishedPathLinux%\configs\configs
  297. rd /s /q %publishedPathLinux%\configs\ref