mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
build for Android
This commit is contained in:
1 parent
047054f8f7
commit
cf1880c2b3
14 files changed
+55
-193
No files matched your search
Generated
-136
@@ -236,28 +236,6 @@ version = "1.5.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "aws-lc-rs"
|
|
||||||
version = "1.16.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "d9a7b350e3bb1767102698302bc37256cbd48422809984b98d292c40e2579aa9"
|
|
||||||
dependencies = [
|
|
||||||
"aws-lc-sys",
|
|
||||||
"zeroize",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "aws-lc-sys"
|
|
||||||
version = "0.37.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b092fe214090261288111db7a2b2c2118e5a7f30dc2569f1732c4069a6840549"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"cmake",
|
|
||||||
"dunce",
|
|
||||||
"fs_extra",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
version = "0.21.7"
|
version = "0.21.7"
|
||||||
@@ -533,7 +511,6 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cjdic2-core",
|
"cjdic2-core",
|
||||||
"reqwest 0.13.2",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri",
|
"tauri",
|
||||||
@@ -557,15 +534,6 @@ dependencies = [
|
|||||||
"zip",
|
"zip",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "cmake"
|
|
||||||
version = "0.1.57"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "combine"
|
name = "combine"
|
||||||
version = "4.6.7"
|
version = "4.6.7"
|
||||||
@@ -1183,12 +1151,6 @@ dependencies = [
|
|||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "fs_extra"
|
|
||||||
version = "1.3.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "futf"
|
name = "futf"
|
||||||
version = "0.1.5"
|
version = "0.1.5"
|
||||||
@@ -2678,12 +2640,6 @@ dependencies = [
|
|||||||
"pathdiff",
|
"pathdiff",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "openssl-probe"
|
|
||||||
version = "0.2.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "option-ext"
|
name = "option-ext"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
@@ -3144,7 +3100,6 @@ version = "0.11.13"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31"
|
checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
|
||||||
"bytes",
|
"bytes",
|
||||||
"getrandom 0.3.4",
|
"getrandom 0.3.4",
|
||||||
"lru-slab",
|
"lru-slab",
|
||||||
@@ -3425,30 +3380,21 @@ checksum = "ab3f43e3283ab1488b624b44b0e988d0acea0b3214e694730a055cb6b2efa801"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"bytes",
|
"bytes",
|
||||||
"encoding_rs",
|
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"h2",
|
|
||||||
"http",
|
"http",
|
||||||
"http-body",
|
"http-body",
|
||||||
"http-body-util",
|
"http-body-util",
|
||||||
"hyper",
|
"hyper",
|
||||||
"hyper-rustls",
|
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"mime",
|
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"quinn",
|
|
||||||
"rustls",
|
|
||||||
"rustls-pki-types",
|
|
||||||
"rustls-platform-verifier",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sync_wrapper",
|
"sync_wrapper",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
@@ -3533,7 +3479,6 @@ version = "0.23.37"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
|
checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"ring",
|
"ring",
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
@@ -3542,18 +3487,6 @@ dependencies = [
|
|||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-native-certs"
|
|
||||||
version = "0.8.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63"
|
|
||||||
dependencies = [
|
|
||||||
"openssl-probe",
|
|
||||||
"rustls-pki-types",
|
|
||||||
"schannel",
|
|
||||||
"security-framework",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pki-types"
|
name = "rustls-pki-types"
|
||||||
version = "1.14.0"
|
version = "1.14.0"
|
||||||
@@ -3564,40 +3497,12 @@ dependencies = [
|
|||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-platform-verifier"
|
|
||||||
version = "0.6.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784"
|
|
||||||
dependencies = [
|
|
||||||
"core-foundation 0.10.1",
|
|
||||||
"core-foundation-sys",
|
|
||||||
"jni",
|
|
||||||
"log",
|
|
||||||
"once_cell",
|
|
||||||
"rustls",
|
|
||||||
"rustls-native-certs",
|
|
||||||
"rustls-platform-verifier-android",
|
|
||||||
"rustls-webpki",
|
|
||||||
"security-framework",
|
|
||||||
"security-framework-sys",
|
|
||||||
"webpki-root-certs",
|
|
||||||
"windows-sys 0.61.2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-platform-verifier-android"
|
|
||||||
version = "0.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-webpki"
|
name = "rustls-webpki"
|
||||||
version = "0.103.9"
|
version = "0.103.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
|
checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aws-lc-rs",
|
|
||||||
"ring",
|
"ring",
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
"untrusted",
|
"untrusted",
|
||||||
@@ -3624,15 +3529,6 @@ dependencies = [
|
|||||||
"winapi-util",
|
"winapi-util",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "schannel"
|
|
||||||
version = "0.1.28"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1"
|
|
||||||
dependencies = [
|
|
||||||
"windows-sys 0.61.2",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "schemars"
|
name = "schemars"
|
||||||
version = "0.8.22"
|
version = "0.8.22"
|
||||||
@@ -3690,29 +3586,6 @@ version = "1.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "security-framework"
|
|
||||||
version = "3.7.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.11.0",
|
|
||||||
"core-foundation 0.10.1",
|
|
||||||
"core-foundation-sys",
|
|
||||||
"libc",
|
|
||||||
"security-framework-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "security-framework-sys"
|
|
||||||
version = "2.17.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3"
|
|
||||||
dependencies = [
|
|
||||||
"core-foundation-sys",
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "selectors"
|
name = "selectors"
|
||||||
version = "0.24.0"
|
version = "0.24.0"
|
||||||
@@ -5306,15 +5179,6 @@ dependencies = [
|
|||||||
"system-deps",
|
"system-deps",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "webpki-root-certs"
|
|
||||||
version = "1.0.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "804f18a4ac2676ffb4e8b5b5fa9ae38af06df08162314f96a68d2a363e21a8ca"
|
|
||||||
dependencies = [
|
|
||||||
"rustls-pki-types",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webpki-roots"
|
name = "webpki-roots"
|
||||||
version = "1.0.6"
|
version = "1.0.6"
|
||||||
|
|||||||
+4
-2
@@ -8,8 +8,10 @@
|
|||||||
"dev:mobile": "tauri dev -c src-tauri/tauri.mobile.conf.json",
|
"dev:mobile": "tauri dev -c src-tauri/tauri.mobile.conf.json",
|
||||||
"dev:android": "tauri android dev",
|
"dev:android": "tauri android dev",
|
||||||
"build:desktop": "tauri build",
|
"build:desktop": "tauri build",
|
||||||
"build:android": "tauri android build --debug",
|
"build:android": "tauri android build",
|
||||||
"install:android": "adb install -r src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk",
|
"install:android": "adb install -r src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk",
|
||||||
|
"build:android:debug": "tauri android build --debug",
|
||||||
|
"install:android:debug": "adb install -r src-tauri/gen/android/app/build/outputs/apk/universal/debug/app-universal-debug.apk",
|
||||||
"dev": "cd src-react && pnpm run dev",
|
"dev": "cd src-react && pnpm run dev",
|
||||||
"build": "cd src-react && pnpm run build",
|
"build": "cd src-react && pnpm run build",
|
||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
|
|||||||
+9
-14
@@ -132,10 +132,13 @@ impl AppService {
|
|||||||
LoadCallback: Fn(LoadYomitanZipDirResult),
|
LoadCallback: Fn(LoadYomitanZipDirResult),
|
||||||
ImportCallback: Fn(YomitanZipImportProgress),
|
ImportCallback: Fn(YomitanZipImportProgress),
|
||||||
{
|
{
|
||||||
let mut dir_zip_map: HashMap<String, Z> = HashMap::new();
|
let mut dir_zip_map: HashMap<String, &Z> = HashMap::new();
|
||||||
|
let mut zip_dir_ord: HashMap<String, usize> = HashMap::new();
|
||||||
|
|
||||||
for entry in zip_dir {
|
for (i, entry) in zip_dir.iter().enumerate() {
|
||||||
dir_zip_map.insert(entry.file_name().to_string(), entry);
|
let filename = entry.file_name();
|
||||||
|
dir_zip_map.insert(filename.to_string(), entry);
|
||||||
|
zip_dir_ord.insert(filename.to_string(), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -173,16 +176,8 @@ impl AppService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Import ordering
|
// Import ordering
|
||||||
new_dicts.sort_by_key(|s| {
|
new_dicts.sort_by_key(|s| zip_dir_ord.get(s));
|
||||||
if s.starts_with("[")
|
to_be_removed_dicts.sort_by_key(|s| zip_dir_ord.get(s));
|
||||||
&& let Some(end_i) = s.find(']')
|
|
||||||
{
|
|
||||||
s[(end_i + 1)..].trim_start().to_string()
|
|
||||||
} else {
|
|
||||||
s.to_string()
|
|
||||||
}
|
|
||||||
});
|
|
||||||
to_be_removed_dicts.sort();
|
|
||||||
|
|
||||||
load_callback(LoadYomitanZipDirResult {
|
load_callback(LoadYomitanZipDirResult {
|
||||||
new_dicts: new_dicts.clone(),
|
new_dicts: new_dicts.clone(),
|
||||||
@@ -205,7 +200,7 @@ impl AppService {
|
|||||||
|
|
||||||
for z in new_dicts.clone().iter() {
|
for z in new_dicts.clone().iter() {
|
||||||
if let Some(zip_file) = dir_zip_map.get(z) {
|
if let Some(zip_file) = dir_zip_map.get(z) {
|
||||||
Self::import_yomitan_zip_file(&mut writer, zip_file, lang, &import_callback)?;
|
Self::import_yomitan_zip_file(&mut writer, *zip_file, lang, &import_callback)?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,25 @@ function LoadingDialog() {
|
|||||||
if (isInit.current) return;
|
if (isInit.current) return;
|
||||||
isInit.current = true;
|
isInit.current = true;
|
||||||
|
|
||||||
downloadAssets();
|
// empty query warmup
|
||||||
|
// no need to await
|
||||||
|
invoke("search_yomitan", {
|
||||||
|
qTerm: "",
|
||||||
|
qReading: "",
|
||||||
|
limit: 1,
|
||||||
|
offset: 0,
|
||||||
|
});
|
||||||
|
|
||||||
|
document.body.style.pointerEvents = "none";
|
||||||
|
downloadAssets().finally(() => {
|
||||||
|
document.body.style.pointerEvents = "";
|
||||||
|
const elFirstInput = document.querySelector(
|
||||||
|
'input[type="text"]',
|
||||||
|
) as HTMLInputElement;
|
||||||
|
if (elFirstInput) {
|
||||||
|
elFirstInput.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
async function downloadAssets(lang = "ja") {
|
async function downloadAssets(lang = "ja") {
|
||||||
const dicts: YomitanDictEntry[] = [];
|
const dicts: YomitanDictEntry[] = [];
|
||||||
|
|
||||||
@@ -88,14 +106,6 @@ function LoadingDialog() {
|
|||||||
|
|
||||||
await invoke("init_yomitan", { dicts, lang });
|
await invoke("init_yomitan", { dicts, lang });
|
||||||
setMessages([]);
|
setMessages([]);
|
||||||
|
|
||||||
// empty query warmup
|
|
||||||
await invoke("search_yomitan", {
|
|
||||||
qTerm: "",
|
|
||||||
qReading: "",
|
|
||||||
limit: 1,
|
|
||||||
offset: 0,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
listen<LoadYomitanZipDirResult>("load-yomitan-dir", ({ payload }) => {
|
listen<LoadYomitanZipDirResult>("load-yomitan-dir", ({ payload }) => {
|
||||||
|
|||||||
@@ -215,6 +215,7 @@ function SearchPage() {
|
|||||||
<InputGroup endElement={clearButton}>
|
<InputGroup endElement={clearButton}>
|
||||||
<Input
|
<Input
|
||||||
id="greet-input"
|
id="greet-input"
|
||||||
|
type="text"
|
||||||
ref={searchboxRef}
|
ref={searchboxRef}
|
||||||
value={q}
|
value={q}
|
||||||
onChange={(e) => onSearchboxChange(e.currentTarget.value)}
|
onChange={(e) => onSearchboxChange(e.currentTarget.value)}
|
||||||
|
|||||||
@@ -25,5 +25,4 @@ tauri-plugin-http = "2"
|
|||||||
anyhow = "1.0.102"
|
anyhow = "1.0.102"
|
||||||
tauri-plugin-fs = "2"
|
tauri-plugin-fs = "2"
|
||||||
serde_json = "1.0.149"
|
serde_json = "1.0.149"
|
||||||
reqwest = { version = "0.13.2", features = ["stream"] }
|
|
||||||
serde = "1.0.228"
|
serde = "1.0.228"
|
||||||
@@ -8,26 +8,7 @@
|
|||||||
"permissions": [
|
"permissions": [
|
||||||
"core:default",
|
"core:default",
|
||||||
"opener:default",
|
"opener:default",
|
||||||
{
|
"http:default",
|
||||||
"identifier": "http:default",
|
"fs:default"
|
||||||
"allow": [
|
|
||||||
{
|
|
||||||
"url": "https://api.github.com"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"fs:allow-exists",
|
|
||||||
"fs:allow-read-dir",
|
|
||||||
"fs:allow-appdata-read",
|
|
||||||
{
|
|
||||||
"identifier": "fs:scope",
|
|
||||||
"allow": [
|
|
||||||
"$APPDATA/**/*.zip",
|
|
||||||
"$APPDATA/yomitan/*"
|
|
||||||
],
|
|
||||||
"deny": [
|
|
||||||
"$APPDATA/*.db"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -17,3 +17,4 @@ key.properties
|
|||||||
|
|
||||||
/.tauri
|
/.tauri
|
||||||
/tauri.settings.gradle
|
/tauri.settings.gradle
|
||||||
|
keystore.properties
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import java.util.Properties
|
import java.util.Properties
|
||||||
|
import java.io.FileInputStream
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("com.android.application")
|
id("com.android.application")
|
||||||
@@ -24,6 +25,20 @@ android {
|
|||||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||||
}
|
}
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
|
val keystoreProperties = Properties()
|
||||||
|
if (keystorePropertiesFile.exists()) {
|
||||||
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||||
|
}
|
||||||
|
|
||||||
|
keyAlias = keystoreProperties["keyAlias"] as String
|
||||||
|
keyPassword = keystoreProperties["password"] as String
|
||||||
|
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||||
|
storePassword = keystoreProperties["password"] as String
|
||||||
|
}
|
||||||
|
}
|
||||||
buildTypes {
|
buildTypes {
|
||||||
getByName("debug") {
|
getByName("debug") {
|
||||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||||
@@ -43,6 +58,7 @@ android {
|
|||||||
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
||||||
.toList().toTypedArray()
|
.toList().toTypedArray()
|
||||||
)
|
)
|
||||||
|
signingConfig = signingConfigs.getByName("release")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
*.zip
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
*
|
|
||||||
!.gitignore
|
|
||||||
|
|
||||||
# Pixiv_*.zip => Pixiv.zip from https://github.com/MarvNC/pixiv-yomitan/releases
|
|
||||||
Whitespace-only changes.
@@ -1,9 +1,9 @@
|
|||||||
use std::{fs::File, io::Write, path::PathBuf};
|
use std::{fs::File, io::Write, path::PathBuf};
|
||||||
|
|
||||||
use cjdic2_core::{AppService, CJDicError, SqlParam, YomitanRow, YomitanZipImportResult};
|
use cjdic2_core::{AppService, CJDicError, SqlParam, YomitanRow, YomitanZipImportResult};
|
||||||
use reqwest::Client;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tauri::{AppHandle, Emitter, Manager};
|
use tauri::{AppHandle, Emitter, Manager};
|
||||||
|
use tauri_plugin_http::reqwest::Client;
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
pub struct YomitanDictEntry {
|
pub struct YomitanDictEntry {
|
||||||
@@ -155,6 +155,8 @@ where
|
|||||||
let content_length = response.content_length().unwrap_or(0);
|
let content_length = response.content_length().unwrap_or(0);
|
||||||
let mut file = File::create(&file_pf).map_err(|e| CJDicError::Error(e.to_string()))?;
|
let mut file = File::create(&file_pf).map_err(|e| CJDicError::Error(e.to_string()))?;
|
||||||
|
|
||||||
|
println!("{}", content_length);
|
||||||
|
|
||||||
// Downloading the file in chunks
|
// Downloading the file in chunks
|
||||||
let mut downloaded: u64 = 0;
|
let mut downloaded: u64 = 0;
|
||||||
while let Some(chunk) = response
|
while let Some(chunk) = response
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"resources": [
|
|
||||||
"resources/**/*.zip",
|
|
||||||
"resources/**/manifest.json"
|
|
||||||
],
|
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"icon": [
|
"icon": [
|
||||||
|
|||||||
Reference in new issue
Block a user