mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
photosfacepatch: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
ebf5d5ca84
commit
f5c6f6ccf1
@ -6,28 +6,58 @@
|
|||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
|
|
||||||
SO_FILE="/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0"
|
SO_FILE1="/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so"
|
||||||
|
SO_FILE2="/var/packages/SynologyPhotos/target/usr/lib/libsynophoto-plugin-platform.so.1.0"
|
||||||
|
if [ -f "${SO_FILE1}" ] || [ -f "${SO_FILE2}" ]; then
|
||||||
|
echo "SynologyPhotos installed -> Patching"
|
||||||
|
else
|
||||||
|
echo "SynologyPhotos not installed -> Exit"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${1}" = "-r" ]; then
|
if [ -f "${SO_FILE1}" ]; then
|
||||||
if [ -f "${SO_FILE}.bak" ]; then
|
SO_FILE="${SO_FILE1}"
|
||||||
mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
|
||||||
|
if [ "${1}" = "-r" ]; then
|
||||||
|
if [ -f "${SO_FILE}.bak" ]; then
|
||||||
|
mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
fi
|
fi
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "${SO_FILE}" ]; then
|
if [ ! -f "${SO_FILE}.bak" ]; then
|
||||||
echo "SynologyPhotos not install"
|
echo "Backup ${SO_FILE}"
|
||||||
exit
|
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "${SO_FILE}.bak" ]; then
|
echo "Patching ${SO_FILE}"
|
||||||
echo "Backup ${SO_FILE}"
|
# support face and concept
|
||||||
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
|
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
|
||||||
|
# force to support concept
|
||||||
|
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
|
||||||
|
# force no Gpu
|
||||||
|
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
|
||||||
fi
|
fi
|
||||||
echo "Patching ${SO_FILE}"
|
if [ -f "${SO_FILE2}" ]; then
|
||||||
# support face and concept
|
SO_FILE="${SO_FILE2}"
|
||||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
|
|
||||||
# force to support concept
|
if [ "${1}" = "-r" ]; then
|
||||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
|
if [ -f "${SO_FILE}.bak" ]; then
|
||||||
# force no Gpu
|
mv -f "${SO_FILE}.bak" "${SO_FILE}"
|
||||||
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
|
fi
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "${SO_FILE}.bak" ]; then
|
||||||
|
echo "Backup ${SO_FILE}"
|
||||||
|
cp -vfp "${SO_FILE}" "${SO_FILE}.bak"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Patching ${SO_FILE}"
|
||||||
|
# support face and concept
|
||||||
|
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform20IsSupportedIENetworkEv" "B8 00 00 00 00 C3"
|
||||||
|
# force to support concept
|
||||||
|
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform18IsSupportedConceptEv" "B8 01 00 00 00 C3"
|
||||||
|
# force no Gpu
|
||||||
|
PatchELFSharp "${SO_FILE}" "_ZN9synophoto6plugin8platform23IsSupportedIENetworkGpuEv" "B8 00 00 00 00 C3"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user