Comments (20)
Expanding ~
the is shell's job. It's not expanded because in your invocation it's in the middle of the string.
You can instead use openage --data "~/.openage/assets"
, or openage --data="$HOME/.openage/assets"
.
from openage.
That's what I thought, but didn't seem to be working the way I expected. As makes sense now it appears the =
sign messes things up since it can then parse the individual parts. So for example the following works:
openage --data ~/.openage/assets
The reason I added the quotes was the desktop file validator complained without them.
Assuming it doesn't like the above I think
"$HOME/.openage/assets"
with or without the equal sign is probably the best bet.
from openage.
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
from openage.
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 ("\\$")
from openage.
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
from openage.
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.sh
contains:
openage --data ~/.openage/assets
from openage.
That or the asset manager should just be told a mode and it figures out where to look?
from openage.
The validator seems to also add
#!/usr/bin/env xdg-open
Which I've seen before and seems to match official spec, yet most projects and ones on my system don't have it.
from openage.
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.
from openage.
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
from openage.
Seems that openage will not load without a terminal available? One has to add
Terminal=true
for .desktop file to work
Spawned #106.
from openage.
I use $HOME/.openage/assets
as my data folder and it works without any problem. As mic-e said, it is shell's work.
from openage.
Past that, read the comment. Issues are specific to .desktop files.
from openage.
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..
from openage.
http://stackoverflow.com/a/2552458
*nix: getenv("HOME")
Windows: getenv("HOMEDRIVE") ++ getenv("HOMEPATH")
from openage.
Kay, good idea. For the per-user
dir that seems to be the way to go.
from openage.
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.
from openage.
Yes, i'll try to invoke the conversion from the game binary as soon as possible (#29), the destination folder will be updated then.
from openage.
The problem is the quotation. If you write --data=~/lol/folder/
it works, your shell just does not expand it in the quotation mark.
from openage.
yah didn't read my comments....we can close this.
from openage.
Related Issues (20)
- "error: βDictβ is not a member of βnyanβ" during build HOT 7
- Can't build with clang, error: "jthread is supported now, remove custom definition" HOT 4
- Asset conversion issue, AttributeError: 'NoneType' object has no attribute 'readable' HOT 6
- Adding PR/ISSUE Templates for this repo HOT 7
- Asset path type is incorrectly used HOT 5
- error: Couldn't find qml root folder HOT 15
- Test fail when building with GCC 13.2.1 HOT 10
- Error launching game, uncaught exception(s) HOT 25
- openage game: error: the following arguments are required: --modpacks HOT 4
- Running Error on Mac osx 13.4(Macbook M1 Pro ARM architecture) HOT 1
- FATAL: terminate has been called uncaught exception std::exception of type std::__1::system_error: thread::join failed: Invalid argument HOT 2
- Multiple cmake issues when trying to build HOT 4
- Submission to Steam HOT 2
- OpenGL error when launching on Wayland HOT 11
- CMake can't find toml11 on Linux Mint 21.2 HOT 4
- Errors after the new PR merged HOT 3
- Link on website https://openage.sft.mx/ to windows packages is a broken link HOT 2
- Windows Build: Python Command Requiring --modpacks Argument HOT 3
- Asset conversion stalls on media conversion HOT 10
- Fix Ubuntu Dependency installation script HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openage.