From c209b26511996fd0902487cd9c65d827002b579d Mon Sep 17 00:00:00 2001 From: SergeySlice Date: Sat, 15 May 2021 14:32:35 +0300 Subject: [PATCH] some build fixes by LAbyOne Signed-off-by: SergeySlice --- .../Resources/templates/Localizable.strings | 4 +- .../BootLoaderChooser/postinstall | 19 ++++------ .../CloverConfigPlistValidator/postinstall | 21 ++++------- Xcode/CloverConfigPlistValidator/Install.sh | 37 +++++++++++++++++++ Xcode/CloverConfigPlistValidator/makefile | 18 +++++++++ 5 files changed, 71 insertions(+), 28 deletions(-) create mode 100755 Xcode/CloverConfigPlistValidator/Install.sh create mode 100755 Xcode/CloverConfigPlistValidator/makefile diff --git a/CloverPackage/package/Resources/templates/Localizable.strings b/CloverPackage/package/Resources/templates/Localizable.strings index 0393182bd..11061148e 100644 --- a/CloverPackage/package/Resources/templates/Localizable.strings +++ b/CloverPackage/package/Resources/templates/Localizable.strings @@ -218,11 +218,11 @@ Install to /EFI/CLOVER/themes/steampunkblack"; "BootLoaderChooser_title" = "BootLoaderChooser"; "BootLoaderChooser_description" = "BootLoaderChooser by jief, This tool is a menu that allows you to choose which bootloader you want to load. -Will replace your BOOX64.efi, you can choose between Clover and OpenCore. +Will replace your BOOTX64.efi, you can choose between several bootloader versions. The first time, you'll get the menu. Choose one bootloader. The next times, it'll immediately load the bootloader you chose before. When you need the menu back, just boot your computer with a key pressed. -INSTALL ONLY IF YOU KNOW WHAT ARE YOU DOING !!! +INSTALL ONLY IF YOU KNOW WHAT YOU ARE DOING !!! More infos https://github.com/jief666/BootloaderChooser. "; // ============================================================================ diff --git a/CloverPackage/package/Scripts.templates/BootLoaderChooser/postinstall b/CloverPackage/package/Scripts.templates/BootLoaderChooser/postinstall index b7ca4e972..bd1326b03 100755 --- a/CloverPackage/package/Scripts.templates/BootLoaderChooser/postinstall +++ b/CloverPackage/package/Scripts.templates/BootLoaderChooser/postinstall @@ -4,18 +4,14 @@ echo "===============================================" echo "BootLoaderChooser Post-Install Script" echo "===============================================" -#echo "DEBUG: $ 1 = Full path to the installation package the installer app is processing: " $1 -#echo "DEBUG: $ 2 = Full path to the installation destination: " $2 -#echo "DEBUG: $ 3 = Installation volume (mountpoint) to receive the payload: " $3 -#echo "DEBUG: $ 4 = Root directory for the system: " $4 - -echo "preinstall: Path to installer....... $1" -echo "preinstall: Path to destination..... $2" -echo "preinstall: Path to dest volume..... $3" -echo "preinstall: Root of system folder... $4" - -############################################################################# +echo "postinstall: Path to installer....... $1" +echo "postinstall: Path to destination..... $2" +echo "postinstall: Path to dest volume..... $3" +echo "postinstall: Root of system folder... $4" +###################################################### +# If target volume root of current system then replace +# / with volume name. DEST_VOL="${3}" EFI_ROOT_DIR=$(cd "${DEST_VOL}"/Private/tmp/EFIROOTDIR; pwd -P) CLOVER_INSTALLER_PLIST_NEW="${DEST_VOL}@CLOVER_INSTALLER_PLIST_NEW@" @@ -29,4 +25,3 @@ cloverEFIFile='@CLOVER_BOOT_FILE@' # Mark that the option was selected /usr/libexec/PlistBuddy -c "Add $installer_choice bool true" "$CLOVER_INSTALLER_PLIST_NEW" >/dev/null - diff --git a/CloverPackage/package/Scripts.templates/CloverConfigPlistValidator/postinstall b/CloverPackage/package/Scripts.templates/CloverConfigPlistValidator/postinstall index 8a60ebf2b..a17ede432 100755 --- a/CloverPackage/package/Scripts.templates/CloverConfigPlistValidator/postinstall +++ b/CloverPackage/package/Scripts.templates/CloverConfigPlistValidator/postinstall @@ -4,26 +4,19 @@ echo "===============================================" echo "CloverConfigPlistValidator Post-Install Script" echo "===============================================" -#echo "DEBUG: $ 1 = Full path to the installation package the installer app is processing: " $1 -#echo "DEBUG: $ 2 = Full path to the installation destination: " $2 -#echo "DEBUG: $ 3 = Installation volume (mountpoint) to receive the payload: " $3 -#echo "DEBUG: $ 4 = Root directory for the system: " $4 - -echo "preinstall: Path to installer....... $1" -echo "preinstall: Path to destination..... $2" -echo "preinstall: Path to dest volume..... $3" -echo "preinstall: Root of system folder... $4" - +echo "postinstall: Path to installer....... $1" +echo "postinstall: Path to destination..... $2" +echo "postinstall: Path to dest volume..... $3" +echo "postinstall: Root of system folder... $4" +###################################################### # If target volume root of current system then replace # / with volume name. -if [ "$2" == "/" ]; then +if [ "$3" == "/" ]; then DEST_VOL="/Volumes/"$( ls -1F /Volumes | sed -n 's:@$::p' ) else - DEST_VOL="$2" + DEST_VOL="$3" fi -############################################################################# - CLOVER_INSTALLER_PLIST_NEW="${DEST_VOL}@CLOVER_INSTALLER_PLIST_NEW@" install_log="${DEST_VOL}/Private/tmp/Clover_Install_Log.txt" installer_choice="@INSTALLER_CHOICE@" diff --git a/Xcode/CloverConfigPlistValidator/Install.sh b/Xcode/CloverConfigPlistValidator/Install.sh new file mode 100755 index 000000000..da0d0480c --- /dev/null +++ b/Xcode/CloverConfigPlistValidator/Install.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# +# Install.sh +# alternate build for buldpkg +# Created on: May 12, 2021 +# Author: LAbyOne +# +cd "$(dirname $([ -L $0 ] && readlink $0 || echo $0))" + +declare -r ROOT="$PWD" +declare -r CLOVERROOT=$(dirname $(dirname $ROOT)) +declare -r BUILD_PATH="${CLOVERROOT}"/Xcode/CloverConfigPlistValidator/build +declare -r CCPV_PATH="${BUILD_PATH}"/ccpv +declare -r INSTALL_DIR="$CLOVERROOT/CloverPackage/CloverConfigPlistValidator" + +buildccpv() { +echo "- Building ccpv..." +cd "${CLOVERROOT}"/Xcode/CloverConfigPlistValidator +/usr/bin/xcodebuild -project 'CloverConfigPlistValidator.xcodeproj' \ + -configuration 'Release' \ + CONFIGURATION_BUILD_DIR=${BUILD_PATH} \ + EPLOYMENT_LOCATION=NO \ + ARCHS=x86_64 VALID_ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES >/dev/null + +# remove old and recreate directory +rm -Rf "$INSTALL_DIR" +mkdir -p "$INSTALL_DIR" + +# Install files +mv "$BUILD_PATH"/CloverConfigPlistValidator "$INSTALL_DIR"/ccpv + +# clean up +rm -Rf "$BUILD_PATH" +} + + +buildccpv \ No newline at end of file diff --git a/Xcode/CloverConfigPlistValidator/makefile b/Xcode/CloverConfigPlistValidator/makefile new file mode 100755 index 000000000..e984a4a57 --- /dev/null +++ b/Xcode/CloverConfigPlistValidator/makefile @@ -0,0 +1,18 @@ +# +# Makefile +# alternate build for buldpkg +# Created on: May 12, 2021 +# Author: LAbyOne +# + +CloverConfigPlistValidator: + @echo [XCODE] $(PROGRAMS) + @$(CURDIR)/Install.sh + + +clean: + @/usr/bin/xcodebuild -project 'CloverConfigPlistValidator.xcodeproj' clean >/dev/null + @rm -rf build *~ + @echo [CLEAN] $(PROGRAMS) + +.PHONY: CloverConfigPlistValidator clean