Skip to content

Commit

Permalink
First import of ruBooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ME committed Aug 28, 2008
0 parents commit 9b00615
Show file tree
Hide file tree
Showing 119 changed files with 17,720 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Info.plist.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>ruBooks</string>
<key>CFBundleIdentifier</key>
<string>info.colel.rubooks</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>__VERSION__</string>
</dict>
</plist>
339 changes: 339 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

182 changes: 182 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
#
# ruBooks.app Makefile
#

CC=arm-apple-darwin9-gcc
CFLAGS=-O3
CPPFLAGS= -maspen-version-min=2.0
LD=$(CC)
LDFLAGS= -maspen-version-min=2.0 \
-lz -lobjc \
-F/toolchain/sys/System/Library/PrivateFrameworks \
-framework CoreFoundation -framework Foundation \
-framework UIKit -framework QuartzCore -framework CoreGraphics \
-framework Celestial -framework CoreFoundation -framework CoreSurface \
-framework GraphicsServices -lcrypto

# -Wl,-syslibroot,
# -lobjc -ObjC



# VERSION=$(shell ./getversion.sh)
VERSION = 0.921.1

SOURCES=$(wildcard source/palm/*.c source/palm/*.m source/*.c source/*.m)
OBJECTS=$(patsubst source/%,obj/%,$(patsubst source/palm/%,obj/%, \
$(patsubst %.c,%.o,$(filter %.c,$(SOURCES))) \
$(patsubst %.m,%.o,$(filter %.m,$(SOURCES))) \
$(patsubst %.cpp,%.o,$(filter %.cpp,$(SOURCES))) \
))

# Override this on the command line for nightly builds.
REPOTAG=colel.info

IMAGES=$(wildcard images/*.*)
CONFIG_FILES=$(wildcard configuration/*.plist);
LOCALIZATION_FILES=localization

ARCHIVE=ruBooks-$(VERSION).zip

BASEURL=http://colel.info/rubooks/
SCP_BASE=www:~/wwwroot/rubooks/
NIGHTLY_PICKUP=/tmp/rubooks-nightly

QUIET=false

ifeq ($(QUIET),true)
QC = @echo "Compiling [$@]";
QD = @echo "Computing dependencies [$@]";
QL = @echo "Linking [$@]";
QN = > /dev/null 2>&1
else
QC =
QD =
QL =
QN =
endif

all: ruBooks


# pull in dependency info for *existing* .o files
# this needs to be done after the default target is defined (to avoid defining a meaningless default target)
-include $(OBJECTS:.o=.d)

test:
echo $(OBJECTS)

bundle: ruBooks.app

ruBooks: obj/ruBooks

obj/ruBooks: $(OBJECTS) lib/libjpeg.a
$(QL)$(LD) $(LDFLAGS) -v -o $@ $^ $(QN)

# more complicated dependency computation, so all prereqs listed
# will also become command-less, prereq-less targets
# sed: put the real target (obj/*.o) in the dependency file
# sed: strip the target (everything before colon)
# sed: remove any continuation backslashes
# fmt -1: list words one per line
# sed: strip leading spaces
# sed: add trailing colons
obj/%.o: source/%.m
@mkdir -p obj
$(QC)$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
$(QD)$(CC) -MM -c $(CFLAGS) $(CPPFLAGS) $< > obj/$*.d
@cp -f obj/$*.d obj/$*.d.tmp
@sed -e 's|.*:|obj/$*.o:|' < obj/$*.d.tmp > obj/$*.d
@sed -e 's/.*://' -e 's/\\$$//' < obj/$*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> obj/$*.d
@rm -f obj/$*.d.tmp

obj/%.o: source/%.c
@mkdir -p obj
$(QC)$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
$(QD)$(CC) -MM -c $(CFLAGS) $(CPPFLAGS) $< > obj/$*.d
@cp -f obj/$*.d obj/$*.d.tmp
@sed -e 's|.*:|obj/$*.o:|' < obj/$*.d.tmp > obj/$*.d
@sed -e 's/.*://' -e 's/\\$$//' < obj/$*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> obj/$*.d
@rm -f obj/$*.d.tmp

obj/%.o: source/palm/%.m
@mkdir -p obj
$(QC)$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
$(QD)$(CC) -MM -c $(CFLAGS) $(CPPFLAGS) $< > obj/$*.d
@cp -f obj/$*.d obj/$*.d.tmp
@sed -e 's|.*:|obj/$*.o:|' < obj/$*.d.tmp > obj/$*.d
@sed -e 's/.*://' -e 's/\\$$//' < obj/$*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> obj/$*.d
@rm -f obj/$*.d.tmp

obj/%.o: source/palm/%.c
@mkdir -p obj
$(QC)$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
$(QD)$(CC) -MM -c $(CFLAGS) $(CPPFLAGS) $< > obj/$*.d
@cp -f obj/$*.d obj/$*.d.tmp
@sed -e 's|.*:|obj/$*.o:|' < obj/$*.d.tmp > obj/$*.d
@sed -e 's/.*://' -e 's/\\$$//' < obj/$*.d.tmp | fmt -1 | \
sed -e 's/^ *//' -e 's/$$/:/' >> obj/$*.d
@rm -f obj/$*.d.tmp

clean:
rm -rf obj ruBooks.app ruBooks-*.tbz ruBooks-*.zip repo.xml repo.xml.gz

obj/Info.plist: Info.plist.tmpl
@echo "Building Info.plist for version $(VERSION)."
@sed -e 's|__VERSION__|$(VERSION)|g' < $< > $@

repo.xml: repo.xml.tmpl package
sed -e 's|__VERSION__|$(VERSION)|g' \
-e 's|__PKG_SIZE__|$(shell ./filesize.sh $(ARCHIVE))|g' \
-e 's|__RELEASE_DATE__|$(shell date +%s)|g' \
-e 's|__PKG_URL__|$(BASEURL)$(ARCHIVE)|g' \
-e 's|__REPOTAG__| $(REPOTAG)|g' \
-e 's|__MD5__|$(shell ./getMd5.sh $(ARCHIVE))|g' \
-e 's/^[[:space:]]*\(\([[:space:]]*[^[:space:]][^[:space:]]*\)*\)[[:space:]]*$($)/\1/' \
< repo.xml.tmpl > $@
gzip -9 < $@ > $@.gz

ruBooks.app: obj/ruBooks obj/Info.plist $(IMAGES) $(CONFIG_FILES)
@echo "Creating application bundle."
@rm -fr ruBooks.app
@mkdir -p ruBooks.app
@cp $^ ruBooks.app/
@cp -r localization/*.* ruBooks.app/

# @cp -r localization/English.lproj ruBooks.app/
# @cp -r localization/Russian.lproj ruBooks.app/
# @cp -r localization/Chinese.lproj ruBooks.app/
# @cp -r localization/Japanese.lproj ruBooks.app/
# @cp -r localization/German.lproj ruBooks.app/
# @cp -r localization/ko.lproj ruBooks.app/
# @cp -r localization/ru.lproj ruBooks.app/

deploy: obj/ruBooks
scp obj/ruBooks iphone:/Applications/ruBooks.app/
#ssh iphone chmod +x /Applications/ruBooks.app/ruBooks

deploy-app: bundle
scp -r ruBooks.app root@iphone:/Applications/

package: bundle
zip -y -r9 $(ARCHIVE) ruBooks.app

deploy-repo: package repo.xml
scp $(ARCHIVE) $(SCP_BASE)
scp repo.xml $(SCP_BASE)

# The nightly build builds the ZIP and repo XML, then places them both in a known location
# where the build server will find them to deploy to the site.
# The lock file ensure that the deployment job won't try to move files that are half copied.
nightly: package repo.xml
mkdir -p $(NIGHTLY_PICKUP)
touch $(NIGHTLY_PICKUP)/lock-file
cp repo.xml $(NIGHTLY_PICKUP)
cp repo.xml.gz $(NIGHTLY_PICKUP)
cp ruBooks-*.zip $(NIGHTLY_PICKUP)
chmod g+w $(NIGHTLY_PICKUP)/*
rm $(NIGHTLY_PICKUP)/lock-file

1 change: 1 addition & 0 deletions PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPL????
4 changes: 4 additions & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Version file for ruBooks
# The string on the LAST line of this file (as determined by `tail -n 1 VERSION`)
# will be used as the version string in the plist file and archive names.
0.921
8 changes: 8 additions & 0 deletions books_Prefix.pch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Prefix header for all source files of the 'books' target in the 'books' project
//

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#endif
3 changes: 3 additions & 0 deletions filesize.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ls -l $1 | awk '{print $5}'
13 changes: 13 additions & 0 deletions getMd5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
#
# Calculate MD5 of file in first argument and print to stdout.
# This script attempts to use md5 on Mac or md5sum on Linux.

if [ -x /sbin/md5 ] ; then
md5 -q $1
elif [ -x /usr/bin/md5sum ] ; then
md5sum $1 | awk '{print $1}'
else
echo "NoMd5BinaryFound"
exit 1
fi
19 changes: 19 additions & 0 deletions getversion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# sed -n '/<key>CFBundleVersion<\/key>/{n;p;}' < Info.plist | awk -F '>' '{print $2}' | awk -F '<' '{print $1}'


if [ -d .git ] ; then
# This version works in a git-svn environment
SVN_REV=`git-svn log --oneline --limit 1 | cut -d ' ' -f 1`
elif [ -d .svn ] ; then
# This works in pure svn
SVN_REV="r`svn info | awk '/^Revision: [0-9]+$/ {print $2}'`"
else
echo "Can't determine build number with svn or git."
exit 1
fi

VERSION=`tail -n 1 VERSION`

echo "${VERSION}-${SVN_REV}"
Binary file added images/Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/ReadIndicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/UnreadIndicator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/bmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/down_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/down_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/embig_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/embig_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/emsmall_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/emsmall_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/excel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fb2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/gif.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/html.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inv_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inv_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/jpg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/left_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/left_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/png.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/powerpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/prefs_down.png
Binary file added images/prefs_up.png
Binary file added images/right_down.png
Binary file added images/right_up.png
Binary file added images/rotate_down.png
Binary file added images/rotate_up.png
Binary file added images/search_down.png
Binary file added images/search_up.png
Binary file added images/text.png
Binary file added images/tiff.png
Binary file added images/toc_down.png
Binary file added images/toc_up.png
Binary file added images/up_down.png
Binary file added images/up_up.png
Binary file added images/word.png
Binary file added images/zip.png
Binary file added lib/libjpeg.a
Binary file not shown.
Binary file added localization/de.lproj/Localizable.strings
Binary file not shown.
66 changes: 66 additions & 0 deletions localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"window.toc.title" = "Table of Contents";
"window.font.title" = "Font";
"window.font.subtitle" = "Fonts";
"window.encoding.title" = "Text Encoding";
"window.encoding.subtitle" = "Available Encodings";
"window.default_path_reset.title" = "Path Reset";
"window.about.title" = "About ruBooks";
"window.preferences.title" = "Preferences";

"button.back" = "Back";
"button.about" = "About";
"button.done" = "Done";
"button.donate" = "Donate";
"button.ok" = "OK";
"button.mark_folder_as_unread" = "Mark Current Folder as New";
"button.mark_all_as_unread" = "Mark All Books as New";
"button.coming_soon" = "Coming Soon";

"preference.font" = "Font";
"preference.font_size" = "Font Size";
"preference.night_mode" = "Night Mode";
"preference.keep_line_on_scroll" = "Keep Line on Scroll";
"preference.volume_buttons_scroll" = "Volume Buttons Scroll";
"preference.split_automatically" = "Split Automatically";
"preference.auto_scroll_speed" = "Auto-Scroll Speed";
"preference.auto_hide.navigation_bar" = "Navigation Bar";
"preference.auto_hide.toolbar" = "Bottom Toolbar";
"preference.toolbar.chapter_navigation" = "Chapter Navigation";
"preference.toolbar.page_navigation" = "Page Navigation";
"preference.toolbar.left_handed" = "Left Handed";
"preference.toolbar.inverse_navigation" = "Inverse Navigation";
"preference.toolbar.enlarge_tap_zones" = "Enlarge Tap Zones";
"preference.encoding.automatic" = "Automatic";
"preference.encoding" = "Text Encoding";
"preference.import.smart_conversion" = "'Smart' Conversion";
"preference.import.render_html_tables" = "Render HTML Tables";
"preference.import.chapters" = "Chapters";
"preference.scroll_speed.slow" = "Slow";
"preference.scroll_speed.fast" = "Fast";
"preference.scroll_speed.instant" = "Instant";


"preference.section.text_display" = "Text Display";
"preference.section.auto_hide" = "Auto-Hide";
"preference.section.toolbar_options" = "Toolbar Options";
"preference.section.file_import" = "File Import";
"preference.section.scroll_speed" = "Tap-Scroll Speed";
"preference.section.unread_marks" = "New Books";

"message.about" = "ruBooks version %@,\nby Sergey Makarov.\n\n Based on Books.app by Zachary Brewster-Geisz, Chris Born, Benoit Cerrina, and Zachary Bedell.\n\nhttp://colel.info/rubooks";
"message.encoding_not_recognized" = "Could not determine text encoding. Try changing the default encoding in Preferences.";
"message.encoding_incorrent" = "Incorrect text encoding. Try changing the text encoding settings in Preferences.";
"message.failed_unzip" = "Failed to unpack the archive";
"message.default_path_reset" = "The last visited directory was %@.\nCurrent path will be reset to the default one.";
"message.no_chapters_found" = "No Chapters Found";


"not translated text below" = "*************************************************";

"window.colors.title" = "Colors";

"preference.colors" = "Colors";
"preference.colors.section.text_day" = "Text / Day";
"preference.colors.section.background_day" = "Background / Day";
"preference.colors.section.text_night" = "Text / Night";
"preference.colors.section.background_night" = "Background / Night";
Binary file added localization/ja.lproj/Localizable.strings
Binary file not shown.
66 changes: 66 additions & 0 deletions localization/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
"window.toc.title" = "Table of Contents";
"window.font.title" = "글꼴";
"window.font.subtitle" = "글꼴들";
"window.encoding.title" = "문자 인코딩";
"window.encoding.subtitle" = "사용 가능한 인코딩";
"window.default_path_reset.title" = "경로 재설정";
"window.about.title" = "ruBooks에 대하여";
"window.preferences.title" = "선택사항";

"button.back" = "뒤로";
"button.about" = "대하여";
"button.done" = "마침";
"button.donate" = "기부하기";
"button.ok" = "확인";
"button.mark_folder_as_unread" = "현재 폴더를 새 책으로 표기";
"button.mark_all_as_unread" = "모든 책을 새 것으로 표기";
"button.coming_soon" = "Coming Soon";

"preference.font" = "글꼴";
"preference.font_size" = "글꼴 크기";
"preference.night_mode" = "야간 모드";
"preference.keep_line_on_scroll" = "스크롤 시 줄 유지";
"preference.volume_buttons_scroll" = "볼륨 단추 스크롤";
"preference.split_automatically" = "자동적인 분할";
"preference.auto_scroll_speed" = "자동스크롤 속도";
"preference.auto_hide.navigation_bar" = "내비게이션 바";
"preference.auto_hide.toolbar" = "하단 툴바";
"preference.toolbar.chapter_navigation" = "장 내비게이션";
"preference.toolbar.page_navigation" = "쪽 내비게이션";
"preference.toolbar.left_handed" = "왼손 사용자";
"preference.toolbar.inverse_navigation" = "내비게이션을 뒤집기";
"preference.toolbar.enlarge_tap_zones" = "보다큰 탭 영역";
"preference.encoding.automatic" = "Automatic";
"preference.encoding" = "문자 인코딩";
"preference.import.smart_conversion" = "'Smart' 컨버전";
"preference.import.render_html_tables" = "HTML 테이블 구현";
"preference.import.chapters" = "장";
"preference.scroll_speed.slow" = "느리게";
"preference.scroll_speed.fast" = "빠르게";
"preference.scroll_speed.instant" = "즉시";


"preference.section.text_display" = "문자 표시";
"preference.section.auto_hide" = "자동숨김";
"preference.section.toolbar_options" = "툴바 부가항목";
"preference.section.file_import" = "파일 임포트";
"preference.section.scroll_speed" = "탭스크롤 속도";
"preference.section.unread_marks" = "새 책";

"message.about" = "ruBooks version %@,\nby Sergey Makarov.\n\n Based on Books.app by Zachary Brewster-Geisz, Chris Born, Benoit Cerrina, and Zachary Bedell.\n\nhttp://colel.info/rubooks";
"message.encoding_not_recognized" = "문자 인코딩을 찾을 수 없었습니다. 선택사항에서 기본 인코딩을 바꿔보세요.";
"message.encoding_incorrent" = "정확치 않은 문자 인코딩입니다. 선택사항에서 문자 인코딩 설정을 바꿔보세요.";
"message.failed_unzip" = "압축해제 실패";
"message.default_path_reset" = "마지막으로 방문한 경로는 %@입니다.\n해당 경로에서 기본 경로로 재설정합니다.";
"message.no_chapters_found" = "장을 찾을 수 없습니다.";


"not translated text below" = "*************************************************";

"window.colors.title" = "색깔";

"preference.colors" = "색깔";
"preference.colors.section.text_day" = "문자 / 주간";
"preference.colors.section.background_day" = "배경 / 주간";
"preference.colors.section.text_night" = "문자 / 야간";
"preference.colors.section.background_night" = "배경 / 야간";
Binary file added localization/ru.lproj/Localizable.strings
Binary file not shown.
Binary file added localization/zh.lproj/Localizable.strings
Binary file not shown.
Loading

0 comments on commit 9b00615

Please sign in to comment.