rfvgyhn / min-ed-launcher

Minimal Elite Dangerous Launcher
MIT License
252 stars 9 forks source link

Is there a way to have two shortcuts for Steam, one for Odyssey and one for Horizons? #45

Closed Merovech closed 1 year ago

Merovech commented 2 years ago

For various reasons, I still sometimes need to log into Horizons. I use Steam, and based on the instructions it seems like the only way I can do that is to modify the Steam properties, since the desktop shortcut just goes to that.

Is there some way to create two shortcuts, one that uses /edo and one that uses /edh?

(Hopefully I didn't miss that in the instructions!)

rfvgyhn commented 2 years ago

Yes, you can do that. You can right click Elite in steam and select manage > add desktop shortcut. Then you can append your launch options to the shortcut.

Windows: Edit the properties of the shortcut to include your launch params. (e.g. steam://rungameid/359320// /edh) Linux: Edit the .desktop file and set Exec to steam -applaunch 359320 /edh

You can keep any other arguments (i.e. /autorun) in the steam launch options and just move the game version into the shortcut.

Merovech commented 2 years ago

I'm having no luck with this. (Forgot to mention that I'm in Windows here.)

My current Launch Options on Steam: cmd /c "MinEdLauncher.exe %command% /autorun /autoquit"

Current shortcut for Odyssey: steam://rungameid/359320// /edo

I think the result says that it can't find a legitimate product, but the window closes too fast when it fails. I can't prevent the window from closing when that happens.

The problem seems to be that I can't figure out how to get the parameter passed in to include the forward slash.

I've tried about every combination I can think of, including the following.

steam://rungameid/359320 "/edo"    --> Steam tells me the parameter is "edo"
steam://rungameid/359320 //edo     --> Same
steam://rungameid/359320// //edo   --> Steam tells me the parameter is " "
steam://rungameid/359320// \/edo   --> Steam tells me the parameter is "\"
steam://rungameid/359320// ////edo --> Steam tells me the parameter is " "; 
                                       can't figure out how to escape the forward-slash

I even tried modifying the Steam command to this: cmd /c "MinEdLauncher.exe /%command% /autorun /autoquit"

That just sort of... failed. Didn't even show the starting lines of the launcher running.

rfvgyhn commented 2 years ago

When I get back to a windows machine, I'll do some more testing. In the meantime, you should be able to find a log file in the logs folder. That should give a better idea on what's happening.

Merovech commented 2 years ago

Sounds good. I just checked, and as expected the error was "No selected project".

Here's all the remaining information I have for you.

I tried the following and have a log with the results. Let me know if you want me to send it to you. I'm not sure if there's anything in here that constitutes private enough information to warrant not putting it up for all to see on a bug report, but here are the last few lines of the log from the second attempt. It's everyting after the purchase response, and I have done nothing with settings.json so everything there is the default.

2022-02-04 13:39:51.490 -06:00 [DBG] Authorized Products: Elite Dangerous: Odyssey,Elite Dangerous: Horizons,Elite Dangerous,Elite Dangerous: Arena,Single Player Combat Training 2022-02-04 13:39:51.490 -06:00 [INF] Checking for updates 2022-02-04 13:39:51.494 -06:00 [DBG] Disabling 'Single Player Combat Training'. Unable to find product at 'D:\SteamGames\steamapps\common\Elite Dangerous\Products\COMBAT_TUTORIAL_DEMO\VersionInfo.txt' 2022-02-04 13:39:53.797 -06:00 [INF] Available Products: Elite Dangerous: Odyssey FORC-FDEV-DO-1000 Up to Date Elite Dangerous: Horizons FORC-FDEV-D-1013 Up to Date Elite Dangerous FORC-FDEV-D-1010 Up to Date Elite Dangerous: Arena FORC-FDEV-D-1012 Up to Date 2022-02-04 13:39:53.804 -06:00 [ERR] No selected project

To update my previous comment, I tried it with the following two arguments:

steam://rungameid/359320 "/edo"    --> Steam actually said nothing at all.  No popup.
steam://rungameid/359320 //edo     --> Steam tells me the parameter is "edo"

image

claviger commented 2 years ago

The problem is that the launcher expects a / in the argument, and because Steam uses web shortcuts, /s are not handled in a friendly way.

One is to URL-encode the argument, e.g.

steam://rungameid/359320// %2Fedo

However, this will still create the annoying popup.

A better way is to just bypass the Steam protocol handler altogether, so you can use a file shortcut instead of a web shortcut:

"C:\Program Files (x86)\Steam\Steam.exe" -gameidlaunch 359320 /edo

File shortcuts don't care about the / character, and this also avoids the popup.

Merovech commented 2 years ago

Yep, this fixed it. I now have one shortcut to open Odyssey and one to open Horizons. Thanks!

The existing shortcuts to Elite are unusable if you take the second route, which I did because I hate popups. That meant I had to create a new shortcut on Windows, and then (because I'm sometimes weirdly picky) pick Change Icon and navigate to the EDLauncher.exe file to select the appropriate icon for my shortcut. :)

Is this worth putting up on the readme for anyone else trying to do it?

rfvgyhn commented 2 years ago

@claviger Thanks for the insight. Looks like I only ever tested the -auth_password arg.

@Merovech Yeah, definitely should be in the readme.

dreamwraith commented 2 years ago

Definitely in the readme, just spent an hour trying to figure this out before I thought to check the issues :)

Thanks!

y2kmedman commented 1 year ago

Is there a way to do this shortcut for Epic games Elite Dangerous Odyssey?