Win inssaller: cleanup and support for thumbnails

- remove unused file
- register DLL file to view thumbnails in Windows explorer (if the user has admin permissions)
- some code simplifications
This commit is contained in:
donovaly
2019-11-14 03:25:50 +01:00
committed by wwmayer
parent 4b5ca31149
commit 91dd12751a
9 changed files with 24 additions and 66 deletions

View File

@@ -69,7 +69,6 @@ Var CreateFileAssociations
Var OldVersionNumber
Var Pointer
Var Search
Var SVGPath
Var StartmenuFolder
Var String
Var UserList

View File

@@ -1,46 +0,0 @@
/*
detection.nsh
Detection of external component locations
*/
# This script contains the following functions:
#
# - SearchExternal, calls the functions:
# MissingPrograms
#
# - MissingPrograms, (check if third-party programs are installed), uses:
# SEARCH_MIKTEX
# SEARCH_TEXLIVE
#
#--------------------------
Function SearchExternal
Call MissingPrograms
FunctionEnd
# ---------------------------------------
Function MissingPrograms
# check if third-party programs are installed
${if} ${RunningX64}
SetRegView 64
${endif}
# test if Inkscape is installed
ReadRegStr $SVGPath HKLM "SOFTWARE\Classes\inkscape.svg\DefaultIcon" ""
${if} $SVGPath != ""
StrCpy $SVGPath $SVGPath "" 1 # remove the leading quote
StrCpy $SVGPath $SVGPath -14 # # delete '\inkscape.exe"'
${endif}
${if} $SVGPath == ""
# this was used before Inkscape 0.91:
ReadRegStr $SVGPath HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Inkscape" "InstallLocation"
${endif}
FunctionEnd
# ---------------------------------------

View File

@@ -60,6 +60,7 @@ Function .onInit
# check if it is a 64bit system
${if} ${RunningX64}
SetRegView 64
!define LIBRARY_X64
${endif}
# Check that FreeCAD is not currently running
@@ -149,11 +150,6 @@ Function .onInit
${IfNot} ${Silent}
# Show banner while installer is intializating
Banner::show /NOUNLOAD "Checking system"
${EndIf}
Call SearchExternal
${IfNot} ${Silent}
Banner::destroy
${EndIf}