This commit is contained in:
Victor Tran 2021-01-29 01:02:34 +11:00
parent 848b568044
commit 26dcc2d3bd
2 changed files with 5 additions and 1 deletions

View file

@ -16,6 +16,10 @@ inputs:
description: 'Libraries (in /usr/local/lib) to embed in the application bundle'
required: false
default: ''
embed-local-libraries-mac:
description: 'Libraries (in application root folder) to embed in the application bundle'
required: false
default: ''
outputs:
image-path:
description: 'Path of the final image'

View file

@ -79,7 +79,7 @@ const fs = require('fs');
if (lib == "") continue;
let libname = lib.substring(lib.lastIndexOf("/") + 1, lib.indexOf(".dylib"));
await exec.exec('cp', ['-R', '-L', lib, `${libDir}/${libname}.1.dylib`]);
await exec.exec('cp', ['-R', '-L', `${process.cwd()}/build/${lib}`, `${libDir}/${libname}.1.dylib`]);
await exec.exec("install_name_tool", ["-change", `${libname}.1.dylib`, `@executable_path/../Libraries/${libname}.1.dylib`, `${bundlePath}/Contents/MacOS/${executableName}`])
if (lib != "the-libs") {
await exec.exec("install_name_tool", ["-change", `libthe-libs.1.dylib`, `@executable_path/../Libraries/libthe-libs.1.dylib`, `${libDir}/${libname}.1.dylib`])