Last active
April 19, 2020 16:28
-
-
Save birchb/9ced64ac11b01e39582e9ce925ee7fdd to your computer and use it in GitHub Desktop.
Config file for using Handbrake in Electron
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ! also set ```asar: false``` in electron build process. | |
const path = require('path') | |
const electron = require('electron'); | |
/* path to the HandbrakeCLI executable downloaded by the install script */ | |
let HandbrakeCLIPath = null | |
switch (process.platform) { | |
case 'darwin': | |
// * use this for electron dev | |
// HandbrakeCLIPath = path.join(__dirname, '..', 'bin', 'HandbrakeCLI') | |
// * use this for electron build | |
HandbrakeCLIPath = path.join(__dirname, '..', 'app', 'node_modules', 'handbrake-js', 'bin', 'HandbrakeCLI') | |
break | |
case 'win32': | |
HandbrakeCLIPath = path.join(__dirname, '..', 'bin', 'HandbrakeCLI.exe') | |
break | |
case 'linux': | |
HandbrakeCLIPath = 'HandBrakeCLI' | |
break | |
} | |
exports.HandbrakeCLIPath = HandbrakeCLIPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment