Software Update:HowToManuallyGenerateMARFiles
How To Manually Generate a MAR file
Here are my notes for generating your own partial and complete mars for testing purposes.
Important Note: this is is not how the official mars are created, this is just how (as a developer), you can generate mars for testing software update.
Getting set up
- scripts live in mozilla/tools/update-packaging
- will need mbsdiff.exe (source in mozilla/other-licenses/bsdiff) and mar.exe (source in mozilla/modules/libmar/tool) in your path
- get a mar to start with as your "source", for example http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/firefox-3.0a2pre.en-US.win32.complete.mar
Unwrap the original mar
- mkdir old && cd old && unwrap_full_update.sh firefox-3.0a2pre.en-US.win32.complete.mar
- mkdir new && cd new && unwrap_full_update.sh firefox-3.0a2pre.en-US.win32.complete.mar
Make Changes =
- make changes to the files in the "new" directory.
Create the partial mar
- ./make_incremental_update.sh partial.mar old new
- for your update snippet, do:
- ls -al partial.mar | awk '{print $5}'
- md5sum partial.mar | awk '{print $1}'
<patch type="partial" URL="http://foo.bar.com/partial.mar" hashFunction="MD5" hashValue="5b2469c51c585eed802a1d9eb7e22f8c" size="785"/>
Create the partial mar
- ./make_full_update.sh complete.mar new
- for your update snippet, do:
- ls -al complete.mar | awk '{print $5}'
- md5sum complete.mar | awk '{print $1}'
<patch type="complete" URL="http://foo.bar.com/complete.mar" hashFunction="MD5" hashValue="8181bb3967aa4c04905e432d29aa5091" size="8258749"/>