summaryrefslogtreecommitdiffstats
path: root/fbreader/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'fbreader/scripts')
-rwxr-xr-xfbreader/scripts/install_config.sh33
-rwxr-xr-xfbreader/scripts/install_help.sh34
-rwxr-xr-xfbreader/scripts/install_toolbar_and_menu.sh67
3 files changed, 134 insertions, 0 deletions
diff --git a/fbreader/scripts/install_config.sh b/fbreader/scripts/install_config.sh
new file mode 100755
index 0000000..902ee0d
--- /dev/null
+++ b/fbreader/scripts/install_config.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+if [ $# != 3 ]; then
+ echo -e "usage\n $0 <platform> <ui_type> <install_dir>";
+ exit 0;
+fi;
+
+case "$1" in
+ desktop|win32)
+ ;;
+ macosx)
+ ;;
+ maemo)
+ case "$2" in
+ maemo5)
+ config_file=data/default/config.maemo5.xml
+ ;;
+ *)
+ config_file=data/default/config.maemo.xml
+ ;;
+ esac;
+ ;;
+ pepperpad3)
+ ;;
+ zaurus_640x480)
+ ;;
+ *)
+ ;;
+esac;
+
+if [ "$config_file" != "" ]; then
+ install -m 0644 $config_file $3/config.xml;
+fi;
diff --git a/fbreader/scripts/install_help.sh b/fbreader/scripts/install_help.sh
new file mode 100755
index 0000000..00fdf3e
--- /dev/null
+++ b/fbreader/scripts/install_help.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+if [ $# != 2 ]; then
+ echo -e "usage\n $0 <platform> <install_dir>";
+ exit 0;
+fi;
+
+case "$1" in
+ desktop|openzaurus_640x480|pdaxrom|pepperpad3|zaurus_640x480|macosx)
+ platform=desktop;
+ ;;
+ maemo)
+ platform=maemo;
+ ;;
+ opensimpad-0.9.0|qvfb)
+ platform=640x480;
+ ;;
+ openzaurus_240x320|pma400|zaurus_240x320|moto)
+ platform=240x320;
+ ;;
+ win32)
+ platform=win32;
+ ;;
+ *)
+ echo "$0: unknown platform \"$1\"";
+ exit 0;
+ ;;
+esac;
+installdir=$2;
+
+for file in data/help/MiniHelp.$platform.*.fb2; do
+ lang=`echo $file | cut -d . -f 3`;
+ install -m 0644 $file $installdir/MiniHelp.$lang.fb2
+done
diff --git a/fbreader/scripts/install_toolbar_and_menu.sh b/fbreader/scripts/install_toolbar_and_menu.sh
new file mode 100755
index 0000000..e2ea909
--- /dev/null
+++ b/fbreader/scripts/install_toolbar_and_menu.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+if [ $# != 3 ]; then
+ echo -e "usage\n $0 <platform> <ui_type> <install_dir>";
+ exit 0;
+fi;
+
+case "$1" in
+ desktop|win32)
+ toolbar_file=data/default/toolbar.desktop.xml
+ fullscreen_toolbar_file=data/default/fullscreen_toolbar.desktop.xml
+ ;;
+ macosx)
+ toolbar_file=data/default/toolbar.macosx.xml
+ ;;
+ maemo)
+ case "$2" in
+ maemo5)
+ ;;
+ *)
+ toolbar_file=data/default/toolbar.maemo.xml
+ ;;
+ esac;
+ ;;
+ pepperpad3)
+ toolbar_file=data/default/toolbar.full.xml
+ ;;
+ zaurus_640x480)
+ toolbar_file=data/default/toolbar.zaurus.xml
+ ;;
+ *)
+ toolbar_file=data/default/toolbar.short.xml
+ ;;
+esac;
+
+case "$1" in
+ zaurus_640x480|zaurus_240x320|pma400)
+ menubar_file=data/default/menubar.xml
+ ;;
+ maemo)
+ case "$2" in
+ maemo5)
+ menubar_file=data/default/menubar.maemo5.xml
+ ;;
+ *)
+ menubar_file=data/default/menubar.xml
+ ;;
+ esac;
+ ;;
+ moto)
+ menubar_file=data/default/menubar.moto.xml
+ ;;
+ *)
+ ;;
+esac;
+
+if [ "$toolbar_file" != "" ]; then
+ install -m 0644 $toolbar_file $3/toolbar.xml;
+fi;
+
+if [ "$fullscreen_toolbar_file" != "" ]; then
+ install -m 0644 $fullscreen_toolbar_file $3/fullscreen_toolbar.xml;
+fi;
+
+if [ "$menubar_file" != "" ]; then
+ install -m 0644 $menubar_file $3/menubar.xml;
+fi;