No internet connection
  1. Home
  2. How to

mac - finder - install multiple dmg and pkg plugins at once

By Daniel Perez @daniel_perez
    2022-09-11 06:28:27.277Z

    hello,

    wouldn't it be possible to install multiple plugins at once in finder? the install script we already have is nice for installing one by one. maybe put in the password once and let soundflow copy it to the clipboard and paste it again and again and empty the clipboard when done. what's missing from the current script is the last option - keep or move to trash. also the install multi script would have to take care of certain dmgs which open a folder where you have to double click again - like izotope.

    very cool for setting up a new system.

    what do you think?

    • 8 replies
    1. T
      Tristan Hoogland @Tristan
        2022-09-13 05:40:55.081Z

        Hey Daniel - curious what's the current install script you're talking about?

        You can install multiple pkgs in terminal. I have a small command file that you throw into the same folder as all of the .pkgs you want to install, you enter your password once and it goes. I never got lucky with multiple DMG's unfortunately, which is a bummer because a good portion of installers provide them instead of a direct PKG file.

        1. Daniel Perez @daniel_perez
            2022-09-13 06:01:19.662Z

            yep. some sort of multi installer or workaround for our plugins at least would be great. i think soundflow can do it easily. why not? more or less every click and move you do is automatable, but that's a bit advanced for where i stand at the moment.

            1. In reply toTristan:
              Daniel Perez @daniel_perez
                2022-09-13 06:02:43.444Z
                sf.keyboard.press({
                    keys: "cmd+o",
                });
                
                var app = sf.ui.app('com.apple.installer');
                
                while (true) {
                    sf.wait({ intervalMs: 200 });
                
                    let sheet = app.mainWindow.sheets.first;sf.ui.app("com.apple.installer").mainWindow.buttons.whoseTitle.is("Continue").first
                    if (sheet.exists) {
                        let agreeBtn = sheet.buttons.whoseTitle.is('Agree').first;
                        if (agreeBtn.exists)
                            agreeBtn.elementClick();
                
                        let shContBtn = sheet.buttons.whoseTitle.is('Continue').first;
                        if (shContBtn.exists)
                            shContBtn.elementClick();
                
                        continue;
                    }
                
                    let contBtn = app.mainWindow.buttons.whoseTitle.is('Continue').first;
                    if (contBtn.exists) {
                        contBtn.elementClick({ asyncSwallow: true });
                        continue;
                    }
                
                    let installBtn = app.mainWindow.buttons.whoseTitle.is('Install').first;
                    if (installBtn.exists) {
                        installBtn.elementClick({ asyncSwallow: true });
                        continue;
                    }
                
                    let closeBtn = app.mainWindow.buttons.whoseTitle.is('Close').first;
                    if (closeBtn.exists) {
                        closeBtn.elementClick({ asyncSwallow: true });
                        throw 0;
                    }
                }
                
                1. Daniel Perez @daniel_perez
                    2022-09-13 06:04:26.217Z

                    but it doesnt take care of the "kepp or move to trash" prompt after install is finished.

                  • In reply toTristan:
                    AAhmad Choujaa @Ahmad_Choujaa
                      2024-09-18 09:27:26.420Z

                      Hi Tristan,

                      Could you please share this file? I need to install over 700 pkgs on an external SSD.

                    • In reply todaniel_perez:
                      Daniel Perez @daniel_perez
                        2022-09-13 06:01:35.853Z
                        1. This would indeed be a nice thing to have - unfortunately, I'm very busy with other things at the moment so I can't help right now. I'd look into seeing what can be automated in Terminal and then run such Terminal scripts with sf.system.exec

                          1. Daniel Perez @daniel_perez
                              2022-09-15 15:22:45.560Z

                              Thank you, Chris.