Skip to content

Commit

Permalink
Revert ffmpeg in macOS to old mirror, rename ollama (#650)
Browse files Browse the repository at this point in the history
* Use self-hosted runner for release app

* Use preinstalled Ollama

* Fix ffmpeg path

* Rename ollama and use sourceforge for macos

* Fix ffmpeg path

* Use bin for ffmpeg path
  • Loading branch information
Neptune650 authored Nov 7, 2024
1 parent bef4564 commit 0e4da9e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions screenpipe-app-tauri/scripts/pre_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ const config = {
],
},
macos: {
ffmpegName: 'ffmpeg-7.1',
ffmpegUrl: 'https://evermeet.cx/ffmpeg/ffmpeg-7.1.7z',
ffmpegName: 'ffmpeg-7.0-macOS-default',
ffmpegUrl: 'https://master.dl.sourceforge.net/project/avbuild/macOS/ffmpeg-7.0-macOS-default.tar.xz?viasf=1',
},
}

Expand Down Expand Up @@ -524,16 +524,16 @@ if (platform == 'macos') {

// Setup FFMPEG
if (!(await fs.exists(config.ffmpegRealname))) {
await $`wget --no-config -nc ${config.macos.ffmpegUrl} -O ${config.macos.ffmpegName}.7z`
await $`7z e ${config.macos.ffmpegName}.7z -o${config.macos.ffmpegName}`
await $`wget --no-config -nc ${config.macos.ffmpegUrl} -O ${config.macos.ffmpegName}.tar.xz`
await $`tar xf ${config.macos.ffmpegName}.tar.xz`
await $`mv ${config.macos.ffmpegName} ${config.ffmpegRealname}`
await $`rm ${config.macos.ffmpegName}.7z`
await $`rm ${config.macos.ffmpegName}.tar.xz`
} else {
console.log('FFMPEG already exists');
}

// Move and rename ffmpeg and ffprobe binaries
const ffmpegSrc = path.join(cwd, config.ffmpegRealname, 'ffmpeg');
const ffmpegSrc = path.join(cwd, config.ffmpegRealname, 'bin', 'ffmpeg');

// For x86_64
await fs.copyFile(ffmpegSrc, path.join(cwd, 'ffmpeg-x86_64-apple-darwin'));
Expand Down Expand Up @@ -615,6 +615,7 @@ async function installOllamaSidecar() {
if (platform === 'windows' && await fs.exists('C:\\ollama\\')) {
console.log('ollama sidecar already exists. skipping installation.');
await fs.cp('C:\\ollama\\', ollamaDir, {recursive: true});
await fs.rename(path.join(ollamaDir, 'ollama.exe'), path.join(ollamaDir, ollamaExe));
return;
}

Expand Down

0 comments on commit 0e4da9e

Please sign in to comment.