Skip to content

Commit

Permalink
Merge pull request xbmc#26158 from thexai/fix-ffmpeg-dav1d-rebuild
Browse files Browse the repository at this point in the history
[Windows] Force rebuild FFmpeg when dav1d version changes
  • Loading branch information
thexai authored Dec 22, 2024
2 parents 776b0aa + 28e9d67 commit 4af868a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions tools/buildsteps/windows/buildhelpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ PATH_CHANGE_REV_FILENAME=".last_success_revision"
#params paths to be hashed
function getBuildHash ()
{
local version="$(extractVersion $3)"
local package="$(extractPackage $3)"
local version="$(extractVersion $4)"
local hashStr
hashStr="$(git rev-list HEAD --max-count=1 -- $@)"
hashStr="$hashStr $@ $version"
hashStr="$hashStr $@ $version $package"
echo $hashStr
}

Expand Down Expand Up @@ -216,3 +217,12 @@ function extractVersion()

echo $ver
}

function extractPackage()
{
local path="$1"
local file="$path/0_package.target-$TRIPLET.list"
local package=$(grep '^dav1d-' $file)

echo $package
}
4 changes: 2 additions & 2 deletions tools/buildsteps/windows/make-mingwlibs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ checkfiles() {

buildProcess() {
export PREFIX=/xbmc/project/BuildDependencies/mingwlibs/$TRIPLET
if [ "$(pathChanged $PREFIX /xbmc/tools/buildsteps/windows /xbmc/tools/depends/target/ffmpeg/FFMPEG-VERSION)" == "0" ]; then
if [ "$(pathChanged $PREFIX /xbmc/tools/buildsteps/windows /xbmc/project/BuildDependencies/scripts /xbmc/tools/depends/target/ffmpeg/FFMPEG-VERSION)" == "0" ]; then
return
fi

Expand Down Expand Up @@ -106,7 +106,7 @@ echo "--------------------------------------------------------------------------
echo " compile mingw libs $TRIPLET done..."
echo "-------------------------------------------------------------------------------"

tagSuccessFulBuild $PREFIX /xbmc/tools/buildsteps/windows /xbmc/tools/depends/target/ffmpeg/FFMPEG-VERSION
tagSuccessFulBuild $PREFIX /xbmc/tools/buildsteps/windows /xbmc/project/BuildDependencies/scripts /xbmc/tools/depends/target/ffmpeg/FFMPEG-VERSION
}

run_builds() {
Expand Down

0 comments on commit 4af868a

Please sign in to comment.