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 specification #145

Closed
moshiur-raj opened this issue Aug 26, 2022 · 5 comments · Fixed by #658
Closed

Use xdg base directory specification #145

moshiur-raj opened this issue Aug 26, 2022 · 5 comments · Fixed by #658
Milestone

Comments

@moshiur-raj
Copy link

Currently qucs uses ~/.qucs . This contributes to littering the home directory. According to the xdg specification configs should be located at ~/.config , data should be located at ~/.local/share and cache should be located at ~/.cache .
Simply moving ~/.qucs to ~/.local/share/qucs would probably be the easier choice.

@ra3xdh
Copy link
Owner

ra3xdh commented Aug 27, 2022

Yes, I am planning to move .qucs elsewhere but with the different purpose. The $HOME/.qucs directory doesn't hold config. The temporary files (netlist and log ) are located at $HOME/.qucs/spice4qucs (probably could be moved to .cache). The config file location is $HOME/.config/qucs/qucs_s.conf The $HOME/.qucs is used as the default location for projects and user library file. This is not good, because the hidden direcotory is not visible in file manger for default that may make difficult finding files.

I propose the following layout for these directories:

  • $HOME/.config/qucs/qucs_s.conf config file. Default Qt applications config location.
  • $HOME/.cache/qucs for holding temporary files like netlist and simulator data
  • $HOME/QucsWorkspace default location for projects and user libraries. Not a hidden directory because need to be visible from file manager by default.

@moshiur-raj
Copy link
Author

Qucs automatically creates .qucs in my home directory, even when I change the location in settings. Can you fix this too?

@ra3xdh
Copy link
Owner

ra3xdh commented Aug 27, 2022

Yes, Qucs-S now creates default directory layout on the first start now. It is related to fix of #86. The usage of QStandardPaths instead of hardcoded paths may help to resolve this issue https://doc.qt.io/qt-5/qstandardpaths.html

@ra3xdh ra3xdh self-assigned this Aug 27, 2022
@ra3xdh ra3xdh added this to the 1.0.1 milestone Nov 3, 2022
@ra3xdh ra3xdh modified the milestones: 1.0.1, 1.0.2 Feb 4, 2023
@ra3xdh ra3xdh modified the milestones: 1.0.2, 1.0.3 Apr 23, 2023
@ra3xdh ra3xdh modified the milestones: 1.0.3, 1.0.4 Jun 2, 2023
@ra3xdh ra3xdh modified the milestones: 2.0.0, 2.0.1 Aug 14, 2023
@ra3xdh ra3xdh modified the milestones: 2.1.0, 24.1.0 Oct 24, 2023
@ra3xdh ra3xdh modified the milestones: 24.1.0, 24.2.0 Jan 19, 2024
wawuwo added a commit to wawuwo/qucs_s that referenced this issue Mar 23, 2024
With this commit creating of workspace dir is done *after* loading
of settings, so it takes in accounts dir name from settings. Before
that workspace dir with default name was created even if it was
overriden in settings.

See comment:
 ra3xdh#145 (comment)
wawuwo added a commit to wawuwo/qucs_s that referenced this issue Mar 23, 2024
With this commit creating of workspace dir is done *after* loading
of settings, so it takes in accounts dir name from settings. Before
that workspace dir with default name was created even if it was
overriden in settings.

See comment:
 ra3xdh#145 (comment)
wawuwo added a commit to wawuwo/qucs_s that referenced this issue Mar 23, 2024
With this commit creating of workspace dir is done *after* loading
of settings, so the workspace path from settings is taken into
account.

Previous behaviour was to create workspace dir before loading of
settings which led to path from settings to be ignored.

See comment:
 ra3xdh#145 (comment)
wawuwo added a commit to wawuwo/qucs_s that referenced this issue Mar 23, 2024
With this commit creating of workspace dir is done *after* loading
of settings, so the workspace path from settings is taken into
account.

Previous behaviour was to create workspace dir before loading of
settings which led to path from settings to be ignored.

See comment:
 ra3xdh#145 (comment)
@ra3xdh ra3xdh linked a pull request Mar 24, 2024 that will close this issue
@ra3xdh ra3xdh removed their assignment Mar 24, 2024
@ra3xdh
Copy link
Owner

ra3xdh commented Apr 7, 2024

The implementation of this provided by #658

wawuwo added a commit to wawuwo/qucs_s that referenced this issue Apr 7, 2024
With this commit creating of workspace dir is done *after* loading
of settings, so the workspace path from settings is taken into
account.

Previous behaviour was to create workspace dir before loading of
settings which led to path from settings to be ignored.

See comment:
 ra3xdh#145 (comment)
@moshiur-raj
Copy link
Author

qucs still creates ~/.qucs at startup @ra3xdh .

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

Successfully merging a pull request may close this issue.

2 participants