~ubuntu-branches/ubuntu/vivid/qtcreator-plugin-ubuntu/vivid

« back to all changes in this revision

Viewing changes to src/ubuntu/ubuntupackagestep.cpp

  • Committer: Package Import Robot
  • Author(s): CI Train Bot, Benjamin Zeller, CI Train Bot
  • Date: 2015-04-20 21:31:37 UTC
  • mfrom: (1.1.99)
  • Revision ID: package-import@ubuntu.com-20150420213137-q9stwtk0mxjctfsl
Tags: 3.1.1+15.04.20150420.1-0ubuntu1
[ Benjamin Zeller ]
* Fix bug lp:1446062, RSync failes if translation dir is not created
  (LP: #1446062)

[ CI Train Bot ]
* New rebuild forced.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
 
74
74
bool UbuntuPackageStep::init()
75
75
{
 
76
    //initialization happens in internalInit,
 
77
    //because it requires informations that are only available at this
 
78
    //time
 
79
    //@TODO refactor into single buildsteps per projecttype
 
80
    return true;
 
81
}
 
82
 
 
83
void UbuntuPackageStep::internalInit()
 
84
{
76
85
    m_tasks.clear();
77
86
 
78
87
    QString projectDir = target()->project()->projectDirectory();
81
90
    Utils::Environment env = Utils::Environment::systemEnvironment();
82
91
    Utils::AbstractMacroExpander *mExp = 0;
83
92
 
 
93
    m_MakeParam = m_ClickParam = m_ReviewParam = ProjectExplorer::ProcessParameters();
 
94
    m_clickPackageName.clear();
 
95
 
84
96
    bool isCMake  = target()->project()->id() == CMakeProjectManager::Constants::CMAKEPROJECT_ID;
85
97
    bool isQMake  = target()->project()->id() == QmakeProjectManager::Constants::QMAKEPROJECT_ID;
86
98
 
103
115
                m_tasks.append(t);
104
116
 
105
117
                //UbuntuClickPackageStep::run will stop if tasks exist
106
 
                return true;
 
118
                return;
107
119
            } else {
108
120
                //backward compatibility, old HTML5 projects did not have a Buildconfiguration
109
121
                //this would crash otherwise
174
186
                      << QStringLiteral("--exclude")<<QStringLiteral("*.ubuntuhtmlproject")
175
187
                      << QString(QStringLiteral("--exclude-from=%1")).arg(projectDir+QDir::separator()+QStringLiteral(".excludes"));
176
188
 
177
 
            arguments << projectDir+QDir::separator()
178
 
                      << m_buildDir
 
189
            arguments << projectDir+QDir::separator();
 
190
 
 
191
            QString translationsDir = m_buildDir
179
192
                         + QDir::separator()
180
193
                         + QString::fromLatin1(Constants::UBUNTU_CLICK_QML_BUILD_TRANSL_DIR)
181
 
                         + QDir::separator()
182
 
                      << m_deployDir;
 
194
                         + QDir::separator();
 
195
 
 
196
            if (QDir(translationsDir).exists())
 
197
                arguments << translationsDir;
 
198
 
 
199
            arguments << m_deployDir;
183
200
 
184
201
            ProjectExplorer::ProcessParameters* params = &m_MakeParam;
185
202
            params->setMacroExpander(mExp);
240
257
        params->setEnvironment(tmpEnv);
241
258
    }
242
259
 
243
 
    return true;
 
260
    return;
244
261
}
245
262
 
246
263
void UbuntuPackageStep::run(QFutureInterface<bool> &fi)
247
264
{
 
265
    internalInit();
 
266
 
248
267
    if (m_tasks.size()) {
249
268
        foreach (const ProjectExplorer::Task& task, m_tasks) {
250
269
            addTask(task);