Skip to content

Commit

Permalink
Update build scripts
Browse files Browse the repository at this point in the history
Fix #125
  • Loading branch information
rodlie committed Mar 31, 2024
1 parent ac976d1 commit 3620bda
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/scripts/build_vfxplatform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ MKJOBS=${MKJOBS:-4}
SDK_VERSION=${SDK_VERSION:-""}
ONLY_SDK=${ONLY_SDK:-0}
SDK_TAR="${DISTFILES}/friction-vfxplatform-sdk-${SDK_VERSION}.tar"
BUILD_RPM=${REL}
BUILD_RPM=${BUILD_RPM:-1}
DOWNLOAD_SDK=${DOWNLOAD_SDK:-0}

# Download SDK
Expand Down
46 changes: 24 additions & 22 deletions src/scripts/build_vfxplatform_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,30 @@ strip -s ${BUILD}/${FRICTION_PKG}/opt/friction/bin/friction
strip -s ${BUILD}/${FRICTION_PKG}/opt/friction/lib/*so*
strip -s ${BUILD}/${FRICTION_PKG}/opt/friction/plugins/*/*.so

echo "[Paths]" > ${BUILD}/${FRICTION_PKG}/opt/friction/bin/qt.conf
echo "Prefix = .." >> ${BUILD}/${FRICTION_PKG}/opt/friction/bin/qt.conf
echo "Plugins = plugins" >> ${BUILD}/${FRICTION_PKG}/opt/friction/bin/qt.conf

(cd ${BUILD}/${FRICTION_PKG}/opt/friction/bin ; patchelf --set-rpath '$ORIGIN/../lib' friction)
(cd ${BUILD}/${FRICTION_PKG}/opt/friction/lib ;
for so in *.so*; do
patchelf --set-rpath '$ORIGIN' ${so}
done
)

PLUGS="
audio
generic
platforminputcontexts
platforms
xcbglintegrations
"
for pdir in ${PLUGS}; do
for so in ${BUILD}/${FRICTION_PKG}/opt/friction/plugins/${pdir}/*.so; do
patchelf --set-rpath '$ORIGIN/../../lib' ${so}
done
done

# RPM
if [ "${PKG_RPM}" = 1 ]; then
cd ${BUILD}
Expand Down Expand Up @@ -161,30 +185,8 @@ rm -rf usr
mv opt/friction/* .
rm -rf opt share/doc
ln -sf bin/friction .
echo "[Paths]" > bin/qt.conf
echo "Prefix = .." >> bin/qt.conf
echo "Plugins = plugins" >> bin/qt.conf
)
(cd ${FRICTION_PORTABLE_DIR}/bin ; patchelf --set-rpath '$ORIGIN/../lib' friction)
(cd ${FRICTION_PORTABLE_DIR}/lib ;
for so in *.so*; do
patchelf --set-rpath '$ORIGIN' ${so}
done
)

PLUGS="
audio
generic
platforminputcontexts
platforms
xcbglintegrations
"
for pdir in ${PLUGS}; do
for so in ${FRICTION_PORTABLE_DIR}/plugins/${pdir}/*.so; do
patchelf --set-rpath '$ORIGIN/../../lib' ${so}
done
done

cd ${BUILD}
tar cvf ${FRICTION_PORTABLE}.tar ${FRICTION_PORTABLE}
xz -9 ${FRICTION_PORTABLE}.tar
Expand Down

0 comments on commit 3620bda

Please sign in to comment.