2023-03-02 18:21:43 +08:00
|
|
|
|
#ifndef INSTALLHELPER_H
|
|
|
|
|
#define INSTALLHELPER_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
2023-03-03 18:19:48 +08:00
|
|
|
|
#include <QGuiApplication>
|
2023-03-02 18:21:43 +08:00
|
|
|
|
#include <QDebug>
|
2023-03-03 18:19:48 +08:00
|
|
|
|
|
2023-03-02 18:21:43 +08:00
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
2023-03-03 18:19:48 +08:00
|
|
|
|
|
2023-03-02 18:21:43 +08:00
|
|
|
|
class InstallHelper : public QObject
|
|
|
|
|
{
|
2023-03-03 18:19:48 +08:00
|
|
|
|
|
2023-03-02 18:21:43 +08:00
|
|
|
|
Q_OBJECT
|
|
|
|
|
Q_PROPERTY_AUTO(bool,installing)
|
|
|
|
|
public:
|
|
|
|
|
explicit InstallHelper(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE void install(const QString& path,bool isHome,bool isStartMenu);
|
2023-03-03 18:19:48 +08:00
|
|
|
|
|
|
|
|
|
Q_INVOKABLE QString applicationFilePath(){
|
|
|
|
|
return QGuiApplication::arguments().join(" ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE bool isNavigateUninstall(){
|
|
|
|
|
return true;
|
|
|
|
|
// return QGuiApplication::arguments().contains("--uninstall");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Q_INVOKABLE void uninstall();
|
2023-03-02 18:21:43 +08:00
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // INSTALLHELPER_H
|