DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 1 | !include x64.nsh |
| 2 | Name "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@" |
DRC | c0a1cba | 2010-10-18 09:46:27 +0000 | [diff] [blame] | 3 | OutFile "@CMAKE_BINARY_DIR@\${BUILDDIR}@INST_NAME@.exe" |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 4 | InstallDir c:\@INST_NAME@ |
| 5 | |
| 6 | SetCompressor bzip2 |
| 7 | |
| 8 | Page directory |
| 9 | Page instfiles |
| 10 | |
| 11 | UninstPage uninstConfirm |
| 12 | UninstPage instfiles |
| 13 | |
| 14 | Section "@CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ (required)" |
| 15 | !ifdef WIN64 |
| 16 | ${If} ${RunningX64} |
| 17 | ${DisableX64FSRedirection} |
| 18 | ${Endif} |
| 19 | !endif |
| 20 | SectionIn RO |
| 21 | !ifdef GCC |
| 22 | IfFileExists $SYSDIR/libturbojpeg.dll exists 0 |
| 23 | !else |
| 24 | IfFileExists $SYSDIR/turbojpeg.dll exists 0 |
| 25 | !endif |
| 26 | goto notexists |
| 27 | exists: |
| 28 | !ifdef GCC |
| 29 | MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ is already installed. Please uninstall it first." |
| 30 | !else |
| 31 | MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ or the TurboJPEG SDK is already installed. Please uninstall it first." |
| 32 | !endif |
| 33 | quit |
| 34 | |
| 35 | notexists: |
| 36 | SetOutPath $SYSDIR |
| 37 | !ifdef GCC |
| 38 | File "@CMAKE_BINARY_DIR@\libturbojpeg.dll" |
| 39 | !else |
| 40 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.dll" |
| 41 | !endif |
| 42 | SetOutPath $INSTDIR\bin |
| 43 | !ifdef GCC |
| 44 | File "/oname=libjpeg-@DLL_VERSION@.dll" "@CMAKE_BINARY_DIR@\sharedlib\libjpeg-*.dll" |
| 45 | !else |
| 46 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll" |
| 47 | !endif |
| 48 | SetOutPath $INSTDIR\lib |
| 49 | !ifdef GCC |
| 50 | File "@CMAKE_BINARY_DIR@\libturbojpeg.dll.a" |
| 51 | File "@CMAKE_BINARY_DIR@\libturbojpeg.a" |
| 52 | File "@CMAKE_BINARY_DIR@\sharedlib\libjpeg.dll.a" |
| 53 | File "@CMAKE_BINARY_DIR@\libjpeg.a" |
| 54 | !else |
| 55 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.lib" |
| 56 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg-static.lib" |
| 57 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg.lib" |
| 58 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}jpeg-static.lib" |
| 59 | !endif |
| 60 | SetOutPath $INSTDIR\include |
| 61 | File "@CMAKE_BINARY_DIR@\jconfig.h" |
| 62 | File "@CMAKE_SOURCE_DIR@\jerror.h" |
| 63 | File "@CMAKE_SOURCE_DIR@\jmorecfg.h" |
| 64 | File "@CMAKE_SOURCE_DIR@\jpeglib.h" |
| 65 | File "@CMAKE_SOURCE_DIR@\turbojpeg.h" |
| 66 | SetOutPath $INSTDIR |
| 67 | File "@CMAKE_SOURCE_DIR@\README" |
| 68 | File "@CMAKE_SOURCE_DIR@\README-turbo.txt" |
| 69 | File "@CMAKE_SOURCE_DIR@\libjpeg.txt" |
| 70 | File "@CMAKE_SOURCE_DIR@\LGPL.txt" |
| 71 | File "@CMAKE_SOURCE_DIR@\LICENSE.txt" |
| 72 | |
| 73 | WriteRegStr HKLM "SOFTWARE\@INST_NAME@ @VERSION@" "Install_Dir" "$INSTDIR" |
| 74 | |
| 75 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@" |
| 76 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"' |
| 77 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoModify" 1 |
| 78 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" "NoRepair" 1 |
| 79 | WriteUninstaller "uninstall_@VERSION@.exe" |
| 80 | SectionEnd |
| 81 | |
| 82 | Section "Uninstall" |
| 83 | !ifdef WIN64 |
| 84 | ${If} ${RunningX64} |
| 85 | ${DisableX64FSRedirection} |
| 86 | ${Endif} |
| 87 | !endif |
| 88 | |
| 89 | SetShellVarContext all |
| 90 | |
| 91 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_NAME@ @VERSION@" |
| 92 | DeleteRegKey HKLM "SOFTWARE\@INST_NAME@ @VERSION@" |
| 93 | |
| 94 | !ifdef GCC |
| 95 | Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll |
| 96 | Delete $SYSDIR\libturbojpeg.dll |
| 97 | Delete $INSTDIR\lib\libturbojpeg.dll.a" |
| 98 | Delete $INSTDIR\lib\libturbojpeg.a" |
| 99 | Delete $INSTDIR\lib\libjpeg.dll.a" |
| 100 | Delete $INSTDIR\lib\libjpeg.a" |
| 101 | !else |
| 102 | Delete $INSTDIR\bin\jpeg@DLL_VERSION@.dll |
| 103 | Delete $SYSDIR\turbojpeg.dll |
| 104 | Delete $INSTDIR\lib\jpeg.lib |
| 105 | Delete $INSTDIR\lib\jpeg-static.lib |
| 106 | Delete $INSTDIR\lib\turbojpeg.lib |
| 107 | Delete $INSTDIR\lib\turbojpeg-static.lib |
| 108 | !endif |
| 109 | Delete $INSTDIR\include\jconfig.h" |
| 110 | Delete $INSTDIR\include\jerror.h" |
| 111 | Delete $INSTDIR\include\jmorecfg.h" |
| 112 | Delete $INSTDIR\include\jpeglib.h" |
| 113 | Delete $INSTDIR\include\turbojpeg.h" |
| 114 | Delete $INSTDIR\uninstall_@VERSION@.exe |
| 115 | Delete $INSTDIR\README |
| 116 | Delete $INSTDIR\README-turbo.txt |
| 117 | Delete $INSTDIR\libjpeg.txt |
| 118 | Delete $INSTDIR\LGPL.txt |
| 119 | Delete $INSTDIR\LICENSE.txt |
| 120 | |
| 121 | RMDir "$INSTDIR\include" |
| 122 | RMDir "$INSTDIR\lib" |
| 123 | RMDir "$INSTDIR\bin" |
| 124 | RMDir "$INSTDIR" |
| 125 | |
| 126 | SectionEnd |