Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; The name of the installer
- Name "DivX v6.10 Decoder"
- !include "Sections.nsh"
- !include "Registry.nsh"
- SetCompressor lzma
- ; The file to write
- OutFile "DivX-Dec.exe"
- XPStyle on
- CRCCheck on
- SetOverwrite ifnewer
- ;AutoCloseWindow true
- ; The default installation directory
- InstallDir $SYSDIR
- SetDatablockOptimize on
- InstType "Full"
- InstType "MPEG4 (ASP) Decoder Only"
- InstType "H264 (AVC) Decoders Only"
- Page components
- Page instfiles
- Section "MS Visual C++ 2005 CRT Redist"
- SectionIn 1 3
- SetOutPath $TEMP
- File VC80CRTRedist.msi
- ExecWait "MsiExec /i VC80CRTRedist.msi /q ARPSYSTEMCOMPONENT=1"
- Delete VC80CRTRedist.msi
- SectionEnd
- Section "!DivX MPEG4 (ASP) Decoder"
- SectionIn 1 2
- SetOutPath $INSTDIR
- File DivXDec.ax
- RegDLL $INSTDIR\DivXDec.ax
- SectionEnd
- Section "!DivX H264 (AVC) Decoder"
- SectionIn 1 3
- SetOutPath $INSTDIR
- File DivXDecH264.ax
- RegDLL $INSTDIR\DivXDecH264.ax
- SectionEnd
- Section "!DivX MKV Splitter"
- SectionIn 1 3
- SetOutPath $INSTDIR
- File DirectShowDemuxFilter.dll
- RegDLL $INSTDIR\DirectShowDemuxFilter.dll
- SectionEnd
- Section "!DivX AAC Decoder"
- SectionIn 1 3
- SetOutPath $INSTDIR
- File divx_dec_aac.dll
- File daac.ax
- RegDLL $INSTDIR\daac.ax
- SectionEnd
- SectionGroup "DivX Common Options:" options_id
- Section "Disable Watermark" watermark_id
- SectionIn 1 2 3
- DetailPrint "Option: Disable Watermark"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "ShowWatermark" 0x00000000
- WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "ShowWatermark" 0x00000000
- SectionEnd
- Section "Disable Deinterlace" deinterlace_id
- DetailPrint "Option: Disable Deinterlace"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "Deinterlace" 0x00000000
- WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "Deinterlace" 0x00000000
- SectionEnd
- Section "Enable Hardware Deinterlace" hwdeinterlace_id
- DetailPrint "Option: Enable Hardware Deinterlace"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "HardwareDeinterlace" 0x00000001
- WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "HardwareDeinterlace" 0x00000001
- SectionEnd
- SectionGroup "Aspect Ratio:" ratio_id
- Section "Prefer container" container_id
- SectionIn 1 2 3
- DetailPrint "Option: Enable Prefer Container Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0000000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0000000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Prefer bitstream" bitstream_id
- DetailPrint "Option: Enable Prefer bitstream Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0100000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0100000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Force square pixels" square_id
- DetailPrint "Option: Enable Force square pixels Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0200000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0200000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Force PAL" pal_id
- DetailPrint "Option: Enable Force PAL Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0300000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0300000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Force NTSC" ntsc_id
- DetailPrint "Option: Enable Force NTSC Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0400000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0400000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Force PAL widescreen" palwide_id
- DetailPrint "Option: Enable Force PAL widescreen Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0500000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0500000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Force NTSC widescreen" ntscwide_id
- DetailPrint "Option: Enable Force NTSC widescreen Aspect Ratio"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0600000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0600000000000000" "REG_QWORD" $0
- SectionEnd
- SectionGroupEnd
- SectionGroupEnd
- SectionGroup "DivX MPEG4 (ASP) Options:" aspoptions_id
- Section "Disable Reduce CPU Spikes" asp_spikes_id
- DetailPrint "ASP Option: Disable Reduce CPU Spikes"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "ReduceCPUSpikes" 0x00000000
- SectionEnd
- SectionGroup "Deblocking:" deblock_id
- Section "Full" full_id
- DetailPrint "ASP Option: Enable Full Deblocking"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" "0000000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Performance-adaptive" adaptive_id
- SectionIn 1 2
- DetailPrint "ASP Option: Enable Performance-adaptive Deblocking"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" "0100000000000000" "REG_QWORD" $0
- SectionEnd
- Section "Off" off_id
- DetailPrint "ASP Option: Deblocking Off"
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" "0200000000000000" "REG_QWORD" $0
- ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "CustomDeblocking" "0000000000000000" "REG_QWORD" $0
- SectionEnd
- SectionGroupEnd
- SectionGroupEnd
- SectionGroup "DivX H264 (AVC) Options:" h264options_id
- Section "Use DXVA acceleration" dxva_id
- SectionIn 1 3
- DetailPrint "H264 Option: Use DXVA acceleration"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "DXVA" 0x00000001
- SectionEnd
- Section "Disable Multithreading" avc_multithread_id
- DetailPrint "H264 Option: Disable Multithreading"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "Multithreading" 0x00000000
- SectionEnd
- Section "Disable Deblocking" avc_deblock_id
- DetailPrint "H264 Option: Disable Deblocking"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "Deblocking" 0x00000000
- SectionEnd
- Section "Disable Low Latency" avc_latency_id
- DetailPrint "H264 Option: Disable Low Latency"
- WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "LowLatency" 0x00000000
- SectionEnd
- SectionGroupEnd
- Function .onInit
- IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
- IntOp $0 $0 ^ ${SF_RO}
- IntOp $0 $0 ^ ${SF_BOLD}
- SectionSetFlags ${options_id} $0
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "ShowWatermark"
- StrCmp $6 "16777216" +2
- SectionSetFlags ${watermark_id} ${SF_SELECTED}
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "Deinterlace"
- StrCmp $6 "0" 0 +2
- SectionSetFlags ${deinterlace_id} ${SF_SELECTED}
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "HardwareDeinterlace"
- StrCmp $6 "16777216" 0 +2
- SectionSetFlags ${hwdeinterlace_id} ${SF_SELECTED}
- IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
- IntOp $0 $0 ^ ${SF_RO}
- IntOp $0 $0 ^ ${SF_BOLD}
- SectionSetFlags ${aspoptions_id} $0
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "ReduceCPUSpikes"
- StrCmp $6 "0" 0 +2
- SectionSetFlags ${asp_spikes_id} ${SF_SELECTED}
- IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
- IntOp $0 $0 ^ ${SF_RO}
- IntOp $0 $0 ^ ${SF_BOLD}
- SectionSetFlags ${deblock_id} $0
- ${registry::Read} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" $6 $7
- StrCmp $7 "REG_QWORD" +3
- ${registry::Read} "HKCU\Software\DivX\Settings\DSAVCDecoder" "PPMode" $6 $7
- StrCmp $7 "REG_QWORD" 0 +5
- StrCmp $6 "0000000000000000" 0 +3
- SectionSetFlags ${full_id} ${SF_SELECTED}
- StrCpy $1 ${full_id}
- StrCmp $6 "0100000000000000" 0 +3
- SectionSetFlags ${adaptive_id} ${SF_SELECTED}
- StrCpy $1 ${adaptive_id}
- StrCmp $6 "0200000000000000" 0 +3
- SectionSetFlags ${off_id} ${SF_SELECTED}
- StrCpy $1 ${off_id}
- IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
- IntOp $0 $0 ^ ${SF_RO}
- IntOp $0 $0 ^ ${SF_BOLD}
- SectionSetFlags ${ratio_id} $0
- ${registry::Read} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" $6 $7
- StrCmp $7 "REG_QWORD" +3
- ${registry::Read} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" $6 $7
- StrCmp $7 "REG_QWORD" 0 +2
- StrCmp $6 "0000000000000000" 0 +3
- SectionSetFlags ${container_id} ${SF_SELECTED}
- StrCpy $2 ${container_id}
- StrCmp $6 "0100000000000000" 0 +3
- SectionSetFlags ${bitstream_id} ${SF_SELECTED}
- StrCpy $2 ${bitstream_id}
- StrCmp $6 "0200000000000000" 0 +3
- SectionSetFlags ${square_id} ${SF_SELECTED}
- StrCpy $2 ${square_id}
- StrCmp $6 "0300000000000000" 0 +3
- SectionSetFlags ${pal_id} ${SF_SELECTED}
- StrCpy $2 ${pal_id}
- StrCmp $6 "0400000000000000" 0 +3
- SectionSetFlags ${ntsc_id} ${SF_SELECTED}
- StrCpy $2 ${ntsc_id}
- StrCmp $6 "0500000000000000" 0 +3
- SectionSetFlags ${palwide_id} ${SF_SELECTED}
- StrCpy $2 ${palwide_id}
- StrCmp $6 "0600000000000000" 0 +3
- SectionSetFlags ${ntscwide_id} ${SF_SELECTED}
- StrCpy $2 ${ntscwide_id}
- IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
- IntOp $0 $0 ^ ${SF_RO}
- IntOp $0 $0 ^ ${SF_BOLD}
- SectionSetFlags ${h264options_id} $0
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "DXVA"
- StrCmp $6 "0" +2
- SectionSetFlags ${dxva_id} ${SF_SELECTED}
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "Multithreading"
- StrCmp $6 "0" 0 +2
- SectionSetFlags ${avc_multithread_id} ${SF_SELECTED}
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "Deblocking"
- StrCmp $6 "0" 0 +2
- SectionSetFlags ${avc_deblock_id} ${SF_SELECTED}
- ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "LowLatency"
- StrCmp $6 "0" 0 +2
- SectionSetFlags ${avc_latency_id} ${SF_SELECTED}
- FunctionEnd
- Function .onSelChange
- !insertmacro StartRadioButtons $1
- !insertmacro RadioButton ${full_id}
- !insertmacro RadioButton ${adaptive_id}
- !insertmacro RadioButton ${off_id}
- !insertmacro EndRadioButtons
- !insertmacro StartRadioButtons $2
- !insertmacro RadioButton ${container_id}
- !insertmacro RadioButton ${bitstream_id}
- !insertmacro RadioButton ${square_id}
- !insertmacro RadioButton ${pal_id}
- !insertmacro RadioButton ${ntsc_id}
- !insertmacro RadioButton ${palwide_id}
- !insertmacro RadioButton ${ntscwide_id}
- !insertmacro EndRadioButtons
- FunctionEnd
- Section "!Write Uninstaller"
- SectionIn 1 2 3
- WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "UninstallString" '"$INSTDIR\DivXDec-uninst.exe"'
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "DisplayName" "DivX Decoder (Remove Only)"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "DisplayIcon" '"$INSTDIR\DivXDec-uninst.exe"'
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "NoModify" "1"
- WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "NoRepair" "1"
- WriteUninstaller $INSTDIR\divxdec-uninst.exe
- SectionEnd
- Section "Uninstall"
- Delete $INSTDIR\DivXDec-uninst.exe
- IfFileExists $INSTDIR\daac.ax 0 +4
- UnRegDLL $INSTDIR\daac.ax
- Delete $INSTDIR\daac.ax
- Delete $INSTDIR\divx_dec_aac.dll
- IfFileExists $INSTDIR\DivXDec.ax 0 +3
- UnRegDLL $INSTDIR\DivXDec.ax
- Delete $INSTDIR\DivXDec.ax
- IfFileExists $INSTDIR\DivXDecH264.ax 0 +3
- UnRegDLL $INSTDIR\DivXDecH264.ax
- Delete $INSTDIR\DivXDecH264.ax
- IfFileExists $INSTDIR\DMFSource.ax 0 +3
- UnRegDLL $INSTDIR\DirectShowDemuxFilter.dll
- Delete $INSTDIR\DirectShowDemuxFilter.dll
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec"
- DeleteRegKey HKCU "Software\DivX\Setting\DSAVCDecoder"
- DeleteRegKey HKCU "Software\DivX\Setting\DSASPDecoder"
- SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment