Improved: The installer now optionally creates a start menu folder. It also adds an entry to Control Panel -> Programs and Features. Updating an existing installation is now possible without uninstalling the old version first.
This commit is contained in:
1 parent
d836053d24
commit
c5574fd2e7
4 files changed
+77
-9
No files matched your search
@@ -0,0 +1,5 @@
|
||||
[{000214A0-0000-0000-C000-000000000046}]
|
||||
Prop3=19,2
|
||||
[InternetShortcut]
|
||||
URL=http://sourceforge.net/p/equalizerapo/wiki/Documentation/#configuration-tutorial
|
||||
IDList=
|
||||
+70
-7
@@ -4,6 +4,7 @@
|
||||
!searchparse /file ..\version.h `#define MINOR ` MINOR
|
||||
|
||||
!define REGPATH "Software\EqualizerAPO"
|
||||
!define UNINST_REGPATH "Software\Microsoft\Windows\CurrentVersion\Uninstall\EqualizerAPO"
|
||||
|
||||
;--------------------------------
|
||||
;General
|
||||
@@ -11,12 +12,15 @@
|
||||
;Name and file
|
||||
Name "Equalizer APO ${MAJOR}.${MINOR}"
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$PROGRAMFILES64\EqualizerAPO"
|
||||
|
||||
;Request application privileges for Windows Vista
|
||||
RequestExecutionLevel admin
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
Var StartMenuFolder
|
||||
Var OldStartMenuFolder
|
||||
|
||||
;--------------------------------
|
||||
;Interface Settings
|
||||
|
||||
@@ -29,6 +33,13 @@
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_LICENSE ..\License.txt
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGPATH}
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
@@ -44,15 +55,45 @@
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
|
||||
;--------------------------------
|
||||
;Macros
|
||||
|
||||
!macro RenameAndDelete path
|
||||
IfFileExists "${path}" 0 +3
|
||||
Rename "${path}" "${path}.old"
|
||||
Delete /REBOOTOK "${path}.old"
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
;Functions
|
||||
Function .onInit
|
||||
SetRegView 64
|
||||
;Get installation folder from registry if available
|
||||
ReadRegStr $INSTDIR HKLM ${REGPATH} "InstallPath"
|
||||
|
||||
;Use default installation folder otherwise
|
||||
StrCmp $INSTDIR "" 0 +2
|
||||
StrCpy $INSTDIR "$PROGRAMFILES64\EqualizerAPO"
|
||||
|
||||
Call initCheck
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Installer Sections
|
||||
|
||||
Section "Install" SecInstall
|
||||
SetRegView 64
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
SetRebootFlag true
|
||||
|
||||
;Possibly remove files from previous installation
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $OldStartMenuFolder
|
||||
RMDir /r "$SMPROGRAMS\$OldStartMenuFolder"
|
||||
|
||||
;Rename before delete as these files may be in use
|
||||
!insertmacro RenameAndDelete "$INSTDIR\EqualizerAPO.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcp100.dll"
|
||||
!insertmacro RenameAndDelete "$INSTDIR\msvcr100.dll"
|
||||
|
||||
File "${BINPATH}\EqualizerAPO.dll"
|
||||
File "${BINPATH}\Configurator.exe"
|
||||
File "${BINPATH}\Benchmark.exe"
|
||||
@@ -61,6 +102,8 @@ Section "Install" SecInstall
|
||||
File "${LIBPATH}\msvcp100.dll"
|
||||
File "${LIBPATH}\msvcr100.dll"
|
||||
|
||||
File "Configuration tutorial (online).url"
|
||||
|
||||
CreateDirectory "$INSTDIR\config"
|
||||
|
||||
SetOverwrite off
|
||||
@@ -74,9 +117,23 @@ Section "Install" SecInstall
|
||||
WriteRegStr HKLM ${REGPATH} "InstallPath" "$INSTDIR"
|
||||
WriteRegStr HKLM ${REGPATH} "ConfigPath" "$INSTDIR\config"
|
||||
WriteRegStr HKLM ${REGPATH} "EnableTrace" "false"
|
||||
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Configuration tutorial (online).lnk" "$INSTDIR\Configuration tutorial (online).url"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Configurator.lnk" "$INSTDIR\Configurator.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Benchmark.lnk" "$INSTDIR\Benchmark.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
WriteRegStr HKLM ${UNINST_REGPATH} "DisplayName" "Equalizer APO"
|
||||
WriteRegStr HKLM ${UNINST_REGPATH} "UninstallString" '"$INSTDIR\Uninstall.exe"'
|
||||
WriteRegDWORD HKLM ${UNINST_REGPATH} "NoModify" 1
|
||||
WriteRegDWORD HKLM ${UNINST_REGPATH} "NoRepair" 1
|
||||
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Audio" "DisableProtectedAudioDG" 1
|
||||
;RegDLL doesn't work for 64 bit dlls
|
||||
ExecWait '"$SYSDIR\regsvr32.exe" /s "$INSTDIR\EqualizerAPO.dll"'
|
||||
@@ -105,7 +162,12 @@ Section "-un.Uninstall"
|
||||
|
||||
ExecWait '"$SYSDIR\regsvr32.exe" /u /s "$INSTDIR\EqualizerAPO.dll"'
|
||||
DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Audio" "DisableProtectedAudioDG"
|
||||
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||
RMDir /r "$SMPROGRAMS\$StartMenuFolder"
|
||||
|
||||
Delete "$INSTDIR\Configuration tutorial (online).url"
|
||||
|
||||
Delete /REBOOTOK "$INSTDIR\msvcr100.dll"
|
||||
Delete /REBOOTOK "$INSTDIR\msvcp100.dll"
|
||||
Delete "$INSTDIR\libsndfile-1.dll"
|
||||
@@ -119,6 +181,7 @@ Section "-un.Uninstall"
|
||||
;Only remove if empty
|
||||
RMDir /REBOOTOK "$INSTDIR"
|
||||
|
||||
DeleteRegKey HKLM ${UNINST_REGPATH}
|
||||
DeleteRegKey /ifempty HKLM ${REGPATH}
|
||||
|
||||
SectionEnd
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
LangString VersionError ${LANG_ENGLISH} "This installer is only supposed to be run on 32-Bit Windows. Please use the 64-Bit installer."
|
||||
LangString VersionError ${LANG_GERMAN} "Dieses Installationsprogramm kann nur auf einem 32-Bit-Windows verwendet werden. Bitte nutzen Sie die 64-Bit-Version."
|
||||
|
||||
Function .onInit
|
||||
Function initCheck
|
||||
StrCmp $PROGRAMFILES32 $PROGRAMFILES64 +3
|
||||
MessageBox MB_OK|MB_ICONSTOP $(VersionError)
|
||||
Abort
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
LangString VersionError ${LANG_ENGLISH} "This installer is only supposed to be run on 64-Bit Windows. Please use the 32-Bit installer."
|
||||
LangString VersionError ${LANG_GERMAN} "Dieses Installationsprogramm kann nur auf einem 64-Bit-Windows verwendet werden. Bitte nutzen Sie die 32-Bit-Version."
|
||||
|
||||
Function .onInit
|
||||
Function initCheck
|
||||
StrCmp $PROGRAMFILES32 $PROGRAMFILES64 0 +3
|
||||
MessageBox MB_OK|MB_ICONSTOP $(VersionError)
|
||||
Abort
|
||||
|
||||
Reference in new issue
Block a user