File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ import 'package:flutter/material.dart';
66import 'package:path/path.dart' as path;
77import 'package:open_filex/open_filex.dart' ;
88import 'package:path_provider/path_provider.dart' ;
9+ import 'package:window_manager/window_manager.dart' ;
10+ import 'package:pure_live/common/global/platform_utils.dart' ;
911
1012// download_apk_dialog.dart
1113
@@ -81,6 +83,14 @@ class _DownloadApkDialogState extends State<DownloadApkDialog> {
8183
8284 // 安装 APK
8385 final result = await OpenFilex .open (file.path);
86+ if (PlatformUtils .isDesktopNotMac) {
87+ if (await windowManager.isPreventClose ()) {
88+ await windowManager.setPreventClose (false );
89+ }
90+ WidgetsBinding .instance.addPostFrameCallback ((_) {
91+ exit (0 );
92+ });
93+ }
8494 if (result.type != ResultType .done) {
8595 Get .snackbar ('安装失败' , result.message);
8696 }
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ SolidCompression=yes
1515SetupIconFile = {{SETUP_ICON_FILE}}
1616WizardStyle = modern
1717PrivilegesRequired = {{PRIVILEGES_REQUIRED}}
18-
18+ CloseApplications = yes
19+ CloseApplicationsFilter = *.exe
1920[Languages]
2021{% for locale in LOCALES %}
2122{% if locale == ' en' %}Name : " english" ; MessagesFile : " compiler:Default.isl" {% endif %}
You can’t perform that action at this time.
0 commit comments