AEplugin_path

AEplugin_path


AEplugin_path='/Applications/Adobe After Effects 2024/Plug-ins/Topaz Video AI.plugin'

topaz_file="$AEplugin_path/Contents/MacOS/Topaz Video AI"

lib_file="$(readlink -f "$AEplugin_path"/Contents/Frameworks/libvideoai.dylib)"

hex() {

perl -0777pe 's|([0-9a-zA-Z]{2}+(?![^\(]*\)))|\\x${1}|gs' <<<"$1"

}

replace() {

file="$1"

dom=$(hex "$2")

sub=$(hex "$3")

sudo perl -0777pi -e 'BEGIN{$/=\1e8} s|'"$dom"'|'"$sub"'|gs' "$file"

}

prep() {

sudo xattr -r -d com.apple.quarantine "$AEplugin_path"

sudo codesign --force --deep --sign - "$AEplugin_path"

}

patch() {

replace "$topaz_file" 'E85C89000085C0' 'B80100000085C0'

replace "$topaz_file" '680700B4C01D0094' '680700B420008052'

replace "$lib_file" '2A02005420008052' '2A02005400008052'

replace "$lib_file" 'B0014180' 'B0004180'

}

patch

prep

Report Page