After 2 years of using an older package of Garageband with All Loops, it's time for me to repackage it and I'm wondering how to best do it. In the past, I created a 10Gig+ package of Garageband and all the loops using Composer (this is why it's been 2 years). The music teachers want the students to have access to all the loops and since we have Standard accounts it makes it easier if Garageband is just ready to go without Admin privileges to install the loops later.
Should I try to install Garageband using Mac Apps Store and then try to push the loops after? We don't assign the students Apple IDs so I'm not sure if I can push out Garageband directly to devices. I had tried in the past but did not seem to have success. And then where would I find the loops? They seem to be buried in various locations.
Thank you in advance for any advice and guidance.
GarageBand and Logic are the same. I have some notes on installing and getting all of the extras. I use Composer to get the App but then I use the following to get the rest.
These notes are on Logic, but GarageBand is the same. Be warned with Logic you will be getting about 800 installer packages in total.
Install on one Mac, Then run Logic. It will want to get the Essentials packages. Let it, but don't put in the Admin password to allow them to install.
Then head to Go - Connect to Folder
View as list, and set View options to calculate all sizes. Organise the folder view with the biggest at the top.
Open the biggest folder, and keep on going until you get a whole big bunch of .pkg files. There might be 2 folders with content, I recall the older stuff being in a different folder.
Copy all of these out to somewhere safe. Don't move them, make copies.
Once you have them all copied safe, go back to Logic and give it the admin password.
Logic will now install all of the essentials files, and delete them from the folder they were in.
Reboot the Mac. Open Logic again, and this time tell it to get everything from the Library.
Head back to the same folder as before, and all the new content will download.
Again wait for the admin password, but don't put it in, and you will find an awful lot of installers in the folders you were in before. Copy them out again to a safe place. Remember they could be in a couple of folders. Once you have copied them out, you can install them. Reboot and check once more for any Library files to be added. If there are repeat the steps above.
For ease of installing I split them into folders of content, keeping them to about 5Gb. Pick your own size here.
Put these folders in a location that you want them to install from, I already have a folder in /var that I use so I put them in an Install folder in there.
Next you want to compress them.
In Terminal use cd /var/Install
Pick your location of the folders.
Then (You must navigate in Terminal to the location of the folder first)
tar -zcvf "Archive Name".tar.gz <FOLDER NAME>
I will normally use the exact same name for Archive Name and Folder Name.
Then use Composer to create a package of the Compressed Archive. But don't Package it yet.
Once it is in Composer, click the Arrow to the Left of the Name of the Source, you will get a drop down list, I use Scripts, then Shell and Postinstall
Please check your location and put it in the correct places in the script, I have left all of mine there handy for you to see, they are highlighted.
It will give you some standard stuff in there, and a space in the middle for….
# What file is being installed, I use the same name for Archive as the Folder then put that in the variable. Makes it easy to quickly copy this into many versions. csgfile="FOLDER NAME" # Uncompressing the Installers # Move to location cd /private/var/Install/ # Uncompress the archive tar -zxvf "$csgfile".tar.gz # ---------------------------------------------------//------------------------------------------------------------ # Install the pkg files found in a temp location for PKG in $(ls "/private/var/Install/$csgfile/" | grep "pkg$") do /usr/sbin/installer -pkg /private/var/Install/"$csgfile"/"$PKG" -tgt / -allowUntrusted # Then it will remove the installers rm -Rf /private/var/Install/"$csgfile"/"$PKG" done # Remove the folder and the archive rm -Rf /private/var/Install/"$csgfile" rm -Rf /private/var/Install/"$csgfile".tar.gz # ---------------------------------------------------//------------------------------------------------------------ exit 0 ## Success exit 1 ## Failure
Save the script in Composer, and then build the .pkg file of it.
Deploy the pkg to any client Mac and it will…
Make a copy of the .tar.gz in the location specified.
Expand the Archive
Find all .pkg files in there and install them
As it installs, it then will delete the pkg files
Once finished it will delete the Folder and the Archive
As you can see, using the same name for the Archive and the Folder, makes life simple. You put that into one variable, and the script does the rest. A new Archive and all you need to do it swap the variable data for the new one and it will work. I got fed up of changing each line of script to get them working each time.
This works for loads of stuff, and also for things like the Adobe pkg files that don't work on SMB shares.
Hope this is helpful
@anverhousseini @bzuckrow I am using appleloops.py using the following. However on GarageBand launch they are still getting "Essential Sounds Download" which then prompts for Admin credentials (we don't provide admin rights).
/usr/bin/python /tmp/appleLoops-master/appleLoops.py --deployment --mandatory-only
Do I need different arguments?
View Menu - Show Loop browser
In the Loop Browser
At the top, if it doesn't automatically do it for you. It will say Loop Packs: And then there is a pop out menu, in it you will find Index all Loops.
It may take a while.
If you get the messages about downloading, cancel them, and then top center of the GB window you will find a red progress bar. Its at the bottom of the black bit. Click on the red bit and it will pop down the progress of the downloads. Click the X to cancel them. Once the indexing is done Quit GB and then re-open it, and all is happy.
It is stupid, because mine can see all of the loops in the Library, and it also automatically indexed them when I opened the loop browser. It knows they are all there, it just seems to get a bee in its bonnet over it must download, and can't see that everything it wants to download is already there.
Sorry, you will need to inform your users of this procedure, for them to each do it. I haven't yet found a way round it.
If anyone has a way to script this, please share it.
I haven't scripted it yet. But...
And then opening GB fixed it.
I have some scripts that only run the once for each user logging in, I am thinking of adding this in OR I also have made some reset Apps that I give my users, I could write one that deletes this folder, then the users can do it themselves as they need to.
@PaulHazelden I tried deleting that folder but that didn't do anything for me, still downloads the ~376mb and asks for admin :(.
I also tried your method above - Indexing the files. After I quit out of GB and re-opened it, it is still asking to authenticate to install the 376mb of files. Tried going back in and manually doing Re-index, same result :(.
@chrisdaggett In GB do you have the red progress bar in the top centre at the bottom of the black box bit? I found you can stop the downloads from there by clicking on it and it will expand to show progress. Then clicking the X will remove it. It seems to get stuck in a cycle of attempting to download, and cancelling it here will break the cycle.
I for one second Carl Ashley’s script. I have been using it for two years and it has done things well.
That being said, I did file an issue on his Github...for whatever reason, it missed a small handful of loops about a month ago. Given that i didn’t have time to troubleshoot after trying it twice, I filed an issue and set out on my own.
The short of my answer was to get on my packaging machine, hand install GB and Logic, opened GB, pulled down the basic set but refused to supply the admin password, I then looked in /private/var/folders for all pkg files...and of course captured copies...once I did that, I supplied password and let it finish. Closed GB...relaunched and did same for all advanced loops...closed GB. Opened Logic...did same for essential collection...closed Logic...re launched...did same for entire Logic collection. I only closed the program each time so it wouldn’t already have my admin password supplied. I captured around 671 packages in a single folder. I then wrote a very large installer package that puts all of the installers to a folder in /tmp and used a postinstall job that uses a “for loop” to cycle through installing each one. All 671 of them. We then clean up /tmp at the end.
My script is as follows:
#!/bin/bash touch /var/log/loops.log for pkg in /private/tmp/loops/*.pkg do installer -pkg "$pkg" -target /Volumes/Macintosh HD echo "Installing $pkg" >> /var/log/loops.log done rm -R -f /private/tmp/loops exit 0
Ugly but it worked...very ready to switch back to CarlAshleys script as it’s much more compact and downloads these on demand. Only reason I didn't wait out filing an issue is that I had a one week deadline to crank out the music and radio labs.
@chrisdaggett Top centre little black box has 1.1 and 120 in it. At its bottom is an orangy red line. Put the mouse over it and the pointer will get a little arrow on it, Click and the progress bar will expand.
@blackholemac Very similar to my approach, not pretty but it works, I split them all into 5Gb chunks and created the compressed files and have those in JAMF with a postinstall script to cycle through them all and install.
@PaulHazelden Wow... I didnt even see that line as a progress bar it looks full hah. That did work, but boy that will be not fun to explain to Students!
Thank you for giving me at least one option!
I'm going to keep hoping that Carl Ashley finds a fix for the missing files ;).
@blackholemac I also added to that a few days ago (file on github). He acknowledged that it happens sometimes, but as far as I can tell it is consistantly missing 376mb right now. Fingers crossed. Would you be interested in sharing your packages and saving me (and I'm sure others) the work of re-creating your solution? :).
@chrisdaggett I am not looking forward to explaining that one either. Glad you found it. I found that binning the Folder I pointed to stops that from happening, and new accounts don't have the folder in the first place until they open GB. So I am hoping it will sort out. If binning the folder is a workable solution for me, then I will write an App that the students can run to sort it out themselves.
The total download from the Apple servers for the loops is around 13Gb for GB, and 65Gb for Logic. This is why I use my solution rather than having 65 Macs all hitting the internet for all of that lot. Our network manager already shakes his head at me as I used to flatline our link on a regular basis.
@PaulHazelden So I finally figured out what works for me. For some reason deleting the whole folder just caused it to come back for me, but this works. Install GB, Push AppleLoops per usual.
new final step to fix the Admin prompts after AppleLoops installed:
(This has to be done AFTER Garageband is opened once, unfortunately. Before that the files do not exist)
#!/bin/bash currentuser=`stat -f "%Su" /dev/console` su "$currentuser" -c "rm -R ~/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist" exit 0
If I do a download rather than deploy - of both mandatory and optional - and install with a script (basically: pkg installer * on the folders) then it works fine. No additional download or admin prompt.
Doing deploy of Mandatory is missing the following:
I struggled with this for months and worked out a method that worked 100% of the time in my old university lab environment.
I used Carl Ashley's script as stated above, and I managed to get the "indexing" to stop at first launch also. As you can see, the post is a bit old but it may still be useful for you.
I will note that Carl Ashley's script is working well again...I had no good way of sharing my list of packages as I simply had to download them ALL and make a point of getting a copy of every single package folder downloaded to 2-3 locations. The load of packages was so enormous, I had no way to publish them. My script works once I did that, but I hated using it. Now that Carl has resolved the issue, I'm back to using it exclusively for this.
Thanks @chrisdaggett. I've not updated it as I don't work for the university any more and I've not updated any scripts since leaving (no time/not using them/etc). In previous versions the indexing and admin would still show up, so if that's been resolved with the new script, IGNORE ME! :D
I'm very glad this is still under active development (and discussion). I have had a problem with doing bare metal builds (--eraseinstall) that the timing of installing the Mac App Store apps and the running of appleloops to download/install the required sounds causes appleloops to think that GarageBand is not installed, and it quietly ends. I've fixed this manually this semester by just de-activating the policy that installs the loops until I'm sure GarageBand is installed, and then re-activating it.
Has anyone worked out a better plan for this? I'm not sure what the timing on the installation of the Mac App Store apps is. For instance, can I just loop in the script and look for GarageBand to show up? The Mac App Store stuff seems to be asynchronous from the policy related stuff (and if this is all in the admin guide somewhere, feel free to send me the reference and you can perform a guilt-free "Gibbs smack" on me at JNUC).
Also, my SE asked me how many machines/people were impacted by this, so maybe if we all advise Apple of the hardship this configuration of GarageBand causes in lab deployment we might get some action.
Updated the script for the new version and to add a delete preferences file in case they had already opened GarageBand to kill the downloader. Currently set for just mandatory. You can add -o for optional but that's a LONG install.
#!/bin/bash # Download the Zip file of the GitHub Repository /usr/bin/curl -o /tmp/appleLoops.zip -LO https://github.com/carlashley/appleLoops/archive/master.zip # Extract Zip /usr/bin/unzip -q /tmp/appleLoops.zip -d /tmp # Run the tool to download and install Apple Loops #update to call python to fix Appleloops November 2020 update python /tmp/appleLoops-master/appleLoops --deployment -a garageband -m -q # Cleanup rm -rf /tmp/appleLoops-master rm -f /tmp/appleLoops.zip #Fix GB Downloader currentuser=`stat -f "%Su" /dev/console` su "$currentuser" -c "rm -R ~/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist" exit 0
Love the script @chrisdaggett
But am I missing something? when adding -o it is installing the All Sounds bundle, but I am finding that it is not activating the updated sounds.
So, in my case, there are a small set of orchestra sounds that are being missed.
Any ideas on an argument to install these also??
@tjgriffin Thanks! I will have to try that in the morning and see if I can duplicate/take a guess at why it isn't activating those. Sometimes this happens because Apple does an update but I will test it out and see what I can find! (once in the past I had to create a package with a handful of the sounds until AppleLoops was updated). Will report back tomorrow morning!
Just to verify, the script was running on a logged in user
@chrisdaggett Thanks for looking into it. yes, I am running it on a logged in user. Mac is running 10.15.7.
When you click on the GarageBand > Sound Library The first 2 options are greyed out, showing that your script worked perfectly.
It's the last one we are after.
But no rush, I'll push out a package for now.
@chrisdaggett Do you have to have a newer version of Python installed to run this? The requirements listed for the AppleLoops script suggested that and I just wanted to be sure before I start pushing yours out.
Also I added a killall GarageBand to the beginning of your script just in case they left it opened.
Princeton Public Schools
@chrisdaggett Looks like the script is no longer working after an update to the Carlashley github site in November.
I am getting error trying to locate the Garageband app.
/Library/Application Support/JAMF/tmp/ButlerLoops: /tmp/appleLoops-master/appleLoops: /usr/local/bin/python3: bad interpreter: No such file or directory
rm: /var/root/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist: No such file or directory
Maybe it is python 3 that is not installed. Doing more troubleshooting. 10.15 machines in our lab. Anyone else have issues?
This has been working for me:
At start of policy I have it install the python package (its so small I don't care if it is already there or not). Then run the following script tweaked from @chrisdaggett. Our district is holding on 10.15.7 and we had to insert a "knob" into our jss to force the server not to check on app versions so it would continue to push the correct version for Catalina and not try to force the Big Sur version of GarageBand.
This is the small version for just basic loops:
#!/bin/bash # Quit GarageBand killall GarageBand # Download the Zip file of the GitHub Repository /usr/bin/curl -o /tmp/appleLoops.zip -LO https://github.com/carlashley/appleLoops/archive/master.zip # Extract Zip /usr/bin/unzip -q /tmp/appleLoops.zip -d /tmp # Run the tool to download and install Apple Loops /tmp/appleLoops-master/appleLoops --deployment -a garageband -m --log-level DEBUG # Cleanup rm -rf /tmp/appleLoops-master rm -f /tmp/appleLoops.zip #Fix GB Downloader currentuser=`stat -f "%Su" /dev/console` su "$currentuser" -c "rm -R ~/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist" exit 0
This is for the full install but for some reason it doesn't grab one package of symphony sounds and i make the policy with a warning that depending on internet speeds, it could take over an hour to download and install:
#!/bin/bash # Quit GarageBand killall GarageBand # Download the Zip file of the GitHub Repository /usr/bin/curl -o /tmp/appleLoops.zip -LO https://github.com/carlashley/appleLoops/archive/master.zip # Extract Zip /usr/bin/unzip -q /tmp/appleLoops.zip -d /tmp # Run the tool to download and install Apple Loops /tmp/appleLoops-master/appleLoops --deployment -a garageband -o --log-level DEBUG # Cleanup rm -rf /tmp/appleLoops-master rm -f /tmp/appleLoops.zip #Fix GB Downloader currentuser=`stat -f "%Su" /dev/console` su "$currentuser" -c "rm -R ~/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist" exit 0
Princeton Public Schools
@cvangorp Updated script, can't run command as script need to state python at command. We have since switched to ipads (boo...) so I didn't notice thank you for bringing it to my attention. (literally just added python in front of the command to run appleloops)
@gshackney macOS 10.16 comes with Python3+ installed. You can run the command via python3. To install Python otherwise is a huge hassle, so I am avoiding it unless absolutely necessary. I think where the issue will end up, eventually, is trying to do this on older mac's (10.14 and lower) if/when Apple kills Python 2.* support all together.
Right now using regular python still works for 10.14/10.15 so no reason to install python separately IMO. I just tested this with 10.14 thorugh 10.16 and it succeded on all 3 with no external python install.
#!/bin/bash # Download the Zip file of the GitHub Repository /usr/bin/curl -o /tmp/appleLoops.zip -LO https://github.com/carlashley/appleLoops/archive/master.zip # Extract Zip /usr/bin/unzip -q /tmp/appleLoops.zip -d /tmp # Run the tool to download and install Apple Loops #Updated to call using python to fix Appleloops3 November 2020 update python /tmp/appleLoops-master/appleLoops --deployment -a garageband -m -q # Cleanup rm -rf /tmp/appleLoops-master rm -f /tmp/appleLoops.zip #Fix GB Downloader currentuser=`stat -f "%Su" /dev/console` su "$currentuser" -c "rm -R ~/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist" exit 0
No hassle at all to install python 3 via a pkg and then run the script after during the policy. We are not moving to 10.16 anytime soon and also @cvangorp stated he was also using 10.15. I've have only success with what I posted above running it through self service. EDIT:Saw you edited this to talk about not needing to install python however in my testing it did not function without python 3 installed and gave errors. Once I started with the python 3 install all the errors disappeared. EDIT 2 Looks like the fix is either installing python 3 or changing the call in the script to use the python flag. Both solutions work it looks like.
Princeton Public Schools
@gshackney If it works for you that's all that matters! I was just stating it wasn't necessary. Once the command is called with python (Updated my scripts above, literally just adding python to the beginning) it uses the built in python in macOS (any version 10.14, 10.15 or 10.16) and doesn't look for the /usr/bin/local/python. But again, what you are doing is absolutely fine too (and possibly a better shot at being more future proof!)
You are absolutely correct about my old script not working with the new version of Appleloops, the way I had written the script calling it from command line it was trying to find Python at /usr/local/bin/python3. Your fix of installing python takes care of that and should make it work even if apple kills off the built in python2 at some point.
@kieranbailey Unfortunately there isn't anything it can cache other than the script itself as far as JAMF Caching goes. The script itself calls for the download of the AppleLoops python script and runs it and then it manually downloads all the soundfiles from Apple.
You can specify a caching server using Appleloops itself, by adding the -c option. I have actually not really tried that or tested it. Your http caching server would have to have the same folder structure matching the packages.
Another option, that I have used for local caching, is to just use AppleLoops to do a manual download. (just on one machine so you have the files)
python /tmp/appleLoops-master/appleLoops -d ~/Desktop/garageband -a garageband -m
Once you have the files you can place them in a few Zip files for deployment from your caching server using JAMF. (Make a few packages that are nothing more than the ZIP Files and place them in like /tmp/AppleLoopsCache) Once you have those packages in JAMF you can make them cached.
Then in the same policy you use to deploy those packages add a script to extract and run those packages after:
#!/bin/bash for zip in /tmp/AppleLoopsCache/*.zip do /usr/bin/unzip -q "$zip" -d /tmp/AppleLoopsCache done for pkg in /tmp/AppleLoopsCache/*.pkg do installer -pkg "$pkg" -target /Volumes/Macintosh HD done currentuser=`stat -f "%Su" /dev/console` su "$currentuser" -c "rm -R ~/Library/Containers/com.apple.garageband10/Data/Library/Preferences/com.apple.garageband10.plist" rm -rf /tmp/AppleLoopsCache jHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" msg="GarageBand Sounds Files Successfully Installed!" "$jHelper" -windowType utility -description "$msg" -button1 OK -icon "$icon" -iconSize 90 exit 0
The downside to any of the caching methods is every time there is a GarageBand update it is likely to have some new or modified sound file that breaks your cache. You then have to do the manual download method again and make new ZIP Packages.