mortenn / BrowserPicker

Smart browser selector for Windows
MIT License
242 stars 17 forks source link

Net Runtime is missing after isntallation #100

Closed Mart-Bogdan closed 5 months ago

Mart-Bogdan commented 5 months ago

Installer didn't install runtime.

When I open any link it asks me to install runtime image

But clickeing Yes does nothing.

I've tried installing Net 6.0 desktop runtime x64 but it didn't help.

Why app don't bundle runtime with it? dotnep publish should do this trick.

or install it from installer.

mortenn commented 5 months ago

bundling runtime makes the executable kind of big, so I didn't do that for every release once 2.0 gets done I did intend to provide a standalone built executable, though

mortenn commented 5 months ago

Hello, I've just rewritten the configuration part of the app and upgraded it to .NET 8, if you would be so kind as to give this build a try, that'd be great! This does not include the runtime as of yet, but at least it now uses .NET 8

mortenn commented 5 months ago

I have built a portable version of BrowserPicker which bundles the .net runtime with the executable in this build - but I did not make an msi for it at this time.

Mart-Bogdan commented 5 months ago

I've used installer from yesterday, with .NET 8 and it works.

Idk how it would behave on machines without latest dotnet. But it works for me now!

P.S. small offtopic, do I need to reboot my PC after selecting default browser? Because apps are still opening links in Chrome despite I've changed browser to browserpicker. image

mortenn commented 5 months ago

rebooting should not be necessary, no. do they still open in chrome if you close chrome or open edge in addition to chrome?

molohov commented 5 months ago

There's a chicken-egg bug introduced after adding the dialog that asks the user to install the .NET runtime. Since the user (probably) still has BrowserPicker set as the default browser, clicking the link to download the runtime will open BrowserPicker again, which just spawns another dialog box. The only way around this is to unset BrowserPicker as the default browser. Is there a more elegant way around this?

mortenn commented 5 months ago

I did not consider that, I will look into it

mortenn commented 5 months ago

I've had a bit of a think, and there isn't really a solution for this other than to just use the portable version of BrowserPicker, as that version does not require a .net runtime on the machine.

Another working solution would be to add a launcher that is written such that it will not require .net, but that seems ever so slightly silly; so I'm going to say the chicken needs to install the portable version or the runtime before laying that egg.

Mart-Bogdan commented 5 months ago

rebooting should not be necessary, no. do they still open in chrome if you close chrome or open edge in addition to chrome?

Reboot helped me.

So yeas. tomorrow links was opening with Chrome.

Also I've notcied that I have to pick "Always ask" option.

But seems that reboot helped. Tooday everithing works for me.

Thanks!

Mart-Bogdan commented 5 months ago

@molohov perhaps installer can check for dotnet installed? Before Picker is installed.

I think MSI should be able to handle it. And download it if needed.

I recall I've once made installer using MSIS 10 years ago. It was able to download JDK if it wasn't present on machine and launch installer.

But chicken-egg problem is unfortunate. Perhaps make installer call exe just after installation until it is set as default browser?

P.S. Everything works on my side now, with fresh 8.0 build. IDK why id didn't work on 6.0 if I had this Runtime installed. I guess problem can still happen for other, so issue shall still be open?

mortenn commented 5 months ago

if you don't have always ask enabled and a single browser is running, it will just use that browser when you click a link

mortenn commented 5 months ago

looks like wix 4 indeed has added support for checking for .net runtime

I was previously looking for a way to install the runtime automatically but all I found were how to embed the runtime installer in the msi, which I didn't think sounded great.

mortenn commented 5 months ago

once this build finishes, the provided setup should inform you .net 8 is required if it is missing (I have not tested this)

mortenn commented 5 months ago

I believe this should be resolved now, let me know if trouble persists