This commit is contained in:
einliterflasche 2025-09-19 02:48:59 +02:00
commit d5b07370e8
No known key found for this signature in database
GPG key ID: 90676A9B07184BC9
4 changed files with 67 additions and 4 deletions

View file

@ -297,16 +297,27 @@ copy_dlls() {
}
setup_path() {
export MINGW_TOOLCHAIN_DIR="$PREFIX/bin"
# Add to PATH only if not already present
if [[ ":$PATH:" != *":$PREFIX/bin:"* ]]; then
export PATH="$PREFIX/bin:$PATH"
export PATH="$MINGW_TOOLCHAIN_DIR:$PATH"
fi
# add path to bashrc
# When running in GitHub Actions, export the toolchain dir for later steps
if [ -n "${GITHUB_ENV:-}" ]; then
echo "MINGW_TOOLCHAIN_DIR=$MINGW_TOOLCHAIN_DIR" >> "$GITHUB_ENV"
fi
# Also add to GITHUB_PATH for GitHub Actions
if [ -n "${GITHUB_PATH:-}" ]; then
echo "$PREFIX/bin" >> "$GITHUB_PATH"
fi
# Add path to .bashrc
if ! grep -q "export PATH=\"$PREFIX/bin:\$PATH\"" ~/.bashrc; then
echo "export PATH=\"$PREFIX/bin:\$PATH\"" >> ~/.bashrc
fi
}
verify_installation() {