"Fossies" - the Fresh Open Source Software Archive

Member "texstudio-3.1.1/utilities/texstudio.nsi" (21 Feb 2021, 5361 Bytes) of package /linux/misc/texstudio-3.1.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) NSIS source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "texstudio.nsi": 3.1.0_vs_3.1.1.

    1 !define APPNAME "TeXstudio"
    2 !define DESCRIPTION "TeXstudio is a fully featured LaTeX editor."
    3 # These three must be integers
    4 !define VERSIONMAJOR 3
    5 !define VERSIONMINOR 1
    6 !define VERSIONBUILD 1
    7 # These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
    8 # It is possible to use "mailto:" links in here to open the email client
    9 !define HELPURL "https://texstudio.org" # "Support Information" link
   10 !define UPDATEURL "https://texstudio.org" # "Product Updates" link
   11 !define ABOUTURL "https://texstudio.org" # "Publisher" link
   12 
   13 !include "FileAssociation.nsh"
   14 
   15 # define the name of the installer
   16 Outfile "texstudio_installer.exe"
   17 
   18 RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
   19  
   20 InstallDir "$PROGRAMFILES\texstudio"
   21 
   22 Name "${APPNAME}"
   23 
   24 page directory
   25 page instfiles
   26 
   27 #!macro VerifyUserIsAdmin
   28 #UserInfo::GetAccountType
   29 #pop $0
   30 #${If} $0 != "admin" ;Require admin rights on NT4+
   31 #        messageBox mb_iconstop "Administrator rights required!"
   32 #        setErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
   33 #        quit
   34 #${EndIf}
   35 #!macroend
   36 
   37 # default section
   38 Section "install"
   39 
   40 # sets $SMPROGRAMS to all users 
   41 SetShellVarContext all
   42 
   43 # define the output path for this file
   44 SetOutPath $INSTDIR
   45  
   46 # define what to install and place it in the output path
   47 File texstudio.exe
   48 
   49 File *.dll
   50 
   51 SetOutPath $INSTDIR\platforms
   52 
   53 File platforms\*
   54 
   55 SetOutPath $INSTDIR\imageformats
   56 
   57 File imageformats\*
   58 
   59 SetOutPath $INSTDIR\translations
   60 
   61 File translation\*.qm
   62 
   63 SetOutPath $INSTDIR\templates
   64 
   65 File templates\*
   66 
   67 SetOutPath $INSTDIR\help
   68 
   69 File utilities\AUTHORS
   70 File utilities\COPYING
   71 File utilities\latex2e.html
   72 File utilities\latex2e.css
   73 File utilities\license.txt
   74 File utilities\manual\*
   75 
   76 SetOutPath $INSTDIR\share\poppler
   77 File /r utilities\poppler-data\*
   78 
   79 SetOutPath $INSTDIR\share\fonts
   80 File /r travis-ci\mxe\fonts\*
   81 
   82 SetOutPath $INSTDIR\TexTablet
   83 File utilities\TexTablet\*
   84 
   85 SetOutPath $INSTDIR\dictionaries
   86 File utilities\dictionaries\*.dic
   87 File utilities\dictionaries\*.aff
   88 File utilities\dictionaries\*.badWords
   89 File utilities\dictionaries\*.stopWords
   90 File utilities\dictionaries\*.stopWords.level2
   91 File utilities\dictionaries\th_*_v2.dat
   92 
   93  
   94 # define uninstaller name
   95 WriteUninstaller $INSTDIR\uninstall.exe
   96 
   97 # associate .tex
   98 ${registerExtension} $INSTDIR\texstudio.exe ".tex" "tex File"
   99 
  100 # Start Menu
  101 createShortCut "$SMPROGRAMS\${APPNAME}.lnk" \
  102 "$INSTDIR\texstudio.exe" "" ""
  103 
  104 # Registry information for add/remove programs
  105     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME} - ${DESCRIPTION}"
  106     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
  107     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
  108     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "InstallLocation" "$\"$INSTDIR$\""
  109     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$\"$INSTDIR\logo.ico$\""
  110     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "Benito van der Zander"
  111     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "HelpLink" "$\"${HELPURL}$\""
  112     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "URLUpdateInfo" "$\"${UPDATEURL}$\""
  113     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "URLInfoAbout" "$\"${ABOUTURL}$\""
  114     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayVersion" "${VERSIONMAJOR}.${VERSIONMINOR}.${VERSIONBUILD}"
  115     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "VersionMajor" ${VERSIONMAJOR}
  116     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "VersionMinor" ${VERSIONMINOR}
  117     # There is no option for modifying or repairing the install
  118     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" 1
  119     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" 1
  120  
  121 SectionEnd
  122 
  123 # Uninstaller
  124  
  125 function un.onInit
  126     SetShellVarContext all
  127  
  128     #Verify the uninstaller - last chance to back out
  129     MessageBox MB_OKCANCEL "Permanently remove ${APPNAME}?" /SD IDOK IDOK next
  130         Abort
  131     next:
  132     #!insertmacro VerifyUserIsAdmin
  133 functionEnd
  134 
  135 # create a section to define what the uninstaller does.
  136 # the section will always be named "Uninstall"
  137 Section "Uninstall"
  138 
  139 # sets $SMPROGRAMS to all users 
  140 SetShellVarContext all
  141     
  142 # Remove Start Menu launcher
  143 delete "$SMPROGRAMS\${APPNAME}.lnk"
  144  
  145 # Always delete uninstaller first
  146 Delete $INSTDIR\uninstaller.exe
  147 
  148 # remove file association
  149 ${unregisterExtension} ".tex" "tex File"
  150  
  151 # now delete installed file
  152 RMDir /r $INSTDIR\translations
  153 RMDir /r $INSTDIR\templates
  154 RMDir /r $INSTDIR\help
  155 RMDir /r $INSTDIR\share\poppler
  156 RMDir    $INSTDIR\share
  157 RMDir /r $INSTDIR\TexTablet
  158 RMDir /r $INSTDIR\dictionaries
  159 Delete $INSTDIR\*
  160 
  161 # Try to remove the install directory - this will only happen if it is empty
  162 RMDir $INSTDIR
  163 
  164 # Remove uninstaller information from the registry
  165 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
  166  
  167 SectionEnd