欧陆mac版更新到最新版本26.9.0后,一打开就有弹窗说词库找不到了,所有的词典都是复制到默认目录,/Users/xxx/Library/Containers/com.eusoft.eudic/Data/Library/Eudb_en 之下 (弹窗提示的词典也仍在该目录下面),更新前完全没问题,词典也不是一天导入这么多的,请问有没有人碰到的同样的问题
(联系了客服,发了个reset_eudic_sandbox_migration.sh的文件如下让我尝试,也是报错了,词典路径不对,求助懂代码的朋友看一下,是不是reset文件也不对,谢谢)
Error: Legacy dictionary source is missing: /Users/xxxx/Library/Eudb_en. Restore it before resetting the container.
#!/bin/bash
set -euo pipefail
readonly USER_HOME="${HOME:?HOME is not set}"
readonly BUNDLE_ID="com.eusoft.eudic"
readonly LEGACY_DICT_DIR="${USER_HOME}/Library/Eudb_en"
readonly LEGACY_PREFS="${USER_HOME}/Library/Preferences/${BUNDLE_ID}.plist"
readonly CONTAINER_DIR="${USER_HOME}/Library/Containers/${BUNDLE_ID}"
readonly APPLICATION_SCRIPTS_DIR="${USER_HOME}/Library/Application Scripts/${BUNDLE_ID}"
readonly BACKUP_PARENT="${USER_HOME}/Library/Application Support/EuDicMigrationTest/ContainerBackups"
usage()
{
cat <<'EOF'
Reset the local state used to test EuDic's one-time App Sandbox migration.
Usage:
./reset_eudic_sandbox_migration.sh
./reset_eudic_sandbox_migration.sh --dry-run
The script preserves the legacy migration sources:
~/Library/Eudb_en
~/Library/Preferences/com.eusoft.eudic.plist
The existing sandbox container is moved to a timestamped backup under:
~/Library/Application Support/EuDicMigrationTest/ContainerBackups
After a successful reset, run the EuDic_en_App_Store scheme from Xcode.
EOF
}
die()
{
echo "Error: $*" >&2
exit 1
}
dry_run=0
case "${1:-}" in
"")
;;
--dry-run)
dry_run=1
;;
-h|--help)
usage
exit 0
;;
*)
usage >&2
exit 2
;;
esac
[[ "${CONTAINER_DIR}" == "${USER_HOME}/Library/Containers/${BUNDLE_ID}" ]] || die "Unexpected container path."
[[ ! -L "${CONTAINER_DIR}" ]] || die "Refusing to reset a symlinked container: ${CONTAINER_DIR}"
echo "EuDic App Sandbox migration reset"
echo " Legacy dictionary: ${LEGACY_DICT_DIR}"
echo " Legacy preferences: ${LEGACY_PREFS}"
echo " Sandbox container: ${CONTAINER_DIR}"
if [[ ${dry_run} -eq 1 ]]; then
echo
echo "Dry run only. No process or file changes were made."
[[ -d "${LEGACY_DICT_DIR}" ]] || echo "Warning: legacy dictionary directory is missing."
[[ -f "${LEGACY_PREFS}" ]] || echo "Warning: legacy preferences file is missing."
[[ -d "${CONTAINER_DIR}" ]] || echo "Note: sandbox container is already absent."
exit 0
fi
echo
echo "Requesting EuDic processes to quit..."
/usr/bin/osascript -e "tell application id \"${BUNDLE_ID}\" to quit" >/dev/null 2>&1 || true
/usr/bin/pkill -TERM -x Eudb_en >/dev/null 2>&1 || true
/usr/bin/pkill -TERM -x LightPeek_en >/dev/null 2>&1 || true
/usr/bin/pkill -TERM -x CaptureHelper >/dev/null 2>&1 || true
for _ in 1 2 3 4 5 6 7 8 9 10; do
if ! /usr/bin/pgrep -x Eudb_en >/dev/null 2>&1 &&
! /usr/bin/pgrep -x LightPeek_en >/dev/null 2>&1 &&
! /usr/bin/pgrep -x CaptureHelper >/dev/null 2>&1; then
break
fi
sleep 1
done
running_processes="$(
{
/usr/bin/pgrep -l -x Eudb_en || true
/usr/bin/pgrep -l -x LightPeek_en || true
/usr/bin/pgrep -l -x CaptureHelper || true
} | /usr/bin/sed '/^[[:space:]]*$/d'
)"
if [[ -n "${running_processes}" ]]; then
echo "${running_processes}" >&2
die "EuDic processes are still running. Quit them manually and run the script again."
fi
/bin/sync
[[ -d "${LEGACY_DICT_DIR}" ]] || die \
"Legacy dictionary source is missing: ${LEGACY_DICT_DIR}. Restore it before resetting the container."
[[ -f "${LEGACY_PREFS}" ]] || die \
"Legacy preferences are missing: ${LEGACY_PREFS}. Run the non-sandboxed App Store build and quit it normally first."
/usr/bin/plutil -lint "${LEGACY_PREFS}" >/dev/null || die \
"Legacy preferences are not a valid plist: ${LEGACY_PREFS}"
if [[ ! -e "${CONTAINER_DIR}" ]]; then
echo
echo "The sandbox container is already absent."
echo "Ready: run the EuDic_en_App_Store scheme from Xcode."
exit 0
fi
timestamp="$(/bin/date '+%Y%m%d-%H%M%S')"
backup_dir="${BACKUP_PARENT}/${timestamp}"
suffix=0
while [[ -e "${backup_dir}" ]]; do
suffix=$((suffix + 1))
backup_dir="${BACKUP_PARENT}/${timestamp}-${suffix}"
done
/bin/mkdir -p "${backup_dir}"
echo
echo "Moving the existing sandbox state to:"
echo " ${backup_dir}"
if ! /bin/mv "${CONTAINER_DIR}" "${backup_dir}/${BUNDLE_ID}.container"; then
die "Could not move the container. The terminal running this script may need Full Disk Access."
fi
if [[ -e "${APPLICATION_SCRIPTS_DIR}" ]]; then
if ! /bin/mv "${APPLICATION_SCRIPTS_DIR}" "${backup_dir}/${BUNDLE_ID}.application-scripts"; then
echo "Warning: could not move ${APPLICATION_SCRIPTS_DIR}." >&2
echo "This does not normally block the current Eudb_en migration manifest." >&2
fi
fi
sleep 1
[[ ! -e "${CONTAINER_DIR}" ]] || die \
"The container was recreated immediately. Check for remaining EuDic or extension processes."
echo
echo "Reset complete."
echo " Preserved: ${LEGACY_DICT_DIR}"
echo " Preserved: ${LEGACY_PREFS}"
echo " Backup: ${backup_dir}"
echo
echo "Now run the EuDic_en_App_Store scheme from Xcode exactly once."
echo "Do not launch /Applications/Eudb_en.app until migration verification is complete."
