Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Exit MultiMC after Instance has closed #1873
MultiMC version: 0.5.0-develop-971
Operating System: Windows 10 Pro - Build 16179.1000
Summary of the problem:
MultiMC stays open after closing any instance whether the instance was started with the MultiMC UI or with a shortcut using the command "-l myInstance". There is no setting to let MultiMC automatically close after an instance was exited without any error.
The problem is, for example, if I add MultiMC to my Steam Library and configure the launch settings to start my main instance automatically, Steam does recognize MultiMC as the game. The Overlay and Configurations for the Steam Controller work perfect, but after closing Minecraft, Steam does not see this and so it is showing my friends I am playing Minecraft until MultiMC is closed as well.
What should be added:
There should be added an option to enable a feature like this. It would also be great if MultiMC could close itself only if the instance was launched with the command line.
i think this is a good suggestion for an additional command line switch. A workaround for the moment would be adding
as a post exit command. (hope this works, can't test it)
If you want to make it more advanced and make it exit only if started over steam you could start MultiMC with a script that creates some flag file before starting MultiMC and have another script as post exit command that exits MultiMC only if the flag file exists and deletes the flag file. I can sadly not make and post scripts for this as i am not using Windows.
Your idea is great, but it does not work with any modification as I had expected it.
Complete post-exit command is now in my case:
Thanks for your workaround!
So, some ideas and issues related to this:
The reason why a main window is even created when launching a single instance directly is that there's still too much of the application logic attached to it. I was getting crashes without it and wanted to release 0.5.0 ASAP.
added a commit
Apr 30, 2017
Alright, I fixed it up a bit.
Effectively, it should work. Try the develop version :)
MultiMC will now exit after an instance is closed, as long as there are no windows left behind.
I consider this a good enough solution until MultiMC can track running instances even through its own restart.