]> granicus.if.org Git - libjpeg-turbo/commitdiff
Create Windows installer
authorDRC <dcommander@users.sourceforge.net>
Mon, 15 Feb 2010 17:10:36 +0000 (17:10 +0000)
committerDRC <dcommander@users.sourceforge.net>
Mon, 15 Feb 2010 17:10:36 +0000 (17:10 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@108 632fc199-4ca6-4c93-a231-07263d6284db

release/libjpeg-turbo.nsi [new file with mode: 0644]
win/Makefile
win/Makerules

diff --git a/release/libjpeg-turbo.nsi b/release/libjpeg-turbo.nsi
new file mode 100644 (file)
index 0000000..d45598a
--- /dev/null
@@ -0,0 +1,68 @@
+Name "libjpeg-turbo SDK"
+OutFile libjpeg-turbo.exe
+InstallDir c:\libjpeg-turbo
+
+SetCompressor bzip2
+
+Page directory
+Page instfiles
+
+UninstPage uninstConfirm
+UninstPage instfiles
+
+Section "libjpeg-turbo SDK (required)"
+       SectionIn RO
+       SetOutPath $SYSDIR
+       File "turbojpeg.dll"
+       File "jpeg62.dll"
+       SetOutPath $INSTDIR\lib
+       File "turbojpeg.lib"
+       File "turbojpeg-static.lib"
+       File "jpeg.lib"
+       File "jpeg-static.lib"
+       SetOutPath $INSTDIR\include
+       File "win\jconfig.h"
+       File "jerror.h"
+       File "jmorecfg.h"
+       File "jpeglib.h"
+       File "turbojpeg.h"
+       SetOutPath $INSTDIR
+       File "LGPL.txt"
+       File "LICENSE.txt"
+
+       WriteRegStr HKLM "SOFTWARE\libjpeg-turbo ${VERSION}" "Install_Dir" "$INSTDIR"
+
+       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "DisplayName" "libjpeg-turbo SDK ${VERSION}"
+       WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "UninstallString" '"$INSTDIR\uninstall_${VERSION}.exe"'
+       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "NoModify" 1
+       WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}" "NoRepair" 1
+       WriteUninstaller "uninstall_${VERSION}.exe"
+SectionEnd
+
+Section "Uninstall"
+
+       SetShellVarContext all
+
+       DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\libjpeg-turbo ${VERSION}"
+       DeleteRegKey HKLM "SOFTWARE\libjpeg-turbo ${VERSION}"
+
+       Delete $SYSDIR\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
+       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\LGPL.txt
+       Delete $INSTDIR\LICENSE.txt
+
+       RMDir "$INSTDIR\include"
+       RMDir "$INSTDIR\lib"
+       RMDir "$INSTDIR"
+
+SectionEnd
index 76dcf80f75ed04905eae7abad907073822fe1ab7..6456c46f3fba14ea98746842d06eb1f51f0a9c8e 100755 (executable)
@@ -188,6 +188,12 @@ jpegut.exe: jpegut.obj turbojpeg.lib
        $(LINK) $(LDFLAGS) -out:$@ $^
 
 
+dist: all
+       $(RM) libjpeg-turbo.exe
+       makensis /nocd //DVERSION=$(VERSION) release/libjpeg-turbo.nsi || \
+       makensis /nocd /DVERSION=$(VERSION) release/libjpeg-turbo.nsi  # Cygwin doesn't like the //
+
+
 test: testclean cjpeg.exe djpeg.exe jpegtran.exe
        jpegut
        djpeg -dct int -ppm -outfile testout.ppm  testorig.jpg
index f122593bce16726ab1f806a8e6fb9bee10a515af..d47e690b45d462af6de9ddb7d84b2af0ed160ada 100755 (executable)
@@ -1,3 +1,5 @@
+VERSION = 0.0.90
+
 CC = "cl" -nologo
 CXX = "cl" -EHsc -nologo
 AR = "link" -lib -nologo