Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
a497e669
Commit
a497e669
authored
16 years ago
by
Roberto Raggi
Committed by
Thorbjørn Lindeijer
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
bootstrapped
(cherry picked from commit
442c946a
)
parent
b93562ae
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/tools/qpatch/bootstrap.pri
+64
-0
64 additions, 0 deletions
src/tools/qpatch/bootstrap.pri
src/tools/qpatch/qpatch.cpp
+12
-12
12 additions, 12 deletions
src/tools/qpatch/qpatch.cpp
src/tools/qpatch/qpatch.pro
+8
-0
8 additions, 0 deletions
src/tools/qpatch/qpatch.pro
with
84 additions
and
12 deletions
src/tools/qpatch/bootstrap.pri
0 → 100644
+
64
−
0
View file @
a497e669
CONFIG += console qtinc
CONFIG -= qt
build_all:!build_pass {
CONFIG -= build_all
CONFIG += release
}
CONFIG -= app_bundle
DEFINES += \
QT_BOOTSTRAPPED \
QT_LITE_UNICODE \
QT_TEXTCODEC \
QT_NO_CAST_FROM_ASCII \
QT_NO_CAST_TO_ASCII \
QT_NO_CODECS \
QT_NO_DATASTREAM \
QT_NO_GEOM_VARIANT \
QT_NO_LIBRARY \
QT_NO_QOBJECT \
QT_NO_STL \
QT_NO_SYSTEMLOCALE \
QT_NO_TEXTSTREAM \
QT_NO_THREAD \
QT_NO_UNICODETABLES \
QT_NO_USING_NAMESPACE
win32:DEFINES += QT_NODLL
INCLUDEPATH += $$QT_BUILD_TREE/include \
$$QT_BUILD_TREE/include/QtCore \
$$QT_BUILD_TREE/include/QtXml \
$$QT_SOURCE_TREE/src/xml
DEPENDPATH += $$INCLUDEPATH \
$$QT_SOURCE_TREE/src/corelib/global \
$$QT_SOURCE_TREE/src/corelib/kernel \
$$QT_SOURCE_TREE/src/corelib/tools \
$$QT_SOURCE_TREE/src/corelib/io \
$$QT_SOURCE_TREE/src/corelib/codecs \
$$QT_SOURCE_TREE/src/xml
hpux-acc*|hpuxi-acc* {
LIBS += $$QT_BUILD_TREE/src/tools/bootstrap/libbootstrap.a
} else {
contains(CONFIG, debug_and_release_target) {
CONFIG(debug, debug|release) {
LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/debug
} else {
LIBS+=-L$$QT_BUILD_TREE/src/tools/bootstrap/release
}
} else {
LIBS += -L$$QT_BUILD_TREE/src/tools/bootstrap
}
LIBS += -lbootstrap
}
!contains(QT_CONFIG, zlib):!contains(QT_CONFIG, no-zlib) {
unix:LIBS += -lz
# win32:LIBS += libz.lib
}
win32:LIBS += -luser32
mac {
CONFIG -= incremental
LIBS += -framework CoreServices
}
This diff is collapsed.
Click to expand it.
src/tools/qpatch/qpatch.cpp
+
12
−
12
View file @
a497e669
#include
<QtCore>
//#include <QCoreApplication>
#include
<QStringList>
#include
<QFile>
#include
<QVector>
#include
<QTextStream>
#include
<iostream>
int
main
(
int
argc
,
char
*
argv
[])
{
QCoreApplication
app
(
argc
,
argv
);
QStringList
args
=
app
.
arguments
();
args
.
removeFirst
();
if
(
args
.
size
()
!=
3
)
{
if
(
argc
!=
4
)
{
std
::
cerr
<<
"Usage: qpatch file.list oldQtDir newQtDir"
<<
std
::
endl
;
return
EXIT_FAILURE
;
}
const
Q
String
files
=
arg
s
.
takeFirst
()
;
const
QByteArray
qtDirPath
=
QFile
::
encodeName
(
args
.
takeFirst
())
;
const
QByteArray
newQtPath
=
QFile
::
encodeName
(
args
.
takeFirst
())
;
const
Q
ByteArray
files
=
arg
v
[
1
]
;
const
QByteArray
qtDirPath
=
argv
[
2
]
;
const
QByteArray
newQtPath
=
argv
[
3
]
;
if
(
qtDirPath
.
size
()
<
newQtPath
.
size
())
{
std
::
cerr
<<
"qpatch: error: newQtDir needs to be less than "
<<
qtDirPath
.
size
()
<<
" characters."
...
...
@@ -23,7 +23,7 @@ int main(int argc, char *argv[])
return
EXIT_FAILURE
;
}
QFile
fn
(
files
);
QFile
fn
(
QFile
::
decodeName
(
files
)
)
;
if
(
!
fn
.
open
(
QFile
::
ReadOnly
))
{
std
::
cerr
<<
"qpatch: error: file not found"
<<
std
::
endl
;
return
EXIT_FAILURE
;
...
...
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
}
foreach
(
QString
fileName
,
filesToPatch
)
{
QString
prefix
=
newQtPath
;
QString
prefix
=
QFile
::
decodeName
(
newQtPath
)
;
if
(
!
prefix
.
endsWith
(
QLatin1Char
(
'/'
)))
prefix
+=
QLatin1Char
(
'/'
);
...
...
@@ -126,7 +126,7 @@ int main(int argc, char *argv[])
}
foreach
(
QString
fileName
,
textFilesToPatch
)
{
QString
prefix
=
newQtPath
;
QString
prefix
=
QFile
::
decodeName
(
newQtPath
)
;
if
(
!
prefix
.
endsWith
(
QLatin1Char
(
'/'
)))
prefix
+=
QLatin1Char
(
'/'
);
...
...
This diff is collapsed.
Click to expand it.
src/tools/qpatch/qpatch.pro
+
8
−
0
View file @
a497e669
...
...
@@ -4,3 +4,11 @@ CONFIG += console
macx
:
CONFIG
-=
app_bundle
SOURCES
+=
qpatch
.
cpp
QT_BUILD_TREE
=
$$
fromfile
(
$$
(
QTDIR
)
/.
qmake
.
cache
,
QT_BUILD_TREE
)
QT_SOURCE_TREE
=
$$
fromfile
(
$$
(
QTDIR
)
/.
qmake
.
cache
,
QT_SOURCE_TREE
)
DEFINES
+=
QT_UIC
include
(
bootstrap
.
pri
)
message
(
$$
QT_BUILD_TREE
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment