Forum

    • Register
    • Login
    • Search
    • Categories

    File.startAsProcess() wrapper

    Scripting Forum
    binary launch run execute
    5
    11
    190
    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.
    • d.healey
      d.healey last edited by

      I'm considering adding this function to the API. It will allow us to launch an external file from within our plugins/apps.

      This could be useful for example if your app automatically downloads a new installer when an update is released, you could ask the user if they want to run the installer and with their approval the installer will launch. You could also use it for opening a PDF file to display a user guide to the user.

      There is however the possibility that it can be used maliciously to execute programs without the user's permission, this makes me hesitant to add a wrapper for it.

      What is the general opinion here about such functionality?

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

      orange Matt_SF 2 Replies Last reply Reply Quote 2
      • Dan Korneff
        Dan Korneff last edited by

        This would be very useful to me as I'm currently designing a downloader app for my products.

        Dan Korneff - Producer / Mixer / Audio Nerd

        1 Reply Last reply Reply Quote 1
        • orange
          orange @d.healey last edited by orange

          @d-healey I think this would be pretty good. "Opening files" has already been used by lots of plugin manufacturers. For executing the installers, it would be awesome though.

          I am not sure this is already available in Hise but, also "Opning folders" would be great too.

          develop Branch / XCode 13.1
          macOS Monterey / M1 Max

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

            @d-healey +1 good idea 🙂

            Develop branch
            Win10 & VS17 / Ventura & Xcode 14. 3

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

              @orange said in File.startAsProcess() wrapper:

              but, also "Opning folders" would be great too.

              This is already possible. I think it's File.show().

              Ok I've implemented the function now. I'll push it to my fork soon and make a pull request.

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

              ustk 1 Reply Last reply Reply Quote 1
              • ustk
                ustk @d.healey last edited by

                @d-healey Hmm... I thought Christoph implemented this already because I made one for my own use and prepared a pull request but I've seen it was done in the meantime. It's not in the API list though, but you might have a look before making a new one. But I might be mistaken here, mixing up with something else...

                I can't help pressing F5 in the forum...

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

                  @ustk I couldn't see it in the source, any idea what it's called?

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

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

                    @d-healey Yeah neither do I (I searched all branches). I think it's a mistake of me, so go ahead 🙂

                    I can't help pressing F5 in the forum...

                    orange 1 Reply Last reply Reply Quote 2
                    • d.healey
                      d.healey last edited by

                      Done - https://github.com/christophhart/HISE/pull/226/commits/e7f4d9595f9cc47848a5abe01ebd4a63e75fd147

                      I also added a wrapper function to set the execute permissions on a file and one to check how much space is left on the disk - a good thing to check before downloading files.

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

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

                        I also added a Engine.quit() function so we can close our app once we've launched the update installer. I don't know if it's safe to use this function in a plugin, my use case if for a standalone app only, let me know if you try it in a plugin 🙂

                        https://github.com/christophhart/HISE/pull/237

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

                        1 Reply Last reply Reply Quote 2
                        • orange
                          orange @ustk last edited by

                          @ustk said in File.startAsProcess() wrapper:

                          @d-healey Yeah neither do I (I searched all branches). I think it's a mistake of me, so go ahead 🙂

                          I think the .unzip function was added a couple of months ago, maybe that's the cause of the confusion.

                          develop Branch / XCode 13.1
                          macOS Monterey / M1 Max

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

                          5
                          Online

                          1.2k
                          Users

                          7.1k
                          Topics

                          64.9k
                          Posts