Ticket #4261: tor-browser-bundle-OSX-dmg.diff

File tor-browser-bundle-OSX-dmg.diff, 4.4 KB (added by hellais, 8 years ago)

Patch for making TBB on OS X a .dmg

  • build-scripts/osx.mk

    diff --git a/build-scripts/osx.mk b/build-scripts/osx.mk
    index 0fa0a91..b890ba2 100644
    a b  
    1515# This makes the German bundle
    1616### make -f osx.mk bundle_de
    1717# This makes the German compressed bundle
    18 ### make -f osx.mk compressed-bundle_de 
     18### make -f osx.mk compressed-bundle_de
    1919# It's possible you may also want to do:
    2020### make -f osx.mk build-all-binaries
    2121### make -f osx.mk all-compressed-bundles
    DATADIR=$(DEST)/Contents/Resources/Data 
    306306TB_TMPDIR=$(DEST)/Contents/SharedSupport
    307307
    308308## Build directory structure
    309 directory-structure: 
     309directory-structure:
    310310        rm -fr $(DEST)
    311311        mkdir -p $(APPDIR)
    312312        mkdir -p $(APPDIR)/Firefox.app/Contents/MacOS/Data/profile
    directory-structure: 
    320320
    321321## Package up all the Vidalia and Tor pre-requisites
    322322## Firefox and Pidgin are installed in their own targets
    323 install-binaries: 
     323install-binaries:
    324324        # zlib
    325325        #cp -R $(ZLIB)/libz.1.2.3.dylib $(ZLIB)/libz.1.dylib $(ZLIB)/libz.dylib $(LIBSDIR)
    326326        # Libevent
    betterprivacy.xpi: 
    419419        $(WGET) --no-check-certificate -O $@ $(BETTERPRIVACY)
    420420
    421421## NoScript development version
    422 noscript.xpi: 
     422noscript.xpi:
    423423        $(WGET) --no-check-certificate -O $@ $(NOSCRIPT)
    424424
    425425## HTTPS Everywhere
    bundle-localized_%.stamp: 
    448448
    449449bundle-localized: bundle-localized_$(LANGCODE).stamp
    450450
     451dmg-bundle-localized: bundle-localized_$(LANGCODE).stamp
     452        rm -f $(DISTDIR)/$(COMPRESSED_NAME)_$(LANGCODE).dmg
     453        ## unbzip the Template for the tbb
     454        bzip2 -d TorBundleTemplate.dmg.bz2
     455        ## Mount it to the temporary working dir
     456        hdiutil attach TorBundleTemplate.dmg -noautoopen -mountpoint $(DISTDIR)/working_dir
     457        # Remove the content of the dummy TorBrowser.app
     458        rm -f $(DISTDIR)/working_dir/TorBrowser.app/*
     459        # And copy the good one
     460        cp -R $(NAME)_$(LANGCODE).app/* $(DISTDIR)/working_dir/
     461        WC_DEV=`hdiutil info | grep working_dir | grep "Apple_HFS" | awk '{print $$1}'` && \
     462        hdiutil detach $$WC_DEV -quit -force
     463        rm -f $(DISTDIR)/workig_dir
     464        hdiutil convert TorBundleTemplate.dmg -format UDBZ -o $(DISTDIR)/$(DEFAULT_COMPRESSED_BASENAME)$(LANGCODE).dmg
     465
    451466compressed-bundle-localized: bundle-localized_$(LANGCODE).stamp
    452467        -rm -f $(DISTDIR)/$(COMPRESSED_NAME)_$(LANGCODE).zip
    453468        -mkdir $(DISTDIR)
    install-betterprivacy: betterprivacy.xpi 
    487502        mkdir -p $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/\{d40f5e7b-d2cf-4856-b441-cc613eeffbe3\}
    488503        cp betterprivacy.xpi $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/\{d40f5e7b-d2cf-4856-b441-cc613eeffbe3\}/betterprivacy.zip
    489504        (cd $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/\{d40f5e7b-d2cf-4856-b441-cc613eeffbe3\} && unzip *.zip && rm *.zip)
    490        
     505
    491506install-httpseverywhere: httpseverywhere.xpi
    492507        mkdir -p $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/https-everywhere@eff.org
    493508        cp httpseverywhere.xpi $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/https-everywhere@eff.org/httpseverywhere.zip
    494509        (cd $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/https-everywhere@eff.org && unzip *.zip && rm *.zip)
    495        
     510
    496511install-noscript: noscript.xpi
    497512        mkdir -p $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\}
    498513        cp noscript.xpi $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/\{73a6fe31-595d-460b-a920-fcc0f8843232\}/noscript.zip
    endif 
    514529
    515530patch-firefox-language:
    516531        ## Patch the default Firefox prefs.js
    517         ## Don't use {} because they aren't always interpreted correctly. Thanks, sh. 
     532        ## Don't use {} because they aren't always interpreted correctly. Thanks, sh.
    518533        cp $(CONFIG_SRC)/prefs.js $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/prefs.js
    519534        cp $(CONFIG_SRC)/bookmarks.html $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile
    520535        ./patch-firefox-language.sh $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/prefs.js $(LANGCODE) -e
    update-extension-pref: 
    524539        ext_ver=$$(sed -n '/em:version/{s,.*="\(.*\)".*,\1,p;q;}' $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/extensions/langpack-$(LANGCODE)@firefox.mozilla.org/install.rdf); \
    525540        sed -i -e "s/SHPONKA/langpack-$(LANGCODE)@firefox.mozilla.org:$$ext_ver/g" $(BUNDLE)/Library/Application\ Support/Firefox/Profiles/profile/prefs.js
    526541
    527 final: 
     542final:
    528543        mv $(BUNDLE) $(BUNDLE).app