acidanthera / bugtracker

Acidanthera Bugtracker
381 stars 43 forks source link

AppleALC build error on first attempt #2032

Open joevt opened 2 years ago

joevt commented 2 years ago

There are a couple build issues.

1) For target "AppleALC", since Info.plist is added after all the build phases, including "Merge Pinconfigs" and "Archive", there needs to be a separate target for merging Pinconfigs and archiving, so that the merge Pinconfigs script doesn't report an error: "Place merge_pinconfigs.sh to same directory as AppleALC.kext" when it cannot find the Info.plist during the first build attempt. This way, the developer doesn't need to build AppleALC twice to get a proper merged Info.plist, and the final AppleALC target's product will match the product in the archived zip file.

2) md5 files are used to detect changes in xml file formatting and zlib products. I think it might be faster to use modification date comparisons with a build product file like what the make command does. In the following example, a build product file named formatcheck.txt is used to indicate the last time a format check was completed. We use our own build product file so that problems in subsequent build phases don't cause this build phase to be unnecessarily repeated.

formatcheckdate=$(stat -f %m "misc/formatcheck.txt" 2> /dev/null || echo 0)
IFS=$'\n'
for thefile in $(find . -type f -name '*.xml'); do    # note: use xargs instead of this?
    if (($(stat -f %m "$thefile") >= $formatcheckdate)); then
        reformat file
    fi
done
date > "misc/formatcheck.txt"
vit9696 commented 2 years ago

Hmmm, but CI works ok here. Do you have any explanation why?

Also, it will be great if you could provide a patch. Thanks!