Devilutionx: [Suggestion] Allow diabdat.mpq to be symlinked

Created on 19 Jun 2020  路  10Comments  路  Source: diasurgical/devilutionX

Describe
When installing DevilutionX, instead of having to copy the diabdat.mpq file I would like to use a symlink from another location to avoid duplicating large files on my system.

To Reproduce

  1. Symlink diabdat.mpq from another folder to ~/snap/devilutionx/common
  2. Start DevilutionX
  3. Receive diabdat.mpq not found screen

Expected behavior
Diablo starts as normal

Most helpful comment

Well, "providing a copy under there own name" is unfortunately a bit misleading - or the way the Snap Store handles the developer information, to be more precise. "Developer" in this case is not exactly correct - if it was me, a better wording would be "Packaged by". I'll get in touch with the Snap Store developers and address this issue. This problem occurs with all snap packages not written by the original authors and are contributed by a third party like me in this case.

I agree that it would have been better to contact you first - sorry for that. Actually, this was the first time I created a snap package for a project I'm not directly involved. In the meantime, I'll improve the wording on the Snap Store page to give proper credit to the project.

Regarding the issue itself: Yes, you can't easily symlink to the "outside world" from within a snap due to it's sandboxing features. In fact, I think copying a file to the snap itself is quite hacky, but since we obviously can't package the DIABDAT.MPQ file itself, I see no way around this.

All 10 comments

if you say it works in singleplayer, it probably works everywhere, 500mb is nothing near large nowadays, creating a symlink is up to the user

Just to clarify, my statement about the game working well was a general comment when using a copied version; apologies for the confusion.
You cannot currently use a symlink with DevilutionX.

I don't know of anything that should prevent symlinks from working. But to solve your problem you can specify where you diabdat.mpq is located via --data-dir /folder/with/diablo

Just tested, symlinks work fine. Can you please provide some more detail on what you are doing.

Here's the exact steps I am taking for you:

  1. ln -s "/home/anthony/Programs/Diablo 1/DIABDAT.MPQ" ~/snap/devilutionx/common/diabdat.mpq
  2. ls -la (To check the symlink is correct)
  3. diabdat.mpq -> '/home/anthony/Programs/Diablo 1/DIABDAT.MPQ'
  4. Run DevilutionX
  5. Receive cannot find diabdat.mpq message

It occurred to me that it might be the quotation marks or the space in the path, so I tried it some other ways:

  • No space, no quotes, absolute path
  • ln -s /home/anthony/Programs/Diablo/DIABDAT.MPQ ~/snap/devilutionx/common/diabdat.mpq
  • diabdat.mpq -> /home/anthony/Programs/Diablo/DIABDAT.MPQ

  • No space, no quotes, relative path

  • ln -s ~/Programs/Diablo/DIABDAT.MPQ ~/snap/devilutionx/common/diabdat.mpq
  • diabdat.mpq -> /home/anthony/Programs/Diablo/DIABDAT.MPQ

  • No space, no quotes, absolute, lowercase on both ends

  • ln -s /home/anthony/Programs/Diablo/diabdat.mpq ~/snap/devilutionx/common/diabdat.mpq
  • diabdat.mpq -> /home/anthony/Programs/Diablo/diabdat.mpq

  • No space, no quotes, relative, lowercase on both ends

  • ln -s ~/Programs/Diablo/diabdat.mpq ~/snap/devilutionx/common/diabdat.mpq
  • diabdat.mpq -> /home/anthony/Programs/Diablo/diabdat.mpq

It's not a world ending issue for me, as I can copy the file across or use the suggested flag above. I have kept everything on the same disc in my examples for simplicity.

Are you running this from a snap package? We do not provide a snap distribution first of all, but also snap packages have additional security that sandbox applications, and can make them slow to load. If you did indeed install it via a Snap package then I would say that is your problem, but also where did you get it from?

Ok I think I found out where you got your version from, you need to bring the issue up here instead: https://github.com/lotharsm/devilutionx-snapcraft

Conclusion, DevilutionX supports symlinks, Snap does not.

Makes sense; I stumbled across DevilutionX in the Ubuntu software store.

image

image

I guess that's what I get for not going to the source myself! Good to know for the future.
Thanks for your help, I'll pull the original version and symlink to my hearts content.

He, It's nice that it's easy to find and install, but I wish people would colaborate and inform us instead of providing a copy under there own name with no references to the original project :)

Well, "providing a copy under there own name" is unfortunately a bit misleading - or the way the Snap Store handles the developer information, to be more precise. "Developer" in this case is not exactly correct - if it was me, a better wording would be "Packaged by". I'll get in touch with the Snap Store developers and address this issue. This problem occurs with all snap packages not written by the original authors and are contributed by a third party like me in this case.

I agree that it would have been better to contact you first - sorry for that. Actually, this was the first time I created a snap package for a project I'm not directly involved. In the meantime, I'll improve the wording on the Snap Store page to give proper credit to the project.

Regarding the issue itself: Yes, you can't easily symlink to the "outside world" from within a snap due to it's sandboxing features. In fact, I think copying a file to the snap itself is quite hacky, but since we obviously can't package the DIABDAT.MPQ file itself, I see no way around this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cain05 picture cain05  路  18Comments

pbekesky picture pbekesky  路  27Comments

snigel picture snigel  路  23Comments

predator8bit picture predator8bit  路  22Comments

julealgon picture julealgon  路  16Comments