Commit 03d306d8 authored by Ingemar Ceicer's avatar Ingemar Ceicer

Linux installer

parent 5f6f0175
......@@ -37,3 +37,4 @@ win-portable*.zip
# Linux executable
**/hashsum-*
**/hashsum
**/install*
......@@ -108,20 +108,33 @@ Hash::Hash(QWidget *parent) :
connect(ui->actionLicense, SIGNAL(triggered()), this, SLOT(license()));
connect(ui->actionAbout, SIGNAL(triggered()), this, SLOT(about()));
connect(ui->actionVersionHistory, SIGNAL(triggered()), this, SLOT(versionhistory()));
#ifdef Q_OS_WIN // Windows 32- and 64-bit
//#ifdef Q_OS_WIN // Windows 32- and 64-bit
/* UNINSTALL */
connect(ui->actionUninstall, &QAction::triggered, [] {
// AppWiz.cpl
#ifdef Q_OS_WIN // Windows 32- and 64-bit
bool b = QProcess::startDetached("control AppWiz.cpl");
if(b)
exit(0);
QMessageBox::critical(nullptr, APPLICATION_NAME " " VERSION, tr("\"Control Panel\\All Control Panel Items\\Programs and Features\" cannot be found"));
#endif
QString path = QCoreApplication::applicationDirPath() + "/hashSumMaintenanceTool";
qInfo() << path;
bool b = QProcess::startDetached(path);
// bool b = QProcess::startDetached("/opt/Hashsum/hashSumMaintenanceTool");
if(b)
exit(0);
QMessageBox::critical(nullptr, APPLICATION_NAME " " VERSION, tr("MaintenanceTool cannot be found"));
#ifdef Q_OS_LINUX // Linux
});
#endif
});
//#endif
// Language
connect(ui->actionSwedish, SIGNAL(triggered()), this, SLOT(swedish()));
connect(ui->actionGreek, SIGNAL(triggered()), this, SLOT(greek()));
......@@ -3425,6 +3438,8 @@ void Hash::setStartConfig()
ui->actionUninstall->setVisible(true);
ui->actionUninstall->setEnabled(true);
#endif
ui->actionUninstall->setVisible(true);
ui->actionUninstall->setEnabled(true);
// End Windows
}
void Hash::setEndConfig()
......
<?xml version="1.0"?>
<Installer>
<WizardStyle>Modern</WizardStyle>
<Name>hashSum</Name>
<Version>2.5.1</Version>
<Title>hashSum 2.5.1 Setup</Title>
<Publisher>Ceicer IT</Publisher>
<ProductUrl>https://gitlab.com/posktomten/hashsum/-/wikis/home</ProductUrl>
<InstallerApplicationIcon>hashsum</InstallerApplicationIcon>
<InstallerWindowIcon>hashsum</InstallerWindowIcon>
<RunProgram>@[email protected]/hashsum-2.5.1</RunProgram>
<StartMenuDir>hashSum</StartMenuDir>
<MaintenanceToolName>hashSumMaintenanceTool</MaintenanceToolName>
<AllowNonAsciiCharacters>true</AllowNonAsciiCharacters>
<TargetDir>@[email protected]/Hashsum</TargetDir>
<AdminTargetDir>@[email protected]/Hashsum</AdminTargetDir>
</Installer>
function Component()
{
gui.pageWidgetByObjectName("LicenseAgreementPage").entered.connect(changeLicenseLabels);
}
Component.prototype.createOperations = function()
{
component.createOperations();
if (systemInfo.productType === "windows") {
component.addOperation("CreateShortcut", "@[email protected]/hashsum-2.5.1", "@[email protected]/hashsum-2.5.1.lnk",
"[email protected]@", "[email protected]@/hashsum.ico");
component.addOperation("CreateShortcut", "@[email protected]/hashsum-2.5.1", "@[email protected]/hashsum-2.5.1.lnk",
"[email protected]@", "[email protected]@/hashsum.ico");
}
}
changeLicenseLabels = function()
{
page = gui.pageWidgetByObjectName("LicenseAgreementPage");
page.AcceptLicenseLabel.setText("Yes I do!");
page.RejectLicenseLabel.setText("No I don't!");
}
<Package>
<DisplayName>hashSum 2.5.1</DisplayName>
<Description>A program to compare files and to calculate hash sums</Description>
<Version>2.5.1</Version>
<ReleaseDate>2020-05-22</ReleaseDate>
<Licenses>
<License file="gpl.txt" name="GPL Version 3" />
</Licenses>
<Default>true</Default>
<ForcedInstallation>false</ForcedInstallation>
<Script>installerscript.qs</Script>
</Package>
\ No newline at end of file
/opt/Qt/Tools/QtInstallerFramework/3.2/bin/binarycreator -c config/config.xml -p packages install-hashSum_X86_64-2.5.1
installerbase
binarycreator
repogen
archivegen
devtool
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment