Skip to content

Commit

Permalink
Migrate to OpenCore
Browse files Browse the repository at this point in the history
Package build scripts updated, config tuned to boot
  • Loading branch information
osy committed Sep 8, 2019
1 parent 01282fe commit c79f0a1
Show file tree
Hide file tree
Showing 4 changed files with 497 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Installer/Package.pkgproj
Original file line number Diff line number Diff line change
Expand Up @@ -2302,7 +2302,7 @@
</dict>
</array>
<key>NAME</key>
<string>HaC Mini</string>
<string>HaCMini</string>
<key>PAYLOAD_ONLY</key>
<false/>
<key>TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING</key>
Expand Down
15 changes: 15 additions & 0 deletions Installer/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

set -e

PACKAGES_BUILD=/usr/local/bin/packagesbuild

$PACKAGES_BUILD -v Package.pkgproj

# patch up dst selection screen
rm -rf "build/HaCMini"
pkgutil --expand "build/HaCMini.pkg" "build/HaCMini"
sed 's/enable_currentUserHome="false"//g;s/enable_localSystem="false"//g' "build/HaCMini/Distribution" > "build/HaCMini/Distribution.new"
mv "build/HaCMini/Distribution.new" "build/HaCMini/Distribution"
pkgutil --flatten "build/HaCMini" "build/HaCMini.pkg"
rm -rf "build/HaCMini"
7 changes: 6 additions & 1 deletion Installer/postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ fi

EFI_ROOT_DIR="${DEST_VOL}"/EFIROOTDIR
OLD_CONFIG="$INSTALLER_TEMP/config.old.plist"
NEW_CONFIG="$EFI_ROOT_DIR/EFI/OC/config.plist"
PLIST_BUDDY="/usr/libexec/PlistBuddy"

# Regenerate serial
if [ ! -f "$INSTALLER_TEMP/regenserial" ]; then
Expand All @@ -35,9 +37,12 @@ if [ -d "$INSTALLER_TEMP/Old" ]; then
fi

echo "Setting up unique identifiers..."
./copy_serial.sh "$OLD_CONFIG" "$EFI_ROOT_DIR/EFI/OC/config.plist"
./copy_serial.sh "$OLD_CONFIG" "$NEW_CONFIG"

if [ -f "$INSTALLER_TEMP/security" ]; then
echo "Setting secure boot settings..."
$PLIST_BUDDY -c "Set :Misc:Security:RequireSignature true" "$NEW_CONFIG"
$PLIST_BUDDY -c "Set :Misc:Security:RequireVault true" "$NEW_CONFIG"
echo "Generating secure vault..."
./sign_oc.sh "$EFI_ROOT_DIR/EFI/OC"
else
Expand Down
Loading

0 comments on commit c79f0a1

Please sign in to comment.