desura / desura-app

Free online games platform, with an open source client. In these scenarios, Desura's free online games are the perfect solution. These games don't require a high-powered computer or lengthy installation processes.
https://www.desura.com/
Other
121 stars 31 forks source link

[CLOSED] desura:// links don't work from external browser if client is already opened #515

Closed lodle closed 10 years ago

lodle commented 10 years ago

Issue by Mailaender from Saturday Mar 16, 2013 at 15:31 GMT Originally opened as https://github.com/desura/Desurium/issues/515


I can reproduce it with Firefox 19.0.0.2 and Desurium RC 9:

  1. Fire up Desurium
  2. Go to http://www.desura.com/games/openra
  3. Click http://www.desura.com/games/openra/play
  4. Click desura://launch/games/openra
  5. Choose "Start application: Desura"

Desurium is already running, If it's not, remove "~/.desura/cache/applock".

It should execute the action without requiring the client to be not already running.

lodle commented 10 years ago

Comment by Mailaender from Tuesday Mar 19, 2013 at 08:38 GMT


This might be a KDE and xdg-utils issue:

(2891, son of 2890) /home/abuild/rpmbuild/BUILD/Desurium-0.8.0_rc9/src/static/util/code/UtilLinux.cpp:480 - launchProcessXDG
(2989, son of 2891) /home/abuild/rpmbuild/BUILD/Desurium-0.8.0_rc9/src/static/util/code/UtilLinux.cpp:511 - Launching with xdg-open
(2989, son of 2891) /home/abuild/rpmbuild/BUILD/Desurium-0.8.0_rc9/src/static/util/code/UtilLinux.cpp:514 - Must have failed. Launching with gnome-open

xdg-open is installed, but not gnome-open.

lodle commented 10 years ago

Comment by karolherbst from Tuesday Mar 19, 2013 at 08:46 GMT


"desura://" has to be registered to desurium https://github.com/lodle/Desurium/blob/master/cmake/scripts/desura.desktop#L10

You could also take a look on #518. I think with these changes the desktop file can be installed without any harm

lodle commented 10 years ago

Comment by Mailaender from Tuesday Mar 19, 2013 at 08:57 GMT


This is how the .desktop file currently looks like:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Name=Desurium
GenericName=Digital games distribution client
Type=Application
Comment=Free software version of Desura game client
Exec=desura
TryExec=desura
MimeType=x-scheme-handler/desura;
Icon=desura
Terminal=false
Categories=Game;Amusement;
StartupNotify=false
X-Desktop-File-Install-Version=0.21

It is however heavily edited during RPM installation:

desktop-file-edit --add-category="Amusement" \
                  --set-key="Exec" --set-value="desura" \
                  --set-key="TryExec" --set-value="desura" \
                  --set-icon="desura" \
                  --set-generic-name="Digital games distribution client" \
                  %{buildroot}%{_datadir}/applications/desura.desktop

Maybe I just forgot to update the MIME database on %postinst. Will have a look.

lodle commented 10 years ago

Comment by karolherbst from Tuesday Mar 19, 2013 at 09:00 GMT


with #518 you don't need to modify the generated desktop heavily file anymore.

Just use both cmake options: DESKTOP_EXE (will set Exec and TryExec) and DESKTOP_ICON (will set Icon)

lodle commented 10 years ago

Comment by Mailaender from Wednesday Mar 20, 2013 at 07:02 GMT


https://build.opensuse.org/request/show/160167 might fix it.

lodle commented 10 years ago

Comment by karolherbst from Wednesday Mar 20, 2013 at 08:15 GMT


would make sense

lodle commented 10 years ago

Comment by Mailaender from Monday Mar 25, 2013 at 07:10 GMT


Nope, did not fix it. Desurium does not do any action and shows this pop-up when it is already running.

lodle commented 10 years ago

Comment by Mailaender from Monday Mar 25, 2013 at 07:13 GMT


How to reproduce:

lodle commented 10 years ago

Comment by karolherbst from Wednesday Mar 27, 2013 at 13:27 GMT


strange, executing "desura desura://install/games/project-zomboid/523" will result into the same message, but it will launch the game

lodle commented 10 years ago

Comment by Mailaender from Wednesday Mar 27, 2013 at 13:44 GMT


Well at least we know it is an unknown packaging bug on my side and not a bug in Desurium.

lodle commented 10 years ago

Comment by karolherbst from Wednesday Mar 27, 2013 at 13:48 GMT


it is a desurium bug, because this will fix this with xdg-open: https://github.com/karolherbst/Desurium/commit/fe065f8c8254069977af063c5287b58a040b4986

lodle commented 10 years ago

Comment by karolherbst from Wednesday Mar 27, 2013 at 13:49 GMT


but the error mesage is still appearing

lodle commented 10 years ago

Comment by Mailaender from Wednesday Mar 27, 2013 at 13:54 GMT


Maybe just hide it as a legitimate debug warning and don't have it pop-up to annoy the user.