bluescan / tacentview

An image and texture viewer for tga, png, apng, exr, dds, pvr, ktx, ktx2, astc, pkm, qoi, gif, hdr, jpg, tif, ico, webp, and bmp files. Uses Dear ImGui, OpenGL, and Tacent. Useful for game devs as it displays information like the presence of an alpha channel and querying specific pixels for their colour.
ISC License
373 stars 36 forks source link

Default LocInfo for Linux wrongly set for non-deb packages #180

Closed ClangPan closed 2 months ago

ClangPan commented 2 months ago

Hello!

The new handling of the LocInfo created an issue for non-deb packages (such as ones for the Arch ecosystem), since it was trying to create and write folders within system files, crashing the program.

I would say this could be worked in combination with #178, using XDG by default for Linux builds (as even portable apps here use XDG, it's just that handy) and using the program path for the portable builds

bluescan commented 2 months ago

Hi ClangPan. OK. So that makes sense to me. Thinking out loud:

I think that works. I'll submit a CL shortly. I'm planning on releasing soon so Nix can be packaged, but will wait to hear back that everything is copacetic with Arch first.

bluescan commented 2 months ago

446e774a276c2d3204af926364843454d387a1b3 should do it: "Make all non-snap/non-portable builds use XDG on Linux."

I'll deal with the zipping part of #178 a bit later (but also b4 release).

ClangPan commented 2 months ago

Little error I caught here, should it be assetsDir = "/usr/share/tacentview/Assets";? image

bluescan commented 2 months ago

Hmm... you're correct... the deb template puts assets in the Assets subdir and I think I want to keep it (in case a Licences or other folder is introduced later). I'll also need to add that subdir to any dir retrieved from XDG env variables. Will have to update @poperigby regarding Nix as well (hopefully not a problem). Thanks.

bluescan commented 2 months ago

cd78fb874a41aa08505b66212c5a771933728e7c fixes.

ClangPan commented 2 months ago

Everything is working well now! Thanks ^^