Storing Files And Installing New Tool Versions

Hello

I have started storing files in a folder below the tool folder. Some of these files there will be content created by the user. But it seems that when upgrading/reinstalling the tool, the files there get deleted. Right?

Is there a thought out way for tools to store content like this? Or should I use prompt_for_path to make the user specify a directory to store data?

Later
CB

Perhaps you could avoid the problem by navigating to the parent folder of the tool “<tool_dir>/…/” and create a “myToolSettings” folder and store the files there?

It does, but i consider this a bug simply because Renoise is asking to “overwrite” existing content so that is what i (always) expect(ed) it to do:overwrite existing content. not deleting all other content that is not in the package.
So i hope this is being fixed in the next version.(at least if developers don’t want to get the tools root to become a mess with preferences folders)

Yeah, I guess the best thing would be if the tools would have better support for storing preferences, the preferences file is good, but not enough, you want to store multiple files.

Well one way or another, we need some good clarity here.
We can either go:
tools_path/preferences/com.user.toolname.xrnx/preferences.xml
tools_path/preferences/com.user.toolname.xrnx/folder/other_settings.xml

or let Renoise allow
tools_path/com.user.toolname.xrnx/preferences.xml
tools_path/com.user.toolname.xrnx/folder/other_settings.xml
without discarding existing contents that would not be overwritten with a tool-update.

This first thing, we can already do now but i’m not going to change my routines to do this without having any point of view from the devs.
Knowing that preferences:save_as(‘filename.xml’) stores it in the tools own folder by default it may still sound logical that option two is thing to apply. (or the preferences:save_as stores it in the tool specific folder in the preferences folder)

Okay i have an answer to the problem that doesn’t require much effort.
Attached is an additional tool installer that simply moves your tool’s folder from the source folder inside the installer tool, to the tool’s root.
This way existing preference files and presets or whatever you desire to store as user-files will be preserved when they exist in the target folder.
Renoise will be announcing that “safe_installer is installed” so for that matter i have added an extra dialog that also gives a sign that the actual tool is being installed.

Cool!

CB

There is only one but:I don’t know how yet the tool-updater is treating the installer (Is it only scanning the filename or is it really investigating the metafile?).
If it is analysing the metafile, we would need to adjust the tool-updater to investigate the metafile of the metafile in the tool-folder of the package instead.