Open danielphan2003 opened 2 months ago
Để xác nhận checksum giữa repo hiện tại với file DMG từ Zalo ta có thể chạy script sau:
#!/bin/bash
toplevel="$1"
repo_path="$HOME/src/github.com/realdtn2/zalo-linux-unofficial/Zalo/Zalo/app/$1" # folder app của repo
dir="app-v24.9.1/$1" # đường dẫn tới folder extract từ asar extract
for f in "$dir"/*; do
filename="$(basename "$f")"
repo_file="$repo_path/$filename"
if [[ $filename == login-startup.*.js ]]; then
repo_file="$(ls $repo_path/login-startup.*.js)"
elif [[ $filename == default-login-main-startup-shared-worker-znotification.*.js ]]; then
repo_file="$(ls $repo_path/default-login-main-startup-shared-worker-znotification.*.js)"
elif [[ $filename == default-login-render-shared-worker.*.js ]]; then
repo_file="$(ls $repo_path/default-login-render-shared-worker.*.js)"
elif [[ $filename == default-login-startup-main-startup.*.js ]]; then
repo_file="$(ls $repo_path/default-login-startup-main-startup.*.js)"
elif [[ $filename == default-login-startup-main-startup-shared-worker.*.js ]]; then
repo_file="$(ls $repo_path/default-login-startup-main-startup-shared-worker.*.js)"
fi
checksum_repo_file=$(sha256sum "$repo_file" | awk '{ print $1 }')
checksum_file=$(sha256sum "$f" | awk '{ print $1 }')
if [[ "$checksum_repo_file" == "$checksum_file" ]]; then
echo "$filename .. OK"
else
echo "$filename .. DIFF"
npx @biomejs/biome format --write --files-max-size=20000000 "$repo_file"
npx @biomejs/biome format --write --files-max-size=20000000 "$f"
difft "$repo_file" "$f"
fi
done
Ví dụ:
$ bash cmp.sh pc-dist/lazy
0.10688555776004759ed0.js .. OK
12.fadc7ea85a788f93e7cb.js .. OK
37.58e2286805582e3f980b.js .. OK
38.67f1ec6882c9130825bc.js .. OK
39.a90f165e1ab3329a1d8c.js .. OK
40.fc2bfb61fe00db63c149.js .. OK
41.6db3515e1198bc737305.js .. OK
42.07f7ff1884dba0fc940e.js .. OK
43.8cfd6a6b83837153503a.js .. OK
44.44780d77b5c22a7cf097.js .. OK
45.80baa2902d2f38174b38.js .. OK
46.8a88dd4474733345cbe8.js .. OK
47.3ab15a52f306e83d32a3.js .. OK
48.beef79f849f9f284cc65.js .. OK
49.14ffb09af60f77653334.js .. OK
50.bc28144e5345fd739f24.js .. OK
51.ebd711242da66d5b68fe.js .. OK
countries.932300cf9a36152c5ed9.js .. OK
default-login-main-startup-shared-worker.03d9c4cb35695e444f6e.js .. OK
default-login-main-startup-shared-worker-znotification.70ecd6bb8339a78c58fd.js .. OK
default-login-render.61dd636611e58d9d15f7.js .. OK
default-login-render-shared-worker.7646c6bd3c01ee18deff.js .. OK
default-login-render-shared-worker-znotification.00d3487c319de8744739.js .. OK
default-login-startup-main-startup.838381f3353074e58886.js .. OK
default-login-startup-main-startup-shared-worker.02126021d4ca68818d77.js .. OK
default-login-startup-main-startup-shared-worker-znotification.e437bbccf2b050240f86.js .. OK
default-main-startup-shared-worker.5c91269df319dfa18b53.js .. OK
lang-en.56238718443649810e49.js .. OK
lang-vi.726eb5732efe07d13d77.js .. OK
login-startup.c04ff27579bd5199c122.js .. OK
main-startup.1778f55a0941d7ea8e7d.js .. OK
vendors-login-main-startup-shared-worker-znotification.71b104815f376be9f133.js .. OK
vendors-login-render-shared-worker.4e844d2ef930d2cea8da.js .. OK
vendors-login-render-shared-worker-znotification.46ac60a10b2e96dae10a.js .. OK
vendors-login-startup.8fd4eb4c993f541e473e.js .. OK
vendors-login-startup-main-startup-shared-worker.250d489da6f951ef4e23.js .. OK
vendors-login-startup-main-startup-shared-worker-znotification.ff22f534b3cfdae5371a.js .. OK
vendors-main-startup.14bbb8d73a80dcec3390.js .. OK
vendors-main-startup-shared-worker.de52790c93fa781d175b.js .. OK
Script này cần các tool sau: difftastic, sha256sum (coreutils), npx
Cảm ơn repo của bác. Em đã viết file PKGBUILD cho Arch dựa trên repo này và đã bật được native tray của Electron bằng cách unpack asar và vá file
app/main-dist/main.js
:File
``` # Maintainer: Daniel PhanPKGBUILD
Khi bắt đầu đồng bộ tin nhắn thì Zalo bị lỗi như sau:
Không biết bác có bị hay không nên em nghĩ mình cứ tạo issue rồi bàn thêm. Lỗi này xảy ra ở v24.9.1 và v24.9.3