Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
69265615
Commit
69265615
authored
Jan 06, 2011
by
Christian Kandeler
Browse files
Maemo: Enable dependency checking for release builds and publishing.
Task-number: QTCREATORBUG-3228
parent
ef48b331
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
View file @
69265615
...
...
@@ -285,7 +285,7 @@ bool MaemoPackageCreationStep::copyDebianFiles(bool inSourceBuild)
}
if
(
fileName
==
QLatin1String
(
"rules"
))
updateDesktop
File
s
(
destFile
);
adaptRules
File
(
destFile
);
}
QFile
magicFile
(
magicFilePath
);
...
...
@@ -536,7 +536,19 @@ QString MaemoPackageCreationStep::packageFileName(const ProjectExplorer::Project
%
QLatin1String
(
"_armel.deb"
);
}
void
MaemoPackageCreationStep
::
updateDesktopFiles
(
const
QString
&
rulesFilePath
)
void
MaemoPackageCreationStep
::
ensureShlibdeps
(
QByteArray
&
rulesContent
)
{
QString
contentAsString
=
QString
::
fromLocal8Bit
(
rulesContent
);
const
QString
whiteSpace
(
QLatin1String
(
"[
\\
t]*"
));
const
QString
pattern
=
QLatin1String
(
"
\\
n"
)
+
whiteSpace
+
QLatin1Char
(
'#'
)
+
whiteSpace
+
QLatin1String
(
"dh_shlibdeps"
)
+
QLatin1String
(
"[^
\\
n]*
\\
n"
);
contentAsString
.
replace
(
QRegExp
(
pattern
),
QLatin1String
(
"
\n\t
dh_shlibdeps
\n
"
));
rulesContent
=
contentAsString
.
toLocal8Bit
();
}
void
MaemoPackageCreationStep
::
adaptRulesFile
(
const
QString
&
rulesFilePath
)
{
QFile
rulesFile
(
rulesFilePath
);
rulesFile
.
setPermissions
(
rulesFile
.
permissions
()
|
QFile
::
ExeUser
);
...
...
@@ -554,8 +566,9 @@ void MaemoPackageCreationStep::updateDesktopFiles(const QString &rulesFilePath)
QString
desktopFileDir
=
QFileInfo
(
rulesFile
).
dir
().
path
()
+
QLatin1Char
(
'/'
)
+
projectName
()
+
QLatin1String
(
"/usr/share/applications/"
);
const
Qt4BuildConfiguration
*
const
bc
=
qt4BuildConfiguration
();
const
MaemoGlobal
::
MaemoVersion
version
=
MaemoGlobal
::
version
(
qt4BuildConfiguration
()
->
qtVersion
());
=
MaemoGlobal
::
version
(
bc
->
qtVersion
());
if
(
version
==
MaemoGlobal
::
Maemo5
)
desktopFileDir
+=
QLatin1String
(
"hildon/"
);
#ifdef Q_OS_WIN
...
...
@@ -585,6 +598,11 @@ void MaemoPackageCreationStep::updateDesktopFiles(const QString &rulesFilePath)
addSedCmdToRulesFile
(
content
,
insertPos
,
desktopFilePath
,
lineBefore
,
lineAfter
);
}
// Always check for dependencies in release builds.
if
(
!
(
bc
->
qmakeBuildConfiguration
()
&
QtVersion
::
DebugBuild
))
ensureShlibdeps
(
content
);
rulesFile
.
resize
(
0
);
rulesFile
.
write
(
content
);
}
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
View file @
69265615
...
...
@@ -80,6 +80,7 @@ public:
static
QString
packageName
(
const
ProjectExplorer
::
Project
*
project
);
static
QString
packageFileName
(
const
ProjectExplorer
::
Project
*
project
,
const
QString
&
version
);
static
void
ensureShlibdeps
(
QByteArray
&
rulesContent
);
QString
projectName
()
const
;
const
Qt4BuildConfiguration
*
qt4BuildConfiguration
()
const
;
...
...
@@ -117,7 +118,7 @@ private:
QString
buildDirectory
()
const
;
MaemoDeployStep
*
deployStep
()
const
;
void
checkProjectName
();
void
updateDesktop
File
s
(
const
QString
&
rulesFilePath
);
void
adaptRules
File
(
const
QString
&
rulesFilePath
);
void
addWorkaroundForHarmattanBug
(
QByteArray
&
rulesFileContent
,
int
&
insertPos
,
const
MaemoDeployableListModel
*
model
,
const
QString
&
desktopFileDir
);
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopublisherfremantlefree.cpp
View file @
69265615
...
...
@@ -227,6 +227,7 @@ bool MaemoPublisherFremantleFree::copyRecursively(const QString &srcFilePath,
rulesContents
.
replace
(
"$(MAKE) clean"
,
"# $(MAKE) clean"
);
rulesContents
.
replace
(
"# Add here commands to configure the package."
,
"qmake "
+
QFileInfo
(
m_project
->
file
()
->
fileName
()).
fileName
().
toLocal8Bit
());
MaemoPackageCreationStep
::
ensureShlibdeps
(
rulesContents
);
rulesFile
.
resize
(
0
);
rulesFile
.
write
(
rulesContents
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment