123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125 |
- #ifndef MAEMO5QTPROJECTGENERATOR_H
- #define MAEMO5QTPROJECTGENERATOR_H
- #include <QMap>
- #include <QObject>
- #include <QSet>
- #include <QString>
- #include <QStack>
- #include <QProcess>
- #include "defines.h"
- #include "generatordata.h"
- #include "generatoroutputview.h"
- #include "iqtprojectgenerator.h"
- class Maemo5ProcessRunner;
- class Maemo5QtProjectGenerator : public IQtProjectGenerator
- {
- Q_OBJECT
- protected:
- //
- // protected members
- //
- GeneratorOutputView & m_outputView;
- GeneratorData m_generatorData;
- Maemo5ProcessRunner * m_processRunner;
- GeneratorPhase m_currentGeneratorPhase;
- GeneratorTarget m_generatorTarget;
- // TODO ? QStack<QString> m_pluginDirs;
- WidgetType m_resolvedWidgetType;
- QString m_appName;
- QString m_appDisplayName;
- QMap<QString, QString> m_filenameSubstitutions;
- QSet<QString> m_ignorePatterns;
- QMap<QString, QString> m_keywordSubstitutions;
- public:
- //
- // lifetime management
- //
- Maemo5QtProjectGenerator(GeneratorOutputView & outputView,
- QObject * parent = NULL);
- virtual ~Maemo5QtProjectGenerator();
- //
- // public operators
- //
- signals:
- void started(GeneratorTarget target);
- void finished(int exitCode);
- public:
- virtual IStatusUpdater * createStatusUpdater(QObject * parent = NULL);
- virtual const PlatformType& platform();
- virtual void build(const QString &widgetFile,
- RcSession & /* rcSession */);
- virtual void rebuild(RcSession & /* rcSession */);
- virtual void preview(const QString &widgetFile);
- virtual void closeProject();
- virtual GeneratorOutputView &outputView() const;
- virtual GeneratorData &generatorData();
- virtual GeneratorPhase getCurrentPhase() const;
- virtual GeneratorTarget getTarget() const;
- virtual QString getStatusText() const;
- virtual QWidget * createSettingsWidget(const QString & widgetFile,
- QWidget * parent = NULL) const;
- virtual void saveSettings(QWidget * settingsWidget) const;
- virtual QStringList errorsForTarget(GeneratorTarget generatorTarget) const;
- virtual PkgInstallResult installPkg(const QFileInfo & pkgFile) const;
- protected slots:
- virtual void dpkgBuildPackageFinished(int exitCode,
- QProcess::ExitStatus exitStatus);
- virtual void widgetFilesCopied(int exitCode,
- QProcess::ExitStatus exitStatus = QProcess::NormalExit);
- protected:
- // OBS virtual Maemo5ProcessRunner * createProcessRunner();
- void copyWidgetDirectory(const QString &wgzFile); // Uncompress widget file
- bool prepareProject();
- bool prepareEnvironment(const QString &wgzFile);
- void unzipWidgetFile(const QString &wgzFile);
- bool registerStatus(bool status);
- void sniffWidgetType();
- bool copyFrameworkAndPluginSrcFiles();
- bool prepareEnvironmentForNonWRTWidget();
- bool handleWidgetConfigFile();
- bool copyHybridApiJs();
- bool copyDisableSelectionCSS();
- void handleWidgetDirectory();
- bool updateMainFile();
- bool updateMainWindowFile();
- void parseWidgetResourceFile();
- bool updateFrameworkProjectFile();
- bool copyMaemo5Files();
- bool copyCopyrightFile();
- virtual void startBuild();
- /** OBS
- * Synchronously unzips a widget file - returns with success.
- * /
- bool syncUnzipWidgetFile(const QString & wgzFile,
- const QString & unzipDir);
- void sniffAppNames(const QString & widgetFile);
- */
- void updateSubstitutions(const QString & widgetFile);
- };
- #endif // MAEMO5QTPROJECTGENERATOR_H
|