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