mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
add postbuild for openruntime build
This commit is contained in:
parent
7b8e787751
commit
f80906ecab
452
buildme
452
buildme
@ -9,7 +9,6 @@
|
|||||||
# sudo apt-get install build-essential uuid-dev iasl git gcc-10 nasm python3-distutils
|
# sudo apt-get install build-essential uuid-dev iasl git gcc-10 nasm python3-distutils
|
||||||
|
|
||||||
# $1 argument override MYTOOLCHAIN variable, in case you want GCC53 for example
|
# $1 argument override MYTOOLCHAIN variable, in case you want GCC53 for example
|
||||||
|
|
||||||
# ====== COLORS ======
|
# ====== COLORS ======
|
||||||
COL_BLACK="\x1b[30;01m"
|
COL_BLACK="\x1b[30;01m"
|
||||||
COL_RED="\x1b[31;01m"
|
COL_RED="\x1b[31;01m"
|
||||||
@ -25,6 +24,16 @@ cd "$(dirname $([ -L $0 ] && readlink $0 || echo $0))"
|
|||||||
declare -r CLOVERROOT="$PWD"
|
declare -r CLOVERROOT="$PWD"
|
||||||
declare -r SYSNAME="$(uname)"
|
declare -r SYSNAME="$(uname)"
|
||||||
MYTOOLCHAIN=${1:-GCC53}
|
MYTOOLCHAIN=${1:-GCC53}
|
||||||
|
revision=$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
|
lsha1="not a git repo"
|
||||||
|
export DIR_OUT=${DIR_OUT:-"$CLOVERROOT"/toolchain/tools/output}
|
||||||
|
export DIR_SCT=${DIR_SCT:-${CLOVERROOT}/toolchain/tools/Scripts}
|
||||||
|
if [[ ! -d ${DIR_SCT} ]] || [[ ! -d ${DIR_OUT} ]]; then
|
||||||
|
mkdir -p ${DIR_SCT} ${DIR_OUT}
|
||||||
|
fi
|
||||||
|
if [[ -d .git ]]; then
|
||||||
|
lsha1=$(git rev-parse --short HEAD)
|
||||||
|
fi
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
pathmunge() {
|
pathmunge() {
|
||||||
@ -105,11 +114,6 @@ else
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
export DIR_OUT=${DIR_OUT:-"$CLOVERROOT"/toolchain/tools/output}
|
|
||||||
if [[ ! -d "${DIR_OUT}" ]]; then
|
|
||||||
mkdir -p "${DIR_OUT}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
updateClover() {
|
updateClover() {
|
||||||
echo "[UPDATE CLOVER]"
|
echo "[UPDATE CLOVER]"
|
||||||
cd "${CLOVERROOT}"
|
cd "${CLOVERROOT}"
|
||||||
@ -148,30 +152,35 @@ fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
makeRelease() {
|
makeRelease() {
|
||||||
checkTools
|
checkTools
|
||||||
|
|
||||||
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
||||||
rm -rf "$CLOVERROOT"/Conf
|
rm -rf "$CLOVERROOT"/Conf
|
||||||
mkdir "$CLOVERROOT"/Conf
|
mkdir "$CLOVERROOT"/Conf
|
||||||
|
|
||||||
cd "${CLOVERROOT}"
|
cd "${CLOVERROOT}"
|
||||||
if [[ -z "$WORKSPACE" ]]; then
|
if [[ -z "$WORKSPACE" ]]; then
|
||||||
export EDK_TOOLS_PATH="${PWD}"/BaseTools
|
export EDK_TOOLS_PATH="${PWD}"/BaseTools
|
||||||
set +u
|
set +u
|
||||||
source ./edksetup.sh BaseTools
|
source ./edksetup.sh BaseTools
|
||||||
set -u
|
set -u
|
||||||
cd "$CLOVERROOT"
|
cd "$CLOVERROOT"
|
||||||
WORKSPACE="${PWD}"
|
WORKSPACE="${PWD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[BUILD CLOVER RELEASE]"
|
echo "[BUILD CLOVER RELEASE]"
|
||||||
./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
||||||
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D LESS_DEBUG -t $MYTOOLCHAIN
|
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D LESS_DEBUG -t $MYTOOLCHAIN
|
||||||
|
# Run a post build script if exist (${DIR_TOOLS}/CloverScripts/postbuild.sh)
|
||||||
|
if [[ -x "${DIR_TOOLS}"/CloverScripts/postbuild.sh ]]; then
|
||||||
|
echo "Running Clover postbuild script"
|
||||||
|
"${DIR_TOOLS}"/CloverScripts/postbuild.sh "${CLOVERROOT}" $MYTOOLCHAIN
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
buildCCPV() {
|
buildCCPV() {
|
||||||
cd "${CLOVERROOT}"/Xcode/CloverConfigPlistValidator
|
cd "${CLOVERROOT}"/Xcode/CloverConfigPlistValidator
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
BLC() {
|
BLC() {
|
||||||
@ -183,68 +192,67 @@ chmod 775 "${CLOVERROOT}"/CloverPackage/BootLoaderChooser/BootX64.efi
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildClover() {
|
buildClover() {
|
||||||
checkTools
|
checkTools
|
||||||
|
|
||||||
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
||||||
rm -rf "$CLOVERROOT"/Conf
|
rm -rf "$CLOVERROOT"/Conf
|
||||||
mkdir "$CLOVERROOT"/Conf
|
mkdir "$CLOVERROOT"/Conf
|
||||||
|
|
||||||
cd "${CLOVERROOT}"
|
cd "${CLOVERROOT}"
|
||||||
if [[ -z "$WORKSPACE" ]]; then
|
if [[ -z "$WORKSPACE" ]]; then
|
||||||
export EDK_TOOLS_PATH="${PWD}"/BaseTools
|
export EDK_TOOLS_PATH="${PWD}"/BaseTools
|
||||||
set +u
|
set +u
|
||||||
source ./edksetup.sh BaseTools
|
source ./edksetup.sh BaseTools
|
||||||
set -u
|
set -u
|
||||||
cd "$CLOVERROOT"
|
cd "$CLOVERROOT"
|
||||||
WORKSPACE="${PWD}"
|
WORKSPACE="${PWD}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[BUILD CLOVER]"
|
echo "[BUILD CLOVER]"
|
||||||
# Run a custom build script if exist (~/src/tools/Scripts/build.sh)
|
# Run a custom build script if exist (${DIR_TOOLS}/Scripts/build.sh)
|
||||||
# This allow the user to run ebuild.sh with own parameters
|
# This allow the user to run ebuild.sh with own parameters
|
||||||
if [[ -x "${DIR_TOOLS}"/Scripts/build.sh ]]; then
|
if [[ -x "${DIR_TOOLS}"/Scripts/build.sh ]]; then
|
||||||
echo "Running custom build script"
|
echo "Running custom build script"
|
||||||
"${DIR_TOOLS}"/Scripts/build.sh "${CLOVERROOT}" $MYTOOLCHAIN
|
"${DIR_TOOLS}"/Scripts/build.sh "${CLOVERROOT}" $MYTOOLCHAIN
|
||||||
else
|
else
|
||||||
local parameter=${1:-none}
|
local parameter=${1:-none}
|
||||||
if [[ "${parameter}" == HFSPlus ]]; then
|
if [[ "${parameter}" == HFSPlus ]]; then
|
||||||
#./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t $MYTOOLCHAIN
|
#./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t $MYTOOLCHAIN
|
||||||
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t $MYTOOLCHAIN
|
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D USE_APPLE_HFSPLUS_DRIVER -t $MYTOOLCHAIN
|
||||||
else
|
else
|
||||||
#./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
#./ebuild.sh -fr -mc --no-usb -D NO_GRUB_DRIVERS_EMBEDDED -t $MYTOOLCHAIN
|
||||||
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D LESS_DEBUG -t $MYTOOLCHAIN
|
./ebuild.sh -fr -D NO_GRUB_DRIVERS_EMBEDDED -D LESS_DEBUG -t $MYTOOLCHAIN
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# Run a post build script if exist (${DIR_TOOLS}/Scripts/postbuild.sh)
|
||||||
# Run a post build script if exist (~/src/tools/Scripts/postbuild.sh)
|
if [[ -x "${DIR_TOOLS}"/Scripts/postbuild.sh ]]; then
|
||||||
if [[ -x "${DIR_TOOLS}"/Scripts/postbuild.sh ]]; then
|
echo "Running postbuild script"
|
||||||
echo "Running postbuild script"
|
"${DIR_TOOLS}"/Scripts/postbuild.sh "${CLOVERROOT}" $MYTOOLCHAIN
|
||||||
"${DIR_TOOLS}"/Scripts/postbuild.sh "${CLOVERROOT}" $MYTOOLCHAIN
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buildtestsix() {
|
buildtestsix() {
|
||||||
checkTools
|
checkTools
|
||||||
|
|
||||||
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
||||||
rm -rf "$CLOVERROOT"/Conf
|
rm -rf "$CLOVERROOT"/Conf
|
||||||
mkdir "$CLOVERROOT"/Conf
|
mkdir "$CLOVERROOT"/Conf
|
||||||
|
|
||||||
cd "${CLOVERROOT}"
|
cd "${CLOVERROOT}"
|
||||||
echo "[BUILD CLOVERDB]"
|
echo "[BUILD CLOVERDB]"
|
||||||
./hebuild.sh
|
./hebuild.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
buildtestsev() {
|
buildtestsev() {
|
||||||
checkTools
|
checkTools
|
||||||
|
|
||||||
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
# to force recreation of the Conf folder. You can still use a custom CONF_PATH if you don't want recreation.
|
||||||
rm -rf "$CLOVERROOT"/Conf
|
rm -rf "$CLOVERROOT"/Conf
|
||||||
mkdir "$CLOVERROOT"/Conf
|
mkdir "$CLOVERROOT"/Conf
|
||||||
|
|
||||||
cd "${CLOVERROOT}"
|
cd "${CLOVERROOT}"
|
||||||
echo "[BUILD CLOVERDB]"
|
echo "[BUILD CLOVERDB]"
|
||||||
./ebuild.sh -t GCC53 -mc
|
./ebuild.sh -t GCC53 -mc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -301,39 +309,35 @@ fi
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildIso() {
|
buildIso() {
|
||||||
cd "${CLOVERROOT}"/CloverPackage
|
cd "${CLOVERROOT}"/CloverPackage
|
||||||
echo "[BUILD ISO]"
|
echo "[BUILD ISO]"
|
||||||
make iso
|
make iso
|
||||||
}
|
}
|
||||||
|
|
||||||
makeV2() {
|
makeV2() {
|
||||||
cd "${CLOVERROOT}"/CloverPackage
|
cd "${CLOVERROOT}"/CloverPackage
|
||||||
echo "[BUILD CloverV2]"
|
echo "[BUILD CloverV2]"
|
||||||
make zip
|
make zip
|
||||||
}
|
}
|
||||||
|
|
||||||
checkStatus() {
|
checkStatus() {
|
||||||
revision=r$(git describe --tags $(git rev-list --tags --max-count=1))
|
if [[ -d .git ]]; then
|
||||||
cd "${CLOVERROOT}"
|
git fetch --recurse-submodules origin
|
||||||
if [[ -d .git ]]; then
|
git log -n 1 > "${DIR_OUT}"/status_${revision}-$(date +%Y%m%d-%H.%M.%S).txt
|
||||||
git fetch --recurse-submodules origin
|
git status >> "${DIR_OUT}"/status_${revision}-$(date +%Y%m%d-%H.%M.%S).txt
|
||||||
git log -n 1 > "${DIR_OUT}"/status_${revision}-$(date +%Y%m%d-%H.%M.%S).txt
|
git submodule foreach --recursive "git log -n 1 && git status" >> "${DIR_OUT}"/status_${revision}-$(date +%Y%m%d-%H.%M.%S).txt && open "${DIR_OUT}"/status_${revision}-*.txt
|
||||||
git status >> "${DIR_OUT}"/status_${revision}-$(date +%Y%m%d-%H.%M.%S).txt
|
else
|
||||||
git submodule foreach --recursive "git log -n 1 && git status" >> "${DIR_OUT}"/status_${revision}-$(date +%Y%m%d-%H.%M.%S).txt && open "${DIR_OUT}"/status_${revision}-*.txt
|
echo "Error: this is not a git repository, can't get info!"
|
||||||
else
|
fi
|
||||||
echo "Error: this is not a git repository, can't get info!"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showdiff() {
|
showdiff() {
|
||||||
revision=r$(git describe --tags $(git rev-list --tags --max-count=1))
|
if [[ -d .git ]]; then
|
||||||
cd "${CLOVERROOT}"
|
git fetch --recurse-submodules origin
|
||||||
if [[ -d .git ]]; then
|
git diff > "${DIR_OUT}"/diff_${revision}-$(date +%Y%m%d-%H.%M.%S).txt && open "${DIR_OUT}"/diff_${revision}-*.txt
|
||||||
git fetch --recurse-submodules origin
|
else
|
||||||
git diff > "${DIR_OUT}"/diff_${revision}-$(date +%Y%m%d-%H.%M.%S).txt && open "${DIR_OUT}"/diff_${revision}-*.txt
|
echo "Error: this is not a git repository, can't get info!"
|
||||||
else
|
fi
|
||||||
echo "Error: this is not a git repository, can't get info!"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanBaseTools() {
|
cleanBaseTools() {
|
||||||
@ -343,140 +347,135 @@ make clean
|
|||||||
|
|
||||||
## Utilities
|
## Utilities
|
||||||
buildCPV() {
|
buildCPV() {
|
||||||
revision=r$(git describe --tags $(git rev-list --tags --max-count=1))
|
revision=r$(git describe --tags $(git rev-list --tags --max-count=1))
|
||||||
if [[ -d "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator ]]; then
|
if [[ -d "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator ]]; then
|
||||||
rm -Rf "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
rm -Rf "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
||||||
fi
|
fi
|
||||||
mkdir -p "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
mkdir -p "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
||||||
cd "${CLOVERROOT}"/Xcode/CloverConfigPlistValidator
|
cd "${CLOVERROOT}"/Xcode/CloverConfigPlistValidator
|
||||||
checkXCODE
|
checkXCODE
|
||||||
xcodebuild -project ./CloverConfigPlistValidator.xcodeproj -quiet CONFIGURATION_BUILD_DIR="${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
xcodebuild -project ./CloverConfigPlistValidator.xcodeproj -quiet CONFIGURATION_BUILD_DIR="${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
||||||
mv -f "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator/CloverConfigPlistValidator "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator/CloverConfigPlistValidator_${revision}
|
mv -f "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator/CloverConfigPlistValidator "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator/CloverConfigPlistValidator_${revision}
|
||||||
rm -r "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator/*.dSYM
|
rm -r "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator/*.dSYM
|
||||||
open "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
open "${CLOVERROOT}"/CloverPackage/CloverConfigPlistValidator
|
||||||
}
|
}
|
||||||
|
|
||||||
PlistEDPlus() {
|
PlistEDPlus() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && curl -qsSLk https://github.com/ic005k/PlistEDPlus/releases/download/1.0.64/PlistEDPlus_Mac.dmg > PlistEDPlus_Mac.dmg
|
cd $HOME/Desktop/ClovUtils && curl -qsSLk https://github.com/ic005k/PlistEDPlus/releases/download/1.2.35/PlistEDPlus_Mac.dmg > PlistEDPlus_Mac.dmg
|
||||||
hdiutil attach -quiet -noverify -nobrowse PlistEDPlus_Mac.dmg && cp -Rf /Volumes/bin\:release\:PlistEDPlus/PlistEDPlus.app $HOME/Desktop/ClovUtils
|
hdiutil attach -quiet -noverify -nobrowse PlistEDPlus_Mac.dmg && cp -Rf /Volumes/bin\:release\:PlistEDPlus/PlistEDPlus.app $HOME/Desktop/ClovUtils
|
||||||
hdiutil detach -force /Volumes/bin\:release\:PlistEDPlus
|
hdiutil detach -force /Volumes/bin\:release\:PlistEDPlus
|
||||||
rm -r $HOME/Desktop/ClovUtils/PlistEDPlus_Mac.dmg && open $HOME/Desktop/ClovUtils
|
rm -r $HOME/Desktop/ClovUtils/PlistEDPlus_Mac.dmg && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
Hackintool() {
|
Hackintool() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/headkaze/Hackintool/releases/download/3.6.2/Hackintool.zip -o Hackintool.zip
|
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/headkaze/Hackintool/releases/download/3.8.4/Hackintool.zip -o Hackintool.zip
|
||||||
unzip -q Hackintool.zip && rm -r Hackintool.zip && open $HOME/Desktop/ClovUtils
|
unzip -q Hackintool.zip && rm -r Hackintool.zip && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
BitmaskDecode() {
|
BitmaskDecode() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/BitmaskDecode && open $HOME/Desktop/ClovUtils
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/BitmaskDecode && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
MaciASL() {
|
MaciASL() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/acidanthera/MaciASL/releases/download/1.6.2/MaciASL-1.6.2-RELEASE.dmg > MaciASL-1.6.2-RELEASE.dmg
|
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/acidanthera/MaciASL/releases/download/1.6.2/MaciASL-1.6.2-RELEASE.dmg > MaciASL-1.6.2-RELEASE.dmg
|
||||||
hdiutil attach -quiet -noverify -nobrowse MaciASL-1.6.2-RELEASE.dmg && cp -Rf /Volumes/MaciASL/MaciASL.app $HOME/Desktop/ClovUtils
|
hdiutil attach -quiet -noverify -nobrowse MaciASL-1.6.2-RELEASE.dmg && cp -Rf /Volumes/MaciASL/MaciASL.app $HOME/Desktop/ClovUtils
|
||||||
hdiutil detach -force /Volumes/MaciASL
|
hdiutil detach -force /Volumes/MaciASL
|
||||||
rm -r $HOME/Desktop/ClovUtils/MaciASL-1.6.2-RELEASE.dmg && open $HOME/Desktop/ClovUtils
|
rm -r $HOME/Desktop/ClovUtils/MaciASL-1.6.2-RELEASE.dmg && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
dmidecode() {
|
dmidecode() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils/dmidecode
|
mkdir -p $HOME/Desktop/ClovUtils/dmidecode
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/acidanthera/dmidecode dmi-decode && xcodebuild -project ./dmi-decode/dmidecode.xcodeproj -quiet
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/acidanthera/dmidecode dmi-decode && xcodebuild -project ./dmi-decode/dmidecode.xcodeproj -quiet
|
||||||
cp -r dmi-decode/dmidecode $HOME/Desktop/ClovUtils/dmidecode && rm -Rf $HOME/Desktop/ClovUtils/dmi-decode && open $HOME/Desktop/ClovUtils
|
cp -r dmi-decode/dmidecode $HOME/Desktop/ClovUtils/dmidecode && rm -Rf $HOME/Desktop/ClovUtils/dmi-decode && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
Get-IOReg-Devices() {
|
Get-IOReg-Devices() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/LAbyOne/Get-IOReg-Devices
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/LAbyOne/Get-IOReg-Devices
|
||||||
mv -f Get-IOReg-Devices/Get\ IOReg\ Devices $HOME/Desktop/ClovUtils/Get\ IOReg-Devices && chmod a+x $HOME/Desktop/ClovUtils/Get\ IOReg-Devices/*.command
|
mv -f Get-IOReg-Devices/Get\ IOReg\ Devices $HOME/Desktop/ClovUtils/Get\ IOReg-Devices && chmod a+x $HOME/Desktop/ClovUtils/Get\ IOReg-Devices/*.command
|
||||||
rm -rf Get-IOReg-Devices && open $HOME/Desktop/ClovUtils
|
rm -rf Get-IOReg-Devices && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
NDBrightness () {
|
NDBrightness () {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/KAMIKAZEUA/NativeDisplayBrightness NDBrightness
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/KAMIKAZEUA/NativeDisplayBrightness NDBrightness
|
||||||
xcodebuild -project ./NDBrightness/NativeDisplayBrightness.xcodeproj -quiet -configuration Release clean build ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=$HOME/Desktop/ClovUtils
|
xcodebuild -project ./NDBrightness/NativeDisplayBrightness.xcodeproj -quiet -configuration Release clean build ARCHS=x86_64 ONLY_ACTIVE_ARCH=YES CONFIGURATION_BUILD_DIR=$HOME/Desktop/ClovUtils
|
||||||
rm -Rf $HOME/Desktop/ClovUtils/NDBrightness && rm -r $HOME/Desktop/ClovUtils/*.dSYM && open $HOME/Desktop/ClovUtils
|
rm -Rf $HOME/Desktop/ClovUtils/NDBrightness && rm -r $HOME/Desktop/ClovUtils/*.dSYM && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
SSDTTime() {
|
SSDTTime() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/SSDTTime && open $HOME/Desktop/ClovUtils
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/SSDTTime && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
USBMap() {
|
USBMap() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/USBMap
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/USBMap
|
||||||
open $HOME/Desktop/ClovUtils
|
open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
QtiASL() {
|
QtiASL() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/ic005k/QtiASL/releases/download/1.0.63/QtiASL_Mac.dmg > QtiASL_Mac.dmg
|
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/ic005k/QtiASL/releases/download/1.1.63/Xiasl_Mac.dmg > Xiasl_Mac.dmg
|
||||||
hdiutil attach -quiet -noverify -nobrowse QtiASL_Mac.dmg && cp -Rf /Volumes/bin\:release\:QtiASL/QtiASL.app $HOME/Desktop/ClovUtils
|
hdiutil attach -quiet -noverify -nobrowse Xiasl_Mac.dmg && cp -Rf /Volumes/bin\:release\:Xiasl/Xiasl.app $HOME/Desktop/ClovUtils
|
||||||
hdiutil detach -force /Volumes/bin\:release\:QtiASL
|
hdiutil detach -force /Volumes/bin\:release\:QtiASL
|
||||||
rm -r $HOME/Desktop/ClovUtils/QtiASL_Mac.dmg && open $HOME/Desktop/ClovUtils
|
rm -r $HOME/Desktop/ClovUtils/Xiasl_Mac.dmg && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
CsrDecode() {
|
CsrDecode() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils/CsrDecode
|
mkdir -p $HOME/Desktop/ClovUtils/CsrDecode
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/CsrDecode && open $HOME/Desktop/ClovUtils
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/CsrDecode && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
gibMacOS() {
|
gibMacOS() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/gibMacOS && open $HOME/Desktop/ClovUtils
|
cd $HOME/Desktop/ClovUtils && git clone -q https://github.com/corpnewt/gibMacOS && open $HOME/Desktop/ClovUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
mountR/W() {
|
mountR/W() {
|
||||||
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
if [[ ! -d $HOME/Desktop/ClovUtils ]]; then
|
||||||
mkdir -p $HOME/Desktop/ClovUtils
|
mkdir -p $HOME/Desktop/ClovUtils
|
||||||
fi
|
fi
|
||||||
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/jacklukem/BigSurmountsrw/releases/download/1.0/BigSurmountsrw2.app.zip -o BigSurmountsrw2.app.zip && open $HOME/Desktop/ClovUtils
|
cd $HOME/Desktop/ClovUtils && curl -sLq https://github.com/jacklukem/BigSurmountsrw/releases/download/1.0/BigSurmountsrw2.app.zip -o BigSurmountsrw2.app.zip && open $HOME/Desktop/ClovUtils
|
||||||
unzip -q $HOME/Desktop/ClovUtils/BigSurmountsrw2.app.zip && rm -r $HOME/Desktop/ClovUtils/BigSurmountsrw2.app.zip $HOME/Desktop/ClovUtils/__MACOSX
|
unzip -q $HOME/Desktop/ClovUtils/BigSurmountsrw2.app.zip && rm -r $HOME/Desktop/ClovUtils/BigSurmountsrw2.app.zip $HOME/Desktop/ClovUtils/__MACOSX
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
testing() {
|
testing() {
|
||||||
clear
|
clear
|
||||||
echo
|
echo
|
||||||
echo -e $COL_GREEN"-----------------------------------------------------------"$COL_RESET
|
echo -e $COL_GREEN" ------------------------------------------------------------------------------"
|
||||||
cd "${CLOVERROOT}"
|
echo -e " 🍀 Clover r${revision}$COL_WHITE (SHA: $lsha1)"
|
||||||
local lsha1="not a git repo"
|
echo -e $COL_CYAN" Test Builds"
|
||||||
if [[ -d .git ]]; then
|
echo -e $COL_GREEN" ------------------------------------------------------------------------------"$COL_RESET
|
||||||
lsha1=$(git rev-parse --short HEAD)
|
|
||||||
fi
|
|
||||||
echo -e " 🍀$COL_GREEN Clover r$(git describe --tags $(git rev-list --tags --max-count=1))$COL_WHITE (SHA: $lsha1)"$COL_RESET
|
|
||||||
echo -e $COL_CYAN" $COL_CYAN Test Builds "$COL_RESET
|
|
||||||
echo -e $COL_GREEN"-----------------------------------------------------------"$COL_RESET
|
|
||||||
echo -e "\n\n\n\n\n\n\n\n\n\n\n"
|
echo -e "\n\n\n\n\n\n\n\n\n\n\n"
|
||||||
|
|
||||||
PS3='
|
PS3='
|
||||||
@ -520,27 +519,22 @@ testing
|
|||||||
|
|
||||||
Utilities() {
|
Utilities() {
|
||||||
echo
|
echo
|
||||||
echo -e $COL_GREEN"-----------------------------------------------------------"$COL_RESET
|
echo -e $COL_GREEN" ------------------------------------------------------------------------------"
|
||||||
cd "${CLOVERROOT}"
|
echo -e " 🍀 Clover r${revision}$COL_WHITE (SHA: $lsha1)"
|
||||||
local lsha1="not a git repo"
|
echo -e $COL_CYAN" External Utilities "
|
||||||
if [[ -d .git ]]; then
|
echo -e $COL_GREEN" ------------------------------------------------------------------------------"$COL_RESET
|
||||||
lsha1=$(git rev-parse --short HEAD)
|
|
||||||
fi
|
|
||||||
echo -e " 🍀$COL_GREEN Clover r$(git describe --tags $(git rev-list --tags --max-count=1))$COL_WHITE (SHA: $lsha1)"$COL_RESET
|
|
||||||
echo -e $COL_CYAN" $COL_CYAN Utilities "$COL_RESET
|
|
||||||
echo -e $COL_GREEN"-----------------------------------------------------------"$COL_RESET
|
|
||||||
echo -e "\n\n\n\n\n\n\n\n"
|
echo -e "\n\n\n\n\n\n\n\n"
|
||||||
|
|
||||||
PS3='
|
PS3='
|
||||||
Files will be put on Desktop/ClovUtils: '
|
Files will be put on Desktop/ClovUtils: '
|
||||||
options=( 'Get CloverConfigPlistValidator'
|
options=( 'Get CloverConfigPlistValidator '
|
||||||
'Get PlistEDPlus'
|
'Get PlistEDPlus '
|
||||||
'Get Hackintool'
|
'Get Hackintool '
|
||||||
'Get BitmaskDecode'
|
'Get BitmaskDecode '
|
||||||
'Get MaciASL'
|
'Get MaciASL '
|
||||||
'Get dmidecode'
|
'Get dmidecode '
|
||||||
'Get IOReg-Devices'
|
'Get IOReg-Devices '
|
||||||
'Get NativeDisplayBrightness'
|
'Get NativeDisplayBrightness '
|
||||||
'Get SSDTTime'
|
'Get SSDTTime'
|
||||||
'Get USBMap'
|
'Get USBMap'
|
||||||
'Get QtiASL'
|
'Get QtiASL'
|
||||||
@ -552,35 +546,35 @@ options=( 'Get CloverConfigPlistValidator'
|
|||||||
select opt in "${options[@]}"
|
select opt in "${options[@]}"
|
||||||
do
|
do
|
||||||
case $opt in
|
case $opt in
|
||||||
"Get CloverConfigPlistValidator")
|
"Get CloverConfigPlistValidator ")
|
||||||
buildCPV
|
buildCPV
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get PlistEDPlus")
|
"Get PlistEDPlus ")
|
||||||
PlistEDPlus
|
PlistEDPlus
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get Hackintool")
|
"Get Hackintool ")
|
||||||
Hackintool
|
Hackintool
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get BitmaskDecode")
|
"Get BitmaskDecode ")
|
||||||
BitmaskDecode
|
BitmaskDecode
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get MaciASL")
|
"Get MaciASL ")
|
||||||
MaciASL
|
MaciASL
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get dmidecode")
|
"Get dmidecode ")
|
||||||
dmidecode
|
dmidecode
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get IOReg-Devices")
|
"Get IOReg-Devices ")
|
||||||
Get-IOReg-Devices
|
Get-IOReg-Devices
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
"Get NativeDisplayBrightness")
|
"Get NativeDisplayBrightness ")
|
||||||
NDBrightness
|
NDBrightness
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
@ -627,18 +621,10 @@ Utilities
|
|||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
echo
|
echo
|
||||||
echo -e $COL_GREEN"-----------------------------------------------------------"$COL_RESET
|
echo -e $COL_GREEN" ------------------------------------------------------------------------------"
|
||||||
cd "${CLOVERROOT}"
|
echo -e " 🍀 Clover r${revision}$COL_WHITE (SHA: $lsha1)"
|
||||||
|
echo -e "$COL_CYAN TOOLCHAIN: $MYTOOLCHAIN (override example: './buildme XCODE8')"
|
||||||
local lsha1="not a git repo"
|
echo -e $COL_GREEN" ------------------------------------------------------------------------------"$COL_RESET
|
||||||
|
|
||||||
if [[ -d .git ]]; then
|
|
||||||
lsha1=$(git rev-parse --short HEAD)
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e " 🍀$COL_GREEN Clover r$(git describe --tags $(git rev-list --tags --max-count=1))$COL_WHITE (SHA: $lsha1)"$COL_RESET
|
|
||||||
echo -e "$COL_CYAN TOOLCHAIN: $MYTOOLCHAIN (override example: './buildme XCODE8')"
|
|
||||||
echo -e $COL_GREEN"-----------------------------------------------------------"$COL_RESET
|
|
||||||
echo -e "\n\n\n\n\n\n\n\n"
|
echo -e "\n\n\n\n\n\n\n\n"
|
||||||
PS3='
|
PS3='
|
||||||
Please enter your choice: '
|
Please enter your choice: '
|
||||||
|
27
toolchain/tools/CloverScripts/postbuild.sh
Normal file
27
toolchain/tools/CloverScripts/postbuild.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# **************************************************
|
||||||
|
# CLOVER builds only
|
||||||
|
# **************************************************
|
||||||
|
# postinstall for OpenRuntime.efi
|
||||||
|
# **************************************************
|
||||||
|
# Users please do not Modify
|
||||||
|
# for Personalized scripts use "Scripts" folder
|
||||||
|
# **************************************************
|
||||||
|
cd "$(dirname $0)"
|
||||||
|
|
||||||
|
export CLOVERROOT=${CLOVERROOT:-$WORKSPACE}
|
||||||
|
export OR_DIR=${OR_DIR:-$CLOVERROOT/CloverPackage/CloverV2/EFI/CLOVER/drivers/off/UEFI/MemoryFix}
|
||||||
|
version=v12
|
||||||
|
|
||||||
|
if [[ ! -x "${CLOVERROOT}"/ebuild.sh ]]; then
|
||||||
|
echo "can't find Clover"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -d "${OR_DIR}" ]]; then
|
||||||
|
mv -f "${OR_DIR}"/OpenRuntime.efi "${OR_DIR}"/OpenRuntime-${version}.efi
|
||||||
|
else
|
||||||
|
echo "" && echo "ERROR: nothing to be done, driver not in place!"
|
||||||
|
sleep 2
|
||||||
|
fi
|
||||||
|
# **************************************************
|
Loading…
Reference in New Issue
Block a user