blob: 5f0ee8f300cfee17802fd80df31d5843ae80420f [file] [log] [blame]
jerrymf1579332013-02-07 01:56:28 +00001echo off
2set WINRAR="c:\Progra~1\WinRAR\WinRAR.exe"
3
4rem Update the WPILib source dir
5svn update ../WPILib/
6
7rem Come up with the name of the update
8for /F %%x in ('cscript //NoLogo helpers\updateName.vbs') do set UPDATE_NAME=%%x
9
10rem Check the update name for errors
11rem if not %UPDATE_NAME% == BadSVNSync goto continue
12rem echo WPILib is not synced properly!
13rem svnversion -n ../WPILib
14rem goto end
15rem :continue
16
17rem Rebuild WPILib
18rem pushd ..\WPILib\PPC603gnu
19rem C:\WindRiver\wrenv.exe -p vxworks-6.3 make --no-print-directory BUILD_SPEC=PPC603gnu DEBUG_MODE=1 TRACE=1 clean all
20rem popd
21
22rem Make the WorkbenchUpdate dir current
23pushd ..\WPILib\Scripts
24cmd /C CopyWPILibToUpdateDirectory.cmd
25popd
26
27rem Export the WPILib Source
28rmdir /s /q WPILib\WPILib
29del WPILib\WPILibC++Source*
30svn export ..\WPILib\ WPILib\WPILib
31
32rem Compress the source
33pushd WPILib
34%WINRAR% A -r -df WPILibC++Source%UPDATE_NAME%.zip WPILib
35popd
36
37rem Get the revision
38for /F %%x in ('svnversion -n ../WPILib') do set UPDATE_REV=%%x
39
40rem Create a project number config
41echo PROJECT_NUMBER = rev%UPDATE_REV% > Doxyfile.PROJECT_NUMBER
42
43rem Recompile the Doxygen documentation
44rmdir /s /q doxygen_output
45mkdir doxygen_output
46helpers\doxygen.exe helpers\Doxyfile > doxygen_output\build.log 2> doxygen_output\build_errors.log
47
48rem Done with the Doxyfile.PROJECT_NUMBER
49del Doxyfile.PROJECT_NUMBER
50
51rem Compile the resultant help output
52helpers\hhc doxygen_output\html\index.hhp
53
54rem Move the help to the installer path
55copy doxygen_output\html\index.chm "docs\extensions\FRC\WPILib C++ Reference.chm"
56
57rem Add the update files, but exclude the .svn and build output directories
58%WINRAR% A -r -x*\.svn\* -x*\PPC603gnu\* WorkbenchUpdate%UPDATE_NAME%.zip docs vxworks-6.3 workbench-3.0 workbench-3.3 WPILib update.cmd
59
60rem Remove the source zip file since it is already in the update.
61del WPILib\WPILibC++Source*.*
62
63rem Add the cRIO image with no compression
64%WINRAR% A -m0 WorkbenchUpdate%UPDATE_NAME%.zip FRC_20*.zip
65
66rem Start with the boiler-plate comment
67copy helpers\sfx_comment.txt sfx_comment.tmp.txt
68
69rem Append the name of this update (ends up after "Title=" in the comment)
70echo WorkbenchUpdate%UPDATE_NAME% >> sfx_comment.tmp.txt
71
72rem Add the comment to the archive
73%WINRAR% c -zsfx_comment.tmp.txt WorkbenchUpdate%UPDATE_NAME%.zip
74
75rem Done with the comment
76del sfx_comment.tmp.txt
77
78rem Make it self extracting
79%WINRAR% s -df WorkbenchUpdate%UPDATE_NAME%.zip
80echo Success!
81:end