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

[Archi 5] Location of Archi data folders #880

Closed
Phillipus opened this issue Nov 8, 2022 · 3 comments
Closed

[Archi 5] Location of Archi data folders #880

Phillipus opened this issue Nov 8, 2022 · 3 comments

Comments

@Phillipus
Copy link
Member

Phillipus commented Nov 8, 2022

Location of Archi data folders

These are the current locations:

  • Linux: @user.home/.archi4
  • Windows: @user.home/AppData/Roaming/Archi4
  • Mac: @user.home/Library/Application Support/Archi4

We propose to change these to:

  • Linux: @user.home/.archi
  • Windows: @user.home/AppData/Roaming/Archi
  • Mac: @user.home/Library/Application Support/Archi

We want to store only app settings in these locations such as:

.config
.metadata
dropins
canvasses.xml
models.xml
templates.xml

Directories that should be more accessible are:

jasper-reports
model-repository
scripts

So in fact this would require one change to Archi itself (jasper-reports) and one to coArchi (model-repository) and one to jArchi (scripts).

We could create these in a @user.home/Documents/Archi folder. Windows, Mac and Linux distros all seem to have a @user.home/Documents folder.

Alternate suggestions are welcome.

@Phillipus Phillipus changed the title Changes for Archi 5 [Archi 5] Location of Archi data folders Nov 8, 2022
@Phillipus
Copy link
Member Author

So in fact this would require one change to Archi itself (jasper-reports) and one to coArchi (model-repository) and one to jArchi (scripts).

Not true. At the moment the root location for Archi's data is derived from this in ArchiPlugin class:

public File getUserDataFolder()

This in fact returns getWorkspaceFolder(). So all we have to do is change the default location of getUserDataFolder() to @user.home/Documents/Archi and the locations of jasper-reports, model-repository and scripts will be changed too. In cases where getUserDataFolder() is being called to store internal data those cases can be replaced with getWorkspaceFolder(). In fact, that makes more sense.

Phillipus added a commit that referenced this issue Nov 18, 2022
- And use getWorkspaceFolder() for internal data
- See #880
@Phillipus
Copy link
Member Author

@jbsarrodie From this point on when testing the latest code, your jasper templates, coArchi repos and jArchi scripts will be gone. :-) Copy them from @user.home/AppData/Roaming/Archi4 to @user.home/Documents/Archi

@Phillipus
Copy link
Member Author

Phillipus commented Nov 19, 2022

I've written a migrator so that the first time Archi 5 is run it will check if the default Archi4 folder exists and if it does copy all the files to the new target folders. If the Archi configuration does not use the default Archi4 folder names it won't migrate and the user will have to manually copy.

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

No branches or pull requests

1 participant