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