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

Commits:

2 changed files:

Changes:

  • projects/browser/build
    ... ... @@ -305,11 +305,6 @@ done
    305 305
       cat > $distdir/windows-installer/browser-portable.nsi << 'BROWSER_NSI'
    
    306 306
     [% INCLUDE 'windows-installer.nsi' %]
    
    307 307
     BROWSER_NSI
    
    308
    -  [% IF c('var/mullvad-browser') -%]
    
    309
    -    cat > $distdir/windows-installer/browser-system.nsi << 'BROWSER_NSI'
    
    310
    -[% INCLUDE 'windows-installer.nsi' system_install_mode = 1 %]
    
    311
    -BROWSER_NSI
    
    312
    -  [% END -%]
    
    313 308
       mv ${TB_STAGE_DIR} $distdir/windows-installer/"[% c('var/Project_Name') %]"
    
    314 309
       mv $distdir/windows-installer ${TB_STAGE_DIR}
    
    315 310
     [% END %]
    
    ... ... @@ -389,11 +384,6 @@ cd $distdir
    389 384
       # Working around NSIS braindamage
    
    390 385
       python3 $rootdir/pe_checksum_fix.py browser-install.exe
    
    391 386
       mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-[% c("var/osname") %]-portable-[% c("var/torbrowser_version") %].exe
    
    392
    -  [% IF c('var/mullvad-browser') -%]
    
    393
    -    makensis browser-system.nsi
    
    394
    -    python3 $rootdir/pe_checksum_fix.py browser-install.exe
    
    395
    -    mv browser-install.exe $OUTDIR/[% c("var/project-name") %]-[% c("var/osname") %]-install-[% c("var/torbrowser_version") %].exe
    
    396
    -  [% END -%]
    
    397 387
       popd
    
    398 388
     [% END %]
    
    399 389
     rm -rf $distdir/${PKG_DIR}
    

  • projects/browser/windows-installer.nsi
    1
    -;NSIS Installer for Tor/Base/Mullvad Browser
    
    2
    -;Written by Moritz Bartl
    
    3
    -;released under Public Domain
    
    4
    -
    
    5
    -;--------------------------------
    
    6
    -;Modern UI
    
    7
    -
    
    8
    -  !include "FileFunc.nsh"
    
    9
    -  !include "MUI2.nsh"
    
    10
    -  !include "LogicLib.nsh"
    
    11
    -  !include "WinVer.nsh"
    
    12
    -
    
    13
    -;--------------------------------
    
    14
    -;General
    
    15
    -
    
    16
    -  ;Location of Tor/Base/Mullvad Browser to put into installer
    
    17
    -  !define PROGRAM_SOURCE ".\[% c('var/Project_Name') %]\"
    
    18
    -
    
    19
    -  Name "[% c('var/Project_Name') %]"
    
    20
    -  OutFile "browser-install.exe"
    
    21
    -
    
    22
    -  ;Default installation folder
    
    23
    -[% IF system_install_mode -%]
    
    24
    -  InstallDir "$PROGRAMFILES\[% c('var/Project_Name') %]"
    
    25
    -[% ELSE -%]
    
    26
    -  InstallDir "$DESKTOP\[% c('var/Project_Name') %]"
    
    27
    -[% END -%]
    
    28
    -
    
    29
    -  ;Best (but slowest) compression
    
    30
    -  SetCompressor /SOLID lzma
    
    31
    -  SetCompressorDictSize 32
    
    32
    -
    
    33
    -  ;Request application privileges for Windows Vista
    
    34
    -[% IF system_install_mode -%]
    
    35
    -  RequestExecutionLevel admin
    
    36
    -[% ELSE -%]
    
    37
    -  RequestExecutionLevel user
    
    38
    -[% END -%]
    
    39
    -
    
    40
    -  ;Support HiDPI displays
    
    41
    -  ManifestDPIAware true
    
    42
    -
    
    43
    -[% IF system_install_mode -%]
    
    44
    -  ;Registry keys to uninstall system-wide installs
    
    45
    -  !define UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\[% c('var/ProjectName') %]"
    
    46
    -[% END -%]
    
    47
    -
    
    48
    -;--------------------------------
    
    49
    -;Metadata
    
    50
    -
    
    51
    -  VIProductVersion "[% pc("firefox", "var/browser_series") %].0.0"
    
    52
    -  VIAddVersionKey "ProductName" "[% c('var/Project_Name') %]"
    
    53
    -  VIAddVersionKey "ProductVersion" "[% c('var/torbrowser_version') %]"
    
    54
    -  VIAddVersionKey "FileDescription" "[% c('var/Project_Name') %][% IF system_install_mode -%] System[% END -%] Installer"
    
    55
    -  VIAddVersionKey "LegalCopyright" "© [% pc("firefox", "var/copyright_year") %] [% IF c('var/mullvad-browser') -%]Mullvad, Tor Browser and Mozilla Developers[% ELSE -%]The Tor Project[% END -%]"
    
    56
    -
    
    57
    -;--------------------------------
    
    58
    -;Interface Configuration
    
    59
    -
    
    60
    -  !define MUI_ICON   "[% c('var/projectname') %][% IF !c('var/base-browser') -%]-[% c('var/channel') %][% END -%].ico"
    
    61
    -  !define MUI_ABORTWARNING
    
    62
    -
    
    63
    -;--------------------------------
    
    64
    -;Modern UI settings
    
    65
    -  !define MUI_FINISHPAGE_NOREBOOTSUPPORT     ; we don't require a reboot
    
    66
    -  !define MUI_FINISHPAGE_RUN
    
    67
    -  !define MUI_FINISHPAGE_RUN_FUNCTION "StartBrowser"
    
    68
    -  !define MUI_FINISHPAGE_SHOWREADME ; misuse for option to create shortcut; less ugly than MUI_PAGE_COMPONENTS
    
    69
    -  !define MUI_FINISHPAGE_SHOWREADME_TEXT "&Add Start Menu && Desktop shortcuts"
    
    70
    -  !define MUI_FINISHPAGE_SHOWREADME_FUNCTION "CreateShortCuts"
    
    71
    -;--------------------------------
    
    72
    -;Pages
    
    73
    -
    
    74
    -  !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckIfTargetDirectoryExists
    
    75
    -  !insertmacro MUI_PAGE_DIRECTORY
    
    76
    -  !insertmacro MUI_PAGE_INSTFILES
    
    77
    -  !insertmacro MUI_PAGE_FINISH
    
    78
    -
    
    79
    -;--------------------------------
    
    80
    -;Languages
    
    81
    -
    
    82
    -  !insertmacro MUI_LANGUAGE "English" ;first language is the default language
    
    83
    -  !insertmacro MUI_LANGUAGE "French"
    
    84
    -  !insertmacro MUI_LANGUAGE "German"
    
    85
    -  !insertmacro MUI_LANGUAGE "Spanish"
    
    86
    -  !insertmacro MUI_LANGUAGE "SpanishInternational"
    
    87
    -  !insertmacro MUI_LANGUAGE "SimpChinese"
    
    88
    -  !insertmacro MUI_LANGUAGE "TradChinese"
    
    89
    -  !insertmacro MUI_LANGUAGE "Japanese"
    
    90
    -  !insertmacro MUI_LANGUAGE "Korean"
    
    91
    -  !insertmacro MUI_LANGUAGE "Italian"
    
    92
    -  !insertmacro MUI_LANGUAGE "Dutch"
    
    93
    -  !insertmacro MUI_LANGUAGE "Danish"
    
    94
    -  !insertmacro MUI_LANGUAGE "Swedish"
    
    95
    -  !insertmacro MUI_LANGUAGE "Norwegian"
    
    96
    -  !insertmacro MUI_LANGUAGE "NorwegianNynorsk"
    
    97
    -  !insertmacro MUI_LANGUAGE "Finnish"
    
    98
    -  !insertmacro MUI_LANGUAGE "Greek"
    
    99
    -  !insertmacro MUI_LANGUAGE "Russian"
    
    100
    -  !insertmacro MUI_LANGUAGE "Portuguese"
    
    101
    -  !insertmacro MUI_LANGUAGE "PortugueseBR"
    
    102
    -  !insertmacro MUI_LANGUAGE "Polish"
    
    103
    -  !insertmacro MUI_LANGUAGE "Ukrainian"
    
    104
    -  !insertmacro MUI_LANGUAGE "Czech"
    
    105
    -  !insertmacro MUI_LANGUAGE "Slovak"
    
    106
    -  !insertmacro MUI_LANGUAGE "Croatian"
    
    107
    -  !insertmacro MUI_LANGUAGE "Bulgarian"
    
    108
    -  !insertmacro MUI_LANGUAGE "Hungarian"
    
    109
    -  !insertmacro MUI_LANGUAGE "Thai"
    
    110
    -  !insertmacro MUI_LANGUAGE "Romanian"
    
    111
    -  !insertmacro MUI_LANGUAGE "Latvian"
    
    112
    -  !insertmacro MUI_LANGUAGE "Macedonian"
    
    113
    -  !insertmacro MUI_LANGUAGE "Estonian"
    
    114
    -  !insertmacro MUI_LANGUAGE "Turkish"
    
    115
    -  !insertmacro MUI_LANGUAGE "Lithuanian"
    
    116
    -  !insertmacro MUI_LANGUAGE "Slovenian"
    
    117
    -  !insertmacro MUI_LANGUAGE "Serbian"
    
    118
    -  !insertmacro MUI_LANGUAGE "SerbianLatin"
    
    119
    -  !insertmacro MUI_LANGUAGE "Arabic"
    
    120
    -  !insertmacro MUI_LANGUAGE "Farsi"
    
    121
    -  !insertmacro MUI_LANGUAGE "Hebrew"
    
    122
    -  !insertmacro MUI_LANGUAGE "Indonesian"
    
    123
    -  !insertmacro MUI_LANGUAGE "Mongolian"
    
    124
    -  !insertmacro MUI_LANGUAGE "Luxembourgish"
    
    125
    -  !insertmacro MUI_LANGUAGE "Albanian"
    
    126
    -  !insertmacro MUI_LANGUAGE "Breton"
    
    127
    -  !insertmacro MUI_LANGUAGE "Belarusian"
    
    128
    -  !insertmacro MUI_LANGUAGE "Icelandic"
    
    129
    -  !insertmacro MUI_LANGUAGE "Malay"
    
    130
    -  !insertmacro MUI_LANGUAGE "Bosnian"
    
    131
    -  !insertmacro MUI_LANGUAGE "Kurdish"
    
    132
    -  !insertmacro MUI_LANGUAGE "Irish"
    
    133
    -  !insertmacro MUI_LANGUAGE "Uzbek"
    
    134
    -  !insertmacro MUI_LANGUAGE "Galician"
    
    135
    -  !insertmacro MUI_LANGUAGE "Afrikaans"
    
    136
    -  !insertmacro MUI_LANGUAGE "Catalan"
    
    137
    -  !insertmacro MUI_LANGUAGE "Esperanto"
    
    138
    -
    
    139
    -;--------------------------------
    
    140
    -;Multi Language support: Read strings from separate file
    
    141
    -
    
    142
    -; !include [% c('var/projectname') %]-langstrings.nsi
    
    143
    -
    
    144
    -;--------------------------------
    
    145
    -;Reserve Files
    
    146
    -
    
    147
    -  ;If you are using solid compression, files that are required before
    
    148
    -  ;the actual installation should be stored first in the data block,
    
    149
    -  ;because this will make your installer start faster.
    
    150
    -
    
    151
    -  !insertmacro MUI_RESERVEFILE_LANGDLL
    
    152
    -
    
    153
    -;--------------------------------
    
    154
    -;Installer Sections
    
    155
    -
    
    156
    -Section "[% c('var/Project_Name') %]" SecBrowser
    
    157
    -
    
    158
    -  SetOutPath "$INSTDIR"
    
    159
    -[% IF !system_install_mode -%]
    
    160
    -  File /r "${PROGRAM_SOURCE}\*.*"
    
    161
    -  CreateShortCut "$INSTDIR\Start [% c('var/Project_Name') %].lnk" "$INSTDIR\Browser\[% c('var/exe_name') %].exe"
    
    162
    -[% ELSE -%]
    
    163
    -  File /r "${PROGRAM_SOURCE}\Browser\*.*"
    
    164
    -
    
    165
    -  ;Enable system-wide install in the browser
    
    166
    -  FileOpen $0 "$INSTDIR\system-install" w
    
    167
    -  FileClose $0
    
    168
    -
    
    169
    -  ;Write the uninstaller
    
    170
    -  WriteUninstaller $INSTDIR\uninstall.exe
    
    171
    -
    
    172
    -  ;Add the uninstaller to the control panel
    
    173
    -  WriteRegStr HKLM "${UNINST_KEY}" "DisplayName" "[% c('var/Project_Name') %]"
    
    174
    -  WriteRegStr HKLM "${UNINST_KEY}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
    
    175
    -  WriteRegStr HKLM "${UNINST_KEY}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
    
    176
    -  WriteRegStr HKLM "${UNINST_KEY}" "Publisher" "[% IF c('var/mullvad-browser') -%]Mullvad VPN[% ELSE -%]The Tor Project[% END -%]"
    
    177
    -  WriteRegStr HKLM "${UNINST_KEY}" "DisplayIcon" "$\"$INSTDIR\[% c('var/exe_name') %].exe$\""
    
    178
    -  WriteRegStr HKLM "${UNINST_KEY}" "DisplayVersion" "[% c('var/torbrowser_version') %]"
    
    179
    -  WriteRegDWORD HKLM "${UNINST_KEY}" "NoModify" "1"
    
    180
    -  WriteRegDWORD HKLM "${UNINST_KEY}" "NoRepair" "1"
    
    181
    -  ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
    
    182
    -  IntFmt $0 "0x%08X" $0
    
    183
    -  WriteRegDWORD HKLM "${UNINST_KEY}" "EstimatedSize" "$0"
    
    184
    -[% END -%]
    
    185
    -
    
    186
    -SectionEnd
    
    187
    -
    
    188
    -[% IF system_install_mode -%]
    
    189
    -Section "Uninstall"
    
    190
    -  RMDir /r "$INSTDIR"
    
    191
    -  DeleteRegKey HKLM "${UNINST_KEY}"
    
    192
    -  SetShellVarContext all
    
    193
    -  Delete "$SMPROGRAMS\[% c('var/Project_Name') %].lnk"
    
    194
    -  Delete "$DESKTOP\[% c('var/Project_Name') %].lnk"
    
    195
    -SectionEnd
    
    196
    -[% END -%]
    
    197
    -
    
    198
    -Function CreateShortcuts
    
    199
    -[% IF system_install_mode -%]
    
    200
    -  SetShellVarContext all
    
    201
    -[% END -%]
    
    202
    -  CreateShortCut "$SMPROGRAMS\[% c('var/Project_Name') %].lnk" "$INSTDIR\[% IF !system_install_mode -%]Browser\[% END -%][% c('var/exe_name') %].exe"
    
    203
    -  CreateShortCut "$DESKTOP\[% c('var/Project_Name') %].lnk" "$INSTDIR\[% IF !system_install_mode -%]Browser\[% END -%][% c('var/exe_name') %].exe"
    
    204
    -
    
    205
    -FunctionEnd
    
    206
    -;--------------------------------
    
    207
    -;Installer Functions
    
    208
    -
    
    209
    -Function .onInit
    
    210
    -
    
    211
    -  ${IfNot} ${AtLeastWin7}
    
    212
    -    MessageBox MB_USERICON|MB_OK "[% c('var/Project_Name') %] requires at least Windows 7"
    
    213
    -    SetErrorLevel 1
    
    214
    -    Quit
    
    215
    -  ${EndIf}
    
    216
    -
    
    217
    -  ; Don't install on systems that don't support SSE2. The parameter value of
    
    218
    -  ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
    
    219
    -  ; SSE2 instruction set is available.
    
    220
    -  System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
    
    221
    -
    
    222
    -  ${If} "$R7" == "0"
    
    223
    -    MessageBox MB_OK|MB_ICONSTOP "Sorry, [% c('var/Project_Name') %] can't be installed. This version of [% c('var/Project_Name') %] requires a processor with SSE2 support."
    
    224
    -    Abort
    
    225
    -  ${EndIf}
    
    226
    -
    
    227
    -  !insertmacro MUI_LANGDLL_DISPLAY
    
    228
    -
    
    229
    -FunctionEnd
    
    230
    -
    
    231
    -;--------------------------------
    
    232
    -;Helper Functions
    
    233
    -
    
    234
    -Function CheckIfTargetDirectoryExists
    
    235
    -${If} ${FileExists} "$INSTDIR\*.*"
    
    236
    - MessageBox MB_YESNO "The destination directory already exists. You can try to upgrade the [% c('var/Project_Name') %], but if you run into any problems, use a new directory instead. Continue?" IDYES NoAbort
    
    237
    -   Abort
    
    238
    - NoAbort:
    
    239
    -${EndIf}
    
    240
    -FunctionEnd
    
    241
    -
    
    242
    -Function StartBrowser
    
    243
    -[% IF !system_install_mode -%]
    
    244
    -  ExecShell "open" "$INSTDIR/Start [% c('var/Project_Name') %].lnk"
    
    245
    -[% ELSE -%]
    
    246
    -  ExecShell "open" "$INSTDIR/[% c('var/exe_name') %].exe"
    
    247
    -[% END -%]
    
    248
    -FunctionEnd
    1
    +; NSIS Installer for Tor/Base/Mullvad Browser
    
    2
    +; Based on NSIS examples by Joost Verburg.
    
    3
    +; Originally adapted to Tor Browser by Moritz Bartl
    
    4
    +; https://github.com/moba/tbb-windows-installer
    
    5
    +; Released under the zlib/libpng license.
    
    6
    +
    
    7
    +;--------------------------------
    
    8
    +  !include "FileFunc.nsh"
    
    9
    +  !include "LogicLib.nsh"
    
    10
    +  !include "MUI2.nsh"
    
    11
    +  !include "WinVer.nsh"
    
    12
    +
    
    13
    +;--------------------------------
    
    14
    +; General
    
    15
    +  ; Location of Tor/Base/Mullvad Browser to put into installer
    
    16
    +  !define PROGRAM_SOURCE ".\[% c('var/Project_Name') %]\"
    
    17
    +
    
    18
    +[% IF c("var/channel") == "release";
    
    19
    +      SET display_name = c('var/Project_Name');
    
    20
    +   ELSIF c("var/testbuild");
    
    21
    +      SET display_name = c('var/Project_Name') _ " Testbuild";
    
    22
    +   ELSE;
    
    23
    +      SET display_name = c('var/Project_Name_Channel');
    
    24
    +   END
    
    25
    +-%]
    
    26
    +  Name "[% display_name %]"
    
    27
    +  OutFile "browser-install.exe"
    
    28
    +
    
    29
    +  ; Default installation folder
    
    30
    +  InstallDir "$DESKTOP\[% display_name %]"
    
    31
    +
    
    32
    +  ; Best (but slowest) compression
    
    33
    +  SetCompressor /SOLID lzma
    
    34
    +  SetCompressorDictSize 32
    
    35
    +
    
    36
    +  ; Do not require elevated privileges
    
    37
    +  RequestExecutionLevel user
    
    38
    +
    
    39
    +  ; Support HiDPI displays
    
    40
    +  ManifestDPIAware true
    
    41
    +
    
    42
    +;--------------------------------
    
    43
    +; Metadata
    
    44
    +  VIProductVersion "[% pc('firefox', 'var/browser_series') %].0.0"
    
    45
    +  VIAddVersionKey "ProductName" "[% display_name %]"
    
    46
    +  VIAddVersionKey "ProductVersion" "[% c('var/torbrowser_version') %]"
    
    47
    +  VIAddVersionKey "FileDescription" "[% display_name %] Portable Installer"
    
    48
    +  VIAddVersionKey "LegalCopyright" "© [% pc('firefox', 'var/copyright_year') %] [% IF c('var/mullvad-browser') %]Mullvad, Tor Browser and Mozilla Developers[% ELSE %]The Tor Project[% END %]"
    
    49
    +
    
    50
    +;--------------------------------
    
    51
    +; Interface Configuration
    
    52
    +  !define MUI_ICON "[% c('var/projectname') %][% IF !c('var/base-browser') %]-[% c('var/channel') %][% END %].ico"
    
    53
    +  !define MUI_ABORTWARNING
    
    54
    +
    
    55
    +;--------------------------------
    
    56
    +; Modern UI settings
    
    57
    +  !define MUI_FINISHPAGE_NOREBOOTSUPPORT ; Reboot not required
    
    58
    +  !define MUI_FINISHPAGE_RUN
    
    59
    +  !define MUI_FINISHPAGE_RUN_FUNCTION "StartBrowser"
    
    60
    +
    
    61
    +  ; Misuse the option to show the readme to create the shortcuts.
    
    62
    +  ; Less ugly than MUI_PAGE_COMPONENTS.
    
    63
    +  !define MUI_FINISHPAGE_SHOWREADME
    
    64
    +  !define MUI_FINISHPAGE_SHOWREADME_TEXT "&Add Start Menu && Desktop shortcuts"
    
    65
    +  !define MUI_FINISHPAGE_SHOWREADME_FUNCTION "CreateShortCuts"
    
    66
    +
    
    67
    +;--------------------------------
    
    68
    +; Pages
    
    69
    +  !define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckIfTargetDirectoryExists
    
    70
    +  !insertmacro MUI_PAGE_DIRECTORY
    
    71
    +  !insertmacro MUI_PAGE_INSTFILES
    
    72
    +  !insertmacro MUI_PAGE_FINISH
    
    73
    +
    
    74
    +;--------------------------------
    
    75
    +; Languages
    
    76
    +  !insertmacro MUI_LANGUAGE "English" ; First language is the default language
    
    77
    +  !insertmacro MUI_LANGUAGE "Arabic" ; ar
    
    78
    +  !insertmacro MUI_LANGUAGE "Catalan" ; ca
    
    79
    +  !insertmacro MUI_LANGUAGE "Czech" ; cs
    
    80
    +  !insertmacro MUI_LANGUAGE "Danish" ; da
    
    81
    +  !insertmacro MUI_LANGUAGE "German" ; de
    
    82
    +  !insertmacro MUI_LANGUAGE "Greek" ; el
    
    83
    +  !insertmacro MUI_LANGUAGE "Spanish" ; es-ES
    
    84
    +  !insertmacro MUI_LANGUAGE "Farsi" ; fa
    
    85
    +  !insertmacro MUI_LANGUAGE "Finnish" ; fi
    
    86
    +  !insertmacro MUI_LANGUAGE "French" ; fr
    
    87
    +  !insertmacro MUI_LANGUAGE "ScotsGaelic" ; ga-IE
    
    88
    +  !insertmacro MUI_LANGUAGE "Hebrew" ; he
    
    89
    +  !insertmacro MUI_LANGUAGE "Hungarian" ; hu
    
    90
    +  !insertmacro MUI_LANGUAGE "Indonesian"; id
    
    91
    +  !insertmacro MUI_LANGUAGE "Icelandic" ; is
    
    92
    +  !insertmacro MUI_LANGUAGE "Italian" ; it
    
    93
    +  !insertmacro MUI_LANGUAGE "Japanese" ; ja
    
    94
    +  !insertmacro MUI_LANGUAGE "Georgian" ; ka
    
    95
    +  !insertmacro MUI_LANGUAGE "Korean" ; ko
    
    96
    +  !insertmacro MUI_LANGUAGE "Lithuanian" ; lt
    
    97
    +  !insertmacro MUI_LANGUAGE "Macedonian" ; mk
    
    98
    +  !insertmacro MUI_LANGUAGE "Malay" ; ms
    
    99
    +  ; Burmese - my: not available on NSIS
    
    100
    +  !insertmacro MUI_LANGUAGE "Norwegian" ; nb-NO
    
    101
    +  !insertmacro MUI_LANGUAGE "Dutch" ; nl
    
    102
    +  !insertmacro MUI_LANGUAGE "Polish" ; pl
    
    103
    +  !insertmacro MUI_LANGUAGE "PortugueseBR" ; pt-BR
    
    104
    +  !insertmacro MUI_LANGUAGE "Romanian" ; ro
    
    105
    +  !insertmacro MUI_LANGUAGE "Russian" ; ru
    
    106
    +  !insertmacro MUI_LANGUAGE "Albanian" ; sq
    
    107
    +  !insertmacro MUI_LANGUAGE "Swedish" ; sv-SE
    
    108
    +  !insertmacro MUI_LANGUAGE "Thai" ; th
    
    109
    +  !insertmacro MUI_LANGUAGE "Turkish" ; tr
    
    110
    +  !insertmacro MUI_LANGUAGE "Ukrainian" ; uk
    
    111
    +  !insertmacro MUI_LANGUAGE "Vietnamese" ; vi
    
    112
    +  !insertmacro MUI_LANGUAGE "SimpChinese" ; zh-hans, zh-cn
    
    113
    +  !insertmacro MUI_LANGUAGE "TradChinese" ; zh-hant, zh-tw
    
    114
    +
    
    115
    +;--------------------------------
    
    116
    +; Reserve Files
    
    117
    +
    
    118
    +  ; If you are using solid compression, files that are required before
    
    119
    +  ; the actual installation should be stored first in the data block,
    
    120
    +  ; because this will make your installer start faster.
    
    121
    +
    
    122
    +  !insertmacro MUI_RESERVEFILE_LANGDLL
    
    123
    +
    
    124
    +;--------------------------------
    
    125
    +; Installer Sections
    
    126
    +
    
    127
    +Section "Browser" SecBrowser
    
    128
    +  SetOutPath "$INSTDIR"
    
    129
    +  File /r "${PROGRAM_SOURCE}\*.*"
    
    130
    +  CreateShortCut "$INSTDIR\[% display_name %].lnk" "$INSTDIR\Browser\[% c('var/exe_name') %].exe"
    
    131
    +SectionEnd
    
    132
    +
    
    133
    +;--------------------------------
    
    134
    +; Installer Functions
    
    135
    +
    
    136
    +Function .onInit
    
    137
    +  ${IfNot} ${AtLeastWin7}
    
    138
    +    MessageBox MB_USERICON|MB_OK "[% c('var/Project_Name') %] requires at least Windows 7"
    
    139
    +    SetErrorLevel 1
    
    140
    +    Quit
    
    141
    +  ${EndIf}
    
    142
    +
    
    143
    +  ; Don't install on systems that don't support SSE2. The parameter value of
    
    144
    +  ; 10 is for PF_XMMI64_INSTRUCTIONS_AVAILABLE which will check whether the
    
    145
    +  ; SSE2 instruction set is available.
    
    146
    +  System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
    
    147
    +  ${If} "$R7" == "0"
    
    148
    +    MessageBox MB_OK|MB_ICONSTOP "Sorry, [% c('var/Project_Name') %] can't be installed. This version of [% c('var/Project_Name') %] requires a processor with SSE2 support."
    
    149
    +    Abort
    
    150
    +  ${EndIf}
    
    151
    +
    
    152
    +  !insertmacro MUI_LANGDLL_DISPLAY
    
    153
    +FunctionEnd
    
    154
    +
    
    155
    +Function CheckIfTargetDirectoryExists
    
    156
    +  ${If} ${FileExists} "$INSTDIR\*.*"
    
    157
    +    MessageBox MB_YESNO "The destination directory already exists. Do you want to continue anyway?" IDYES +2
    
    158
    +    Abort
    
    159
    +  ${EndIf}
    
    160
    +FunctionEnd
    
    161
    +
    
    162
    +Function CreateShortcuts
    
    163
    +  CreateShortCut "$SMPROGRAMS\[% display_name %].lnk" "$INSTDIR\[% IF !system_install_mode -%]Browser\[% END -%][% c('var/exe_name') %].exe"
    
    164
    +  CreateShortCut "$DESKTOP\[% display_name %].lnk" "$INSTDIR\[% IF !system_install_mode -%]Browser\[% END -%][% c('var/exe_name') %].exe"
    
    165
    +FunctionEnd
    
    166
    +
    
    167
    +Function StartBrowser
    
    168
    +  ExecShell "open" "$INSTDIR/[% display_name %].lnk"
    
    169
    +FunctionEnd