@ -32,7 +32,6 @@
# include <iostream>
# include <iostream>
# include <QProcess>
# include <QProcess>
# include <QDir>
# include <QDir>
# include <QRegExp>
# include <QSet>
# include <QSet>
# include <QStack>
# include <QStack>
# include <QDirIterator>
# include <QDirIterator>
@ -46,6 +45,12 @@
# include "shared.h"
# include "shared.h"
# include "excludelist.h"
# include "excludelist.h"
# if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
# define QSTRING_SPLIT_BEHAVIOR_NAMESPACE QString
# else
# define QSTRING_SPLIT_BEHAVIOR_NAMESPACE Qt
# endif
QString appBinaryPath ;
QString appBinaryPath ;
bool runStripEnabled = true ;
bool runStripEnabled = true ;
bool bundleAllButCoreLibs = false ;
bool bundleAllButCoreLibs = false ;
@ -307,7 +312,7 @@ bool copyCopyrightFile(QString libPath){
myProcess - > waitForFinished ( ) ;
myProcess - > waitForFinished ( ) ;
strOut = myProcess - > readAllStandardOutput ( ) ;
strOut = myProcess - > readAllStandardOutput ( ) ;
QStringList outputLines = strOut . split ( " \n " , QString : : SkipEmptyParts ) ;
QStringList outputLines = strOut . split ( " \n " , QSTRING_SPLIT_BEHAVIOR_NAMESPACE : : SkipEmptyParts ) ;
foreach ( QString outputLine , outputLines ) {
foreach ( QString outputLine , outputLines ) {
if ( ( outputLine . contains ( " usr/share/doc " ) ) & & ( outputLine . contains ( " /copyright " ) ) & & ( outputLine . contains ( " " ) ) ) {
if ( ( outputLine . contains ( " usr/share/doc " ) ) & & ( outputLine . contains ( " /copyright " ) ) & & ( outputLine . contains ( " " ) ) ) {
@ -356,7 +361,7 @@ LddInfo findDependencyInfo(const QString &binaryPath)
static const QRegularExpression regexp ( QStringLiteral ( " ^.+ => (.+) \ \ ( " )) ;
static const QRegularExpression regexp ( QStringLiteral ( " ^.+ => (.+) \ \ ( " )) ;
QString output = ldd . readAllStandardOutput ( ) ;
QString output = ldd . readAllStandardOutput ( ) ;
QStringList outputLines = output . split ( " \n " , QString : : SkipEmptyParts ) ;
QStringList outputLines = output . split ( " \n " , QSTRING_SPLIT_BEHAVIOR_NAMESPACE : : SkipEmptyParts ) ;
if ( outputLines . size ( ) < 2 ) {
if ( outputLines . size ( ) < 2 ) {
if ( ( output . contains ( " statically linked " ) = = false ) ) {
if ( ( output . contains ( " statically linked " ) = = false ) ) {
LogError ( ) < < " Could not parse ldd output under 2 lines: " < < output ;
LogError ( ) < < " Could not parse ldd output under 2 lines: " < < output ;
@ -851,7 +856,7 @@ void changeIdentification(const QString &id, const QString &binaryPath)
}
}
}
}
QStringList rpath = oldRpath . split ( " : " , QString : : SkipEmptyParts ) ;
QStringList rpath = oldRpath . split ( " : " , QSTRING_SPLIT_BEHAVIOR_NAMESPACE : : SkipEmptyParts ) ;
rpath . prepend ( id ) ;
rpath . prepend ( id ) ;
rpath . removeDuplicates ( ) ;
rpath . removeDuplicates ( ) ;
foreach ( QString path , QStringList ( rpath ) ) {
foreach ( QString path , QStringList ( rpath ) ) {
@ -1064,7 +1069,11 @@ DeploymentInfo deployQtLibraries(QList<LibraryInfo> libraries,
static QString captureOutput ( const QString & command )
static QString captureOutput ( const QString & command )
{
{
QProcess process ;
QProcess process ;
# if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
process . start ( command , QIODevice : : ReadOnly ) ;
process . start ( command , QIODevice : : ReadOnly ) ;
# else
process . startCommand ( command , QIODevice : : ReadOnly ) ;
# endif
process . waitForFinished ( ) ;
process . waitForFinished ( ) ;
if ( process . exitStatus ( ) ! = QProcess : : NormalExit ) {
if ( process . exitStatus ( ) ! = QProcess : : NormalExit ) {
@ -1129,7 +1138,7 @@ DeploymentInfo deployQtLibraries(const QString &appDirPath, const QStringList &a
QString output = captureOutput ( qmakePath + " -query " ) ;
QString output = captureOutput ( qmakePath + " -query " ) ;
LogDebug ( ) < < " -query output from qmake: " < < output ;
LogDebug ( ) < < " -query output from qmake: " < < output ;
QStringList outputLines = output . split ( " \n " , QString : : SkipEmptyParts ) ;
QStringList outputLines = output . split ( " \n " , QSTRING_SPLIT_BEHAVIOR_NAMESPACE : : SkipEmptyParts ) ;
foreach ( const QString & outputLine , outputLines ) {
foreach ( const QString & outputLine , outputLines ) {
int colonIndex = outputLine . indexOf ( QLatin1Char ( ' : ' ) ) ;
int colonIndex = outputLine . indexOf ( QLatin1Char ( ' : ' ) ) ;
if ( colonIndex ! = - 1 ) {
if ( colonIndex ! = - 1 ) {