BotFramework-Emulator
BotFramework-Emulator copied to clipboard
[Enhancement] Make Emulator a Single Instance Application
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.
- A Windows user opens up an Emulator instance.
- They then double click on a .bot file or use the
bfemulator://protocol to open a conversation with a bot.- 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:
- The macOS user opens up an Emulator instance.
- They then double click on a .bot file or use the
bfemulator://protocol to open a conversation with a bot.- 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.