Commit 43f7cf99 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame 🎃
Browse files

Bug 41669: Restore UglifyJS but for Android x86_64.

In 15.0 we use UglifyJS for Android x86.
We dropped it in the 16.0 series, as we do not support Android x86, but
with this commit we temporarily restore it for x86_64 to fit in the
Play Store requirements.

With Firefox 148 we might be able to use the same minifier Mozilla
uses, since they recently switched to a different one.
parent d7e795d4
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2,6 +2,12 @@
[% c("var/set_default_env") -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]

[% IF c("var/android-x86_64") -%]
  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/node') %]
  export PATH=/var/tmp/dist/node/bin:$PATH
  tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/uglifyjs') %]
[% END -%]

# Bundle our extension(s).
#
# NoScript will be copied over to the profile folder
@@ -58,6 +64,11 @@ function generate_apk {
  [% IF c("var/tor-browser") -%]
    cp -a ../moat_countries.json ../tor/pluggable_transports/pt_config.json chrome/toolkit/content/global/
  [% END -%]
  [% IF c("var/android-x86_64") -%]
    find actors chrome modules moz-src \
      -name '*.js' -or -name '*.mjs' \
      -exec /var/tmp/dist/uglifyjs/bin/uglifyjs --in-situ {} \;
  [% END -%]
  [% c('zip', {
        zip_src   => [ '.' ],
        zip_args  => '-0 ../assets/omni.ja',
+6 −0
Original line number Diff line number Diff line
@@ -158,3 +158,9 @@ input_files:
    # tor-browser-build#40920
  - filename: sort-baseline.py
    enable: '[% c("var/android") %]'
  - project: node
    name: node
    enable: '[% c("var/android-x86_64") %]'
  - project: uglifyjs
    name: uglifyjs
    enable: '[% c("var/android-x86_64") %]'
+1 −0
Original line number Diff line number Diff line
This project fetches UglifyJS without any other changes.
+4 −0
Original line number Diff line number Diff line
#!/bin/bash
tar -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
mv [% project %]-[% c('version') %] [% project %]
tar -caf [% dest_dir %]/[% c("filename") %] [% project %]
+4 −0
Original line number Diff line number Diff line
version: 3.19.3
filename: 'uglifyjs-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
git_hash: 3ea33afc72462a470466473208a33379b7204765
git_url: https://github.com/mishoo/UglifyJS.git