mirror of
https://github.com/hyb-oyqq/FRAISEMOE-Addons-Installer-NEXT.git
synced 2026-04-05 14:56:34 +00:00
Compare commits
2 Commits
41e3c88a2f
...
adcd6da5b4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adcd6da5b4 | ||
|
|
d7ceb71607 |
@@ -21,6 +21,10 @@
|
|||||||
- 游戏安装路径:用于识别已安装的游戏和安装补丁
|
- 游戏安装路径:用于识别已安装的游戏和安装补丁
|
||||||
- 文件哈希值:用于验证文件完整性
|
- 文件哈希值:用于验证文件完整性
|
||||||
|
|
||||||
|
### 2.4 离线模式和本地文件
|
||||||
|
- **离线模式**:本应用提供离线模式。在离线模式下,应用不会进行任何网络连接,包括检查更新、获取云端配置或进行任何网络相关的测试,安装过程将只使用本地文件。
|
||||||
|
- **本地文件使用**:为了支持离线安装,本应用会扫描其所在目录下的压缩包,以查找用于安装的补丁压缩包。此文件扫描操作仅限于应用所在的文件夹,不会访问或修改您系统中的其他文件。
|
||||||
|
|
||||||
## 3. 信息使用
|
## 3. 信息使用
|
||||||
|
|
||||||
我们收集的信息仅用于以下目的:
|
我们收集的信息仅用于以下目的:
|
||||||
@@ -88,4 +92,4 @@
|
|||||||
|
|
||||||
本隐私政策可能会根据应用功能的变化而更新。请定期查看最新版本。
|
本隐私政策可能会根据应用功能的变化而更新。请定期查看最新版本。
|
||||||
|
|
||||||
最后更新日期:2025年8月4日
|
最后更新日期:2025年8月15日
|
||||||
@@ -20,6 +20,7 @@ PRIVACY_POLICY_BRIEF = """
|
|||||||
- **系统信息**:程序版本号。
|
- **系统信息**:程序版本号。
|
||||||
- **网络信息**:IP 地址、ISP、地理位置(用于使用统计)、下载统计、IPv6 连接测试(通过访问 testipv6.cn)、IPv6 地址获取(通过 ipw.cn)。
|
- **网络信息**:IP 地址、ISP、地理位置(用于使用统计)、下载统计、IPv6 连接测试(通过访问 testipv6.cn)、IPv6 地址获取(通过 ipw.cn)。
|
||||||
- **文件信息**:游戏安装路径、文件哈希值。
|
- **文件信息**:游戏安装路径、文件哈希值。
|
||||||
|
- **离线模式**:在离线模式下,本应用不会进行任何网络活动,仅使用本地文件进行安装。为实现此功能,应用会扫描其所在目录下的压缩包文件。
|
||||||
|
|
||||||
## 系统修改
|
## 系统修改
|
||||||
- 使用 Cloudflare 加速时会临时修改系统 hosts 文件。
|
- 使用 Cloudflare 加速时会临时修改系统 hosts 文件。
|
||||||
@@ -43,6 +44,7 @@ This application collects and processes the following information:
|
|||||||
- **System info**: Application version.
|
- **System info**: Application version.
|
||||||
- **Network info**: IP address, ISP, geographic location (for usage statistics), download statistics, IPv6 connectivity test (via testipv6.cn), IPv6 address acquisition (via ipw.cn).
|
- **Network info**: IP address, ISP, geographic location (for usage statistics), download statistics, IPv6 connectivity test (via testipv6.cn), IPv6 address acquisition (via ipw.cn).
|
||||||
- **File info**: Game installation paths, file hash values.
|
- **File info**: Game installation paths, file hash values.
|
||||||
|
- **Offline Mode**: In offline mode, the application will not perform any network activities and will only use local files for installation. To achieve this, the application scans for compressed files in its directory.
|
||||||
|
|
||||||
## System Modifications
|
## System Modifications
|
||||||
- Temporarily modifies system hosts file when using Cloudflare acceleration.
|
- Temporarily modifies system hosts file when using Cloudflare acceleration.
|
||||||
@@ -57,7 +59,7 @@ The complete privacy policy can be found in the program's GitHub repository.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# 默认隐私协议版本 - 本地版本的日期
|
# 默认隐私协议版本 - 本地版本的日期
|
||||||
PRIVACY_POLICY_VERSION = "2025.08.04"
|
PRIVACY_POLICY_VERSION = "2025.08.15"
|
||||||
|
|
||||||
def get_local_privacy_policy():
|
def get_local_privacy_policy():
|
||||||
"""获取本地打包的隐私协议文件
|
"""获取本地打包的隐私协议文件
|
||||||
|
|||||||
@@ -204,9 +204,14 @@ class OfflineModeManager:
|
|||||||
# 同步更新UI菜单中的模式选择状态
|
# 同步更新UI菜单中的模式选择状态
|
||||||
if hasattr(self.main_window, 'ui_manager'):
|
if hasattr(self.main_window, 'ui_manager'):
|
||||||
ui_manager = self.main_window.ui_manager
|
ui_manager = self.main_window.ui_manager
|
||||||
if hasattr(ui_manager, 'online_mode_action') and hasattr(ui_manager, 'offline_mode_action'):
|
# 使用专门的同步方法确保菜单状态正确更新
|
||||||
ui_manager.online_mode_action.setChecked(not enabled)
|
if hasattr(ui_manager, 'sync_work_mode_menu_state'):
|
||||||
ui_manager.offline_mode_action.setChecked(enabled)
|
ui_manager.sync_work_mode_menu_state()
|
||||||
|
elif hasattr(ui_manager, 'online_mode_action') and hasattr(ui_manager, 'offline_mode_action'):
|
||||||
|
# 兼容旧版本的直接设置方式
|
||||||
|
if ui_manager.online_mode_action and ui_manager.offline_mode_action:
|
||||||
|
ui_manager.online_mode_action.setChecked(not enabled)
|
||||||
|
ui_manager.offline_mode_action.setChecked(enabled)
|
||||||
|
|
||||||
# 记录离线模式状态变化
|
# 记录离线模式状态变化
|
||||||
logger.debug(f"离线模式已{'启用' if enabled else '禁用'}")
|
logger.debug(f"离线模式已{'启用' if enabled else '禁用'}")
|
||||||
|
|||||||
@@ -62,6 +62,13 @@ class UIManager:
|
|||||||
self.debug_action = self.menu_builder.debug_action
|
self.debug_action = self.menu_builder.debug_action
|
||||||
self.disable_auto_restore_action = self.menu_builder.disable_auto_restore_action
|
self.disable_auto_restore_action = self.menu_builder.disable_auto_restore_action
|
||||||
self.disable_pre_hash_action = self.menu_builder.disable_pre_hash_action
|
self.disable_pre_hash_action = self.menu_builder.disable_pre_hash_action
|
||||||
|
|
||||||
|
# 保存对工作模式菜单项的引用,确保能正确同步状态
|
||||||
|
self.online_mode_action = self.menu_builder.online_mode_action
|
||||||
|
self.offline_mode_action = self.menu_builder.offline_mode_action
|
||||||
|
|
||||||
|
# 在菜单创建完成后,强制同步一次工作模式状态
|
||||||
|
self.sync_work_mode_menu_state()
|
||||||
|
|
||||||
# 为了向后兼容性,添加委托方法
|
# 为了向后兼容性,添加委托方法
|
||||||
def create_progress_window(self, title, initial_text="准备中..."):
|
def create_progress_window(self, title, initial_text="准备中..."):
|
||||||
@@ -84,6 +91,39 @@ class UIManager:
|
|||||||
"""显示菜单(委托给menu_builder)"""
|
"""显示菜单(委托给menu_builder)"""
|
||||||
return self.menu_builder.show_menu(menu, button)
|
return self.menu_builder.show_menu(menu, button)
|
||||||
|
|
||||||
|
def sync_work_mode_menu_state(self):
|
||||||
|
"""同步工作模式菜单状态,确保菜单选择状态与实际工作模式一致"""
|
||||||
|
try:
|
||||||
|
# 检查是否有离线模式管理器和菜单项
|
||||||
|
if not hasattr(self.main_window, 'offline_mode_manager') or not self.main_window.offline_mode_manager:
|
||||||
|
return
|
||||||
|
|
||||||
|
if not hasattr(self, 'online_mode_action') or not hasattr(self, 'offline_mode_action'):
|
||||||
|
return
|
||||||
|
|
||||||
|
if not self.online_mode_action or not self.offline_mode_action:
|
||||||
|
return
|
||||||
|
|
||||||
|
# 获取当前离线模式状态
|
||||||
|
is_offline_mode = self.main_window.offline_mode_manager.is_in_offline_mode()
|
||||||
|
|
||||||
|
# 同步菜单选择状态
|
||||||
|
self.online_mode_action.setChecked(not is_offline_mode)
|
||||||
|
self.offline_mode_action.setChecked(is_offline_mode)
|
||||||
|
|
||||||
|
# 记录同步操作(仅在调试模式下)
|
||||||
|
if hasattr(self.main_window, 'config') and self.main_window.config.get('debug_mode', False):
|
||||||
|
from utils.logger import setup_logger
|
||||||
|
logger = setup_logger("ui_manager")
|
||||||
|
logger.debug(f"已同步工作模式菜单状态: 离线模式={is_offline_mode}")
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
# 静默处理异常,避免影响程序正常运行
|
||||||
|
if hasattr(self.main_window, 'config') and self.main_window.config.get('debug_mode', False):
|
||||||
|
from utils.logger import setup_logger
|
||||||
|
logger = setup_logger("ui_manager")
|
||||||
|
logger.debug(f"同步工作模式菜单状态时出错: {e}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -207,6 +207,10 @@ class MainWindow(QMainWindow):
|
|||||||
else:
|
else:
|
||||||
self.window_manager.change_window_state(self.window_manager.STATE_ERROR)
|
self.window_manager.change_window_state(self.window_manager.STATE_ERROR)
|
||||||
|
|
||||||
|
# 确保工作模式菜单状态与实际状态同步
|
||||||
|
if hasattr(self, 'ui_manager') and hasattr(self.ui_manager, 'sync_work_mode_menu_state'):
|
||||||
|
self.ui_manager.sync_work_mode_menu_state()
|
||||||
|
|
||||||
def set_start_button_enabled(self, enabled, installing=False):
|
def set_start_button_enabled(self, enabled, installing=False):
|
||||||
"""[过渡方法] 设置按钮状态,将调用委托给WindowManager
|
"""[过渡方法] 设置按钮状态,将调用委托给WindowManager
|
||||||
|
|
||||||
|
|||||||
@@ -129,6 +129,9 @@ class HashThread(QThread):
|
|||||||
logger.debug(f"DEBUG: 哈希后检查 - {game_version} 补丁文件不存在: {install_path}")
|
logger.debug(f"DEBUG: 哈希后检查 - {game_version} 补丁文件不存在: {install_path}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# 设置当前处理的游戏版本
|
||||||
|
result["game"] = game_version
|
||||||
|
|
||||||
try:
|
try:
|
||||||
expected_hash = self.plugin_hash.get(game_version, "")
|
expected_hash = self.plugin_hash.get(game_version, "")
|
||||||
if not expected_hash:
|
if not expected_hash:
|
||||||
|
|||||||
Reference in New Issue
Block a user