#!/bin/sh

if [ -x /usr/bin/update-desktop-database ]; then
  update-desktop-database /usr/share/applications
fi

if [ -x /usr/bin/gtk-update-icon-cache ]; then
  gtk-update-icon-cache -f /usr/share/icons/hicolor
fi

if [ -x /usr/bin/maemo-select-menu-location ]; then
  maemo-select-menu-location x48.desktop
fi

test -x /usr/bin/maemo-confirm-text || exit 0

cat <<EOF > /tmp/need-rom.txt
This is an emulator of the HP 48 SX and GX calculators.
You will need a ROM dump to use it; these can be found at
http://www.hpcalc.org or extracted from a real HP 48
calculator using dump2rom (part of this package) and
ROMDump (a calculator program included with the source
package).  This version displays in landscape mode.

Use this commands for working ROM:
Go to http://www.hpcalc.org/hp48/pc/emulators/ ;
Get "HP 48GX Revision R ROM"
Unzip it, and send to your tablet;
On X terminal, type this commands
mkdir ~/.hp48
cp path/to/your/gxrom-r ~/.hp48/rom.dump
 
Now load your x48 emulator, next you can delete 
rom.dump, on X Terminal typing:
rm ~/.hp48/rom.dump
EOF

maemo-confirm-text "ROM required for use" /tmp/need-rom.txt

rm -f /tmp/need-rom.txt

exit 0
