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 | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 4 | InstallDir @INST_DIR@ |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 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 |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 22 | IfFileExists $SYSDIR/libturbojpeg.dll exists 0 |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 23 | !else |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 24 | IfFileExists $SYSDIR/turbojpeg.dll exists 0 |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 25 | !endif |
| 26 | goto notexists |
| 27 | exists: |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 28 | !ifdef GCC |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 29 | MessageBox MB_OK "An existing version of the @CMAKE_PROJECT_NAME@ SDK for @INST_PLATFORM@ is already installed. Please uninstall it first." |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 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 |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 33 | quit |
| 34 | |
| 35 | notexists: |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 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 |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 42 | SetOutPath $INSTDIR\bin |
| 43 | !ifdef GCC |
DRC | 4d87793 | 2013-09-19 22:55:57 +0000 | [diff] [blame] | 44 | File "@CMAKE_BINARY_DIR@\libturbojpeg.dll" |
| 45 | !else |
| 46 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.dll" |
| 47 | !endif |
| 48 | !ifdef GCC |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 49 | File "/oname=libjpeg-@DLL_VERSION@.dll" "@CMAKE_BINARY_DIR@\sharedlib\libjpeg-*.dll" |
| 50 | !else |
| 51 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg@DLL_VERSION@.dll" |
| 52 | !endif |
DRC | 01fa031 | 2011-04-01 11:10:46 +0000 | [diff] [blame] | 53 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}cjpeg.exe" |
| 54 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}djpeg.exe" |
| 55 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpegtran.exe" |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 56 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}tjbench.exe" |
DRC | 01fa031 | 2011-04-01 11:10:46 +0000 | [diff] [blame] | 57 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}rdjpgcom.exe" |
| 58 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}wrjpgcom.exe" |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 59 | SetOutPath $INSTDIR\lib |
| 60 | !ifdef GCC |
| 61 | File "@CMAKE_BINARY_DIR@\libturbojpeg.dll.a" |
| 62 | File "@CMAKE_BINARY_DIR@\libturbojpeg.a" |
| 63 | File "@CMAKE_BINARY_DIR@\sharedlib\libjpeg.dll.a" |
| 64 | File "@CMAKE_BINARY_DIR@\libjpeg.a" |
| 65 | !else |
| 66 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg.lib" |
| 67 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}turbojpeg-static.lib" |
| 68 | File "@CMAKE_BINARY_DIR@\sharedlib\${BUILDDIR}jpeg.lib" |
| 69 | File "@CMAKE_BINARY_DIR@\${BUILDDIR}jpeg-static.lib" |
| 70 | !endif |
DRC | 957d623 | 2011-04-01 11:13:11 +0000 | [diff] [blame] | 71 | !ifdef JAVA |
| 72 | SetOutPath $INSTDIR\classes |
| 73 | File "@CMAKE_BINARY_DIR@\java\${BUILDDIR}turbojpeg.jar" |
| 74 | !endif |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 75 | SetOutPath $INSTDIR\include |
| 76 | File "@CMAKE_BINARY_DIR@\jconfig.h" |
| 77 | File "@CMAKE_SOURCE_DIR@\jerror.h" |
| 78 | File "@CMAKE_SOURCE_DIR@\jmorecfg.h" |
| 79 | File "@CMAKE_SOURCE_DIR@\jpeglib.h" |
| 80 | File "@CMAKE_SOURCE_DIR@\turbojpeg.h" |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 81 | SetOutPath $INSTDIR\doc |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 82 | File "@CMAKE_SOURCE_DIR@\README" |
| 83 | File "@CMAKE_SOURCE_DIR@\README-turbo.txt" |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 84 | File "@CMAKE_SOURCE_DIR@\example.c" |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 85 | File "@CMAKE_SOURCE_DIR@\libjpeg.txt" |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 86 | File "@CMAKE_SOURCE_DIR@\structure.txt" |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 87 | File "@CMAKE_SOURCE_DIR@\usage.txt" |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 88 | File "@CMAKE_SOURCE_DIR@\wizard.txt" |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 89 | |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 90 | WriteRegStr HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@" "Install_Dir" "$INSTDIR" |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 91 | |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 92 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "DisplayName" "@CMAKE_PROJECT_NAME@ SDK v@VERSION@ for @INST_PLATFORM@" |
| 93 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "UninstallString" '"$INSTDIR\uninstall_@VERSION@.exe"' |
| 94 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoModify" 1 |
| 95 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" "NoRepair" 1 |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 96 | WriteUninstaller "uninstall_@VERSION@.exe" |
| 97 | SectionEnd |
| 98 | |
| 99 | Section "Uninstall" |
| 100 | !ifdef WIN64 |
| 101 | ${If} ${RunningX64} |
| 102 | ${DisableX64FSRedirection} |
| 103 | ${Endif} |
| 104 | !endif |
| 105 | |
| 106 | SetShellVarContext all |
| 107 | |
DRC | 7175e51 | 2013-04-23 22:29:00 +0000 | [diff] [blame] | 108 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@INST_REG_NAME@ @VERSION@" |
| 109 | DeleteRegKey HKLM "SOFTWARE\@INST_REG_NAME@ @VERSION@" |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 110 | |
| 111 | !ifdef GCC |
| 112 | Delete $INSTDIR\bin\libjpeg-@DLL_VERSION@.dll |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 113 | Delete $SYSDIR\libturbojpeg.dll |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 114 | Delete $INSTDIR\lib\libturbojpeg.dll.a" |
| 115 | Delete $INSTDIR\lib\libturbojpeg.a" |
| 116 | Delete $INSTDIR\lib\libjpeg.dll.a" |
| 117 | Delete $INSTDIR\lib\libjpeg.a" |
| 118 | !else |
| 119 | Delete $INSTDIR\bin\jpeg@DLL_VERSION@.dll |
DRC | 441308c | 2013-04-24 05:26:42 +0000 | [diff] [blame] | 120 | Delete $SYSDIR\turbojpeg.dll |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 121 | Delete $INSTDIR\lib\jpeg.lib |
| 122 | Delete $INSTDIR\lib\jpeg-static.lib |
| 123 | Delete $INSTDIR\lib\turbojpeg.lib |
| 124 | Delete $INSTDIR\lib\turbojpeg-static.lib |
| 125 | !endif |
DRC | 957d623 | 2011-04-01 11:13:11 +0000 | [diff] [blame] | 126 | !ifdef JAVA |
| 127 | Delete $INSTDIR\classes\turbojpeg.jar |
| 128 | !endif |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 129 | Delete $INSTDIR\bin\cjpeg.exe |
| 130 | Delete $INSTDIR\bin\djpeg.exe |
| 131 | Delete $INSTDIR\bin\jpegtran.exe |
DRC | 3185cb9 | 2011-05-25 03:52:22 +0000 | [diff] [blame] | 132 | Delete $INSTDIR\bin\tjbench.exe |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 133 | Delete $INSTDIR\bin\rdjpgcom.exe |
| 134 | Delete $INSTDIR\bin\wrjpgcom.exe |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 135 | Delete $INSTDIR\include\jconfig.h" |
| 136 | Delete $INSTDIR\include\jerror.h" |
| 137 | Delete $INSTDIR\include\jmorecfg.h" |
| 138 | Delete $INSTDIR\include\jpeglib.h" |
| 139 | Delete $INSTDIR\include\turbojpeg.h" |
| 140 | Delete $INSTDIR\uninstall_@VERSION@.exe |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 141 | Delete $INSTDIR\doc\README |
| 142 | Delete $INSTDIR\doc\README-turbo.txt |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 143 | Delete $INSTDIR\doc\example.c |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 144 | Delete $INSTDIR\doc\libjpeg.txt |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 145 | Delete $INSTDIR\doc\structure.txt |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 146 | Delete $INSTDIR\doc\usage.txt |
DRC | a1647c8 | 2012-02-10 00:39:05 +0000 | [diff] [blame] | 147 | Delete $INSTDIR\doc\wizard.txt |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 148 | |
| 149 | RMDir "$INSTDIR\include" |
| 150 | RMDir "$INSTDIR\lib" |
DRC | 8569c2f | 2011-02-18 23:49:42 +0000 | [diff] [blame] | 151 | RMDir "$INSTDIR\doc" |
DRC | 957d623 | 2011-04-01 11:13:11 +0000 | [diff] [blame] | 152 | !ifdef JAVA |
| 153 | RMDir "$INSTDIR\classes" |
| 154 | !endif |
DRC | 2c0a4e1 | 2010-10-16 08:51:43 +0000 | [diff] [blame] | 155 | RMDir "$INSTDIR\bin" |
| 156 | RMDir "$INSTDIR" |
| 157 | |
| 158 | SectionEnd |