Changeset 1041
- Timestamp:
- 04/10/09 14:56:04 (1 year ago)
- Files:
-
- trunk/Release/Commandline-Perian-Install.sh (moved) (moved from trunk/Release/ATV-Perian-Install.sh) (8 diffs)
- trunk/Release/Makefile (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Release/Commandline-Perian-Install.sh
r900 r1041 3 3 # Stupid little Apple TV installer script for the Perian components using the 4 4 # zip files in the distribution preference pane. 5 #6 # Should be wrapped up with the zip files using makeself:7 # makeself --nocrc --nocomp --nox11 ATVComponents Perian-ATV.run Perian ./ATV-Perian-Install.sh8 5 # 9 6 # New for 1.1: $0 [action] [prefix] … … 12 9 # 13 10 # Install/uninstall take a prefix of the root to handle (for such as a patchstick) 11 # 12 # New for 1.2: Added install for Computer 14 13 15 14 SRCDIR="$PWD" … … 17 16 PERIAN_DEST="${PREFIX}/Library/QuickTime" 18 17 A52_DEST="${PREFIX}/Library/Audio/Plug-Ins/Components" 18 FINDER="/System/Library/CoreServices/Finder.app" 19 19 20 20 ACTION=${1:-install} … … 35 35 fi 36 36 37 ATV=0 38 for FILE in "${FINDER}"/Contents/PlugIns/*.frappliance; do 39 if [[ -d $FILE ]]; then 40 ATV=1 41 fi 42 done 43 if (( $ATV == 1 )); then 44 echo "ATV" 45 else 46 echo "Computer" 47 fi 48 37 49 # make sure we're running as root 38 50 if [ "$USER" != "root" ]; then … … 40 52 echo 41 53 echo "Please enter your password below to authorize as root." 42 echo "In most cases, this password is \"frontrow\"." 54 if (( $ATV == 1 )); then 55 echo "In most cases, this password is \"frontrow\"." 56 fi 43 57 sudo "$0" $* 44 58 exit 0 … … 62 76 /bin/rm -rf "$A52_DEST/A52Codec.component" 63 77 64 if [[ -d "${PREFIX}/System/Library/QuickTime (disabled)/QuickTimeH264.component" && ! -d "${PREFIX}/System/Library/QuickTime/QuickTimeH264.component" ]]; then 65 echo 66 echo "You have previously disabled Apple's H.264 component." 67 echo 68 echo -n "Do you wish to restore it? (Y/n)" 69 read -e restoreapple 70 if [[ "$restoreapple" == "" || "$restoreapple" == "Y" || "$restoreapple" == "y" ]]; then 71 mv "${PREFIX}/System/Library/QuickTime (disabled)/QuickTimeH264.component" "${PREFIX}/System/Library/QuickTime" 78 if (( $ATV == 1 )); then 79 if [[ -d "${PREFIX}/System/Library/QuickTime (disabled)/QuickTimeH264.component" && ! -d "${PREFIX}/System/Library/QuickTime/QuickTimeH264.component" ]]; then 80 echo 81 echo "You have previously disabled Apple's H.264 component." 82 echo 83 echo -n "Do you wish to restore it? (Y/n)" 84 read -e restoreapple 85 if [[ "$restoreapple" == "" || "$restoreapple" == "Y" || "$restoreapple" == "y" ]]; then 86 mv "${PREFIX}/System/Library/QuickTime (disabled)/QuickTimeH264.component" "${PREFIX}/System/Library/QuickTime" 87 fi 72 88 fi 73 89 fi … … 85 101 /usr/bin/ditto -k -x --rsrc "$SRCDIR/A52Codec.zip" "$A52_DEST" 86 102 87 # Warn about Apple H.264 if it exists 88 if [ -d "${PREFIX}/System/Library/QuickTime/QuickTimeH264.component" ]; then 89 echo 90 echo "You currently have Apple's H.264 component installed." 91 echo 92 echo "If you wish to play high-profile H.264, you need to disable Apple's decoder to" 93 echo "allow Perian to take over." 94 echo 95 echo -n "Do you wish to do this now? (Y/n) " 96 read -e removeapple 97 if [[ "$removeapple" == "" || "$removeapple" == "Y" || "$removeapple" == "y" ]]; then 98 mkdir -p "${PREFIX}/System/Library/QuickTime (disabled)" 99 mv "${PREFIX}/System/Library/QuickTime/QuickTimeH264.component" "${PREFIX}/System/Library/QuickTime (disabled)" 103 if (( $ATV == 1 )); then 104 # Warn about Apple H.264 if it exists 105 if [ -d "${PREFIX}/System/Library/QuickTime/QuickTimeH264.component" ]; then 106 echo 107 echo "You currently have Apple's H.264 component installed." 108 echo 109 echo "If you wish to play high-profile H.264, you need to disable Apple's decoder to" 110 echo "allow Perian to take over." 111 echo 112 echo "You may use the following command to revert: $0 uninstall ${PREFIX}" 113 echo 114 echo -n "Do you wish to do this now? (Y/n) " 115 read -e removeapple 116 if [[ "$removeapple" == "" || "$removeapple" == "Y" || "$removeapple" == "y" ]]; then 117 mkdir -p "${PREFIX}/System/Library/QuickTime (disabled)" 118 mv "${PREFIX}/System/Library/QuickTime/QuickTimeH264.component" "${PREFIX}/System/Library/QuickTime (disabled)" 119 fi 100 120 fi 101 121 fi … … 103 123 104 124 if [[ "$PREFIX" = "" ]]; then 105 echo "$FINDER must be restarted to complete the installation" 106 echo 107 echo -n "Would you like to do this now? (Y/n) " 108 read -e dorestart 109 if [[ "$dorestart" == "" || "$dorestart" == "y" || "$dorestart" == "Y" ]]; then 110 echo 111 echo "== Restarting $FINDER" 125 if (( $ATV == 1 )); then 126 echo "$FINDER must be restarted to complete the installation" 127 echo 128 echo -n "Would you like to do this now? (Y/n) " 129 read -e dorestart 130 if [[ "$dorestart" == "" || "$dorestart" == "y" || "$dorestart" == "Y" ]]; then 131 echo 132 echo "== Restarting $FINDER" 112 133 113 kill `ps awx | grep "[F]inder" | awk '{print $1}'` 114 fi 134 kill `ps awx | grep "[F]inder" | awk '{print $1}'` 135 open "$FINDER" 136 fi 137 else 138 echo "You should restart any applications using QuickTime" 139 fi 115 140 fi 116 141 trunk/Release/Makefile
r985 r1041 8 8 SRC_DIR=.. 9 9 BUILD_DIR=build 10 ATV_BUILD_DIR=ATVComponents10 COMMAND_BUILD_DIR=CommandLineComponents 11 11 RELEASE_NAME=Perian 12 12 PERIAN_DIR=$(BUILD_DIR)/Perian … … 32 32 release: compile createfolder diskimage 33 33 34 atv: compile34 command: compile 35 35 @# clean build dir 36 rm -rf $( ATV_BUILD_DIR)37 mkdir $( ATV_BUILD_DIR)38 cp $(PERIAN_BUILD_DIR)/Perian.prefPane/Contents/Resources/Components/*.zip $(PERIAN_BUILD_DIR)/Perian.prefPane/Contents/Resources/Components/*/*.zip $( ATV_BUILD_DIR)39 cp ATV-Perian-Install.sh $(ATV_BUILD_DIR)40 makeself --nocrc --nocomp --nox11 ATVComponents Perian-ATV-$(VERSION).sh Perian ./ATV-Perian-Install.sh36 rm -rf $(COMMAND_BUILD_DIR) 37 mkdir $(COMMAND_BUILD_DIR) 38 cp $(PERIAN_BUILD_DIR)/Perian.prefPane/Contents/Resources/Components/*.zip $(PERIAN_BUILD_DIR)/Perian.prefPane/Contents/Resources/Components/*/*.zip $(COMMAND_BUILD_DIR) 39 cp CommandLine-Perian-Install.sh $(COMMAND_BUILD_DIR) 40 makeself --nocrc --nocomp --nox11 $(COMMAND_BUILD_DIR) Perian-CommandLine-$(VERSION).sh Perian ./CommandLine-Perian-Install.sh 41 41 42 42 compile:
