Windows build scriptFrom MozillaZine Knowledge BaseThis page is part of the extension development documentation project. Ask your questions in MozillaZine Forums. Also try browsing example code. Note: development documentation is in process of being moved to Mozilla Development Center (MDC). These scripts can be used to build XPI packages for extensions automatically in Windows environment. See also bash build script. [edit] Using 7-zip
Here’s what you need to do:
set x=extension_name xcopy %x% build /i /e xcopy build\content build\chrome\content /i /e xcopy build\locale build\chrome\locale /i /e xcopy build\skin build\chrome\skin /i /e rmdir /s /q build\content rmdir /s /q build\locale rmdir /s /q build\skin cd build\chrome 7z a -tzip "%x%.jar" * -r -mx=0 cd ..\.. rmdir /s /q build\chrome\content rmdir /s /q build\chrome\locale rmdir /s /q build\chrome\skin replace chrome.manifest build cd build 7z a -tzip "%x%.xpi" * -r -mx=9 cd .. move build\%x%.xpi %x%.xpi rmdir /s /q build
del build\*.scc /a:-d /s /f
some_directory/
build.bat
chrome.manifest (The one you want packaged)
extension_name/
chrome.manifest
install.rdf
components/
defaults/
preferences/
mydefaults.js
content/
overlay.js
overlay.xul
locale/
en-US/
overlay.dtd
skin/
overlay.css
[edit] Using WinRARAlternative Winrar version of the above script
set x=%cd% md build\chrome cd chrome winrar.exe a -r -ibck -m0 -afzip -n@"..\list.txt" "%x%.jar" move "%x%.jar" "..\build\chrome\" cd .. copy install.rdf build cd build winrar.exe a -s -ibck -r -m5 -afzip "%x%.xpi" move "%x%.xpi" ..\ cd .. rd build /s/q
*.rdf *.js *.properties *.xul *.dtd *.png *.css
|
|