和windows的操作步骤差不多,我们需要下装linux下的安装程序,然后修改config.xml、installscript.qs和package.xml文件。
QT QIFW Windows下制作安装包(一)-CSDN博客
<?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>@HomeDir@/app</TargetDir>
<WizardStyle>Modern</WizardStyle>
</Installer>
<?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 operationForLinux()
{
var params = "Name=app" + "\n";
params += "Icon=@TargetDir@app/app.png" + "\n";
params += "Version=@Version@" + "\n";
params += "Exec=@TargetDir@/app/app.sh" + "\n";
params += "Terminal=false" + "\n";
params += "Encoding=UTF-8" + "\n";
params += "Type=Application" + "\n";
var desktop = "app.desktop";
component.addOperation("CreateDesktopEntry", "@TargetDir@/app.desktop", params);
var desktoppath = QDesktopServices.storageLocation(0);
component.addOperation("Copy", "@TargetDir@/app.desktop", desktoppath + "/app.desktop");
}
Component.prototype.createOperations = function()
{
component.createOperations();
operationForLinux();
}
六、打开终端,运行打包命令
打包命令:binarycreator程序路径 -f -c config/config.xml -p packages 安装包名称 -v
?
?1、找到软件的安装位置
2、运行卸载程序
3、进行卸载