Patch #2452 2008-04-29 11:47

rhf

Speedup 'update.bat'
Download
2452-Speedup_update.patch (8.7 KB)
Category
 
Status
Accepted
Close date
2008-05-24 12:07
Assigned to
biplab
Index: update.bat
===================================================================
--- update.bat    (revision 5024)
+++ update.bat    (working copy)
@@ -36,67 +36,67 @@
 set ZIPCMD=zip
 
 echo Packing core UI resources
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\resources.zip src\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\manager_resources.zip sdk\resources\*.xrc sdk\resources\images\*.png > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\start_here.zip src\resources\start_here\*.* > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\resources.zip src\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\manager_resources.zip sdk\resources\*.xrc sdk\resources\images\*.png > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\start_here.zip src\resources\start_here\*.* > nul
 echo Packing plugins UI resources
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\astyle.zip plugins\astyle\resources\manifest.xml plugins\astyle\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\autosave.zip plugins\autosave\manifest.xml plugins\autosave\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\classwizard.zip plugins\classwizard\resources\manifest.xml plugins\classwizard\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\codecompletion.zip plugins\codecompletion\resources\manifest.xml plugins\codecompletion\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\compiler.zip plugins\compilergcc\resources\manifest.xml plugins\compilergcc\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\debugger.zip plugins\debuggergdb\resources\manifest.xml plugins\debuggergdb\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\defaultmimehandler.zip plugins\defaultmimehandler\resources\manifest.xml plugins\defaultmimehandler\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\openfileslist.zip plugins\openfileslist\manifest.xml > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\projectsimporter.zip plugins\projectsimporter\resources\manifest.xml plugins\projectsimporter\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\scriptedwizard.zip plugins\scriptedwizard\resources\manifest.xml > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\todo.zip plugins\todo\resources\manifest.xml plugins\todo\resources\*.xrc > nul
-%ZIPCMD% -j9 %CB_DEVEL_RESDIR%\xpmanifest.zip plugins\xpmanifest\manifest.xml > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\astyle.zip plugins\astyle\resources\manifest.xml plugins\astyle\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\autosave.zip plugins\autosave\manifest.xml plugins\autosave\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\classwizard.zip plugins\classwizard\resources\manifest.xml plugins\classwizard\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\codecompletion.zip plugins\codecompletion\resources\manifest.xml plugins\codecompletion\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\compiler.zip plugins\compilergcc\resources\manifest.xml plugins\compilergcc\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\debugger.zip plugins\debuggergdb\resources\manifest.xml plugins\debuggergdb\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\defaultmimehandler.zip plugins\defaultmimehandler\resources\manifest.xml plugins\defaultmimehandler\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\openfileslist.zip plugins\openfileslist\manifest.xml > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\projectsimporter.zip plugins\projectsimporter\resources\manifest.xml plugins\projectsimporter\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\scriptedwizard.zip plugins\scriptedwizard\resources\manifest.xml > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\todo.zip plugins\todo\resources\manifest.xml plugins\todo\resources\*.xrc > nul
+%ZIPCMD% -ju9 %CB_DEVEL_RESDIR%\xpmanifest.zip plugins\xpmanifest\manifest.xml > nul
 echo Packing core UI bitmaps
 cd src\resources
-%ZIPCMD% -0 -q ..\..\%CB_DEVEL_RESDIR%\resources.zip images\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\resources.zip images\*.png images\16x16\*.png > nul
 cd ..\..\sdk\resources
-%ZIPCMD% -0 -q ..\..\%CB_DEVEL_RESDIR%\manager_resources.zip images\*.png > nul
+%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\manager_resources.zip images\*.png > nul
 echo Packing plugins UI bitmaps
 cd ..\..\plugins\compilergcc\resources
-%ZIPCMD% -0 -q ..\..\..\%CB_DEVEL_RESDIR%\compiler.zip images\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\compiler.zip images\*.png images\16x16\*.png > nul
 cd ..\..\..\plugins\debuggergdb\resources
-%ZIPCMD% -0 -q ..\..\..\%CB_DEVEL_RESDIR%\debugger.zip images\*.png images\16x16\*.png > nul
+%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\debugger.zip images\*.png images\16x16\*.png > nul
 cd ..\..\..
 
 echo Copying external exception handler
-copy /y setup\exchndl.dll output > nul
-copy /y setup\exchndl.dll devel > nul
+xcopy /D /y setup\exchndl.dll output > nul
+xcopy /D /y setup\exchndl.dll devel > nul
 echo Copying files
-copy /y %CB_DEVEL_RESDIR%\*.zip %CB_OUTPUT_RESDIR% > nul
-copy /y sdk\resources\lexers\lexer_* %CB_DEVEL_RESDIR%\lexers > nul
-copy /y sdk\resources
download for full patch...
rhf 2008-04-29 12:00

Apparently, I did not include the patch in the initial try. so I'll try again.

This patch speeds up "update.bat" by eliminating the unnecessary copying of unchanged files. The option /u was added to every zip command; the copy commands were changed to xcopy and the /D option was added to every xcopy command.

I have used this for about a month and everything seems to work. Probably similar mods could speed up the 'update' script as well.

rhf 2008-05-01 16:41

The original patch file did not have the Index: line.

I am not sure if it is necessary but am uploading a revised patch which may work better.