Ticket #26355: 0001-Bug-26355-Make-sure-only-Windows-users-on-Windows7-a(tbb-windows-installer).patch

File 0001-Bug-26355-Make-sure-only-Windows-users-on-Windows7-a(tbb-windows-installer).patch, 1.1 KB (added by pospeselr, 14 months ago)
  • torbrowser.nsi

    From 7f658136faddea9c360e9f0cb138ed8c037ba7b3 Mon Sep 17 00:00:00 2001
    From: Richard Pospesel <richard@torproject.org>
    Date: Thu, 21 Jun 2018 17:18:06 -0700
    Subject: [PATCH] Bug 26355: Make sure only Windows users on Windows7+ are
     trying to use Tor Browser based on ESR60 (tbb-windows-installer)
    
    Added check to NSIS installer prior to language selection requiring
    Windows 7 or later.  Aborts with user error popup if version is too
    old.  Verified builds as expected with RBM and verified behaviour in a
    Vista and Windows 7 VMs.
    ---
     torbrowser.nsi | 7 +++++++
     1 file changed, 7 insertions(+)
    
    diff --git a/torbrowser.nsi b/torbrowser.nsi
    index e1862d1..5278f1b 100644
    a b  
    66;Modern" UI
    77
    88  !include "MUI2.nsh"
     9  !include "WinVer.nsh"
    910
    1011;--------------------------------
    1112;General
    FunctionEnd 
    145146
    146147Function .onInit
    147148
     149  ${IfNot} ${AtLeastWin7}
     150    MessageBox MB_USERICON|MB_OK "Tor Browser requires at least Windows 7"
     151    SetErrorLevel 1
     152    Quit
     153  ${EndIf}
     154
    148155  !insertmacro MUI_LANGDLL_DISPLAY
    149156
    150157FunctionEnd