diff --git a/build/scripts/build_haiku_image b/build/scripts/build_haiku_image index 272c20ad6e..71f05e957d 100755 --- a/build/scripts/build_haiku_image +++ b/build/scripts/build_haiku_image @@ -313,9 +313,20 @@ if [ $isCD ]; then echo "Copying boot image ..." $cp "$cdBootFloppy" "$outputDir" - # build the iso image - echo "Building CD image ..." - mkisofs -uid 0 -gid 0 -b `basename $cdBootFloppy` -R -V "$cdLabel" -o "$cdImagePath" "$tPrefix" + if [ $(which mkisofs) ]; then + # build the iso image using mkisofs + echo "Building CD image (mkisofs)..." + mkisofs -uid 0 -gid 0 -b `basename $cdBootFloppy` -R -V "$cdLabel" -o "$cdImagePath" "$tPrefix" + elif [ $(which genisoimage) ]; then + # build the iso image using genisoimage + echo "Building CD image (genisoimage)..." + echo "WARNING: genisoimage fallback has known problems with long filenames!" + echo " Please install mkisofs before making production releases!" + genisoimage -r -iso-level 4 -b `basename $cdBootFloppy` -V "$cdLabel" -o "$cdImagePath" "$tPrefix" + else + echo "you need mkisofs (preferred) or genisoimage to create a CD image." + exit 1 + fi # cleanup output dir $rmAttrs -rf "$outputDir"