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
442c946a
Commit
442c946a
authored
Feb 25, 2009
by
Roberto Raggi
Browse files
bootstrapped
parent
bb7c90ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/tools/qpatch/bootstrap.pri
0 → 100644
View file @
442c946a
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
}
src/tools/qpatch/qpatch.cpp
View file @
442c946a
#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
(
'/'
);
...
...
src/tools/qpatch/qpatch.pro
View file @
442c946a
...
...
@@ -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
)
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