Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuneLite #489

Closed
wants to merge 3 commits into from
Closed

RuneLite #489

wants to merge 3 commits into from

Conversation

rushsteve1
Copy link

@rushsteve1 rushsteve1 commented Jul 14, 2018

RuneLite OSRS client.
I was having some trouble setting up some persistent files. RuneLite automatically puts 2 files and a folder in the user's home folder which I wanted to avoid doing, but I cannot figure out how to make them persistent in the Flatpak. Some help on this would be greatly appreciated.

RuneLite OSRS client. Persistent cache still needs to be done.
@TingPing
Copy link
Member

RuneLite automatically puts 2 files and a folder in the user's home folder which I wanted to avoid doing, but I cannot figure out how to make them persistent in the Flatpak. Some help on this would be greatly appreciated.

You have to resort to hacks if it makes single files in $HOME like a wrapper script that sets $HOME to a private directory in $XDG_CONFIG_HOME assuming it respects that env var.

@@ -0,0 +1,9 @@
[Desktop Entry]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have data files but never install them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, same thing with the appdata file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed.

"type": "script",
"dest-filename": "runelite",
"commands": [
"ls -R /app | grep jagex",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this good for? Seems to be just a check if the directory exist.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. I forgot to remove that.

"--socket=wayland",
"--socket=pulseaudio",
"--env=JAVA_HOME=/app/jre",
"--persist=~"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if this is actually used. The RuneLite updater seems to be downloading all the game files every time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(You can make multiple --persist options, for example --persist=.foo, --persist=.bar will make the ~/.foo and ~/.bar files/directories persistent.)

@AsciiWolf
Copy link
Contributor

diff --git a/net.runelite.RuneLite.desktop b/net.runelite.RuneLite.desktop
index 89d5cc5..511562c 100644
--- a/net.runelite.RuneLite.desktop
+++ b/net.runelite.RuneLite.desktop
@@ -6,4 +6,4 @@ Comment=RuneLite is a free, open-source and super fast client for Old School Run
 Keywords=games;runescape;osrs;
 Exec=runelite
 Icon=net.runelite.RuneLite
-Categories=Game;MMO;
+Categories=Game;RolePlaying;
diff --git a/net.runelite.RuneLite.json b/net.runelite.RuneLite.json
index 089da41..bb48bd7 100644
--- a/net.runelite.RuneLite.json
+++ b/net.runelite.RuneLite.json
@@ -30,14 +30,16 @@
             "buildsystem": "simple",
             "build-commands": [
                 "install -D runelite /app/bin/runelite",
-                "install -D RuneLite.jar /app/share/RuneLite.jar"
+                "install -D RuneLite.jar /app/share/RuneLite.jar",
+                "install -Dm644 net.runelite.RuneLite.png /app/share/icons/hicolor/128x128/apps/net.runelite.RuneLite.png",
+                "install -Dm644 net.runelite.RuneLite.desktop /app/share/applications/net.runelite.RuneLite.desktop",
+                "install -Dm644 net.runelite.RuneLite.appdata.xml /app/share/appdata/net.runelite.RuneLite.appdata.xml"
             ],
             "sources": [
                 {
                     "type": "script",
                     "dest-filename": "runelite",
                     "commands": [
-                        "ls -R /app | grep jagex",
                         "exec $JAVA_HOME/bin/java -jar /app/share/RuneLite.jar"
                     ]
                 },
@@ -45,6 +47,18 @@
                     "type": "file",
                     "url": "https://github.com/runelite/launcher/releases/download/1.6.0/RuneLite.jar",
                     "sha256": "fdcfdd51b033815c4f45025c315175b8a20cc080b65a8b76aee5519b39e85d60"
+                },
+                {
+                    "type": "file",
+                    "path": "net.runelite.RuneLite.png"
+                },
+                {
+                    "type": "file",
+                    "path": "net.runelite.RuneLite.desktop"
+                },
+                {
+                    "type": "file",
+                    "path": "net.runelite.RuneLite.appdata.xml"
                 }
             ]
         }

Here's a fix to make the desktop/appdata files working (and also to remove the unnecessary check).

Persistent RuneLite files are still an issue; if they have always the same name, you can use --persist, but if their name is changing, you have to use some hack like TingPing suggested.

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add OARS metadata to the appdata file.

