[tbb-commits] [builders/tor-browser-build] 07/10: Bug 40500: Include windows-installer in projects/browser/windows-installer
gitolite role
git at cupani.torproject.org
Fri Jul 15 09:04:40 UTC 2022
This is an automated email from the git hooks/post-receive script.
boklm pushed a commit to branch master
in repository builders/tor-browser-build.
commit 26589e02687b427fd7b4421b3b48b2aa6105afed
Author: Nicolas Vigier <boklm at torproject.org>
AuthorDate: Tue Jun 14 16:29:46 2022 +0200
Bug 40500: Include windows-installer in projects/browser/windows-installer
We stop using https://github.com/moba/tbb-windows-installer.git for the
windows-installer files. Instead we put them in
projects/browser/windows-installer.
We use the files from commit aef57fc044a3321da47e8e79d1397e72c5609077
(tag v0.5) from tbb-windows-installer.git.
---
keyring/tbb-windows-installer.gpg | Bin 7231 -> 0 bytes
projects/browser/build | 7 +-
projects/browser/config | 3 +-
projects/browser/windows-installer/torbrowser.ico | Bin 0 -> 23934 bytes
projects/browser/windows-installer/torbrowser.nsi | 185 ++++++++++++++++++++++
projects/tbb-windows-installer/build | 8 -
projects/tbb-windows-installer/config | 7 -
7 files changed, 189 insertions(+), 21 deletions(-)
diff --git a/keyring/tbb-windows-installer.gpg b/keyring/tbb-windows-installer.gpg
deleted file mode 100644
index 343c69e..0000000
Binary files a/keyring/tbb-windows-installer.gpg and /dev/null differ
diff --git a/projects/browser/build b/projects/browser/build
index 041e5f0..750883c 100644
--- a/projects/browser/build
+++ b/projects/browser/build
@@ -234,10 +234,9 @@ popd
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/nsis') %]
export PATH="/var/tmp/dist/nsis/bin:$PATH"
- tar -C $distdir -xf $rootdir/[% c('input_files_by_name/tbb-windows-installer') %]
-
- mv ${TB_STAGE_DIR} $distdir/tbb-windows-installer/"Tor Browser"
- mv $distdir/tbb-windows-installer ${TB_STAGE_DIR}
+ mv $rootdir/windows-installer $distdir/windows-installer
+ mv ${TB_STAGE_DIR} $distdir/windows-installer/"Tor Browser"
+ mv $distdir/windows-installer ${TB_STAGE_DIR}
[% END %]
[% IF c("var/windows") %]
diff --git a/projects/browser/config b/projects/browser/config
index 9b77ebf..31e2cc1 100644
--- a/projects/browser/config
+++ b/projects/browser/config
@@ -92,8 +92,7 @@ input_files:
- project: nsis
name: nsis
enable: '[% c("var/windows") %]'
- - name: tbb-windows-installer
- project: tbb-windows-installer
+ - filename: windows-installer
enable: '[% c("var/windows") %]'
- filename: pe_checksum_fix.py
enable: '[% c("var/windows") %]'
diff --git a/projects/browser/windows-installer/torbrowser.ico b/projects/browser/windows-installer/torbrowser.ico
new file mode 100644
index 0000000..cce2759
Binary files /dev/null and b/projects/browser/windows-installer/torbrowser.ico differ
diff --git a/projects/browser/windows-installer/torbrowser.nsi b/projects/browser/windows-installer/torbrowser.nsi
new file mode 100644
index 0000000..9fe4851
--- /dev/null
+++ b/projects/browser/windows-installer/torbrowser.nsi
@@ -0,0 +1,185 @@
+;NSIS Installer for Tor Browser Bundle
+;Written by Moritz Bartl
+;released under Public Domain
+
+;--------------------------------
+;Modern" UI
+
+ !include "MUI2.nsh"
+ !include "LogicLib.nsh"
+ !include "WinVer.nsh"
+
+;--------------------------------
+;General
+
+ ; location of Tor Browser bundle to put into installer
+ !define TBBSOURCE ".\Tor Browser\"
+
+ Name "Tor Browser"
+ OutFile "torbrowser-install.exe"
+
+ ;Default installation folder
+ InstallDir "$DESKTOP\Tor Browser"
+
+ ;Best (but slowest) compression
+ SetCompressor /SOLID lzma
+ SetCompressorDictSize 32
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel user
+
+;--------------------------------
+;Interface Configuration
+
+ !define MUI_ICON "torbrowser.ico"
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Modern UI settings
+ !define MUI_FINISHPAGE_NOREBOOTSUPPORT ; we don't require a reboot
+ !define MUI_FINISHPAGE_RUN
+ !define MUI_FINISHPAGE_RUN_FUNCTION "StartTorBrowser"
+ !define MUI_FINISHPAGE_SHOWREADME ; misuse for option to create shortcut; less ugly than MUI_PAGE_COMPONENTS
+ !define MUI_FINISHPAGE_SHOWREADME_TEXT "&Add Start Menu && Desktop shortcuts"
+ !define MUI_FINISHPAGE_SHOWREADME_FUNCTION "CreateShortCuts"
+;--------------------------------
+;Pages
+
+ !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckIfTargetDirectoryExists
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English" ;first language is the default language
+ !insertmacro MUI_LANGUAGE "French"
+ !insertmacro MUI_LANGUAGE "German"
+ !insertmacro MUI_LANGUAGE "Spanish"
+ !insertmacro MUI_LANGUAGE "SpanishInternational"
+ !insertmacro MUI_LANGUAGE "SimpChinese"
+ !insertmacro MUI_LANGUAGE "TradChinese"
+ !insertmacro MUI_LANGUAGE "Japanese"
+ !insertmacro MUI_LANGUAGE "Korean"
+ !insertmacro MUI_LANGUAGE "Italian"
+ !insertmacro MUI_LANGUAGE "Dutch"
+ !insertmacro MUI_LANGUAGE "Danish"
+ !insertmacro MUI_LANGUAGE "Swedish"
+ !insertmacro MUI_LANGUAGE "Norwegian"
+ !insertmacro MUI_LANGUAGE "NorwegianNynorsk"
+ !insertmacro MUI_LANGUAGE "Finnish"
+ !insertmacro MUI_LANGUAGE "Greek"
+ !insertmacro MUI_LANGUAGE "Russian"
+ !insertmacro MUI_LANGUAGE "Portuguese"
+ !insertmacro MUI_LANGUAGE "PortugueseBR"
+ !insertmacro MUI_LANGUAGE "Polish"
+ !insertmacro MUI_LANGUAGE "Ukrainian"
+ !insertmacro MUI_LANGUAGE "Czech"
+ !insertmacro MUI_LANGUAGE "Slovak"
+ !insertmacro MUI_LANGUAGE "Croatian"
+ !insertmacro MUI_LANGUAGE "Bulgarian"
+ !insertmacro MUI_LANGUAGE "Hungarian"
+ !insertmacro MUI_LANGUAGE "Thai"
+ !insertmacro MUI_LANGUAGE "Romanian"
+ !insertmacro MUI_LANGUAGE "Latvian"
+ !insertmacro MUI_LANGUAGE "Macedonian"
+ !insertmacro MUI_LANGUAGE "Estonian"
+ !insertmacro MUI_LANGUAGE "Turkish"
+ !insertmacro MUI_LANGUAGE "Lithuanian"
+ !insertmacro MUI_LANGUAGE "Slovenian"
+ !insertmacro MUI_LANGUAGE "Serbian"
+ !insertmacro MUI_LANGUAGE "SerbianLatin"
+ !insertmacro MUI_LANGUAGE "Arabic"
+ !insertmacro MUI_LANGUAGE "Farsi"
+ !insertmacro MUI_LANGUAGE "Hebrew"
+ !insertmacro MUI_LANGUAGE "Indonesian"
+ !insertmacro MUI_LANGUAGE "Mongolian"
+ !insertmacro MUI_LANGUAGE "Luxembourgish"
+ !insertmacro MUI_LANGUAGE "Albanian"
+ !insertmacro MUI_LANGUAGE "Breton"
+ !insertmacro MUI_LANGUAGE "Belarusian"
+ !insertmacro MUI_LANGUAGE "Icelandic"
+ !insertmacro MUI_LANGUAGE "Malay"
+ !insertmacro MUI_LANGUAGE "Bosnian"
+ !insertmacro MUI_LANGUAGE "Kurdish"
+ !insertmacro MUI_LANGUAGE "Irish"
+ !insertmacro MUI_LANGUAGE "Uzbek"
+ !insertmacro MUI_LANGUAGE "Galician"
+ !insertmacro MUI_LANGUAGE "Afrikaans"
+ !insertmacro MUI_LANGUAGE "Catalan"
+ !insertmacro MUI_LANGUAGE "Esperanto"
+
+;--------------------------------
+;Multi Language support: Read strings from separate file
+
+; !include torbrowser-langstrings.nsi
+
+;--------------------------------
+;Reserve Files
+
+ ;If you are using solid compression, files that are required before
+ ;the actual installation should be stored first in the data block,
+ ;because this will make your installer start faster.
+
+ !insertmacro MUI_RESERVEFILE_LANGDLL
+
+;--------------------------------
+;Installer Sections
+
+Section "Tor Browser Bundle" SecTBB
+
+ SetOutPath "$INSTDIR"
+ File /r "${TBBSOURCE}\*.*"
+ SetOutPath "$INSTDIR\Browser"
+ CreateShortCut "$INSTDIR\Start Tor Browser.lnk" "$INSTDIR\Browser\firefox.exe"
+
+SectionEnd
+
+Function CreateShortcuts
+
+ CreateShortCut "$SMPROGRAMS\Start Tor Browser.lnk" "$INSTDIR\Browser\firefox.exe"
+ CreateShortCut "$DESKTOP\Start Tor Browser.lnk" "$INSTDIR\Browser\firefox.exe"
+
+FunctionEnd
+;--------------------------------
+;Installer Functions
+
+Function .onInit
+
+ ${IfNot} ${AtLeastWin7}
+ MessageBox MB_USERICON|MB_OK "Tor Browser requires at least Windows 7"
+ SetErrorLevel 1
+ Quit
+ ${EndIf}
+
+ ; Don't install on systems that don't support SSE2. The parameter value of
+ ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
+ ; SSE2 instruction set is available.
+ System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
+
+ ${If} "$R7" == "0"
+ MessageBox MB_OK|MB_ICONSTOP "Sorry, Tor Browser can't be installed. This version of Tor Browser requires a processor with SSE2 support."
+ Abort
+ ${EndIf}
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+FunctionEnd
+
+;--------------------------------
+;Helper Functions
+
+Function CheckIfTargetDirectoryExists
+${If} ${FileExists} "$INSTDIR\*.*"
+ MessageBox MB_YESNO "The destination directory already exists. You can try to upgrade the Tor Browser Bundle, but if you run into any problems, use a new directory instead. Continue?" IDYES NoAbort
+ Abort
+ NoAbort:
+${EndIf}
+FunctionEnd
+
+
+Function StartTorBrowser
+ExecShell "open" "$INSTDIR/Start Tor Browser.lnk"
+FunctionEnd
+
diff --git a/projects/tbb-windows-installer/build b/projects/tbb-windows-installer/build
deleted file mode 100644
index ac0f21b..0000000
--- a/projects/tbb-windows-installer/build
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-[% c("var/set_default_env") -%]
-tar xf [% project %]-[% c("version") %].tar.gz
-mv [% project %]-[% c("version") %] [% project %]
-[% c('tar', {
- tar_src => [ project ],
- tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
- }) %]
diff --git a/projects/tbb-windows-installer/config b/projects/tbb-windows-installer/config
deleted file mode 100644
index a990229..0000000
--- a/projects/tbb-windows-installer/config
+++ /dev/null
@@ -1,7 +0,0 @@
-# vim: filetype=yaml sw=2
-version: 0.5
-git_url: https://github.com/moba/tbb-windows-installer.git
-git_hash: 'v[% c("version") %]'
-tag_gpg_id: 1
-gpg_keyring: tbb-windows-installer.gpg
-filename: '[% project %]-src-[% c("version") %]-[% c("var/build_id") %].tar.gz'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the tbb-commits
mailing list