[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-messenger-build/master] Create full mar files



commit a0b2e732c6e9fb7e5ee75bf762df1dd009797b1f
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date:   Sat Nov 5 02:09:26 2016 +0100

    Create full mar files
---
 projects/tor-messenger/build     | 26 +++++++++++++++++++++-----
 projects/tor-messenger/build.osx | 16 +++++++++++++---
 projects/tor-messenger/config    |  5 +++++
 3 files changed, 39 insertions(+), 8 deletions(-)

diff --git a/projects/tor-messenger/build b/projects/tor-messenger/build
index 688c932..1415f22 100755
--- a/projects/tor-messenger/build
+++ b/projects/tor-messenger/build
@@ -1,6 +1,10 @@
 #!/bin/sh
 set -e
 
+mkdir -p /var/tmp/dist
+7z x -o/var/tmp/dist [% c('input_files_by_name/instantbird') %]/mar-tools-*.zip
+MARTOOLS=/var/tmp/dist/mar-tools
+
 [% IF c("var/osx");
      INCLUDE build.osx;
      STOP;
@@ -86,10 +90,23 @@ mv Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-browser_en-US/
 cp Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-browser_en-US/Browser/TorBrowser/Data/Tor/* Browser/TorBrowser/Data/Tor/
 
 rm -Rf Browser/TorBrowser/Data/Browser/profile.default/extensions/tor-browser_en-US
+
+# Recreate precomplete file (needs to be accurate for full MAR updates).
+cd Browser
+rm -f precomplete
+python $MARTOOLS/createprecomplete.py
+cd ..
+
 cd ..
 
 mv bundle tor-messenger
-mkdir -p '[% dest_dir _ "/" _ c("filename") %]'
+OUTDIR='[% dest_dir _ "/" _ c("filename") %]'
+mkdir -p $OUTDIR
+MAR_FILE=tor-messenger-[% c("var/mar_osname") %]-[% c("version") %]_en-US.mar
+MAR=$MARTOOLS/mar MBSDIFF=$MARTOOLS/mbsdiff[% IF c("var/windows") %].exe[% END %] \
+    $MARTOOLS/make_full_update.sh \
+    -q $OUTDIR/$MAR_FILE tor-messenger/Browser
+
 [% IF c('var/windows') -%]
 makensis tor-messenger.nsi
 
@@ -107,12 +124,11 @@ mv tor-messenger-install.exe tor-messenger-install-tmp.exe
 python pe_checksum_fix.py
 mv tor-messenger-install-tmp2.exe tor-messenger-install.exe
 rm tor-messenger-install-tmp.exe
-mv tor-messenger-install.exe [% dest_dir _ '/' _ c('filename') _ '/' _ c('var/bundle_filename') %]
+mv tor-messenger-install.exe $OUTDIR/[% c('var/bundle_filename') %]
 [% ELSE -%]
 [% c('tar', {
         tar_src => [ 'tor-messenger' ],
-        tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename')
-                        _ '/' _ c('var/bundle_filename'),
+        tar_args => '-cJf $OUTDIR/' _ c('var/bundle_filename'),
         }) %]
 [% END -%]
-mv -f [% c('input_files_by_name/instantbird') %]/mar-tools-*.zip [% dest_dir _ '/' _ c('filename') %]
+mv -f [% c('input_files_by_name/instantbird') %]/mar-tools-*.zip $OUTDIR/
diff --git a/projects/tor-messenger/build.osx b/projects/tor-messenger/build.osx
index 99cde39..2c65e3f 100755
--- a/projects/tor-messenger/build.osx
+++ b/projects/tor-messenger/build.osx
@@ -55,6 +55,12 @@ cp $rootdir/background.png .background/
 cp $rootdir/DS_Store .DS_Store
 ln -s /Applications/ .
 
+# Recreate precomplete file (needs to be accurate for full MAR updates).
+cd TorMessenger.app/Contents/Resources
+rm -f precomplete
+python $MARTOOLS/createprecomplete.py
+cd ../../..
+
 find . -executable -exec chmod 755 {} \;
 find . ! -executable -exec chmod 644 {} \;
 find . -type f | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" > ../filelist.txt
@@ -62,6 +68,10 @@ find . -type l | sed -e 's/^\.\///' | sort | xargs -i echo "{}={}" >> ../filelis
 
 mkisofs -D -V "Tor Messenger" -no-pad -R -apple -o ../TorMessenger-uncompressed.dmg -path-list ../filelist.txt -graft-points -gid 20 -dir-mode 0755 -new-dir-mode 0755
 cd ..
-mkdir -p '[% dest_dir _ "/" _ c("filename") %]'
-dmg dmg TorMessenger-uncompressed.dmg [% dest_dir _ '/' _ c('filename') _ '/' _ c('var/bundle_filename') %]
-mv -f [% c('input_files_by_name/instantbird') %]/mar-tools-*.zip [% dest_dir _ '/' _ c('filename') %]
+OUTDIR='[% dest_dir _ "/" _ c("filename") %]'
+mkdir -p $OUTDIR
+dmg dmg TorMessenger-uncompressed.dmg $OUTDIR/[% c('var/bundle_filename') %]
+mv -f [% c('input_files_by_name/instantbird') %]/mar-tools-*.zip $OUTDIR
+MAR_FILE=tor-messenger-[% c("var/mar_osname") %]-[% c("version") %]_en-US.mar
+MAR=$MARTOOLS/mar MBSDIFF=$MARTOOLS/mbsdiff $MARTOOLS/make_full_update.sh \
+    -q $OUTDIR/$MAR_FILE dmg/TorMessenger.app
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index 0b861ce..73d8cfa 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -50,11 +50,13 @@ var:
   deps:
     - p7zip-full
     - bzip2
+    - python
 targets:
   windows-i686:
     distribution: Ubuntu-14.10
     var:
       bundle_filename: 'tormessenger-install-[% c("version") %]_en-US.exe'
+      mar_osname: win32
       arch_deps:
         - nsis
         - python
@@ -64,12 +66,15 @@ targets:
     distribution: Ubuntu-12.04
     var:
       bundle_filename: 'TorMessenger-[% c("version") %]-osx64_en-US.dmg'
+      mar_osname: osx64
       arch_deps:
         - genisoimage
         - bsdtar
   linux-i686:
     var:
       bundle_filename: 'tor-messenger-linux32-[% c("version") %]_en-US.tar.xz'
+      mar_osname: linux32
   linux-x86_64:
     var:
       bundle_filename: 'tor-messenger-linux64-[% c("version") %]_en-US.tar.xz'
+      mar_osname: linux64

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits