Some wamr-ide improvements (#1354)
including: - enable macOS support - documentation improvements - fix some warnings
This commit is contained in:
@ -33,7 +33,7 @@ export class WasmDebugConfigurationProvider
|
||||
this.port = port;
|
||||
this.hostPath = hostPath;
|
||||
/* linux and windows has different debug configuration */
|
||||
if (os.platform() === 'win32') {
|
||||
if (os.platform() === 'win32' || os.platform() === 'darwin') {
|
||||
this.wasmDebugConfig = {
|
||||
type: 'wamr-debug',
|
||||
name: 'Attach',
|
||||
|
||||
@ -51,7 +51,7 @@ export class DecorationProvider implements vscode.FileDecorationProvider {
|
||||
currentPrjDir =
|
||||
os.platform() === 'win32'
|
||||
? (vscode.workspace.workspaceFolders?.[0].uri.fsPath as string)
|
||||
: os.platform() === 'linux'
|
||||
: os.platform() === 'linux' || os.platform() === 'darwin'
|
||||
? (currentPrjDir = vscode.workspace.workspaceFolders?.[0].uri
|
||||
.path as string)
|
||||
: '';
|
||||
|
||||
@ -58,7 +58,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
runScript = scriptPrefix.concat('run.bat');
|
||||
debugScript = scriptPrefix.concat('boot_debugger_server.bat');
|
||||
destroyScript = scriptPrefix.concat('destroy.bat');
|
||||
} else if (OS_PLATFORM === 'linux') {
|
||||
} else if (OS_PLATFORM === 'linux' || OS_PLATFORM === 'darwin') {
|
||||
buildScript = scriptPrefix.concat('build.sh');
|
||||
runScript = scriptPrefix.concat('run.sh');
|
||||
debugScript = scriptPrefix.concat('boot_debugger_server.sh');
|
||||
@ -90,7 +90,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
if (OS_PLATFORM === 'win32') {
|
||||
currentPrjDir = vscode.workspace.workspaceFolders?.[0].uri
|
||||
.fsPath as string;
|
||||
} else if (OS_PLATFORM === 'linux') {
|
||||
} else if (OS_PLATFORM === 'linux' || OS_PLATFORM === 'darwin') {
|
||||
currentPrjDir = vscode.workspace.workspaceFolders?.[0].uri
|
||||
.path as string;
|
||||
}
|
||||
@ -660,7 +660,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
let _path = curWorkspace.concat(
|
||||
OS_PLATFORM === 'win32'
|
||||
? '\\'
|
||||
: OS_PLATFORM === 'linux'
|
||||
: OS_PLATFORM === 'linux' || OS_PLATFORM === 'darwin'
|
||||
? '/'
|
||||
: '',
|
||||
option
|
||||
|
||||
@ -31,11 +31,11 @@ export class WasmTaskProvider implements vscode.TaskProvider {
|
||||
let targetName =
|
||||
TargetConfigPanel.BUILD_ARGS.output_file_name.split('.')[0];
|
||||
|
||||
if (os.platform() === 'linux' || os.platform() === 'win32') {
|
||||
if (os.platform() === 'linux' || os.platform() === 'darwin' || os.platform() === 'win32') {
|
||||
/* build */
|
||||
this.buildShellOption = {
|
||||
cmd:
|
||||
os.platform() === 'linux'
|
||||
os.platform() === 'linux' || os.platform() === 'darwin'
|
||||
? 'bash'
|
||||
: (this._script.get('buildScript') as string),
|
||||
options: {
|
||||
@ -47,7 +47,7 @@ export class WasmTaskProvider implements vscode.TaskProvider {
|
||||
/* debug */
|
||||
this.debugShellOption = {
|
||||
cmd:
|
||||
os.platform() === 'linux'
|
||||
os.platform() === 'linux' || os.platform() === 'darwin'
|
||||
? 'bash'
|
||||
: (this._script.get('debugScript') as string),
|
||||
options: {
|
||||
@ -59,7 +59,7 @@ export class WasmTaskProvider implements vscode.TaskProvider {
|
||||
/* run */
|
||||
this.runShellOption = {
|
||||
cmd:
|
||||
os.platform() === 'linux'
|
||||
os.platform() === 'linux' || os.platform() === 'darwin'
|
||||
? 'bash'
|
||||
: (this._script.get('runScript') as string),
|
||||
options: {
|
||||
@ -72,7 +72,7 @@ export class WasmTaskProvider implements vscode.TaskProvider {
|
||||
/* run */
|
||||
this.destroyShellOption = {
|
||||
cmd:
|
||||
os.platform() === 'linux'
|
||||
os.platform() === 'linux' || os.platform() === 'darwin'
|
||||
? 'bash'
|
||||
: (this._script.get('destroyScript') as string),
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user