Anri-chan/Source/anrichan.nsi

From SDA Knowledge Base

< Anri-chan‎ | Source
Revision as of 20:34, 9 July 2008 by Ballofsnow (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Anri-chan"
!define PRODUCT_VERSION "3 beta 3"
!define PRODUCT_PUBLISHER "Speed Demos Archive"
!define PRODUCT_WEB_SITE "http://speeddemosarchive.com/"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\anri.bat"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "C:\Program Files\anrichan3\anri.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "C:\Program Files\anrichan3\license.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\anri.bat"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "anrichan3_beta3.exe"
InstallDir "$PROGRAMFILES\anrichan3_beta3"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
  SetOutPath "$INSTDIR"
  SetOverwrite try
  File "C:\Program Files\anrichan3\anri.bat"
  File "C:\Program Files\anrichan3\anri.ico"
  File "C:\Program Files\anrichan3\AnriAutoSettings.bat"
  File "C:\Program Files\anrichan3\anridesktoploc.bat"
  File "C:\Program Files\anrichan3\anridesktoploc.bat.bak"
  File "C:\Program Files\anrichan3\audioout.vcf"
  File "C:\Program Files\anrichan3\aviwriter.dll"
  File "C:\Program Files\anrichan3\BePipe.exe"
  File "C:\Program Files\anrichan3\cecho.exe"
  File "C:\Program Files\anrichan3\dfnd_data.bat"
  File "C:\Program Files\anrichan3\dfnd_titles.bat"
  File "C:\Program Files\anrichan3\ffmpeg.exe"
  File "C:\Program Files\anrichan3\fourccc.exe"
  File "C:\Program Files\anrichan3\gawk.exe"
  File "C:\Program Files\anrichan3\ini.bat"
  File "C:\Program Files\anrichan3\license.txt"
  File "C:\Program Files\anrichan3\MP4Box.exe"
  File "C:\Program Files\anrichan3\mplayer.exe"
  File "C:\Program Files\anrichan3\nate.avs"
  File "C:\Program Files\anrichan3\neroAacEnc.exe"
  File "C:\Program Files\anrichan3\nmf.vcf"
  File "C:\Program Files\anrichan3\ntsc_d1.png"
  File "C:\Program Files\anrichan3\pgccount.exe"
  File "C:\Program Files\anrichan3\pthreadGC2.dll"
  File "C:\Program Files\anrichan3\README.url"
  File "C:\Program Files\anrichan3\reg.exe"
  File "C:\Program Files\anrichan3\sed.exe"
  File "C:\Program Files\anrichan3\silence_stereo_48000.wav"
  File "C:\Program Files\anrichan3\statid.bat"
  File "C:\Program Files\anrichan3\tee.exe"
  File "C:\Program Files\anrichan3\TIMEOUT.EXE"
  File "C:\Program Files\anrichan3\wget.exe"
  File "C:\Program Files\anrichan3\x264.exe"
  File "C:\Program Files\anrichan3\xvidcore.dll"
  File "C:\Program Files\anrichan3\xvid_encraw.exe"
  SetOutPath "$INSTDIR\AviSynth"
  File "C:\Program Files\anrichan3\AviSynth\Avisynth_257.exe"
  SetOutPath "$INSTDIR\dgmpgdec150"
  File "C:\Program Files\anrichan3\dgmpgdec150\Bugs_Limitations.txt"
  File "C:\Program Files\anrichan3\dgmpgdec150\Changes.txt"
  File "C:\Program Files\anrichan3\dgmpgdec150\COPYING.txt"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGDecode.dll"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGDecodeManual.html"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGIndex.exe"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGIndex.ini"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGIndexManual.html"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGVfapi.txt"
  File "C:\Program Files\anrichan3\dgmpgdec150\DGVfapi.vfp"
  File "C:\Program Files\anrichan3\dgmpgdec150\infotemplate.avs"
  File "C:\Program Files\anrichan3\dgmpgdec150\QuickStart.html"
  SetOutPath "$INSTDIR\Lagarith_1314"
  File "C:\Program Files\anrichan3\Lagarith_1314\copying.txt"
  File "C:\Program Files\anrichan3\Lagarith_1314\in.bat"
  File "C:\Program Files\anrichan3\Lagarith_1314\lagarith.dll"
  File "C:\Program Files\anrichan3\Lagarith_1314\lagarith.inf"
  File "C:\Program Files\anrichan3\Lagarith_1314\ReadMe.txt"
  File "C:\Program Files\anrichan3\Lagarith_1314\settings.txt"
  SetOutPath "$INSTDIR\mplayer"
  File "C:\Program Files\anrichan3\mplayer\config"
  SetOutPath "$INSTDIR\plugins"
  File "C:\Program Files\anrichan3\plugins\ac3source.dll"
  File "C:\Program Files\anrichan3\plugins\EEDI2.dll"
  File "C:\Program Files\anrichan3\plugins\LeakKernelDeint.dll"
  File "C:\Program Files\anrichan3\plugins\MaskTools.dll"
  File "C:\Program Files\anrichan3\plugins\MCBob_v03c.avs"
  File "C:\Program Files\anrichan3\plugins\mpasource.dll"
  File "C:\Program Files\anrichan3\plugins\MPASource.htm"
  File "C:\Program Files\anrichan3\plugins\mvbob.avs"
  File "C:\Program Files\anrichan3\plugins\MVTools.dll"
  File "C:\Program Files\anrichan3\plugins\RemoveGrain_v10pre1.dll"
  File "C:\Program Files\anrichan3\plugins\TomsMoComp.dll"
  File "C:\Program Files\anrichan3\plugins\UnDot.dll"
  SetOutPath "$INSTDIR\VirtualDub-1.7.6"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\auxsetup.exe"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\copying"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\vdicmdrv.dll"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\vdremote.dll"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\vdsvrlnk.dll"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\vdub.exe"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\VirtualDub.chm"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\VirtualDub.exe"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\VirtualDub.vdi"
  SetOutPath "$INSTDIR\VirtualDub-1.7.6\aviproxy"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\aviproxy\proxyoff.reg"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\aviproxy\proxyon.reg"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\aviproxy\readme.txt"
  SetOutPath "$INSTDIR\VirtualDub-1.7.6\plugins"
  File "C:\Program Files\anrichan3\VirtualDub-1.7.6\plugins\readme.txt"

  CreateShortCut "$DESKTOP\Anri-chan.lnk" "$INSTDIR\anri.bat" "" "$INSTDIR\anri.ico" "" "" "" "ON HERMESUS LUC ARSUS ESTARIAS AUC ELTRAS LI CELES!"
SectionEnd

Section -AdditionalIcons
  CreateDirectory "$SMPROGRAMS\Anri-chan"
  CreateShortCut "$SMPROGRAMS\Anri-chan\Anri-chan.lnk" "$INSTDIR\anri.bat" "" "$INSTDIR\anri.ico" "" "" "" "ON HERMESUS LUC ARSUS ESTARIAS AUC ELTRAS LI CELES!"
  CreateShortCut "$SMPROGRAMS\Anri-chan\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
  WriteUninstaller "$INSTDIR\uninst.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\anri.bat"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\anri.bat"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd

Section -Lagarith
  Exec "rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 0 $INSTDIR\Lagarith_1314\lagarith.inf"
SectionEnd

Section AviSynth
  Exec "$INSTDIR\AviSynth\Avisynth_257.exe"
SectionEnd

Function un.onUninstSuccess
  HideWindow
  MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd

Function un.onInit
  MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
  Abort
FunctionEnd

Section Uninstall
  Exec "rundll32.exe setupapi.dll,InstallHinfSection DefaultUninstall 132 C:\WINDOWS\INF\LAGARITH.INF"
  Delete "$INSTDIR\uninst.exe"
  
  Delete "$INSTDIR\anri.bat"
  Delete "$INSTDIR\anri.ico"
  Delete "$INSTDIR\AnriAutoSettings.bat"
  Delete "$INSTDIR\anridesktoploc.bat"
  Delete "$INSTDIR\anridesktoploc.bat.bak"
  Delete "$INSTDIR\audioout.vcf"
  Delete "$INSTDIR\aviwriter.dll"
  Delete "$INSTDIR\BePipe.exe"
  Delete "$INSTDIR\cecho.exe"
  Delete "$INSTDIR\dfnd_data.bat"
  Delete "$INSTDIR\dfnd_titles.bat"
  Delete "$INSTDIR\ffmpeg.exe"
  Delete "$INSTDIR\fourccc.exe"
  Delete "$INSTDIR\gawk.exe"
  Delete "$INSTDIR\ini.bat"
  Delete "$INSTDIR\license.txt"
  Delete "$INSTDIR\MP4Box.exe"
  Delete "$INSTDIR\mplayer.exe"
  Delete "$INSTDIR\nate.avs"
  Delete "$INSTDIR\neroAacEnc.exe"
  Delete "$INSTDIR\nmf.vcf"
  Delete "$INSTDIR\ntsc_d1.png"
  Delete "$INSTDIR\pgccount.exe"
  Delete "$INSTDIR\pthreadGC2.dll"
  Delete "$INSTDIR\README.url"
  Delete "$INSTDIR\reg.exe"
  Delete "$INSTDIR\sed.exe"
  Delete "$INSTDIR\silence_stereo_48000.wav"
  Delete "$INSTDIR\statid.bat"
  Delete "$INSTDIR\tee.exe"
  Delete "$INSTDIR\TIMEOUT.EXE"
  Delete "$INSTDIR\wget.exe"
  Delete "$INSTDIR\x264.exe"
  Delete "$INSTDIR\xvidcore.dll"
  Delete "$INSTDIR\xvid_encraw.exe"
  Delete "$INSTDIR\AviSynth\Avisynth_257.exe"
  Delete "$INSTDIR\dgmpgdec150\Bugs_Limitations.txt"
  Delete "$INSTDIR\dgmpgdec150\Changes.txt"
  Delete "$INSTDIR\dgmpgdec150\COPYING.txt"
  Delete "$INSTDIR\dgmpgdec150\DGDecode.dll"
  Delete "$INSTDIR\dgmpgdec150\DGDecodeManual.html"
  Delete "$INSTDIR\dgmpgdec150\DGIndex.exe"
  Delete "$INSTDIR\dgmpgdec150\DGIndex.ini"
  Delete "$INSTDIR\dgmpgdec150\DGIndexManual.html"
  Delete "$INSTDIR\dgmpgdec150\DGVfapi.txt"
  Delete "$INSTDIR\dgmpgdec150\DGVfapi.vfp"
  Delete "$INSTDIR\dgmpgdec150\infotemplate.avs"
  Delete "$INSTDIR\dgmpgdec150\QuickStart.html"
  Delete "$INSTDIR\Lagarith_1314\copying.txt"
  Delete "$INSTDIR\Lagarith_1314\in.bat"
  Delete "$INSTDIR\Lagarith_1314\lagarith.dll"
  Delete "$INSTDIR\Lagarith_1314\lagarith.inf"
  Delete "$INSTDIR\Lagarith_1314\ReadMe.txt"
  Delete "$INSTDIR\Lagarith_1314\settings.txt"
  Delete "$INSTDIR\mplayer\config"
  Delete "$INSTDIR\plugins\ac3source.dll"
  Delete "$INSTDIR\plugins\EEDI2.dll"
  Delete "$INSTDIR\plugins\LeakKernelDeint.dll"
  Delete "$INSTDIR\plugins\MaskTools.dll"
  Delete "$INSTDIR\plugins\MCBob_v03c.avs"
  Delete "$INSTDIR\plugins\mpasource.dll"
  Delete "$INSTDIR\plugins\MPASource.htm"
  Delete "$INSTDIR\plugins\mvbob.avs"
  Delete "$INSTDIR\plugins\MVTools.dll"
  Delete "$INSTDIR\plugins\RemoveGrain_v10pre1.dll"
  Delete "$INSTDIR\plugins\TomsMoComp.dll"
  Delete "$INSTDIR\plugins\UnDot.dll"
  Delete "$INSTDIR\VirtualDub-1.7.6\auxsetup.exe"
  Delete "$INSTDIR\VirtualDub-1.7.6\copying"
  Delete "$INSTDIR\VirtualDub-1.7.6\vdicmdrv.dll"
  Delete "$INSTDIR\VirtualDub-1.7.6\vdremote.dll"
  Delete "$INSTDIR\VirtualDub-1.7.6\vdsvrlnk.dll"
  Delete "$INSTDIR\VirtualDub-1.7.6\vdub.exe"
  Delete "$INSTDIR\VirtualDub-1.7.6\VirtualDub.chm"
  Delete "$INSTDIR\VirtualDub-1.7.6\VirtualDub.exe"
  Delete "$INSTDIR\VirtualDub-1.7.6\VirtualDub.vdi"
  Delete "$INSTDIR\VirtualDub-1.7.6\aviproxy\proxyoff.reg"
  Delete "$INSTDIR\VirtualDub-1.7.6\aviproxy\proxyon.reg"
  Delete "$INSTDIR\VirtualDub-1.7.6\aviproxy\readme.txt"
  Delete "$INSTDIR\VirtualDub-1.7.6\plugins\readme.txt"

  Delete "$SMPROGRAMS\Anri-chan\Uninstall.lnk"
  Delete "$SMPROGRAMS\Anri-chan\Anri-chan.lnk"
  Delete "$DESKTOP\Anri-chan.lnk"

  RMDir "$SMPROGRAMS\Anri-chan"
  RMDir "$INSTDIR\VirtualDub-1.7.6\plugins"
  RMDir "$INSTDIR\VirtualDub-1.7.6\aviproxy"
  RMDir "$INSTDIR\VirtualDub-1.7.6"
  RMDir "$INSTDIR\plugins"
  RMDir "$INSTDIR\mplayer"
  RMDir "$INSTDIR\Lagarith_1314"
  RMDir "$INSTDIR\dgmpgdec150"
  RMDir "$INSTDIR\AviSynth"
  RMDir "$INSTDIR"
  RMDir ""

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd
Personal tools