Pier Angelo Vendrame pushed to branch main at The Tor Project / Applications / tor-browser-build

Commits:

17 changed files:

Changes:

  • projects/browser/Bundle-Data/BaseBrowser.dmg/alpha.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/BaseBrowser.dmg/nightly.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/BaseBrowser.dmg/.DS_Storeprojects/browser/Bundle-Data/BaseBrowser.dmg/release.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/MullvadBrowser.dmg/alpha.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/MullvadBrowser.dmg/nightly.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/MullvadBrowser.dmg/.DS_Storeprojects/browser/Bundle-Data/MullvadBrowser.dmg/release.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/TorBrowser.dmg/alpha.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/TorBrowser.dmg/nightly.DS_Store
    No preview for this file type
  • projects/browser/Bundle-Data/TorBrowser.dmg/.DS_Storeprojects/browser/Bundle-Data/TorBrowser.dmg/release.DS_Store
    No preview for this file type
  • projects/browser/RelativeLink/start-browser.desktop
    ... ... @@ -31,4 +31,4 @@ Categories=Network;WebBrowser;Security;
    31 31
     Exec=sh -c '"$(dirname "$*")"/Browser/start-[% c("var/project-name") %]  --detach || ([ ! -x "$(dirname "$*")"/Browser/start-[% c("var/project-name") %] ] && "$(dirname "$*")"/start-[% c("var/project-name") %] --detach)' dummy %k
    
    32 32
     X-[% c("var/ProjectName") %]-ExecShell=./Browser/start-[% c("var/project-name") %] --detach
    
    33 33
     Icon=web-browser
    
    34
    -StartupWMClass=[% c("var/Project_Name_Channel") %]
    34
    +StartupWMClass=[% c("var/display_name") %]

  • projects/browser/build
    ... ... @@ -20,9 +20,9 @@ GENERATEDPREFSPATH=$rootdir/Bundle-Data/generated-prefs.js
    20 20
     touch "$GENERATEDPREFSPATH"
    
    21 21
     
    
    22 22
     [% IF c("var/macos") %]
    
    23
    -  TBDIR="$TB_STAGE_DIR/[% c("var/Project_Name") %].app"
    
    23
    +  TBDIR="$TB_STAGE_DIR/[% c('var/display_name') %].app"
    
    24 24
       [% IF c("var/macos_universal") %]
    
    25
    -    TBDIR_AARCH64="$TB_STAGE_DIR/[% c("var/Project_Name") %]-aarch64.app"
    
    25
    +    TBDIR_AARCH64="$TB_STAGE_DIR/[% c('var/display_name') %]-aarch64.app"
    
    26 26
         TBDIRS=("$TBDIR" "$TBDIR_AARCH64")
    
    27 27
       [% ELSE -%]
    
    28 28
         TBDIRS=("$TBDIR")
    
    ... ... @@ -175,7 +175,7 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.[%
    175 175
     [% IF c("var/macos_universal") -%]
    
    176 176
       # Use symlink in tmp dir to extract "Tor Browser.app" to "Tor Browser-aarch64.app"
    
    177 177
       ff_aarch64=$(mktemp -d)
    
    178
    -  ln -s "$TBDIR_AARCH64" "$ff_aarch64/[% c("var/Project_Name") %].app"
    
    178
    +  ln -s "$TBDIR_AARCH64" "$ff_aarch64/[% c('var/display_name') %].app"
    
    179 179
       tar -C $ff_aarch64 -xf [% c('input_files_by_name/firefox-aarch64') %]/browser.tar.[% c("compress_tar") %]
    
    180 180
     [% END %]
    
    181 181
     
    
    ... ... @@ -216,6 +216,10 @@ tar -C ${TB_STAGE_DIR} -xf [% c('input_files_by_name/firefox') %]/browser.tar.[%
    216 216
     
    
    217 217
     [% IF c("var/macos") %]
    
    218 218
       tar -C "Bundle-Data/[% c('var/ProjectName') %].dmg" -c . | tar -C $TB_STAGE_DIR -x
    
    219
    +  pushd $TB_STAGE_DIR
    
    220
    +  cp [% c('var/channel') %].DS_Store .DS_Store
    
    221
    +  rm *.DS_Store
    
    222
    +  popd
    
    219 223
     [% END %]
    
    220 224
     
    
    221 225
     for tbdir in "${TBDIRS[@]}"
    
    ... ... @@ -353,7 +357,7 @@ done
    353 357
     [% IF c("var/windows") %]
    
    354 358
       TBDIR="$distdir/$PKG_DIR/[% c("var/Project_Name") %]/Browser"
    
    355 359
     [% ELSIF c("var/macos") %]
    
    356
    -  TBDIR="$distdir/$PKG_DIR/[% c("var/Project_Name") %].app"
    
    360
    +  TBDIR="$distdir/$PKG_DIR/[% c('var/display_name') %].app"
    
    357 361
     [% ELSE %]
    
    358 362
       TBDIR="$distdir/$PKG_DIR/Browser"
    
    359 363
     [% END %]
    

  • projects/browser/ddmg.sh
    ... ... @@ -21,7 +21,7 @@ directories=\$(find "\$src_dir" -type d | wc -l)
    21 21
     # Give some room to breathe
    
    22 22
     size=\$(echo \$((\$fileblocks + \$directories)) | awk '{print int(\$1 * 1.1)}')
    
    23 23
     dd if=/dev/zero of="\$hfsfile" bs=4096 count=\$size
    
    24
    -newfs_hfs -v "[% c("var/Project_Name") %]" "\$hfsfile"
    
    24
    +newfs_hfs -v "[% c('var/display_name') %]" "\$hfsfile"
    
    25 25
     
    
    26 26
     pushd [% src %]
    
    27 27
     
    

  • projects/firefox/build
    ... ... @@ -185,13 +185,14 @@ echo "Starting ./mach build $(date)"
    185 185
     [% IF c("var/macos") -%]
    
    186 186
       cp -a obj-*/dist/[% c('var/exe_name') %]/* $distdir
    
    187 187
       [% IF c("var/base-browser") -%]
    
    188
    -    mv "$distdir/Firefox.app" "$distdir/[% c('var/Project_Name') %].app"
    
    188
    +    mv "$distdir/Firefox.app" "$distdir/[% c('var/display_name') %].app"
    
    189 189
       [% END -%]
    
    190
    +  app_bundle="[% c('var/display_name') %]"
    
    190 191
       # Remove firefox-bin (we don't use it, see ticket #10126)
    
    191
    -  rm -f "$distdir/[% c('var/Project_Name') %].app/Contents/MacOS/[% c('var/exe_name') %]-bin"
    
    192
    +  rm -f "$distdir/$app_bundle/Contents/MacOS/[% c('var/exe_name') %]-bin"
    
    192 193
     
    
    193 194
       # Adjust the Info.plist file
    
    194
    -  INFO_PLIST="$distdir/[% c('var/Project_Name') %].app/Contents/Info.plist"
    
    195
    +  INFO_PLIST="$distdir/$app_bundle/Contents/Info.plist"
    
    195 196
       python3 $rootdir/fix-info-plist.py \
    
    196 197
         "$INFO_PLIST" \
    
    197 198
         '[% c("var/Project_Name") %]' \
    
    ... ... @@ -297,13 +298,13 @@ cd $distdir
    297 298
       [% c("var/rezip", { rezip_file => 'Browser/omni.ja' }) %]
    
    298 299
       [% c("var/rezip", { rezip_file => 'Browser/browser/omni.ja' }) %]
    
    299 300
     [% ELSIF c("var/macos") -%]
    
    300
    -  [% c("var/rezip", { rezip_file => '"' _ c("var/Project_Name") _ '.app/Contents/Resources/omni.ja"' }) %]
    
    301
    -  [% c("var/rezip", { rezip_file => '"' _ c("var/Project_Name") _ '.app/Contents/Resources/browser/omni.ja"' }) %]
    
    301
    +  [% c("var/rezip", { rezip_file => '"$app_bundle/Contents/Resources/omni.ja"' }) %]
    
    302
    +  [% c("var/rezip", { rezip_file => '"$app_bundle/Contents/Resources/browser/omni.ja"' }) %]
    
    302 303
     [% END -%]
    
    303 304
     
    
    304 305
     [%
    
    305 306
     IF c("var/macos");
    
    306
    -  SET browserdir='"' _ c("var/Project_Name") _ '.app/Contents"';
    
    307
    +  SET browserdir='"$app_bundle/Contents"';
    
    307 308
     ELSE;
    
    308 309
       SET browserdir='Browser';
    
    309 310
     END;
    

  • projects/firefox/mozconfig
    ... ... @@ -79,7 +79,7 @@ ac_add_options --[% IF c("var/updater_enabled") %]enable[% ELSE %]disable[% END
    79 79
     
    
    80 80
     mk_add_options MOZ_PARALLEL_BUILD=[% c("num_procs") %]
    
    81 81
     
    
    82
    -export MOZ_APP_REMOTINGNAME="[% c('var/Project_Name_Channel') %]"
    
    82
    +export MOZ_APP_REMOTINGNAME="[% c('var/display_name') %]"
    
    83 83
     
    
    84 84
     export MOZ_INCLUDE_SOURCE_INFO=1
    
    85 85
     export MOZ_SOURCE_REPO="[% c('var/gitlab_project') %]"
    

  • rbm.conf
    ... ... @@ -110,6 +110,7 @@ var:
    110 110
         [% c(step, { filename => 'f', output_dir => '/out', norec => {} }) %]
    
    111 111
     
    
    112 112
       Project_Name_Channel: '[% c("var/Project_Name") %] [% c("var/channel") FILTER ucfirst %]'
    
    113
    +  display_name: '[% c("var/Project_Name_Channel") %]'
    
    113 114
       exe_name: firefox
    
    114 115
       locale_ja: ja
    
    115 116
       # When adding new languages, add the equivalent NSIS name to
    
    ... ... @@ -235,7 +236,7 @@ targets:
    235 236
         var:
    
    236 237
           release: 1
    
    237 238
           channel: release
    
    238
    -      Project_Name_Channel: '[% c("var/Project_Name") %]'
    
    239
    +      display_name: '[% c("var/Project_Name") %]'
    
    239 240
       alpha:
    
    240 241
         var:
    
    241 242
           alpha: 1
    

  • tools/signing/functions
    ... ... @@ -39,8 +39,9 @@ function generate_config {
    39 39
       p1=$("$rbm" showconf browser var/project-name --target "$SIGNING_PROJECTNAME")
    
    40 40
       p2=$("$rbm" showconf browser var/Project_Name --target "$SIGNING_PROJECTNAME")
    
    41 41
       p3=$("$rbm" showconf browser var/ProjectName --target "$SIGNING_PROJECTNAME")
    
    42
    +  p4=$("$rbm" showconf browser var/display_name --target "$SIGNING_PROJECTNAME")
    
    42 43
       echo 'rbm_not_available=1' > "$script_dir/set-config.generated-config"
    
    43
    -  echo "SIGNING_PROJECTNAMES=(\"$p1\" \"$p2\" \"$p3\")" >> "$script_dir/set-config.generated-config"
    
    44
    +  echo "SIGNING_PROJECTNAMES=(\"$p1\" \"$p2\" \"$p3\" \"$p4\")" >> "$script_dir/set-config.generated-config"
    
    44 45
     }
    
    45 46
     
    
    46 47
     function project-name {
    
    ... ... @@ -67,4 +68,13 @@ function ProjectName {
    67 68
        fi
    
    68 69
     }
    
    69 70
     
    
    71
    +function display_name {
    
    72
    +   if test -n "${rbm_not_available+x}"; then
    
    73
    +     echo "${SIGNING_PROJECTNAMES[3]}"
    
    74
    +   else
    
    75
    +     "$rbm" showconf browser var/display_name --target "$SIGNING_PROJECTNAME"
    
    76
    +   fi
    
    77
    +}
    
    78
    +
    
    79
    +
    
    70 80
     . "$script_dir/set-config"

  • tools/signing/gatekeeper-bundling.sh
    ... ... @@ -55,6 +55,7 @@ test -f "$hfstools_file" || \
    55 55
     ProjName=$(ProjectName)
    
    56 56
     Proj_Name=$(Project_Name)
    
    57 57
     proj_name=$(project-name)
    
    58
    +disp_name=$(display_name)
    
    58 59
     
    
    59 60
     test -d "$macos_signed_dir" || mkdir "$macos_signed_dir"
    
    60 61
     tmpdir="$macos_stapled_dir/tmp"
    
    ... ... @@ -71,8 +72,8 @@ cd $tmpdir/dmg
    71 72
     tar -xf $macos_stapled_dir/"${proj_name}-${tbb_version}-notarized+stapled.tar.zst"
    
    72 73
     
    
    73 74
     cd ..
    
    74
    -$script_dir/ddmg.sh $macos_signed_dir/${proj_name}-macos-${tbb_version}.dmg $tmpdir/dmg/ "$Proj_Name"
    
    75
    -rm -rf "dmg/$Proj_Name.app"
    
    75
    +$script_dir/ddmg.sh $macos_signed_dir/${proj_name}-macos-${tbb_version}.dmg $tmpdir/dmg/ "$disp_name"
    
    76
    +rm -rf "dmg/$disp_name.app"
    
    76 77
     rm -Rf "$tmpdir"
    
    77 78
     
    
    78 79
     # move the signed+stapled dmgs to expected output directory for publishing and mar generation