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

[tor-commits] [tor-messenger-build/master] Fix Windows bundling



commit 081611cf716d56a663891fe7adc2fa99b59e78ed
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date:   Fri Mar 6 14:18:43 2015 +0100

    Fix Windows bundling
---
 projects/tor-browser/config  |    8 +++++++-
 projects/tor-messenger/build |   13 ++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/projects/tor-browser/config b/projects/tor-browser/config
index 32b02c6..f995b72 100644
--- a/projects/tor-browser/config
+++ b/projects/tor-browser/config
@@ -1,6 +1,6 @@
 # vim: filetype=yaml
 version: 4.0.4
-filename: 'tor-browser-[% c("version") %]-[% c("var/osname") %].tar.xz'
+filename: 'tor-browser-[% c("version") %]-[% c("var/osname") %].[% c("var/extension") %]'
 
 input_files:
  - URL: "[% c('var/base_url') %]/tor-browser-[% c('var/tb_osname') %]-[% c('version') %]_en-US.tar.xz"
@@ -14,6 +14,9 @@ input_files:
        windows-i686:
            URL: "[% c('var/base_url') %]/torbrowser-install-[% c('version') %]_en-US.exe"
 
+var:
+  extension: 'tar.xz'
+
 targets:
   linux-x86_64:
     var:
@@ -21,3 +24,6 @@ targets:
   linux-i686:
     var:
        tb_osname: linux32
+  windows-i686:
+    var:
+       extension: 'exe'
diff --git a/projects/tor-messenger/build b/projects/tor-messenger/build
index 157efbd..0ec8302 100644
--- a/projects/tor-messenger/build
+++ b/projects/tor-messenger/build
@@ -1,8 +1,14 @@
 #!/bin/sh
 set -e
 
-mkdir -p bundle/Messenger/
+mkdir bundle
+[% IF c("var/windows") -%]
+unzip -d bundle [% c('input_files_by_name/instantbird') %]
+mv bundle/instantbird bundle/Messenger
+[% ELSE -%]
+mkdir bundle/Messenger
 tar xf [% c('input_files_by_name/instantbird') %] -C bundle/Messenger --strip 1
+[% END -%]
 
 [% IF c("var/linux") %]
 tar xf [% c('input_files_by_name/gcc') %]
@@ -18,7 +24,12 @@ mv ctypes-otr* 'ctypes-otr@tormessenger'
 mkdir tor-launcher@xxxxxxxxxxxxxx
 unzip -q ../../../[% c('input_files_by_name/tor-launcher') %] -d tor-launcher@xxxxxxxxxxxxxx
 mkdir -p tor-launcher@xxxxxxxxxxxxxx/TorBrowser/Data
+[% IF ("var/windows") -%]
+7z x ../../../[% c('input_files_by_name/tor-browser') %]
+mv \$_OUTDIR tor-browser_en-US
+[% ELSE -%]
 tar xf ../../../[% c('input_files_by_name/tor-browser') %]
+[% END -%]
 sed -i 's/^SocksPort .*/SocksPort 9152/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults
 sed -i 's/^ControlPort .*/ControlPort 9153/' tor-browser_en-US/Browser/TorBrowser/Data/Tor/torrc-defaults
 mv tor-browser_en-US/Browser/TorBrowser/Tor tor-launcher@xxxxxxxxxxxxxx/TorBrowser/Tor



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