On macOS, you can typically run only a single instance of a specific application (app bundle). When you click the application icon again, it simply brings the already running app to the foreground. This can be worked around using the Terminal command: open -n <path/to/app/bundle.app>.
For Log Viewer, this means we cannot work with several logs simultaneously (without the terminal-based workaround).
The native macOS implementation for this use case would be a document-based application using NSDocument and related classes. However, Avalonia (to my knowledge) does not provide a direct equivalent for this.
So, the easiest way to address this is to bring the terminal-based workaround to the UI, making it possible to run a separate instance in just a few clicks. For example, this can be done by adding a "New Instance" item to the Dock context menu:
I have created a draft implementation here. Note that it requires updating Avalonia from 11.3.11 to 11.3.13. I don't think it's a good idea to update Avalonia solely for such a minor feature, so I will postpone the PR until the dependency is updated in the normal course of development.
On macOS, you can typically run only a single instance of a specific application (app bundle). When you click the application icon again, it simply brings the already running app to the foreground. This can be worked around using the Terminal command:
open -n <path/to/app/bundle.app>.For Log Viewer, this means we cannot work with several logs simultaneously (without the terminal-based workaround).
The native macOS implementation for this use case would be a document-based application using
NSDocumentand related classes. However, Avalonia (to my knowledge) does not provide a direct equivalent for this.So, the easiest way to address this is to bring the terminal-based workaround to the UI, making it possible to run a separate instance in just a few clicks. For example, this can be done by adding a "New Instance" item to the Dock context menu:
I have created a draft implementation here. Note that it requires updating Avalonia from 11.3.11 to 11.3.13. I don't think it's a good idea to update Avalonia solely for such a minor feature, so I will postpone the PR until the dependency is updated in the normal course of development.