diff --git a/src/lib/launch.ts b/src/lib/launch.ts index 33ada75..d1aeb0e 100644 --- a/src/lib/launch.ts +++ b/src/lib/launch.ts @@ -146,11 +146,24 @@ export async function launch_renpy({ await vscode.window.showInformationMessage( `Ren'Py Launch and Sync can install a script in your Ren'Py project to synchronize the game and editor. Would you like to install it?`, 'Yes, install', - 'No, do not install' + 'No, do not install', + 'Cancel' ) if (selection === 'Yes, install') { - await install_rpe({ game_root, context }) - } else { + const installed_path = await install_rpe({ + game_root, + context, + }) + const relative_path = path.relative( + vscode.workspace.workspaceFolders?.[0].uri.fsPath ?? + game_root, + installed_path + ) + vscode.window.showInformationMessage( + `Ren'Py Extensions were installed at ${relative_path}`, + 'OK' + ) + } else if (selection === 'No, do not install') { extensions_enabled = false await vscode.workspace .getConfiguration('renpyWarp') @@ -160,6 +173,8 @@ export async function launch_renpy({ 'No RPE script will be installed. Keep in mind that some features may not work as expected.', 'OK' ) + } else { + throw new Error('user cancelled') } } else if (!(await has_current_rpe(renpy_sh))) { await install_rpe({ game_root, context }) diff --git a/src/lib/process.ts b/src/lib/process.ts index 6b1c1a6..bd6c868 100644 --- a/src/lib/process.ts +++ b/src/lib/process.ts @@ -267,7 +267,7 @@ export class ProcessManager { this.instance_status_bar.show() if (this.show_loading) { - this.instance_status_bar.text = `$(loading~spin) Loading...` + this.instance_status_bar.text = `$(loading~spin) Starting Ren'Py...` this.instance_status_bar.command = undefined this.instance_status_bar.tooltip = undefined diff --git a/src/lib/rpe.ts b/src/lib/rpe.ts index 7bebb27..71f96b3 100644 --- a/src/lib/rpe.ts +++ b/src/lib/rpe.ts @@ -16,7 +16,7 @@ export async function install_rpe({ }: { game_root: string context: vscode.ExtensionContext -}): Promise { +}): Promise { const renpy_sh = await get_renpy_sh() if (!renpy_sh) @@ -63,6 +63,8 @@ export async function install_rpe({ } logger.info('wrote rpe to', file_path) + + return file_path } export async function has_any_rpe(): Promise {