BotFramework-Emulator icon indicating copy to clipboard operation
BotFramework-Emulator copied to clipboard

[Enhancement] Make Emulator a Single Instance Application

Open stevengum opened this issue 6 years ago • 0 comments

Background

When trying to connect to a bot or using the transcript functionality by the Emulator on Windows, a new instance will open up instead of changing the state of the user's currently running Emulator instance.

  1. A Windows user opens up an Emulator instance.
  2. They then double click on a .bot file or use the bfemulator:// protocol to open a conversation with a bot.
  3. A new instance of the Emulator is open and the second instance connects to the bot, etc, while the first instance remains unchanged.

For macOS users, the behavior is as follows:

  1. The macOS user opens up an Emulator instance.
  2. They then double click on a .bot file or use the bfemulator:// protocol to open a conversation with a bot.
  3. The first instance's state is updated and the open Emulator instance connects to the bot, etc.

Changes

By using app.requestSingleInstanceLock() we can restrict the behavior on Windows so that only one instance is running at any given moment.

stevengum avatar May 21 '19 20:05 stevengum