HISE Logo Forum
    • Categories
    • Register
    • Login

    FileSystem browseForDirectory + Server.downloadFile

    Scheduled Pinned Locked Moved General Questions
    18 Posts 2 Posters 439 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 @DanH
      last edited by

      @DanH Correct. You can use Engine.isPlugin() to determine if your app is running as a plugin or as standalone and disable/enable stuff accordingly.

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

      DanHD 2 Replies Last reply Reply Quote 0
      • DanHD
        DanH @d.healey
        last edited by

        @d-healey ok, but then I guess my idea of making a separate app by the same name might actually work then. Will give it some thought, thanks

        DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
        https://dhplugins.com/ | https://dcbreaks.com/
        London, UK

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

          @d-healey so your app downloads and unpacks several zips, and updates the link file, all with one button?

          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
          https://dhplugins.com/ | https://dcbreaks.com/
          London, UK

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

            @DanH Yes essentially, but mine uses expansions so there can be multiple link files.

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

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

              @d-healey yes I'm just looking through the code in your repo.

              DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
              https://dhplugins.com/ | https://dcbreaks.com/
              London, UK

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

                If you want to integrate my system into your app send me a message and we can discuss licensing.

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

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

                  @d-healey GPL ;)

                  DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                  https://dhplugins.com/ | https://dcbreaks.com/
                  London, UK

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

                    @DanH Even better, take all you want.

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

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

                      @d-healey :)

                      Just going back to the snippet you shared with me earlier, in the download function f needs to be defined as a file but this file will be different for each OS so.... how can I define it as such? Another if statement?

                      inline function startDownload()
                      {	
                      	Engine.showYesNoWindow("Select Folder", "Select the destination folder", function(response)
                      	{
                      		if (response)
                      		{
                      			FileSystem.browseForDirectory(downloadsFolder, function(dir)
                      			{
                      				if (isDefined(dir) && dir.isDirectory())
                      				{
                      					Server.setBaseURL("https://myserver etc");
                      
                      					var f = dir.getChildFile("MAC-INSTALLER.pkg"); // HERE
                      						 
                      					download = Server.downloadFile(url, {}, f, downloadCallback);					
                      				}		
                      			});
                      		}
                      	});
                      

                      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                      https://dhplugins.com/ | https://dcbreaks.com/
                      London, UK

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

                        @DanH Look at the part where I set the URL based on the OS. You can do the same thing for the file name.

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

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

                          @d-healey Yes, think I've got it working :crossed_fingers:

                          DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
                          https://dhplugins.com/ | https://dcbreaks.com/
                          London, UK

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

                          33

                          Online

                          1.7k

                          Users

                          11.9k

                          Topics

                          103.7k

                          Posts