diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 49dd619..1753855 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,13 +67,8 @@ jobs: run: | mkdir -p Sources/Firelink - # Download the one-folder macOS build. The direct one-file binary is not code-signable. - curl -fsSL https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos.zip -o yt-dlp.zip - mkdir -p yt-dlp-macos - unzip -q -o yt-dlp.zip -d yt-dlp-macos - mv yt-dlp-macos/yt-dlp_macos Sources/Firelink/yt-dlp - cp -R yt-dlp-macos/_internal Sources/Firelink/_internal - rm -rf yt-dlp.zip yt-dlp-macos + # Download the one-file macOS build. PyInstaller on macOS now properly supports code-signing without corrupting the archive. + curl -fsSL https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos -o Sources/Firelink/yt-dlp chmod +x Sources/Firelink/yt-dlp # Download latest FFmpeg release build for macOS ARM64 from Martin Riedl's build server diff --git a/Scripts/create_app_bundle.sh b/Scripts/create_app_bundle.sh index 2d0bd48..7f1dd70 100755 --- a/Scripts/create_app_bundle.sh +++ b/Scripts/create_app_bundle.sh @@ -28,32 +28,22 @@ is_valid_mach_o() { ensure_ytdlp() { local ytdlp_path="$ROOT_DIR/Sources/Firelink/yt-dlp" - local ytdlp_internal_path="$ROOT_DIR/Sources/Firelink/_internal" - if [[ -x "$ytdlp_path" ]] && [[ -d "$ytdlp_internal_path" ]] && is_valid_mach_o "$ytdlp_path"; then + if [[ -x "$ytdlp_path" ]] && is_valid_mach_o "$ytdlp_path"; then return fi - if ! command -v curl >/dev/null || ! command -v unzip >/dev/null; then - echo "WARNING: yt-dlp or its runtime is missing or malformed, and curl/unzip are not available to refresh it." >&2 + if ! command -v curl >/dev/null; then + echo "WARNING: yt-dlp is missing, and curl is not available to refresh it." >&2 return fi echo "Refreshing bundled yt-dlp runtime..." - local temp_dir - temp_dir="$(mktemp -d)" - curl -fsSL https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos.zip -o "$temp_dir/yt-dlp.zip" - unzip -q -o "$temp_dir/yt-dlp.zip" -d "$temp_dir" - cp "$temp_dir/yt-dlp_macos" "$ytdlp_path" + curl -fsSL https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_macos -o "$ytdlp_path" chmod +x "$ytdlp_path" - - if [[ -d "$temp_dir/_internal" ]]; then - rm -rf "$ROOT_DIR/Sources/Firelink/_internal" - cp -R "$temp_dir/_internal" "$ROOT_DIR/Sources/Firelink/_internal" - touch "$ROOT_DIR/Sources/Firelink/_internal/.gitkeep" - fi - - rm -rf "$temp_dir" + + # Remove legacy _internal directory if it exists + rm -rf "$ROOT_DIR/Sources/Firelink/_internal" } ensure_ytdlp