Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
3031eae8
Commit
3031eae8
authored
Apr 07, 2011
by
Christian Kandeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Maemo: Support copying directries to sysroot.
parent
11974a14
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
+1
-1
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
+37
-0
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
+2
-0
No files found.
src/plugins/qt4projectmanager/qt-maemo/maemodeploystep.cpp
View file @
3031eae8
...
...
@@ -650,7 +650,7 @@ void MaemoDeployStep::installToSysroot()
+
d
.
remoteDir
+
sep
+
QFileInfo
(
d
.
localFilePath
).
fileName
();
sysRootDir
.
mkpath
(
d
.
remoteDir
.
mid
(
1
));
QFile
::
remove
(
targetFilePath
);
if
(
!
QFile
::
cop
y
(
d
.
localFilePath
,
targetFilePath
))
{
if
(
!
MaemoGlobal
::
copyRecursivel
y
(
d
.
localFilePath
,
targetFilePath
))
{
writeOutput
(
tr
(
"Sysroot installation failed: "
"Could not copy '%1' to '%2'. Continuing anyway."
)
.
arg
(
QDir
::
toNativeSeparators
(
d
.
localFilePath
),
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.cpp
View file @
3031eae8
...
...
@@ -254,6 +254,43 @@ bool MaemoGlobal::removeRecursively(const QString &filePath, QString &error)
return
true
;
}
bool
MaemoGlobal
::
copyRecursively
(
const
QString
&
srcFilePath
,
const
QString
&
tgtFilePath
,
QString
*
error
)
{
QFileInfo
srcFileInfo
(
srcFilePath
);
if
(
srcFileInfo
.
isDir
())
{
QDir
targetDir
(
tgtFilePath
);
targetDir
.
cdUp
();
if
(
!
targetDir
.
mkdir
(
QFileInfo
(
tgtFilePath
).
fileName
()))
{
if
(
error
)
{
*
error
=
tr
(
"Failed to create directory '%1'."
)
.
arg
(
QDir
::
toNativeSeparators
(
tgtFilePath
));
return
false
;
}
}
QDir
sourceDir
(
srcFilePath
);
QStringList
fileNames
=
sourceDir
.
entryList
(
QDir
::
Files
|
QDir
::
Dirs
|
QDir
::
NoDotAndDotDot
);
foreach
(
const
QString
&
fileName
,
fileNames
)
{
const
QString
newSrcFilePath
=
srcFilePath
+
QLatin1Char
(
'/'
)
+
fileName
;
const
QString
newTgtFilePath
=
tgtFilePath
+
QLatin1Char
(
'/'
)
+
fileName
;
if
(
!
copyRecursively
(
newSrcFilePath
,
newTgtFilePath
))
return
false
;
}
}
else
{
if
(
!
QFile
::
copy
(
srcFilePath
,
tgtFilePath
))
{
if
(
error
)
{
*
error
=
tr
(
"Could not copy file '%1' to '%2'."
)
.
arg
(
QDir
::
toNativeSeparators
(
srcFilePath
),
QDir
::
toNativeSeparators
(
tgtFilePath
));
}
return
false
;
}
}
return
true
;
}
bool
MaemoGlobal
::
callMad
(
QProcess
&
proc
,
const
QStringList
&
args
,
const
QtVersion
*
qtVersion
,
bool
useTarget
)
{
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoglobal.h
View file @
3031eae8
...
...
@@ -107,6 +107,8 @@ public:
static
PackagingSystem
packagingSystem
(
MaemoVersion
maemoVersion
);
static
bool
removeRecursively
(
const
QString
&
filePath
,
QString
&
error
);
static
bool
copyRecursively
(
const
QString
&
srcFilePath
,
const
QString
&
tgtFilePath
,
QString
*
error
=
0
);
template
<
class
T
>
static
T
*
buildStep
(
const
ProjectExplorer
::
DeployConfiguration
*
dc
)
{
...
...
Write
Preview
Markdown
is supported
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