Advertisement
Guest User

W9R21

a guest
Jan 27th, 2015
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 4.18 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. #  MainScript.sh
  4. #  
  5. #
  6. #  Original Patch by roddy20 on 3/5/14.
  7. #
  8. #  Reworked by copylefter for V9R21 on 07/10/2014
  9. #
  10.  
  11.  
  12. # define
  13. patch_plugin (){
  14. sudo perl -pi -e 's|\x84\xC0\xBF\xEE\xD8\xFF\xFF\x0F\x45\xFE\xE8|\x84\xC0\xBF\x00\x00\x00\x00\x0F\x45\xFE\xE8|g' "$1"
  15. sudo perl -pi -e 's|\x84\xDB\xB8\xEE\xD8\xFF\xFF\x0F\x45\xC1\x48\x81|\x84\xDB\xB8\x00\x00\x00\x00\x0F\x45\xC1\x48\x81|g' "$1"
  16. echo "$1"
  17. }
  18.  
  19. patch_shell (){
  20. sudo perl -pi -e 's|\x84\xC0\xBB\xEE\xD8\xFF\xFF\x0F|\x84\xC0\xBB\x00\x00\x00\x00\x0F|g' "$1"
  21. sudo perl -pi -e 's|\xDB\xB9\xEE\xD8\xFF\xFF\x44\x89|\xDB\xB9\x00\x00\x00\x00\x44\x89|g' "$1"
  22. sudo perl -pi -e 's|\x00\x85\xC0\x75\x3D\x8B\x45\x0C|\x00\x85\xC0\xEB\x3D\x8B\x45\x0C|g' "$1"
  23. sudo perl -pi -e 's|\x48\x85\xC0\x75\x40\x48\x8B\x75|\x48\x85\xC0\xEB\x40\x48\x8B\x75|g' "$1"
  24. echo "$1"
  25. }
  26.  
  27. patch_bundle () {
  28. if [ -d "$1" ]
  29. then
  30. echo $1 " - processing ... "
  31. for i in "$1"*.bundle; do
  32. plugin=${i//.bundle/}
  33. plugin=${plugin//"$1"/}
  34. patch_plugin "$i/Contents/MacOS/$plugin";
  35. done
  36. else
  37. echo $1 " - is not installed"
  38. fi
  39. }
  40.  
  41. # Main Script
  42. if [ -d "/Applications/Waves" ]
  43. then
  44. echo "Starting ..."
  45. patch_bundle /Applications/Waves/Plug-Ins\ V9/
  46. patch_bundle /Applications/Waves/Plug-Ins\ V9/ArtistDLLV9.3/
  47. patch_bundle /Applications/Waves/Plug-Ins\ V9/GTR/
  48. patch_bundle /Applications/Waves/Plug-Ins\ V9/GTRSolo/
  49.  
  50. echo "Patching WaveShells..."
  51. patch_shell /Library/Audio/Plug-Ins/Components/WaveShell-AU\ 9.3.component/Contents/MacOS/WaveShell-AU
  52. patch_shell /Applications/Waves/Waveshells/WaveShell-AU\ 9.3.component/Contents/MacOS/WaveShell-AU
  53. patch_shell /Library/Audio/Plug-Ins/VST3/WaveShell-VST3\ 9.3.vst3/Contents/MacOS/WaveShell-VST3
  54. patch_shell /Applications/Waves/Waveshells/WaveShell-VST3\ 9.3.vst3/Contents/MacOS/WaveShell-VST3
  55. patch_shell /Library/Audio/Plug-Ins/VST/WaveShell-VST\ 9.3.vst/Contents/MacOS/WaveShell-VST
  56. patch_shell /Applications/Waves/Waveshells/WaveShell-VST\ 9.3.vst/Contents/MacOS/WaveShell-VST
  57. patch_shell /Library/Application\ Support/Avid/Audio/Plug-Ins/WaveShell-AAX\ 9.3.aaxplugin/Contents/MacOS/WaveShell-AAX
  58. patch_shell /Applications/Waves/Waveshells/WaveShell-AAX\ 9.3.aaxplugin/Contents/MacOS/WaveShell-AAX
  59. patch_shell /Library/Application\ Support/Digidesign/Plug-Ins/WaveShell-DAE\ 9.3.dpm/Contents/MacOS/WaveShell-DAE
  60. patch_shell /Applications/Waves/Waveshells/WaveShell-DAE\ 9.3.dpm/Contents/MacOS/WaveShell-DAE
  61.  
  62. #if [ -d "/Applications/Waves/Waveshells/WaveShell-WPAPI_1 9.3.bundle" ]
  63. #then
  64. #patch_shell /Applications/Waves/Waveshells/WaveShell-WPAPI_1\ 9.3.bundle/Contents/MacOS/WaveShell-WPAPI_1
  65. #else
  66. #echo "WaveShell-WPAPI_1 9.3.bundle is not installed"
  67. #fi
  68.  
  69. echo "Patching Apps..."
  70. if [ -d "/Applications/Waves/Applications/CODEX App.app" ]
  71. then
  72. patch_shell /Applications/Waves/Applications/CODEX\ App.app/Contents/MacOS/libCODEXAppCore.dylib
  73. else
  74. echo "Element App is not installed"
  75. fi
  76. if [ -d "/Applications/Waves/Applications/Element App.app" ]
  77. then
  78. patch_shell /Applications/Waves/Applications/Element\ App.app/Contents/MacOS/libElementAppCore.dylib
  79. else
  80. echo "Element App is not installed"
  81. fi
  82. if [ -d "/Applications/Waves/Applications/GTR 3.5.app" ]
  83. then
  84. patch_shell /Applications/Waves/Applications/GTR\ 3.5.app/Contents/MacOS/libQtGTRCore.dylib
  85. else
  86. echo "GTR 3.5 App is not installed"
  87. fi
  88. if [ -d "/Applications/Waves/Applications/GTRSolo 3.5.app" ]
  89. then
  90. patch_shell /Applications/Waves/Applications/GTRSolo\ 3.5.app/Contents/MacOS/libQtGTRCore.dylib
  91. else
  92. echo "GTRSolo 3.5 App is not installed"
  93. fi
  94.  
  95. # MultiRack
  96. #if [ -d "/Applications/Waves/MultiRack/MultiRack.app/" ]
  97. #then
  98. #patch_shell /Applications/Waves/MultiRack/MultiRack.app/Contents/MacOS/MultiRackCore.dylib
  99. #else
  100. #echo "MultiRack App is not installed"
  101. #fi
  102. # SoundGrid
  103. #if [ -d "/Applications/Waves/SoundGrid/MultiRack SoundGrid.app/" ]
  104. #then
  105. #patch_shell /Applications/Waves/SoundGrid/MultiRack\ SoundGrid.app/Contents/MacOS/MultiRackCore\ SoundGrid.dylib
  106. #else
  107. #echo "MultiRack SoundGrid App is not installed"
  108. #fi
  109. echo "Finished! Original Patch by roddy20 - reworked for V9R21 by copylefter"
  110. else
  111. echo "Waves is not installed - download and install Waves"
  112. open http://www.waves.com/downloads/v9
  113. echo "Finished. (c) 2014 roddy20"
  114. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement