如何使用Qt安装程序框架正确创建在线安装程序



我想知道,为什么缺乏关于QtIFM的信息?所以,基本上我已经成功创建了离线安装程序,但现在在线安装程序遇到了一些问题。这是我制作存储库的脚本:

D:QtQtIFW-3.0.6binrepogen.exe -p clientpackages clientclientRepository

这是为了制作安装程序:

D:QtQtIFW-3.0.6binbinarycreator.exe --online-only -c clientconfigconfig_online.xml -p clientpackages clientOnlineInstaller.exe

config_online.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Installer>
    <Name>4x4Basic name</Name>
    <Version>1.0.0</Version>
    <Title>4x4Basic title</Title>
    <Publisher>The AlexLPN Company</Publisher>
    <StartMenuDir>Board4x4</StartMenuDir>
    <TargetDir>@HomeDir@/Board4x4/Basic4x4</TargetDir>
    <RemoteRepositories>
         <Repository>
             <Url>http://github.com/alexlyapin/Basic4x4/clientRepository</Url>
             <Enabled>1</Enabled>
             <DisplayName>Example repository</DisplayName>
         </Repository>
    </RemoteRepositories>
</Installer>

更新.xml:

<?xml version="1.0" encoding="utf-8" ?> 
<Updates>
 <ApplicationName>{Basic4x4}</ApplicationName>
 <ApplicationVersion>1.0.0</ApplicationVersion>
 <Checksum>true</Checksum>
 <PackageUpdate>
  <Name>Basic4x4</Name>
  <DisplayName>Basic4x4 component</DisplayName>
  <Description>This component is uncheckable.</Description>
  <Version>1.0.0</Version>
  <ReleaseDate>2015-12-01</ReleaseDate>
  <SortingPriority>40</SortingPriority>
  <Checkable>false</Checkable>
  <UpdateFile UncompressedSize="56605917" CompressedSize="15509593" OS="Any"/>
  <DownloadableArchives>iconengines.7z,imageformats.7z,platforms.7z,styles.7z,translations.7z,content.7z</DownloadableArchives>
  <Licenses>
   <License name="License agreement" file="license.txt"/>
  </Licenses>
  <SHA1>3ef56b443d43c3d49ee983d7d1f5e6cd6280e30b</SHA1>
 </PackageUpdate>
</Updates>

包作为"https://github.com/alexlyapin/Basic4x4/tree/master/clientRepository"上传到 GitHub 存储库右边有Basic4x4文件夹,更新.xml和许可证.txt

当我制作安装程序并尝试测试存储库时,出现错误:更新.xml:解析元素时出错

因此,位置错误或某些 xml 行。有人可以检查或建议我一些事情吗?谢谢!

我没有亲自尝试过,但使用 github raw 会起作用。

https://raw.githubusercontent.com/alexlyapin/Basic4x4/master/clientRepository/Updates.xml

而不是

https://github.com/alexlyapin/Basic4x4/raw/master/clientRepository/Basic4x4/1.0.0imageformats.7z

我找到了解决方案。关键是,GitHub 不会像某些主机那样为您提供真正的存储库,因此无法进行文件索引。

我已经创建了免费托管并在那里上传了存储库。之后一切正常。

最新更新