Skip to content

Commit

Permalink
simulator options added
Browse files Browse the repository at this point in the history
  • Loading branch information
justinasRm committed Jun 19, 2024
1 parent be57989 commit ddac620
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions packages/sdk-webos/src/deviceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ export const runWebosSimOrDevice = async () => {
const devices = await parseDevices(c, devicesResponse);
const activeDevices = devices.filter((d) => d.active);

const simOrDevice = await inquirerPrompt({
type: 'list',
name: 'simOrDevice',
message: 'Do you want to run on a simulator or a device?',
choices: ['Simulator', 'Device'],
});

if (simOrDevice.simOrDevice === 'Simulator') {
await launchWebOSimulator(true);
return true;
}

if (device) {
// Running on a device
const actualDevices = devices.filter((d) => d.isDevice);
Expand Down Expand Up @@ -312,6 +324,8 @@ export const runWebosSimOrDevice = async () => {
choices,
});
if (response.chosenDevice) {
console.log('the device is:');
console.log(response.chosenDevice);
return installAndLaunchApp(response.chosenDevice, appPath, tId);
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-webos/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export const checkAndConfigureWebosSdks = async () => {
path.join(sdk, `CLI/bin/ares-setup-device${isSystemWin ? '.cmd' : ''}`)
);
c.cli[CLI_WEBOS_ARES_DEVICE_INFO] = getRealPath(
path.join(sdk, `CLI/bin/ares-device${isSystemWin ? '.cmd' : ''}`)
path.join(sdk, `CLI/bin/ares-device-info${isSystemWin ? '.cmd' : ''}`)
);
c.cli[CLI_WEBOS_ARES_NOVACOM] = getRealPath(path.join(sdk, `CLI/bin/ares-novacom${isSystemWin ? '.cmd' : ''}`));
} else if (sdk && clipathNewVersion) {
} else if (sdk && clipathNewVersion && fsExistsSync(clipathNewVersion + 'ares')) {
c.cli[CLI_WEBOS_ARES] = getRealPath(path.join(clipathNewVersion, `ares${isSystemWin ? '.cmd' : ''}`));
c.cli[CLI_WEBOS_ARES_PACKAGE] = getRealPath(
path.join(clipathNewVersion, `ares-package${isSystemWin ? '.cmd' : ''}`)
Expand Down

0 comments on commit ddac620

Please sign in to comment.