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

[tor-commits] [tor-messenger-build/master] Build 64bit Tor Messenger for Windows



commit 78bf2fd72676ca92fecfc464fb2bf494cbe19126
Author: Sukhbir Singh <sukhbir@xxxxxxxxxxxxxx>
Date:   Mon Jan 29 17:11:31 2018 -0500

    Build 64bit Tor Messenger for Windows
    
    Inspired by #20636, build the 64bit version of Tor Messenger
---
 Makefile                                      |  5 ++-
 projects/ctypes-otr/config                    |  2 +-
 projects/instantbird/config                   |  4 +++
 projects/instantbird/mozconfig-windows-x86_64 | 10 ++++++
 projects/libgpg-error/config                  |  2 +-
 projects/libotr/config                        |  7 +++--
 projects/mozilla/STL_win64.patch              | 24 ++++++++++++++
 projects/mozilla/config                       |  2 ++
 projects/tor-browser/config                   |  2 +-
 projects/tor-messenger/config                 | 18 +++++++----
 rbm                                           |  2 +-
 rbm.conf                                      | 45 ++++++++++++++++++++-------
 tor-browser-build                             |  2 +-
 13 files changed, 99 insertions(+), 26 deletions(-)

diff --git a/Makefile b/Makefile
index cdef67c..699ff19 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ rbm=./rbm/rbm
 
 all: tor-messenger
 
-tor-messenger: tor-messenger-linux-x86_64 tor-messenger-linux-i686 tor-messenger-windows-i686 tor-messenger-osx-x86_64
+tor-messenger: tor-messenger-linux-x86_64 tor-messenger-linux-i686 tor-messenger-windows-i686 tor-messenger-windows-x86_64 tor-messenger-osx-x86_64
 
 tor-messenger-release: submodule-update
 	$(rbm) build tor-messenger-release --target tormessenger-all
@@ -18,6 +18,9 @@ tor-messenger-linux-i686: submodule-update
 tor-messenger-windows-i686: submodule-update
 	$(rbm) build tor-messenger --target tor-messenger --target tormessenger-windows-i686
 
+tor-messenger-windows-x86_64: submodule-update
+	$(rbm) build tor-messenger --target tor-messenger --target tormessenger-windows-x86_64
+
 tor-messenger-osx-x86_64: submodule-update
 	$(rbm) build tor-messenger --target tor-messenger --target tormessenger-osx-x86_64
 
diff --git a/projects/ctypes-otr/config b/projects/ctypes-otr/config
index a3feb2a..0642a5b 100644
--- a/projects/ctypes-otr/config
+++ b/projects/ctypes-otr/config
@@ -10,7 +10,7 @@ filename: 'ctypes-otr-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_i
 var:
   lib_glob: 'lib/*.so*'
 targets:
-  windows-i686:
+  windows:
     var:
       lib_glob: 'bin/*.dll'
   osx-x86_64:
diff --git a/projects/instantbird/config b/projects/instantbird/config
index 446330c..1ab021a 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -21,6 +21,10 @@ targets:
     var:
       martools_filename: mar-tools-win32.zip
       archive_suffix: zip
+  windows-x86_64:
+    var:
+      martools_filename: mar-tools-win64.zip
+      archive_suffix: zip
   linux:
     var:
       arch_deps:
diff --git a/projects/instantbird/mozconfig-windows-x86_64 b/projects/instantbird/mozconfig-windows-x86_64
new file mode 100644
index 0000000..a8fbcc3
--- /dev/null
+++ b/projects/instantbird/mozconfig-windows-x86_64
@@ -0,0 +1,10 @@
+export CROSS_COMPILE=1
+
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-mingw
+
+ac_add_options --target=x86_64-w64-mingw32
+ac_add_options --with-toolchain-prefix=x86_64-w64-mingw32-
+
+ac_add_options --enable-default-toolkit=cairo-windows
+ac_add_options --enable-strip
+ac_add_options --disable-sandbox
diff --git a/projects/libgpg-error/config b/projects/libgpg-error/config
index a815397..512f5a8 100644
--- a/projects/libgpg-error/config
+++ b/projects/libgpg-error/config
@@ -9,7 +9,7 @@ var:
   container:
       use_container: 1
 targets:
-  windows-i686:
+  windows:
     var:
       arch_deps:
         - gettext
