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
Expand --data argument to allow for ~/ and such #95
Comments
Expanding You can instead use |
That's what I thought, but didn't seem to be working the way I expected. As makes sense now it appears the
The reason I added the quotes was the desktop file validator complained without them. Assuming it doesn't like the above I think
with or without the equal sign is probably the best bet. |
The error I get if I do with or without equal, but with ~ outside of quotes is: $ desktop-file-validate dist/openage.desktop
dist/openage.desktop: error: value "openage --data ~/.openage/assets %u" for key "Exec" in group "Desktop Entry" contains a reserved character '~' outside of a quote |
Hmm, doesn't like $HOME either. and escape it obviously interprets as literal $ desktop-file-validate dist/openage.desktop
dist/openage.desktop: error: value "openage --data="$HOME/.openage/assets" %u" for key "Exec" in group "Desktop Entry" contains a non-escaped character '$' in a quote, but it should be escaped with two backslashes ("\\$") |
Even more fun with single quotes. $ desktop-file-validate dist/openage.desktop
dist/openage.desktop: error: value "openage --data='$HOME/.openage/assets' %u" for key "Exec" in group "Desktop Entry" contains a reserved character ''' outside of a quote
dist/openage.desktop: error: value "openage --data='$HOME/.openage/assets' %u" for key "Exec" in group "Desktop Entry" contains a reserved character '$' outside of a quote
dist/openage.desktop: error: value "openage --data='$HOME/.openage/assets' %u" for key "Exec" in group "Desktop Entry" contains a reserved character ''' outside of a quote |
I guess that's why you see loads of applications shipping with a core shell script. Then we could do something like... Exec=openage.sh Where openage --data ~/.openage/assets |
That or the asset manager should just be told a mode and it figures out where to look? |
The validator seems to also add
Which I've seen before and seems to match official spec, yet most projects and ones on my system don't have it. |
Ok, I figured out semi clever solution. Setting path, which will expand as expected. Obviously a load of different way to do this, but this seems sensible...and best of all it actually works (assuming you setup data, which I have symbolically link to dev clone). [Desktop Entry]
Exec=openage --data=assets %u
Path=~/.openage/ Everyone good with that? Also means any config will be in working directory. |
Meh, except it prints a warning...not an error though!? $ desktop-file-validate dist/openage.desktop
dist/openage.desktop: warning: value "~/.openage/" for key "Path" in group "Desktop Entry" does not look like an absolute path |
Seems that openage will not load without a terminal available? One has to add
for .desktop file to work Spawned #106. |
I use |
Past that, read the comment. Issues are specific to .desktop files. |
This is the shell's job, why do these damn freedesktop files ignore homedirs? Maybe they have some special replacement format chars, using args and homedirs seems to be a common usecase.. |
http://stackoverflow.com/a/2552458 *nix: |
Kay, good idea. For the |
I suggest to convert assets into that folder already. It doesn't make any sense that the folder created for the assets is not the program is using by default. Another way to go would be let the user input a path and then the converter writes down a config file ready to be read from openage, containing the path. |
Yes, i'll try to invoke the conversion from the game binary as soon as possible (#29), the destination folder will be updated then. |
The problem is the quotation. If you write |
yah didn't read my comments....we can close this. |
As per #81, the
.desktop
file would like to use the following commandIt appears that openage does not expand that and looks for literally
~/.openage/assets
. Would be great to see it expand the argument.The text was updated successfully, but these errors were encountered: