Ticket #45: 64bit-detection.diff
| File 64bit-detection.diff, 4.4 kB (added by taj, 1 year ago) |
|---|
-
makepackage
old new 873 873 installer=`substituteCode "$autopackage_share/apkg-bashlib" "START LAUNCHINTERMINAL" "END LAUNCHINTERMINAL" "$installer" "%LaunchInTerminal%"` 874 874 installer=`substituteCode "$autopackage_share/apkg-bashlib" "START LOCATECOMMAND" "END LOCATECOMMAND" "$installer" "%LocateCommand%"` 875 875 installer=`substituteCode "$autopackage_share/apkg-bashlib" "START MESSAGE" "END MESSAGE" "$installer" "%Message%"` 876 installer=`substituteCode "$autopackage_share/apkg-bashlib" "START ERRORMESSAGE" "END ERRORMESSAGE" "$installer" "%ErrorMessage%"` 876 877 877 878 downloader=`substituteCode "$autopackage_share/apkg-funclib" "START INSTALLAUTOPACKAGE" "END INSTALLAUTOPACKAGE" "$downloader" "%InstallAutopackage%"` 878 879 downloader=`substituteCode "$autopackage_share/apkg-bashlib" "START YESNO" "END YESNO" "$downloader" "%YesNo%"` -
share/apkg-bashlib
old new 968 968 } 969 969 ## END MESSAGE 970 970 971 # Usage: errorMessage <MESSAGE> <TITLE> 972 ## START ERRORMESSAGE 973 ## Function is substituted from apkg-bashlib. 974 ## This function is PRIVATE until 1.3 (because it's new). 975 function errorMessage() { 976 if ! tty -s; then 977 # there is no tty 978 if [[ "$DISPLAY" == "" ]] || ! xdpyinfo &>/dev/null; then # check for X 979 # we're not in X, so just echo (we might be in a headless script) 980 echo "$1" 981 else 982 # we ARE in X, and there is no TTY; started from a gui file manager 983 if command -v zenity &>/dev/null; then 984 zenity --error "--text=$1" "--title=$2" 985 elif command -v gdialog &>/dev/null; then 986 gdialog --msgbox "$1" 100 100 987 elif command -v kdialog &>/dev/null; then 988 kdialog --error "$1" --title "$2" 989 elif command -v xmessage &>/dev/null; then 990 xmessage "$1" 991 else 992 local DIALOG= 993 DIALOG=`command -v dialog 2>/dev/null` || DIALOG=`command -v gdialog 2>/dev/null` || DIALOG=`command -v whiptail 2>/dev/null` 994 if [[ "$DIALOG" != "" ]]; then 995 # No graphical dialog; fallback to terminal showing a dialog 996 launchInTerminal --title "$2" $DIALOG --msgbox "$1" 17 65 997 else 998 local msg=`escapeFilename "$1"` 999 launchInTerminal --title "$2" bash -c "echo $msg; read" 1000 fi 1001 fi 1002 fi 1003 else 1004 # else there is a tty, ie we're in an xterm or the standard console 1005 # so just use echo 1006 echo "$1" 1007 fi 1008 } 1009 ## END ERRORMESSAGE 971 1010 1011 972 1012 ## 973 1013 # haveWriteAccess <DIRECTORY> 974 1014 # DIRECTORY: The directory name. -
share/installer.2.template
old new 22 22 23 23 %Message% 24 24 25 %ErrorMessage% 26 27 # are we on 32bit (or 64bit + compat libs?) 28 locateCommand uname 29 cpu_architecture=`"$lc_location" -m` 30 case "$cpu_architecture" in 31 i386 | i486 | i586 | i686 ) 32 export cpu_architecture="x86";; 33 esac 34 35 if [[ "$cpu_architecture" != "x86" ]]; then 36 if [ ! -d /usr/lib32 ]; then 37 errorMessage "Sorry, Autopackage only supports x86 32-bit systems, or 64-bit systems with compatibility libraries installed. Please install the compatibility libraries and rerun install." "Error Installing Autopackage" 38 rm -rf "$WORKING_DIRECTORY" 39 exit 1 40 fi 41 fi 42 25 43 # setup XDG configuration variables scoped for autopackage 26 44 # 27 45 # AUTOPACKAGE_CONFIG_HOME User configuration directory -
share/installer.template
old new 22 22 23 23 %Message% 24 24 25 %ErrorMessage% 26 27 # are we on 32bit (or 64bit + compat libs?) 28 locateCommand uname 29 cpu_architecture=`"$lc_location" -m` 30 case "$cpu_architecture" in 31 i386 | i486 | i586 | i686 ) 32 export cpu_architecture="x86";; 33 esac 34 35 if [[ "$cpu_architecture" != "x86" ]]; then 36 if [ ! -d /usr/lib32 ]; then 37 errorMessage "Sorry, Autopackage only supports x86 32-bit systems, or 64-bit systems with compatibility libraries installed. Please install the compatibility libraries and rerun install." "Error Installing Autopackage" 38 rm -rf "$WORKING_DIRECTORY" 39 exit 1 40 fi 41 fi 42 25 43 # setup XDG configuration variables scoped for autopackage 26 44 # 27 45 # AUTOPACKAGE_CONFIG_HOME User configuration directory