diff --git a/projects/libotr/config b/projects/libotr/config
index 12cf34b..6a76aec 100644
--- a/projects/libotr/config
+++ b/projects/libotr/config
@@ -10,13 +10,16 @@ var:
   container:
     use_container: 1
 targets:
-  windows-i686:
+  windows:
     var:
       arch_deps:
         - gettext
-      configure_opt: '--host=i686-w64-mingw32 CFLAGS="[% c("var/CFLAGS_otr") %]" LDFLAGS="[% c("var/LDFLAGS_otr") %]" CC="i686-w64-mingw32-gcc -static-libgcc"'
+      configure_opt: '--host=[% c("arch") %]-w64-mingw32 CFLAGS="[% c("var/CFLAGS_otr") %]" LDFLAGS="[% c("var/LDFLAGS_otr") %]"'
       CFLAGS_otr: '[% c("var/CFLAGS") %] -Wl,-Bstatic,-L/var/tmp/dist/libgcrypt/lib,-lgcrypt,-L/var/tmp/dist/libgpg-error/lib,-lgpg-error,-Bdynamic'
       LDFLAGS_otr: '[% c("var/LDFLAGS") %] -Wl,-Bstatic,-L/var/tmp/dist/libgcrypt/lib,-lgcrypt,-L/var/tmp/dist/libgpg-error/lib,-lgpg-error,-Bdynamic'
+      flag_mwindows: '-mwindows'
+      compiler: mingw-w64
+
   osx-x86_64:
     var:
       arch_deps:
diff --git a/projects/mozilla/STL_win64.patch b/projects/mozilla/STL_win64.patch
new file mode 100644
index 0000000..e528905
--- /dev/null
+++ b/projects/mozilla/STL_win64.patch
@@ -0,0 +1,24 @@
+From 8f8c1a1069d4907d3cedae578975225d8caeecaf Mon Sep 17 00:00:00 2001
+From: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
+Date: Sat, 12 Aug 2017 22:00:13 +0200
+Subject: [PATCH] Bug 23231: disable STL Wrappers on Windows
+
+Workaround for:
+https://bugzilla.mozilla.org/show_bug.cgi?id=1392604
+---
+ old-configure.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/old-configure.in b/old-configure.in
+index f5a2f05..e247551 100644
+--- a/old-configure.in
++++ b/old-configure.in
+@@ -1338,7 +1338,7 @@ MOZ_CXX11
+ AC_LANG_C
+ 
+ case "${OS_TARGET}" in
+-Darwin)
++WINNT|Darwin)
+   ;;
+ *)
+   STL_FLAGS="-I${DIST}/stl_wrappers"
diff --git a/projects/mozilla/config b/projects/mozilla/config
index 39a2f81..f3c4234 100644
--- a/projects/mozilla/config
+++ b/projects/mozilla/config
@@ -11,3 +11,5 @@ input_files:
   - filename: 0003-OSX-package-as-tar.bz2.patch
   - filename: 0004-Updater-fixups-for-TM.patch
   - filename: 0005-Permit-storing-exceptions-even-w-inPrivateBrowsingMo.patch
+  - filename: STL_win64.patch
+    enable: '[% c("var/windows-x86_64") %]'
diff --git a/projects/tor-browser/config b/projects/tor-browser/config
index 56c4171..949b048 100644
--- a/projects/tor-browser/config
+++ b/projects/tor-browser/config
@@ -11,7 +11,7 @@ input_files:
     var:
       base_url: "https://dist.torproject.org/torbrowser/[% c('version') %]"
     targets:
-      windows-i686:
+      windows:
         URL: "[% c('var/base_url') %]/torbrowser-install-[% c('version') %]_en-US.exe"
       osx-x86_64:
         URL: "[% c('var/base_url') %]/TorBrowser-[% c('version') %]-osx64_en-US.dmg"
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index 92fc588..61b439a 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -41,6 +41,8 @@ input_files:
     enable: '[% c("var/osx") %]'
   - project: nsis
     name: nsis
+    target:
+      - tormessenger-windows-i686
     enable: '[% c("var/windows") %]'
   - URL: https://people.torproject.org/~mikeperry/mirrors/sources/msvcr100.dll
     sha256sum: 1221a09484964a6f38af5e34ee292b9afefccb3dc6e55435fd3aaf7c235d9067
@@ -55,16 +57,20 @@ var:
   container:
     use_container: 1
 targets:
+  windows:
+    var:
+      arch_deps:
+        - python-pefile
   windows-i686:
     var:
       bundle_filename: 'tormessenger-install-[% c("version") %]_en-US.exe'
       mar_osname: win32
