commit e6b72c4d6dcc6efe2e39c95c873e902e2e797961 Author: Nicolas Vigier boklm@torproject.org Date: Fri Jun 26 02:44:06 2015 +0200
Add Tor Messenger OSX Build --- Makefile | 5 ++++- projects/tor-messenger/build | 5 +++++ projects/tor-messenger/build.osx | 40 ++++++++++++++++++++++++++++++++++++++ projects/tor-messenger/config | 12 ++++++++++++ 4 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile index 9fd18a8..1a86e68 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ rbm=./rbm/rbm
all: tor-messenger
-tor-messenger: submodule-update tor-messenger-linux-x86_64 tor-messenger-linux-i686 tor-messenger-windows-i686 +tor-messenger: submodule-update tor-messenger-linux-x86_64 tor-messenger-linux-i686 tor-messenger-windows-i686 tor-messenger-osx-x86_64
tor-mail: submodule-update tor-mail-linux-x86_64 tor-mail-linux-i686
@@ -15,6 +15,9 @@ tor-messenger-linux-i686: tor-messenger-windows-i686: $(rbm) build tor-messenger --target tor-messenger --target windows-i686
+tor-messenger-osx-x86_64: + $(rbm) build tor-messenger --target tor-messenger --target osx-x86_64 + tor-mail-linux-x86_64: $(rbm) build tor-mail --target tor-mail --target linux-x86_64
diff --git a/projects/tor-messenger/build b/projects/tor-messenger/build index 3830c13..b08c9f9 100644 --- a/projects/tor-messenger/build +++ b/projects/tor-messenger/build @@ -1,6 +1,11 @@ #!/bin/sh set -e
+[% IF c("var/osx"); + INCLUDE build.osx; + STOP; + END -%] + mkdir bundle [% IF c("var/windows") -%] 7z x -y -obundle [% c('input_files_by_name/instantbird') %] diff --git a/projects/tor-messenger/build.osx b/projects/tor-messenger/build.osx new file mode 100644 index 0000000..579df2a --- /dev/null +++ b/projects/tor-messenger/build.osx @@ -0,0 +1,40 @@ +#!/bin/sh +set -e +rootdir=$(pwd) +tar xf [% c('input_files_by_name/instantbird') %] +mv Instantbird.app TorMessenger.app + +tar xf [% c('input_files_by_name/libdmg') %] +export PATH="$(pwd)/libdmg-hfsplus:$PATH" + +mkdir torbrowser +cd torbrowser +mkdir tor-launcher@torproject.org +7z x -y -otor-launcher@torproject.org $rootdir/[% c('input_files_by_name/tor-launcher') %] +7z x $rootdir/[% c('input_files_by_name/tor-browser') %] +7z x '0.unknown partition' +sed -i 's/^SocksPort .*/SocksPort [% c("var/tor_socks_port") %]/' TorBrowser.app/TorBrowser/Data/Tor/torrc-defaults +sed -i 's/^ControlPort .*/ControlPort [% c("var/tor_control_port") %]/' TorBrowser.app/TorBrowser/Data/Tor/torrc-defaults +mkdir -p tor-launcher@torproject.org/TorBrowser/Data +mv TorBrowser.app/TorBrowser/Tor tor-launcher@torproject.org/TorBrowser/Tor +mv TorBrowser.app/TorBrowser/Data/Tor tor-launcher@torproject.org/TorBrowser/Data/Tor +mv tor-launcher@torproject.org $rootdir/TorMessenger.app/Contents/Resources/extensions/ +cd .. + +mkdir ctypes-otr +cd ctypes-otr +tar xf $rootdir/[% c('input_files_by_name/ctypes-otr') %] +mv ctypes-otr* $rootdir/TorMessenger.app/Contents/Resources/extensions/ctypes-otr@tormessenger +cd .. + +mkdir dmg +mv TorMessenger.app dmg +cd dmg +find $@ -executable -exec chmod 750 {} ; +find $@ ! -executable -exec chmod 640 {} ; +find . -type f | sed -e 's/^.///' | sort | xargs -i echo "{}={}" > ../filelist.txt +find . -type l | sed -e 's/^.///' | sort | xargs -i echo "{}={}" >> ../filelist.txt + +mkisofs -D -V "Tor Messenger" -no-pad -R -apple -o ../TorMessenger-uncompressed.dmg -path-list ../filelist.txt -graft-points -gid 20 -dir-mode 0750 -new-dir-mode 0750 +cd .. +dmg dmg TorMessenger-uncompressed.dmg [% dest_dir _ '/' _ c('filename') %] diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config index fa234b0..5d57004 100644 --- a/projects/tor-messenger/config +++ b/projects/tor-messenger/config @@ -18,6 +18,9 @@ input_files: enable: '[% c("var/windows") %]' - filename: tor-messenger.ico enable: '[% c("var/windows") %]' + - project: libdmg-hfsplus + name: libdmg + enable: '[% c("var/osx") %]' - project: docker-image
remote_docker: 1 @@ -40,3 +43,12 @@ targets: filename_ext: 'exe' arch_deps: - nsis + osx-x86_64: + lsb_release: + id: Ubuntu + release: 12.04 + codename: precise + var: + filename_ext: 'dmg' + arch_deps: + - genisoimage
tor-commits@lists.torproject.org