SetOutPath $INSTDIR\mplayer
;
; This script is based on VRA.nsi, but it remember the directory,
; has uninstall support and (optionally) installs start menu shortcuts.
;
; It will install VRA.nsi into a directory that the user selects,
;--------------------------------
; The name of the installer
Name "VRA installer"
InstallDir "C:\VRA"
; The file to write
; OutFile "example2.exe"
OutFile "VRA_Installer.exe"
RequestExecutionLevel admin
; The default installation directory
;InstallDir $PROGRAMFILES\VRA
; Registry key to check for directory (so if you install again, it will
; overwrite the old one automatically)
InstallDirRegKey HKLM "Software\VRA" "Install_Dir"
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "VRA (required)"
SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
;File "example2.nsi"
File "bz2.pyd"
File "MSVCP90.dll"
File "MSVCR90.dll"
File "msvcrt.dll"
File "pycpuid._pycpuid.pyd"
File "python27.dll"
File "pywintypes27.dll"
File "screen_left.bmp"
File "select.pyd"
File "unicodedata.pyd"
File "user32.dll"
File "VRA.exe"
File "VRA.exe.manifest"
File "win32api.pyd"
File "win32evtlog.pyd"
File "wx._controls_.pyd"
File "wx._core_.pyd"
File "wx._gdi_.pyd"
File "wx._misc_.pyd"
File "wx._windows_.pyd"
File "wxbase30u_net_vc90.dll"
File "wxbase30u_vc90.dll"
File "wxmsw30u_adv_vc90.dll"
File "wxmsw30u_core_vc90.dll"
File "wxmsw30u_html_vc90.dll"
File "_ctypes.pyd"
File "_hashlib.pyd"
File "_socket.pyd"
File "_ssl.pyd"
File "mplayer.exe"
CreateDirectory $INSTDIR\mplayer
SetOutPath $INSTDIR\mplayer
File "mplayer\config"
SetOutPath $INSTDIR
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\VRA "Install_Dir" "$INSTDIR"
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Run" Shell "$INSTDIR\VRA.exe"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "VRA" "VRA"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "Uninstall_VRA" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA" "NoRepair" 1
WriteUninstaller "uninstall.exe"
SectionEnd
; Optional section (can be disabled by the user)
Section "Start Menu Shortcuts"
CreateDirectory "$SMPROGRAMS\VRA"
CreateShortCut "$SMPROGRAMS\VRA\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\VRA\VRA.lnk" "$INSTDIR\VRA.exe" "" "$INSTDIR\VRA.exe" 0
SectionEnd
; Optional section (can be disabled by the user)
Section "Desktop Shortcuts" SectionX
SetShellVarContext current
CreateShortCut "$DESKTOP\VRA.lnk" "$INSTDIR\VRA.exe"
;WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\layers" "$INSTDIR\VRA.exe" "RUNASADMIN"
SectionEnd
;--------------------------------
; Uninstaller
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VRA"
DeleteRegKey HKLM SOFTWARE\VRA
; Remove files and uninstaller
;Delete $INSTDIR\example2.nsi
;Delete $INSTDIR\uninstall.exe
Delete "$INSTDIR\bz2.pyd"
Delete "$INSTDIR\Microsoft.VC90.CRT.manifest"
Delete "$INSTDIR\msvcm90.dll"
Delete "$INSTDIR\msvcp90.dll"
Delete "$INSTDIR\msvcr90.dll"
Delete "$INSTDIR\msvcrt.dll"
Delete "$INSTDIR\pycpuid._pycpuid.pyd"
Delete "$INSTDIR\python27.dll"
Delete "$INSTDIR\pywintypes27.dll"
Delete "$INSTDIR\screen_left.bmp"
Delete "$INSTDIR\select.pyd"
Delete "$INSTDIR\unicodedata.pyd"
Delete "$INSTDIR\user32.dll"
Delete "$INSTDIR\VRA.exe"
Delete "$INSTDIR\VRA.exe.manifest"
Delete "$INSTDIR\win32api.pyd"
Delete "$INSTDIR\win32evtlog.pyd"
Delete "$INSTDIR\wx._controls_.pyd"
Delete "$INSTDIR\wx._core_.pyd"
Delete "$INSTDIR\wx._gdi_.pyd"
Delete "$INSTDIR\wx._misc_.pyd"
Delete "$INSTDIR\wx._windows_.pyd"
Delete "$INSTDIR\wxbase30u_net_vc90.dll"
Delete "$INSTDIR\wxbase30u_vc90.dll"
Delete "$INSTDIR\wxmsw30u_adv_vc90.dll"
Delete "$INSTDIR\wxmsw30u_core_vc90.dll"
Delete "$INSTDIR\wxmsw30u_html_vc90.dll"
Delete "$INSTDIR\_ctypes.pyd"
Delete "$INSTDIR\_hashlib.pyd"
Delete "$INSTDIR\_socket.pyd"
Delete "$INSTDIR\_ssl.pyd"
Delete "$INSTDIR\mplayer.exe"
Delete "$INSTDIR\mplayer\config"
Delete "init.check"
Delete "init.video"
Delete "kamhearing.log"
Delete "player_reg.dll"
Delete "uninstall.exe"
; Remove shortcuts, if any
Delete "$SMPROGRAMS\VRA\*.*"
Delete "$SMPROGRAMS\VRA\VRA.lnk"
; Remove directories used
RMDir "$SMPROGRAMS\VRA"
RMDir "$INSTDIR\mplayer"
RMDir "$INSTDIR"
SectionEnd