HISE Logo Forum
    • Categories
    • Register
    • Login

    Feature Request:Data Folder

    Scheduled Pinned Locked Moved Feature Requests
    44 Posts 4 Posters 2.3k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ustkU
      ustk @Lindon
      last edited by

      @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

      Can't help pressing F5 in the forum...

      LindonL 1 Reply Last reply Reply Quote 0
      • LindonL
        Lindon @ustk
        last edited by

        @ustk yes clearly I could do this in the installer. Im trying NOT to do that. The extensions folder is a solution though.

        HISE Development for hire.
        www.channelrobot.com

        d.healeyD 1 Reply Last reply Reply Quote 0
        • d.healeyD
          d.healey @Lindon
          last edited by

          @Lindon You'll need to do a similar custom installer thing with expansions too since there is no in-built expansion installer.

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          LindonL 1 Reply Last reply Reply Quote 0
          • LindonL
            Lindon @d.healey
            last edited by

            @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.

            HISE Development for hire.
            www.channelrobot.com

            1 Reply Last reply Reply Quote 0
            • d.healeyD
              d.healey
              last edited by

              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 like Engine.listDataFiles() like we have for expansions.

              Libre Wave - Freedom respecting instruments and effects
              My Patreon - HISE tutorials
              YouTube Channel - Public HISE tutorials

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @d.healey
                last edited by

                @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 like Engine.listDataFiles() like we have for expansions.

                @d-healey can you not use the File API to get this?

                HISE Development for hire.
                www.channelrobot.com

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey @Lindon
                  last edited by

                  @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.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @d.healey
                    last edited by

                    @d-healey true enough..add my vote(again)

                    HISE Development for hire.
                    www.channelrobot.com

                    Christoph HartC 1 Reply Last reply Reply Quote 1
                    • Christoph HartC
                      Christoph Hart @Lindon
                      last edited by

                      What's wrong with

                      FileSystem.getFolder(FileSystem.AppData).goCrazy()
                      
                      d.healeyD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @Christoph Hart
                        last edited by

                        @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?

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        Christoph HartC 1 Reply Last reply Reply Quote 1
                        • Christoph HartC
                          Christoph Hart @d.healey
                          last edited by

                          Still don't understand the problem.

                          1. If you don't want to include the files in your plugin, you need to copy them with the installer
                          2. 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).
                          d.healeyD 1 Reply Last reply Reply Quote 1
                          • d.healeyD
                            d.healey @Christoph Hart
                            last edited by

                            @Christoph-Hart said in Feature Request:Data Folder:

                            1. 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).

                            This is what I want - are you saying if I put data files inside the userPresets folder then they will be extracted along with the user presets when the plugin is first launched? If I add new files in a future update will they also be extracted?

                            Libre Wave - Freedom respecting instruments and effects
                            My Patreon - HISE tutorials
                            YouTube Channel - Public HISE tutorials

                            Christoph HartC 1 Reply Last reply Reply Quote 0
                            • Christoph HartC
                              Christoph Hart @d.healey
                              last edited by

                              @d-healey No you need to implement this yourself.

                              const var dataFile = FileSystem.getFolder(FileSystem.AppData).getChildFile("MyData.json");
                              
                              const var initialData = { "Something": true };
                              
                              if(!dataFile.existsAsFile())
                              {
                                  dataFile.writeObject(initialData);
                              }
                              
                              LindonL d.healeyD 2 Replies Last reply Reply Quote 0
                              • LindonL
                                Lindon @Christoph Hart
                                last edited by Lindon

                                @d-healey -yeah its a right pain to have to do every time you want some data shipping with you product ...

                                @Christoph-Hart - whats this?

                                .existsAsFile()
                                

                                HISE Development for hire.
                                www.channelrobot.com

                                Christoph HartC d.healeyD 2 Replies Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey @Christoph Hart
                                  last edited by d.healey

                                  @Christoph-Hart If I put data files in the UserPresets folder I can access them with Engine.loadFromJSON() can't I? This has been here long before the File/FileSystem APIs.

                                  Libre Wave - Freedom respecting instruments and effects
                                  My Patreon - HISE tutorials
                                  YouTube Channel - Public HISE tutorials

                                  1 Reply Last reply Reply Quote 0
                                  • Christoph HartC
                                    Christoph Hart @Lindon
                                    last edited by

                                    @Lindon sorry, meant isFile().

                                    If I put data files in the UserPresets folder I can access them with Engine.loadDataFile() can't I?

                                    Yes, but that's ancient and useless. :)

                                    d.healeyD 1 Reply Last reply Reply Quote 1
                                    • d.healeyD
                                      d.healey @Christoph Hart
                                      last edited by

                                      @Christoph-Hart lol How about redirecting the ancient and useless function to the additionalSourceCode folder so it works the same as it does for expansions? :) Then I don't have to mess about with post install scripts and the file/filesystem api.

                                      Libre Wave - Freedom respecting instruments and effects
                                      My Patreon - HISE tutorials
                                      YouTube Channel - Public HISE tutorials

                                      Christoph HartC 1 Reply Last reply Reply Quote 0
                                      • Christoph HartC
                                        Christoph Hart @d.healey
                                        last edited by

                                        @d-healey no. AdditionalSourceCode is additional source code that gets compiled. Why would I include that folder into the binary?

                                        d.healeyD 1 Reply Last reply Reply Quote 0
                                        • d.healeyD
                                          d.healey @Christoph Hart
                                          last edited by

                                          @Christoph-Hart said in Feature Request:Data Folder:

                                          @d-healey no. AdditionalSourceCode is additional source code that gets compiled. Why would I include that folder into the binary?

                                          Hmm I'm thinking of how it works for expansions where we can put any files and access them with the .loadDataFile function. We don't have anything similar when not using expansions.

                                          Libre Wave - Freedom respecting instruments and effects
                                          My Patreon - HISE tutorials
                                          YouTube Channel - Public HISE tutorials

                                          Christoph HartC 1 Reply Last reply Reply Quote 0
                                          • Christoph HartC
                                            Christoph Hart @d.healey
                                            last edited by

                                            @d-healey yes but this is because expansions can‘t contain scripts so it‘s a fallback solution.

                                            LindonL 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            18

                                            Online

                                            1.8k

                                            Users

                                            12.0k

                                            Topics

                                            104.7k

                                            Posts