Feature Request:Data Folder
-
@Lindon Well I think the additional source code directory is the way to go, it already does what you need when using expansions so it would just be a case of implementing it for non expansions.
-
@d-healey great. Is there somewhere I can look for documentation on expansions... I cant find it in the docs anywhere.
-
@Lindon just on the forum I think, it's not an official feature yet. I don't think expansions will be useful for you use case. I'm going to test if the additional source folder already works for non expansions. I will let you know.
-
I don't think expansions will be useful for you use case.
Actually they will be. Just ship the JSON files as expansion (put them in the additional source folder of the expansion folder), then you can reference it as
{EXP:MyExpansion}MyData.json
. -
@Christoph-Hart perfect!
-
@Lindon But you can already use the JSON dump/load as well as sending json file to the user
-
@ustk Which folder do you put those JSON files in when you send them to the user?
-
@d-healey I am not in a real situation, but since the dump of the json is going to the appsupport/mycompany/myplugin/userpresets folder, I assume you can place the files over there
-
@ustk but as that folder only exists on the users drive at install - where would you put them to start with such that they ended up there? Answer: there is no-where , except now of course they can go in the Extensions folder structure
-
@Lindon Not sure I'm on the right way, but you can create the folders at install time before the plugin is launched for the first time, so you have the possibility to place the json with the installer
-
@ustk yes clearly I could do this in the installer. Im trying NOT to do that. The extensions folder is a solution though.
-
@Lindon You'll need to do a similar custom installer thing with expansions too since there is no in-built expansion installer.
-
@d-healey -- oh no! really? damn. OK @Christoph-Hart back to my original feature request then, can we have a way to ship , within the normal compile - ship process, a folder of "useful stuff" for a given product.
-
I was going to create a new topic but then saw this one so I thought I'd revive it.
I have some data files (jsons) that I don't want to include as script files and I don't want to put them in the user presets folder (because that's a weird place to put them).
These files are not part of an expansion.
Expansions have an additional source code folder where we can put arbitrary files which we can access at run-time. Could this be extended to the project's additional source code folder? Maybe a sub-folder called
data
or something. And we'd get a function likeEngine.listDataFiles()
like we have for expansions. -
@d-healey said in Feature Request:Data Folder:
I was going to create a new topic but then saw this one so I thought I'd revive it.
I have some data files (jsons) that I don't want to include as script files and I don't want to put them in the user presets folder (because that's a weird place to put them).
These files are not part of an expansion.
Expansions have an additional source code folder where we can put arbitrary files which we can access at run-time. Could this be extended to the project's additional source code folder? Maybe a sub-folder called
data
or something. And we'd get a function likeEngine.listDataFiles()
like we have for expansions.@d-healey can you not use the File API to get this?
-
@Lindon I can achieve the goal of loading a json file using the File API but it's not the same as what I'm asking for ;)
To use the FileAPI I would have to know the location of the file, using some post install script hackery I could probably add the files to the user's system where I want them, but that's not as straightforward as just using
Engine.loadDataFile();
- Which for some reason looks in the user presets folder. -
@d-healey true enough..add my vote(again)
-
What's wrong with
FileSystem.getFolder(FileSystem.AppData).goCrazy()
-
@Christoph-Hart Scroll up to my last post ;)
With the additional source code folder I add the file at the time I create my plugin. With the appdata method I have to run a separate post install script to add the files where I want them.
If I put the files inside the user presets folder are they automatically unpacked when the user runs the plugin?
-
Still don't understand the problem.
- If you don't want to include the files in your plugin, you need to copy them with the installer
- If you don't want to copy them in the installer, you need to include the files in your plugin (and extract them on the first startup when they are not there).