chrishalebarnes / Relaunch

Application and web app launcher for Windows Media Center
GNU General Public License v3.0
8 stars 0 forks source link

Using Relaunch with non listed browsers #1

Open Keylonta opened 7 years ago

Keylonta commented 7 years ago

Chrome and Internet Explorer are the only web browsers available in Relaunch. Is it possible to make other browsers available? There are screenshots of earlier versions of Relaunch that show Opera available from the drop-down menu but this is not the case for the latest version. After installing all the various browsers only the above mentioned were available in Relaunch.

The guide for building your own app launcher only gives the coding for when the trigger is set to Close App. What is the coding for when the trigger is set to Green Button? I might be able to create .exe files that open URLs with the browser of my choice and swap them with the existing Relaunch created .exe files at C:\Users\Name\AppData\Local\Relaunch

chrishalebarnes commented 7 years ago

Relaunch tries to find Opera by finding this registry key. Does that not exist on your machine?

I've also had some problems when a browser is installed for all users on the system instead of just a single user. Is Opera installed for all users or just one?

If all else fails, there should be a way to use the command line parameters for Opera to launch it with the right URL by using the custom option in Relaunch as well.

Keylonta commented 7 years ago

Apologies for the late reply, finally got round to installing Opera again to check the registry key. I first installed it for all users, and then uninstalled it and installed it again for a single user. In both cases Opera didn’t show in Relaunch, and only when installed for all users did an Opera registry entry appear in StartMenuInternet, but it appears as OperaStable, not Opera:

HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\OperaStable\shell\open\command

What you said about using command line to launch Opera, are you saying to use the “Custom” option with “Program” to launch Command Prompt to then run the command line? If so, where do I add the command line argument? This kind of stuff is way above my head.

With Relaunch being a stand alone app, how do I access the relaunchForm.cs file that is associated with it so I can edit the registry key address? I can only find that file in the Source Code files. Also, is there a file I can edit after Relaunch has created an Extras entry point, so that the associated web browser/program address can be changed? I’m keen to learn as much as I can so I can future proof Relaunch. This is an invaluable program for MCE users!

chrishalebarnes commented 7 years ago

Hey thanks for getting back! Some bad news: I don't think Opera can be supported. ProcessWaitClose in the autoit script does not work with Opera. I tried a few variations and couldn't get it to work. When Opera launches it uses launcher.exe and then opens a few processes (per tab I think) called opera.exe. When launching Opera from Media Center using Relaunch, it would bring Media Center back as soon as Opera launched, instead of waiting for it to close. So I think that's a no go.

Side note, they changed the registry key, which is why it doesn't work anymore. They also removed the -fullscreen flag, so it cannot be launched in fullscreen or kiosk mode like Chrome and IE can.

To address your questions: You can't edit relaunchForm.cs in place, it has to be compiled first into Relaunch.exe. You'd have to get Visual Studio to do this.

You can't edit the executable that Relaunch makes since it's compiled, but you could make your own launcher manually without Relaunch.

Even if Relaunch went away forever (it won't!), you still could make your own launchers manually. Relaunch automates this process, but with a little elbow grease you could make your own. The original idea came from over here.

Sorry I can't really resolve it because of the way Opera launches itself; Thanks for taking the time to open an issue!

Keylonta commented 7 years ago

Thanks for letting me know about Visual Studio. Are IE and Chrome the only browsers Relaunch supports?

One more thing I thought I’d mention is a bug with Chrome (when Trigger is set to Green Button), that started recently, must of been after an update. The bug happens, on average, about every 6th time a Chrome entry point is launched. Chrome will launch but the split second it launches, it then stalls and closes, leaving MCE minimized. Then the next time a Chrome entry point is launched, it launches correctly, but when selecting the Green Button to close Chrome and relaunch MCE again, MCE relaunches but Chrome does not close. I have tested a few different URLs. Also, the issue does not happen when trigger is set to Close App.

I’ll try and make it more clear by giving step by step instructions:

  1. Create Chrome entry point with trigger set to Green Button.
  2. Launch entry point repeatedly until bug happens.
  3. When bug happens Chrome will launch then instantly close leaving MCE minimized.
  4. Select Green Button to relaunch MCE.
  5. Launch entry point again, Chrome will launch correctly.
  6. Select Green Button to close Chrome and relaunch MCE.
  7. MCE relaunches but Chrome does not close.