From: David-John Willis Date: Mon, 30 Nov 2009 10:40:29 +0000 (+0000) Subject: pandora-first-run-wizard: Add optional touchscreen calibration. X-Git-Tag: Release-2010-05/1~154 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=openpandora.oe.git;a=commitdiff_plain;h=13dfd81b92008d4edcc372ef236431fea1e0757b pandora-first-run-wizard: Add optional touchscreen calibration. --- diff --git a/recipes/pandora-system/pandora-first-run-wizard.bb b/recipes/pandora-system/pandora-first-run-wizard.bb index 742cfc3..b244c7b 100755 --- a/recipes/pandora-system/pandora-first-run-wizard.bb +++ b/recipes/pandora-system/pandora-first-run-wizard.bb @@ -2,17 +2,16 @@ DESCRIPTION = "Scripts to support the first run wizard on the OpenPandora." LICENSE = "GPLV2" DEPENDS = "hsetroot zenity dbus" -RDEPENDS = "hsetroot zenity dbus" +RDEPENDS = "hsetroot zenity dbus pandora-wallpaper-official tslib" COMPATIBLE_MACHINE = "omap3-pandora" -PR = "r5" +PR = "r7" SRC_URI = " \ file://first-run-wizard.sh \ file://op_startup.sh \ - file://rc.firstrun \ - file://op_default.png \ + file://rc.firstrun \ " inherit update-rc.d @@ -27,9 +26,6 @@ do_install() { install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/rc.firstrun ${D}${sysconfdir}/init.d/oprun-init - - install -d ${D}${datadir}/backgrounds/ - install -m 0666 ${WORKDIR}/op_default.png ${D}${datadir}/backgrounds/ } PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh b/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh index 161511e..0830fa2 100644 --- a/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh +++ b/recipes/pandora-system/pandora-first-run-wizard/first-run-wizard.sh @@ -14,11 +14,19 @@ export GTK2_RC_FILES=/usr/share/themes/Xfce/gtk-2.0/gtkrc groupadd wheel # We load up a background image here -export WALLPAPER=/usr/share/backgrounds/op_default.png +export WALLPAPER=/usr/share/xfce4/backdrops/op-firstrun.png hsetroot -center $WALLPAPER # Greet the user -zenity --info --title="Pandoras Box has been opened." --text "Welcome. This wizard will help you setting up your new OpenPandora handheld before your first use." +zenity --info --title="Pandoras Box has been opened." --text "Welcome. This wizard will help you setting up your new OpenPandora handheld before the first use." + +# Calibrate touchscreen? +if zenity --question --title="Touchscreen calibration" --text="It is recommended to calibrate the devices touchscreen./nDo you wish to calibrate your touchscreen now?" --ok-label="Calibrate" --cancel-label="Do not calibrate"; then + # Make sure we have a sane environment as this script will be run long before any /etc/profile stuff. + . /etc/profile.d/tslib.sh + # rm /etc/pointercal + /usr/bin/ts_calibrate +fi # Should we really enable SWAP? #swap_part=$(sfdisk -l /dev/mmcblk? | grep swap | cut -d" " -f1) @@ -50,6 +58,8 @@ username consists of only letters and numbers." --entry-text "$username") done +sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf + # Password setup. password="" @@ -91,7 +101,6 @@ hostname -F /etc/hostname if zenity --question --title="Autologin" --text="Do you want to automatically login on startup?\n\nSecurity warning: This skips the password check on startup" --ok-label="Yes, enable Autologin" --cancel-label="Do not enable Autologin"; then # echo "PREFERED_USER=$username" > /etc/default/autologin - sed -i "s/.*default_user.*/default_user $username/g" /etc/slim.conf sed -i 's/.*auto_login.*/auto_login yes/g' /etc/slim.conf else sed -i 's/.*auto_login.*/auto_login no/g' /etc/slim.conf @@ -99,8 +108,7 @@ fi # Setup which GUI will run as default. At the moment, it just creates a small file and puts Xfce or PMenu into it :) -if zenity --question --title="Default Inteface" --text="Now you can choose whether you want to boot into a full desktop interface or a gaming console-like launcher by default.\n\nYou can always change this setting later." --ok-label="Full Desktop (Xfce)" --cancel-label="Gaming -console-like Launcher"; then +if zenity --question --title="Default Inteface" --text="Now you can choose whether you want to boot into a full desktop interface or a gaming console-like launcher by default.\n\nYou can always change this setting later." --ok-label="Full Desktop (Xfce)" --cancel-label="Games console like Launcher (PMenu)"; then echo Xfce > /etc/bootup.cfg else echo PMenu > /etc/bootup.cfg diff --git a/recipes/pandora-system/pandora-first-run-wizard/op_default.png b/recipes/pandora-system/pandora-first-run-wizard/op_default.png deleted file mode 100644 index 24995cd..0000000 Binary files a/recipes/pandora-system/pandora-first-run-wizard/op_default.png and /dev/null differ