Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpack libraries related to promise-android-tools #1534

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ var buildConfig = {
asarUnpack: [
// Unpack dependencies of pakcages containing binaries
"node_modules/7zip-min/*", // for 7zip-bin
"node_modules/jsonfile/**/*", // for fs-extra
"node_modules/at-least-node/**/*", // for fs-extra
"node_modules/graceful-fs/**/*", // for fs-extra
"node_modules/universalify/**/*", // for fs-extra
"node_modules/fs-extra/**/*", // for promise-android-tools
"node_modules/cancelable-promise/**/*", // for promise-android-tools
"node_modules/promise-android-tools/**/*", // for android-tools-bin
"node_modules/@babel/runtime/**/*" // for android-tools-bin
],
extraMetadata: {
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
global.packageInfo = require("../package.json");

const { DeviceTools } = require("promise-android-tools");
const Api = require("ubports-api-node-module").Installer;
const Store = require("electron-store");

Expand Down Expand Up @@ -57,6 +56,7 @@ const api = new Api({
cachetime: 60000
});
global.api = api;
const { DeviceTools } = require(utils.asarLibPathHack("promise-android-tools"));
const deviceTools = new DeviceTools();
global.deviceTools = deviceTools;
global.adb = deviceTools.adb;
Expand Down