HISE Logo Forum
    • Categories
    • Register
    • Login

    File.startAsProcess() wrapper

    Scheduled Pinned Locked Moved Scripting
    binarylaunchrunexecute
    11 Posts 5 Posters 431 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.
    • d.healeyD
      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

      orangeO Matt_SFM 2 Replies Last reply Reply Quote 2
      • Dan KorneffD
        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
        • orangeO
          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.healeyD 1 Reply Last reply Reply Quote 0
          • Matt_SFM
            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.healeyD
              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

              ustkU 1 Reply Last reply Reply Quote 1
              • ustkU
                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...

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

                d.healeyD 1 Reply Last reply Reply Quote 0
                • d.healeyD
                  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

                  ustkU 1 Reply Last reply Reply Quote 0
                  • ustkU
                    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 :)

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

                    orangeO 1 Reply Last reply Reply Quote 2
                    • d.healeyD
                      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.healeyD
                        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 :)

                        Link Preview Image
                        Added Engine.quit by davidhealey 路 Pull Request #237 路 christophhart/HISE

                        favicon

                        GitHub (github.com)

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

                        1 Reply Last reply Reply Quote 2
                        • orangeO
                          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

                          46

                          Online

                          1.7k

                          Users

                          11.7k

                          Topics

                          101.8k

                          Posts