-
Notifications
You must be signed in to change notification settings - Fork 0
/
hugs98.nsi
71 lines (52 loc) · 1.64 KB
/
hugs98.nsi
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
; First attempt at an NSIS (http://nsis.sourceforge.net/) installer
; script for Hugs 98.
!ifndef VERSION
!ifdef MAJOR_RELEASE
!define /date VERSION "%b%Y"
!else
!define /date VERSION "%Y%m%d"
!endif
!endif
!define HUGS_KEY "Software\Haskell\Hugs${VERSION}"
!define WINHUGS_KEY "Software\Haskell\Hugs\WinHugs${VERSION}"
!define UNINSTALL_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\Hugs98"
SetCompressor lzma
Name "Hugs98"
OutFile "hugs98-${VERSION}.exe"
InstallDir "$PROGRAMFILES\Hugs98"
InstallDirRegKey HKLM "${HUGS_KEY}" "Install_Dir"
XPStyle on
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
Section
SetOutPath "$INSTDIR"
File "Readme"
File "License"
File "Credits"
File "src\hugs.exe"
File "src\ffihugs.exe"
File "src\runhugs.exe"
File /r /x *.c "hugsdir\libraries"
File /r /x *.c "hugsdir\packages"
File /r /x *.c "hugsdir\programs"
File /r "hugsdir\oldlib"
File /r "hugsdir\demos"
File /r "hugsdir\include"
WriteRegStr HKLM "${HUGS_KEY}" "Install_Dir" "$INSTDIR"
WriteRegStr HKLM "${UNINSTALL_KEY}" "DisplayName" "Hugs98"
WriteRegStr HKLM "${UNINSTALL_KEY}" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "${UNINSTALL_KEY}" "NoModify" 1
WriteRegDWORD HKLM "${UNINSTALL_KEY}" "NoRepair" 1
WriteUninstaller "uninstall.exe"
CreateDirectory "$SMPROGRAMS\Hugs98"
CreateShortCut "$SMPROGRAMS\Hugs98\Uninstall.lnk" "$INSTDIR\uninstall.exe"
CreateShortCut "$SMPROGRAMS\Hugs98\Hugs.lnk" "$INSTDIR\hugs.exe"
SectionEnd
Section "Uninstall"
DeleteRegKey HKLM "${UNINSTALL_KEY}"
DeleteRegKey HKLM "${HUGS_KEY}"
RMDir /r "$SMPROGRAMS\Hugs98"
RMDir /r "$INSTDIR"
SectionEnd