Build script for Ventura final (#205)
This commit is contained in:
parent
b2b3614676
commit
199fb92a81
2 changed files with 74 additions and 3 deletions
|
@ -72,12 +72,13 @@ catalogs = {
|
|||
"PublicRelease": "https://swscan.apple.com/content/catalogs/others/index-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
|
||||
"20": "https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
|
||||
'21': "https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog",
|
||||
'22': "https://swscan.apple.com/content/catalogs/others/index-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog"
|
||||
}
|
||||
|
||||
|
||||
def get_default_catalog():
|
||||
'''Returns the default softwareupdate catalog for the current OS'''
|
||||
return catalogs["21"]
|
||||
return catalogs["22"]
|
||||
# return catalogs["PublicRelease"]
|
||||
# return catalogs["DeveloperSeed"]
|
||||
|
||||
|
@ -102,9 +103,9 @@ def replicate_url(full_url,
|
|||
|
||||
# hack
|
||||
print("[+] Fetching %s" % full_url)
|
||||
if installer and "BaseSystem.dmg" not in full_url and "Big Sur" not in product_title and "Monterey" not in product_title:
|
||||
if installer and "BaseSystem.dmg" not in full_url and "Big Sur" not in product_title and "Monterey" not in product_title and "Ventura" not in product_title:
|
||||
return
|
||||
if ("Big Sur" in product_title or "Monterey" in product_title) and "InstallAssistant.pkg" not in full_url:
|
||||
if ("Big Sur" in product_title or "Monterey" in product_title or "Ventura" in product_title) and "InstallAssistant.pkg" not in full_url:
|
||||
return
|
||||
attempt_resume = True
|
||||
# path = urllib.parse.urlsplit(full_url)[2]
|
||||
|
|
70
scripts/ventura/Makefile
Normal file
70
scripts/ventura/Makefile
Normal file
|
@ -0,0 +1,70 @@
|
|||
# Builds either a recovery image (Ventura-recovery.img) or a full installer (Ventura-full.img) for Ventura.
|
||||
|
||||
# To build the full installer you must run this on macOS.
|
||||
# The recovery can be built on either macOS or Linux.
|
||||
|
||||
# For Ubuntu (or similar Linux distribution) you'll need to run this first to get the required packages:
|
||||
# sudo apt install qemu-utils make
|
||||
|
||||
# For macOS you'll probably need to run xcode-select --install to get the commandline tools
|
||||
|
||||
VENTURA_APP=/Applications/Install\ macOS\ Ventura.app
|
||||
|
||||
LINUX_TOOLS = qemu-img
|
||||
|
||||
OS :=
|
||||
UNAME_S := $(shell uname -s)
|
||||
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
OS = MACOS
|
||||
endif
|
||||
|
||||
# If this is Linux make sure we have all our build tools available:
|
||||
ifeq ($(OS),)
|
||||
K := $(foreach exec,$(LINUX_TOOLS),\
|
||||
$(if $(shell which $(exec)),some string,$(error "Missing required $(exec) tool for build")))
|
||||
endif
|
||||
|
||||
all: Ventura-recovery.img
|
||||
|
||||
%.img : %.dmg
|
||||
ln $< $@ || cp $< $@
|
||||
|
||||
ifeq ($(OS),MACOS)
|
||||
|
||||
Ventura-full.dmg : $(VENTURA_APP)
|
||||
hdiutil create -o "$@" -size 14g -layout GPTSPUD -fs HFS+J
|
||||
hdiutil attach -noverify -mountpoint /Volumes/install_build "$@"
|
||||
sudo "$</Contents/Resources/createinstallmedia" --volume /Volumes/install_build --nointeraction
|
||||
hdiutil detach "/Volumes/Install macOS Ventura"
|
||||
|
||||
# Avoid redownloading Ventura if the app already exists
|
||||
ifeq (,$(wildcard $(VENTURA_APP)))
|
||||
$(VENTURA_APP) : InstallAssistant.pkg
|
||||
sudo installer -pkg $< -target /
|
||||
endif
|
||||
|
||||
else
|
||||
|
||||
Ventura-full.dmg :
|
||||
$(error "Building a full installer requires this script to be run on macOS, run 'make Ventura-recovery.img' instead")
|
||||
|
||||
endif
|
||||
|
||||
Ventura-recovery.dmg : BaseSystem.dmg
|
||||
rm -f $@
|
||||
ifeq ($(OS),MACOS)
|
||||
hdiutil convert $< -format UDRW -o $@
|
||||
else
|
||||
qemu-img convert $< -O raw $@
|
||||
endif
|
||||
|
||||
BaseSystem.dmg :
|
||||
../../fetch-macOS-v2.py --action download --board-id Mac-AF89B6D9451A490B --os latest
|
||||
|
||||
InstallAssistant.pkg :
|
||||
../../backups/fetch-macOS.py --version latest --title "macOS Ventura"
|
||||
|
||||
clean :
|
||||
rm -f BaseSystem.chunklist BaseSystem.dmg SharedSupport.dmg InstallAssistant.pkg Ventura-recovery.img Ventura-full.img Ventura-recovery.dmg Ventura-full.dmg
|
||||
rm -rf content
|
Loading…
Reference in a new issue