Script tweaks to fix a couple minor issues.

This commit is contained in:
casey langen 2022-02-20 22:45:51 -08:00
parent 11404b837a
commit 14b27fbaca
3 changed files with 19 additions and 12 deletions

View File

@ -456,6 +456,20 @@ function relink_dynamic_libraries() {
node ${SCRIPTDIR}/relink-dynamic-libraries.js bin/lib
}
function delete_unused_libraries() {
cd bin/lib/
rm *.a 2> /dev/null
rm *.la 2> /dev/null
find . -type l -delete
if [[ $OS == "Darwin" ]]; then
mv libavcodec-musikcube.59.18.100.dylib libavcodec-musikcube.59.dylib
mv libavformat-musikcube.59.16.100.dylib libavformat-musikcube.59.dylib
mv libavutil-musikcube.57.17.100.dylib libavutil-musikcube.57.dylib
mv libswresample-musikcube.4.3.100.dylib libswresample-musikcube.4.dylib
fi
cd ../../
}
clean
mkdir vendor
@ -470,6 +484,7 @@ build_libmicrohttpd
build_ffmpeg
build_lame
build_libopenmpt
delete_unused_libraries
relink_dynamic_libraries
cd ..

View File

@ -23,13 +23,9 @@ if (!mac) {
/* these are the libraries we'll scan, and update linked libraries from
absolute paths to "@rpath/filename" */
const libraries = [
'libavcodec-musikcube.59.18.100.dylib',
'libavcodec-musikcube.59.dylib',
'libavformat-musikcube.59.16.100.dylib',
'libavformat-musikcube.59.dylib',
'libavutil-musikcube.57.17.100.dylib',
'libavutil-musikcube.57.dylib',
'libswresample-musikcube.4.3.100.dylib',
'libswresample-musikcube.4.dylib',
'libcrypto.1.1.dylib',
'libssl.1.1.dylib',
@ -45,13 +41,9 @@ const libraries = [
/* after updating libraries, re-establish symlinks */
const symlinks = [
['libavcodec-musikcube.59.18.100.dylib', 'libavcodec-musikcube.59.dylib'],
['libavcodec-musikcube.59.dylib', 'libavcodec-musikcube.dylib'],
['libavformat-musikcube.59.16.100.dylib', 'libavformat-musikcube.59.dylib'],
['libavformat-musikcube.59.dylib', 'libavformat-musikcube.dylib'],
['libavutil-musikcube.57.17.100.dylib', 'libavutil-musikcube.57.dylib'],
['libavutil-musikcube.57.dylib', 'libavutil-musikcube.dylib'],
['libswresample-musikcube.4.3.100.dylib', 'libswresample-musikcube.4.dylib'],
['libswresample-musikcube.4.dylib', 'libswresample-musikcube.dylib'],
['libcrypto.1.1.dylib', 'libcrypto.dylib'],
['libssl.1.1.dylib', 'libssl.dylib'],

View File

@ -14,10 +14,10 @@ PLATFORM=$(uname)
if [[ "$PLATFORM" == 'Darwin' ]]; then
echo "[stage-static-vendor-libraries] staging macOS .dylib files..."
cp vendor/bin/lib/libavcodec-musikcube*.dylib ./bin/lib
cp vendor/bin/lib/libavformat-musikcube*.dylib ./bin/lib
cp vendor/bin/lib/libavutil-musikcube*.dylib ./bin/lib
cp vendor/bin/lib/libswresample-musikcube*.dylib ./bin/lib
cp vendor/bin/lib/libavcodec-musikcube.59.dylib ./bin/lib
cp vendor/bin/lib/libavformat-musikcube.59.dylib ./bin/lib
cp vendor/bin/lib/libavutil-musikcube.57.dylib ./bin/lib
cp vendor/bin/lib/libswresample-musikcube.4.dylib ./bin/lib
cp vendor/bin/lib/libopus.0.dylib ./bin/lib
cp vendor/bin/lib/libogg.0.dylib ./bin/lib
cp vendor/bin/lib/libvorbis.0.dylib ./bin/lib