1、QIFW是一款基于QT框架开发的跨平台安装框架。QIFW是QT Installer FrameWork的缩写,支持Windows、Linux和macos等多种平台。QIFW可以帮助开发者创建自己的安装程序,将它们打包到通用的安装包中,并提供可视化的界面进行安装。?
?
?
<?xml version="1.0" encoding="UTF-8"?>
<Installer>
<Name>app</Name>
<Version>1.0.0</Version>
<Title>app Installer </Title>
<Publisher>app</Publisher>
<StartMenuDir>app</StartMenuDir>
<TargetDir>@rootDir@/app</TargetDir>
</Installer>
< Name> :软件名称
< Version> :版本号
< Title>: 安装程序窗口标题
< Publisher> :发布者名称
< StartMenuDir>: 要生成的windows开始菜单目录
< TargetDir> :默认安装路径
、
<?xml version="1.0" encoding="UTF-8"?>
<Package>
<DisplayName>app</DisplayName>
<Description>需要安装的组件</Description>
<Version>1.0.0-1</Version>
<ReleaseDate></ReleaseDate>
<Default>script</Default>
<Script>installscript.qs</Script>
<ForcedInstallation>true</ForcedInstallation>
</Package>
function Component()
{
}
function operationForWindows()
{
component.addOperation("CreateShortcut", "@TargetDir@\\app.exe", "@TargetDir@\\app.lnk",
"workingDirectory=@TargetDir@", "iconPath=@TargetDir@\\app.png",s
"iconId=0", "description=start app");
var desktoppath = QDesktopServices.storageLocation(0);
component.addOperation("Copy", "@TargetDir@\\app.lnk", desktoppath +"\\app.lnk");
}
Component.prototype.createOperations = function()
{
component.createOperations();
operationForWindows();
}
?
binarycreator -f -c config/config.xml -p packages app -v
?
??
?