Patch #2563 2008-09-17 11:23
techtonik
use 7-zip for packing resources- Download
- 2563-use_7_zip_for.patch (5.2 KB)
- Category
- Status
- Rejected
- Close date
- 2012-10-23 07:00
- Assigned to
- mortenmacfly
Using local proxy and standalone bzr
=== modified file 'src/update.bat'
--- src/update.bat 2008-09-17 10:32:35 +0000
+++ src/update.bat 2008-09-18 10:50:52 +0000
@@ -33,35 +33,58 @@
if not exist %CB_DEVEL_RESDIR%\templates\wizard md %CB_DEVEL_RESDIR%\templates\wizard\
if not exist %CB_DEVEL_RESDIR%\scripts md %CB_DEVEL_RESDIR%\scripts\
-set ZIPCMD=zip
-
+
+rem Test if 7-Zip is accessible
+7z 2>nul >nul
+if %ERRORLEVEL% == 9009 goto test7za
+echo Using 7-Zip
+rem 7z adds files to archive root if relative path starts with .\
+set ZFLAT=7z u -mx=5
+set ZSTORE=7z u -mx=0
+goto pack
+
+:test7za
+7za 2>nul >nul
+if %ERRORLEVEL% == 9009 goto use_zip
+echo Using standalone 7-Zip
+set ZFLAT=7za u -mx=5
+set ZSTORE=7za u -mx=0
+goto pack
+
+:use_zip
+echo Using zip.exe
+set ZFLAT=zip -ju9
+set ZSTORE=zip -0 -qu
+
+
+:pack
echo Packing core UI resources
-%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
+%ZFLAT% %CB_DEVEL_RESDIR%\resources.zip .\src\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\manager_resources.zip .\sdk\resources\*.xrc .\sdk\resources\images\*.png > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\start_here.zip .\src\resources\start_here\*.png .\src\resources\start_here\*.ht* > nul
echo Packing plugins UI resources
-%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
+%ZFLAT% %CB_DEVEL_RESDIR%\astyle.zip .\plugins\astyle\resources\manifest.xml .\plugins\astyle\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\autosave.zip .\plugins\autosave\manifest.xml .\plugins\autosave\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\classwizard.zip .\plugins\classwizard\resources\manifest.xml .\plugins\classwizard\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\codecompletion.zip .\plugins\codecompletion\resources\manifest.xml .\plugins\codecompletion\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\compiler.zip .\plugins\compilergcc\resources\manifest.xml .\plugins\compilergcc\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\debugger.zip .\plugins\debuggergdb\resources\manifest.xml .\plugins\debuggergdb\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\defaultmimehandler.zip .\plugins\defaultmimehandler\resources\manifest.xml .\plugins\defaultmimehandler\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\openfileslist.zip .\plugins\openfileslist\manifest.xml > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\projectsimporter.zip .\plugins\projectsimporter\resources\manifest.xml .\plugins\projectsimporter\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\scriptedwizard.zip .\plugins\scriptedwizard\resources\manifest.xml > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\todo.zip .\plugins\todo\resources\manifest.xml .\plugins\todo\resources\*.xrc > nul
+%ZFLAT% %CB_DEVEL_RESDIR%\xpmanifest.zip .\plugins\xpmanifest\manifest.xml > nul
echo Packing core UI bitmaps
cd src\resources
-%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\resources.zip images\*.png images\16x16\*.png > nul
+%ZSTORE% ..\..\%CB_DEVEL_RESDIR%\resources.zip images\*.png images\16x16\*.png > nul
cd ..\..\sdk\resources
-%ZIPCMD% -0 -qu ..\..\%CB_DEVEL_RESDIR%\manager_resources.zip images\*.png > nul
+%ZSTORE% ..\..\%CB_DEVEL_RESDIR%\manager_resources.zip images\*.png > nul
echo Packing plugins UI bitmaps
cd ..\..\plugins\compilergcc\resources
-%ZIPCMD% -0 -qu ..\..\..\%CB_DEVEL_RESDIR%\compiler.zip images\*.png images\16x16\*.png > nul
+%ZSTORE% ..\..\..\%CB_DEVEL_RESDIR%\compiler.zip images\*.png images\16x16
download for full patch...
History
mortenmacfly 2012-10-23 07:00
7-zip is not available on all platforms. Sorry.