Chmod binaries so they can be executed

This commit is contained in:
jely2002
2020-04-04 21:25:03 +02:00
parent 6efeba5a1b
commit dbc05154aa
2 changed files with 10 additions and 0 deletions

View File

@@ -14,6 +14,9 @@ if(process.platform === "darwin") {
let appPath = remote.app.getAppPath().slice(0, -8) let appPath = remote.app.getAppPath().slice(0, -8)
youtubedl.setYtdlBinary(appPath + "youtube-dl-darwin") youtubedl.setYtdlBinary(appPath + "youtube-dl-darwin")
ffmpegLoc = appPath + "ffmpeg-darwin" ffmpegLoc = appPath + "ffmpeg-darwin"
fs.chmod(appPath + "youtube-dl-darwin", 0o755, function(err){
if(err) console.log(err)
})
} else { } else {
youtubedl.setYtdlBinary("resources/youtube-dl.exe") youtubedl.setYtdlBinary("resources/youtube-dl.exe")
ffmpegLoc = "resources/ffmpeg.exe" ffmpegLoc = "resources/ffmpeg.exe"

View File

@@ -60,6 +60,13 @@ function update() {
}), }),
'utf8' 'utf8'
) )
if(process.platform === "darwin") {
console.log("Adding chmod permissions")
fs.chmod(filePath, 0o755, function(err){
if(err) console.log(err)
console.log("chmod 0755 added")
})
}
}) })
} }
}) })