Index: branches/blackosx/package/Scripts/Main/ESPpostinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/ESPpostinstall (revision 1657)
+++ branches/blackosx/package/Scripts/Main/ESPpostinstall (revision 1658)
@@ -36,7 +36,15 @@
stage1LoaderFAT="boot1f32"
stage2Loader="boot"
-targetVolumeChosenByUser=$3
+# If target volume root of current system then replace
+# / with volume name.
+if [ "$3" == "/" ]
+then
+ targetVolumeChosenByUser="/Volumes/"$( ls -1F /Volumes | sed -n 's:@$::p' )
+else
+ targetVolumeChosenByUser="$3"
+fi
+
targetDeviceChosenByUser=$( df "${targetVolumeChosenByUser}" | sed -n '2p' | awk '{print $1}' )
targetVolume="/Volumes/EFI"
Index: branches/blackosx/package/Scripts/Main/postinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/postinstall (revision 1657)
+++ branches/blackosx/package/Scripts/Main/postinstall (revision 1658)
@@ -18,10 +18,11 @@
exit 1
fi
-# clean up what would otherwise turn into "//" paths
+# If target volume root of current system then replace
+# / with volume name.
if [ "$3" == "/" ]
then
- dest_vol=""
+ dest_vol="/Volumes/"$( ls -1F /Volumes | sed -n 's:@$::p' )
else
dest_vol="$3"
fi
@@ -31,17 +32,9 @@
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
+# Write some information to the Install Log
+"$scriptDir"InstallLog.sh "${dest_vol}" "Running Post postinstall script"
+"$scriptDir"InstallLog.sh "${dest_vol}" "Target volume = ${dest_vol}"
# set temporary directory
chamTemp="$dest_vol/usr/local/chamTemp"
@@ -86,10 +79,36 @@
mkdir "$chamTemp"/Extra
fi
- # Create template for org.chameleon.Boot.plist"
+ tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
+
+ # # Does the user want to upgrade an existing /Extra folder?
+ # # If so, then make a copy of their Boot.plist.
+ # if [ -e "$chamTemp/install_type_upgrade" ]; then
+ # # Check for an existing /Extra folder
+ # if [ -e "$dest_vol"/.ChameleonEFI ]; then
+ # if [ -e "/Volumes/EFI/Extra/org.chameleon.Boot.plist" ]; then
+ # cp /Volumes/EFI/Extra/org.chameleon.Boot.plist "$tempOCBP"
+ # fi
+ # if [ -e "/Volumes/EFI/Extra/com.apple.Boot.plist" ]; then
+ # cp /Volumes/EFI/Extra/com.apple.Boot.plist "$tempOCBP"
+ # fi
+ # else
+ # if [ -e "$dest_vol/Extra/org.chameleon.Boot.plist" ]; then
+ # cp "${dest_vol}/Extra/org.chameleon.Boot.plist" "$tempOCBP"
+ # fi
+ # if [ -e "$dest_vol/Extra/com.apple.Boot.plist" ]; then
+ # cp "${dest_vol}/Extra/com.apple.Boot.plist" "$tempOCBP"
+ # fi
+ # fi
+ # elif [ -e "$chamTemp/install_type_new" ]; then
+ # # Create template for org.chameleon.Boot.plist"
+ # cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP"
+ # fi
+
+ # Create template for org.chameleon.Boot.plist"
tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
cp "$4"/Library/Preferences/SystemConfiguration/com.apple.Boot.plist "$tempOCBP"
-
+
# Read list of all boot options the user added.
arrayCount=0
kernelFlagCount=0
@@ -170,6 +189,7 @@
mv "$dest_vol/Extra" "$dest_vol/Extra_OLD-"$( date "+%H-%M-%S" )
fi
"$scriptDir"InstallLog.sh "${dest_vol}" "Writing folder: $dest_vol/Extra"
+ echo "Copying $chamTemp/Extra TO $dest_vol"
cp -R "$chamTemp"/Extra "$dest_vol"
else
# The EFI system partition install option was chosen
Index: branches/blackosx/package/Scripts/Main/Standardpostinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/Standardpostinstall (revision 1657)
+++ branches/blackosx/package/Scripts/Main/Standardpostinstall (revision 1658)
@@ -37,7 +37,16 @@
stage1LoaderFAT="boot1f32"
stage2Loader="boot"
-targetVolume=$3
+# If target volume root of current system then replace
+# / with volume name.
+if [ "$3" == "/" ]
+then
+ targetVolume="/Volumes/"$( ls -1F /Volumes | sed -n 's:@$::p' )
+else
+ targetVolume="$3"
+fi
+
+
targetDevice=$( df "${targetVolume}" | sed -n '2p' | awk '{print $1}' )
targetDeviceRaw=${targetDevice/disk/rdisk}
targetDisk=${targetDevice%s*}
@@ -192,6 +201,7 @@
"$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
"$scriptDir"InstallLog.sh "${targetVolume}" "Standard script complete"
+"$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
echo "==============================================="
echo "END - Standard Post-Install Script"
Index: branches/blackosx/package/Scripts/Main/preinstall
===================================================================
--- branches/blackosx/package/Scripts/Main/preinstall (revision 1657)
+++ branches/blackosx/package/Scripts/Main/preinstall (revision 1658)
@@ -20,8 +20,16 @@
export MYLOCATION="${MYLOCATION%/*}"
scriptDir=$MYLOCATION
-targetVolume=$3
+# If target volume root of current system then replace
+# / with volume name.
+if [ "$3" == "/" ]
+then
+ targetVolume="/Volumes/"$( ls -1F /Volumes | sed -n 's:@$::p' )
+else
+ targetVolume="$3"
+fi
+
logName="Chameleon_Installer_Log.txt"
logFile="${targetVolume}"/$logName
Index: branches/blackosx/package/Resources/en.lproj/Localizable.strings
===================================================================
--- branches/blackosx/package/Resources/en.lproj/Localizable.strings (revision 1657)
+++ branches/blackosx/package/Resources/en.lproj/Localizable.strings (revision 1658)
@@ -9,6 +9,19 @@
/ / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+ / / I n s t a l l T y p e
+ / / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ " I n s t a l l T y p e _ t i t l e " = " I n s t a l l T y p e " ;
+ " I n s t a l l T y p e _ d e s c r i p t i o n " = " C h o o s e t o p e r f o r m a n e w i n s t a l l a t i o n o r u p g r a d e a n e x i s t i n g i n s t a l l a t i o n . " ;
+
+ " N e w _ t i t l e " = " N e w I n s t a l l a t i o n " ;
+ " N e w _ d e s c r i p t i o n " = " B a c k u p a n e x i s t i n g / E x t r a f o l d e r , i f f o u n d o n t h e t a r g e t p a r t i t i o n . A n e w o n e w i l l b e c r e a t e d i f a n y o p t i o n s a r e c h o s e n f r o m t h e i n s t a l l e r , o t h e r t h a n t h e B o o t l o a d e r . " ;
+
+ " U p g r a d e _ t i t l e " = " U p g r a d e " ;
+ " U p g r a d e _ d e s c r i p t i o n " = " M e r g e a n e x i s t i n g / E x t r a f o l d e r , i f f o u n d o n t h e t a r g e t , w i t h a n y o p t i o n s c h o s e n f r o m t h e i n s t a l l e r , o t h e r t h a n t h e B o o t l o a d e r . " ;
+
+
+ / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
/ / B o o t l o a d e r
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
" C h a m e l e o n _ t i t l e " = " C h a m e l e o n B o o t l o a d e r " ;
Index: branches/blackosx/package/buildpkg.sh
===================================================================
--- branches/blackosx/package/buildpkg.sh (revision 1657)
+++ branches/blackosx/package/buildpkg.sh (revision 1658)
@@ -88,6 +88,31 @@
buildpackage "${1}/Core" "/" "0" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
# End build core package
+# build install type
+# echo "================= Chameleon ================="
+# outline[$((outlinecount++))]="${indent[$xmlindent]}"
+# choices[$((choicescount++))]="\t\n\t\n"
+# ((xmlindent++))
+# packagesidentity="org.chameleon.type"
+#
+# # build new install package
+# mkdir -p ${1}/New/Root
+# echo "" > "${1}/New/Root/install_type_new"
+# echo " [BUILD] New "
+# buildpackage "${1}/New" "/$chamTemp" "" "start_enabled=\"true\" selected=\"exclusive(choices['Upgrade'])\"" >/dev/null 2>&1
+# # End build new install package
+#
+# # build upgrade package
+# mkdir -p ${1}/Upgrade/Root
+# echo "" > "${1}/Upgrade/Root/install_type_upgrade"
+# echo " [BUILD] Upgrade "
+# buildpackage "${1}/Upgrade" "/$chamTemp" "" "start_selected=\"false\" selected=\"exclusive(choices['New'])\"" >/dev/null 2>&1
+# # End build upgrade package
+
+# ((xmlindent--))
+# outline[$((outlinecount++))]="${indent[$xmlindent]}"
+# End build install type
+
# build Chameleon package
echo "================= Chameleon ================="
outline[$((outlinecount++))]="${indent[$xmlindent]}"