Guest User

DivX Decoder Only 6.10

a guest
Nov 15th, 2011
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; The name of the installer
  2. Name "DivX v6.10 Decoder"
  3.  
  4. !include "Sections.nsh"
  5. !include "Registry.nsh"
  6.  
  7. SetCompressor lzma
  8.  
  9. ; The file to write
  10. OutFile "DivX-Dec.exe"
  11.  
  12. XPStyle on
  13.  
  14. CRCCheck on
  15.  
  16. SetOverwrite ifnewer
  17. ;AutoCloseWindow true
  18.  
  19. ; The default installation directory
  20. InstallDir $SYSDIR
  21.  
  22. SetDatablockOptimize on
  23.  
  24. InstType "Full"
  25. InstType "MPEG4 (ASP) Decoder Only"
  26. InstType "H264 (AVC) Decoders Only"
  27.  
  28. Page components
  29. Page instfiles
  30.  
  31. Section "MS Visual C++ 2005 CRT Redist"
  32.     SectionIn 1 3
  33.     SetOutPath $TEMP
  34.     File VC80CRTRedist.msi
  35.     ExecWait "MsiExec /i VC80CRTRedist.msi /q ARPSYSTEMCOMPONENT=1"
  36.     Delete VC80CRTRedist.msi
  37. SectionEnd
  38.  
  39. Section "!DivX MPEG4 (ASP) Decoder"
  40.     SectionIn 1 2
  41.     SetOutPath $INSTDIR
  42.     File DivXDec.ax
  43.     RegDLL $INSTDIR\DivXDec.ax
  44. SectionEnd
  45.  
  46. Section "!DivX H264 (AVC) Decoder"
  47.     SectionIn 1 3
  48.     SetOutPath $INSTDIR
  49.     File DivXDecH264.ax
  50.     RegDLL $INSTDIR\DivXDecH264.ax
  51. SectionEnd
  52.  
  53. Section "!DivX MKV Splitter"
  54.     SectionIn 1 3
  55.     SetOutPath $INSTDIR
  56.     File DirectShowDemuxFilter.dll
  57.     RegDLL $INSTDIR\DirectShowDemuxFilter.dll
  58. SectionEnd
  59.  
  60. Section "!DivX AAC Decoder"
  61.     SectionIn 1 3
  62.     SetOutPath $INSTDIR
  63.     File divx_dec_aac.dll
  64.     File daac.ax
  65.     RegDLL $INSTDIR\daac.ax
  66. SectionEnd
  67.  
  68. SectionGroup "DivX Common Options:" options_id
  69.  
  70. Section "Disable Watermark" watermark_id
  71.     SectionIn 1 2 3
  72.     DetailPrint "Option: Disable Watermark"
  73.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "ShowWatermark" 0x00000000
  74.     WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "ShowWatermark" 0x00000000
  75. SectionEnd
  76.  
  77. Section "Disable Deinterlace" deinterlace_id
  78.     DetailPrint "Option: Disable Deinterlace"
  79.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "Deinterlace" 0x00000000
  80.     WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "Deinterlace" 0x00000000
  81. SectionEnd
  82.  
  83. Section "Enable Hardware Deinterlace" hwdeinterlace_id
  84.     DetailPrint "Option: Enable Hardware Deinterlace"
  85.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "HardwareDeinterlace" 0x00000001
  86.     WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "HardwareDeinterlace" 0x00000001
  87. SectionEnd
  88.  
  89. SectionGroup "Aspect Ratio:" ratio_id
  90.  
  91. Section "Prefer container" container_id
  92.     SectionIn 1 2 3
  93.     DetailPrint "Option: Enable Prefer Container Aspect Ratio"
  94.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0000000000000000" "REG_QWORD" $0
  95.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0000000000000000" "REG_QWORD" $0
  96. SectionEnd
  97.  
  98. Section "Prefer bitstream" bitstream_id
  99.     DetailPrint "Option: Enable Prefer bitstream Aspect Ratio"
  100.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0100000000000000" "REG_QWORD" $0
  101.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0100000000000000" "REG_QWORD" $0
  102. SectionEnd
  103.  
  104. Section "Force square pixels" square_id
  105.     DetailPrint "Option: Enable Force square pixels Aspect Ratio"
  106.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0200000000000000" "REG_QWORD" $0
  107.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0200000000000000" "REG_QWORD" $0
  108. SectionEnd
  109.  
  110. Section "Force PAL" pal_id
  111.     DetailPrint "Option: Enable Force PAL Aspect Ratio"
  112.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0300000000000000" "REG_QWORD" $0
  113.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0300000000000000" "REG_QWORD" $0
  114. SectionEnd
  115.  
  116. Section "Force NTSC" ntsc_id
  117.     DetailPrint "Option: Enable Force NTSC Aspect Ratio"
  118.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0400000000000000" "REG_QWORD" $0
  119.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0400000000000000" "REG_QWORD" $0
  120. SectionEnd
  121.  
  122. Section "Force PAL widescreen" palwide_id
  123.     DetailPrint "Option: Enable Force PAL widescreen Aspect Ratio"
  124.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0500000000000000" "REG_QWORD" $0
  125.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0500000000000000" "REG_QWORD" $0
  126. SectionEnd
  127.  
  128. Section "Force NTSC widescreen" ntscwide_id
  129.     DetailPrint "Option: Enable Force NTSC widescreen Aspect Ratio"
  130.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" "0600000000000000" "REG_QWORD" $0
  131.     ${registry::Write} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" "0600000000000000" "REG_QWORD" $0
  132. SectionEnd
  133.  
  134. SectionGroupEnd
  135.  
  136. SectionGroupEnd
  137.  
  138. SectionGroup "DivX MPEG4 (ASP) Options:" aspoptions_id
  139.  
  140. Section "Disable Reduce CPU Spikes" asp_spikes_id
  141.     DetailPrint "ASP Option: Disable Reduce CPU Spikes"
  142.     WriteRegDWORD HKCU "Software\DivX\Settings\DSASPDecoder" "ReduceCPUSpikes" 0x00000000
  143. SectionEnd
  144.  
  145. SectionGroup "Deblocking:" deblock_id
  146.  
  147. Section "Full" full_id
  148.     DetailPrint "ASP Option: Enable Full Deblocking"
  149.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" "0000000000000000" "REG_QWORD" $0
  150. SectionEnd
  151.  
  152. Section "Performance-adaptive" adaptive_id
  153.     SectionIn 1 2
  154.     DetailPrint "ASP Option: Enable Performance-adaptive Deblocking"
  155.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" "0100000000000000" "REG_QWORD" $0
  156. SectionEnd
  157.  
  158. Section "Off" off_id
  159.     DetailPrint "ASP Option: Deblocking Off"
  160.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" "0200000000000000" "REG_QWORD" $0
  161.     ${registry::Write} "HKCU\Software\DivX\Settings\DSASPDecoder" "CustomDeblocking" "0000000000000000" "REG_QWORD" $0
  162. SectionEnd
  163.  
  164. SectionGroupEnd
  165.  
  166. SectionGroupEnd
  167.  
  168. SectionGroup "DivX H264 (AVC) Options:" h264options_id
  169.  
  170. Section "Use DXVA acceleration" dxva_id
  171.     SectionIn 1 3
  172.     DetailPrint "H264 Option: Use DXVA acceleration"
  173.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "DXVA" 0x00000001
  174. SectionEnd
  175.  
  176. Section "Disable Multithreading" avc_multithread_id
  177.     DetailPrint "H264 Option: Disable Multithreading"
  178.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "Multithreading" 0x00000000
  179. SectionEnd
  180.  
  181. Section "Disable Deblocking" avc_deblock_id
  182.     DetailPrint "H264 Option: Disable Deblocking"
  183.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "Deblocking" 0x00000000
  184. SectionEnd
  185.  
  186. Section "Disable Low Latency" avc_latency_id
  187.     DetailPrint "H264 Option: Disable Low Latency"
  188.     WriteRegDWORD HKCU "Software\DivX\Settings\DSAVCDecoder" "LowLatency" 0x00000000
  189. SectionEnd
  190.  
  191. SectionGroupEnd
  192.  
  193. Function .onInit
  194.  
  195.   IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
  196.   IntOp $0 $0 ^ ${SF_RO}
  197.   IntOp $0 $0 ^ ${SF_BOLD}
  198.   SectionSetFlags ${options_id} $0
  199.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "ShowWatermark"
  200.   StrCmp $6 "16777216" +2
  201.    SectionSetFlags ${watermark_id} ${SF_SELECTED}
  202.  
  203.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "Deinterlace"
  204.   StrCmp $6 "0" 0 +2
  205.    SectionSetFlags ${deinterlace_id} ${SF_SELECTED}
  206.  
  207.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "HardwareDeinterlace"
  208.   StrCmp $6 "16777216" 0 +2
  209.    SectionSetFlags ${hwdeinterlace_id} ${SF_SELECTED}
  210.  
  211.   IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
  212.   IntOp $0 $0 ^ ${SF_RO}
  213.   IntOp $0 $0 ^ ${SF_BOLD}
  214.   SectionSetFlags ${aspoptions_id} $0
  215.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSASPDecoder" "ReduceCPUSpikes"
  216.   StrCmp $6 "0" 0 +2
  217.    SectionSetFlags ${asp_spikes_id} ${SF_SELECTED}
  218.  
  219.   IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
  220.   IntOp $0 $0 ^ ${SF_RO}
  221.   IntOp $0 $0 ^ ${SF_BOLD}
  222.   SectionSetFlags ${deblock_id} $0
  223.   ${registry::Read} "HKCU\Software\DivX\Settings\DSASPDecoder" "PPMode" $6 $7
  224.   StrCmp $7 "REG_QWORD" +3
  225.   ${registry::Read} "HKCU\Software\DivX\Settings\DSAVCDecoder" "PPMode" $6 $7
  226.   StrCmp $7 "REG_QWORD" 0 +5
  227.   StrCmp $6 "0000000000000000" 0 +3
  228.    SectionSetFlags ${full_id} ${SF_SELECTED}
  229.    StrCpy $1 ${full_id}
  230.   StrCmp $6 "0100000000000000" 0 +3
  231.    SectionSetFlags ${adaptive_id} ${SF_SELECTED}
  232.    StrCpy $1 ${adaptive_id}
  233.   StrCmp $6 "0200000000000000" 0 +3
  234.    SectionSetFlags ${off_id} ${SF_SELECTED}
  235.    StrCpy $1 ${off_id}
  236.  
  237.   IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
  238.   IntOp $0 $0 ^ ${SF_RO}
  239.   IntOp $0 $0 ^ ${SF_BOLD}
  240.   SectionSetFlags ${ratio_id} $0
  241.   ${registry::Read} "HKCU\Software\DivX\Settings\DSASPDecoder" "AspectRatio" $6 $7
  242.   StrCmp $7 "REG_QWORD" +3
  243.   ${registry::Read} "HKCU\Software\DivX\Settings\DSAVCDecoder" "AspectRatio" $6 $7
  244.   StrCmp $7 "REG_QWORD" 0 +2
  245.   StrCmp $6 "0000000000000000" 0 +3
  246.    SectionSetFlags ${container_id} ${SF_SELECTED}
  247.    StrCpy $2 ${container_id}
  248.   StrCmp $6 "0100000000000000" 0 +3
  249.    SectionSetFlags ${bitstream_id} ${SF_SELECTED}
  250.    StrCpy $2 ${bitstream_id}
  251.   StrCmp $6 "0200000000000000" 0 +3
  252.    SectionSetFlags ${square_id} ${SF_SELECTED}
  253.    StrCpy $2 ${square_id}
  254.   StrCmp $6 "0300000000000000" 0 +3
  255.    SectionSetFlags ${pal_id} ${SF_SELECTED}
  256.    StrCpy $2 ${pal_id}
  257.   StrCmp $6 "0400000000000000" 0 +3
  258.    SectionSetFlags ${ntsc_id} ${SF_SELECTED}
  259.    StrCpy $2 ${ntsc_id}
  260.   StrCmp $6 "0500000000000000" 0 +3
  261.    SectionSetFlags ${palwide_id} ${SF_SELECTED}
  262.    StrCpy $2 ${palwide_id}
  263.   StrCmp $6 "0600000000000000" 0 +3
  264.    SectionSetFlags ${ntscwide_id} ${SF_SELECTED}
  265.    StrCpy $2 ${ntscwide_id}
  266.  
  267.   IntOp $0 ${SF_SECGRP} | ${SF_EXPAND}
  268.   IntOp $0 $0 ^ ${SF_RO}
  269.   IntOp $0 $0 ^ ${SF_BOLD}
  270.   SectionSetFlags ${h264options_id} $0
  271.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "DXVA"
  272.   StrCmp $6 "0" +2
  273.    SectionSetFlags ${dxva_id} ${SF_SELECTED}
  274.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "Multithreading"
  275.   StrCmp $6 "0" 0 +2
  276.    SectionSetFlags ${avc_multithread_id} ${SF_SELECTED}
  277.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "Deblocking"
  278.   StrCmp $6 "0" 0 +2
  279.    SectionSetFlags ${avc_deblock_id} ${SF_SELECTED}
  280.   ReadRegStr $6 HKCU "Software\DivX\Settings\DSAVCDecoder" "LowLatency"
  281.   StrCmp $6 "0" 0 +2
  282.    SectionSetFlags ${avc_latency_id} ${SF_SELECTED}
  283.  
  284. FunctionEnd
  285.  
  286. Function .onSelChange
  287.  
  288.   !insertmacro StartRadioButtons $1
  289.     !insertmacro RadioButton ${full_id}
  290.     !insertmacro RadioButton ${adaptive_id}
  291.     !insertmacro RadioButton ${off_id}
  292.   !insertmacro EndRadioButtons
  293.    
  294.   !insertmacro StartRadioButtons $2
  295.     !insertmacro RadioButton ${container_id}
  296.     !insertmacro RadioButton ${bitstream_id}
  297.     !insertmacro RadioButton ${square_id}
  298.     !insertmacro RadioButton ${pal_id}
  299.     !insertmacro RadioButton ${ntsc_id}
  300.     !insertmacro RadioButton ${palwide_id}
  301.     !insertmacro RadioButton ${ntscwide_id}
  302.   !insertmacro EndRadioButtons
  303.    
  304. FunctionEnd
  305.  
  306. Section "!Write Uninstaller"
  307.     SectionIn 1 2 3
  308.     WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "UninstallString" '"$INSTDIR\DivXDec-uninst.exe"'
  309.     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "DisplayName" "DivX Decoder (Remove Only)"
  310.     WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "DisplayIcon" '"$INSTDIR\DivXDec-uninst.exe"'
  311.     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "NoModify" "1"
  312.     WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec" "NoRepair" "1"
  313.     WriteUninstaller $INSTDIR\divxdec-uninst.exe
  314. SectionEnd
  315.  
  316. Section "Uninstall"
  317.   Delete $INSTDIR\DivXDec-uninst.exe
  318.   IfFileExists $INSTDIR\daac.ax 0 +4
  319.    UnRegDLL $INSTDIR\daac.ax
  320.    Delete $INSTDIR\daac.ax
  321.    Delete $INSTDIR\divx_dec_aac.dll
  322.   IfFileExists $INSTDIR\DivXDec.ax 0 +3
  323.    UnRegDLL $INSTDIR\DivXDec.ax
  324.    Delete $INSTDIR\DivXDec.ax
  325.   IfFileExists $INSTDIR\DivXDecH264.ax 0 +3
  326.    UnRegDLL $INSTDIR\DivXDecH264.ax
  327.    Delete $INSTDIR\DivXDecH264.ax
  328.   IfFileExists $INSTDIR\DMFSource.ax 0 +3
  329.    UnRegDLL $INSTDIR\DirectShowDemuxFilter.dll
  330.    Delete $INSTDIR\DirectShowDemuxFilter.dll
  331.   DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\DivX-Dec"
  332.   DeleteRegKey HKCU "Software\DivX\Setting\DSAVCDecoder"
  333.   DeleteRegKey HKCU "Software\DivX\Setting\DSASPDecoder"
  334. SectionEnd
  335.  
  336.  
Advertisement
Add Comment
Please, Sign In to add comment