2015-01-11 15:03:59 +08:00
2014-12-25 18:50:51 +08:00
2015-01-11 15:03:59 +08:00
2014-11-29 14:13:27 +08:00
2015-01-03 03:52:27 +08:00
2014-08-25 16:09:39 +08:00
-j4
2014-11-28 19:49:07 +08:00
2015-01-11 15:03:59 +08:00
2014-10-21 16:26:56 +08:00
2014-12-27 13:14:24 +08:00
2014-05-23 18:43:48 +08:00
2014-05-23 18:43:48 +08:00
2014-11-29 14:13:27 +08:00
2014-12-02 20:14:46 +08:00
2014-11-15 19:26:19 +08:00
2015-01-11 15:03:59 +08:00

EhViewer

这是一个 Android 平台上的 E-Hentai 阅读应用。访问 EhViewer 网站以获取更多信息。
EhViewer is an E-Hentai Application for Android. Visit EhViewer(Chinese Only) website for more information.

Build

本项目使用 Eclipse + ADT 作为开发环境,如果你不清楚如何配置,请自行搜索。clone 之后直接导入 Eclipse 即可编译。我没试过将其迁至 Android Studio,如果你喜欢使用 Android Studio,你需要自己研究下,项目中有 NDK 部分,迁移时要注意。
目前 Android NDK (r10d) 只对 x86 使用 yasm,而 x86_64 没有启用 yasm,但是 libjpeg-turbo 使用了汇编代码。如果要编译 x86_64 的 jni 部分需要对 Android NDK 中的脚本进行修改。
Just import into Eclipse and build. Do it youself if you prefer Android Studio.

##针对 x86_64 yasm 所做的修改 build/core/build-binary.mk
将(注意第三行)

# all_source_patterns contains the list of filename patterns that correspond
# to source files recognized by our build system
ifeq ($(TARGET_ARCH_ABI),x86)
all_source_extensions := .c .s .S .asm $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION)
else
all_source_extensions := .c .s .S $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION)
endif
all_source_patterns   := $(foreach _ext,$(all_source_extensions),%$(_ext))
all_cpp_patterns      := $(foreach _ext,$(LOCAL_CPP_EXTENSION),%$(_ext))
all_rs_patterns       := $(foreach _ext,$(LOCAL_RS_EXTENSION),%$(_ext))

改为

# all_source_patterns contains the list of filename patterns that correspond
# to source files recognized by our build system
ifeq ($(TARGET_ARCH_ABI),$(filter $(TARGET_ARCH_ABI), x86 x86_64))
all_source_extensions := .c .s .S .asm $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION)
else
all_source_extensions := .c .s .S $(LOCAL_CPP_EXTENSION) $(LOCAL_RS_EXTENSION)
endif
all_source_patterns   := $(foreach _ext,$(all_source_extensions),%$(_ext))
all_cpp_patterns      := $(foreach _ext,$(LOCAL_CPP_EXTENSION),%$(_ext))
all_rs_patterns       := $(foreach _ext,$(LOCAL_RS_EXTENSION),%$(_ext))

然后在

ifeq ($(TARGET_ARCH_ABI),x86)
$(foreach src,$(filter %.asm,$(LOCAL_SRC_FILES)), $(call compile-asm-source,$(src),$(call get-object-name,$(src))))
endif

的下方添加

ifeq ($(TARGET_ARCH_ABI),x86_64)
$(foreach src,$(filter %.asm,$(LOCAL_SRC_FILES)), $(call compile-asm-64-source,$(src),$(call get-object-name,$(src))))
endif

build/core/definitions.mk
添加

# -----------------------------------------------------------------------------
# Template  : ev-compile-asm-64-source
# Arguments : 1: single ASM source file name (relative to LOCAL_PATH)
#             2: target object file (without path)
# Returns   : None
# Usage     : $(eval $(call ev-compile-asm-64-source,<srcfile>,<objfile>)
# Rationale : Internal template evaluated by compile-asm-64-source
# -----------------------------------------------------------------------------
define  ev-compile-asm-64-source
_SRC:=$$(call local-source-file-path,$(1))
_OBJ:=$$(LOCAL_OBJS_DIR:%/=%)/$(2)

_FLAGS := $$(call host-c-includes,$$(LOCAL_C_INCLUDES) $$(LOCAL_PATH)) \
          $$(LOCAL_ASMFLAGS) \
          $$(NDK_APP_ASMFLAGS) \
          $$(call host-c-includes,$$($(my)C_INCLUDES)) \
          -f elf64 -m amd64 -DELF -D__x86_64__ -DPIC

_TEXT := Assemble $$(call get-src-file-text,$1)
_CC   := $$(NDK_CCACHE) $$(TARGET_ASM)

$$(_OBJ): PRIVATE_ABI      := $$(TARGET_ARCH_ABI)
$$(_OBJ): PRIVATE_SRC      := $$(_SRC)
$$(_OBJ): PRIVATE_OBJ      := $$(_OBJ)
$$(_OBJ): PRIVATE_MODULE   := $$(LOCAL_MODULE)
$$(_OBJ): PRIVATE_TEXT     := $$(_TEXT)
$$(_OBJ): PRIVATE_CC       := $$(_CC)
$$(_OBJ): PRIVATE_CFLAGS   := $$(_FLAGS)

ifeq ($$(LOCAL_SHORT_COMMANDS),true)
_OPTIONS_LISTFILE := $$(_OBJ).cflags
$$(_OBJ): $$(call generate-list-file,$$(_FLAGS),$$(_OPTIONS_LISTFILE))
$$(_OBJ): PRIVATE_CFLAGS := @$$(call host-path,$$(_OPTIONS_LISTFILE))
$$(_OBJ): $$(_OPTIONS_LISTFILE)
endif

$$(call generate-file-dir,$$(_OBJ))
$$(_OBJ): $$(_SRC) $$(LOCAL_MAKEFILE) $$(NDK_APP_APPLICATION_MK) $$(NDK_DEPENDENCIES_CONVERTER) $(LOCAL_RS_OBJECTS)
    $$(call host-echo-build-step,$$(PRIVATE_ABI),$$(PRIVATE_TEXT)) "$$(PRIVATE_MODULE) <= $$(notdir $$(PRIVATE_SRC))"
    $$(hide) $$(PRIVATE_CC) $$(PRIVATE_CFLAGS) $$(call host-path,$$(PRIVATE_SRC)) -o $$(call host-path,$$(PRIVATE_OBJ))
endef

# -----------------------------------------------------------------------------
# Function  : compile-asm-64-source
# Arguments : 1: single Assembly source file name (relative to LOCAL_PATH)
#             2: object file
# Returns   : None
# Usage     : $(call compile-asm-64-source,<srcfile>,<objfile>)
# Rationale : Setup everything required to build a single Assembly source file
# -----------------------------------------------------------------------------
compile-asm-64-source = $(eval $(call ev-compile-asm-64-source,$1,$2))

Thanks

License

本项目内容采用 Apache License 2.0 授权, 部分文件采用 Creative Commons Attribution 3.0 Unported License 授权(列表), 部分文件采用 SIL Open Font License, 1.1 授权(列表)。
The content of this project itself is licensed under the Apache License 2.0, some files are licensed under the Creative Commons Attribution 3.0 Unported License (list), some files are licensed under the SIL Open Font License, 1.1 (list).

S
Description
No description provided
Readme GPL-3.0
160 MiB
0 Stars 1 Watchers 0 Forks
Languages
Kotlin 92.9%
Rust 4.7%
C 1.7%
CMake 0.4%
HTML 0.3%