mcy_new #1
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
|
||||
<channel>
|
||||
<title>auto_updater_example</title>
|
||||
<description>Most recent updates to auto_updater_example</description>
|
||||
<language>en</language>
|
||||
<!-- <item>
|
||||
<title>Version 1.1.0</title>
|
||||
#发行说明-读取html方式(2选1)
|
||||
<sparkle:releaseNotesLink>
|
||||
https://your_domain/your_path/release_notes.html
|
||||
</sparkle:releaseNotesLink>
|
||||
#发行说明-写死方式(2选1)
|
||||
<description>
|
||||
<![CDATA[
|
||||
<ul>
|
||||
<li>1、新增XX功能</li>
|
||||
<li>2、新增XX功能</li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
<pubDate>Sun, 16 Feb 2022 12:00:00 +0800</pubDate>
|
||||
#你更新程序的地址
|
||||
<enclosure url="http://wwww.xxx.com/1.1.0+2/auto_updater_example-1.1.0+2-macos.zip"
|
||||
sparkle:edSignature="pbdyPt92pnPkzLfQ7BhS9hbjcV9/ndkzSIlWjFQIUMcaCNbAFO2fzl0tISMNJApG2POTkZY0/kJQ2yZYOSVgAA=="
|
||||
sparkle:version="1.1.0"
|
||||
sparkle:os="macos"
|
||||
length="13400992"
|
||||
type="application/octet-stream" />
|
||||
</item> -->
|
||||
<item>
|
||||
<title>Version 1.0.1</title>
|
||||
#发行说明-读取html方式(2选1)
|
||||
<!-- <sparkle:releaseNotesLink>
|
||||
https://your_domain/your_path/release_notes.html
|
||||
</sparkle:releaseNotesLink> -->
|
||||
#发行说明-写死方式(2选1)
|
||||
<description>
|
||||
<![CDATA[
|
||||
<ul>
|
||||
<li>1、新增XX功能</li>
|
||||
<li>2、新增XX功能</li>
|
||||
</ul>
|
||||
]]>
|
||||
</description>
|
||||
<pubDate>Sun, 16 Feb 2022 12:00:00 +0800</pubDate>
|
||||
#你更新程序的地址
|
||||
<enclosure url="https://dpc-job-oss.23544.com/infra-app/job/1.0.1/3/making_school_asignment_app-1.0.1+2-windows-setup.exe"
|
||||
sparkle:dsaSignature="MEUCIDbfAOA8SB80Hv2oczzYORVr2FF7PjvLZsQF4BTTFPeqAiEAoLQGiqFQekQyV6Xko1U8yM6bl5/lqK6a6poppG6d4x8="
|
||||
sparkle:version="1.0.1+2"
|
||||
sparkle:os="windows"
|
||||
length="0"
|
||||
type="application/octet-stream" />
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
@ -203,11 +203,12 @@ class DownloadButton extends StatelessWidget {
|
|||
} catch (e) {
|
||||
print('进来更新报错$e');
|
||||
}
|
||||
} else if (deviceInfo == 'windows' && updateAppEvent.equipment == Equipment.windows) {
|
||||
await autoUpdater.setFeedURL(updateAppEvent.link);
|
||||
await autoUpdater.checkForUpdates();
|
||||
await autoUpdater.setScheduledCheckInterval(0);
|
||||
}
|
||||
// else if (deviceInfo == 'windows' && updateAppEvent.equipment == Equipment.windows) {
|
||||
// await autoUpdater.setFeedURL(updateAppEvent.link);
|
||||
// await autoUpdater.checkForUpdates();
|
||||
// await autoUpdater.setScheduledCheckInterval(0);
|
||||
// }
|
||||
}),
|
||||
child: quickText(!logic.loadingApk.value ? '立即体验' : '正在下载...', size: 16.sp, color: Colors.white, fontWeight: FontWeight.w500),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -33,10 +33,12 @@ class UpgradeLogic extends GetxController with RequestToolMixin {
|
|||
} else if (Platform.isIOS) {
|
||||
deviceInfo = "ios";
|
||||
deviceType = 2;
|
||||
} else if (Platform.isWindows) {
|
||||
deviceInfo = "windows";
|
||||
deviceType = 3;
|
||||
} else {
|
||||
}
|
||||
// else if (Platform.isWindows) {
|
||||
// deviceInfo = "windows";
|
||||
// deviceType = 3;
|
||||
// }
|
||||
else {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:auto_updater/auto_updater.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
|
|
@ -12,6 +13,7 @@ import 'package:making_school_asignment_app/routes/app_pages.dart';
|
|||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
|
||||
import 'common/config/request_config.dart';
|
||||
import 'common/utils/app_upgrade/upgradeLogic.dart';
|
||||
|
||||
void main() async {
|
||||
|
|
@ -25,6 +27,13 @@ void main() async {
|
|||
Get.put<UserStore>(UserStore().init());
|
||||
Get.put(UpgradeLogic());
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
// Windows
|
||||
String feedURL = '${RequestConfig.imgUrl}infra-app/job/3/appcast.xml';
|
||||
await autoUpdater.setFeedURL(feedURL);
|
||||
await autoUpdater.checkForUpdates();
|
||||
await autoUpdater.setScheduledCheckInterval(3600);
|
||||
|
||||
SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent, //状态栏背景颜色
|
||||
statusBarIconBrightness: Brightness.dark // dark:一般显示黑色 light:一般显示白色
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
|||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+1
|
||||
version: 1.0.1+2
|
||||
|
||||
environment:
|
||||
sdk: '>=3.4.1 <4.0.0'
|
||||
|
|
@ -90,7 +90,7 @@ dependencies:
|
|||
flutter_echart: ^2.0.0
|
||||
url_launcher: ^6.1.11
|
||||
app_installer: ^1.1.0
|
||||
auto_updater: ^0.2.0
|
||||
auto_updater: ^0.2.1
|
||||
permission_handler: ^11.0.1
|
||||
flutter_distributor: ^0.4.5
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
# The value of AppId uniquely identifies this application.
|
||||
# Do not use the same AppId value in installers for other applications.
|
||||
app_id: 9EBCC58D-39D5-4A4A-92B6-966DFFD6CA22
|
||||
publisher: LeanFlutter
|
||||
publisher_url: https://github.com/leanflutter/flutter_distributor
|
||||
display_name: 作业批阅
|
||||
create_desktop_icon: true
|
||||
# See: https://jrsoftware.org/ishelp/index.php?topic=setup_defaultdirname
|
||||
# install_dir_name: "D:\\HELLO-WORLD"
|
||||
locales:
|
||||
- en
|
||||
- zh
|
||||
|
|
@ -120,12 +120,10 @@ END
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
...
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// WinSparkle
|
||||
//
|
||||
|
||||
+/////////////////////////////////////////////////////////////////////////////
|
||||
+//
|
||||
+// WinSparkle
|
||||
+//
|
||||
|
||||
+// And verify signature using DSA public key:
|
||||
+DSAPub DSAPEM "../../dsa_pub.pem"
|
||||
// And verify signature using DSA public key:
|
||||
DSAPub DSAPEM "./../../dsa_pub.pem"
|
||||
|
|
|
|||
Loading…
Reference in New Issue