File: sdlperl.nsi.env

package info (click to toggle)
sdlperl 1.20.3dfsg-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,808 kB
  • ctags: 2,171
  • sloc: perl: 7,394; ansic: 232; makefile: 76; sh: 1
file content (132 lines) | stat: -rw-r--r-- 3,656 bytes parent folder | download | duplicates (3)
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
127
128
129
130
131
132
; sdlperl.nsi
;
; Wayne Keenan 2002

; The name of the installer
Name "SDL_Perl"

; The file to write
OutFile "%SDL_PERL_RELEASE_ID%.exe"

; The default installation directory
InstallDir $PROGRAMFILES\SDL_Perl

; Registry key to check for directory (so if you install again, it will 
; overwrite the old one automatically)
InstallDirRegKey HKLM SOFTWARE\SDL_Perl "Install_Dir"

; The text to prompt the user to enter a directory
ComponentText "This will install SDL_Perl on your computer. Select which optional things you want installed."

; The text to prompt the user to enter a directory
DirText "Choose a directory to install in to:"

ShowInstDetails Show

; The stuff to install
Section "SDL_Perl Modules (required)"

	
  ; Set output path to the installation directory.
  SetOutPath $INSTDIR
  ; Put file there
  File "README.win32"
  File "CHANGELOG"
  File /r test


  ; put in the PPD files
  File "SDL_perl.ppd"
  File "%SDL_PERL_RELEASE_ID%.tar.gz"
  SearchPath $1 ppm.bat
  ExecWait '$1 remove SDL_Perl'
  ExecWait '$1 install --location="$INSTDIR" SDL_Perl'




  ; Write the installation path into the registry
  WriteRegStr HKLM SOFTWARE\SDL_Perl "Install_Dir" "$INSTDIR"

  ; Write the uninstall keys for Windows
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDL_Perl" "DisplayName" "SDL_Perl (remove only)"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDL_Perl" "UninstallString" '"$INSTDIR\uninstall.exe"'
  WriteUninstaller "uninstall.exe"
SectionEnd



Section "SDL_Perl Examples"
  ; Set output path to the installation directory.
  SetOutPath $INSTDIR
  File /r test
SectionEnd




; optional section
Section "Core SDL and 3rd party DLL's"
  SetOutPath $WINDIR
	%LIST:DLLFiles%
SectionEnd


; optional section
Section "Start Menu Shortcuts"
  CreateDirectory "$SMPROGRAMS\SDL_Perl"
  CreateShortCut "$SMPROGRAMS\SDL_Perl\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
  CreateShortCut "$SMPROGRAMS\SDL_Perl\ReadMe.lnk" "$INSTDIR\readme.win32.txt" "" "$INSTDIR\readme.win32.txt" 0
  CreateShortCut "$SMPROGRAMS\SDL_Perl\CHANGELOG.lnk" "$INSTDIR\readme.win32.txt" "" "$INSTDIR\CHANGELOG" 0
  CreateShortCut "$SMPROGRAMS\SDL_Perl\Examples.lnk" "$INSTDIR\Test" "" "$INSTDIR\test" 0
SectionEnd



; uninstall stuff

UninstallText "This will uninstall SDL_Perl. Hit next to continue."

; special uninstall section.
Section "Uninstall"
  ; remove registry keys
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SDL_Perl"
  DeleteRegKey HKLM SOFTWARE\SDL_Perl
  ; remove files
  Delete $INSTDIR\readme.win32.txt
  Delete $INSTDIR\CHANGELOG
  Delete "$INSTDIR\SDL_perl.ppd"
  Delete "$INSTDIR\%SDL_PERL_RELEASE_ID%.tar.gz"
  
  ; MUST REMOVE UNINSTALLER, too
  Delete $INSTDIR\uninstall.exe
  Delete "$WINDIR\sdl_gfx.dll"
  Delete "$WINDIR\zlib.dll"
  Delete "$WINDIR\libpng1.dll"
  Delete "$WINDIR\sdl_image.dll"
  Delete "$WINDIR\jpeg.dll"
  Delete "$WINDIR\sdl_mixer.dll"
  Delete "$WINDIR\sdl_net.dll"
  Delete "$WINDIR\vorbisfile.dll"
  Delete "$WINDIR\ogg.dll"
  Delete "$WINDIR\sdl_sound.dll"
  Delete "$WINDIR\smpeg.dll"
  Delete "$WINDIR\vorbis.dll"
  Delete "$WINDIR\in_flac.dll"
  Delete "$WINDIR\sdl_ttf.dll"
  Delete "$WINDIR\sdl.dll"
  Delete "$WINDIR\sdl_console.dll"
  
  ; remove shortcuts, if any.
  Delete "$SMPROGRAMS\SDL_Perl\*.*"
  ; remove directories used.
  RMDir "$SMPROGRAMS\SDL_Perl"
  RMDir /r "$INSTDIR"

	SearchPath $1 ppm.bat

  ExecWait '$1 remove SDL_Perl'
  
SectionEnd

; eof