Skip to content

Commit 3d5dc06

Browse files
committed
- Update sources
1 parent 5acd965 commit 3d5dc06

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "maa-star-resonance",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A Star Resonance helper powered by Quasar and MAA frameworks",
55
"productName": "MAA Star Resonance",
66
"author": "ParticleG <particle_g@outlook.com>",

src-electron/service/maa/constants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ export const EMPTY_RECT: api.Rect = {
99
height: 0,
1010
};
1111

12+
export const AGENT_PATH = process.env.PROD
13+
? join(process.resourcesPath, 'app.asar.unpacked', 'node_modules', '@maaxyz', 'maa-node', 'agent')
14+
: undefined;
15+
1216
export const LOG_PATH = process.env.PROD
1317
? join(process.resourcesPath, 'logs')
1418
: resolve(fileURLToPath(new URL('.', import.meta.url)), '../..');

src-electron/service/maa/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import log from 'electron-log';
33
import { inject, injectable } from 'inversify';
44

55
import { GameService } from 'app/src-electron/service/game';
6-
import { LOG_PATH, RESOURCES_PATH } from 'app/src-electron/service/maa/constants';
6+
import { AGENT_PATH, LOG_PATH, RESOURCES_PATH } from 'app/src-electron/service/maa/constants';
77

88
import { MaaServiceTrait } from 'src/types/service/maa';
99
import { AdbDevice, Pipeline } from 'src/types/service/maa/types';
@@ -54,6 +54,7 @@ export class MaaService implements MaaServiceTrait {
5454
throw new Error('Invalid device address');
5555
}
5656
log.info(`Switching to device: ${device.name} (${device.address})`);
57+
log.info(`Using agent path: ${AGENT_PATH}`);
5758
if (this._adbController) {
5859
this._adbController.destroy();
5960
}
@@ -63,6 +64,7 @@ export class MaaService implements MaaServiceTrait {
6364
device.screencap_methods,
6465
device.input_methods,
6566
device.config,
67+
AGENT_PATH,
6668
);
6769

6870
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)