Skip to content

Commit

Permalink
get rid of syncqt wrapper scripts
Browse files Browse the repository at this point in the history
instead, rename it to syncqt.pl and rely on qtPrepareTool()'s new
ability to correctly invoke it as a perl script even under windows.
the wrappers themselves have been trivial at this point, so there is no
added value in keeping them, either.

Change-Id: I77cf65edbcfaa48ed1900defe940d4eb4b82d5b9
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Joerg Bornemann <[email protected]>
  • Loading branch information
ossilator authored and The Qt Project committed May 13, 2013
1 parent 8a78225 commit 6b38524
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 82 deletions.
44 changes: 0 additions & 44 deletions bin/syncqt.bat

This file was deleted.

File renamed without changes.
13 changes: 2 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -2396,15 +2396,6 @@ if [ "$OPT_SHADOW" = "yes" ]; then

[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"

# make a syncqt script that can be used in the shadow
rm -f "$outpath/bin/syncqt"
if [ -x "$relpath/bin/syncqt" ]; then
mkdir -p "$outpath/bin"
echo "#!/bin/sh" >"$outpath/bin/syncqt"
echo "perl \"$relpath/bin/syncqt\" \"\$@\"" >>"$outpath/bin/syncqt"
chmod 755 "$outpath/bin/syncqt"
fi

# save a pre-existing mkspecs/modules dir
test -d "$outpath/mkspecs/modules" && \
mv "$outpath/mkspecs/modules" "$outpath/mkspecs-modules"
Expand Down Expand Up @@ -3892,8 +3883,8 @@ fi
# -----------------------------------------------------------------------------
# symlink includes
if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt" ]; then
"$outpath/bin/syncqt" -minimal -module QtCore "$relpath" || exit 1
if [ -n "$PERL" ] && [ -x "$relpath/bin/syncqt.pl" ]; then
"$relpath/bin/syncqt.pl" -minimal -module QtCore "$relpath" || exit 1
fi
# $1: input variable name (awk regexp)
Expand Down
2 changes: 1 addition & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ if not exist mkspecs (
md mkspecs
if errorlevel 1 goto exit
)
perl %QTSRC%bin\syncqt -minimal -module QtCore -outdir %QTDIR% %QTSRC%
perl %QTSRC%bin\syncqt.pl -minimal -module QtCore -outdir %QTDIR% %QTSRC%
if errorlevel 1 goto exit

if not exist tools\configure (
Expand Down
7 changes: 2 additions & 5 deletions qtbase.pro
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,14 @@ INSTALLS += qmake

#syncqt
syncqt.path = $$[QT_HOST_BINS]
syncqt.files = $$PWD/bin/syncqt
equals(QMAKE_HOST.os, Windows):syncqt.files += $$PWD/bin/syncqt.bat
syncqt.files = $$PWD/bin/syncqt.pl
INSTALLS += syncqt

# If we are doing a prefix build, create a "module" pri which enables
# qtPrepareTool() to find the non-installed syncqt.
prefix_build {

cmd = $$shell_path($$OUT_PWD/bin/syncqt)
contains(QMAKE_HOST.os, Windows): \
cmd = $${cmd}.bat
cmd = perl -w $$shell_path($$PWD/bin/syncqt.pl)

TOOL_PRI = $$OUT_PWD/mkspecs/modules/qt_tool_syncqt.pri

Expand Down
24 changes: 3 additions & 21 deletions tools/configure/configureapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,24 +160,6 @@ Configure::Configure(int& argc, char** argv)
cout << "Preparing build tree..." << endl;
QDir(buildPath).mkpath("bin");

{ //make a syncqt script(s) that can be used in the shadow
QFile syncqt(buildPath + "/bin/syncqt");
// no QFile::Text, just in case the perl interpreter can't cope with them (unlikely)
if (syncqt.open(QFile::WriteOnly)) {
QTextStream stream(&syncqt);
stream << "#!/usr/bin/perl -w" << endl
<< "require \"" << sourcePath + "/bin/syncqt\";" << endl;
}
QFile syncqt_bat(buildPath + "/bin/syncqt.bat");
if (syncqt_bat.open(QFile::WriteOnly | QFile::Text)) {
QTextStream stream(&syncqt_bat);
stream << "@echo off" << endl
<< "call " << QDir::toNativeSeparators(sourcePath + "/bin/syncqt.bat")
<< " %*" << endl;
syncqt_bat.close();
}
}

//copy the mkspecs
buildDir.mkpath("mkspecs");
if (!Environment::cpdir(sourcePath + "/mkspecs", buildPath + "/mkspecs")){
Expand Down Expand Up @@ -2029,8 +2011,7 @@ QString Configure::defaultTo(const QString &option)
return "auto";

if (option == "SYNCQT"
&& (!QFile::exists(sourcePath + "/bin/syncqt") ||
!QFile::exists(sourcePath + "/bin/syncqt.bat")))
&& (!QFile::exists(sourcePath + "/bin/syncqt.pl")))
return "no";

return "yes";
Expand Down Expand Up @@ -3700,7 +3681,8 @@ void Configure::generateHeaders()
if (!QStandardPaths::findExecutable(QStringLiteral("perl.exe")).isEmpty()) {
cout << "Running syncqt..." << endl;
QStringList args;
args += buildPath + "/bin/syncqt.bat";
args << "perl" << "-w";
args += sourcePath + "/bin/syncqt.pl";
args << "-minimal" << "-module" << "QtCore";
args += sourcePath;
int retc = Environment::execute(args, QStringList(), QStringList());
Expand Down

0 comments on commit 6b38524

Please sign in to comment.