Signed-off-by: floatlesss <117862164+floatlesss@users.noreply.github.com>

fix(vscodedevcontainer): fix-taglib-build-issues - #4749
This commit is contained in:
floatlesss 2025-11-29 20:07:04 +00:00
parent 131c0c565c
commit 41cc4610af
2 changed files with 32 additions and 1 deletions

View File

@ -56,10 +56,11 @@
],
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "make setup-dev",
"postCreateCommand": "bash .devcontainer/install-taglib.sh",
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"remoteEnv": {
"ND_MUSICFOLDER": "./music",
"ND_DATAFOLDER": "./data"
}
}
}

View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
# 1. Detect Architecture
ARCH=$(dpkg --print-architecture)
TAGLIB_VERSION="v2.1.1-1"
case $ARCH in
"amd64")
DOWNLOAD_ARCH="linux-amd64"
;;
"arm64")
DOWNLOAD_ARCH="linux-arm64"
;;
*)
echo "Unsupported architecture: $ARCH"
exit 1
;;
esac
URL="https://github.com/navidrome/cross-taglib/releases/download/${TAGLIB_VERSION}/taglib-${DOWNLOAD_ARCH}.tar.gz"
echo "Downloading TagLib for ${ARCH} from ${URL}"
wget "$URL" -O /tmp/cross-taglib.tar.gz
sudo tar -xzf /tmp/cross-taglib.tar.gz -C /usr --strip-components=1
sudo mv /usr/include/taglib/* /usr/include
sudo rm /tmp/cross-taglib.tar.gz /usr/provenance.json
echo "TagLib installation complete"