With the past version of the launcher, I was able to bind my Logitech mouse's settings to Minecraft.app, in order to change the functions of the buttons to more game-specific ones. However, due to the launching technique used in the new Launcher, this is no longer possible.
I believe that applying a bundle ID of "com.Mojang Specifications.Minecraft.Minecraft" to the launched instance would fix this, since it would appear to the system as though the game were the same app as the launcher, but I'm not sure if this is possible. The other option would be to generate an application bundle with the proper ID, then launch that.
Note: I completely understand if you don't want to worry about this, since it's not really an issue with the Launcher on its own, just thought that I'd bring it to your attention. Being able to modify my mouse configuration automatically while playing greatly improves the Minecraft experience, and I'm sure I'm not the only one who uses this sort of setup.
Linked issues
is duplicated by 1
Comments 15
I've done quite a bit of poking around, and unfortunately there's no way to do this directly from the `java` command, since the ID is only defined in the Info.plist file. However, I have managed to create a fake application bundle that launches the game in the same manner as the `java` command you currently run from the launcher! Basically, you can launch the game as a full-fledged application by populating the Info.plist file in the fake bundle with the proper classpath, working directory, etc, and then launch it using the OS X `open` command. Here's the prototype .app bundle that I put together: http://cl.ly/2l342T2Q3J1P
I started with a duplicate of the launcher's bundle and simply tore out the unneeded binary, then modified what it was configured to launch to point at the actual game in ~/Library/Application Support/minecraft. The Info.plist file is commented to point out exactly what I changed, and what needs to be updated each time the launcher goes to run it. I'm not sure what the best method of populating Info.plist would be, I assume Java's libraries contain some sort of XML tool? Probably the best place to keep this dummy application would be in the Launcher's Contents/Resources directory, but obviously I'll defer to you on that. ๐
As I pointed out in the Info.plist file, there are two ways to pass the command line arguments (--username, --session, etc) to Minecraft: add them as an array to Info.plist, or pass them during the call to `open`. I put them into Info.plist just for completeness, but I think that given the situation, the second option would be a lot cleaner. The call to `open` that runs the game would then look something like:
`open "/path/to/MinecraftDev.app/Contents/Resources/launchertest.app" --args --username AwesomePlayer --session blahblah --workDir "/path/to/Application Support/minecraft"`
That'll save a lot of extra work adding them as an array of strings to Info.plist. I tried simply adding them as one string, but it munges up the workDir path thanks to the space in "Application Support". Double and single quotes are both misinterpreted in the string format, which is extremely annoying. So, it's either an array or the above `open` command.
Obviously this isn't an ideal solution, but it's the best that the system will allow. It does have the benefit of allowing the game to act more like a proper app, which could prove handy in the long run. Anyway, thanks for taking the time to look at this issue! This is quite long, so if I've forgotten anything, please poke at me. I'll keep an eye on this.
vil
For interest's sake, it's actually possible to work around this by manually adding the JVM to the Logitech Control Center's list of apps. I've uploaded a sample XML file, with only settings for the JVM, here: http://cl.ly/Q2tx (Fixed link, now points to a zipped file.)
It goes in the directory /Users/whatever/Library/Preferences/. There's probably one already there, so if you just want to add the JVM, copy everything that's between the `<array>` tags into the same spot in your existing configuration. It'll appear in the app list as something similar to "com.apple.javajdk16.cmd" Good luck!
vil
I'm having trouble downloading the file, i also cant find the file you're talking about in my preferences folder.
which file? i tried doing that in the "com.Logitech.Control Center.Assignments.registry" file and searched minecraft, but there was no "<string>" or "</string>
Alright, one last try. Download this, open it. Copy everything in it. http://cl.ly/Q5Of
Now go into the com.Logitech.Control Center.Assignments.registry file and paste it on a new line immediately after the <array> near the top of the file. If that doesn't work, something else is weird and I can't help.
If you can figure out how to actually do this: "applying of a bundle ID" through java, that would be wonderful.
However I think this might be something that LWJGL has to provide.