-      arch_deps:
-        - nsis
-        - python
-        - python-dev
-        - build-essential
-        - python-pefile
+  windows-x86_64:
+    var:
+      bundle_filename: 'tormessenger-install-[% c("version") %]_en-US.exe'
+      mar_osname: win64
+      container:
+        arch: i386
   osx-x86_64:
     var:
       bundle_filename: 'TorMessenger-[% c("version") %]-osx64_en-US.dmg'
diff --git a/rbm b/rbm
index 5c89374..b83c74c 160000
--- a/rbm
+++ b/rbm
@@ -1 +1 @@
-Subproject commit 5c89374df7957238a9565c0b938ee3f30f880438
+Subproject commit b83c74ca4b91732f64011f0255a1594f7747b340
diff --git a/rbm.conf b/rbm.conf
index 74af21e..886d777 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -11,7 +11,7 @@ pkg_type: build
 # When adding a new option to buildconf, a default value should be defined
 # in var/build_id, so that changing this option does not affect the build_id.
 buildconf:
-  num_procs: '[% GET ENV.RBM_NUM_PROCS ? ENV.RBM_NUM_PROCS : "8" %]'
+  num_procs: '[% GET ENV.RBM_NUM_PROCS ? ENV.RBM_NUM_PROCS : "2" %]'
 
 var:
   tormessenger_version: '0.6.0b1'
@@ -24,7 +24,7 @@ var:
   # in the same order. In the cases where the installation order is
   # important, sort_deps should be set to 0.
   sort_deps: 1
-  build_id: '[% sha256(c("var/build_id_txt", { buildconf => { num_procs => 8 } })).substr(0, 6) %]'
+  build_id: '[% sha256(c("var/build_id_txt", { buildconf => { num_procs => 2 } })).substr(0, 6) %]'
   build_id_txt: |
     [% c("version") %]
     [% IF c("git_hash") || c("hg_hash"); GET c("abbrev"); END; %]
@@ -121,18 +121,46 @@ targets:
         - zip
         - unzip
 
+  tormessenger-windows-x86_64:
+    - windows-x86_64
+    - windows
+    - tor-messenger
+
   tormessenger-windows-i686:
     - windows-i686
+    - windows
     - tor-messenger
+
+  windows-x86_64:
+    arch: x86_64
+    var:
+      windows-x86_64: 1
+      osname: windows-x86_64
+      container:
+        arch: amd64
+      faketime_path: /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1
+
   windows-i686:
     arch: i686
     var:
-      windows: 1
+      windows-i686: 1
       osname: windows-i686
       container:
-        suite: precise
         arch: i386
-      configure_opt: '--host=i686-w64-mingw32 CFLAGS="[% c("var/CFLAGS") %]" LDFLAGS="[% c("var/LDFLAGS") %]"'
+      faketime_path: /usr/lib/i386-linux-gnu/faketime/libfaketime.so.1
+      setarch: |
+        if test -z "$RBM_SETARCH"
+        then
+           export RBM_SETARCH=1
+           exec setarch i686 ./build
+        fi
+
+  windows:
+    var:
+      windows: 1
+      container:
+        suite: jessie
+      configure_opt: '--host=[% c("arch") %]-w64-mingw32 CFLAGS="[% c("var/CFLAGS") %]" LDFLAGS="[% c("var/LDFLAGS") %]"'
       CFLAGS: '[% c("var/flag_mwindows") %] -fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security'
       LDFLAGS: '[% c("var/flag_mwindows") %] -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -lssp -L$gcclibs'
       flag_mwindows: '-mwindows'
@@ -145,13 +173,6 @@ targets:
         - libtool
         - zip
         - unzip
-      faketime_path: /usr/lib/faketime/libfaketime.so.1
-      setarch: |
-        if test -z "$RBM_SETARCH"
-        then
-           export RBM_SETARCH=1
-           exec setarch i686 ./build
-        fi
 
   tormessenger-osx-x86_64:
     - osx-x86_64
diff --git a/tor-browser-build b/tor-browser-build
index d2dee35..62ee652 160000
--- a/tor-browser-build
+++ b/tor-browser-build
@@ -1 +1 @@
-Subproject commit d2dee352354ee77cd26ac37bef41322df2729ff8
+Subproject commit 62ee652c588858ded1aa02261510f1c05234795a

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