[-] Fixed NSIS scripts

This commit is contained in:
cybermind 2015-03-19 17:43:24 +05:00
parent ec72682a0e
commit c0807df223
2 changed files with 12 additions and 0 deletions

View file

@ -754,6 +754,7 @@ if(WITH_FLUIDSYNTH AND FLUIDSYNTH_FOUND)
add_definitions(-DUSE_FLUIDSYNTH ${FLUIDSYNTH_DEFINITIONS})
include_directories(${FLUIDSYNTH_INCLUDE_DIR})
set(stratagus_LIBS ${stratagus_LIBS} ${FLUIDSYNTH_LIBRARY})
set(MAKENSIS_FLAGS ${MAKENSIS_FLAGS} -DFLUID)
endif()
if(WITH_MIKMOD AND MIKMOD_FOUND)

View file

@ -53,6 +53,7 @@
!define ICON "stratagus.ico"
!define EXE "stratagus.exe"
!define SDL "SDL.dll"
!define UNINSTALL "uninstall.exe"
!define INSTALLER "${NAME}-${VERSION}.exe"
!define INSTALLDIR "$PROGRAMFILES\${NAME}\"
@ -81,6 +82,9 @@ ${redefine} NAME "Stratagus (64 bit)"
!endif
!ifdef FLUID
!define FLUIDDLL "libfluidsynth.dll"
!endif
!define REGKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}"
;--------------------------------
@ -211,6 +215,10 @@ Section "${NAME}"
SetOutPath $INSTDIR
File "${EXE}"
File "${SDL}"
!ifdef FLUID
File "${FLUIDDLL}"
!endif
WriteRegStr HKLM "${REGKEY}" "DisplayName" "${NAME}"
WriteRegStr HKLM "${REGKEY}" "UninstallString" "$\"$INSTDIR\${UNINSTALL}$\""
WriteRegStr HKLM "${REGKEY}" "QuietUninstallString" "$\"$INSTDIR\${UNINSTALL}$\" /S"
@ -233,6 +241,9 @@ Section "un.${NAME}" Executable
SectionIn RO
Delete "$INSTDIR\${EXE}"
Delete "$INSTDIR\${SDL}"
IfFileExists "$INSTDIR\libfluidsynth.dll" 0 +2
Delete "$INSTDIR\libfluidsynth.dll"
Delete "$INSTDIR\${UNINSTALL}"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKLM "${REGKEY}"