diff --git a/install.js b/install.js index 28d809b..b7a752a 100755 --- a/install.js +++ b/install.js @@ -10,6 +10,8 @@ const get = require("simple-get"); const tar = require("tar"); const DOWNLOAD_RETRY_ATTEMPTS = 2; +const MACOS_MINIMUM_SUPPORTED_VERSION = 23; +const MACOS_MINIMUM_SUPPORTED_RELEASE = "Sonoma"; function targetFfmpegRelease() { @@ -222,18 +224,20 @@ async function install() { // Ensure the FFmpeg npm cache directory exists. ensureFfmpegCacheDir(); + // Ensure we don't support versions of macOS that are too old. + if(os.platform() === "darwin" && parseInt(os.release()) < MACOS_MINIMUM_SUPPORTED_VERSION) { + + console.error("ffmpeg-for-homebridge: macOS versions older than " + MACOS_MINIMUM_SUPPORTED_RELEASE + " are not supported, you will need to install a working version of FFmpeg manually."); + + process.exit(0); + } + // Determine the download file name for the current platform. const ffmpegDownloadFileName = await getDownloadFileName(); if(!ffmpegDownloadFileName) { - if(os.platform() === "darwin" && parseInt(os.release()) < 24) { - - console.log("ffmpeg-for-homebridge: macOS versions older than 15 (Sequoia) are not supported, you will need to install a working version of FFmpeg manually."); - } else { - - console.log("ffmpeg-for-homebridge: %s %s is not supported, you will need to install a working version of FFmpeg manually.", os.platform, process.arch); - } + console.error("ffmpeg-for-homebridge: %s %s is not supported, you will need to install a working version of FFmpeg manually.", os.platform, process.arch); process.exit(0); } diff --git a/package-lock.json b/package-lock.json index 8890e95..c764905 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ffmpeg-for-homebridge", - "version": "2.1.5", + "version": "2.1.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ffmpeg-for-homebridge", - "version": "2.1.5", + "version": "2.1.6", "hasInstallScript": true, "dependencies": { "dotenv": "^16.4.5", diff --git a/package.json b/package.json index 35e8e5c..dc88dd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ffmpeg-for-homebridge", - "version": "2.1.5", + "version": "2.1.6", "description": "Static FFmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware encoding (h264_v4l2m2m and h264_qsv).", "author": { "name": "The Homebridge Team",