bejiitas_wrath

Arma 3 2012 build script.

Oct 10th, 2025
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 52.86 KB | Gaming | 0 0
  1. @echo off
  2. SETLOCAL ENABLEDELAYEDEXPANSION
  3. ::=============================================================================
  4. ::TWO empty lines are required for LineFeed to work
  5. set LineFeed=^
  6.  
  7.  
  8. ::TWO empty lines are required for LineFeed to work
  9. ::=============================================================================
  10.  
  11. :: parameters
  12. :: -noAutotest
  13. :: -debugMode
  14. :: -fastDeploy
  15. :: -fastSteamDev
  16. :: -stable
  17. :: -steamInternal
  18.  
  19.  
  20. set batchDir=%~dp0
  21. set criticalError=0
  22. set path=!path!;C:\Windows\system32
  23.  
  24. :: Date time
  25. set timeBuild=%time%
  26. FOR /F "tokens=1-2 delims= " %%A IN ("%date%") DO (
  27.     set dateBuild=%%B
  28. )
  29.  
  30.  
  31. :: Script constants
  32. set Binarize=1
  33. set protection=1
  34. set manualProtection=0
  35. set deploy=1
  36. set buildInternal=1
  37. set buildSteamBeta=1
  38. set buildSteamAlphaLite=0
  39. set buildSteamDedicatedServer=1
  40. set branch=[DEV]
  41. set stableBranch=0
  42. set steamInternal=0
  43. set debugMode=0
  44. set fastDeploy=0
  45. set fastSteamDev=0
  46. :: Enable autotest
  47. set autotest=1
  48. :: Autotest must success
  49. set autotestSuccess=1
  50. set autotestFps=1
  51. set autotestSecondary=1
  52. set wantSendToNG=1
  53. set autotestStatistics=1
  54. set JNIBuild=0
  55. set buildWithIncrediBuild=1
  56. set buildWithIBPreset=1
  57. set rebuild=/rebuild
  58. set sendToWebDAV=1
  59.  
  60. :: Set this for project
  61. set productName=Arma3
  62. set outputBuildInternalName=Arma3Int_DX11
  63. set outputAppInternalName=Arma3Int_DX11
  64. set outputBuildSteamBetaName=Arma3Retail_DX11
  65. set outputAppSteamBetaName=arma3
  66. set outputBuildSteamAlphaLiteName=Arma3Demo_DX11
  67. set outputAppSteamAlphaLiteName=arma3demo
  68. set outputBuildSteamDedicatedServerName=Arma3Retail_Server
  69. set outputAppSteamDedicatedServerName=arma3server
  70.  
  71.  
  72. :: Build params
  73. set devenv="c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"
  74. set incredibuild="c:\Program Files (x86)\Xoreax\IncrediBuild\BuildConsole.exe"
  75. set sourcePath=c:\w\C_Branch\Poseidon\Futura\
  76. set Arma3sln=%sourcePath%Arma3_2012.sln
  77. set buildVer=DefaultVersion
  78. set buildInternalCfg="Release_DX11|Win32"
  79. set buildSteamBetaCfg="Retail_DX11|Win32"
  80. set buildSteamAlphaLiteCfg="Retail_Demo_DX11|Win32"
  81. set buildSteamDedicatedServerCfg="Retail Server|Win32"
  82. set buildDir=C:\O\Arma3\
  83. set buildLog=%batchDir%BuildLogIB.txt
  84.  
  85. :: Protection
  86. set steamDrmTool=c:\Bis\Build\Steam\drmtool.exe
  87. set signTool="c:\Bis\sign\sign.bat"
  88. set steamBetaAppId=107410
  89. set steamAlphaLiteAppId=228800
  90. set steamInternalAppId=228820
  91.  
  92. :: Data and code paths
  93. set autotestDir=O:\Arma3.Autotest\
  94. set outputInternal=O:\Arma3.Internal\
  95. set outputSteamBetaDir=O:\Arma3.Steam-Dev\
  96. set outputSteamAlphaLiteDir=O:\Arma3.SteamAlphaLite-Dev\
  97. set outputSteamDedicatedServerDir=O:\Arma3.SteamDedicatedServer-Dev\
  98. set productBinAlphaDir=x:\ArmA2_Expansion\Futura\Dta\
  99. set productBinAlphaLiteDir=x:\Arma3_Demo\Dta\
  100. set logsDstPath=O:\Arma3.Logs\
  101. set exeBackupDir=%logsDstPath%
  102. set networkLogsPath=//Builder/O/Arma3.Logs
  103. set oldExeForManualProtection=Arma3int.exe
  104. set autotestExe=%outputBuildInternalName%.exe
  105. set autotestSteamBetaExe=%outputBuildSteamBetaName%.exe
  106. set mainAutotestCfg=a3\missions_design_F\autotest\autotest_main.cfg
  107. set secondAutotestCfg=a3\missions_design_F\autotest\autotest_secondary.cfg
  108. set fpsAutotestCfg=a3\missions_design_F\autotest\autotest_fps.cfg
  109. set mainAutotestSteamBetaCfg=a3\missions_design_F\autotest\autotest_main_retail.cfg
  110. set rptLogName=%outputBuildInternalName%
  111. set rptSteamBetaLogName=%outputBuildSteamBetaName%
  112. set logsSrcPath="c:\Users\%username%\AppData\Local\ArmA 3\"
  113. for %%I in (%logsSrcPath%) do (
  114.     set rptLogPath="%%~I%rptLogName%.rpt"
  115.     set oldrptLogPath="%%~I%rptLogName%_old.rpt"
  116.     set minidump="%%~I%rptLogName%.mdmp"
  117.     set rptSteamBetaLogPath="%%~I%rptSteamBetaLogName%.rpt"
  118.     set oldrptSteamBetaLogPath="%%~I%rptSteamBetaLogName%_old.rpt"
  119.     set minidumpSteamBeta="%%~I%rptSteamBetaLogName%.mdmp"
  120.     set debugLogPath="%%~Idebug.log"
  121. )
  122. set webDAVSteamBetaPath=https://beta3.bistudio.com/files/a3exe/Arma3/
  123. set webDAVSteamBetaDedicatedServerPath=https://beta3.bistudio.com/files/a3exe/Arma3DedicatedServer/
  124.  
  125.  
  126. :: Get parameters
  127. :loopParams
  128. if [%1]==[] goto endParams
  129. if [%1]==[-noAutotest] set autotest=0
  130. if [%1]==[-debugMode] set debugMode=1
  131. if [%1]==[-fastDeploy] set fastDeploy=1
  132. if [%1]==[-fastSteamDev] set fastSteamDev=1
  133. if [%1]==[-stable] set stableBranch=1
  134. if [%1]==[-steamInternal] set steamInternal=1
  135. shift
  136. goto loopParams
  137. :endParams
  138.  
  139.  
  140. :: Stable branch (Steam builds. Stable branch)
  141. if [%stableBranch%]==[1] (
  142.     set buildInternal=0
  143.     set buildSteamBeta=1
  144.     set buildSteamAlphaLite=0
  145.     set buildSteamDedicatedServer=1
  146.     set outputSteamBetaDir=O:\Arma3.Steam-Stable\
  147.     set outputSteamAlphaLiteDir=O:\Arma3.SteamAlphaLite-Stable\
  148.     set outputSteamDedicatedServerDir=O:\Arma3.SteamDedicatedServer-Stable\
  149.     set autotest=1
  150.     set autotestFps=0
  151.     set autotestSecondary=0
  152.     set autotestStatistics=0
  153.     set branch=[STEAM-RC]
  154.     set sendToWebDAV=0
  155.     set sourcePath=c:\w\C_Branch\Poseidon\Futura_Stable\
  156.     set Arma3sln=!sourcePath!Arma3_2012.sln
  157. )
  158.  
  159. :: Arma 3 Internal on Steam
  160. if [%steamInternal%]==[1] (
  161.     set buildInternal=0
  162.     set buildSteamBeta=1
  163.     set buildSteamAlphaLite=0
  164.     set buildSteamDedicatedServer=0
  165.     set outputBuildSteamBetaName=Arma3Retail_Internal_DX11
  166.     set outputAppSteamBetaName=arma3
  167.     set steamBetaAppId=228820
  168.     set buildSteamBetaCfg="Retail_Internal_DX11|Win32"
  169.     set outputSteamBetaDir=O:\Arma3.SteamInternal-Dev\
  170.     set autotestSteamBetaExe=!outputBuildSteamBetaName!.exe
  171.     set autotest=1
  172.     set autotestFps=0
  173.     set autotestSecondary=0
  174.     set autotestStatistics=0
  175.     set rptSteamBetaLogName=!outputBuildSteamBetaName!
  176.     for %%I in (!logsSrcPath!) do (
  177.         set rptSteamBetaLogPath="%%~I!rptSteamBetaLogName!.rpt"
  178.         set oldrptSteamBetaLogPath="%%~I!rptSteamBetaLogName!_old.rpt"
  179.         set minidumpSteamBeta="%%~I!rptSteamBetaLogName!.mdmp"
  180.     )
  181.     set sendToWebDAV=1
  182.     set webDAVSteamBetaPath=https://beta3.bistudio.com/files/a3exe/Arma3SteamInternal/
  183. )
  184.  
  185. :: Debug mode
  186. if [%debugMode%]==[1] (
  187.     set wantSendToNG=0
  188.     set buildInternal=1
  189.     set buildSteamBeta=0
  190.     set buildSteamAlphaLite=0
  191.     set buildSteamDedicatedServer=0
  192.     set autotest=1
  193.     set autotestStatistics=0
  194.     set deploy=0
  195.     set protection=1
  196.     set rebuild=/build
  197.     set mainAutotestCfg=a3\missions_design_F\autotest\autotest_fast.cfg
  198.     set secondAutotestCfg=a3\missions_design_F\autotest\autotest_fast.cfg
  199.     set fpsAutotestCfg=a3\missions_design_F\autotest\autotest_fast.cfg
  200. )
  201.  
  202. :: Fast deploy (main autotest, no other build)
  203. if [%fastDeploy%]==[1] (
  204.     set buildInternal=1
  205.     set buildSteamBeta=0
  206.     set buildSteamAlphaLite=0
  207.     set buildSteamDedicatedServer=0
  208.     set autotest=1
  209.     set autotestFps=0
  210.     set autotestSecondary=0
  211.     set autotestStatistics=0
  212.     set rebuild=/build
  213. )
  214.  
  215. :: Fast Steam deploy (Only Steam Dev, no other build)
  216. if [%fastSteamDev%]==[1] (
  217.     set buildInternal=0
  218.     set buildSteamBeta=1
  219.     set buildSteamAlphaLite=0
  220.     set buildSteamDedicatedServer=1
  221.     set autotest=1
  222.     set autotestFps=0
  223.     set autotestSecondary=0
  224.     set autotestStatistics=0
  225.     set rebuild=/build
  226.     set branch=[STEAM-DEV]
  227. )
  228.  
  229. :: Tools path
  230. set svn=c:\Bis\Subversion\bin\svn
  231. set python=c:\Python27\python.exe
  232. set SendToNG=c:\bis\build\SendToNG.bat
  233. set bedarDir=c:\bis\bedar\
  234. set perl=c:\Perl\bin\perl.exe
  235. set curl=b:\curl\ssl\curl.exe
  236.  
  237. set logLastLinesCount=35
  238.  
  239.  
  240. :: Zdrojova cesta k adonum Arma3
  241. set armaFuturaAddons=x:\ArmA2_Expansion\Futura
  242.  
  243.  
  244. cd /d %batchDir%
  245.  
  246.  
  247. echo ----------------------------------------------------------------------
  248. echo --- %productName% (%buildVer%) build ---------------------------------
  249. echo ---------------------------------------- %dateBuild% %timeBuild% -----
  250. echo parameters:
  251. echo   - branch: %branch%
  252. echo   - buildVer: %buildVer%
  253. if [%debugMode%]==[1] (
  254. echo   - debugMode: %debugMode%
  255. )
  256. if [!buildInternal!]==[1] (
  257. echo   - buildInternal: %buildInternal%
  258. echo   - buildInternalCfg: %buildInternalCfg%
  259. echo   - outputAppInternalName: %outputAppInternalName%.exe
  260. echo   - outputInternal: %outputInternal%
  261. )
  262. if [!buildSteamBeta!]==[1] (
  263. echo   - buildSteamBeta: %buildSteamBeta%
  264. echo   - buildSteamBetaCfg: %buildSteamBetaCfg%
  265. echo   - outputAppSteamBetaName: %outputAppSteamBetaName%.exe
  266. echo   - outputSteamBetaDir: %outputSteamBetaDir%
  267. )
  268. if [!buildSteamAlphaLite!]==[1] (
  269. echo   - buildSteamAlphaLite: %buildSteamAlphaLite%
  270. echo   - buildSteamAlphaLiteCfg: %buildSteamAlphaLiteCfg%
  271. echo   - outputAppSteamAlphaLiteName: %outputAppSteamAlphaLiteName%.exe
  272. echo   - outputSteamAlphaLiteDir: %outputSteamAlphaLiteDir%
  273. )
  274. if [!buildSteamDedicatedServer!]==[1] (
  275. echo   - buildSteamDedicatedServer: %buildSteamDedicatedServer%
  276. echo   - buildSteamDedicatedServerCfg: %buildSteamDedicatedServerCfg%
  277. echo   - outputAppSteamDedicatedServerName: %outputAppSteamDedicatedServerName%.exe
  278. echo   - outputSteamDedicatedServerDir: %outputSteamDedicatedServerDir%
  279. )
  280. echo   - buildDir: %buildDir%
  281. echo   - autotestDir: %autotestDir%
  282. echo   - protection: %protection%
  283. echo   - autotest: %autotest%
  284. echo   - autotestFps: %autotestFps%
  285. echo   - autotestSecondary: %autotestSecondary%
  286. echo   - build switch: %rebuild%
  287. echo ----------------------------------------------------------------------
  288.  
  289.  
  290. ::=============================================================================
  291. :: Update sources from svn
  292. ::=============================================================================
  293. echo Getting sources revision %SVNrevisionNo% ...
  294. %svn% update --non-interactive %sourcePath% 2> %batchDir%svnUpdateError.txt
  295. if errorlevel 1 goto svnUpdateFailed
  296.  
  297. :: Get SVN info
  298. pushd
  299. %svn% info %sourcePath% > %batchDir%svninfo_uncensored.txt
  300. echo SVN Info:
  301. type svninfo_uncensored.txt
  302.  
  303. :: Set SVNrevisionNo
  304. %perl% %batchDir%getLastChangedRevisionNumber.pl %batchDir%svninfo_uncensored.txt > %batchDir%svninfoRevNo.txt
  305. ::%perl% %batchDir%getRevisionNumber.pl %batchDir%svninfo_uncensored.txt > %batchDir%svninfoRevNo.txt
  306. set /p SVNrevisionNo=<%batchDir%svninfoRevNo.txt
  307.  
  308. :: Set full path to autotest logs and backup dir
  309. set timeBuildHour=%timeBuild:~0,2%
  310. set timeBuildMinute=%timeBuild:~3,2%
  311. set logDirName=%SVNrevisionNo%-%DATE:~3%-%timeBuildHour: =0%.%timeBuildMinute: =0%-%branch%
  312. set logsDstFullPath=%logsDstPath%%logDirName%
  313. set exeBackupFullPath=%exeBackupDir%%logDirName%
  314. md %logsDstFullPath%
  315. if not [%logsDstFullPath%]==[%exeBackupFullPath%] md %exeBackupFullPath%
  316. set exeBackupFullPathBuildInternal=%exeBackupFullPath%\buildInternal
  317. set exeBackupFullPathBuildSteamBeta=%exeBackupFullPath%\BuildSteamBeta
  318. set exeBackupFullPathBuildSteamAlphaLite=%exeBackupFullPath%\BuildSteamAlphaLite
  319. set exeBackupFullPathBuildSteamDedicatedServer=%exeBackupFullPath%\BuildSteamDedicatedServer
  320. if [%buildInternal%]==[1] md %exeBackupFullPathBuildInternal%
  321. if [%buildSteamBeta%]==[1] md %exeBackupFullPathBuildSteamBeta%
  322. if [%buildSteamAlphaLite%]==[1] md %exeBackupFullPathBuildSteamAlphaLite%
  323. if [%buildSteamDedicatedServer%]==[1] md %exeBackupFullPathBuildSteamDedicatedServer%
  324.  
  325. REM SVN revision - used in reports (NG etc.) - can be assembled from svninfoRevNo.txt
  326. ::filter.pl -f -t %batchDir%svninfo_uncensored.txt revision > %batchDir%svninfo.txt
  327. popd
  328.  
  329.  
  330. :: Create buildNo.h
  331. echo Create buildNo.h
  332. call %batchDir%makeBuildNoH.bat
  333. copy %batchDir%buildNo.h %sourcePath%\..
  334.  
  335. ::=============================================================================
  336. :: Build with Incredibuild preset system (parallel building)
  337. ::=============================================================================
  338. if [!buildWithIncrediBuild!]==[0] goto noBuildWithIBPreset
  339. if [!buildWithIBPreset!]==[0] goto noBuildWithIBPreset
  340.  
  341. !incredibuild! /Enable > nul
  342.  
  343. set generatedBuildPreset=GeneratedBuildPreset
  344. set buildIBPresetFile=!Arma3sln:~,-4!.ib_preset
  345.  
  346. set InternalBuildSuccessful=0
  347. set SteamBetaBuildSuccessful=0
  348. set SteamAlphaLiteBuildSuccessful=0
  349. set SteamDedicatedServerBuildSuccessful=0
  350.  
  351. echo *** Creating Incredibuild preset file !buildIBPresetFile! ...
  352. set buildIBPreset=
  353. set buildIBPreset=!buildIBPreset!^<Presets^>!LineFeed!
  354. set buildIBPreset=!buildIBPreset!   ^<Preset Name="!generatedBuildPreset!" FormatVersion="1"^>!LineFeed!
  355.  
  356. set buildIBCfgProjectInfo=          ^<Project Name="cfg2012" RelativePath="cfg\cfg2012.vcxproj" MSBuildName="cfg2012"/^>!LineFeed!
  357. set buildIBLibProjectInfo=          ^<Project Name="lib2012" RelativePath="lib\lib2012.vcxproj" MSBuildName="lib2012"/^>!LineFeed!
  358. set buildIBUnitTestProjectInfo=         ^<Project Name="unittests" RelativePath="unittests\unittests.vcxproj" MSBuildName="unittests"/^>!LineFeed!
  359.  
  360. if [!buildInternal!]==[1] call:funcGenerateBuildPreset !buildInternalCfg!
  361. if [!buildSteamBeta!]==[1] call:funcGenerateBuildPreset !buildSteamBetaCfg!
  362. if [!buildSteamAlphaLite!]==[1] call:funcGenerateBuildPreset !buildSteamAlphaLiteCfg!
  363. if [!buildSteamDedicatedServer!]==[1] call:funcGenerateBuildPreset !buildSteamDedicatedServerCfg!
  364.  
  365. set buildIBPreset=!buildIBPreset!   ^</Preset^>!LineFeed!
  366. set buildIBPreset=!buildIBPreset!^</Presets^>
  367. echo !buildIBPreset! > !buildIBPresetFile!
  368.  
  369. echo *** Building Incredibuild preset ...
  370. !incredibuild! !Arma3sln! !rebuild! /preset="!generatedBuildPreset!" /log="!buildLog!"
  371. echo errorlevel %errorlevel%
  372. if errorlevel 1 goto buildFail
  373. echo Build of Incredibuild preset finished successfully
  374.  
  375. :: Was at least one configuration built
  376. set somethingWasBuilt=0
  377. if [!buildInternal!]==[1] set somethingWasBuilt=1
  378. if [!buildSteamBeta!]==[1] set somethingWasBuilt=1
  379. if [!buildSteamAlphaLite!]==[1] set somethingWasBuilt=1
  380. if [!buildSteamDedicatedServer!]==[1] set somethingWasBuilt=1
  381.  
  382. if [!somethingWasBuilt!]==[1] (
  383.     call:funcGenerateBinCfg
  384. )
  385.  
  386. :: Generate shaders and export java interface
  387. if [!buildInternal!]==[1] (
  388.     call:funcGenerateShaders !outputBuildInternalName!
  389.     call:funcCreateBinPbo !exeBackupFullPathBuildInternal!
  390. )
  391. if [!buildSteamBeta!]==[1] (
  392.     call:funcGenerateShaders !outputBuildSteamBetaName!
  393.     call:funcCreateBinPbo !exeBackupFullPathBuildSteamBeta!
  394. )
  395. if [!buildSteamAlphaLite!]==[1] (
  396.     call:funcGenerateShaders !outputBuildSteamAlphaLiteName!
  397.     call:funcCreateBinPbo !exeBackupFullPathBuildSteamAlphaLite!
  398. )
  399. if [!buildSteamDedicatedServer!]==[1] (
  400.     :: We don't want any shaders in server configuration
  401.   del /q /f !buildDir!bin\*.shdc 2>nul
  402.     call:funcCreateBinPbo !exeBackupFullPathBuildSteamDedicatedServer!
  403. )
  404.  
  405. :: All ok, set flag
  406. if [!buildInternal!]==[1] set InternalBuildSuccessful=1
  407. if [!buildSteamBeta!]==[1] set SteamBetaBuildSuccessful=1
  408. if [!buildSteamAlphaLite!]==[1] set SteamAlphaLiteBuildSuccessful=1
  409. if [!buildSteamDedicatedServer!]==[1] set SteamDedicatedServerBuildSuccessful=1
  410.  
  411. goto buildDone
  412. :noBuildWithIBPreset
  413.  
  414. ::=============================================================================
  415. :: Build configurations
  416. ::=============================================================================
  417. set InternalBuildSuccessful=0
  418. if [!buildInternal!]==[0] (
  419.     call:funcBuildConfiguration Internal !buildInternalCfg! !exeBackupFullPathBuildInternal! !outputBuildInternalName!
  420.     :: All ok, set flag
  421.     set InternalBuildSuccessful=1
  422. )
  423.  
  424. set SteamBetaBuildSuccessful=0
  425. if [!buildSteamBeta!]==[0] (
  426.     call:funcBuildConfiguration SteamBeta !buildSteamBetaCfg! !exeBackupFullPathBuildSteamBeta! !outputBuildSteamBetaName!
  427.     :: All ok, set flag
  428.     set SteamBetaBuildSuccessful=1
  429. )
  430.  
  431. set SteamAlphaLiteBuildSuccessful=0
  432. if [!buildSteamAlphaLite!]==[0] (
  433.     call:funcBuildConfiguration SteamAlphaLite !buildSteamAlphaLiteCfg! !exeBackupFullPathBuildSteamAlphaLite! !outputBuildSteamAlphaLiteName!
  434.     :: All ok, set flag
  435.     set SteamAlphaLiteBuildSuccessful=1
  436. )
  437.  
  438. set SteamDedicatedServerBuildSuccessful=0
  439. if [!buildSteamDedicatedServer!]==[0] (
  440.     call:funcBuildConfiguration SteamDedicatedServer !buildSteamDedicatedServerCfg! !exeBackupFullPathBuildSteamDedicatedServer!
  441.     :: All ok, set flag
  442.     set SteamDedicatedServerBuildSuccessful=1
  443. )
  444.  
  445. :buildDone
  446.  
  447. ::=============================================================================
  448. :: Build Allocators
  449. ::=============================================================================
  450. echo *** Building Allocators...
  451. del /q %buildLog% 2>nul
  452. echo JEMalloc
  453. %devenv% %sourcePath%Allocators\JEMalloc\JEMalloc_bi.sln /build "Release|Win32" /Out "%buildLog%"
  454. if errorlevel 1 set allocBuildFailed=1
  455. echo NedMalloc
  456. %devenv% %sourcePath%Allocators\NedMalloc\NedMalloc_bi.sln /build "Release|Win32" /Out "%buildLog%"
  457. if errorlevel 1 set allocBuildFailed=1
  458. echo TCMalloc
  459. %devenv% %sourcePath%Allocators\TCMalloc\TCMalloc.sln /build "Release|Win32" /Out "%buildLog%"
  460. if errorlevel 1 set allocBuildFailed=1
  461. echo TBB3
  462. %devenv% %sourcePath%Allocators\TBB3\tbb\build\vsproject\makefile.sln /build "Release|Win32" /Out "%buildLog%"
  463. if errorlevel 1 set allocBuildFailed=1
  464. echo TBB4
  465. %devenv% %sourcePath%Allocators\TBB4\tbb\build\vsproject\makefile.sln /build "Release|Win32" /Out "%buildLog%"
  466. if errorlevel 1 set allocBuildFailed=1
  467.  
  468. if (%allocBuildFailed%)==(1) goto AllocatorBuildFailed
  469.  
  470. echo Build finished successfully
  471. xcopy /y %sourcePath%Allocators\*.dll %buildDir%dll\
  472.  
  473. goto noBuildAllocators
  474.  
  475. :AllocatorBuildFailed
  476. if [%wantSendToNG%]==[1] (
  477.     call %SendToNG% "%branch% Allocator BUILD failed." %buildLog%
  478. )
  479.  
  480. :noBuildAllocators
  481.  
  482.  
  483. ::=============================================================================
  484. :: protection
  485. ::=============================================================================
  486. if [%protection%]==[0] goto noProtection
  487.  
  488. echo *** Protecting exe...
  489.  
  490. :: Automatic steam protection
  491. if [!InternalBuildSuccessful!]==[1] call:funcProtectSteam !buildDir!!outputBuildInternalName!.exe !steamInternalAppId!
  492. if [!SteamBetaBuildSuccessful!]==[1] call:funcProtectSteam !buildDir!!outputBuildSteamBetaName!.exe !steamBetaAppId!
  493. if [!SteamAlphaLiteBuildSuccessful!]==[1] call:funcProtectSteam !buildDir!!outputBuildSteamAlphaLiteName!.exe !steamAlphaLiteAppId!
  494. :: No protection for dedicated server
  495.  
  496. :noProtection
  497. goto protectionOk
  498.  
  499. :protectionOk
  500.  
  501. ::=============================================================================
  502. :: Sign app .exe
  503. ::=============================================================================
  504. echo *** Sign app exe
  505.  
  506. if [%InternalBuildSuccessful%]==[1] call:funcSignAppExe !outputBuildInternalName!
  507. if [%SteamBetaBuildSuccessful%]==[1] call:funcSignAppExe !outputBuildSteamBetaName!
  508. if [%SteamAlphaLiteBuildSuccessful%]==[1] call:funcSignAppExe !outputBuildSteamAlphaLiteName!
  509. if [%SteamDedicatedServerBuildSuccessful%]==[1] call:funcSignAppExe !outputBuildSteamDedicatedServerName!
  510.  
  511. ::=============================================================================
  512. :: Backup data (.exe, .map, .pdb) and Rename in backup directory build .exe to app .exe
  513. ::=============================================================================
  514. echo +++ Backup new exe and debug data and rename build exe to app exe in backup directory
  515.  
  516. if [!InternalBuildSuccessful!]==[1] call:funcBackupExeMapPdb !outputBuildInternalName! !outputAppInternalName! !exeBackupFullPathBuildInternal!
  517. if [!SteamBetaBuildSuccessful!]==[1] call:funcBackupExeMapPdb !outputBuildSteamBetaName! !outputAppSteamBetaName! !exeBackupFullPathBuildSteamBeta!
  518. if [!SteamAlphaLiteBuildSuccessful!]==[1] call:funcBackupExeMapPdb !outputBuildSteamAlphaLiteName! !outputAppSteamAlphaLiteName! !exeBackupFullPathBuildSteamAlphaLite!
  519. if [!SteamDedicatedServerBuildSuccessful!]==[1] call:funcBackupExeMapPdb !outputBuildSteamDedicatedServerName! !outputAppSteamDedicatedServerName! !exeBackupFullPathBuildSteamDedicatedServer!
  520.  
  521.  
  522. ::=============================================================================
  523. :: Update data
  524. ::=============================================================================
  525. echo +++ Copy %productName% data to %autotestDir%
  526. robocopy %armaFuturaAddons% %autotestDir% *.* /S /E /NP
  527. robocopy x:\fp\Dta %autotestDir%\Dta *.pbo /S /E /NP
  528. xcopy /y x:\ArmA2_Expansion\Futura\Dta\languagecore_f.* %autotestDir%\Dta\
  529.  
  530. if [%autotest%]==[1] (
  531.     if [%InternalBuildSuccessful%]==[1] (
  532.         copy %buildDir%%outputBuildInternalName%.exe %autotestDir% /y
  533.         copy %buildDir%%outputBuildInternalName%.map %autotestDir% /y
  534.         copy %buildDir%%outputBuildInternalName%.pdb %autotestDir% /y
  535.     )
  536.     if [%SteamBetaBuildSuccessful%]==[1] (
  537.         copy %buildDir%%outputBuildSteamBetaName%.exe %autotestDir% /y
  538.         copy %buildDir%%outputBuildSteamBetaName%.map %autotestDir% /y
  539.         copy %buildDir%%outputBuildSteamBetaName%.pdb %autotestDir% /y
  540.     )
  541. )
  542. copy %buildDir%*.dll %autotestDir% /y
  543. xcopy /y %buildDir%\dll\*.* %autotestDir%dll\
  544.  
  545. copy %batchDir%svninfo_uncensored.txt %autotestDir%\svn_info.txt /y
  546. echo done
  547.  
  548.  
  549. ::=============================================================================
  550. :: Autotest beginning
  551. ::=============================================================================
  552. set autotestErrorLevel=0
  553. if not [%autotest%]==[1] goto noAutotest
  554.  
  555. del /q %batchDir%autotestResult.txt 2>nul
  556. del /q %batchDir%autotestInfo.txt 2>nul
  557. del /q %batchDir%autotestInfo2.txt 2>nul
  558. del /q %batchDir%autotestFps.txt 2>nul
  559. del /q %batchDir%rptLastLines.txt 2>nul
  560.  
  561. set mainAutotestLogsDir=Autotest.main\
  562. set fpsAutotestLogsDir=Autotest.fps\
  563. set secondAutotestLogsDir=Autotest.secondary\
  564.  
  565. set mainAutotestSteamBetaLogsDir=AutotestSteamBeta.main\
  566.  
  567. ::=============================================================================
  568. :: Autotest internal
  569. ::=============================================================================
  570. if not [%InternalBuildSuccessful%]==[1] goto noAutotestInternal
  571.  
  572. ::-----------------------------------------------------------------------------
  573. :: Main Autotest
  574. set autotestName=Main autotest
  575. echo *** %autotestName% started
  576. if [!Binarize!]==[1] copy !exeBackupFullPathBuildInternal!\bin.pbo* !autotestDir!\Dta /y
  577. :: put right steam appid before autotest
  578. echo !steamInternalAppId!> !autotestDir!steam_appid.txt
  579. :: delete old files (delete all .rpt" by removing .rpt" and add *.rpt" , also for .mdmp, .bidmp)
  580. del /q %rptLogPath:.rpt"=%*.rpt" 2>nul
  581. del /q %minidump:.mdmp"=%*.mdmp" 2>nul
  582. del /q %minidump:.mdmp"=%*.bidmp" 2>nul
  583. del /q %debugLogPath% 2>nul
  584. :: start autotest
  585. cd /d %autotestDir%
  586. %autotestExe% -window -nosplash -mod=design;delta -autotest=%mainAutotestCfg%
  587. set lastErrorLevel=%errorlevel%
  588. set autotestErrorLevel=%lastErrorLevel%
  589. echo Finished with errorlevel %lastErrorLevel%
  590. echo %autotestName% finished with errorlevel=%lastErrorLevel% >> %batchDir%autotestResult.txt
  591.  
  592. ::rename specialized .rpt name to standardized (rename need just file name as second parameter)
  593. for %%I in (%rptLogPath:.rpt"=%*.rpt") do ren "%%I" %rptLogName%.rpt
  594. for %%I in (%minidump:.mdmp"=%*.mdmp") do ren "%%I" %rptLogName%.mdmp
  595.  
  596. :: create autotest info
  597. call:funcCreateAutotestInfo
  598. if not %lastErrorLevel%==0 echo *** %autotestName% failed. Last RPT lines *** >> %batchDir%rptLastLines.txt
  599. if not %lastErrorLevel%==0 %perl% %bedarDir%autotestresult\lastlines.pl %rptLogPath% "%logLastLinesCount%" 1>> %batchDir%rptLastLines.txt 2>&1
  600.  
  601. :: create autotest statistics
  602. if [%autotestStatistics%]==[1] (
  603.     echo *** Create bedar_stat.rpt
  604.     del /q %autotestDir%bedar_stat.rpt 2>nul
  605.     call %bedarDir%filter\extract_rpt.bat %logsSrcPath% %outputBuildInternalName% %autotestDir%
  606.     %perl% %bedarDir%autotestresult\at-result.pl %rptLogPath% 1> %batchDir%at-result.txt 2>&1
  607. )
  608.  
  609. :: Copy logs
  610. call:funcCopyCrashLogs %mainAutotestLogsDir%
  611. copy %rptLogPath% %oldrptLogPath% /y
  612.  
  613. :: if autotest failed, do not start another autotests
  614. if not [%autotestErrorLevel%]==[0] if [%autotestSuccess%]==[1] goto autotestEnd
  615.  
  616.  
  617. if not [%autotestFps%]==[1] goto noAutotest_Fps
  618. ::-----------------------------------------------------------------------------
  619. :: FPS Autotest
  620. set autotestName=FPS autotest
  621. echo *** %autotestName% started
  622. !incredibuild! /Disable > nul
  623. :: put right steam appid before autotest
  624. echo !steamInternalAppId!> !autotestDir!steam_appid.txt
  625. :: delete old files (delete all .rpt" by removing .rpt" and add *.rpt" , also for .mdmp, .bidmp)
  626. del /q %rptLogPath:.rpt"=%*.rpt" 2>nul
  627. del /q %minidump:.mdmp"=%*.mdmp" 2>nul
  628. del /q %minidump:.mdmp"=%*.bidmp" 2>nul
  629. del /q %debugLogPath% 2>nul
  630.  
  631. cd /d %autotestDir%
  632. %autotestExe% -window -nosplash -mod=design;delta -nologs -autotest=%fpsAutotestCfg%
  633. set lastErrorLevel=%errorlevel%
  634. set autotestErrorLevel=%lastErrorLevel%
  635. echo Finished with errorlevel %lastErrorLevel%
  636. echo %autotestName% finished with errorlevel=%lastErrorLevel% >> %batchDir%autotestResult.txt
  637.  
  638. !incredibuild! /Enable > nul
  639.  
  640. ::rename specialized .rpt name to standardized (rename need just file name as second parameter)
  641. for %%I in (%rptLogPath:.rpt"=%*.rpt") do ren "%%I" %rptLogName%.rpt
  642. for %%I in (%minidump:.mdmp"=%*.mdmp") do ren "%%I" %rptLogName%.mdmp
  643.  
  644. :: create autotest info
  645. call:funcCreateAutotestInfo
  646. if not %lastErrorLevel%==0 echo *** %autotestName% failed. Last RPT lines *** >> %batchDir%rptLastLines.txt
  647. if not %lastErrorLevel%==0 %perl% %bedarDir%autotestresult\lastlines.pl %rptLogPath% "%logLastLinesCount%" 1>> %batchDir%rptLastLines.txt 2>&1
  648.  
  649. :: Copy crash info
  650. if not [%lastErrorLevel%]==[0] call:funcCopyCrashLogs %fpsAutotestLogsDir%
  651.  
  652. :: create FPS result
  653. echo %autotestName% result: >> %batchDir%autotestFps.txt
  654. %perl% %bedarDir%deriveFPS.pl %rptLogPath% %batchDir%autotestFps.txt
  655. echo. >> %batchDir%autotestFps.txt
  656.  
  657. :: if autotest failed, do not start another autotests
  658. if not [%autotestErrorLevel%]==[0] if [%autotestSuccess%]==[1] goto autotestEnd
  659.  
  660. :noAutotest_Fps
  661.  
  662.  
  663. if not [%autotestSecondary%]==[1] goto noAutotest_Secondary
  664. ::-----------------------------------------------------------------------------
  665. :: Secondary Autotest
  666. set autotestName=Secondary autotest
  667. echo *** %autotestName% started
  668. :: put right steam appid before autotest
  669. echo !steamInternalAppId!> !autotestDir!steam_appid.txt
  670. :: delete old files (delete all .rpt" by removing .rpt" and add *.rpt" , also for .mdmp, .bidmp)
  671. del /q %rptLogPath:.rpt"=%*.rpt" 2>nul
  672. del /q %minidump:.mdmp"=%*.mdmp" 2>nul
  673. del /q %minidump:.mdmp"=%*.bidmp" 2>nul
  674. del /q %debugLogPath% 2>nul
  675.  
  676. :: start autotest
  677. cd /d %autotestDir%
  678. %autotestExe% -window -nosplash -mod=design;delta -autotest=%secondAutotestCfg%
  679. set lastErrorLevel=%errorlevel%
  680. echo Finished with errorlevel %lastErrorLevel%
  681. echo %autotestName% finished with errorlevel=%lastErrorLevel% >> %batchDir%autotestResult.txt
  682.  
  683. ::rename specialized .rpt name to standardized (rename need just file name as second parameter)
  684. for %%I in (%rptLogPath:.rpt"=%*.rpt") do ren "%%I" %rptLogName%.rpt
  685. for %%I in (%minidump:.mdmp"=%*.mdmp") do ren "%%I" %rptLogName%.mdmp
  686.  
  687. :: create autotest info
  688. call:funcCreateAutotestInfo
  689. if not %lastErrorLevel%==0 echo *** %autotestName% failed. Last RPT lines *** >> %batchDir%rptLastLines.txt
  690. if not %lastErrorLevel%==0 %perl% %bedarDir%autotestresult\lastlines.pl %rptLogPath% "%logLastLinesCount%" 1>> %batchDir%rptLastLines.txt 2>&1
  691.  
  692. :: Copy crash info (report crash info every time)
  693. ::if not [%lastErrorLevel%]==[0] call:funcCopyCrashLogs %secondAutotestLogsDir%
  694. call:funcCopyCrashLogs %secondAutotestLogsDir%
  695.  
  696. :noAutotest_Secondary
  697.  
  698. :noAutotestInternal
  699.  
  700. ::=============================================================================
  701. :: Autotest SteamBeta
  702. ::=============================================================================
  703. if not [%SteamBetaBuildSuccessful%]==[1] goto noAutotestSteamBeta
  704.  
  705. ::-----------------------------------------------------------------------------
  706. :: Main Autotest
  707. set autotestName=Main autotest Steam Beta
  708. echo *** %autotestName% started
  709. if [!Binarize!]==[1] copy !exeBackupFullPathBuildSteamBeta!\bin.pbo* !autotestDir!\Dta /y
  710. :: put right steam appid before autotest
  711. echo !steamBetaAppId!> !autotestDir!steam_appid.txt
  712. :: delete old files (delete all .rpt" by removing .rpt" and add *.rpt" , also for .mdmp, .bidmp)
  713. del /q %rptSteamBetaLogPath:.rpt"=%*.rpt" 2>nul
  714. del /q %minidumpSteamBeta:.mdmp"=%*.mdmp" 2>nul
  715. del /q %minidumpSteamBeta:.mdmp"=%*.bidmp" 2>nul
  716. del /q %debugLogPath% 2>nul
  717. :: start autotest
  718. cd /d %autotestDir%
  719. %autotestSteamBetaExe% -window -nosplash -mod=design;delta -autotest=%mainAutotestSteamBetaCfg%
  720. set lastErrorLevel=%errorlevel%
  721. set autotestErrorLevel=%lastErrorLevel%
  722. echo Finished with errorlevel %lastErrorLevel%
  723. echo %autotestName% finished with errorlevel=%lastErrorLevel% >> %batchDir%autotestResult.txt
  724.  
  725. ::rename specialized .rpt name to standardized (rename need just file name as second parameter)
  726. for %%I in (%rptSteamBetaLogPath:.rpt"=%*.rpt") do ren "%%I" %rptSteamBetaLogName%.rpt
  727. for %%I in (%minidumpSteamBeta:.mdmp"=%*.mdmp") do ren "%%I" %rptSteamBetaLogName%.mdmp
  728.  
  729. :: create autotest info
  730. call:funcCreateAutotestInfo
  731. if not %lastErrorLevel%==0 echo *** %autotestName% failed. Last RPT lines *** >> %batchDir%rptLastLines.txt
  732. if not %lastErrorLevel%==0 %perl% %bedarDir%autotestresult\lastlines.pl %rptSteamBetaLogPath% "%logLastLinesCount%" 1>> %batchDir%rptLastLines.txt 2>&1
  733.  
  734. :: Copy logs
  735. call:funcCopySteamBetaCrashLogs %mainAutotestSteamBetaLogsDir%
  736. copy %rptSteamBetaLogPath% %oldrptSteamBetaLogPath% /y
  737.  
  738. :: if autotest failed, do not start another autotests
  739. if not [%autotestErrorLevel%]==[0] if [%autotestSuccess%]==[1] goto autotestEnd
  740.  
  741. :noAutotestSteamBeta
  742.  
  743. :autotestEnd
  744.  
  745. ::=============================================================================
  746. :: Create full autotest result
  747. ::=============================================================================
  748. echo *** Create autotestResult.txt
  749.  
  750. echo. >> %batchDir%autotestResult.txt
  751.  
  752. if [%InternalBuildSuccessful%]==[1] (
  753.     :: Full rpt
  754.     echo Full RPT file: >> %batchDir%autotestResult.txt
  755.     echo file:///%networkLogsPath%/%logDirName%/%mainAutotestLogsDir%%rptLogName%.RPT >> %batchDir%autotestResult.txt
  756.     echo. >> %batchDir%autotestResult.txt
  757.     :: Debug log
  758.     echo Debug log: >> %batchDir%autotestResult.txt
  759.     echo file:///%networkLogsPath%/%logDirName%/%mainAutotestLogsDir%debug.log >> %batchDir%autotestResult.txt
  760.     echo. >> %batchDir%autotestResult.txt
  761. )
  762.  
  763. if [%SteamBetaBuildSuccessful%]==[1] (
  764.     :: Full rpt
  765.     echo Full RPT file: >> %batchDir%autotestResult.txt
  766.     echo file:///%networkLogsPath%/%logDirName%/%mainAutotestSteamBetaLogsDir%%rptSteamBetaLogName%.RPT >> %batchDir%autotestResult.txt
  767.     echo. >> %batchDir%autotestResult.txt
  768. )
  769.  
  770. :: Statistics
  771. if [%autotestStatistics%]==[1] (
  772.     echo Autotest RPT statistics sorted by occurrence: >> %batchDir%autotestResult.txt
  773.     echo file:///%networkLogsPath%/%logDirName%/bedar_stat.rpt >> %batchDir%autotestResult.txt
  774.     echo. >> %batchDir%autotestResult.txt
  775. )
  776.  
  777. :: Autotest result
  778. if [%autotestStatistics%]==[1] (
  779.     type %batchDir%at-result.txt >> %batchDir%autotestResult.txt
  780.     echo. >> %batchDir%autotestResult.txt
  781. )
  782.  
  783. :: Last RPT lines
  784. if not [%autotestErrorLevel%]==[0] (
  785.     echo RPT last %logLastLinesCount% lines >> %batchDir%autotestResult.txt
  786.     echo ===============================================================================  >> %batchDir%autotestResult.txt
  787.     type %batchDir%rptLastLines.txt >> %batchDir%autotestResult.txt
  788.     echo. >> %batchDir%autotestResult.txt
  789. )
  790.  
  791. :: Autotest info
  792. echo. >> %batchDir%autotestResult.txt
  793. type %batchDir%autotestInfo.txt >> %batchDir%autotestResult.txt
  794. echo. >> %batchDir%autotestResult.txt
  795. type %batchDir%autotestInfo2.txt >> %batchDir%autotestResult.txt
  796.  
  797.  
  798. :: if autotest failed and must success, report failed
  799. if not [%autotestErrorLevel%]==[0] if [%autotestSuccess%]==[1] goto autotestFailed
  800.  
  801. :autotestOk
  802. echo Autotest finished successfully
  803.  
  804. :: FPS statistic
  805. copy %batchDir%autotestFps.txt %logsDstFullPath% /y
  806. :: If build hour is greater or equal of 5:00 then behave as DAY build (fps not in graph)
  807. set timeHourCreating=!time:~0,2!
  808. if !timeHourCreating! GEQ 5 (
  809.     ren !logsDstFullPath!\autotestFps.txt autotestFps-DAY.txt
  810. )
  811.  
  812. if [%wantSendToNG%]==[1] (
  813.     :: Create FPS graph
  814.     del /q %batchDir%fpsgraph.png 2>nul
  815.     %python% %batchDir%bdrgraph.py --output %batchDir%fpsgraph.png
  816.    
  817.     :: If build hour is greater or equal of 5:00 then behave as DAY build (do not post fps graph - no new values)
  818.     if !timeHourCreating! GEQ 5 (
  819.         call %SendToNG% "%branch% AUTOTEST FPS (revision %SVNrevisionNo%)" %batchDir%autotestFps.txt
  820.     ) else (
  821.         if exist %batchDir%fpsgraph.png (
  822.             call %SendToNG% "%branch% AUTOTEST FPS (revision %SVNrevisionNo%)" %batchDir%autotestFps.txt %batchDir%fpsgraph.png
  823.         ) else (
  824.             call %SendToNG% "%branch% AUTOTEST FPS (revision %SVNrevisionNo%)" %batchDir%autotestFps.txt
  825.         )
  826.     )
  827.    
  828.     :: Autotest result
  829.     call %SendToNG% "%branch% AUTOTEST complete (revision %SVNrevisionNo%)" %batchDir%autotestResult.txt
  830. )
  831.  
  832. :noAutotest
  833.  
  834.  
  835. ::=============================================================================
  836. :: Compile JNI Scripting
  837. ::=============================================================================
  838. if [%JNIBuild%]==[1] (
  839.     echo *** Building JNI...
  840.     call %batchDir%JNIBuild.bat
  841.     set JNIBuildErrorLevel=%errorlevel%
  842.     ::If JNIBuild failed and we want to send to NG just do it
  843.     if not [%JNIBuildErrorLevel%]==[0] if [%wantSendToNG%]==[1] (
  844.             call %SendToNG% "%branch% JNI BUILD failed" %batchDir%JNIBuildResult.txt
  845.     )
  846. ) else (
  847.     set JNIBuildErrorLevel=1
  848. )
  849. :JNIBuildOK
  850.  
  851.  
  852. ::=============================================================================
  853. :: Deploying
  854. ::=============================================================================
  855.  
  856. :deploy
  857.  
  858. if [%deploy%]==[0] goto noDeploy
  859.  
  860. echo *** Deploying...
  861.  
  862. echo +++ Copy !productName! to !outputInternal!:
  863. ::robocopy %autotestDir%\Addons %outputInternal%\Addons *.* /S /E /NP
  864. :: Using FreeFileSync for mirroring Addons from Arma3.Autotest/Addons to Arma3.Update/Addons
  865. :: This synchronization create log files in Arma3.Backup and backup of changed and deleted data
  866. :: Only copy when we build Internal build
  867. if [!InternalBuildSuccessful!]==[1] (
  868.     call !batchDir!Autotest_Update_SyncJob.bat
  869. )
  870.  
  871. echo +++ Copy Dta to output directory \Dta...
  872. if [!InternalBuildSuccessful!]==[1] call:funcDeployDtaDir !outputInternal! !productBinAlphaDir! !exeBackupFullPathBuildInternal!
  873. if [!SteamBetaBuildSuccessful!]==[1] call:funcDeployDtaDir !outputSteamBetaDir! !productBinAlphaDir! !exeBackupFullPathBuildSteamBeta!
  874. if [!SteamAlphaLiteBuildSuccessful!]==[1] call:funcDeployDtaDir !outputSteamAlphaLiteDir! !productBinAlphaLiteDir! !exeBackupFullPathBuildSteamAlphaLite!
  875. if [!SteamDedicatedServerBuildSuccessful!]==[1] call:funcDeployDtaDir !outputSteamDedicatedServerDir! !productBinAlphaDir! !exeBackupFullPathBuildSteamDedicatedServer!
  876.  
  877. :: Copy design only into internal directory
  878. xcopy /s !autotestDir!\Design\*.* !outputInternal!\Design\ /y
  879.  
  880. if [%JNIBuildErrorLevel%]==[0] (
  881.     if [%InternalBuildSuccessful%]==[1] call:funcDeployJNI !outputInternal!
  882.     if [%SteamBetaBuildSuccessful%]==[1] call:funcDeployJNI !outputSteamBetaDir!
  883.     if [%SteamAlphaLiteBuildSuccessful%]==[1] call:funcDeployJNI !outputSteamAlphaLiteDir!
  884.     if [%SteamDedicatedServerBuildSuccessful%]==[1] call:funcDeployJNI !outputSteamDedicatedServerDir!
  885. )
  886.  
  887. ::=============================================================================
  888. :: Deploying .exe, .map and .pdb
  889. ::=============================================================================
  890.  
  891. if [%InternalBuildSuccessful%]==[1] call:funcDeployExeMapPdb !outputInternal! !outputBuildInternalName! !outputAppInternalName!
  892. if [%SteamBetaBuildSuccessful%]==[1] call:funcDeployExeMapPdb !outputSteamBetaDir! !outputBuildSteamBetaName! !outputAppSteamBetaName!
  893. if [%SteamAlphaLiteBuildSuccessful%]==[1] call:funcDeployExeMapPdb !outputSteamAlphaLiteDir! !outputBuildSteamAlphaLiteName! !outputAppSteamAlphaLiteName!
  894. if [%SteamDedicatedServerBuildSuccessful%]==[1] call:funcDeployExeMapPdb !outputSteamDedicatedServerDir! !outputBuildSteamDedicatedServerName! !outputAppSteamDedicatedServerName!
  895.  
  896. ::=============================================================================
  897. :: Deploying *.dll and dll\*.*
  898. ::=============================================================================
  899. echo +++ Copy *.dll and dll\ to output directory
  900. ::copy %buildDir%*.cfg %outputInternal% /y
  901. ::copy %buildDir%*.bat %outputInternal% /y
  902. copy %buildDir%*.dll %outputInternal% /y
  903. if [%InternalBuildSuccessful%]==[1] xcopy /y %buildDir%*.dll %outputInternal%
  904. if [%SteamBetaBuildSuccessful%]==[1] xcopy /y %buildDir%*.dll %outputSteamBetaDir%
  905. if [%SteamAlphaLiteBuildSuccessful%]==[1] xcopy /y %buildDir%*.dll %outputSteamAlphaLiteDir%
  906. if [%SteamDedicatedServerBuildSuccessful%]==[1] xcopy /y %buildDir%*.dll %outputSteamDedicatedServerDir%
  907.  
  908. if [%InternalBuildSuccessful%]==[1] xcopy /y %buildDir%\dll\*.* %outputInternal%dll\
  909. if [%SteamBetaBuildSuccessful%]==[1] xcopy /y %buildDir%\dll\*.* %outputSteamBetaDir%dll\
  910. if [%SteamAlphaLiteBuildSuccessful%]==[1] xcopy /y %buildDir%\dll\*.* %outputSteamAlphaLiteDir%dll\
  911. if [%SteamDedicatedServerBuildSuccessful%]==[1] xcopy /y %buildDir%\dll\*.* %outputSteamDedicatedServerDir%dll\
  912.  
  913.  
  914. ::=============================================================================
  915. :: Deploying SteamBeta-Dev to WebDAV (Deploy to Steam)
  916. ::=============================================================================
  917. set webDAVSendErrorLevel=0
  918. if [%sendToWebDAV%]==[1] (
  919.     del /q %batchDir%sendInfo.txt 2>nul
  920.  
  921.     if [%SteamBetaBuildSuccessful%]==[1] (
  922.         echo +++ Curl: Send files to %webDAVSteamBetaPath%
  923.  
  924.         for %%I in ("%outputSteamBetaDir%%outputAppSteamBetaName%.*") do (
  925.             call:funcSendFileToWebDAV %webDAVSteamBetaPath% %%~I
  926.         )
  927.         for %%I in ("%outputSteamBetaDir%*.dll") do (
  928.             call:funcSendFileToWebDAV %webDAVSteamBetaPath% %%~I
  929.         )
  930.         for %%I in ("%outputSteamBetaDir%dll\*.*") do (
  931.             call:funcSendFileToWebDAV %webDAVSteamBetaPath% %%~I dll
  932.         )
  933.         for %%I in ("%outputSteamBetaDir%Dta\*.*") do (
  934.             call:funcSendFileToWebDAV %webDAVSteamBetaPath% %%~I Dta
  935.         )
  936.     )
  937.  
  938.     if [%SteamDedicatedServerBuildSuccessful%]==[1] (
  939.         echo +++ Curl: Send files to %webDAVSteamBetaDedicatedServerPath%
  940.  
  941.         for %%I in ("%outputSteamDedicatedServerDir%%outputAppSteamDedicatedServerName%.*") do (
  942.             call:funcSendFileToWebDAV %webDAVSteamBetaDedicatedServerPath% %%~I
  943.         )
  944.         for %%I in ("%outputSteamDedicatedServerDir%*.dll") do (
  945.             call:funcSendFileToWebDAV %webDAVSteamBetaDedicatedServerPath% %%~I
  946.         )
  947.         for %%I in ("%outputSteamDedicatedServerDir%dll\*.*") do (
  948.             call:funcSendFileToWebDAV %webDAVSteamBetaDedicatedServerPath% %%~I dll
  949.         )
  950.         for %%I in ("%outputSteamDedicatedServerDir%Dta\*.*") do (
  951.             call:funcSendFileToWebDAV %webDAVSteamBetaDedicatedServerPath% %%~I Dta
  952.         )
  953.     )
  954. )
  955. if not [%webDAVSendErrorLevel%]==[0] if [%wantSendToNG%]==[1] (
  956.     call %SendToNG% "%branch% Send of SteamBeta to WebDAV failed. (revision %SVNrevisionNo%)" %batchDir%sendInfo.txt
  957. )
  958.  
  959. ::=============================================================================
  960. :: Deploying svninfo and bedar_stat
  961. ::=============================================================================
  962. echo +++ Deploy svninfo and bedar_stat
  963. copy %batchDir%svninfo_uncensored.txt %outputInternal%\svn_info.txt /y
  964. echo done
  965.  
  966. set lasterrorlevel=%errorlevel%
  967.  
  968. :: Backup rpt
  969. if [%InternalBuildSuccessful%]==[1] (
  970.     if not [%autotest%]==[0] (
  971.         copy %autotestDir%bedar_stat.rpt %outputInternal% /y
  972.         copy %autotestDir%bedar_stat.rpt %logsDstFullPath% /y
  973.     )
  974. )
  975.  
  976. if not [%lasterrorlevel%]==[0] goto deployFail
  977.  
  978. echo Deploying finished successfully
  979.  
  980. ::=============================================================================
  981. :: Sending info messages
  982. ::=============================================================================
  983.  
  984. :: Create deploy info
  985. echo Sending info to NG
  986. del /q %batchDir%deployInfo.txt 2>nul
  987. echo Build %dateBuild% %timeBuild% (revision %SVNrevisionNo%) >> %batchDir%deployInfo.txt
  988. echo. >> %batchDir%deployInfo.txt
  989. ::echo protection:%protection% >> %batchDir%deployInfo.txt
  990.  
  991. :: deploy info
  992. if [%InternalBuildSuccessful%]==[1] (
  993.     if [%autotestErrorLevel%]==[0] (
  994.         echo %productName% buildInternal %branch% has been distributed.>> %batchDir%deployInfo.txt
  995.         echo  - autotest=%autotest% >> %batchDir%deployInfo.txt
  996.         echo. >> %batchDir%deployInfo.txt
  997.     )
  998. )
  999.  
  1000. if [%SteamBetaBuildSuccessful%]==[1] (
  1001.     if [%autotestErrorLevel%]==[0] (
  1002.         echo %productName% buildSteamBeta %branch% has been distributed.>> %batchDir%deployInfo.txt
  1003.         echo  - autotest=%autotest% >> %batchDir%deployInfo.txt
  1004.         echo. >> %batchDir%deployInfo.txt
  1005.     )
  1006. )
  1007.  
  1008. if [%SteamAlphaLiteBuildSuccessful%]==[1] (
  1009.     if [%autotestErrorLevel%]==[0] (
  1010.         echo %productName% buildSteamAlphaLite %branch% has been distributed.>> %batchDir%deployInfo.txt
  1011.         echo. >> %batchDir%deployInfo.txt
  1012.     )
  1013. )
  1014.  
  1015. if [%SteamDedicatedServerBuildSuccessful%]==[1] (
  1016.     if [%autotestErrorLevel%]==[0] (
  1017.         echo %productName% buildSteamDedicatedServer %branch% has been distributed.>> %batchDir%deployInfo.txt
  1018.         echo. >> %batchDir%deployInfo.txt
  1019.     )
  1020. )
  1021.  
  1022.  
  1023.  
  1024. :: Send to NG
  1025. if [%wantSendToNG%]==[1] (
  1026.     call %SendToNG% "%branch% BUILD distributed (revision %SVNrevisionNo%)" %batchDir%deployInfo.txt
  1027. )
  1028.  
  1029. echo Finished successfully
  1030. :noDeploy
  1031.  
  1032.  
  1033. goto end
  1034.  
  1035. ::=============================================================================
  1036. :: Something Failed
  1037. ::=============================================================================
  1038.  
  1039. :svnUpdateFailed
  1040. call:funcReportError "%branch% SVN Update failed." %batchDir%svnUpdateError.txt
  1041. set criticalError=1
  1042. goto end
  1043.  
  1044. :buildFail
  1045. call:funcReportError "%branch% BUILD failed. (revision %SVNrevisionNo%)" %buildLog%
  1046. set criticalError=1
  1047. goto end
  1048.  
  1049. :generateShaderFail
  1050. call:funcReportError "%branch% Generate shaders failed. (revision %SVNrevisionNo%)" %batchDir%empty.txt
  1051. set criticalError=1
  1052. goto end
  1053.  
  1054. :autotestFailed
  1055. call:funcReportError "%branch% AUTOTEST failed. (revision %SVNrevisionNo%)" %batchDir%autotestResult.txt
  1056. set criticalError=1
  1057. goto end
  1058.  
  1059. :deployFail
  1060. call:funcReportError "%branch% Deployment failed. (revision %SVNrevisionNo%)" %batchDir%empty.txt
  1061. set criticalError=1
  1062. goto end
  1063.  
  1064. :protectionFailed
  1065. call:funcReportError "%branch% Protection failed." %batchDir%empty.txt
  1066. set criticalError=1
  1067. goto end
  1068.  
  1069. :signFailed
  1070. call:funcReportError "%branch% Sign failed." %batchDir%empty.txt
  1071. set criticalError=1
  1072. goto end
  1073.  
  1074.  
  1075. ::=============================================================================
  1076. :: Functions
  1077. ::=============================================================================
  1078.  
  1079. ::-----------------------------------------------------------------------------
  1080. :: Report error to NG
  1081. :: %1 message
  1082. :: %2 error log file
  1083. :funcReportError
  1084. if [%wantSendToNG%]==[1] call %SendToNG% %1 %2
  1085. echo Finished - %1
  1086. goto:eof
  1087.  
  1088. ::-----------------------------------------------------------------------------
  1089. :: Generate one build preset for incredibuild
  1090. :: We can't use SETLOCAL because we want to change global variables
  1091. :funcGenerateBuildPreset
  1092. set buildIBPreset=!buildIBPreset!       ^<Configuration Name=%1^>!LineFeed!
  1093. set buildIBPreset=!buildIBPreset!!buildIBCfgProjectInfo!
  1094. set buildIBPreset=!buildIBPreset!!buildIBLibProjectInfo!
  1095. set buildIBPreset=!buildIBPreset!!buildIBUnitTestProjectInfo!
  1096. set buildIBPreset=!buildIBPreset!       ^</Configuration^>!LineFeed!
  1097. :: Clear Cfg and UnitTest so we build it only once
  1098. set buildIBCfgProjectInfo=
  1099. set buildIBUnitTestProjectInfo=
  1100. goto:eof
  1101.  
  1102. ::-----------------------------------------------------------------------------
  1103. :: Build one configuration
  1104. :: %1 Version of application for echo
  1105. :: %2 Build configuration
  1106. :: %3 Full path to exe backup directory
  1107. :: %4 Name of application (without .exe)
  1108. :funcBuildConfiguration
  1109. SETLOCAL
  1110. set infoName=%1
  1111. set buildCfg=%2
  1112. set exebackupFullPath=%3
  1113. set outputBuildName=%4
  1114. echo *** Building !infoName! version...
  1115. if [!buildWithIncrediBuild!]==[0] (
  1116.     !devenv! !Arma3sln! /build !buildCfg! /Out "!buildLog!"
  1117. ) else (
  1118.     !incredibuild! !Arma3sln! !rebuild! /cfg=!buildCfg! /log="!buildLog!"
  1119. )
  1120. echo errorlevel %errorlevel%
  1121. if errorlevel 1 goto buildFail
  1122. echo Build of !infoName! version finished successfully
  1123.  
  1124. call:funcGenerateBinCfg
  1125.  
  1126. :: Generate shaders and export java interface
  1127. if not [!outputBuildName!]==[] (
  1128.     call:funcGenerateShaders !outputBuildName!
  1129. ) else (
  1130.     :: We don't want any shaders in server configuration
  1131.   del /q /f !buildDir!bin\*.shdc 2>nul
  1132. )
  1133.  
  1134. call:funcCreateBinPbo !exebackupFullPath!
  1135.  
  1136. ENDLOCAL
  1137. goto:eof
  1138.  
  1139. ::-----------------------------------------------------------------------------
  1140. :: Protect file by steam
  1141. :: %1 Full path to .exe which should be protected
  1142. :: %2 Steam AppId
  1143. :funcProtectSteam
  1144. SETLOCAL
  1145. set fullPathExeName=%1
  1146. set steamAppId=%2
  1147. echo Steam protection !fullPathExeName! version...
  1148. !steamDrmTool! -remotedrm !fullPathExeName! !steamAppId! 38
  1149. echo errorlevel %errorlevel%
  1150. if errorlevel 1 goto protectionFailed
  1151. ENDLOCAL
  1152. goto:eof
  1153.  
  1154. ::-----------------------------------------------------------------------------
  1155. :: Sign app .exe
  1156. :: %1 Name of application (without .exe)
  1157. :funcSignAppExe
  1158. SETLOCAL
  1159. set outputBuildName=%1
  1160. cmd /c call !signTool! !buildDir!!outputBuildName!.exe
  1161. if errorlevel 1 goto signFailed
  1162. ENDLOCAL
  1163. goto:eof
  1164.  
  1165. ::-----------------------------------------------------------------------------
  1166. :: Backup executable (.exe, .map, .pdb) and rename .exe
  1167. :: %1 Name of application after build (without .exe)
  1168. :: %2 Final name of application (without .exe)
  1169. :: %3 Full path to exe backup directory
  1170. :funcBackupExeMapPdb
  1171. SETLOCAL
  1172. set outputBuildName=%1
  1173. set outputAppName=%2
  1174. set exebackupFullPath=%3
  1175. copy !buildDir!!outputBuildName!.exe !exebackupFullPath! /y
  1176. copy !buildDir!!outputBuildName!.map !exebackupFullPath! /y
  1177. copy !buildDir!!outputBuildName!.pdb !exebackupFullPath! /y
  1178.  
  1179. if not [!outputAppName!]==[!outputBuildName!] (
  1180.     del /q !exebackupFullPath!\!outputAppName!.exe 2>nul
  1181.     ren !exebackupFullPath!\!outputBuildName!.exe !outputAppName!.exe
  1182. )
  1183. ENDLOCAL
  1184. goto:eof
  1185.  
  1186. ::-----------------------------------------------------------------------------
  1187. :: Do autotest mission
  1188. :: %autotestName% name of autotest
  1189. :: %lastErrorLevel% if not 0, log last rpt lines
  1190. :funcCreateAutotestInfo
  1191. if exist %debugLogPath% (
  1192.     echo. >> %batchDir%autotestInfo.txt
  1193.     echo %autotestName% info: >> %batchDir%autotestInfo.txt
  1194.     echo =============================================================================== >> %batchDir%autotestInfo.txt
  1195.     %perl% %bedarDir%deriveAutotestInfo.pl %debugLogPath% %batchDir%autotestInfo.txt
  1196.     echo. >> %batchDir%autotestInfo2.txt
  1197.     echo %autotestName% slow frames >> %batchDir%autotestInfo2.txt
  1198.     echo =============================================================================== >> %batchDir%autotestInfo2.txt
  1199.     %perl% %bedarDir%autotestresult\at-info.pl %debugLogPath% 1>> %batchDir%autotestInfo2.txt 2>&1
  1200. )
  1201. goto:eof
  1202.  
  1203.  
  1204. ::-----------------------------------------------------------------------------
  1205. :: Copy crash logs
  1206. :: %1 output dir name
  1207. :funcCopyCrashLogs
  1208. set logsDir=%logsDstFullPath%\%1
  1209. md %logsDir%
  1210. echo +++ Copy logs to %logsDir%
  1211. copy %rptLogPath% %logsDir% /y
  1212. copy %debugLogPath% %logsDir% /y
  1213. copy %minidump% %logsDir% /y
  1214. goto:eof
  1215.  
  1216.  
  1217. ::-----------------------------------------------------------------------------
  1218. :: Copy crash logs
  1219. :: %1 output dir name
  1220. :funcCopySteamBetaCrashLogs
  1221. set logsDir=%logsDstFullPath%\%1
  1222. md %logsDir%
  1223. echo +++ Copy logs to %logsDir%
  1224. copy %rptSteamBetaLogPath% %logsDir% /y
  1225. copy %minidumpSteamBeta% %logsDir% /y
  1226. goto:eof
  1227.  
  1228.  
  1229. ::-----------------------------------------------------------------------------
  1230. :: Send one file to WebDAV directory
  1231. :: %1 full path to file
  1232. :: %2 optional subdirectory on WebDAV
  1233. :funcSendFileToWebDAV
  1234. SETLOCAL
  1235. set curlTargetPath=%1
  1236. set curlFullFileName=%2
  1237. set curlTargetSubDirectory=
  1238. if not [%3]==[] set curlTargetSubDirectory=%3/
  1239. echo Send file !curlFullFileName! to /!curlTargetSubDirectory!
  1240. echo Send file !curlFullFileName! to /!curlTargetSubDirectory! >> !batchDir!sendInfo.txt 2>&1
  1241. !curl! -u builder:SyRpTnogD45s -k -T "!curlFullFileName!" !curlTargetPath!!curlTargetSubDirectory! 1>>!batchDir!sendInfo.txt 2>NUL
  1242. ENDLOCAL
  1243. if errorlevel 1 (
  1244.     echo Error: %errorlevel%
  1245.     set webDAVSendErrorLevel=1
  1246. )
  1247. goto:eof
  1248.  
  1249. ::-----------------------------------------------------------------------------
  1250. :: Generate shaders on given outputBuildName
  1251. :: %1 output build name
  1252. :funcGenerateShaders
  1253. SETLOCAL
  1254. set shaderExe=%1.exe
  1255. echo *** Generate shaders (!shaderExe!)
  1256. cd /d !buildDir!
  1257. del /q /f !buildDir!bin\*.shdc 2>nul
  1258. echo   ---errorlevel before generating shaders: %errorlevel%
  1259. !shaderExe! -nosplash -window -GenerateShaders -jExportInterface -noAsserts -mod=
  1260. echo   ---errorlevel after generating shaders: %errorlevel%
  1261. set shadersOK=1
  1262. if not errorlevel 1 (
  1263.     for %%I in (Bin\*.*) do (
  1264.         set file=%%~nI
  1265.         set fileSize=%%~zI
  1266.         if [!fileSize!]==[0] (
  1267.             echo !file!: file size=!fileSize!
  1268.             set shadersOK=0
  1269.         )
  1270.     )
  1271. )
  1272. ::If shaders are not ok by file size, try to generate them again
  1273. if not [!shadersOK!]==[1] (
  1274.     echo   ---errorlevel before generating shaders: %errorlevel%
  1275.     !shaderExe! -nosplash -window -GenerateShaders -jExportInterface -noAsserts -mod=
  1276.     echo   ---errorlevel after generating shaders: %errorlevel%
  1277.    
  1278.     if not errorlevel 1 (
  1279.         for %%I in (Bin\*.*) do (
  1280.             set file=%%~nI
  1281.             set fileSize=%%~zI
  1282.             if [!fileSize!]==[0] (
  1283.                 echo !file!: file size=!fileSize!
  1284.                 set shadersOK=0
  1285.                 EXIT /B 1
  1286.             )
  1287.         )
  1288.     )
  1289. )
  1290. :: If we failed then exit application
  1291. if errorlevel 1 goto generateShaderFail
  1292. ENDLOCAL
  1293. goto:eof
  1294.  
  1295. ::-----------------------------------------------------------------------------
  1296. :: Generate bin configs
  1297. :funcGenerateBinCfg
  1298. SETLOCAL
  1299. if [!Binarize!]==[1] (
  1300.     echo *** Binarize configs...
  1301.     cd /d !buildDir!
  1302.     cd bin
  1303.     if exist config.cpp (
  1304.         b:\cfgconvert\cfgConvert -bin -dst config.bin config.cpp
  1305.     )
  1306.     del /q /f !buildDir!bin\*.?pp 2>nul
  1307.     del /q /f !buildDir!bin\*.h 2>nul
  1308. )
  1309. ENDLOCAL
  1310. goto:eof
  1311.  
  1312. ::-----------------------------------------------------------------------------
  1313. :: Generate bin.pbo and copy into backup directory
  1314. :: %1 Full path to exe backup directory
  1315. :funcCreateBinPbo
  1316. SETLOCAL
  1317. set exebackupFullPath=%1
  1318. if [!Binarize!]==[1] (
  1319.     echo *** Create the PBO...
  1320.     del /q /f !buildDir!bin.pbo* 2>nul
  1321.     b:\filebank\filebank -exclude b:\FileBank\exclude.lst -property prefix=bin !buildDir!bin
  1322.     b:\security\dsSignFile.exe b:\security\a3demo.biprivatekey !buildDir!bin.pbo
  1323.  
  1324.     echo +++ Copy bin.pbo to backup directory
  1325.     copy !buildDir!bin.pbo* !exeBackupFullPath! /y
  1326. )
  1327. ENDLOCAL
  1328. goto:eof
  1329.  
  1330. ::-----------------------------------------------------------------------------
  1331. :: Copy Dta directory into output directory
  1332. :: %1 Output directory
  1333. :: %2 Product bin directory
  1334. :: %3 Full path to exe backup directory
  1335. :funcDeployDtaDir
  1336. SETLOCAL
  1337. set outputDir=%1
  1338. set productBinDir=%2
  1339. set exebackupFullPath=%3
  1340. xcopy !autotestDir!\Dta\*.* !outputDir!\Dta\ /y
  1341. xcopy !productBinDir!product.bin !outputDir!\Dta\ /y
  1342. if [!Binarize!]==[1] xcopy !exebackupFullPath!\bin.pbo* !outputDir!\Dta /y
  1343. ENDLOCAL
  1344. goto:eof
  1345.  
  1346. ::-----------------------------------------------------------------------------
  1347. :: Copy JNIScripting and jre dirs to output dir
  1348. :: %1 Output directory
  1349. :funcDeployJNI
  1350. SETLOCAL
  1351. set outputDir=%1
  1352. xcopy /s !autotestDir!\JNIScripting\*.* !outputDir!\JNIScripting\ /y
  1353. xcopy !autotestDir!\jre\lib\ext\JNIScripting.jar !outputDir!\jre\lib\ext\ /y
  1354. ENDLOCAL
  1355. goto:eof
  1356.  
  1357. ::-----------------------------------------------------------------------------
  1358. :: Deploy executable (.exe, .map, .pdb) and rename all of them to final name
  1359. :: %1 Output directory
  1360. :: %2 Name of application after build (without .exe)
  1361. :: %3 Final name of application (without .exe)
  1362. :funcDeployExeMapPdb
  1363. SETLOCAL
  1364. set outputDir=%1
  1365. set outputBuildName=%2
  1366. set outputAppName=%3
  1367. if [!autotestErrorLevel!]==[0] (
  1368.     echo +++ Copy exe to !outputDir!...
  1369.     copy !buildDir!!outputBuildName!.exe !outputDir! /y
  1370.     copy !buildDir!!outputBuildName!.map !outputDir! /y
  1371.     copy !buildDir!!outputBuildName!.pdb !outputDir! /y
  1372.    
  1373.     if not [!outputAppName!]==[!outputBuildName!] (
  1374.         del /q !outputDir!!outputAppName!.exe 2>nul
  1375.         del /q !outputDir!!outputAppName!.map 2>nul
  1376.         del /q !outputDir!!outputAppName!.pdb 2>nul
  1377.         ren !outputDir!!outputBuildName!.exe !outputAppName!.exe
  1378.         ren !outputDir!!outputBuildName!.map !outputAppName!.map
  1379.         ren !outputDir!!outputBuildName!.pdb !outputAppName!.pdb
  1380.     )
  1381. )
  1382. ENDLOCAL
  1383. goto:eof
  1384.  
  1385. ::-----------------------------------------------------------------------------
  1386. :: Sets the errorlevel and stops the batch immediately (Only use this at the end of script)!
  1387. :: %1 errorlevel to end application with
  1388. :haltProgram
  1389. call :__SetErrorLevel %1
  1390. call :__ErrorExit 2>nul
  1391. goto:eof
  1392.  
  1393. ::-----------------------------------------------------------------------------
  1394. :: Sets the errorlevel of the appliacation
  1395. :: %1 errorlevel to end application with
  1396. :__SetErrorLevel
  1397. exit /b %1
  1398. goto :eof
  1399.  
  1400. ::-----------------------------------------------------------------------------
  1401. :: Creates a syntax error, stops immediately (Don't use this anywhere!)
  1402. :__ErrorExit
  1403. ()
  1404. goto :eof
  1405.  
  1406. ::=============================================================================
  1407. :: End of building script
  1408. ::=============================================================================
  1409. :end
  1410.  
  1411. ::=============================================================================
  1412. :: Backup scripts
  1413. ::=============================================================================
  1414. cd /d c:\Bis
  1415. set destDir=\\velryba\futura\backup
  1416. if not exist %destDir% md %destDir%
  1417. robocopy Build %destDir%\Build *.* /NP /MIR > nul
  1418. robocopy Bedar %destDir%\Bedar *.* /NP /MIR > nul
  1419. echo =====================================================================
  1420. echo SERVER BUILD FUTURA ENDED.
  1421. echo =====================================================================
  1422. if [!criticalError!]==[1] call:haltProgram %errorlevel%
  1423. ENDLOCAL
  1424. exit /B 0
Advertisement
Add Comment
Please, Sign In to add comment