Skip to content
GitLab
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
667d6456
Commit
667d6456
authored
Nov 02, 2010
by
Christian Kandeler
Browse files
Maemo: By default, strip release binaries.
But never strip debug binaries. Task-number: QTCREATORBUG-2981
parent
22f03cbd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.cpp
View file @
667d6456
...
...
@@ -159,8 +159,8 @@ bool MaemoPackageCreationStep::createPackage(QProcess *buildProc)
emit
addOutput
(
tr
(
"Creating package file ..."
),
MessageOutput
);
checkProjectName
();
QString
error
;
if
(
!
preparePackagingProcess
(
buildProc
,
maemoToolChain
(),
buildDirectory
(),
&
error
))
{
if
(
!
preparePackagingProcess
(
buildProc
,
qt4BuildConfiguration
(),
buildDirectory
(),
&
error
))
{
raiseError
(
error
);
return
false
;
}
...
...
@@ -488,8 +488,14 @@ void MaemoPackageCreationStep::raiseError(const QString &shortMsg,
}
bool
MaemoPackageCreationStep
::
preparePackagingProcess
(
QProcess
*
proc
,
const
MaemoToolChai
n
*
t
c
,
const
QString
&
workingDir
,
QString
*
error
)
const
Qt4BuildConfiguratio
n
*
b
c
,
const
QString
&
workingDir
,
QString
*
error
)
{
const
MaemoToolChain
*
const
tc
=
dynamic_cast
<
const
MaemoToolChain
*>
(
bc
->
toolChain
());
if
(
!
tc
)
{
*
error
=
tr
(
"Build configuration has no Maemo toolchain."
);
return
false
;
}
QFile
configFile
(
tc
->
targetRoot
()
%
QLatin1String
(
"/config.sh"
));
if
(
!
configFile
.
open
(
QIODevice
::
ReadOnly
))
{
*
error
=
tr
(
"Cannot open MADDE config file '%1'."
)
...
...
@@ -511,6 +517,15 @@ bool MaemoPackageCreationStep::preparePackagingProcess(QProcess *proc,
env
.
insert
(
key
,
tc
->
targetRoot
()
%
"/bin"
%
colon
%
env
.
value
(
key
));
env
.
insert
(
key
,
path
%
QLatin1String
(
"madbin"
)
%
colon
%
env
.
value
(
key
));
if
(
bc
->
qmakeBuildConfiguration
()
&
QtVersion
::
DebugBuild
)
{
const
QLatin1String
debOptionsKey
(
"DEB_BUILD_OPTIONS"
);
QString
debOptions
=
env
.
value
(
debOptionsKey
);
if
(
!
debOptions
.
isEmpty
())
debOptions
+=
QLatin1Char
(
' '
);
debOptions
+=
QLatin1String
(
"nostrip"
);
env
.
insert
(
debOptionsKey
,
debOptions
);
}
QString
perlLib
=
QDir
::
fromNativeSeparators
(
path
%
QLatin1String
(
"madlib/perl5"
));
#ifdef Q_OS_WIN
...
...
src/plugins/qt4projectmanager/qt-maemo/maemopackagecreationstep.h
View file @
667d6456
...
...
@@ -75,8 +75,9 @@ public:
const
MaemoToolChain
*
maemoToolChain
()
const
;
static
bool
preparePackagingProcess
(
QProcess
*
proc
,
const
MaemoToolChain
*
tc
,
const
QString
&
workingDir
,
QString
*
error
);
static
bool
preparePackagingProcess
(
QProcess
*
proc
,
const
Qt4BuildConfiguration
*
bc
,
const
QString
&
workingDir
,
QString
*
error
);
static
QString
packagingCommand
(
const
MaemoToolChain
*
tc
,
const
QString
&
commandName
);
static
QString
packageName
(
const
ProjectExplorer
::
Project
*
project
);
...
...
src/plugins/qt4projectmanager/qt-maemo/maemotemplatesmanager.cpp
View file @
667d6456
...
...
@@ -155,13 +155,15 @@ bool MaemoTemplatesManager::createDebianTemplatesIfNecessary(const ProjectExplor
QString
error
;
const
Qt4Target
*
const
qt4Target
=
qobject_cast
<
const
Qt4Target
*>
(
target
);
Q_ASSERT_X
(
qt4Target
,
Q_FUNC_INFO
,
"Target ID does not match actual type."
);
const
Qt4BuildConfiguration
*
const
bc
=
qt4Target
->
activeBuildConfiguration
();
const
MaemoToolChain
*
const
tc
=
dynamic_cast
<
MaemoToolChain
*>
(
qt4Target
->
activeBuildConfiguration
()
->
toolChain
());
=
dynamic_cast
<
MaemoToolChain
*>
(
bc
->
toolChain
());
if
(
!
tc
)
{
qDebug
(
"Maemo target has no Maemo toolchain."
);
return
false
;
}
if
(
!
MaemoPackageCreationStep
::
preparePackagingProcess
(
&
dh_makeProc
,
t
c
,
if
(
!
MaemoPackageCreationStep
::
preparePackagingProcess
(
&
dh_makeProc
,
b
c
,
projectDir
.
path
()
+
QLatin1Char
(
'/'
)
+
PackagingDirName
,
&
error
))
{
raiseError
(
error
);
return
false
;
...
...
@@ -221,7 +223,6 @@ bool MaemoTemplatesManager::adaptRulesFile(const Project *project)
QByteArray
rulesContents
=
rulesFile
.
readAll
();
rulesContents
.
replace
(
"DESTDIR"
,
"INSTALL_ROOT"
);
rulesContents
.
replace
(
"dh_shlibdeps"
,
"# dh_shlibdeps"
);
rulesContents
.
replace
(
"dh_strip"
,
"# dh_strip"
);
// rulesContents.replace("$(MAKE) clean", "# $(MAKE) clean");
// const Qt4Project * const qt4Project
// = static_cast<const Qt4Project *>(project);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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