From eb8283c8fe076f265aede50ebd16a5f634e8484e Mon Sep 17 00:00:00 2001 From: jaames Date: Sun, 17 Apr 2022 20:33:38 +0100 Subject: [PATCH] fix issue caused by old macOS adding hidden metadata files into the unzipped pdx --- Source/noteFs.lua | 10 +++++++--- Source/pdxinfo | 4 ++-- build.sh | 3 +++ website/src/pages/index.astro | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Source/noteFs.lua b/Source/noteFs.lua index 4d4a0e4..083ee65 100644 --- a/Source/noteFs.lua +++ b/Source/noteFs.lua @@ -216,6 +216,10 @@ function noteFs:getNoteCredits(filepath) return name, links end +function noteFs:isValidPpmFilename(s) + return string.sub(s, -4) == '.ppm' and string.sub(s, 1, 2) ~= '._' +end + function noteFs:setWorkingFolder(folderPath) if folderPath == '/samplememo' and not fs.isdir(folderPath) then fs.mkdir(folderPath) @@ -230,9 +234,9 @@ function noteFs:setWorkingFolder(folderPath) self.workingFolder = folderPath noteList = {} local list = fs.listFiles(folderPath) - for _, name in pairs(list) do - if string.sub(name, -3) == 'ppm' then - table.insert(noteList, folderPath .. name) + for _, filename in pairs(list) do + if noteFs:isValidPpmFilename(filename) then + table.insert(noteList, folderPath .. filename) end end numNotes = #noteList diff --git a/Source/pdxinfo b/Source/pdxinfo index c135175..ea5fe34 100644 --- a/Source/pdxinfo +++ b/Source/pdxinfo @@ -2,6 +2,6 @@ name=Playnote Studio author=James Daniel description=Flipnote Studio animation player for the Playdate bundleID=com.jaames.playnote -version=1.0 -buildNumber=1 +version=1.0.1 +buildNumber=2 imagePath=gfx/launcher \ No newline at end of file diff --git a/build.sh b/build.sh index 949ebf2..75ae01b 100755 --- a/build.sh +++ b/build.sh @@ -63,7 +63,10 @@ if [ $CMD == "build" ]; then find ./${GAME} -name "*.dll" -type f -delete # cleapup empty directories find ./${GAME} -empty -type d -delete + # cleanup macOS extended attribute files + find . -type f -name '._*' -delete # zip result, skipping pesky DS_Store files + rm ./${GAME}.zip zip -vr ./${GAME}.zip ./${GAME}/ -x "*.DS_Store" fi diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro index 17273b9..d690127 100644 --- a/website/src/pages/index.astro +++ b/website/src/pages/index.astro @@ -41,7 +41,7 @@ import { Icon } from 'astro-icon';

playnote.pdx

-
Version 1.0
+
Version 1.0.1
17.5 MB