Closed seayao closed 1 year ago
<?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.0.1</title>
<!-- <sparkle:releaseNotesLink>
</sparkle:releaseNotesLink> -->
<pubDate>Wed, 30 Nov 2022 20:00:00 +0800</pubDate>
<enclosure url="http://localhost:5000/mysetup.exe"
sparkle:dsaSignature="MEUCIDuzo4jJcDeV1JdhBg0pDrrWbwHoeJEBIN3VOiqUwJTOAiEAqtzumcnV1eKXrOfV2YvIeH1bLXrFAfXMzzEiWF3VHzo="
sparkle:version="1.0.1"
sparkle:os="windows"
length="0"
type="application/octet-stream" />
</item>
</channel>
</rss>
其中:http://localhost:5000/mysetup.exe 是用Inno Setup生成的安装程序; sparkle:dsaSignature是用命令flutter pub run auto_updater:sign_update生成的。
Runner.rc中:
#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
#else
#define VERSION_AS_NUMBER 1,0,1
#endif
#if defined(FLUTTER_VERSION)
#define VERSION_AS_STRING FLUTTER_VERSION
#else
#define VERSION_AS_STRING "1.0.1"
#endif
更新报错,求助。
请更新到 0.1.7,确保 在 Runner.rc 文件添加了以下内容,并且确保 sparkle:version 包含 buildnumber 如: 1.0.1+2
/////////////////////////////////////////////////////////////////////////////
//
// WinSparkle
//
// And verify signature using DSA public key:
DSAPub DSAPEM "../../dsa_pub.pem"
appcast.xml文件内容如下: