summaryrefslogtreecommitdiffstats
path: root/fbreader/moto
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-05-11 21:28:48 +0900
committerMichele Calgaro <[email protected]>2024-05-11 21:28:48 +0900
commit2462d03f322261bd616721c2b2065c4004b36c9c (patch)
tree239947a0737bb8386703a1497f12c09aebd3080a /fbreader/moto
downloadtde-ebook-reader-2462d03f322261bd616721c2b2065c4004b36c9c.tar.gz
tde-ebook-reader-2462d03f322261bd616721c2b2065c4004b36c9c.zip
Initial import (as is) from Debian Snapshot's 'fbreader' source code (https://snapshot.debian.org/package/fbreader/0.99.4%2Bdfsg-6).
The Debian code is provided under GPL2 license. Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'fbreader/moto')
-rw-r--r--fbreader/moto/FBReader.desktop13
-rwxr-xr-xfbreader/moto/FBReader.sh8
-rw-r--r--fbreader/moto/Makefile17
-rw-r--r--fbreader/moto/util/Makefile11
-rwxr-xr-xfbreader/moto/util/language_detectorbin0 -> 6572 bytes
-rw-r--r--fbreader/moto/util/language_detector.cpp33
6 files changed, 82 insertions, 0 deletions
diff --git a/fbreader/moto/FBReader.desktop b/fbreader/moto/FBReader.desktop
new file mode 100644
index 0000000..8efce3a
--- /dev/null
+++ b/fbreader/moto/FBReader.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Comment=E-book reader
+Exec=bin/FBReader.sh
+BigIcon=pics/FBReader-b.png
+Icon=pics/FBReader-s.png
+Version=0.8.11
+Type=Application
+Name=FBReader
+Category=Office
+Description=E-book reader
+Vendor=Geometer Plus
+Version=0.8.13
+Shared=2
diff --git a/fbreader/moto/FBReader.sh b/fbreader/moto/FBReader.sh
new file mode 100755
index 0000000..5194b13
--- /dev/null
+++ b/fbreader/moto/FBReader.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+this=`basename $0`
+this=`echo $0 | sed -e 's/\/'$this'$//'`
+cd $this/..
+. /home/native/.profile
+export HOME=`pwd`
+export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
+exec bin/FBReader -lang `bin/language_detector` $2
diff --git a/fbreader/moto/Makefile b/fbreader/moto/Makefile
new file mode 100644
index 0000000..38dd061
--- /dev/null
+++ b/fbreader/moto/Makefile
@@ -0,0 +1,17 @@
+ROOTDIR = $(CURDIR)/../..
+include $(ROOTDIR)/makefiles/config.mk
+
+install:
+ @install -m 0644 ../data/default/config.$(TARGET_ARCH).xml $(DESTDIR)$(SHAREDIR)/FBReader/default/config.xml
+ @install -m 0644 ../data/default/keymap.$(TARGET_ARCH).xml $(DESTDIR)$(SHAREDIR)/FBReader/default/keymap.xml
+ @install -m 0644 ../data/default/styles.$(TARGET_ARCH).xml $(DESTDIR)$(SHAREDIR)/FBReader/default/styles.xml
+ @install -d $(DESTDIR)$(INSTALLDIR)/pics
+ @install -d $(DESTDIR)$(INSTALLDIR)/.FBReader
+ @install -m 0644 ../data/icons/application/32x24.png $(DESTDIR)$(INSTALLDIR)/pics/FBReader-s.png
+ @install -m 0644 ../data/icons/application/64x43.png $(DESTDIR)$(INSTALLDIR)/pics/FBReader-b.png
+ @install -m 0644 ../data/icons/application/48x48.png $(DESTDIR)$(INSTALLDIR)/pics/FBReader.png
+ @install -m 0644 FBReader.desktop $(DESTDIR)$(INSTALLDIR)/FBReader.desktop
+ @install FBReader.sh $(DESTDIR)$(BINDIR)
+ @install util/language_detector $(DESTDIR)$(BINDIR)
+
+clean:
diff --git a/fbreader/moto/util/Makefile b/fbreader/moto/util/Makefile
new file mode 100644
index 0000000..e65d888
--- /dev/null
+++ b/fbreader/moto/util/Makefile
@@ -0,0 +1,11 @@
+ROOTDIR = ../../..
+
+TARGET = language_detector
+
+include $(ROOTDIR)/makefiles/qsubdir.mk
+
+$(TARGET): language_detector.o
+ @$(LD) $(LDFLAGS) -o $@ $^ $(UILIBS)
+
+distclean: clean
+ @$(RM) $(TARGET)
diff --git a/fbreader/moto/util/language_detector b/fbreader/moto/util/language_detector
new file mode 100755
index 0000000..4f3101a
--- /dev/null
+++ b/fbreader/moto/util/language_detector
Binary files differ
diff --git a/fbreader/moto/util/language_detector.cpp b/fbreader/moto/util/language_detector.cpp
new file mode 100644
index 0000000..c21ce5c
--- /dev/null
+++ b/fbreader/moto/util/language_detector.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2004-2012 Geometer Plus <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#include <iostream>
+#include <string>
+
+#include <zlanguage.h>
+
+int main() {
+ std::string language = (const char*)ZLanguage::getSystemLanguageCode().utf8();
+ language.erase(2);
+ if (language.length() != 2) {
+ language = "en";
+ }
+ std::cout << language;
+ return 0;
+}