Merge pull request #3139 from lissyx/electron-builder-win

Fix #3127: Adjust PATH for electronjs/windows with electron-builder
This commit is contained in:
lissyx 2020-07-08 01:13:10 +02:00 committed by GitHub
commit fe7fdb95f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -8,7 +8,13 @@ const binding_path = binary.find(path.resolve(path.join(__dirname, 'package.json
// @loader_path/../ but we can change the PATH to include the proper directory // @loader_path/../ but we can change the PATH to include the proper directory
// for the dynamic linker // for the dynamic linker
if (process.platform === 'win32') { if (process.platform === 'win32') {
const dslib_path = path.resolve(path.join(binding_path, '../..')); var dslib_path = path.resolve(path.join(binding_path, '../..'));
// electron-builder does weird magic hand-in-hand with electronjs,
// and messes with the path where we expect things to be for the Windows
// linker.
if ('electron' in process.versions) {
dslib_path = dslib_path.replace("app.asar", "app.asar.unpacked");
}
var oldPath = process.env.PATH; var oldPath = process.env.PATH;
process.env['PATH'] = `${dslib_path};${process.env.PATH}`; process.env['PATH'] = `${dslib_path};${process.env.PATH}`;
} }

View File

@ -163,11 +163,11 @@ system:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1.1.bf55d362bb11e973b8f5.1.a3e5bf44d.1.android-armv7/artifacts/public/home.tar.xz" url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1.1.bf55d362bb11e973b8f5.1.a3e5bf44d.1.android-armv7/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1.1.bf55d362bb11e973b8f5.1.a3e5bf44d.1.android-armv7" namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1.1.bf55d362bb11e973b8f5.1.a3e5bf44d.1.android-armv7"
win_amd64_cpu: win_amd64_cpu:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.0.win/artifacts/public/home.tar.xz" url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.1.win/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.0.win" namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.1.win"
win_amd64_cuda: win_amd64_cuda:
url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.0.win-cuda/artifacts/public/home.tar.xz" url: "https://community-tc.services.mozilla.com/api/index/v1/task/project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.1.win-cuda/artifacts/public/home.tar.xz"
namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.0.win-cuda" namespace: "project.deepspeech.tensorflow.pip.r2.2.518c1d04bf55d362bb11e973b8f5d0aa3e5bf44d.1.win-cuda"
username: 'build-user' username: 'build-user'
homedir: homedir:
linux: '/home/build-user' linux: '/home/build-user'