From 48482689a241ef119b597fb136b8db121d0a4b96 Mon Sep 17 00:00:00 2001 From: stevezhengshiqi Date: Wed, 25 Jun 2025 04:24:11 -0400 Subject: [PATCH 1/3] makeV2: Exclude all .empty and .DS_Store files when zip CloverV2 --- CloverPackage/makeV2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CloverPackage/makeV2 b/CloverPackage/makeV2 index 1b7381b379..1516c7f564 100755 --- a/CloverPackage/makeV2 +++ b/CloverPackage/makeV2 @@ -7,7 +7,8 @@ ROOT="$PWD" SYMROOT="${ROOT}"/sym REVISION=$(git describe --tags $(git rev-list --tags --max-count=1)) -zip -qr CloverV2-${REVISION}.zip CloverV2 +# 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 sym From f6ef244802764fac3abc46eb1fc72b09468e2c82 Mon Sep 17 00:00:00 2001 From: stevezhengshiqi Date: Thu, 26 Jun 2025 22:10:16 -0400 Subject: [PATCH 2/3] buildpkg: Exclude .empty and .DS_Store in pkg --- CloverPackage/package/buildpkg.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CloverPackage/package/buildpkg.sh b/CloverPackage/package/buildpkg.sh index 5ff655cc3e..f31eaf1195 100755 --- a/CloverPackage/package/buildpkg.sh +++ b/CloverPackage/package/buildpkg.sh @@ -265,7 +265,7 @@ addTemplateScripts () { echo "Error addTemplateScripts: template '$templateName' doesn't exists" >&2; exit 1; } # Copy files to destination - rsync -pr --exclude=.svn --exclude="*~" "$templateRootDir/" "$pkgRootDir/Scripts/" + rsync -pr --exclude=.svn --exclude="*~" --exclude=".DS_Store" "$templateRootDir/" "$pkgRootDir/Scripts/" done files=$( find "$pkgRootDir/Scripts/" -type f ) @@ -524,7 +524,7 @@ main () choiceId="UEFI.only" packageRefId=$(getPackageRefId "${packagesidentity}" "${choiceId}") mkdir -p ${PKG_BUILD_DIR}/${choiceId}/Root/EFI - rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \ + rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \ ${SRCROOT}/CloverV2/EFI/BOOT ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/ addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${choiceId}" \ --subst="INSTALLER_CHOICE=$packageRefId" MarkChoice @@ -630,9 +630,9 @@ fi --subst="CLOVER_DRIVERS_LEGACY=$DRIVERS_LEGACY" \ --subst="CLOVER_DRIVERS_UEFI=$DRIVERS_UEFI" \ ${choiceId} - rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \ + rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \ ${SRCROOT}/CloverV2/EFI/BOOT ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/ - rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' \ + rsync -r --exclude=.svn --exclude="*~" --exclude='drivers*' --exclude='.empty' --exclude='.DS_Store' \ ${SRCROOT}/CloverV2/EFI/CLOVER ${PKG_BUILD_DIR}/${choiceId}/Root/EFI/ # config.plist @@ -1352,7 +1352,7 @@ if [[ ${NOEXTRAS} != *"Clover Themes"* ]]; then local themeName=${themes[$i]##*/} [[ -n $(inArray "$themeName" ${specialThemes[@]}) ]] && continue # it is a special theme mkdir -p "${PKG_BUILD_DIR}/${themeName}/Root/" - rsync -r --exclude=.svn --exclude="*~" "${themes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}" + rsync -r --exclude=.svn --exclude="*~" --exclude=".DS_Store" "${themes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}" packageRefId=$(getPackageRefId "${packagesidentity}" "${themeName}") addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${themeName}" \ --subst="themeName=$themeName" \ @@ -1378,7 +1378,7 @@ if [[ ${NOEXTRAS} != *"Clover Themes"* ]]; then # Don't add christmas and newyear themes if month < 11 [[ $currentMonth -lt 11 ]] && [[ "$themeName" == christmas ]] && continue mkdir -p "${PKG_BUILD_DIR}/${themeName}/Root/" - rsync -r --exclude=.svn --exclude="*~" "$artwork/${specialThemes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}" + rsync -r --exclude=.svn --exclude="*~" --exclude=".DS_Store" "$artwork/${specialThemes[$i]}/" "${PKG_BUILD_DIR}/${themeName}/Root/${themeName}" packageRefId=$(getPackageRefId "${packagesidentity}" "${themeName}") addTemplateScripts --pkg-rootdir="${PKG_BUILD_DIR}/${themeName}" \ --subst="themeName=$themeName" \ From 2c9531f3559b5dde25d61387c82ed89b477ba16d Mon Sep 17 00:00:00 2001 From: stevezhengshiqi Date: Thu, 26 Jun 2025 22:57:03 -0400 Subject: [PATCH 3/3] makeiso: Remove .DS_Store in iso image --- CloverPackage/makeiso | 1 + 1 file changed, 1 insertion(+) diff --git a/CloverPackage/makeiso b/CloverPackage/makeiso index 3d6d66abaf..925af19160 100755 --- a/CloverPackage/makeiso +++ b/CloverPackage/makeiso @@ -171,6 +171,7 @@ 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}