Index: branches/blackosx/package/buildpkg.sh =================================================================== --- branches/blackosx/package/buildpkg.sh (revision 1579) +++ branches/blackosx/package/buildpkg.sh (revision 1580) @@ -93,7 +93,9 @@ ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Standard/Scripts/Resources/revision ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Standard/Scripts/Resources/version echo " [BUILD] Standard " - buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 + buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1 +# hh="selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" +# buildpackage "${1}/Standard" "/" "${coresize}" "start_enabled=\"true\" start_selected=\"upgrade_allowed()\" ${hh}" >/dev/null 2>&1 # End build standard package # build efi package @@ -226,8 +228,54 @@ echo "" > "${1}/$optionName/Root/${keyValue}" echo " [BUILD] ${optionName} " - buildpackage "${1}/${optionName}" "/$chamTemp/options" "" "start_selected=\"false\"" >/dev/null 2>&1 + # ------------------------------------------------------ + # Before calling buildpackage, see if any bootOptionFiles + # have requested being set to exclusive. + # Manually set for now to 'Resolutions'. + # It can eventually be non-specifc by adding a dedicated + # field at the top of each bootOptionFiles to indicate + # if the set should be exclusive or not. + # ------------------------------------------------------ + # Note: This currently fails to achieve the desired effect? + # I'll improve the code etc. once (if) I can get it working! + # ------------------------------------------------------ + if [ $builtOptionsFolderName = "Resolution" ]; then + # build a list of all resolutions but exclude current resolution. + arrayCount=0 + while read textLineTemp + do + optionNameTemp=${textLineTemp%:*} + if [ $optionNameTemp != $optionName ]; then + resolutionArray[arrayCount]=$optionNameTemp + ((arrayCount++)) + fi + done < ${bootOptionFiles[$i]} + + # Build exclusive string + stringStart="selected=\"" + stringBefore="exclusive(choices['" + stringAfter="']) && " + stringEnd="'])\"" + x=${stringStart}${stringBefore} + + totalItems="${#resolutionArray[@]}" + lastItem=$((totalItems-1)) + + for (( r = 0 ; r < ${#resolutionArray[@]} ; r++ )) + do + x="${x}${resolutionArray[r]}" + # Only add these to end of string up to the one before the last item + if [ $r -lt $lastItem ]; then + x="${x}${stringAfter}${stringBefore}" + fi + done + x="${x}${stringEnd}" + buildpackage "${1}/${optionName}" "/$chamTemp/options" "" "start_selected=\"false\"" ${x} >/dev/null 2>&1 + else + buildpackage "${1}/${optionName}" "/$chamTemp/options" "" "start_selected=\"false\"" >/dev/null 2>&1 + fi + done < ${bootOptionFiles[$i]} ((xmlindent--))