@rushsteve1
Copy link
Author

@AsciiWolf Thank you for your patch! And the files do not change name as far as I can tell, but when I tried using --persist on them it generated folders of the same name instead and persisted those.

@AsciiWolf
Copy link
Contributor

@rushsteve1 Ah, weird, I thought that --persist supports files as well. :-/

Keywords=games;runescape;osrs;
Exec=runelite
Icon=net.runelite.RuneLite
Categories=Game;MMO;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be Game;RolePlaying;. It is fixed in my patch.

- Made another attempt at persistence. Doesn't seem to work.
- Added OARS.
@rushsteve1
Copy link
Author

Ok last commit merged @AsciiWolf's patch and added OARS data. I also tried setting a HOME in the launcher script to a folder and then persisting that folder but it didn't seem to work so any more suggestions would be greatly appreciated.
Because to be honest those files cluttering my home folder were what prompted me to do this 🙃

<release version="1.6.0" date="2018-7-7"></release>
</releases>
<update_contact>rushsteve1_at_teknik.io</update_contact>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary empty line. :-)

@AsciiWolf
Copy link
Contributor

@rushsteve1: It's a pity that the persist workaround didn't work. :-/ Maybe @alexlarsson will know more about this?

Got it to at least persist the downloaded files
@rushsteve1
Copy link
Author

I figured out how to persist the downloaded data and the jagexcache which are both folders. The downloaded data was the big thing.
To be honest I have no idea what the two files I cannot persist actually do and they don't seem to affect anything when removed.

@nedrichards
Copy link
Member

bot, build net.runelite.RuneLite

@AsciiWolf
Copy link
Contributor

I can confirm that the issue with persistent files is now fixed. Game is fully playable, however, there are still some minor issues:

  • Button to recover account password does not work.
  • UI is a little glitchy (does not prevent the actual gameplay).
  • Tray icon seems to be empty.

@rushsteve1
Copy link
Author

In response to @AsciiWolf's concerns:

  • The button to recover account password is either an issue opening the browser or with the game itself. Can you create a new account from the game?
  • Do you mean the right sidebar UI? If so then this is a known RuneLite bug and happens on all platforms.
  • I might need to rename the icon for it to work, I'll check on that.

@AsciiWolf
Copy link
Contributor

@rushsteve1:

  • I didn't try to create a new account from the game and I don't have any e-mail address available that I can use to test it.
  • Yes, the right sidebar UI.
  • I found out that the icon is displayed, but placed on the left side of my desktop. Weird, maybe some bug in the TopIcons Plus GNOME Shell extension that I use.

@AsciiWolf
Copy link
Contributor

AsciiWolf commented Jul 19, 2018

@TingPing It looks like that all the issues (except the password recover one and the other two that are not related to the Flatpak) were fixed.

@rushsteve1
Copy link
Author

The Password recover issue is the same as when you click "Create Account" it wont open the browser. I have no idea what would cause that.

@AsciiWolf
Copy link
Contributor

@rushsteve1 I tried to debug this issue, but no luck. I have however found some other errors, but none of them seems to be fatal.

After RuneLite is started, this appears on stdout:

libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: amdgpu_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: amdgpu
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: radeonsi

There are also some javax.net.ssl.SSLHandshakeException warnings in the game log, but they don't seem to affect anything.

@rushsteve1
Copy link
Author

I assume that the driver issues are attempts at loading some form of hardware acceleration. While that would be nice to have I know nothing about Flatpak and drivers, and to be blunt this is a browser game from 2007. The performance requirements are minimal.

The javax.net.ssl.SSLHandshakeException are probably just dropped packets or something, I am not terribly worried about it.

@AsciiWolf
Copy link
Contributor

@rushsteve1 I don't see any problem in the json file. But I found out that RuneLite devs itself recommend disabling 3D acceleration in some cases and RuneLite probably works fine without 3D acceleration.

@AsciiWolf
Copy link
Contributor

Anyway, besides the browser issue and the glitched UI that is an upstream issue, it seems to work fine so this PR can probably be merged. ;-)

@rushsteve1
Copy link
Author

@TingPing @AsciiWolf Is there anything else that needs to be done before this is merged?

@nedrichards
Copy link
Member

Repository has been created: https://github.com/flathub/net.runelite.RuneLite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants