5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 05:30:52 +08:00
wails/v3/plugins/single_instance
2023-04-04 18:01:49 +10:00
..
go-singleinstance.LICENSE [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
lock_posix.go [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
lock_windows.go [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
lock.go [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
plugin_darwin.go [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
plugin.go [v3] Improved plugin shutdown 2023-04-04 18:01:49 +10:00
plugin.toml [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00
README.md [v3] Add single_instance plugin 2023-04-01 20:36:55 +11:00

single-instance Plugin

This example plugin provides a way to generate hashes of strings.

Installation

Add the plugin to the Plugins option in the Applications options:

    Plugins: map[string]application.Plugin{
        "single_instance": single_instance.NewPlugin(&single_instance.Config{
            // When true, the original app will be activated when a second instance is launched
            ActivateAppOnSubsequentLaunch: true,
        }
    },

Usage

This plugin prevents the launch of multiple copies of your application. If you set ActivateAppOnSubsequentLaunch to true the original app will be activated when a second instance is launched.

Support

If you find a bug in this plugin, please raise a ticket here. Please do not contact the Wails team for support.

Credit

This plugin contains modified code from the awesome go-singleinstance module (c) 2015 Allan Simon. Original license file has been renamed go-singleinstance.LICENSE and is available here.