Ticket #21704: 0001-Tor-bug-21704-Abort-install-if-CPU-is-missing-SSE2-s.patch

File 0001-Tor-bug-21704-Abort-install-if-CPU-is-missing-SSE2-s.patch, 1.1 KB (added by boklm, 2 years ago)
  • torbrowser.nsi

    From 729bf6f9745275a23acc419d0d3adf94ab0a531f Mon Sep 17 00:00:00 2001
    From: Nicolas Vigier <boklm@torproject.org>
    Date: Fri, 2 Jun 2017 12:19:37 +0200
    Subject: [PATCH] Tor bug #21704: Abort install if CPU is missing SSE2 support
    
    ---
     torbrowser.nsi | 12 ++++++++++++
     1 file changed, 12 insertions(+)
    
    diff --git a/torbrowser.nsi b/torbrowser.nsi
    index e1862d1..8155dff 100644
    a b  
    77
    88  !include "MUI2.nsh"
    99
     10  !include "LogicLib.nsh"
     11
    1012;--------------------------------
    1113;General
    1214 
    FunctionEnd 
    145147
    146148Function .onInit
    147149
     150  ; Don't install on systems that don't support SSE2. The parameter value of
     151  ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
     152  ; SSE2 instruction set is available.
     153  System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
     154
     155  ${If} "$R7" == "0"
     156    MessageBox MB_OK|MB_ICONSTOP "Sorry, Tor Browser can't be installed. This version of Tor Browser requires a processor with SSE2 support."
     157    Abort
     158  ${EndIf}
     159
    148160  !insertmacro MUI_LANGDLL_DISPLAY
    149161
    150162FunctionEnd