Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e63738542 | ||
|
|
d6823c9c8e | ||
|
|
6bc3866660 | ||
|
|
f41f4dd8ba | ||
|
|
cde39812ce | ||
|
|
03c2abc901 | ||
|
|
7646334525 | ||
|
|
f8d1cd3fab | ||
|
|
4ea94be64a |
No files matched your search
@@ -36,7 +36,6 @@ jobs:
|
||||
uses: softprops/action-gh-release@v0.1.14
|
||||
with:
|
||||
body: Bump Version
|
||||
prerelease: true
|
||||
files: |
|
||||
app/build/outputs/apk/release/app-arm64-v8a-release.apk
|
||||
app/build/outputs/apk/release/app-x86_64-release.apk
|
||||
+2
-2
@@ -38,8 +38,8 @@ android {
|
||||
applicationId "io.github.nekoinverter.ehviewer"
|
||||
minSdkVersion 31
|
||||
targetSdkVersion 32
|
||||
versionCode 114520
|
||||
versionName "1.7.27.0"
|
||||
versionCode 114521
|
||||
versionName "1.7.27.1"
|
||||
resConfigs 'zh', 'zh-rCN', 'zh-rHK', 'zh-rTW', 'es', 'ja', 'ko', 'fr', 'de', 'th'
|
||||
}
|
||||
|
||||
|
||||
@@ -110,39 +110,30 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/action_card"
|
||||
style="@style/Widget.Material3.CardView.Elevated"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/keyline_margin"
|
||||
android:layout_marginRight="@dimen/keyline_margin"
|
||||
app:cardUseCompatPadding="true">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/action_card"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/keyline_margin"
|
||||
android:layout_marginRight="@dimen/keyline_margin"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/download"
|
||||
style="@style/ButtonInCard"
|
||||
style="@style/Widget.Material3.Button.TonalButton"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="?attr/dividerColor" />
|
||||
<android.widget.Space
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<TextView
|
||||
<Button
|
||||
android:id="@+id/read"
|
||||
style="@style/ButtonInCard"
|
||||
style="@style/Widget.Material3.Button"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
@@ -151,6 +142,5 @@
|
||||
android:text="@string/read" />
|
||||
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
-keep class com.hippo.a7zip.* { *; }
|
||||
-keep class com.hippo.* { *; }
|
||||
-keep class com.hippo.image.* { *; }
|
||||
@@ -59,8 +59,13 @@ public class UriArchiveAccessor implements Closeable {
|
||||
return Os.fstat(fd).st_size;
|
||||
}
|
||||
|
||||
public void seek(long pos) throws IOException, ErrnoException {
|
||||
Os.lseek(fd, pos, OsConstants.SEEK_SET);
|
||||
public long seek(long pos, int whence) throws IOException, ErrnoException {
|
||||
try {
|
||||
return Os.lseek(fd, pos, whence);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return -30;
|
||||
}
|
||||
}
|
||||
|
||||
public void rewind() throws IOException, ErrnoException {
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
project(ehviewer)
|
||||
cmake_minimum_required(VERSION 3.4.1)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
add_subdirectory(liblzma)
|
||||
include_directories(liblzma/src/liblzma/api)
|
||||
add_subdirectory(image)
|
||||
include_directories(libarchive/contrib/android/include)
|
||||
|
||||
SET(HAVE_LIBLZMA 1)
|
||||
SET(HAVE_LZMA_H 1)
|
||||
SET(HAVE_LZMA_STREAM_ENCODER_MT 1)
|
||||
SET(HAVE_LZMADEC_H 1)
|
||||
SET(HAVE_LIBLZMADEC 1)
|
||||
|
||||
add_subdirectory(libarchive)
|
||||
add_library(${PROJECT_NAME} SHARED main.c archive.c)
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC image/image libarchive/libarchive)
|
||||
|
||||
@@ -87,14 +87,24 @@ int ins_close(struct archive *a, void* client_data)
|
||||
return ARCHIVE_OK;
|
||||
}
|
||||
|
||||
la_int64_t ins_seek(struct archive *a, void *client_data, la_int64_t offset, int whence)
|
||||
{
|
||||
archive_inst *arc = client_data;
|
||||
jlong ret = (*arc->env)->CallLongMethod(arc->env, arc->file, arc->seekID, offset, whence);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static archive_inst *archive_create_inst(JNIEnv *env, jobject file)
|
||||
{
|
||||
archive_inst *inst = malloc(sizeof(archive_inst));
|
||||
inst->archive = archive_read_new();
|
||||
archive_read_set_seek_callback(inst->archive, ins_seek);
|
||||
archive_read_support_format_all(inst->archive);
|
||||
archive_read_support_filter_all(inst->archive);
|
||||
inst->env = env;
|
||||
inst->file = file;
|
||||
inst->readID = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, file), "read", "([B)I");
|
||||
inst->seekID = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, file), "seek", "(JI)J");
|
||||
inst->jbr = (*env)->NewByteArray(env, BLOCK_SIZE);
|
||||
inst->read_buffer = malloc(BLOCK_SIZE);
|
||||
inst->output_buffer = malloc(BLOCK_SIZE);
|
||||
@@ -117,7 +127,6 @@ Java_com_hippo_UriArchiveAccessor_openArchive(JNIEnv *env, jobject thiz, jobject
|
||||
archive_inst *arc = archive_create_inst(env, osf);
|
||||
r = archive_read_open(arc->archive, arc, NULL, ins_read, ins_close);
|
||||
if (r) {
|
||||
LOGI("%s%d", "Error open inputstream as archive, id is ", r);
|
||||
r = 0;
|
||||
} else {
|
||||
archive_list_all_entries(arc);
|
||||
|
||||
Submodule native/src/main/jni/libarchive updated: cffd8ecd55...588598490a.
Reference in new issue
Block a user