macOS Mojave 10.14上安装iTunes12.6
2024-09-05 12:08:31
将一下内容保存为iTunes.scpt
,并运行
set question to display dialog "确定是否删除 iTunes ?" 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 /Applications/iTunes.app" with administrator privileges
display dialog "iTunes 已删除" buttons {"OK"}
set theDMG to choose file with prompt "请选择 iTunes 12.6 dmg 安装文件:" 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 "sed -i '' 's/18A1/14F2511/g' ~/tmp/Distribution"
do shell script "sed -i '' 's/gt/lt/g' ~/tmp/Distribution"
do shell script "pkgutil --flatten ~/tmp ~/Desktop/iTunes.pkg"
do shell script "hdiutil unmount /Volumes/iTunes/"
do shell script "rm -rf ~/tmp"
end if
if answer is equal to "No" then
display dialog "iTunes 未删除" buttons {"OK"}
return
end if
set question to display dialog "确定是否安装 iTtunes 12.6 ?" buttons {"Yes", "No"} default button 1
set answer to button returned of question
if answer is equal to "Yes" then
do shell script "open ~/Desktop/iTunes.pkg"
return
end if
if answer is equal to "No" then
display dialog "已修改的 iTunes.pkg 文件保存在桌面" buttons {"OK"}
return
end if
参考资料:https://tinyurl.com/y33j2pwt https://forums.macrumors.com/threads/apples-special-version-of-itunes-that-still-has-an-app-store-currently-incompatible-with-macos-mojave.2143244/page-4#post-26592234
最新文章
- Centos6下安装高版本Git
- 从excel文件中获取数据(2)
- BGP--边界网关协议
- BZOJ3578 : GTY的人类基因组计划2
- NeHe OpenGL教程 第三十六课:从渲染到纹理
- hive 0.11的安装配置
- 【转】Linux 技巧: Bash 参数和参数扩展
- 【Stage3D学习笔记续】山寨Starling(五):纹理计算和尺寸计算
- 5shift shell
- 大道至简第一章读后感——java伪代码形式
- .7-Vue源码之AST(3)
- mongodb的TTL索引介绍(超时索引)
- java如何编写多线程
- 《Apache Kafka实战》读书笔记-调优Kafka集群
- RelativeLayout的16种特有属性
- php分享二十八:mysql运行中的问题排查
- discuz注册页修改
- Tensorflow笔记——神经网络图像识别(五)手写数字识别
- Layui:前后端分离之Form表单
- 部署zookeeper集群
热门文章
- centos7安装oracle1201c
- 小记--------spark资源调度机制源码分析-----Schedule
- 编译错误ERROR C2027
- Linux就该这么学——新手必须掌握的命令之文件编辑命令组
- Vasya and Endless Credits CodeForces - 1107F (二分图完美匹配)
- 【weixin】微信企业号和公众号区别和关系是什么?
- 这周末又参加班里同学生日party,同学父母包场2小时花费大约1000美金左右。
- 打印从1到最大的n位数(考虑大数问题)
- Java8 常用Function、Predicate、Consumer、Supplier接口
- 09 SSH原理与远程登录实现方式