Skip to content
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

use XDG base directory spec for desktop builds if supported #257

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

stewlab
Copy link

@stewlab stewlab commented Jul 18, 2024

This change adds the usage of the XDG Base Directory Specification when referencing tulip.root_dir() from Tulip Desktop. This includes updating the Linux build script to use ~/.local/share instead of ~/Documents when referencing the desktop version of the root directory.

XDG Base Directory Specification
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Testing
I have tested this change in a Fedora 38 environment, and the output of tulip.root_dir() shows the new root directory in ~/.local/share/tulipcc as expected.

I also built this from source and flashed to my Tulip CC device, and did not find any problems with functionality. The output of tulip.root_dir() there was /.

macOS
I have not tested this for macOS. However, I noticed that version references ~/Documents as well, so I provided fall back to that directory if ~/.local/share does not exist. It seems that ~/Library would be a better option instead of ~/Documents, so it may be a good idea to update that as well later.

@bwhitman
Copy link
Collaborator

Thanks for this! I'll test it on macOS a bit and also ubuntu, debian and arch and WSL

@bwhitman
Copy link
Collaborator

bwhitman commented Jul 19, 2024

Tests

  • macOS
  • Debian 12 (ARM64)
  • Ubuntu 22.04 (ARM64)
  • WSL
  • Arch (I'm not capable of testing arch)

I have to merge in a commit about macOS app copying these for devs

@bwhitman bwhitman merged commit 0045351 into shorepine:main Jul 19, 2024
1 check passed
@bwhitman
Copy link
Collaborator

OK, this all works. I'll merge in the macOS fix and the doc fix next. Thank you for doing this!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants