johnramsden / pathofexile-flatpak

Path of Exile Flatpak
https://flatpakrepo.johnramsden.ca
BSD 3-Clause "New" or "Revised" License
11 stars 1 forks source link

error token is "/ 1024" #3

Closed Lrss closed 6 years ago

Lrss commented 6 years ago

Hi I get the following error when the package is installed and tries to run it:

$ flatpak run ca.johnramsden.pathofexile 
#############################################
## Path of Exile Unofficial Flatpak v0.1.1 ##
#############################################

/app/bin/pathofexile.sh: line 27: / 1024: syntax error: operand expected (error token is "/ 1024")

Any idea why this line (VIDEO_MEMORY=$(($(sed -rn 's/.*memory: ([0-9]*).*kbytes/\1/gpI' ${XORG_LOG}) / 1024))) is giving me trouble?

johnramsden commented 6 years ago

It might not be finding your video memory in the log. Does the following output anything for you?

bash -c "sed -rn 's/.*memory: ([0-9]*).*kbytes/\1/gpI' /var/log/Xorg.0.log"

I might have to add a fallback if it's unable to find a value for the memory.

johnramsden commented 6 years ago

So I added a fallback to use the default in case it's unable to find your video memory in 3809c563fecc250a33182df17e7dfe1d5840eb45. I also added an environment variable VIDEO_MEMORY which you can use to explicitly set your video memory if it's not being detected properly.

Do you use the environment variable you can run the flat pack with the following (replacing 1024 with your video memory).

flatpak run --env=VIDEO_MEMORY=1024 ca.johnramsden.pathofexile

I updated the flatpak, maybe you could let me know if it runs without error now after you update, and whether or not it detects your video memory. If it doesn't, and you want me to look into it further if you could post your /var/log/Xorg.0.log I can take a look and see why it's not being found.

Lrss commented 6 years ago

Thanks for the help, your change worked. Here is my /var/log/Xorg.0.log if it's still relevant.