mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-17 11:07:11 +08:00
feat(desktop): redirect writable data to ~/.cow for packaged app
Introduce get_data_root() driven by the COW_DATA_DIR env var so the packaged desktop build stores config.json, run.log, user data and WeChat credentials under ~/.cow — surviving app updates and keeping the app bundle read-only. Source deployments leave COW_DATA_DIR unset and fall back to the repo root, so existing behavior is unchanged.
This commit is contained in:
@@ -52,18 +52,8 @@
|
||||
],
|
||||
"extraResources": [
|
||||
{
|
||||
"from": "../",
|
||||
"to": "backend",
|
||||
"filter": [
|
||||
"**/*",
|
||||
"!desktop/**",
|
||||
"!.git/**",
|
||||
"!__pycache__/**",
|
||||
"!**/__pycache__/**",
|
||||
"!*.pyc",
|
||||
"!run.log",
|
||||
"!workspace/**"
|
||||
]
|
||||
"from": "build/dist/cowagent-backend",
|
||||
"to": "backend/cowagent-backend"
|
||||
}
|
||||
],
|
||||
"mac": {
|
||||
@@ -73,7 +63,7 @@
|
||||
{
|
||||
"target": "dmg",
|
||||
"arch": [
|
||||
"universal"
|
||||
"arm64"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user