Created
October 24, 2019 07:30
-
-
Save b0gdanw/3416de8fb41a4ed65531f2c93c90b68a to your computer and use it in GitHub Desktop.
iTunes 12.6.5.3 on macOS Catalina 10.15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#iTunes 12.6.5.3 https://support.apple.com/HT208079 | |
#iTunes 12.8.2 https://support.apple.com/kb/dl1977 | |
set theDMG to choose file with prompt "Please select iTunes dmg file:" of type {"dmg"} | |
do shell script "hdiutil mount " & quoted form of POSIX path of theDMG | |
do shell script "pkgutil --expand /Volumes/iTunes/Install\\ iTunes.pkg ~/tmp" | |
do shell script "hdiutil unmount /Volumes/iTunes/" | |
do shell script "cd ~/tmp/iTunesX.pkg;" & "cat Payload | gunzip -dc |cpio -i;" & "ditto ~/tmp/iTunesX.pkg/Applications/iTunes.app ~/tmp/iTunes.app;" | |
do shell script "plutil -replace CFBundleGetInfoString -string 'iTunes 13.6.5.3' ~/tmp/iTunes.app/Contents/Info.plist" | |
do shell script "plutil -replace CFBundleShortVersionString -string 13.6.5 ~/tmp/iTunes.app/Contents/Info.plist" | |
do shell script "plutil -replace CFBundleVersion -string 13.6.5 ~/tmp/iTunes.app/Contents/Info.plist" | |
do shell script "plutil -replace CFBundleVersion -string 'iTunes 13.6.5.3' ~/tmp/iTunes.app/Contents/version.plist" | |
do shell script "plutil -replace CFBundleShortVersionString -string 13.6.5 ~/tmp/iTunes.app/Contents/version.plist" | |
set question to display dialog "Copy patched iTunes to /Applications?" buttons {"Yes", "No"} default button 1 | |
set answer to button returned of question | |
if answer is equal to "Yes" then | |
do shell script "ditto ~/tmp/iTunes.app /Applications/iTunes.app" | |
display dialog "Patched iTunes.app was copied to /Applications" buttons {"Ok"} | |
end if | |
set question to display dialog "Save patched iTunes as dmg?" buttons {"Yes", "No"} default button 1 | |
set answer to button returned of question | |
if answer is equal to "Yes" then | |
do shell script "hdiutil create -format UDRO -srcfolder ~/tmp/iTunes.app ~/Desktop/iTunes13.6.5.dmg" | |
display dialog "iTunes13.6.5.dmg was saved on Desktop" buttons {"Ok"} | |
end if | |
set question to display dialog "Save patched iTunes as an installable pkg?" buttons {"Yes", "No"} default button 1 | |
set answer to button returned of question | |
if answer is equal to "Yes" then | |
do shell script "pkgbuild --component ~/tmp/iTunes.app --install-location /Applications ~/Desktop/iTunes13.6.5.pkg" | |
display dialog "iTunes13.6.5.pkg was saved on Desktop" buttons {"Ok"} | |
end if | |
set question to display dialog "Save iTunesAccess as an installable pkg?" buttons {"Yes", "No"} default button 1 | |
set answer to button returned of question | |
if answer is equal to "Yes" then | |
do shell script "cd ~/tmp/iTunesAccess.pkg;" & "cat Payload | gunzip -dc |cpio -i;" & "mkdir ~/tmp/a;" & "ditto ~/tmp/iTunesAccess.pkg/System ~/tmp/a/System;" | |
do shell script "pkgbuild --root ~/tmp/a --install-location / ~/Desktop/iTunesAccess.pkg" | |
display dialog "iTunesAccess.pkg was saved on Desktop" buttons {"Ok"} | |
end if | |
set question to display dialog "Delete temporary ~/tmp folder?" buttons {"Yes", "No"} default button 1 | |
set answer to button returned of question | |
if answer is equal to "Yes" then | |
do shell script "rm -rf ~/tmp" | |
display dialog "~/tmp was deleted" buttons {"Ok"} | |
return | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment