Index: trunk/package/Distribution
===================================================================
--- trunk/package/Distribution (revision 1676)
+++ trunk/package/Distribution (revision 1677)
@@ -12,7 +12,7 @@
-
+
Chameleon_title
@@ -27,28 +27,16 @@
my.result.type = 'Fatal';
return false;
}
- system.log('installCheckScript: Passed.');
+ system.log('installCheckScript: Failed.');
return false;
}
function volCheckScript()
{
- system.log('volCheckScript: Passed.');
+ system.log('volCheckScript: Failed.');
return true;
}
- function upgrade_allowed(){
- var upgradable = true;
- var upgradeAction = my.choice.packageUpgradeAction;
-
- if((upgradeAction == "downgrade") || (upgradeAction == "mixed")){
- my.choice.tooltip = system.localizedString('Newer_Package_Installed_message');
- upgradable = false;
- }
-
- return upgradable;
- }
-
function systemHasGPT(){
var obj = system.ioregistry.matchingName("EFI System Partition");
if (obj)
Index: trunk/package/slimpkg.sh
===================================================================
--- trunk/package/slimpkg.sh (revision 1676)
+++ trunk/package/slimpkg.sh (revision 1677)
@@ -3,10 +3,9 @@
# $1 Path to store built package
packagesidentity="org.chameleon"
-
packagename="Chameleon"
-
pkgroot="${0%/*}"
+chamTemp="usr/local/chamTemp"
COL_BLACK="\x1b[30;01m"
COL_RED="\x1b[31;01m"
@@ -18,7 +17,6 @@
COL_BLUE="\x1b[34;01m"
COL_RESET="\x1b[39;49;00m"
-#version=$( grep I386BOOT_CHAMELEONVERSION vers.h | awk '{ print $3 }' | tr -d '\"' )
version=$( cat version )
stage=${version##*-}
revision=$( grep I386BOOT_CHAMELEONREVISION vers.h | awk '{ print $3 }' | tr -d '\"' )
@@ -27,12 +25,10 @@
# =================
-develop=" Crazor, Dense, fassl, fxtentacle, iNDi, JrCs, Kabyl, kaitek, mackerintel, mercurysquad, munky, Slice, meklort, mozodojo, rekursor, Turbo, cparm, valv & zef "
+develop=$(awk "NR==6{print;exit}" ${pkgroot}/../CREDITS)
+credits=$(awk "NR==10{print;exit}" ${pkgroot}/../CREDITS)
+pkgdev=$(awk "NR==14{print;exit}" ${pkgroot}/../CREDITS)
-credits=" andyvand, asereBLN, Azimut, bumby, cosmo1t, dfe, Galaxy, kalyway, Krazubu, MasterChief, netkas, sckevyn, smith@@, THeKiNG, DutchHockeyPro & Andy"
-
-pkgdev=" blackosx, ErmaC , scrax"
-
# =================
distributioncount=0
@@ -50,179 +46,197 @@
rm -R -f "${1}"
echo ""
-echo -e $COL_BLACK" ---------------------"$COL_RESET
-echo -e $COL_BLACK" Building Slim Package"$COL_RESET
-echo -e $COL_BLACK" ---------------------"$COL_RESET
+echo -e $COL_CYAN" ---------------------------------------"$COL_RESET
+echo -e $COL_CYAN" Building $packagename Slim Install Package"$COL_RESET
+echo -e $COL_CYAN" ---------------------------------------"$COL_RESET
echo ""
outline[$((outlinecount++))]="${indent[$xmlindent]}"
+# build pre install package
+ echo "================= Preinstall ================="
+ ((xmlindent++))
+ packagesidentity="org.chameleon"
+ mkdir -p ${1}/Pre/Root
+ mkdir -p ${1}/Pre/Scripts
+ ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/Pre/Scripts/Resources/revision
+ ditto --noextattr --noqtn ${1%/*/*}/version ${1}/Pre/Scripts/Resources/version
+ cp -f ${pkgroot}/Scripts/Main/preinstall ${1}/Pre/Scripts
+ cp -f ${pkgroot}/Scripts/Sub/InstallLog.sh ${1}/Pre/Scripts
+ echo " [BUILD] Pre "
+ buildpackage "${1}/Pre" "/" "" "start_visible=\"false\" start_selected=\"true\"" >/dev/null 2>&1
+# End build pre install package
+
# build core package
echo "================= Core ================="
- ((xmlindent++))
- packagesidentity="org.chameleon.core"
- mkdir -p ${1}/Core/Root/usr/sbin
+ packagesidentity="org.chameleon"
mkdir -p ${1}/Core/Root/usr/local/bin
mkdir -p ${1}/Core/Root/usr/standalone/i386
-# if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
-# echo "Modules found."
-# mkdir -p ${1}/Core/Root/usr/standalone/i386/modules
-# cp -R ${1%/*}/i386/modules ${1}/Core/Root/usr/standalone/i386
-# else
-# echo "No found modules into dir module"
-# fi
ditto --noextattr --noqtn ${1%/*}/i386/boot ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot0 ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot0md ${1}/Core/Root/usr/standalone/i386
-# ditto --noextattr --noqtn ${1%/*}/i386/boot0hf ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1f32 ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1h ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1he ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/boot1hp ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/cdboot ${1}/Core/Root/usr/standalone/i386
ditto --noextattr --noqtn ${1%/*}/i386/chain0 ${1}/Core/Root/usr/standalone/i386
-# fixperms "${1}/Core/Root/"
- ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/sbin
- ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/sbin
+ ditto --noextattr --noqtn ${1%/*}/i386/fdisk440 ${1}/Core/Root/usr/local/bin
+ ditto --noextattr --noqtn ${1%/*}/i386/bdmesg ${1}/Core/Root/usr/local/bin
local coresize=$( du -hkc "${1}/Core/Root" | tail -n1 | awk {'print $1'} )
echo " [BUILD] i386 "
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]}\t"
- choices[$((choicescount++))]="\n\n"
-
+ outline[$((outlinecount++))]="${indent[$xmlindent]}"
+ choices[$((choicescount++))]="\t\n\t\n"
+ ((xmlindent++))
+
# build standard package
mkdir -p ${1}/Standard/Root
- mkdir -p ${1}/Standard/Scripts/Tools
- cp -f ${pkgroot}/Scripts/Standard/* ${1}/Standard/Scripts
- # ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Tools/SetFile
+ mkdir -p ${1}/Standard/Scripts/Resources
+ cp -f ${pkgroot}/Scripts/Main/Standardpostinstall ${1}/Standard/Scripts/postinstall
+ cp -f ${pkgroot}/Scripts/Sub/* ${1}/Standard/Scripts
+ ditto --arch i386 `which SetFile` ${1}/Standard/Scripts/Resources/SetFile
+ 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\" selected=\"exclusive(choices['EFI']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build standard package
# build efi package
mkdir -p ${1}/EFI/Root
- mkdir -p ${1}/EFI/Scripts/Tools
- cp -f ${pkgroot}/Scripts/EFI/* ${1}/EFI/Scripts
- # ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Tools/SetFile
+ mkdir -p ${1}/EFI/Scripts/Resources
+ cp -f ${pkgroot}/Scripts/Main/ESPpostinstall ${1}/EFI/Scripts/postinstall
+ cp -f ${pkgroot}/Scripts/Sub/* ${1}/EFI/Scripts
+ ditto --arch i386 `which SetFile` ${1}/EFI/Scripts/Resources/SetFile
+ ditto --noextattr --noqtn ${1%/*/*}/revision ${1}/EFI/Scripts/Resources/revision
+ ditto --noextattr --noqtn ${1%/*/*}/version ${1}/EFI/Scripts/Resources/version
echo " [BUILD] EFI "
- buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1
+ buildpackage "${1}/EFI" "/" "${coresize}" "start_visible=\"systemHasGPT()\" selected=\"exclusive(choices['Standard']) && exclusive(choices['noboot'])\"" >/dev/null 2>&1
# End build efi package
# build reset choice package
mkdir -p ${1}/noboot/Root
echo " [BUILD] Reset choice "
- buildpackage "${1}/noboot" "/tmpcham" "" "start_visible=\"true\" start_selected=\"false\" selected=\"exclusive(choices['Standard']) && exclusive(choices['EFI'])\"" >/dev/null 2>&1
+ buildpackage "${1}/noboot" "/$chamTemp" "" "selected=\"exclusive(choices['Standard']) && exclusive(choices['EFI'])\"" >/dev/null 2>&1
# End build reset choice package
- # build Modules package
- echo "================= Modules ================="
- ###############################
- # AMDGraphicsEnabler.dylib #
- # ATiGraphicsEnabler.dylib #
- # IntelGraphicsEnabler.dylib #
- # klibc.dylib #
- # NVIDIAGraphicsEnabler.dylib #
- # Resolution.dylib #
- # uClibcxx.dylib #
- ###############################
- if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
- {
- outline[$((outlinecount++))]="${indent[$xmlindent]}\t"
- choices[$((choicescount++))]="\n\n"
- ((xmlindent++))
- packagesidentity="org.chameleon.module"
+ ((xmlindent--))
+ outline[$((outlinecount++))]="${indent[$xmlindent]}"
+# End build Chameleon package
+
+# build Modules package
+ echo "================= Modules ================="
+ ###############################
+ # Supported Modules #
+ ###############################
+ # klibc.dylib #
+ # Resolution.dylib #
+ # uClibcxx.dylib #
+ # Keylayout.dylib #
+ ###############################
+ if [ "$(ls -A "${1%/*}/i386/modules")" ]; then
+ {
+ outline[$((outlinecount++))]="${indent[$xmlindent]}"
+ choices[$((choicescount++))]="\t\n\t\n"
+ ((xmlindent++))
+ packagesidentity="org.chameleon.modules"
# -
- if [ -e ${1%/*}/i386/modules/AMDGraphicsEnabler.dylib ]; then
- {
- mkdir -p ${1}/AMDGraphicsEnabler/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/AMDGraphicsEnabler.dylib ${1}/AMDGraphicsEnabler/Root
- echo " [BUILD] AMDGraphicsEnabler "
- buildpackage "${1}/AMDGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
+ if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then
+ {
+ mkdir -p ${1}/klibc/Root
+ ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
+ echo " [BUILD] klibc "
+ buildpackage "${1}/klibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
+ }
+ fi
# -
- if [ -e ${1%/*}/i386/modules/ATiGraphicsEnabler.dylib ]; then
- {
- mkdir -p ${1}/ATiGraphicsEnabler/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/ATiGraphicsEnabler.dylib ${1}/ATiGraphicsEnabler/Root
- echo " [BUILD] ATiGraphicsEnabler "
- buildpackage "${1}/ATiGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
+ if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then
+ {
+ mkdir -p ${1}/AutoReso/Root
+ ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
+ echo " [BUILD] Resolution "
+ buildpackage "${1}/AutoReso" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
+ }
+ fi
# -
- if [ -e ${1%/*}/i386/modules/IntelGraphicsEnabler.dylib ]; then
- {
- mkdir -p ${1}/IntelGraphicsEnabler/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/IntelGraphicsEnabler.dylib ${1}/IntelGraphicsEnabler/Root
- echo " [BUILD] IntelGraphicsEnabler "
- buildpackage "${1}/IntelGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
+ if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then
+ {
+ mkdir -p ${1}/uClibc/Root
+ ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
+ ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
+ echo " [BUILD] uClibc++ "
+ buildpackage "${1}/uClibc" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
+ }
+ fi
# -
- if [ -e ${1%/*}/i386/modules/klibc.dylib ]; then
- {
- mkdir -p ${1}/klibc/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/klibc/Root
- echo " [BUILD] klibc "
- buildpackage "${1}/klibc" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
-# -
- if [ -e ${1%/*}/i386/modules/NVIDIAGraphicsEnabler.dylib ]; then
- {
- mkdir -p ${1}/NVIDIAGraphicsEnabler/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/NVIDIAGraphicsEnabler.dylib ${1}/NVIDIAGraphicsEnabler/Root
- echo " [BUILD] NVIDIAGraphicsEnabler "
- buildpackage "${1}/NVIDIAGraphicsEnabler" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
-# -
- if [ -e ${1%/*}/i386/modules/Resolution.dylib ]; then
- {
- mkdir -p ${1}/AutoReso/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/Resolution.dylib ${1}/AutoReso/Root
- echo " [BUILD] Resolution "
- buildpackage "${1}/AutoReso" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
-# -
- if [ -e ${1%/*}/i386/modules/uClibcxx.dylib ]; then
- {
- mkdir -p ${1}/uClibc/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/uClibcxx.dylib ${1}/uClibc/Root
- ditto --noextattr --noqtn ${1%/*}/i386/modules/klibc.dylib ${1}/uClibc/Root
- echo " [BUILD] uClibc++ "
- buildpackage "${1}/uClibc" "/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
- }
- fi
- ((xmlindent--))
- outline[$((outlinecount++))]="${indent[$xmlindent]}\t"
- }
- else
- {
- echo " -= no modules to include =-"
- }
- fi
- # End build Modules packages
- ((xmlindent--))
- outline[$((outlinecount++))]="${indent[$xmlindent]}\t"
-# End build Chameleon package
+ if [ -e ${1%/*}/i386/modules/Keylayout.dylib ]; then
+ {
+ mkdir -p ${1}/Keylayout/Root
+ ditto --noextattr --noqtn ${1%/*}/i386/modules/Keylayout.dylib ${1}/Keylayout/Root
+ echo " [BUILD] Keylayout "
+ buildpackage "${1}/Keylayout" "/$chamTemp/Extra/modules" "" "start_selected=\"false\"" >/dev/null 2>&1
+ }
+ fi
+ ((xmlindent--))
+ outline[$((outlinecount++))]="${indent[$xmlindent]}"
+ }
+ else
+ {
+ echo " -= no modules to include =-"
+ }
+ fi
+# End build Modules packages
+
# build post install package
echo "================= Post ================="
+ packagesidentity="org.chameleon"
mkdir -p ${1}/Post/Root
mkdir -p ${1}/Post/Scripts
- cp -f ${pkgroot}/Scripts/Post/* ${1}/Post/Scripts
+ cp -f ${pkgroot}/Scripts/Main/postinstall ${1}/Post/Scripts
+ cp -f ${pkgroot}/Scripts/Sub/InstallLog.sh ${1}/Post/Scripts
+ cp -f ${pkgroot}/Scripts/Sub/UnMountEFIvolumes.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]}"
+# End build post install package
+#((xmlindent--))
+outline[$((outlinecount++))]="${indent[$xmlindent]}"
+
# build meta package
- makedistribution "${1}" "${2}" "${3}" "${4}" "${5}"
+ makedistribution "${1}" "${2}" "${3}" "${4}" #"${5}"
# clean up
@@ -296,13 +310,12 @@
popd >/dev/null
- outline[$((outlinecount++))]="${indent[$xmlindent]}\t"
+ outline[$((outlinecount++))]="${indent[$xmlindent]}"
if [ "${4}" ]; then
- local choiceoptions="${indent[$xmlindent]}${4}\n"
+ local choiceoptions="\t\t${4}"
fi
- choices[$((choicescount++))]="\n\t#${packagename// /}.pkg\n\n"
-
+ choices[$((choicescount++))]="\t\n\t\t#${packagename// /}.pkg\n\t\n"
rm -R -f "${1}"
fi
}
@@ -350,19 +363,34 @@
find "${1}/${packagename}" -name '.DS_Store' -delete
pushd "${1}/${packagename}" >/dev/null
- xar -c -f "${1%/*}/$packagename.pkg" --compression none .
+ xar -c -f "${1%/*}/${packagename// /}-${version}-r${revision}.pkg" --compression none .
popd >/dev/null
# Here is the place for assign a Icon to the pkg
-ditto -xk "${pkgroot}/Icons/pkg.zip" "${pkgroot}/Icons/"
-DeRez -only icns "${pkgroot}/Icons/Icons/pkg.icns" > tempicns.rsrc
-Rez -append tempicns.rsrc -o "${1%/*}/$packagename.pkg"
-SetFile -a C "${1%/*}/$packagename.pkg"
-rm -f tempicns.rsrc
-rm -rf "${pkgroot}/Icons/Icons"
+ ditto -xk "${pkgroot}/Icons/pkg.zip" "${pkgroot}/Icons/"
+ DeRez -only icns "${pkgroot}/Icons/Icons/pkg.icns" > tempicns.rsrc
+ Rez -append tempicns.rsrc -o "${1%/*}/$packagename-${version}-r$revision.pkg"
+ SetFile -a C "${1%/*}/$packagename-${version}-r$revision.pkg"
+ rm -f tempicns.rsrc
+ rm -rf "${pkgroot}/Icons/Icons"
# End
+ echo ""
+
+ echo -e $COL_GREEN" --------------------------"$COL_RESET
+ echo -e $COL_GREEN" Building process complete!"$COL_RESET
+ echo -e $COL_GREEN" --------------------------"$COL_RESET
+ echo ""
+ echo -e $COL_GREEN" Build info."
+ echo -e $COL_GREEN" ==========="
+ echo -e $COL_BLUE" Package name: "$COL_RESET"$packagename-${version}-r$revision.pkg"
+ echo -e $COL_BLUE" MD5: "$COL_RESET"$md5"
+ echo -e $COL_BLUE" Version: "$COL_RESET"$version"
+ echo -e $COL_BLUE" Stage: "$COL_RESET"$stage"
+ echo -e $COL_BLUE" Date/Time: "$COL_RESET"$builddate"
+ echo ""
+
}
-main "${1}" "${2}" "${3}" "${4}" "${5}"
+main "${1}" "${2}" "${3}" "${4}" #"${5}"
Index: trunk/package/builddmg.sh
===================================================================
--- trunk/package/builddmg.sh (revision 1676)
+++ trunk/package/builddmg.sh (revision 1677)
@@ -39,6 +39,7 @@
revision=$( grep I386BOOT_CHAMELEONREVISION vers.h | awk '{ print $3 }' | tr -d '\"' )
builddate=$( grep I386BOOT_BUILDDATE vers.h | awk '{ print $3,$4 }' | tr -d '\"' )
timestamp=$( date -j -f "%Y-%m-%d %H:%M:%S" "${builddate}" "+%s" )
+CHAMELEON_PACKAGE_NAME=${VOLUME_NAME}-${version}-r${revision}
# =========================
# Start of building process
@@ -51,11 +52,11 @@
echo ""
# =================================
-# 1) Clean previus builded contents
+# 1) Clean previous builded contents
# =================================
if [ -x ${SRC_FOLDER} ]; then
- echo " Deleting previus existing source folder/content "
+ echo " Deleting previous existing source folder/content "
rm -R ${SRC_FOLDER}
rm -f ${DMG_TEMP_NAME}
fi
@@ -75,13 +76,32 @@
ditto -xk "${pkgroot}/Icons/doc.zip" "${SRC_FOLDER}/"
ditto -xk "${pkgroot}/Icons/pan.zip" "${SRC_FOLDER}/"
ditto -xk "${pkgroot}/Icons/tm.zip" "${SRC_FOLDER}/"
-
- mv ${SYM_ROOT}/${VOLUME_NAME}.pkg ${SRC_FOLDER}/${VOLUME_NAME}.pkg
- cp -r ${pkgroot}/doc/* ${SRC_FOLDER}/Documentation/
+
+ #mv ${SYM_ROOT}/${VOLUME_NAME}.pkg ${SRC_FOLDER}/${VOLUME_NAME}.pkg
+ cp -r ${SYM_ROOT}/${CHAMELEON_PACKAGE_NAME}.pkg ${SRC_FOLDER}/${CHAMELEON_PACKAGE_NAME}.pkg
+ #cp -r ${pkgroot}/doc/* ${SRC_FOLDER}/Documentation/
+ cp -r ${SYM_ROOT%/*}/doc/BootHelp.txt ${SRC_FOLDER}/Documentation/
+ cp -r ${SYM_ROOT%/*}/doc/Users_Guide0.5.pdf ${SRC_FOLDER}/Documentation/
cp -r ${pkgroot}/Configuration/PrefPanel/* ${SRC_FOLDER}/PrefPanel/
cp -r ${SYM_ROOT}/i386/* ${SRC_FOLDER}/i386/
cp -r ${SYM_ROOT%/*}/artwork/themes/* ${SRC_FOLDER}/Themes/
- rm -rf ${SRC_FOLDER}`find . -type d -name .svn`
+ #rm -rf ${SRC_FOLDER}`find . -type d -name .svn`
+
+ # The above line caused problems with svn reporting changes to all
+ # directories in the Chameleon source folder that exist before compiling
+ # svn status would show the following:
+ # ~ Chameleon.xcodeproj
+ # ~ artwork
+ # ~ i386
+ # ~ package
+ # ~ doc
+ # I've changed the code to this for now to get round the problem.
+ # Hopefully someone else can find out why it was happenening.
+ svnFilesToRemove=($( find "${SRC_FOLDER}" -type d -name '.svn'))
+ for (( i = 0 ; i < ${#svnFilesToRemove[@]} ; i++ ))
+ do
+ rm -rf ${svnFilesToRemove[$i]}
+ done
# =======================================
# 4) Find the size of the folder contents
@@ -138,7 +158,7 @@
# 9) Make sure it's not world writeable
# =====================================
- mv ${SRC_FOLDER}/${VOLUME_NAME}.pkg ${MOUNT_DIR}/${VOLUME_NAME}.pkg
+ mv ${SRC_FOLDER}/${CHAMELEON_PACKAGE_NAME}.pkg ${MOUNT_DIR}/${VOLUME_NAME}.pkg
cp -R ${SRC_FOLDER}/Documentation ${MOUNT_DIR}/
cp -R ${SRC_FOLDER}/PrefPanel ${MOUNT_DIR}/
cp -R ${SRC_FOLDER}/i386 ${MOUNT_DIR}/
@@ -155,10 +175,10 @@
# =============================================
echo " [openUp] Setting auto open flag"
-if [ -x ${OPENUP_TOOL} ]; then
- echo " Applying openUp..."
- ${OPENUP_TOOL} "${MOUNT_DIR}" >/dev/null 2>&1
-fi
+ if [ -x ${OPENUP_TOOL} ]; then
+ echo " Applying openUp..."
+ ${OPENUP_TOOL} "${MOUNT_DIR}" >/dev/null 2>&1
+ fi
echo " "
# ===========
@@ -211,4 +231,5 @@
echo " ===================="
echo ""
#-----
+
exit 0
Index: trunk/package/Changes.txt
===================================================================
--- trunk/package/Changes.txt (revision 0)
+++ trunk/package/Changes.txt (revision 1677)
@@ -0,0 +1,45 @@
+- Add option to upgrade an existing install - or more exactly, merge newly selected options with an existing /Extra folder. Also, rename an existing /Extra/com.apple.Boot.plist to /Extra/org.chameleon.Boot.plist.
+
+- Change the layout/wording displayed in the installer (English only) and give it a facelift. Adjust background image to scale to fit in the window.
+
+- Set exclusive 'None' option to default choice.
+
+- Add code to detect and make necessary changes to avoid possibility of a b1f:error or boot1:error should the user decide to install a secondary boot partition.
+
+- Fix bug installing to /Volumes/EFI
+
+- Add crazybirdy's Chinese translation to zh-CN and zh-TW resources.
+
+- Add dmaazar's boot0workV2 changes to ../i386/boot0/boot0md.s.
+
+- Added check for an existing Chameleon installation on a different partition of same target disk to help stop new
+users from confusing themselves. If found, the install process will exit and write the reason to the install log.
+
+- Re-organised Scripts folder in to Main and Sub scripts. The main scripts for the standard and EFI system partition
+installation options have been changed to used the code that I'd previously re-structured. The Sub scripts are the
+original chameleon installer scripts with maybe some tweaks/additions, split in to separate scripts. These scripts
+include the previous additions I'd made including checking for FAT16 partitions, installing boot0md or boot0 depending
+on whether or not a Windows installation is found and writing boot1h or boot1f32 depending on installing to HFS or
+FAT32 format partitions.
+
+- All references of Boot0hfs removed and now replaced with Boot0md.
+
+- Installer log added to now dump a log of useful info about the install process to the root of the selected target.
+
+- Boot options re-thought and are now automatically created at compile time from simple lists, rather than manage a
+separate file of code of each option.
+
+- Added missing useKernelCache boot option.
+
+- Easily enable a list to be exclusive or not.
+
+- The main Post script now creates the org.chameleon.Boot.plist based on the modules / options / key layouts / themes
+selected by the user.
+
+- Only create and /Extra folder if there's something to go in it.
+
+- Backup an existing /Extra folder to /Extra-OLD(date & time).
+
+- slimpkg.sh changed to match the revised code in buildpkg.sh where applicable.
+
+- English Localizable.strings revised to match latest additions and some texts updated.
\ No newline at end of file
Index: trunk/package/OptionalSettings/Resolution.txt
===================================================================
--- trunk/package/OptionalSettings/Resolution.txt (revision 0)
+++ trunk/package/OptionalSettings/Resolution.txt (revision 1677)
@@ -0,0 +1,38 @@
+# ---------------------------------------------
+# Chameleon Optional Settings List.
+# ---------------------------------------------
+# Add boot options or kernel flags to the bottom of this file.
+# They will appear under the package installer's Settings menu
+# in a sub menu named with the filename of this file.
+#ΚUse one file or many files - it's flexible to make it easy
+# to group different options under separate sub menus.
+# ---------------------------------------------
+# To add boot option: Structure is name:key=value
+# example1: InstantMenu:Instant Menu=Yes
+# example2: DropSSDT:DropSSDT=Yes
+# ---------------------------------------------
+# To add kernel flag: Structure is name:KFflag=kernelflag
+# example1: Npci:KFflag=npci=0x2000
+# example2: Verbose:KFflag=-v
+# ---------------------------------------------
+# The package installer has a setting which controls what
+# the user is allowed to choose.
+# A) User can select every option from the list.
+# B) User can select only one of the options from the list.
+# Set Exclusive=False for A, or Exclusive=True for B.
+#
+Exclusive=True
+# ---------------------------------------------
+# Note: There must be a carriage return at end of last line
+# ---------------------------------------------
+1024x600x32:Graphics Mode=1024x600x32
+1024x768x32:Graphics Mode=1024x768x32
+1280x768x32:Graphics Mode=1280x768x32
+1280x800x32:Graphics Mode=1280x800x32
+1280x960x32:Graphics Mode=1280x960x32
+1280x1024x32:Graphics Mode=1280x1024x32
+1440x900x32:Graphics Mode=1440x900x32
+1600x900x32:Graphics Mode=1600x900x32
+1680x1050x32:Graphics Mode=1680x1050x32
+1920x1080x32:Graphics Mode=1920x1080x32
+1920x1200x32:Graphics Mode=1920x1200x32
Index: trunk/package/OptionalSettings/Video.txt
===================================================================
--- trunk/package/OptionalSettings/Video.txt (revision 0)
+++ trunk/package/OptionalSettings/Video.txt (revision 1677)
@@ -0,0 +1,31 @@
+# ---------------------------------------------
+# Chameleon Optional Settings List.
+# ---------------------------------------------
+# Add boot options or kernel flags to the bottom of this file.
+# They will appear under the package installer's Settings menu
+# in a sub menu named with the filename of this file.
+#Β Use one file or many files - it's flexible to make it easy
+# to group different options under separate sub menus.
+# ---------------------------------------------
+# To add boot option: Structure is name:key=value
+# example1: InstantMenu:Instant Menu=Yes
+# example2: DropSSDT:DropSSDT=Yes
+# ---------------------------------------------
+# To add kernel flag: Structure is name:KFflag=kernelflag
+# example1: Npci:KFflag=npci=0x2000
+# example2: Verbose:KFflag=-v
+# ---------------------------------------------
+# The package installer has a setting which controls what
+# the user is allowed to choose.
+# A) User can select every option from the list.
+# B) User can select only one of the options from the list.
+# Set Exclusive=False for A, or Exclusive=True for B.
+#
+Exclusive=False
+# ---------------------------------------------
+# Note: There must be a carriage return at end of last line
+# ---------------------------------------------
+GraphicsEnabler:GraphicsEnabler=Yes
+UseAtiROM:UseAtiROM=Yes
+UseNvidiaROM:UseNvidiaROM=Yes
+VBIOS:VBIOS=Yes
Index: trunk/package/OptionalSettings/PowerManagement.txt
===================================================================
--- trunk/package/OptionalSettings/PowerManagement.txt (revision 0)
+++ trunk/package/OptionalSettings/PowerManagement.txt (revision 1677)
@@ -0,0 +1,34 @@
+# ---------------------------------------------
+# Chameleon Optional Settings List.
+# ---------------------------------------------
+# Add boot options or kernel flags to the bottom of this file.
+# They will appear under the package installer's Settings menu
+# in a sub menu named with the filename of this file.
+#ΚUse one file or many files - it's flexible to make it easy
+# to group different options under separate sub menus.
+# ---------------------------------------------
+# To add boot option: Structure is name:key=value
+# example1: InstantMenu:Instant Menu=Yes
+# example2: DropSSDT:DropSSDT=Yes
+# ---------------------------------------------
+# To add kernel flag: Structure is name:KFflag=kernelflag
+# example1: Npci:KFflag=npci=0x2000
+# example2: Verbose:KFflag=-v
+# ---------------------------------------------
+# The package installer has a setting which controls what
+# the user is allowed to choose.
+# A) User can select every option from the list.
+# B) User can select only one of the options from the list.
+# Set Exclusive=False for A, or Exclusive=True for B.
+#
+Exclusive=False
+# ---------------------------------------------
+# Note: There must be a carriage return at end of last line
+# ---------------------------------------------
+CSTUsingSystemIO:CSTUsingSystemIO=Yes
+DropSSDT:DropSSDT=Yes
+EnableC2State:EnableC2State=Yes
+EnableC3State:EnableC3State=Yes
+EnableC4State:EnableC4State=Yes
+GenerateCStates:GenerateCStates=Yes
+GeneratePStates:GeneratePStates=Yes
Index: trunk/package/OptionalSettings/General.txt
===================================================================
--- trunk/package/OptionalSettings/General.txt (revision 0)
+++ trunk/package/OptionalSettings/General.txt (revision 1677)
@@ -0,0 +1,37 @@
+# ---------------------------------------------
+# Chameleon Optional Settings List.
+# ---------------------------------------------
+# Add boot options or kernel flags to the bottom of this file.
+# They will appear under the package installer's Settings menu
+# in a sub menu named with the filename of this file.
+#ΚUse one file or many files - it's flexible to make it easy
+# to group different options under separate sub menus.
+# ---------------------------------------------
+# To add boot option: Structure is name:key=value
+# example1: InstantMenu:Instant Menu=Yes
+# example2: DropSSDT:DropSSDT=Yes
+# ---------------------------------------------
+# To add kernel flag: Structure is name:KFflag=kernelflag
+# example1: Npci:KFflag=npci=0x2000
+# example2: Verbose:KFflag=-v
+# ---------------------------------------------
+# The package installer has a setting which controls what
+# the user is allowed to choose.
+# A) User can select every option from the list.
+# B) User can select only one of the options from the list.
+# Set Exclusive=False for A, or Exclusive=True for B.
+#
+Exclusive=False
+# ---------------------------------------------
+# Note: There must be a carriage return at end of last line
+# ---------------------------------------------
+arch:arch=i386
+EHCIacquire:EHCIacquire=Yes
+EthernetBuiltIn:EthernetBuiltIn=Yes
+ForceHPET:ForceHPET=Yes
+ForceWake:ForceWake=Yes
+RestartFix:RestartFix=No
+UHCIreset:UHCIreset=Yes
+UseMemDetect:UseMemDetect=No
+UseKernelCache:UseKernelCache=Yes
+Wake:Wake=Yes
Index: trunk/package/OptionalSettings/KernelFlags.txt
===================================================================
--- trunk/package/OptionalSettings/KernelFlags.txt (revision 0)
+++ trunk/package/OptionalSettings/KernelFlags.txt (revision 1677)
@@ -0,0 +1,32 @@
+# ---------------------------------------------
+# Chameleon Optional Settings List.
+# ---------------------------------------------
+# Add boot options or kernel flags to the bottom of this file.
+# They will appear under the package installer's Settings menu
+# in a sub menu named with the filename of this file.
+#ΚUse one file or many files - it's flexible to make it easy
+# to group different options under separate sub menus.
+# ---------------------------------------------
+# To add boot option: Structure is name:key=value
+# example1: InstantMenu:Instant Menu=Yes
+# example2: DropSSDT:DropSSDT=Yes
+# ---------------------------------------------
+# To add kernel flag: Structure is name:KFflag=kernelflag
+# example1: Npci:KFflag=npci=0x2000
+# example2: Verbose:KFflag=-v
+# ---------------------------------------------
+# The package installer has a setting which controls what
+# the user is allowed to choose.
+# A) User can select every option from the list.
+# B) User can select only one of the options from the list.
+# Set Exclusive=False for A, or Exclusive=True for B.
+#
+Exclusive=False
+# ---------------------------------------------
+# Note: There must be a carriage return at end of last line
+# ---------------------------------------------
+Verbose:KFflag=-v
+Singleusermode:KFflag=-s
+Ignorecaches:KFflag=-f
+Npci:KFflag=npci=0x2000
+Darkwake:KFflag=darkwake=0
Index: trunk/package/OptionalSettings/Control.txt
===================================================================
--- trunk/package/OptionalSettings/Control.txt (revision 0)
+++ trunk/package/OptionalSettings/Control.txt (revision 1677)
@@ -0,0 +1,34 @@
+# ---------------------------------------------
+# Chameleon Optional Settings List.
+# ---------------------------------------------
+# Add boot options or kernel flags to the bottom of this file.
+# They will appear under the package installer's Settings menu
+# in a sub menu named with the filename of this file.
+#ΚUse one file or many files - it's flexible to make it easy
+# to group different options under separate sub menus.
+# ---------------------------------------------
+# To add boot option: Structure is name:key=value
+# example1: InstantMenu:Instant Menu=Yes
+# example2: DropSSDT:DropSSDT=Yes
+# ---------------------------------------------
+# To add kernel flag: Structure is name:KFflag=kernelflag
+# example1: Npci:KFflag=npci=0x2000
+# example2: Verbose:KFflag=-v
+# ---------------------------------------------
+# The package installer has a setting which controls what
+# the user is allowed to choose.
+# A) User can select every option from the list.
+# B) User can select only one of the options from the list.
+# Set Exclusive=False for A, or Exclusive=True for B.
+#
+Exclusive=False
+# ---------------------------------------------
+# Note: There must be a carriage return at end of last line
+# ---------------------------------------------
+BootBanner:Boot Banner=No
+GUI:GUI=No
+LegacyLogo:Legacy Logo=Yes
+InstantMenu:Instant Menu=Yes
+QuietBoot:QuietBoot=Yes
+ShowInfo:ShowInfo=Yes
+Wait:Wait=Yes
Index: trunk/package/Scripts/Main/ESPpostinstall
===================================================================
--- trunk/package/Scripts/Main/ESPpostinstall (revision 0)
+++ trunk/package/Scripts/Main/ESPpostinstall (revision 1677)
@@ -0,0 +1,195 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Main EFI System Partition Post-Install Script"
+echo "*********************************************"
+echo "-----------------------------------------------"
+echo ""
+
+# Find location of this script in the package installer
+# so we know where all the other scripts are located.
+
+MYLOCATION="${PWD}/${BASH_ARGV[0]}"
+export MYLOCATION="${MYLOCATION%/*}"
+scriptDir=$MYLOCATION
+
+
+#echo "==============================================="
+#echo "Apple Installer Package Variables"
+#echo "*********************************"
+#echo "DEBUG: $ 1 = Full path to the installation package the installer app is processing: " $1
+#echo "DEBUG: $ 2 = Full path to the installation destination: " $2
+#echo "DEBUG: $ 3 = Installation volume (mountpoint) to receive the payload: " $3
+#echo "DEBUG: $ 4 = Root directory for the system: " $4
+#echo "DEBUG: Script Name: " $SCRIPT_NAME
+#echo "DEBUG: Package Path: " $PACKAGE_PATH
+#echo "DEBUG: Installer Temp: " $INSTALLER_TEMP
+#echo "DEBUG: Full path to the temp directory containing the operation executable: " $RECEIPT_PATH
+#echo "-----------------------------------------------"
+#echo ""
+
+# Initialise Script Globals
+
+stage0Loader="boot0"
+stage0LoaderDualBoot="boot0md"
+stage1LoaderHFS="boot1h"
+stage1LoaderFAT="boot1f32"
+stage2Loader="boot"
+
+# 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"
+targetDevice=${targetDeviceChosenByUser%s*}s1
+targetDeviceRaw=${targetDevice/disk/rdisk}
+targetDisk=${targetDevice%s*}
+targetDiskRaw=${targetDisk/disk/rdisk}
+targetSlice=${targetDevice#*disk*s}
+
+targetResources="${targetVolumeChosenByUser}/usr/local/bin/"
+
+echo "==============================================="
+echo "DEBUG: display script variables"
+echo "***************************"
+
+echo "DEBUG: stage0Loader: Disk loader is ${stage0Loader}"
+echo "DEBUG: stage0LoaderDualBoot: Disk loader is ${stage0LoaderDualBoot}"
+echo "DEBUG: stage1LoaderHFS: Partition loader is ${stage1LoaderHFS}"
+echo "DEBUG: stage1LoaderFat: Partition loader is ${stage1LoaderFAT}"
+echo "DEBUG: stage2Loader: Filesystem loader is ${stage2Loader}"
+echo "DEBUG: targetVolumeChosenByUser: Volume is ${targetVolumeChosenByUser}"
+echo "DEBUG: targetDeviceChosenByUser: Volume device is ${targetDeviceChosenByUser}"
+echo "DEBUG: targetVolume: Volume is ${targetVolume}"
+echo "DEBUG: targetDevice: Volume device is ${targetDevice}"
+echo "DEBUG: targetDeviceRaw: Volume raw device is ${targetDeviceRaw}"
+echo "DEBUG: targetDisk: Disk device is ${targetDisk}"
+echo "DEBUG: targetDiskRaw: Disk raw device is ${targetDiskRaw}"
+echo "DEBUG: targetSlice: Volume slice is ${targetSlice}"
+echo "DEBUG: targetResources: Boot Resources is ${targetResources}"
+echo "-----------------------------------------------"
+echo ""
+
+
+# Write some information to the Install Log
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Running EFI postinstall script"
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Target selected by user = ${targetVolumeChosenByUser} on ${targetDeviceChosenByUser}"
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Target volume = ${targetVolume} on ${targetDevice}"
+
+# Check to see if the selected disk uses a GPT
+
+bootuuid=$( diskutil info "$targetDeviceChosenByUser" | grep Volume\ UUID | awk {'print $3'} )
+partitiontable=$( diskutil list ${targetDeviceChosenByUser%s*} | sed -n '3p' | awk '{print $2}' )
+
+if [ ${partitiontable} = "GUID_partition_scheme" ]; then
+ echo "Confirm this is a GPT partitioned disk."
+
+ # Double check we can see the selected partition and it's of the right type.
+ # If the following script finds anything, it returns 1 to indicate failure.
+
+
+ "$scriptDir"CheckProceed.sh "${targetVolume}" "${targetDeviceChosenByUser}" "${targetVolumeChosenByUser}" "${scriptDir}"
+ returnValue=$?
+ if [ ${returnValue} = 0 ]; then
+ # OK to proceed
+
+
+ # Does a GRUB or Linux loader already exist in the disk's MBR?
+ # The script returns 1 if yes, 0 if no.
+
+ "$scriptDir"CheckGRUBLinuxLoader.sh "${targetDisk}" "${targetVolumeChosenByUser}" "${scriptDir}"
+ returnValue=$?
+ if [ ${returnValue} = 0 ]; then
+ # OK to proceed
+
+
+ # check for a 4-byte Windows disk signature in the disk's MBR.
+ # the following script returns 1 if a Windows disk signature exists, and 0 if not.
+
+ "$scriptDir"CheckWindowsDiskSignature.sh "${targetDisk}" "${targetVolumeChosenByUser}" "${scriptDir}"
+ diskSigCheck=$?
+
+
+ # check for existing bootloaders in the disk's MBR
+ # and find out if we can write the Chameleon boot files.
+ # the following script returns 0 if we can proceed
+ # with writing the boot files, and 1 for not.
+
+ "$scriptDir"CheckDiskMicrocode.sh "${targetDisk}" "${diskSigCheck}" "${targetVolumeChosenByUser}" "${scriptDir}"
+ diskupdate=$?
+
+
+ # check the format of the selected partition.
+ # result should be either hfs or msdos
+ # Should really check to make sure!
+
+ targetFormat=$( fstyp "$targetDevice" )
+
+
+ # Append a LineBreak to the installer log
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "LineBreak"
+
+ if [ ${diskupdate} = "0" ]; then
+
+ # Write the stage 0 loader to the MBR
+ "$scriptDir"WriteChameleonStage0.sh "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetResources}" "${targetVolumeChosenByUser}" "${scriptDir}"
+ else
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Stage 0 loader not written to ${targetDisk}."
+ fi
+
+ # Write the stage 1 loader to the partition boot sector
+ "$scriptDir"WriteChameleonStage1.sh "${targetFormat}" "${stage1LoaderHFS}" "${stage1LoaderFAT}" "${targetVolumeChosenByUser}" "${targetDeviceRaw}" "${targetVolumeChosenByUser}" "${scriptDir}"
+
+
+ # Unmount ALL mounted volumes named EFI.
+ # Returns 0=success, 1=fail
+
+ "$scriptDir"UnMountEFIvolumes.sh "${targetVolumeChosenByUser}" "${scriptDir}"
+ returnValue=$?
+ if [ ${returnValue} = 0 ]; then
+ # OK to proceed
+
+ # Mount the EFI system partition
+ "$scriptDir"MountESP.sh "${targetDisk}" "${targetVolumeChosenByUser}" "${scriptDir}"
+
+ # Write the stage 2 loader to the root of the selected partition
+ "$scriptDir"WriteChameleonStage2.sh "${stage2Loader}" "${targetVolume}" "${targetDevice}" "${targetVolumeChosenByUser}" "${scriptDir}"
+
+ # Check for another existing Chameleon installation on the same disk
+ "$scriptDir"CheckPreviousChameleon.sh "${targetDisk}" "${targetDeviceRaw}" "${targetDevice}" "${targetVolumeChosenByUser}" "${scriptDir}"
+ fi
+
+ # Append a LineBreak to the installer log
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "LineBreak"
+
+ # Set the active partition ONLY if Windows is not installed
+ "$scriptDir"SetActivePartition.sh "${diskSigCheck}" "${targetDiskRaw}" "${targetSlice}" "${targetVolumeChosenByUser}" "${scriptDir}"
+
+ fi
+ fi
+else
+ #echo "ERROR Volume is not on a GPT partitioned disc."
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "ERROR Volume is not on a GPT partitioned disc."
+fi
+
+# Create temporary file on target volume to notify Postinstall
+# script, boot option code, that EFI (ESP) option was chosen
+echo "EFI" >"${targetVolumeChosenByUser}"/.ChameleonEFI
+
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "LineBreak"
+"$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "EFI script complete"
+
+echo "==============================================="
+echo "END - Main EFI System Partition Post-Install Script"
+echo "*********************************************"
+echo "-----------------------------------------------"
+echo ""
+
+exit 0
Property changes on: trunk/package/Scripts/Main/ESPpostinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Main/postinstall
===================================================================
--- trunk/package/Scripts/Main/postinstall (revision 0)
+++ trunk/package/Scripts/Main/postinstall (revision 1677)
@@ -0,0 +1,305 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Post Post-Install Script"
+echo "*********************************"
+
+#echo "DEBUG: $ 1 = Full path to the installation package the installer app is processing: " $1
+#echo "DEBUG: $ 2 = Full path to the installation destination: " $2
+#echo "DEBUG: $ 3 = Installation volume (mountpoint) to receive the payload: " $3
+#echo "DEBUG: $ 4 = Root directory for the system: " $4
+
+# Check target exists
+if [ ! -e "$3" ]
+then
+ echo "$3 volume does not exist!"
+ exit 1
+fi
+
+# If target volume root of current system then replace
+# / with volume name.
+if [ "$3" == "/" ]
+then
+ dest_vol="/Volumes/"$( ls -1F /Volumes | sed -n 's:@$::p' )
+else
+ dest_vol="$3"
+fi
+
+# Find script location so to find the Install Log script.
+MYLOCATION="${PWD}/${BASH_ARGV[0]}"
+export MYLOCATION="${MYLOCATION%/*}"
+scriptDir=$MYLOCATION
+
+# 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"
+
+# Check for stopped installation due to Chameleon
+# already existing on the same disk.
+# TO DO - This check can be removed as it's no longer used!!
+if [ ! -f "$dest_vol"/.ChameleonExists ]; then
+
+ # ---------------------------------------------
+ # Add any installed modules to the Install Log
+ # ---------------------------------------------
+ if [ -e "${chamTemp}"/Extra/modules ]; then
+ ls "${chamTemp}"/Extra/modules | while read FILE
+ do
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Added module: $FILE"
+ done
+ fi
+
+ # ---------------------------------------------
+ # Add any installed themes to the Install Log
+ # ---------------------------------------------
+ if [ -e "${chamTemp}"/Extra/Themes ]; then
+ ls "${chamTemp}"/Extra/Themes | while read FILE
+ do
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Added Theme: $FILE"
+ done
+ fi
+
+ # ---------------------------------------------
+ # Build org.chameleon.Boot.plist
+ # ---------------------------------------------
+ # All options selected are now dummy files with
+ # the filename of the option and value residing
+ # in /usr/local/chamTemp/options/
+ # for example. Boot Banner=Yes
+
+ # Are there any options to build?
+ if [ "$(ls -A ${chamTemp}/options )" ]; then
+
+ # Check for temporary directory/Extra folder.
+ if [ ! -d "$chamTemp"/Extra ]; then
+ mkdir "$chamTemp"/Extra
+ fi
+
+ tempOCBP="$chamTemp"/Extra/org.chameleon.Boot.plist
+
+ # 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
+ while read FILE
+ do
+ options[arrayCount]="${FILE##*/}"
+
+ # Check keyRead for 'KF' at beginning to
+ # indicate that should be a kernel flag
+ if [ ${options[arrayCount]:0:2} = "KF" ];then
+ # plistbuddy only add's if the key doesn't already exist.
+ # So let's store any kernelflags and add them all at the
+ # same time once when we reach the end of the options list.
+ kernelflag[kernelFlagCount]="${options[arrayCount]##*flag=}"
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Added kernel flag: ${kernelflag[kernelFlagCount]}"
+ (( kernelFlagCount++ ))
+ else
+ keyRead="${options[$arrayCount]%=*}"
+ value="${options[$arrayCount]#*=}"
+ # escape any spaces
+ keyToUse=$( echo $keyRead | sed 's/ /\\ /g' )
+ if [ "${keyToUse}" != "DONT" ] && [ "${value}" != "ADD" ]; then
+ sudo /usr/libexec/plistbuddy -c "Add :${keyToUse} string ${value}" "$tempOCBP"
+ returnValue=$?
+ if [ ${returnValue} -ne 1 ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Added boot option: ${keyRead}=${value}"
+ else
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Can't add ${keyRead}=${value} as an option already exists for: ${keyRead}"
+ fi
+ fi
+ fi
+ (( arrayCount++ ))
+ done < <(ls "${chamTemp}"/options )
+
+ # If exclusive options were used and the 'None' option was chosen,
+ # then a dummy file named DONT=ADD would be in /$chamTemp/Extra/options.
+ #Β If that was the only option then the above code would have made a
+ # temporary Extra folder with a default org.chameleon.Boot.plist
+ # In this case we don't need it and should discard it otherwise the folder
+ #Β will be copied to the users / directory when it's not wanted.
+ if [ ${arrayCount} == 1 ] && [ "${keyToUse}" == "DONT" ] && [ "${value}" == "ADD" ]; then
+ if [ -e "${chamTemp}"/Extra ] && [ ! -e "${chamTemp}"/Extra/Themes ] && [ ! -e "${chamTemp}"/Extra/Modules ]; then
+ rm -r -f "$chamTemp"/Extra
+ fi
+ fi
+
+ if [ $kernelFlagCount -gt 0 ]; then
+ # Add any kernel flags together in to one string.
+ for (( i=0 ; i < $kernelFlagCount ; i++ ))
+ do
+ kernelFlagString="${kernelFlagString} ${kernelflag[i]}"
+ done
+ # We add the final string in the next section.
+ fi
+ fi
+
+ # ---------------------------------------------
+ # Merge /Extra folders?
+ # ---------------------------------------------
+ # Does the user want to upgrade an existing /Extra folder?
+ # If so, then merge their existing one in to the temp one
+ if [ -e "$chamTemp/install_type_upgrade" ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "User selected to do an upgrade install."
+
+ # first move the new org.chameleon.Boot.plist out of tmp
+ # Extra folder so we can merge that separately.
+ mv "$tempOCBP" "$chamTemp/holding.plist"
+
+ # Check for an existing /Extra folder
+ # and merge existing /Extra with temp one.
+ if [ -e "$dest_vol"/.ChameleonEFI ]; then
+ if [ -e "/Volumes/EFI/Extra" ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Merging existing /Volumes/EFI/Extra folder."
+ ditto --noextattr --noqtn /Volumes/EFI/Extra "$chamTemp"/Extra
+ fi
+ else
+ if [ -e "$dest_vol/Extra" ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Merging existing ${dest_vol}/Extra folder."
+ ditto --noextattr --noqtn "${dest_vol}"/Extra "$chamTemp"/Extra
+ fi
+ fi
+
+ # Check existing plist name for old naming convention
+ # and change to new convention.
+ if [ -e "$chamTemp"/Extra/com.apple.Boot.plist ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Renaming existing com.apple.Boot.plist to org.chameleon.Boot.plist."
+ mv "$chamTemp"/Extra/com.apple.Boot.plist "$tempOCBP"
+ fi
+
+ # Before merging org.chameleon.Boot.plist, copy any
+ # existing kernel flags, then delete the entry.
+ currentFlags=$( sudo /usr/libexec/plistbuddy -c "Print :Kernel\ Flags" "$tempOCBP" )
+ sudo /usr/libexec/plistbuddy -c "Delete :Kernel\ Flags" "$tempOCBP"
+
+ # Merge new org.chameleon.Boot.plist (holding.plist)
+ # with their currently existing one.
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Merging new options into org.chameleon.Boot.plist.
+NOTE: Please check the new merged org.chameleon.Boot.plist as
+NOTE: any existing keys will NOT have been updated.
+NOTE: For example: If you already had Wait=No as a boot option
+NOTE: and chose Wait=Yes from the list, this will NOT be changed."
+ sudo /usr/libexec/plistbuddy -c "Merge $chamTemp/holding.plist" "$tempOCBP"
+
+ # Combine new kernel flags with old ones.
+ kernelFlagString="${kernelFlagString} $currentFlags"
+ # Write complete kernel flag entry back.
+ sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
+ if [ ${returnValue}=1 ]; then # key already exists.
+ sudo /usr/libexec/plistbuddy -c "Delete :Kernel\ Flags" "$tempOCBP"
+ sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
+ fi
+
+ elif [ -e "$chamTemp/install_type_new" ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "User selected to make a new install."
+ # Add kernel flags (if any)
+ if [ $kernelFlagCount -gt 0 ]; then
+ sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
+ if [ ${returnValue}=1 ]; then # key already exists.
+ sudo /usr/libexec/plistbuddy -c "Delete :Kernel\ Flags" "$tempOCBP"
+ sudo /usr/libexec/plistbuddy -c "Add :Kernel\ Flags string $kernelFlagString" "$tempOCBP"
+ fi
+ fi
+ fi
+
+ # ---------------------------------------------
+ # Copy temp Extra folder to target destination
+ # ---------------------------------------------
+ # If we've made a temporary Extra folder to use then
+ # check for an existing /Extra folder. If found, back it up
+ # before copying the temporary Extra folder to destination.
+ # Extra folder now resides in /usr/local/chamTemp/
+ # Copy /usr/local/chamTemp/Extra to correct location.
+
+ if [ -d "$chamTemp"/Extra ]; then
+ if [ ! -f "$dest_vol"/.ChameleonEFI ]; then
+ # The Standard install option chosen
+
+ # Does an /Extra folder already exist?
+ if [ -e "$dest_vol"/Extra ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Moving $dest_vol/Extra folder to $dest_vol/Extra-OLD-$( date "+%H-%M-%S" )"
+ mv "$dest_vol/Extra" "$dest_vol/Extra_OLD-"$( date "+%H-%M-%S" )
+ fi
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Writing new Extra folder to: $dest_vol/"
+ echo "Copying $chamTemp/Extra TO $dest_vol"
+ cp -R "$chamTemp"/Extra "$dest_vol"
+ else
+ # The EFI system partition install option was chosen
+ # Does a /Volumes/Extra folder already exist?
+ if [ -e "/Volumes/EFI/Extra" ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Moving /Volumes/EFI/Extra folder to /Volumes/EFI/Extra-OLD-$( date "+%H-%M-%S" )"
+ mv "/Volumes/EFI/Extra" "/Volumes/EFI/Extra_OLD-"$( date "+%H-%M-%S" )
+ fi
+ "$scriptDir"InstallLog.sh "${dest_vol}" "Writing new Extra folder to: /Volumes/EFI/"
+ cp -R "$chamTemp"/Extra "/Volumes/EFI"
+ fi
+ else
+ if [ ! -f "$dest_vol"/.ChameleonEFI ]; then
+ if [ -e "$dest_vol"/Extra ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "No elements selected for adding to an Extra folder,
+so leaving existing $dest_vol/Extra folder untouched."
+ fi
+ else
+ if [ -e "/Volumes/EFI/Extra" ]; then
+ "$scriptDir"InstallLog.sh "${dest_vol}" "No elements selected for adding to an Extra folder,
+so leaving existing /Volumes/EFI/Extra folder untouched."
+ fi
+ fi
+ fi
+
+ # Unmount ALL mounted volumes named EFI
+ "$scriptDir"UnMountEFIvolumes.sh "${dest_vol}" "${scriptDir}"
+else
+ cleanUp="${cleanUp},0"
+ rm "$dest_vol"/.ChameleonExists
+fi
+
+# ---------------------------------------------
+# Cleanup
+# ---------------------------------------------
+
+# remove any temporary boot sector files if they exist
+if [ -d /tmp/newbs ]; then
+ cleanUp="${cleanUp},1a"
+ rm /tmp/newbs
+fi
+if [ -d /tmp/origbs ]; then
+ cleanUp="${cleanUp},1b"
+ rm /tmp/origbs
+fi
+if [ -d /tmp/newBootSector ]; then
+ cleanUp="${cleanUp},1c"
+ rm /tmp/newbs
+fi
+if [ -d /tmp/originalBootSector ]; then
+ cleanUp="${cleanUp},1d"
+ rm /tmp/origbs
+fi
+
+# delete the temporary Chameleon folder
+if [ -e "$chamTemp" ]; then
+ cleanUp="${cleanUp},2"
+ rm -rf "$chamTemp"
+fi
+
+# Remove /.ChameleonEFI file
+if [ -f "$dest_vol"/.ChameleonEFI ]; then
+ cleanUp="${cleanUp},3"
+ rm "$dest_vol"/.ChameleonEFI
+fi
+
+"$scriptDir"InstallLog.sh "${dest_vol}" "Cleanup: ${cleanUp}"
+"$scriptDir"InstallLog.sh "${dest_vol}" "LineBreak"
+"$scriptDir"InstallLog.sh "${dest_vol}" "Post script complete"
+
+echo "==============================================="
+echo "END - Post Post-Install Script"
+echo "*********************************"
+echo "-----------------------------------------------"
+echo ""
\ No newline at end of file
Property changes on: trunk/package/Scripts/Main/postinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Main/Standardpostinstall
===================================================================
--- trunk/package/Scripts/Main/Standardpostinstall (revision 0)
+++ trunk/package/Scripts/Main/Standardpostinstall (revision 1677)
@@ -0,0 +1,212 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Main Standard Post-Install Script"
+echo "*********************************"
+echo "-----------------------------------------------"
+echo ""
+
+# Find location of this script in the package installer
+# so we know where all the other scripts are located.
+
+MYLOCATION="${PWD}/${BASH_ARGV[0]}"
+export MYLOCATION="${MYLOCATION%/*}"
+scriptDir=$MYLOCATION
+
+
+#echo "==============================================="
+#echo "Apple Installer Package Variables"
+#echo "*********************************"
+#echo "DEBUG: $ 1 = Full path to the installation package the installer app is processing: " $1
+#echo "DEBUG: $ 2 = Full path to the installation destination: " $2
+#echo "DEBUG: $ 3 = Installation volume (mountpoint) to receive the payload: " $3
+#echo "DEBUG: $ 4 = Root directory for the system: " $4
+#echo "DEBUG: Script Name: " $SCRIPT_NAME
+#echo "DEBUG: Package Path: " $PACKAGE_PATH
+#echo "DEBUG: Installer Temp: " $INSTALLER_TEMP
+#echo "DEBUG: Full path to the temp directory containing the operation executable: " $RECEIPT_PATH
+#echo "-----------------------------------------------"
+#echo ""
+
+
+# Initialise Script Globals
+
+stage0Loader="boot0"
+stage0LoaderDualBoot="boot0md"
+stage1LoaderHFS="boot1h"
+stage1LoaderFAT="boot1f32"
+stage2Loader="boot"
+
+# 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*}
+targetDiskRaw=${targetDisk/disk/rdisk}
+targetSlice=${targetDevice#*disk*s}
+
+targetResources="${targetVolume}/usr/local/bin/"
+
+echo "==============================================="
+echo "DEBUG: display script variables"
+echo "*******************************"
+
+echo "DEBUG: stage0Loader: Disk loader is ${stage0Loader}"
+echo "DEBUG: stage0LoaderDualBoot: Disk loader is ${stage0LoaderDualBoot}"
+echo "DEBUG: stage1LoaderHFS: Partition loader is ${stage1LoaderHFS}"
+echo "DEBUG: stage1LoaderFat: Partition loader is ${stage1LoaderFAT}"
+echo "DEBUG: stage2Loader: Filesystem loader is ${stage2Loader}"
+echo "DEBUG: targetVolume: Volume is ${targetVolume}"
+echo "DEBUG: targetDevice: Volume device is ${targetDevice}"
+echo "DEBUG: targetDeviceRaw: Volume raw device is ${targetDeviceRaw}"
+echo "DEBUG: targetDisk: Disk device is ${targetDisk}"
+echo "DEBUG: targetDiskRaw: Disk raw device is ${targetDiskRaw}"
+echo "DEBUG: targetSlice: Volume slice is ${targetSlice}"
+echo "DEBUG: targetResources: Boot Resources is ${targetResources}"
+echo "-----------------------------------------------"
+echo ""
+
+
+# Write some information to the Install Log
+"$scriptDir"InstallLog.sh "${targetVolume}" "Running Standard postinstall script"
+"$scriptDir"InstallLog.sh "${targetVolume}" "Target volume = ${targetVolume} on ${targetDevice}"
+
+# Double check we can see the selected partition and it's of the right type.
+# If the following script finds anything, it returns 1 to indicate failure.
+
+"$scriptDir"CheckProceed.sh "${targetVolume}" "${targetDevice}" "${targetVolume}" "${scriptDir}"
+returnValue=$?
+if [ ${returnValue} = 0 ]; then
+ # OK to proceed
+
+
+ # Does a GRUB or Linux loader already exist in the disk's MBR?
+ # The script returns 1 if yes, 0 if no.
+
+ "$scriptDir"CheckGRUBLinuxLoader.sh "${targetDisk}" "${targetVolume}" "${scriptDir}"
+ returnValue=$?
+ if [ ${returnValue} = 0 ]; then
+ # OK to proceed
+
+
+ # check for a 4-byte Windows disk signature in the disk's MBR.
+ # the following script returns 1 if a Windows disk signature exists, and 0 if not.
+
+ "$scriptDir"CheckWindowsDiskSignature.sh "${targetDisk}" "${targetVolume}" "${scriptDir}"
+ diskSigCheck=$?
+
+
+ # check for existing bootloaders in the disk's MBR
+ # and find out if we can write the Chameleon boot files.
+ # the following script returns 0 if we can proceed
+ # with writing the boot files, and 1 for not.
+
+ "$scriptDir"CheckDiskMicrocode.sh "${targetDisk}" "${diskSigCheck}" "${targetVolume}" "${scriptDir}"
+ diskupdate=$?
+
+
+ # check the format of the selected partition.
+ # result should be either hfs or msdos
+ # Should really check to make sure!
+
+ targetFormat=$( fstyp "$targetDevice" )
+
+
+ # check the partition scheme used for the selected disk.
+ # the following script returns 1 if GPT
+ # the following script returns 2 if GPT/MBR
+ # the following script returns 3 if MBR
+ # the following script returns 0 if nothing
+
+ "$scriptDir"CheckPartitionScheme.sh "${targetDisk}" "${targetVolume}" "${scriptDir}"
+ partitionScheme=$?
+ if [ ${partitionScheme} = 3 ]; then
+ # If MBR partition scheme then check for FAT16 or FAT32
+
+ # the following script returns 1 if FAT16
+ # the following script returns 2 if FAT32
+ # the following script returns 0 if nothing
+
+ "$scriptDir"CheckFatType.sh "${targetDeviceRaw}" "${targetVolume}" "${scriptDir}"
+ fatType=$?
+ fi
+
+ if [ "${fatType}" = 1 ] && [ "${partitionScheme}" = 3 ]; then
+ # Write error to Chameleon_Error_Log file
+ "$scriptDir"InstallLog.sh "${targetVolume}" "FAIL: Cannot install to a device using FAT16"
+ else
+ # Continue if the selected device is not a FAT16 format device
+
+ # Append a line break to the installer log
+ "$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
+
+ if [ ${diskupdate} = "0" ]; then
+
+ # Write the stage 0 loader to the MBR
+ "$scriptDir"WriteChameleonStage0.sh "${diskSigCheck}" "${stage0Loader}" "${stage0LoaderDualBoot}" "${targetDisk}" "${targetResources}" "${targetVolume}" "${scriptDir}"
+ else
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Stage 0 loader not written to ${targetDisk}."
+ fi
+
+ # Write the stage 1 loader to the partition boot sector
+ "$scriptDir"WriteChameleonStage1.sh "${targetFormat}" "${stage1LoaderHFS}" "${stage1LoaderFAT}" "${3}" "${targetDeviceRaw}" "${targetVolume}" "${scriptDir}"
+
+ # Write the stage 2 loader to the root of the selected partition
+ "$scriptDir"WriteChameleonStage2.sh "${stage2Loader}" "${3}" "${targetDevice}" "${targetVolume}" "${scriptDir}"
+
+
+ # Next we look to check for existing Chameleon installations.
+ # But as it will check /Volumes/EFI for the stage 2 loader,
+ # we need to make sure it's mounted.
+
+ # Tell the user what's going on.
+ "$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "About to check your disk for previous installations"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "which involves checking the EFI system partition if"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "appropriate for this disk."
+
+ # Unmount ALL mounted volumes named EFI.
+ # Returns 0=success, 1=fail
+
+ "$scriptDir"UnMountEFIvolumes.sh "${targetVolume}" "${scriptDir}"
+ returnValue=$?
+ if [ ${returnValue} = 0 ]; then
+ # OK to proceed
+
+ if [ ${partitionScheme} = 1 ] || [ ${partitionScheme} = 2 ]; then
+ # Mount the EFI system partition
+ "$scriptDir"MountESP.sh "${targetDisk}" "${targetVolume}" "${scriptDir}"
+ fi
+
+ # Check for another existing Chameleon installation on the same disk
+ "$scriptDir"CheckPreviousChameleon.sh "${targetDisk}" "${targetDeviceRaw}" "${targetDevice}" "${targetVolume}" "${scriptDir}"
+ fi
+
+ # Append a line break to the installer log
+ "$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
+
+ # Set the active partition ONLY if Windows is not installed
+ "$scriptDir"SetActivePartition.sh "${diskSigCheck}" "${targetDiskRaw}" "${targetSlice}" "${targetVolume}" "${scriptDir}"
+ fi
+ fi
+fi
+
+"$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
+"$scriptDir"InstallLog.sh "${targetVolume}" "Standard script complete"
+"$scriptDir"InstallLog.sh "${targetVolume}" "LineBreak"
+
+echo "==============================================="
+echo "END - Standard Post-Install Script"
+echo "*********************************"
+echo "-----------------------------------------------"
+echo ""
+
+exit 0
Property changes on: trunk/package/Scripts/Main/Standardpostinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Main/preinstall
===================================================================
--- trunk/package/Scripts/Main/preinstall (revision 0)
+++ trunk/package/Scripts/Main/preinstall (revision 1677)
@@ -0,0 +1,59 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Pre-Install Script"
+echo "*********************************"
+echo "-----------------------------------------------"
+echo ""
+
+# Creates text file named 'Chameleon_Installer_Log.txt'
+# at the root of the target volume. This is to help show the
+# user why the installation process failed (even though the
+# package installer ends reading 'Installation Successful'.
+
+
+
+# Find location of this script in the package installer
+# so we know where all the other scripts are located.
+
+MYLOCATION="${PWD}/${BASH_ARGV[0]}"
+export MYLOCATION="${MYLOCATION%/*}"
+scriptDir=$MYLOCATION
+
+
+# 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
+
+versionNumber=`cat "${scriptDir}"/Resources/version`
+revisionNumber=`cat "${scriptDir}"/Resources/revision`
+
+
+
+# Setup Chameleon_Installer_Log.txt file
+# by writing header and diskutil list
+
+echo "Chameleon installer log - $( date )
+Installer version: ${versionNumber} ${revisionNumber}
+======================================================" >"${logFile}"
+
+diskutil list >>"${logFile}"
+echo "======================================================" >>"${logFile}"
+
+
+
+echo "==============================================="
+echo "END - Pre-Install Script"
+echo "*********************************"
+echo "-----------------------------------------------"
+echo ""
+
+exit 0
Property changes on: trunk/package/Scripts/Main/preinstall
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckPreviousChameleon.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckPreviousChameleon.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckPreviousChameleon.sh (revision 1677)
@@ -0,0 +1,192 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Check Previous Chameleon: Will there be problems?"
+echo "***********************************************"
+
+# Checks for another existing Chameleon installation on the same disk
+# and tries to make sure the user doesn't end up with an un-bootable
+# system due to having installed Chameleon previously elsewhere.
+
+# Called from the Standard/postinstall and EFI/postinstall scripts
+# /Volumes/EFI should already be mounted before this is called.
+
+# Receives targetDisk: for example, /dev/disk3.
+# Receives targetDeviceRaw: for example, /dev/rdisk3s1.
+# Receives targetDevice: Stores device number, for example /dev/disk2s1.
+# Receives installerVolume: Volume to write the installer log to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 5 ]; then
+ targetDisk="$1"
+ targetDeviceRaw="$2"
+ targetDevice="$3"
+ installerVolume="$4"
+ scriptDir="$5"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+ echo "DEBUG: passed argument for targetDeviceRaw = $targetDeviceRaw"
+ echo "DEBUG: passed argument for targetDevice = $targetDevice"
+ echo "DEBUG: passed argument for installerVolume = $installerVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+
+# ===============================================
+# Prepare some vars
+# ===============================================
+sliceNumber=$( echo ${targetDeviceRaw#*disk*s} )
+
+# strip slice from end
+targetDiskRawNoSlice=$( echo ${targetDeviceRaw%$sliceNumber} )
+
+# Are there any other partitions on the disk?
+# How many actual partitions are there?
+numSlices=$(( $( diskutil list | grep $( echo ${targetDisk#/dev/} ) | sed -n '$=' ) -2 ))
+
+
+# ===============================================
+# Checking the disk for existing Chameleon installations
+# if there is more than one partition on the disk.
+# ===============================================
+if [ $numSlices -gt 1 ]; then
+ "$scriptDir"InstallLog.sh "${installerVolume}" "LineBreak"
+ "$scriptDir"InstallLog.sh "${installerVolume}" "Checking for previous chameleon installations on ${targetDisk#/dev/}"
+
+ # Check the disk's MBR for existing stage 0 boot code (code from CheckDiskMicrocode.sh script)
+ stage0type=$( dd 2>/dev/null if="$targetDisk" count=3 bs=1 skip=105 | xxd | awk '{print $2$3}' )
+ if [ "${stage0type}" == "0a803c" ] || [ "${stage0type}" == "ee7505" ] || [ "${stage0type}" == "742b80" ]; then
+ stage0type=2
+ elif [ "${stage0type}" == "0b807c" ]; then
+ stage0type=1
+ fi
+
+ #Scan all partitions for Chameleon code
+ for (( i=1; i <= $numSlices; i++ ));
+ do
+ if [ $stage0type == 1 ] || [ $stage0type == 2 ]; then
+ stagesFound=1
+ else
+ stagesFound=0
+ fi
+ stage1Existence="NONE"
+ stage2Existence=0
+ targetDiskRaw=$targetDiskRawNoSlice$i
+
+ # Check for existence of a bootable partition boot sector containing either boot1h or boot1f32
+ boot1Search=$( dd 2>/dev/null if="$targetDiskRaw" count=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+ if [ "${boot1Search:0:16}" == "fa31c08ed0bcf0ff" ] && [ "${boot1Search:1020:2}" == "55" ]; then
+ (( stagesFound++ ))
+ stage1Existence="boot1h"
+ elif [ "${boot1Search:0:4}" == "e962" ] && [ "${boot1Search:180:12}" == "424f4f542020" ] && [ "${boot1Search:1020:2}" == "55" ]; then
+ (( stagesFound++ ))
+ stage1Existence="boot1f32"
+ fi
+
+ # Check for existing stage 2 boot file.
+ # Include checking the EFI system partition if it exists and is mounted.
+ if [ -e "$( df | grep ${targetDisk}s${i} | awk '{ print $6 }' )"/boot ]; then
+ (( stagesFound++ ))
+ stage2Existence=1
+ fi
+
+ if [ $stagesFound -ge 2 ] && [ "$stage1Existence" != "NONE" ] && [ $i -ne $sliceNumber ]; then
+ # There is previous Chameleon stage 1 code on a partition boot sector,
+ # and either a complete or incomplete installation (ie. boot0 or boot are missing).
+
+ if [ $stagesFound == 3 ] && [ $i -lt $sliceNumber ]; then
+ # Exisitng installation found which will still be default.
+ message="************************** TAKE NOTE *****************************
+**** There is an existing Chameleon installation on $targetDiskRaw
+**** and that installation will still be the default loader as it's
+**** on an earlier partition. If you want this new installation on
+**** $installerVolume to be default then you will need to remove the
+**** boot file from $targetDiskRaw and re-run this installer.
+**************************************************************"
+ "$scriptDir"InstallLog.sh "${installerVolume}" "${message}"
+ fi
+ if [ $stagesFound == 3 ] && [ $i -gt $sliceNumber ]; then
+ # Exisitng installation found which will no longer be default.
+ message="NOTE: There is an existing Chameleon installation on $targetDiskRaw
+NOTE: but this installation on $targetDevice will be the default loader
+NOTE: because you're installing to an earlier partition on the disk."
+ "$scriptDir"InstallLog.sh "${installerVolume}" "${message}"
+ fi
+
+
+ # User could see a b1f:error or boot0:error if the following conditions are true:
+ # A) Boot0hfs, Boot0md or Boot0md (dmazar's Boot0workV2) is being used.
+ # B) The previous stage 1 code is on a lower partiton than the one being installed to now.
+ # C) boot is missing from that partition.
+
+ if [ $stagesFound == 2 ] && [ $stage2Existence == 0 ]; then
+ # Exisitng boot0 and boot1 only found - missing boot
+ "$scriptDir"InstallLog.sh "${installerVolume}" "INFO: Found $stage1Existence installed to ${targetDisk}s${i}"
+
+ # stage0type=2 is used to know if 'A' is true.
+ if [ $stage0type == 2 ]; then
+ # i = current slice we're checking, slicenumber = slice trying to install to.
+ if [ $i -lt $sliceNumber ]; then
+ "$scriptDir"InstallLog.sh "${installerVolume}" "WARN: Conditions point to the possibility of a boot failure"
+
+ # Fix by making previous paritionboot sector un-bootable
+ # Change Byte 01FExh to 00 (510 decimal)
+ message="---
+FIX: Make ${targetDisk}s${i} boot sector un-bootable by changing byte 1FEh to 00.
+NOTE: Any Extra folder you had there will still be there. If you want to use
+NOTE: ${targetDisk}s${i} again as your boot partition then re-run this installer
+NOTE: selecting it as the target, ONLY choosing the 'Chameleon Bootloader' option
+NOTE: and NONE of the other options.
+---"
+ "$scriptDir"InstallLog.sh "${installerVolume}" "${message}"
+
+ # /Volumes/EFI needs unmounting before changing partition boot sector
+ if [ $i == 1 ]; then
+ umount /Volumes/EFI
+ else
+ diskutil unmount "${targetDisk}"s${i}
+ fi
+
+ if [ "$( fstyp "${targetDisk}"s${i} | grep hfs )" ]; then
+ #echo "DEBUG: HFS - changing byte 1FEh to 00"
+ dd if=${targetDisk}s${i} count=2 bs=512 of=originalBootSector
+ cp originalBootSector newBootSector
+ dd if="patch" of=newBootSector bs=1 count=1 seek=510 conv=notrunc
+ dd if=newBootSector of=${targetDisk}s${i} count=2 bs=510
+ fi
+ if [ "$( fstyp "${targetDisk}"s${i} | grep msdos )" ]; then
+ #echo "DEBUG: MSDOS - changing byte 1FEh to 00"
+ dd if=${targetDisk}s${i} count=1 bs=512 of=/tmp/originalBootSector
+ cp /tmp/originalBootSector /tmp/newBootSector
+ dd if="$scriptDir/patch" of=/tmp/newBootSector bs=1 count=1 seek=510 conv=notrunc
+ dd if=/tmp/newBootSector of=${targetDisk}s${i} count=1 bs=512
+ fi
+
+ # /Volumes/EFI needs re-mounting so EFI/postinstall script can use it.
+ # Don't check for a GPT as wouldn't have got here if it wasn't
+ if [ $i == 1 ]; then
+ "$scriptDir"MountESP.sh "${targetDisk}" "${installerVolume}" "${scriptDir}"
+ else
+ diskutil mount "${targetDisk}"s${i}
+ fi
+
+ else
+ "$scriptDir"InstallLog.sh "${installerVolume}" "INFO: but won't interfere as you're installing to an earlier partition."
+ fi
+ elif [ $stage0type == 1 ]; then
+ # boot0 was found which looks for boot1 on the first active partition.
+ "$scriptDir"InstallLog.sh "${installerVolume}" "NOTE: so select to boot that partition (if used) with active flag."
+ #else
+ #echo "DEBUG: Boot0 not found"
+ fi
+ fi
+ fi
+
+ done
+#else
+ #echo "DEBUG: Just one slice"
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/CheckPreviousChameleon.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/patch
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Property changes on: trunk/package/Scripts/Sub/patch
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Index: trunk/package/Scripts/Sub/InstallLog.sh
===================================================================
--- trunk/package/Scripts/Sub/InstallLog.sh (revision 0)
+++ trunk/package/Scripts/Sub/InstallLog.sh (revision 1677)
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+#echo "==============================================="
+#echo "InstallLog: Create/Append installation log"
+#echo "**********************************************"
+
+# Writes to the Chameleon_Installer_Log.txt file created
+# by the preinstall script at the start of installation.
+
+# Receives two parameters
+# $1 = selected volume for location of the install log
+# $2 = text to write to the installer log
+
+if [ "$#" -eq 2 ]; then
+ logLocation="$1"
+ verboseText="$2"
+ #echo "DEBUG: passed argument = ${logLocation}"
+ #echo "DEBUG: passed argument = ${verboseText}"
+else
+ echo "InstallLog: Error - wrong number of values passed"
+ exit 9
+fi
+
+
+
+logName="Chameleon_Installer_Log.txt"
+logFile="${logLocation}"/$logName
+
+
+if [ -f "${logFile}" ]; then
+
+ # 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
+
+ if [[ "${verboseText}" == *fdisk* ]]; then
+ targetDiskRaw="${verboseText#fdisk *}"
+ fdisk $targetDiskRaw >>"${logFile}"
+ echo " " >>"${logFile}"
+ fi
+
+ if [ "${verboseText}" != "LineBreak" ] && [[ "${verboseText}" != *fdisk* ]] && [[ "${verboseText}" != "Diskutil" ]]; then
+ echo "${verboseText}" >> "${logFile}"
+ fi
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/InstallLog.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckFatType.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckFatType.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckFatType.sh (revision 1677)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "CheckFatType: Do we have FAT16 or FAT32?"
+echo "****************************************"
+
+# Looks for the following in the partition boot sector
+# Byte number 19 to see if it's either 00 or 02
+# Byte number 22 to see if it's either F8 or F0
+# Byte number 25 to see if it's either 3F or 20
+#
+# Exit with value 1 for FAT16, 2 for FAT32
+# Exit with value 0 if nothing is found - this shouldn't happen.?
+
+# Receives targetDeviceRaw: for example, /dev/rdisk0s2.
+# Receives targetVolume: Volume to install to.
+# Receives scriptDir: The location of the main script dir.
+
+
+if [ "$#" -eq 3 ]; then
+ targetDeviceRaw="$1"
+ targetVolume="$2"
+ scriptDir="$3"
+ echo "DEBUG: passed argument = $targetDeviceRaw"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+
+partitionBootSector=$( dd 2>/dev/null if="$targetDeviceRaw" count=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitionBootSector:36:2}" == "00" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "3f" ]; then
+ #echo "DEBUG: Found a FAT32 device formatted by Windows Explorer"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDeviceRaw} is on a FAT32 volume formatted by Windows Explorer"
+ exit 2
+fi
+if [ "${partitionBootSector:36:2}" == "02" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "3f" ]; then
+ #echo "DEBUG: Found a FAT16 device formatted by Windows Explorer"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDeviceRaw} is on a FAT16 volume formatted by Windows Explorer"
+ exit 1
+fi
+if [ "${partitionBootSector:36:2}" == "00" ] && [ "${partitionBootSector:42:2}" == "f0" ] && [ "${partitionBootSector:48:2}" == "20" ]; then
+ #echo "DEBUG: Found a FAT32 device formatted by OS X Snow Leopard Disk Utility"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDeviceRaw} is on a FAT32 volume formatted by OS X Snow Leopard Disk Utility"
+ exit 2
+fi
+if [ "${partitionBootSector:36:2}" == "02" ] && [ "${partitionBootSector:42:2}" == "f0" ] && [ "${partitionBootSector:48:2}" == "20" ]; then
+ #echo "DEBUG: Found a FAT16 device formatted by OS X Snow Leopard Disk Utility"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDeviceRaw} is on a FAT16 volume formatted by OS X Snow Leopard Disk Utility"
+ exit 1
+fi
+if [ "${partitionBootSector:36:2}" == "00" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "20" ]; then
+ #echo "DEBUG: Found a FAT32 device formatted by OS X Lion Disk Utility"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDeviceRaw} is on a FAT32 volume formatted by OS X Lion Disk Utility"
+ exit 2
+fi
+if [ "${partitionBootSector:36:2}" == "02" ] && [ "${partitionBootSector:42:2}" == "f8" ] && [ "${partitionBootSector:48:2}" == "20" ]; then
+ #echo "DEBUG: Found a FAT16 device formatted by OS X Lion Disk Utility"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDeviceRaw} is on a FAT16 volume formatted by OS X Lion Disk Utility"
+ exit 1
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/CheckFatType.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/MountESP.sh
===================================================================
--- trunk/package/Scripts/Sub/MountESP.sh (revision 0)
+++ trunk/package/Scripts/Sub/MountESP.sh (revision 1677)
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "MountESP: Mount the EFI system partition"
+echo "***********************************************"
+
+# Creates a mountpoint and mounts /Volumes/EFI of the
+# supplied disk which would have been pre-checked as using a GPT
+
+# Receives targetDisk: for example /dev/disk2.
+# Receives installerVolume: Volume to write the installer log to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 3 ]; then
+ targetDisk="$1"
+ installerVolume="$2"
+ scriptDir="$3"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+ echo "DEBUG: passed argument for installerVolume = $installerVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+
+# Does the mountpoint exist?
+if [ ! -e "/Volumes/EFI" ]; then
+ mkdir -p "/Volumes/EFI"
+fi
+
+# Mount '/Volumes/EFI' using the correct format type
+if [ "$( fstyp "${targetDisk}"s1 | grep hfs )" ]; then
+ "$scriptDir"InstallLog.sh "${installerVolume}" "Mounting ${targetDisk}s1 as /Volumes/EFI"
+ mount_hfs "${targetDisk}"s1 "/Volumes/EFI"
+fi
+if [ "$( fstyp "${targetDisk}"s1 | grep msdos )" ]; then
+ "$scriptDir"InstallLog.sh "${installerVolume}" "Mounting ${targetDisk}s1 as /Volumes/EFI"
+ mount_msdos -u 0 -g 0 "${targetDisk}"s1 "/Volumes/EFI"
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/MountESP.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/WriteChameleonStage0.sh
===================================================================
--- trunk/package/Scripts/Sub/WriteChameleonStage0.sh (revision 0)
+++ trunk/package/Scripts/Sub/WriteChameleonStage0.sh (revision 1677)
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Write Chameleon Stage 0 Loader:"
+echo "*******************************"
+
+# Writes Chameleon stage 0 loader.
+
+# Receives disksignature: 0 = Windows not found, 1 = Windows Found
+# Receives stage0Loader: for example, boot0
+# Receives stage0Loaderdualboot: for example, boot0md
+# Receives targetDisk: for example, /dev/disk3
+# Receives targetResources: location of fdisk440
+# Receives targetVolume: for example, /Volumes/USB
+# Receives scriptDir: The location of the main script dir.
+
+
+if [ "$#" -eq 7 ]; then
+ disksignature="$1"
+ stage0Loader="$2"
+ stage0Loaderdualboot="$3"
+ targetDisk="$4"
+ targetResources="$5"
+ targetVolume="$6"
+ scriptDir="$7"
+ echo "DEBUG: passed argument for disksignature = $disksignature"
+ echo "DEBUG: passed argument for stage0Loader = $stage0Loader"
+ echo "DEBUG: passed argument for stage0Loaderdualboot = $stage0Loaderdualboot"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+ echo "DEBUG: passed argument for targetResources = $targetResources"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+
+if [ ${disksignature} = "0" ]; then
+ # ThereΥs no Windows disk signature so we can write boot0
+
+ #echo "DEBUG: Executing command: ${targetResources}fdisk440 -u -f /usr/standalone/i386/${stage0Loader} -y ${targetDisk}"
+ "${targetResources}"fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loader} -y ${targetDisk}
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loader} to ${targetDisk}."
+else
+ # Windows is also installed on the HDD so we need to write boot0md
+
+ #echo "DEBUG: Executing command: ${targetResources}fdisk440 -u -f /usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}"
+ "${targetResources}"fdisk440 -u -f "${targetVolume}"/usr/standalone/i386/${stage0Loaderdualboot} -y ${targetDisk}
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage0Loaderdualboot} to ${targetDisk}."
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/WriteChameleonStage0.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/WriteChameleonStage1.sh
===================================================================
--- trunk/package/Scripts/Sub/WriteChameleonStage1.sh (revision 0)
+++ trunk/package/Scripts/Sub/WriteChameleonStage1.sh (revision 1677)
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Write Chameleon Stage 1 Loader:"
+echo "*******************************"
+
+# Writes Chameleon stage 1 loader.
+
+# Receives targetFormat: either hfs or msdos
+# Receives stage1LoaderHFS: Name of file - boot1h
+# Receives stage1LoaderFAT: Name of file - boot1f32
+# Receives selectedDestination: for example, /Volumes/USB
+# Receives targetDeviceRaw: for example, /dev/disk3s1
+# Receives targetVolume: for example, /Volumes/USB
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 7 ]; then
+ targetFormat="$1"
+ stage1LoaderHFS="$2"
+ stage1LoaderFAT="$3"
+ selectedDestination="$4"
+ targetDeviceRaw="$5"
+ targetVolume="$6"
+ scriptDir="$7"
+ echo "DEBUG: passed argument for targetFormat = $targetFormat"
+ echo "DEBUG: passed argument for stage1LoaderHFS = $stage1LoaderHFS"
+ echo "DEBUG: passed argument for stage1LoaderFAT = $stage1LoaderFAT"
+ echo "DEBUG: passed argument for selectedDestination = $selectedDestination"
+ echo "DEBUG: passed argument for targetDeviceRaw = $targetDeviceRaw"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+if [ ${targetFormat} = "hfs" ]; then
+
+ #echo "DEBUG: Executing command: dd if=${selectedDestination}/usr/standalone/i386/${stage1LoaderHFS} of=${targetDeviceRaw}"
+ dd if="${selectedDestination}"/usr/standalone/i386/${stage1LoaderHFS} of=${targetDeviceRaw}
+
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage1LoaderHFS} to ${targetDeviceRaw}."
+fi
+
+if [ ${targetFormat} = "msdos" ]; then
+
+ #echo "DEBUG: Executing command: dd if=${targetDeviceRaw} count=1 bs=512 of=/tmp/origbs"
+ dd if=${targetDeviceRaw} count=1 bs=512 of=/tmp/origbs
+
+ #echo "DEBUG: Executing command: cp "${selectedDestination}"/usr/standalone/i386/${stage1LoaderFAT} /tmp/newbs"
+ cp "${selectedDestination}"/usr/standalone/i386/${stage1LoaderFAT} /tmp/newbs
+
+ #echo "DEBUG: Executing command: dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 conv=notrunc"
+ dd if=/tmp/origbs of=/tmp/newbs skip=3 seek=3 bs=1 count=87 conv=notrunc
+
+ #echo "DEBUG: Executing command: dd of=${targetDeviceRaw} count=1 bs=512 if=/tmp/newbs"
+ dd if=/tmp/newbs of="${targetDeviceRaw}" count=1 bs=512
+
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Written ${stage1LoaderFAT} to ${targetDeviceRaw}."
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/WriteChameleonStage1.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckPartitionScheme.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckPartitionScheme.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckPartitionScheme.sh (revision 1677)
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Check the Partition Scheme: GPT, GPT/MBR or MBR?"
+echo "************************************************"
+
+# Looks for the first 8 bytes of the GPTdiskGPTHeader to identify a GUID partition table.
+# Byte number 450 of the GPTdiskProtectiveMBR to identify ID of 'EE' to identify a GPT partition.
+# Byte numbers 466, 482 & 498 of the GPTdiskProtectiveMBR to identify further partitions.
+#
+# Exit with value 1 for GPT, 2 for GPT/MBR and 3 for MBR.
+# Exit with value 0 if nothing is found - this shouldn't happen.?
+
+# Receives targetDisk: for example, /dev/disk0s2
+# Receives targetVolume: Volume to install to.
+# Receives scriptDir: The location of the main script dir.
+
+
+if [ "$#" -eq 3 ]; then
+ targetDisk="$1"
+ targetVolume="$2"
+ scriptDir="$3"
+ echo "DEBUG: passed argument = $targetDisk"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+
+partitiontable=$( dd 2>/dev/null if="$targetDisk" count=1 skip=1 | dd 2>/dev/null count=8 bs=1 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+if [ "${partitiontable:0:16}" == "4546492050415254" ]; then
+ partitiontable=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=64 bs=1 skip=446 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+ if [ "${partitiontable:8:2}" == "ee" ]; then
+ #echo "DEBUG: Found System ID 'EE' to identify GPT Partition"
+
+ if [ "${partitiontable:40:2}" == "00" ] && [ "${partitiontable:72:2}" == "00" ] && [ "${partitiontable:104:2}" == "00" ]; then
+ #echo "DEBUG: Found System ID '00' for each remaining possible partition"
+ partitiontable="GPT"
+ #echo "DEBUG: ${partitiontable} found."
+ #"$scriptDir"InstallLog.sh "${targetVolume}" "${targetDisk} is using a GPT."
+ exit 1
+ else
+ partitiontable="GPT/MBR"
+ #echo "DEBUG: ${partitiontable} found."
+ #"$scriptDir"InstallLog.sh "${targetVolume}" "${targetDisk} is using a GPT/MBR."
+ exit 2
+ fi
+ fi
+else
+ partitiontable="MBR"
+ #echo "DEBUG: ${partitiontable} found."
+ #"$scriptDir"InstallLog.sh "${targetVolume}" "${targetDisk} is using MBR."
+ exit 3
+fi
+
+#echo "DEBUG: No partition table found."
+"$scriptDir"InstallLog.sh "${targetVolume}" "NOTE: No partition table found."
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/CheckPartitionScheme.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/WriteChameleonStage2.sh
===================================================================
--- trunk/package/Scripts/Sub/WriteChameleonStage2.sh (revision 0)
+++ trunk/package/Scripts/Sub/WriteChameleonStage2.sh (revision 1677)
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Write Chameleon Stage 2 Loader:"
+echo "*******************************"
+
+# Receives stage2Loader: Name of file - boot
+# Receives selectedDestination: for example, /Volumes/ChameleonBootUSB (or /Volumes/EFI if ESP install).
+# Receives targetDevice: for example, /dev/disk3s1
+# Receives targetVolume: for example, /Volumes/ChameleonBootUSB
+# Receives scriptDir: The location of the main script dir.
+
+
+if [ "$#" -eq 5 ]; then
+ stage2Loader="$1"
+ selectedDestination="$2"
+ targetDevice="$3"
+ targetVolume="$4"
+ scriptDir="$5"
+ echo "DEBUG: passed argument for stage2Loader = $stage2Loader"
+ echo "DEBUG: passed argument for selectedDestination = $selectedDestination"
+ echo "DEBUG: passed argument for targetDevice = $targetDevice"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+# check to see if install to EFI system partition was selected
+if [ "${selectedDestination}" = "/Volumes/EFI" ]; then
+ #echo "DEBUG: Executing command: cp "${targetVolume}"/usr/standalone/i386/${stage2Loader} ${selectedDestination}"
+ cp "${targetVolume}"/usr/standalone/i386/"${stage2Loader}" "${selectedDestination}"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Written boot to ${selectedDestination}."
+else
+ #echo "DEBUG: Executing command: cp "${targetVolume}"/usr/standalone/i386/${stage2Loader} ${targetVolume}"
+ cp "${targetVolume}"/usr/standalone/i386/"${stage2Loader}" "${targetVolume}"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Written boot to ${targetVolume} on ${targetDevice}."
+fi
+
+#ΚCheck to see if the user wants to hide the boot file
+#if [ -f "${selectedDestination}"/.Chameleon/nullhideboot ]; then
+# echo "Executing command: SetFile -a V ${targetVolume}/${stage2Loader}"
+# "${selectedDestination}"/.Chameleon/Resources/SetFile -a V "${targetVolume}"/"${stage2Loader}"
+#fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/WriteChameleonStage2.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckDiskMicrocode.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckDiskMicrocode.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckDiskMicrocode.sh (revision 1677)
@@ -0,0 +1,116 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "CheckDiskMicrocode: Any existing bootloaders?"
+echo "*********************************************"
+
+# Reads the GPTdiskProtectiveMBR and searches for an existing
+# Windows bootloader and also for an existing Chameleon stage 0 loader
+# which might be better changed depending on whether or not a Windows
+# signature is found or not.
+# The script then exits with the value 0 to indicate that Chameleon stage0
+# loader can be written, or 1 to indicate not to write the stage0 loader.
+
+# Receives targetDisk: for example, /dev/disk2.
+# Receives diskSigCheck: 0 = Windows not installed / 1 = Windows installed.
+# Receives targetVolume: Volume to install to.
+# Receives scriptDir: The location of the main script dir.
+
+
+if [ "$#" -eq 4 ]; then
+ targetDisk="$1"
+ diskSigCheck="$2"
+ targetVolume="$3"
+ scriptDir="$4"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+ echo "DEBUG: passed argument for diskSigCheck = $diskSigCheck"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed - Exiting"
+ exit 9
+fi
+
+
+# read the first 437 bytes of the MBR
+
+mbr437=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+#mbr437md5=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=1 bs=437 | md5 )
+
+if [ $( echo "${mbr437}" | awk -F0 '{print NF-1}' ) != 874 ]; then
+ # There is already something on the MBR
+
+ # See if a Windows bootloader already exists
+ # Check bytes 440-443 of the GPTdiskProtectiveMBR for a Windows Disk Signature
+ windowsloader=$( dd 2>/dev/null if="$targetDisk" count=4 bs=1 | xxd | awk '{print $2$3}' )
+ if [ "${windowsloader}" == "33c08ed0" ] ; then
+ #echo "DEBUG: Found existing Windows Boot Loader so will replace with Chameleon boot0md"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Target disk has existing Windows boot loader - Will replace with boot0md (boot0workV2)."
+ fi
+
+ # See if a Chameleon stage0 boot file already exists
+
+ # Note: The checks for Boot0, Boot0hfs, Boot0md and Boot0md (dmazar's Boot0workV2) assume the code stays the same.
+ # if the code changes then the hex values 0b807c, 0a803c, ee7505 and 742b80 used for matching
+ # need to be checked to see if they are the same or not.
+
+ stage0type=$( dd 2>/dev/null if="$targetDisk" count=3 bs=1 skip=105 | xxd | awk '{print $2$3}' )
+ if [ "${stage0type}" == "0b807c" ]; then
+ #echo "DEBUG: Target has existing Chameleon stage 0 loader - Boot0hfs"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Target disk already has existing Chameleon stage 0 loader - boot0hfs"
+
+ # Script CheckDiskSignature.sh returned 0 if a Windows installation was NOT found
+ if [ "$diskSigCheck" == "0" ]; then
+ #echo "DEBUG: Found no existing Windows installation so will replace stage 0 loader with Boot0"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Will replace boot0hfs with boot0 as Windows is not on target disk."
+ exit 0
+ fi
+ exit 1
+ fi
+
+ if [ "${stage0type}" == "0a803c" ]; then
+ #echo "DEBUG: Found existing Chameleon stage 0 loader - Boot0"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Target disk already has existing Chameleon stage 0 loader - boot0"
+
+ # Script CheckDiskSignature.sh returned 1 if a Windows installation was found
+ if [ "$diskSigCheck" = "1" ]; then
+ #echo "DEBUG: Found existing Windows installation so will replace stage 0 loader with boot0md"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Will replace boot0 with boot0md (boot0workV2) as Windows is on target disk."
+ exit 0
+ fi
+ exit 1
+ fi
+
+ if [ "${stage0type}" == "ee7505" ]; then
+ #echo "DEBUG: Found existing Chameleon stage 0 loader - Boot0md"
+ #echo "DEBUG: And will leave boot0md installed."
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Target disk already has existing Chameleon stage 0 loader - boot0md (v1)."
+ exit 1
+ fi
+
+ if [ "${stage0type}" == "742b80" ]; then
+ #echo "DEBUG: Found existing Chameleon stage 0 loader - Boot0workV2"
+ #echo "DEBUG: And will leave Boot0workV2 installed."
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Target disk already has existing Chameleon stage 0 loader - boot0md (boot0workV2)."
+ exit 1
+ fi
+
+ if [ "${stage0type}" != "0b807c" ] && [ "${stage0type}" != "0a803c" ] && [ "${stage0type}" != "ee7505" ] && [ "${stage0type}" != "742b80" ] && [ "${windowsloader}" != "33c08ed0" ] ; then
+ #echo "DEBUG: Something other than Chameleon or a Windows bootloader was found"
+ test=$(echo "${mbr437}" | awk -F0 '{print NF-1}' )
+ #echo "DEBUG: Disk microcode found: ${test} - Preserving."
+ #echo "DEBUG: diskupdate is set to false"
+ #echo "DEBUG: -----------------------------------------------"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "NOTE: Target has existing unrecognised bootcode in the MBR. Leaving as is."
+ exit 1
+ fi
+#else
+ #echo "DEBUG: The first 437 bytes of the MBR Disk Sector is blank - Updating"
+ #"$scriptDir"InstallLog.sh "${targetVolume}" "Target has no bootcode in the MBR disk sector."
+fi
+
+echo "diskupdate is now set to true."
+echo "-----------------------------------------------"
+echo ""
+
+exit 0
Property changes on: trunk/package/Scripts/Sub/CheckDiskMicrocode.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckProceed.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckProceed.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckProceed.sh (revision 1677)
@@ -0,0 +1,65 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Check Proceed: Can the installation continue?"
+echo "***********************************************"
+
+# Checks the selected volume is present and the disk is partitioned
+# Now also check for another existing Chameleon installation on the same disk.
+
+# Receives targetVolume: Volume to install to (will be '/Volumes/EFI' if EFI install)
+# Receives targetDevice: Stores device number, for example /dev/disk2s1.
+# Receives installerVolume: Volume to write the installer log to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 4 ]; then
+ targetVolume="$1"
+ targetDevice="$2"
+ installerVolume="$3"
+ scriptDir="$4"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for targetDevice = $targetDevice"
+ echo "DEBUG: passed argument for installerVolume = $installerVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+
+# Does target volume exist?
+if [ -z "$targetVolume" ]; then
+ echo "*** Cannot find the volume. Exiting."
+ "$scriptDir"InstallLog.sh "${installerVolume}" "FAIL: Cannot file the volume: $targetVolume."
+ exit 1
+#else
+ #echo "DEBUG: Confirming target volume exists"
+fi
+
+
+# Does target volume use slices?
+if [ "$targetDevice" = "$targetDevice#*disk*s" ]; then
+ echo "*** ERROR Volume does not use slices. Exiting."
+ "$scriptDir"InstallLog.sh "${installerVolume}" "FAIL: $targetVolume doesn't use slices."
+ exit 1
+#else
+ #echo "DEBUG: Confirming target device uses slices"
+fi
+
+
+# Add check for installing to a 'small' HFS device like a
+# 1GB USB flash drive which won't have an EFI System Partition.
+if [ "$targetVolume" = "/Volumes/EFI" ]; then
+ # Take target device and check slice 1 matches partition named "EFI"
+ stripped=$( echo ${targetDevice#/dev/} )
+ if [ ! $(echo ${stripped#*disk*s}) = 1 ]; then
+ stripped=$( echo ${stripped%s*})"s1"
+ fi
+ if [ ! $( diskutil list | grep ${stripped} | awk {'print $2'} ) = "EFI" ]; then
+ #echo "DEBUG: *** The selected volume doesn't have an EFI System Partition. Exiting."
+ "$scriptDir"InstallLog.sh "${installerVolume}" "FAIL: Selected disk does not have an EFI System Partition."
+ exit 1
+ fi
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/CheckProceed.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/SetActivePartition.sh
===================================================================
--- trunk/package/Scripts/Sub/SetActivePartition.sh (revision 0)
+++ trunk/package/Scripts/Sub/SetActivePartition.sh (revision 1677)
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Set Active Partition ONLY if Windows is not installed"
+echo "*****************************************************"
+
+# Sets partition active if Windows is not installed.
+
+# Receives diskSigCheck: code is 1 for a Windows install, 0 for no Windows install
+# Receives targetDiskRaw: for example, /dev/rdisk1
+# Receives targetSlice: for example, 1
+# Receives targetVolume: Volume to install to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 5 ]; then
+ diskSigCheck="$1"
+ targetDiskRaw="$2"
+ targetSlice="$3"
+ targetVolume="$4"
+ scriptDir="$5"
+
+ echo "DEBUG: passed argument for diskSigCheck = $diskSigCheck"
+ echo "DEBUG: passed argument for targetDiskRaw = $targetDiskRaw"
+ echo "DEBUG: passed argument for targetSlice = $targetSlice"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+# Append fdisk output to the installer log
+"$scriptDir"InstallLog.sh "${targetVolume}" "fdisk ${targetDiskRaw}"
+
+if [ ${diskSigCheck} == "0" ]; then
+ #Windows is not installed so let's change the active partition"
+
+ partitionactive=$( fdisk -d ${targetDiskRaw} | grep -n "*" | awk -F: '{print $1}')
+ if [ "${partitionactive}" ] && [ "${partitionactive}" = "${targetSlice}" ]; then
+ "$scriptDir"InstallLog.sh "${targetVolume}" "${targetDiskRaw#/dev/r}, slice "${targetSlice}" is already set active. No need to change it."
+ else
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Setting ${targetVolume} partition active."
+ # BadAxe requires EFI partition to be flagged active.
+ # but it doesn't' hurt to do it for any non-windows partition.
+
+ fdisk -e ${targetDiskRaw} <<-MAKEACTIVE
+ print
+ flag ${targetSlice}
+ write
+ y
+ quit
+ MAKEACTIVE
+ fi
+else
+ # TO DO
+ # Add check to make sure that the active partition is actually the Windows partition
+ # before printing next statement.
+ #echo "DEBUG: Windows is installed so we let that remain the active partition"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Windows is installed so that can remain the active partition"
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/SetActivePartition.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckGRUBLinuxLoader.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckGRUBLinuxLoader.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckGRUBLinuxLoader.sh (revision 1677)
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "CheckGRUBLinuxLoader: Does GRUB or LILO exist?"
+echo "**********************************************"
+
+# This reads the MBR of the disk in the attempt to find the
+# signature for either the GRUB or Linux bootloaders.
+# The script returns 1 if either is found, or 0 if none found.
+
+# Receives targetdisk: for example, /dev/disk2.
+# Receives targetVolume: Volume to install to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 3 ]; then
+ targetDisk="$1"
+ targetVolume="$2"
+ scriptDir="$3"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+diskmicrocodetype[1]="GRUB,47525542"
+diskmicrocodetype[2]="LILO,4c494c4f"
+
+diskmicrocode=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=1 bs=437 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+#echo "DEBUG: ${diskmicrocode}"
+diskmicrocodetypecounter=0
+
+while [ ${diskmicrocodetypecounter} -lt ${#diskmicrocodetype[@]} ]; do
+ diskmicrocodetypecounter=$(( ${diskmicrocodetypecounter} + 1 ))
+ diskmicrocodetypeid=${diskmicrocodetype[${diskmicrocodetypecounter}]#*,}
+ if [ ! "${diskmicrocode}" = "${diskmicrocode/${diskmicrocodetypeid}/}" ]; then
+ echo "${diskmicrocodetype[${diskmicrocodetypecounter}]%,*} found."
+ "$scriptDir"InstallLog.sh "${targetVolume}" "FAIL: Found an exisitng GRUB/LILO bootloader in the MBR."
+ exit 1
+ #else
+ #echo "DEBUG: Didn't find a match for ${diskmicrocodetype[${diskmicrocodetypecounter}]%,*}"
+ fi
+done
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/CheckGRUBLinuxLoader.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/UnMountEFIvolumes.sh
===================================================================
--- trunk/package/Scripts/Sub/UnMountEFIvolumes.sh (revision 0)
+++ trunk/package/Scripts/Sub/UnMountEFIvolumes.sh (revision 1677)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "Unmount all volumes named EFI"
+echo "*****************************"
+
+# loop through and un-mount ALL mounted 'EFI' system partitions - Thanks kizwan
+
+# Receives targetVolumeChosenByUser: To write install log to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 2 ]; then
+ targetVolumeChosenByUser="$1"
+ scriptDir="$2"
+ echo "DEBUG: passed argument for targetVolumeChosenByUser = $targetVolumeChosenByUser"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed"
+ exit 9
+fi
+
+# Count of 5 exists incase for some reason /Volumes/EFI fails
+# be unmounted in which case the loop would run forever.
+attempts=1
+while [ "$( df | grep EFI )" ] && [ $attempts -lt 5 ]; do
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Volume named 'EFI' is mounted..."
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Unmounting $( df | grep EFI | awk '{print $1}' )"
+ umount -f $( df | grep EFI | awk '{print $1}' )
+ (( attempts++ ))
+done
+if [ $attempts = 5 ]; then
+ "$scriptDir"InstallLog.sh "${targetVolumeChosenByUser}" "Failed to unmount 'EFI' System Partition."
+ exit 1
+fi
+
+exit 0
+
+
+
Property changes on: trunk/package/Scripts/Sub/UnMountEFIvolumes.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Scripts/Sub/CheckWindowsDiskSignature.sh
===================================================================
--- trunk/package/Scripts/Sub/CheckWindowsDiskSignature.sh (revision 0)
+++ trunk/package/Scripts/Sub/CheckWindowsDiskSignature.sh (revision 1677)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+echo "==============================================="
+echo "CheckWindowsDiskSignature: Is Windows installed?"
+echo "************************************************"
+
+# Checks the disk sector for a 4-byte Windows disk signature
+# if one is found then it exits with 1, otherwise it exits with 0
+
+# Receives targetdisk: for example, /dev/disk0
+# Receives targetVolume: Volume to install to.
+# Receives scriptDir: The location of the main script dir.
+
+if [ "$#" -eq 3 ]; then
+ targetDisk="$1"
+ targetVolume="$2"
+ scriptDir="$3"
+ echo "DEBUG: passed argument for targetDisk = $targetDisk"
+ echo "DEBUG: passed argument for targetVolume = $targetVolume"
+ echo "DEBUG: passed argument for scriptDir = $scriptDir"
+else
+ echo "Error - wrong number of values passed - Exiting"
+ exit 9
+fi
+
+disksignature=$( dd 2>/dev/null if="$targetDisk" count=1 | dd 2>/dev/null count=4 bs=1 skip=440 | perl -ne '@a=split"";for(@a){printf"%02x",ord}' )
+
+#echo "DEBUG: ${disksignature}"
+
+if [ "${disksignature}" = "00000000" ]; then
+ #echo "DEBUG: No Windows installation detected."
+ exit 0
+else
+ #echo "DEBUG: Detected an existing Windows installation"
+ "$scriptDir"InstallLog.sh "${targetVolume}" "Detected a Windows installation on this volume."
+ exit 1
+fi
+
+exit 0
\ No newline at end of file
Property changes on: trunk/package/Scripts/Sub/CheckWindowsDiskSignature.sh
___________________________________________________________________
Added: svn:executable
+ *
Index: trunk/package/Resources/zh_TW.lproj/Description.html
===================================================================
--- trunk/package/Resources/zh_TW.lproj/Description.html (revision 1676)
+++ trunk/package/Resources/zh_TW.lproj/Description.html (revision 1677)
@@ -1,29 +1,45 @@
-
+
+
+
-Chameleon is combination of various boot loader components.
It is based on David Elliott's fake EFI implementation added to Apple's boot-132 project.
Chameleon is extended with the following key features:
-
-New features in Chameleon 2.0
-
- - Fully customizable GUI to bring some color to the Darwin Bootloader.
- - Booting retail DVDs by directly loading a ramdisk image without help of additional programs.
- - Hibernation. Enjoy resuming your Mac OS X with a preview image.
- - SMBIOS override to modify the factory SMBIOS values.
- - DSDT override to use a modified fixed DSDT which can solve several issues.
-
- - Device Property Injection via device-properties string.
- - hybrid boot0 / boot1h for MBR and GPT partitioned disks.
- - automatic FSB detection code even for recent AMD CPUs.
- - Apple Software RAID support.
-
-For detailed information, visit : http://chameleon.osx86.hu
+Chameleon is a boot loader built using a combination of components which evolved from the development of David Elliott's fake EFI implementation added to Apple's boot-132 project.
+
+Chameleon v2 is extended with many features. For example:
+
+- Fully customizable GUI to bring some color to the Darwin Bootloader.
+- Load a ramdisk to directly boot retail DVDs without additional programs.
+- Hibernation. Enjoy resuming your Mac OS X with a preview image.
+- SMBIOS override to modify the factory SMBIOS values.
+- DSDT override to use a modified fixed DSDT which can solve several issues.
+- Device Property Injection via device-properties string.
+- hybrid boot0 / boot1h for MBR and GPT partitioned disks.
+- Automatic FSB detection code even for recent AMD CPUs.
+- Apple Software RAID support.
+- Nvidia & ATI/AMD Graphics Card Enabler.
+- Module support
+- Memory detection adapted from memtest86: http://www.memtest.org
+- Automatic P-State & C-State generation for native power management.
+- Message logging.
+
+
+The code is released under version 2 of the Gnu Public License.
+http://forge.voodooprojects.org/p/chameleon
+
+FAQ's: http://forum.voodooprojects.org/index.php/topic,754.0.html
Index: trunk/package/Resources/zh_TW.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/package/Resources/zh_TW.lproj/Welcome.rtfd/TXT.rtf (revision 1676)
+++ trunk/package/Resources/zh_TW.lproj/Welcome.rtfd/TXT.rtf (revision 1677)
@@ -1,44 +1,52 @@
-{\rtf1\ansi\ansicpg950\cocoartf1038\cocoasubrtf360
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fnil\fcharset136 STHeitiTC-Light;\f2\fnil\fcharset134 STHeitiSC-Light;
-}
-{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red255\green0\blue9;}
\margl1440\margr1440\vieww11660\viewh12980\viewkind0
\pard\ri0\qc
-\f0\b\fs72 \cf0 Chameleon
+\f0\b\fs28 \cf0 \
+
+\fs48 Chameleon
\fs50 \
+\pard\ri0\qc
-\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs26 \cf0 v%CHAMELEONVERSION% r%CHAMELEONREVISION%\
+
\fs50 \
-\pard\ri0\ql\qnatural
+\pard\ri0
-\fs26 \cf0 \
+\fs22 \cf0 \
+\
\pard\ri0\qc
-\fs50 \cf2 %CHAMELEONSTAGE%
+\fs28 \cf2 Do not install to an Apple Macintosh computer\
+\pard\ri0\qc
+
\fs26 \cf0 \
-\pard\ri0\ql\qnatural
+\
+\pard\ri0
\cf0 \
-\pard\ri0\ql\qnatural
+\pard\ri0
-\f1 \cf0 \'b6\'7d\'b5\'6f\'aa\'cc
-\f0 : %DEVELOP%\
-\
+\fs24 \cf0 Developers :
+\fs20 %DEVELOP%
+\fs24 \
-\f1 \'b7\'50\'c1\'c2
-\f0 : %CREDITS%\
-\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+\fs18 \
-\b0\fs30 \cf0 \
-\pard\ri0\ql\qnatural
+\fs24 Thanks to :
+\fs20 %CREDITS%
+\fs24 \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
-\f1\b\fs26 \cf0 \'ab\'ca\'b8\'cb\'aa\'cc
-\f0 : %PKGDEV%
+\b0\fs18 \cf0 \
+\pard\ri0
+
+\b\fs24 \cf0 Package :
+\fs20 %PKGDEV%
\b0\fs30 \
-\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
\cf0 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
-\fs26 \cf0 Copyright \'a9 2011
-\f2\b \'b7\'ad\'d7\'67
-\f0 : crazybirdy, Ulimate}
+\fs20 \cf0 Copyright \'a9 2011}
\ No newline at end of file
Index: trunk/package/Resources/zh_TW.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/package/Resources/zh_TW.lproj/Conclusion.rtfd/TXT.rtf (revision 1676)
+++ trunk/package/Resources/zh_TW.lproj/Conclusion.rtfd/TXT.rtf (revision 1677)
@@ -1,35 +1,27 @@
-{\rtf1\ansi\ansicpg950\cocoartf1038\cocoasubrtf360
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\fnil\fcharset136 STHeitiTC-Light;}
-{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;}
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red0\green0\blue255;\red14\green0\blue45;\red255\green0\blue0;
+\red255\green0\blue9;}
\margl1440\margr1440\vieww11660\viewh12980\viewkind0
-\pard\ri0\qc
+\pard\ri-20\qc
-\f0\b\fs72 \cf0 Chameleon
-\fs50 \
-
-\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%
-\fs50 \
+\f0\b\fs28 \cf0 \
\
-\cf2 %CHAMELEONSTAGE%\cf0 \
-\pard\ri0\ql\qnatural
+The scripts have completed and a file\
+ named \cf2 Chameleon_Installer_Log.txt\cf3 has been\
+written to the root of your chosen partition.\
+\
+\cf0 Please \cf4 read it\cf0 to find out if the installation was\
+successful and keep it for a record of what was done.\
+\cf4 \
+\
+\
+\
+\
-\fs26 \cf0 \
-\pard\ri0\qc
+\fs26 \cf0 Chameleon v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs24 \cf5 \
-\f1\fs50 \cf3 \'a6\'77 \'b8\'cb \'a7\'b9 \'a6\'a8
-\f0 !
-\b0\fs26 \cf0 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-
-\fs18 \cf0 \
-{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
-\fs26 http://chameleon.osx86.hu/}}
-\fs26 \
-{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt http://forum.voodooprojects.org/index.php}}
-\b \
-\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
-
\b0\fs30 \cf0 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
-\fs26 \cf0 Copyright \'a9 2011}
+\fs20 Copyright \'a9 2011}
\ No newline at end of file
Index: trunk/package/Resources/he.lproj/Description.html
===================================================================
--- trunk/package/Resources/he.lproj/Description.html (revision 1676)
+++ trunk/package/Resources/he.lproj/Description.html (revision 1677)
@@ -1,29 +1,45 @@
-
+
-
+
+
+
-ΧΧΧΧΧΧΧ ΧΧ Χ©ΧΧΧΧ Χ©Χ Χ¨ΧΧΧΧ ΧΧΧΧΧΧΧ¨ΧΧ Χ©ΧΧ ΧΧ.
ΧΧΧ ΧΧΧΧ‘Χ‘ Χ’Χ ΧΧΧ©ΧΧ fake EFI Χ©Χ David Elliott ΧΧ€Χ¨ΧΧΧ§Χ boot-132 Χ©Χ ΧΧ€Χ.
ΧΧΧΧΧΧΧ ΧΧΧΧ’ Χ’Χ ΧͺΧΧΧ ΧΧͺ Χ’ΧΧ§Χ¨ΧΧΧͺ ΧΧΧΧΧͺ:
-
-ΧͺΧΧΧ ΧΧͺ ΧΧΧ©ΧΧͺ ΧΧΧΧΧΧΧΧ ΧΧ¨Χ‘Χ 2.0
-
- - ΧΧΧ©Χ§ ΧΧ©ΧͺΧΧ© ΧΧ’Χ ΧΧͺΧΧΧ ΧΧΧ©ΧΧͺ ΧΧΧΧ Χ©ΧΧΧΧΧ Χ¦ΧΧ’ΧΧ ΧDarwin Bootloader.
- - ΧΧͺΧΧΧ ΧΧΧ‘Χ§ ΧΧͺΧ§Χ Χͺ OSX Χ¨ΧΧΧΧΧ Χ’Χ ΧΧΧ ΧΧ’ΧΧΧͺ ramdisk ΧΧΧ ΧΧΧΧ’ΧΧ¨ ΧΧͺΧΧ ΧΧͺ Χ ΧΧ‘Χ€ΧΧͺ.
- - ΧΧΧΧ¨Χ Χ¦ΧΧ. ΧΧΧΧ ΧΧͺ ΧΧΧΧ¨Χͺ ΧΧΧ’Χ¨ΧΧͺ Χ©ΧΧ ΧΧΧ¦Χ ΧΧΧΧ¨Χ Χ¦ΧΧ ΧΧ’ΧΧ¨Χͺ preview image.
- - Χ’Χ§ΧΧ€Χͺ SMBIOS ΧΧ©ΧΧ ΧΧ Χ’Χ¨ΧΧ ΧΧ€Χ’Χ Χ©Χ Χ ΧͺΧΧ Χ SMBIOS.
- - Χ’Χ§ΧΧ€Χͺ DSDT ΧΧ©ΧΧΧΧ© ΧDSDT ΧΧΧͺΧΧΧ ΧΧΧ©ΧΧͺ ΧΧ©Χ¨ ΧΧΧΧ ΧΧ€ΧͺΧΧ¨ ΧΧ‘Χ€Χ¨ ΧΧ’ΧΧΧͺ.
-
- - ΧΧΧ Χ'Χ§Χ©Χ Χ©Χ Device Property ΧΧΧΧ¦Χ’ΧΧͺ device-properties string.
- - ΧΧΧΧ¨ΧΧ Χ©Χ boot0/boot1h ΧΧΧΧ Χ ΧΧ ΧΧΧΧΧΧ§ΧΧ ΧΧ©ΧΧΧΧͺ MBR Χ GPT.
- - Χ§ΧΧ ΧΧΧΧΧ ΧΧΧΧΧΧΧ Χ©Χ FSB ΧΧ€ΧΧΧ ΧΧΧ’ΧΧΧ AMD ΧΧΧΧ©ΧΧ.
- - ΧͺΧΧΧΧ ΧApple Software RAID.
-
-ΧΧ§ΧΧΧͺ ΧΧΧΧ’ Χ ΧΧ‘Χ£, ΧΧ Χ ΧΧ§Χ¨Χ Χ: http://chameleon.osx86.hu
+Chameleon is a boot loader built using a combination of components which evolved from the development of David Elliott's fake EFI implementation added to Apple's boot-132 project.
+
+Chameleon v2 is extended with many features. For example:
+
+- Fully customizable GUI to bring some color to the Darwin Bootloader.
+- Load a ramdisk to directly boot retail DVDs without additional programs.
+- Hibernation. Enjoy resuming your Mac OS X with a preview image.
+- SMBIOS override to modify the factory SMBIOS values.
+- DSDT override to use a modified fixed DSDT which can solve several issues.
+- Device Property Injection via device-properties string.
+- hybrid boot0 / boot1h for MBR and GPT partitioned disks.
+- Automatic FSB detection code even for recent AMD CPUs.
+- Apple Software RAID support.
+- Nvidia & ATI/AMD Graphics Card Enabler.
+- Module support
+- Memory detection adapted from memtest86: http://www.memtest.org
+- Automatic P-State & C-State generation for native power management.
+- Message logging.
+
+
+The code is released under version 2 of the Gnu Public License.
+http://forge.voodooprojects.org/p/chameleon
+
+FAQ's: http://forum.voodooprojects.org/index.php/topic,754.0.html
Index: trunk/package/Resources/he.lproj/Welcome.rtfd/TXT.rtf
===================================================================
--- trunk/package/Resources/he.lproj/Welcome.rtfd/TXT.rtf (revision 1676)
+++ trunk/package/Resources/he.lproj/Welcome.rtfd/TXT.rtf (revision 1677)
@@ -1,31 +1,51 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\froman\fcharset0 TimesNewRomanPSMT;}
-{\colortbl;\red255\green255\blue255;\red65\green78\blue255;}
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red255\green0\blue9;}
\margl1440\margr1440\vieww9580\viewh11200\viewkind0
-\deftab1134
-\pard\pardeftab1134\qc\rtlpar
+\pard\ri0\qc
-\f0\b\fs72 \cf0 Chameleon\
-\pard\pardeftab1134\qc\rtlpar
+\f0\b\fs28 \cf0 \
-\fs26 \cf0 v%CHAMELEONVERSION% r%CHAMELEONREVISION%\
-\pard\pardeftab1134\ri0\ql\qnatural
-\cf0 \
-\pard\pardeftab1134\qc\rtlpar
+\fs48 Chameleon
+\fs50 \
-\fs50 \cf2 %CHAMELEONSTAGE%\
-\pard\pardeftab1134\ri0\ql\qnatural
+\fs26 v%CHAMELEONVERSION% r%CHAMELEONREVISION%\
-\fs26 \cf0 \
-\pard\pardeftab1134\qr\rtlpar
-\cf0 \uc0\u1502 \u1508 \u1514 \u1495 \u1497 \u1501 : Crazor ,Dense ,fassl ,fxtentacle ,iNDi ,JrCs ,Kabyl ,kaitek ,mackerintel mercurysquad ,mozodojo ,munky ,rekursor ,Turbo & zef\
-\pard\pardeftab1134\qr\rtlpar
+\fs50 \
+\pard\ri0
-\f1\b0\fs24 \cf0
-\f0\b\fs26 \
-\uc0\u1514 \u1493 \u1491 \u1492 \u1500 : asereBLN ,bumby ,cosmolt ,dfe ,Galaxy ,kalyway ,Krazubu ,netkas ,sckevyn ,smith@@ ,THeKiNG ,XyZ , blackosx, iFabio, scrax
-\f1\b0\fs24 \
+\fs22 \cf0 \
\
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\qr\rtlpar
+\pard\ri0\qc
-\f0\fs26 \cf0 Copyright \'a9 2010}
\ No newline at end of file
+\fs28 \cf2 Do not install to an Apple Macintosh computer\
+\pard\ri0\qc
+
+\fs26 \cf0 \
+\
+\pard\ri0
+\cf0 \
+\pard\ri0
+
+\fs24 \cf0 Developers :
+\fs20 %DEVELOP%
+\fs24 \
+
+\fs18 \
+
+\fs24 Thanks to :
+\fs20 %CREDITS%
+\fs24 \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
+
+\b0\fs18 \cf0 \
+\pard\ri0
+
+\b\fs24 \cf0 Package :
+\fs20 %PKGDEV%
+\b0\fs30 \
+\pard\tx360\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
+\cf0 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
+
+\fs20 \cf0 Copyright \'a9 2011}
\ No newline at end of file
Index: trunk/package/Resources/he.lproj/Conclusion.rtfd/TXT.rtf
===================================================================
--- trunk/package/Resources/he.lproj/Conclusion.rtfd/TXT.rtf (revision 1676)
+++ trunk/package/Resources/he.lproj/Conclusion.rtfd/TXT.rtf (revision 1677)
@@ -1,41 +1,27 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf320
-{\fonttbl\f0\fnil\fcharset0 LucidaGrande;\f1\froman\fcharset0 TimesNewRomanPSMT;}
-{\colortbl;\red255\green255\blue255;\red65\green78\blue255;\red255\green0\blue0;\red0\green0\blue128;
-\red128\green128\blue128;}
+{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf230
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;\red0\green0\blue255;\red14\green0\blue45;\red255\green0\blue0;
+\red255\green0\blue9;}
\margl1440\margr1440\vieww11660\viewh12980\viewkind0
-\deftab1134
-\pard\pardeftab1134\qc\rtlpar
+\pard\ri-20\qc
-\f0\b\fs72 \cf0 Chameleon\
-\pard\pardeftab1134\qc\rtlpar
+\f0\b\fs28 \cf0 \
+\
+The scripts have completed and a file\
+ named \cf2 Chameleon_Installer_Log.txt\cf3 has been\
+written to the root of your chosen partition.\
+\
+\cf0 Please \cf4 read it\cf0 to find out if the installation was\
+successful and keep it for a record of what was done.\
+\cf4 \
+\
+\
+\
+\
-\fs26 \cf0 v%CHAMELEONVERSION% r%CHAMELEONREVISION%\
-\pard\pardeftab1134\ri0\ql\qnatural
-\cf0 \
-\pard\pardeftab1134\qc\rtlpar
+\fs26 \cf0 Chameleon v%CHAMELEONVERSION% r%CHAMELEONREVISION%
+\fs24 \cf5 \
-\fs50 \cf2 %CHAMELEONSTAGE%\
-\pard\pardeftab1134\ql\qnatural\rtlpar
+\b0\fs30 \cf0 \
-\fs26 \cf0 \
-\pard\pardeftab1134\qc\rtlpar
-
-\fs50 \cf3 \uc0\u1492 \u1492 \u1514 \u1511 \u1504 \u1492 \u1492 \u1505 \u1514 \u1497 \u1497 \u1502 \u1492 !\
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\ql\qnatural\rtlpar
-
-\b0\fs18 \cf0 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\ql\qnatural\rtlpar
-{\field{\*\fldinst{HYPERLINK "http://chameleon.osx86.hu/"}}{\fldrslt
-\f1\fs24 \cf4 \ul \ulc0 http://chameleon.osx86.hu}}
-\f1\fs24 /\
-\pard\pardeftab1134\ql\qnatural\rtlpar
-{\field{\*\fldinst{HYPERLINK "http://forum.voodooprojects.org/index.php"}}{\fldrslt
-\f0 \cf4 \ul \ulc0 http://forum.voodooprojects.org/index.php}}\
-\pard\pardeftab1134\ri0\qr
-
-\f0\b \cf5 \
-\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab1134\ql\qnatural\rtlpar
-
-\b0\fs26 \cf0 Copyright \'a9 2010
-\fs30 \
-}
\ No newline at end of file
+\fs20 Copyright \'a9 2011}
\ No newline at end of file
Index: trunk/package/Resources/id.lproj/Description.html
===================================================================
--- trunk/package/Resources/id.lproj/Description.html (revision 1676)
+++ trunk/package/Resources/id.lproj/Description.html (revision 1677)
@@ -5,30 +5,41 @@
-
+
-Chameleon adalah kombinasi dari berbagai macam komponen boot loader.
-Berbasiskan implementasi EFI palsu oleh David Elliott yang ditambahkan pada proyek Appleβs Boot-132.
-Chameleon dipercanggih dengan fitur-fitur berikut:
+Chameleon is a boot loader built using a combination of components which evolved from the development of David Elliott's fake EFI implementation added to Apple's boot-132 project.
-Fitur terbaru di Chameleon 2.0
+Chameleon v2 is extended with many features. For example:
-- GUI yang dapat diubah-suaikan dengan bebas untuk mewarnai Bootloader Darwin.
-- Jalankan DVD retail secara langsung dengan memuat sebuah image ramdisk tanpa bantuan program lain.
-- Hibernasi. Nikmati melanjutkan pekerjaan pada Mac OS X anda dengan βpratinjau imageβ.
-- SMBIOS override unutk memodifikasi SMBIOS bawaan.
-- DSDT override unutk menggunakan modifikasi tertentu dari DSDT yang dapat menyelesaikan isu-isu tertentu.
-- Device Property Injection melalui string device-properties.
-- hybrid boot0 / boot1h for MBR dan Media partisi GPT.
-- Pendeteksian kode FSB Secara otomatis walaupun pada PC AMD.
-- Dukungan Apple Software RAID.
+- Fully customizable GUI to bring some color to the Darwin Bootloader.
+- Load a ramdisk to directly boot retail DVDs without additional programs.
+- Hibernation. Enjoy resuming your Mac OS X with a preview image.
+- SMBIOS override to modify the factory SMBIOS values.
+- DSDT override to use a modified fixed DSDT which can solve several issues.
+- Device Property Injection via device-properties string.
+- hybrid boot0 / boot1h for MBR and GPT partitioned disks.
+- Automatic FSB detection code even for recent AMD CPUs.
+- Apple Software RAID support.
+- Nvidia & ATI/AMD Graphics Card Enabler.
+- Module support
+- Memory detection adapted from memtest86: http://www.memtest.org
+- Automatic P-State & C-State generation for native power management.
+- Message logging.
+
+
+The code is released under version 2 of the Gnu Public License.
+http://forge.voodooprojects.org/p/chameleon
-Untuk informasi lebih lanjut, kunjungi: http://chameleon.osx86.hu
+FAQ's: http://forum.voodooprojects.org/index.php/topic,754.0.html