Index: branches/blackosx/package/BootOptions/Resolution.txt =================================================================== --- branches/blackosx/package/BootOptions/Resolution.txt (revision 1586) +++ branches/blackosx/package/BootOptions/Resolution.txt (revision 1587) @@ -1,6 +1,6 @@ # --------------------------------------------- # Chameleon boot options list. -#ÊStructure is name:key=value +# Structure is name:key=value # Note: There must be a carriage return at end of last line # --------------------------------------------- Exclusive=True Index: branches/blackosx/package/BootOptions/KernelFlags.txt =================================================================== --- branches/blackosx/package/BootOptions/KernelFlags.txt (revision 1586) +++ branches/blackosx/package/BootOptions/KernelFlags.txt (revision 1587) @@ -1,8 +1,12 @@ # --------------------------------------------- # Chameleon boot options list. # Structure is name:key=value +# To Add kernel flag: format is name:KFflag=kernelflag # Note: There must be a carriage return at end of last line # --------------------------------------------- Exclusive=False # --------------------------------------------- -Npci:KF npci=0x2000 +Verbose:KFflag=-v +Singleusermode:KFflag=-s +Ignorecaches:KFflag=-f +Npci:KFflag=npci=0x2000 Index: branches/blackosx/package/TO DO.txt =================================================================== --- branches/blackosx/package/TO DO.txt (revision 1586) +++ branches/blackosx/package/TO DO.txt (revision 1587) @@ -1,8 +1,4 @@ TO DO -* Fix - Keylayouts to match new style for building org.chameleon.boot.plist. = DONE -* Check if boot options already exist before adding with plistbuddy. -* Check also kernel flags before adding with plistbuddy * Add theme to org.chameleon.boot.plist? (Do what when more than one installed?) -* Install log is so far ONLY generated when selecting to install Chameleon. -* Include Boot options/kernel flags/keylayouts/themes to install log. \ No newline at end of file +* Implement adding more than one kernel flag. \ No newline at end of file Index: branches/blackosx/package/Scripts/Main/Standard/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/Standard/postinstall (revision 1586) +++ branches/blackosx/package/Scripts/Main/Standard/postinstall (revision 1587) @@ -71,8 +71,9 @@ versionNumber=`cat "${scriptDir}"/Resources/version` revisionNumber=`cat "${scriptDir}"/Resources/revision` "$scriptDir"InstallLog.sh "${targetVolume}" "Installer version: ${versionNumber} ${revisionNumber}" -"$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script -Target volume = ${targetVolume}" +"$scriptDir"InstallLog.sh "${targetVolume}" "Diskutil" +"$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script" +"$scriptDir"InstallLog.sh "${targetVolume}" "Target volume = ${targetVolume}" # Double check we can see the selected partition and it's of the right type Index: branches/blackosx/package/Scripts/Main/EFI/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/EFI/postinstall (revision 1586) +++ branches/blackosx/package/Scripts/Main/EFI/postinstall (revision 1587) @@ -74,9 +74,9 @@ versionNumber=`cat "${scriptDir}"/Resources/version` revisionNumber=`cat "${scriptDir}"/Resources/revision` "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Installer version: ${versionNumber} ${revisionNumber}" -"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script -Target volume selected by user = ${targetVolumeChosenByUser} -Target volume = ${targetVolume}" +"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Diskutil" +"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script" +"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Target volume = ${targetVolume}" # Check to see if the selected disk uses a GPT Index: branches/blackosx/package/Scripts/Main/Post/postinstall =================================================================== --- branches/blackosx/package/Scripts/Main/Post/postinstall (revision 1586) +++ branches/blackosx/package/Scripts/Main/Post/postinstall (revision 1587) @@ -33,21 +33,26 @@ dest_vol="$3" fi -# --------------------------------------------- -# Get location of this script so we know where -# to find the Install Log script. -# --------------------------------------------- +# Where are we, so to find the Install Log script. MYLOCATION="${PWD}/${BASH_ARGV[0]}" export MYLOCATION="${MYLOCATION%/*}" scriptDir=$MYLOCATION +# Has install log already been generated? +if [ ! -f "${dest_vol}"/.ChameleonLogFlag ]; then + # Write some information to the Install Log + versionNumber=`cat "${scriptDir}"/Resources/version` + revisionNumber=`cat "${scriptDir}"/Resources/revision` + "$scriptDir"InstallLog.sh "${dest_vol}" "Installer version: ${versionNumber} ${revisionNumber}" + "$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script" + "$scriptDir"InstallLog.sh "${dest_vol}" "Target volume = ${dest_vol}" +else + "$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script" +fi + # set temporary directory chamTemp="$dest_vol/usr/local/chamTemp" -# Write script information to the Install Log -"$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script" - - # Check for temporary directory/Extra folder. if [ ! -d "$chamTemp"/Extra ]; then mkdir "$chamTemp"/Extra @@ -91,15 +96,13 @@ ls "${chamTemp}"/options | while read FILE do options[arrayCount]="${FILE##*/}" - keyRead="${options[$arrayCount]%=*}" - value="${options[$arrayCount]#*=}" - + # Check keyRead for 'KF' at beginning to # indicate that should be a kernel flag - if [ ${keyRead:0:2} = "KF" ];then - kernelflag=${keyRead#*F }=$value + if [ ${options[arrayCount]:0:2} = "KF" ];then + kernelflag=${options[arrayCount]##*flag=} sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelflag" "$tempOCBP" - "$scriptDir"InstallLog.sh "${dest_vol}" "Add kernel flag: ${kernelflag}" + "$scriptDir"InstallLog.sh "${dest_vol}" "Added kernel flag: ${kernelflag}" returnValue=$? if [ ${returnValue}=1 ]; then # Delete it for now, but need to append as more kernel flags could be added in future!! @@ -107,11 +110,13 @@ sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelflag" "$tempOCBP" fi else + keyRead="${options[$arrayCount]%=*}" + value="${options[$arrayCount]#*=}" # escape any spaces keyToUse=$( echo $keyRead | sed 's/ /\\ /g' ) if [ "${keyToUse}" != "DONT" ] && [ "${value}" != "USE" ]; then sudo /usr/libexec/plistbuddy -c "Add :${keyToUse} string ${value}" "$tempOCBP" - "$scriptDir"InstallLog.sh "${dest_vol}" "Add boot option: ${keyRead}=${value}" + "$scriptDir"InstallLog.sh "${dest_vol}" "Added boot option: ${keyRead}=${value}" fi fi (( arrayCount++ )) Index: branches/blackosx/package/Scripts/Sub/InstallLog.sh =================================================================== --- branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1586) +++ branches/blackosx/package/Scripts/Sub/InstallLog.sh (revision 1587) @@ -42,17 +42,17 @@ echo "Chameleon installer log - $( date ) ${verboseText} -====================================================== -" >"${logFile}" - diskutil list >>"${logFile}" - echo " -====================================================== -" >>"${logFile}" - +======================================================" >"${logFile}" + # Create /.ChameleonLogFlag file. echo "Log" >"${logLocation}"/.ChameleonLogFlag else # Append messages to the log as passed by other scripts. + if [ "${verboseText}" = "Diskutil" ]; then + diskutil list >>"${logFile}" + echo "======================================================" >>"${logFile}" + fi + if [ "${verboseText}" = "LineBreak" ]; then echo "======================================================" >>"${logFile}" fi @@ -63,7 +63,7 @@ echo " " >>"${logFile}" fi - if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]]; then + if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]] && [[ "${verboseText}" != "Diskutil" ]]; then echo "${verboseText}" >> "${logFile}" fi fi Index: branches/blackosx/package/Resources/en.lproj/Localizable.strings =================================================================== --- branches/blackosx/package/Resources/en.lproj/Localizable.strings (revision 1586) +++ branches/blackosx/package/Resources/en.lproj/Localizable.strings (revision 1587) @@ -9,7 +9,7 @@ "Standard_description" = "Install Chameleon's files to the root of the selected partition using either boot0 or boot0md depending on your system without destroying any existing Windows installation if you have one."; "EFI_title" = "EFI"; -"EFI_description" = "Install Chameleon's files to the normally hidden EFI partition using either boot0 or boot0md depending on your system and without destroying any existing Windows installation if you have one."; +"EFI_description" = "Install Chameleon's files to the normally hidden EFI system partition using either boot0 or boot0md depending on your system and without destroying any existing Windows installation if you have one."; "noboot_title" = "Don't install the Bootloader"; "noboot_description" = "Useful if you only want to install the extra's."; @@ -71,8 +71,8 @@ "Documentation_description" = "Documentation for Chameleon manual install and use"; // Boot Options -"Options_title" = "Boot Options"; -"Options_description" = "Create an /Extra/org.chameleon.Boot.plist and select your desired options to control Chameleon's settings."; +"Options_title" = "Available Settings"; +"Options_description" = "Create an /Extra/org.chameleon.Boot.plist by selecting any of these boot options and kernel flags."; // Control Index: branches/blackosx/package/buildpkg.sh =================================================================== --- branches/blackosx/package/buildpkg.sh (revision 1586) +++ branches/blackosx/package/buildpkg.sh (revision 1587) @@ -296,6 +296,8 @@ mkdir -p ${1}/Post/Scripts cp -f ${pkgroot}/Scripts/Main/Post/* ${1}/Post/Scripts cp -f ${pkgroot}/Scripts/Sub/InstallLog.sh ${1}/Post/Scripts + ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Post/Scripts/Resources/revision + ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Post/Scripts/Resources/version echo " [BUILD] Post " buildpackage "${1}/Post" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1 outline[$((outlinecount++))]="${indent[$xmlindent]}" @@ -306,7 +308,7 @@ # clean up - rm -R -f "${1}" + #rm -R -f "${1}" } @@ -426,7 +428,7 @@ header+="auth=\"root\">\n" header+="\t\n" - rm -R -f "${1}/Temp" + #rm -R -f "${1}/Temp" [ -d "${1}/Temp" ] || mkdir -m 777 "${1}/Temp" [ -d "${1}/Root" ] && mkbom "${1}/Root" "${1}/Temp/Bom" @@ -463,7 +465,7 @@ fi choices[$((choicescount++))]="\n\t#${packagename// /}.pkg\n\n" - rm -R -f "${1}" + #rm -R -f "${1}" fi }