diff --git a/CloverPackage/makeV2 b/CloverPackage/makeV2
index c3c2e9dd24..f8f44bb0fd 100755
--- a/CloverPackage/makeV2
+++ b/CloverPackage/makeV2
@@ -7,12 +7,21 @@ cd "$(dirname $([ -L $0 ] && readlink $0 || echo $0))"
ROOT="$PWD"
SYMROOT="${ROOT}"/sym
mkdir -p "$SYMROOT"
+
REVISION=$(git describe --tags "$(git rev-list --tags --max-count=1)")
+# Keep the traditional "r" prefix for numeric tags only.
+# Non-numeric tags are used exactly as they are.
+if [[ "$REVISION" =~ ^[0-9]+$ ]]; then
+ REVISION="r${REVISION}"
+fi
+
# Remove previous revision zip
rm -rf $SYMROOT/CloverV2-*.zip
+
# zip CloverV2, excluding all .empty and all .DS_Store
zip -qr CloverV2-${REVISION}.zip CloverV2 -x "*/.DS_Store" "*/.empty"
+
mv CloverV2-${REVISION}.zip $SYMROOT
open "$SYMROOT"
diff --git a/CloverPackage/makeiso b/CloverPackage/makeiso
index 53783cb8ea..87e920db74 100755
--- a/CloverPackage/makeiso
+++ b/CloverPackage/makeiso
@@ -25,6 +25,13 @@ EFIROOT=${SRCROOT}/CloverV2/EFI
BASETOOLS_DIR=${SRCROOT}/../BaseTools/Source/C/bin
REVISION=$(git describe --tags $(git rev-list --tags --max-count=1))
+
+# Keep the traditional "r" prefix for numeric tags only.
+# Non-numeric tags are used exactly as they are.
+if [[ "$REVISION" =~ ^[0-9]+$ ]]; then
+ REVISION="r${REVISION}"
+fi
+
PRODUCT=Clover-${REVISION}
CDLABEL=${PRODUCT}-X64
ISOIMAGE=${SYMROOT}/${CDLABEL}.iso
@@ -146,15 +153,18 @@ cp -f ${CLOVERROOT}/BootSectors/boot1f32 ${IMGROOT}/usr/standalone/i386
cp -f ${CLOVERROOT}/BootSectors/boot1f32alt ${IMGROOT}/usr/standalone/i386
cp -f ${CLOVERROOT}/BootSectors/boot1x ${IMGROOT}/usr/standalone/i386
cp -f ${CLOVERROOT}/BootSectors/boot1xalt ${IMGROOT}/usr/standalone/i386
+
# #ifdef CONFIG_FDISK440
# cp -f ${CLOVERROOT}/BootSectors/fdisk440 ${IMGROOT}/usr/bin
# #endif
+
rm -rf ${IMGROOT}/.s*
rm -rf ${IMGROOT}/*/.s*
rm -rf ${IMGROOT}/*/*/.s*
rm -rf ${IMGROOT}/*/*/*/.s*
rm -rf ${IMGROOT}/*/*/*/*/.s*
find "${IMGROOT}" -name '.DS_Store' -exec rm -R -f {} \; 2>/dev/null
+
echo "[HDIUTIL] ${ISOIMAGE}"
mkdir -p ${SYMROOT}/CloverISO-${REVISION}
@@ -165,16 +175,20 @@ hdiutil makehybrid -iso -joliet -hfs -hfs-volume-name ${CDLABEL} \
-eltorito-boot ${CDBOOT} -no-emul-boot -ov -o "${ISOIMAGE}" \
${IMGROOT} -quiet
fi
+
mv -f ${ISOIMAGE} ${SYMROOT}/CloverISO-${REVISION}/
+
echo "[TAR] CloverISO-${REVISION}"
tar -cv -f ${SYMROOT}/CloverISO-${REVISION}.tar -C ${SYMROOT}/CloverISO-${REVISION} .
+
echo "[LZMA] CloverISO-${REVISION}"
if [[ "$SYSNAME" == Linux ]]; then
xz -f -S .lzma ${SYMROOT}/CloverISO-${REVISION}.tar
else
-"$BASETOOLS_DIR"/LzmaCompress -e -o ${SYMROOT}/CloverISO-${REVISION}.tar.lzma ${SYMROOT}/CloverISO-${REVISION}.tar
+"$BASETOOLS_DIR"/LzmaCompress -e -o ${SYMROOT}/CloverISO-${REVISION}.tar.lzma ${SYMROOT}/CloverISO-${REVISION}.tar
fi
+
rm -rf ${SYMROOT}/CloverISO-${REVISION}.tar
# Open the final folder.
@@ -183,4 +197,4 @@ if [[ "${1:-}" == "" ]]; then
[[ "$SYSNAME" != Linux ]] && open sym
fi
-exit 0
+exit 0
\ No newline at end of file
diff --git a/CloverPackage/makepkg b/CloverPackage/makepkg
index 0470365205..a5df1dafc7 100755
--- a/CloverPackage/makepkg
+++ b/CloverPackage/makepkg
@@ -29,23 +29,30 @@ echo
}
while [[ $# -gt 0 ]]; do
- case "${1}" in
- --nothemes ) NOEXTRAS+=" --nothemes";;
- # --noprefpane ) NOEXTRAS+=" --noprefpane";;
- --norc ) NOEXTRAS+=" --norc";;
- --nolegacy ) NOEXTRAS+=" --nolegacy";;
- * ) printf "\e[1m%s\e[0m\n" "Invalid option: ${1} !"; usage; exit 1;;
- esac
- shift
+ case "${1}" in
+ --nothemes ) NOEXTRAS+=" --nothemes";;
+ # --noprefpane ) NOEXTRAS+=" --noprefpane";;
+ --norc ) NOEXTRAS+=" --norc";;
+ --nolegacy ) NOEXTRAS+=" --nolegacy";;
+ * ) printf "\e[1m%s\e[0m\n" "Invalid option: ${1} !"; usage; exit 1;;
+ esac
+ shift
done
# Workspace = edk2/Clover/CloverPackage
# Go to the script directory to create the package
-cd "$(dirname $0)"
+cd "$(dirname "$0")"
+# Get the latest Git tag.
revision=$(git describe --tags $(git rev-list --tags --max-count=1))
+# Keep the traditional "r" prefix for numeric tags only.
+# Non-numeric tags are used exactly as they are.
+if [[ "$revision" =~ ^[0-9]+$ ]]; then
+ revision="r${revision}"
+fi
+
SRCROOT="${PWD}"
SYMROOT="${SRCROOT}"/sym
PKG_BUILD_DIR="${SYMROOT}"/package
@@ -66,7 +73,7 @@ echo "${revision}" > revision
# # Create a new sym directory
# mkdir sym
-# Make the translation
+# Make the translation
echo ""
echo "========= Translating Resources ========"
./package/translate.sh || exit $?
@@ -83,13 +90,12 @@ if [[ -n "$xcode_path" ]]; then
# make -C "${SRCROOT}"/CloverPrefpane || exit $?
# Make utils
make -C "${SRCROOT}"/utils || exit $?
-# temporary use ready-to-use binaries
-# mkdir -p "${SYMROOT}"/utils
-# cp -v "${SRCROOT}"/utils/binaries/* "${SYMROOT}"/utils/
+ # temporary use ready-to-use binaries
+ # mkdir -p "${SYMROOT}"/utils
+ # cp -v "${SRCROOT}"/utils/binaries/* "${SYMROOT}"/utils/
fi
# Start to build installer.
-
package/buildpkg.sh --srcroot "$SRCROOT" --symroot "sym" --builddir "$PKG_BUILD_DIR" ${NOEXTRAS:1} || exit $?
#(cd sym ; zip Clover_r${revision}.zip \
@@ -97,15 +103,16 @@ package/buildpkg.sh --srcroot "$SRCROOT" --symroot "sym" --builddir "$PKG_BUILD_
# Clover_r${revision}.pkg.md5 )
# Workspace = edk2/Clover/CloverPackage/
-# Remove temp files.
-rm -f version # take this to clean old sources
-rm -f revision
+# Remove temp files.
+rm -f version
+rm -f revision
# Workspace = edk2/Clover/CloverPackage
+
# Open the final folder.
ls -la sym
open sym
-# Finish building installer.
+# Finish building installer.
exit 0
diff --git a/CloverPackage/package/Distribution b/CloverPackage/package/Distribution
index e279da7316..1b177b71b3 100644
--- a/CloverPackage/package/Distribution
+++ b/CloverPackage/package/Distribution
@@ -12,7 +12,7 @@