Re: Qt module doesn't like having QTDIR set

Bram Moolenaar <[email protected]> Tue, 17 Jan 2006 16:46:38 +0100
Newsgroups gmane.comp.tools.aap.devel
Message-ID <[email protected]>
Adriaan de Groot wrote:

> Since noone ever uses the Qt module, weird-ass logic errors stay in it
> for a long time. Now that I'm pushing AAP along with KPilot, it gets
> used and breaks. My previous patch unbreaking the syntax hasn't been
> applied yet, I see, but here's a new one: allow QTDIR to be set to
> define the prefix where Qt is installed -- instead of it working,
> setting QTDIR causes an :error.

Ah, obvious mistake.

Instead of using @else:, why not use @elif?  Then it looks like this:

QTDIR =3D `os.environ.get("QTDIR")`
@if not QTDIR:
  @for dir in ['/usr/X11R6', '/usr', '/usr/local']:
    @if os.path.isdir(dir) and os.path.isfile(dir + "/include/qglobal.h")=
:
      QTDIR =3D `dir`
  @if not QTDIR:
    :error No QTDIR specified; Qt could not be found automatically.
  # Patently impossible
  @if not os.path.isdir(QTDIR):
    :error Autodetected Qt directory ($QTDIR) is not a directory.
@elif not os.path.isdir(QTDIR):
  :error Environment variable QTDIR ($QTDIR) does not specify the Qt dire=
ctory.

@if not os.path.isfile(QTDIR + "/include/qglobal.h"):
  :error Qt directory ($QTDIR) is missing include/qglobal.h


If that's OK with you I'll send out a new dot release.

--=20
From "know your smileys":
 y:-)	Bad toupee

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \=
\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ =
\\\
\\\        download, build and distribute -- http://www.A-A-P.org        =
///
 \\\            help me help AIDS victims -- http://www.ICCF.nl         /=
//


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642