Changeset 576


Ignore:
Timestamp:
Feb 18, 2010, 1:39:37 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

configure.cmd: Enabled printing by default.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/README.OS2

    r542 r576  
    4646
    4747      http://unix.os2site.com/pub/binary/make/make-3_81beta1-bin-static.zip
     48
     49  - eCUPS 1.3.11 or later to support printing in Qt. The eCUPS WPI is available
     50    at:
     51
     52      ftp://ftp.netlabs.org/incoming/eCUPS003.wpi   or
     53      ftp://ftp.netlabs.org/pub/ecups/eCUPS003.wpi
     54
     55    Linking against eCUPS also requires pthread.lib:
     56
     57      http://web.os2power.com/download/lib/pthread-20100217-os2.zip
    4858
    4959  - LxLite 1.3.3 or above (not tested) if you want Qt DLLs and application
     
    90100      set PATH=D:\Coding\Qt4\bin;%PATH%
    91101      set BEGINLIBPATH=D:\Coding\Qt4\bin;%BEGINLIBPATH%
     102
     103  - Install the eCUPS WPI archive to enable printing support. If this WPI is
     104    installed, the Qt build system will pick up all necessary libraries
     105    automatically. Otherwise, you will need to use the following environment
     106    variables to tell it where to look for CUPS:
     107
     108      set CUPS_INCLUDEPATH=X:\Path\to\CUPS\include
     109      set CUPS_LIBS=X:\Path\to\CUPS\lib\libcups.a
     110
     111    Note that if the eCUPS WPI is not installed and these variables are not set,
     112    printing support will be completely disabled in the resulting Qt build.
     113
     114    You will also need to make sure that pthread.lib is placed somewhere in your
     115    system library path so that the compiler can find it.
    92116
    93117Note that the QTDIR environment variable used by previous Qt versions is not
     
    317341
    318342
     343PRINTING SUPPORT
     344
     345Starting with version 4.6.1, Qt for OS/2 supports printing through the CUPS
     346framework (provided that this support is enabled when building Qt, see the
     347respective sections in the beginning of this document). The OS/2 implementation
     348of the CUPS framework is provided by the eCUPS package available at
     349http://svn.netlabs.org/ecups/.
     350
     351The Qt Runtime detects the presence of eCUPS in the system on the fly and talks
     352to the CUPS daemon directly, bypassing the standard OS/2 printing subsystem.
     353This means that in order to print from Qt applications, you don't need to create
     354and configure printer objects using the standard OS/2 system printer setup
     355procedure -- you only need to install eCUPS and configure your printers in
     356there. Please refer to the eCUPS user manual to obtain the detailed instructions
     357on how to configure CUPS printers.
     358
     359
     360
    319361CURRENT LIMITATIONS
    320362
     
    368410     relevant parts of code so they should still build.
    369411
    370   9. No QAssistant, no printer support (QT_NO_PRINTER and QT_NO_PRINTDIALOG are
    371      defined). No IPV6 support in the network module (QT_NO_IPV6 is defined).
     412  9. No QAssistant. No IPV6 support in the network module (QT_NO_IPV6 is
     413     defined).
    372414
    373415  See the project roadmap for more information on the current progress and
  • trunk/configure.cmd

    r565 r576  
    4545    "QT_NO_TABLET",
    4646    "QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY",
    47     "QT_NO_IM QT_NO_ACCESSIBILITY QT_NO_IPV6",
    48     "QT_NO_PRINTER QT_NO_PRINTDIALOG"
     47    "QT_NO_IM QT_NO_ACCESSIBILITY QT_NO_IPV6"
    4948
    5049G.QT_DEFAULT_BUILD_PARTS = "libs tools qmake" /* examples demos docs translations */
     
    271270    G.CFG_DECORATION_PLUGIN_AVAILABLE = ""
    272271    G.CFG_DECORATION_PLUGIN = ""
     272    G.CFG_CUPS = "auto"
     273    G.CFG_NIS = "auto"
    273274/* @todo do we really need this?
    274     G.CFG_NIS = "auto"
    275     G.CFG_CUPS = "auto"
    276275    G.CFG_ICONV = "auto"
    277276    G.CFG_GLIB = "auto"
     
    593592    call SetEnv "QMAKE_EXEPACK_POST_FLAGS", G.QMAKE_EXEPACK_POST_FLAGS
    594593
     594    /* detect the CUPS support */
     595
     596    call GetPkgVersionAndPath 'Peter Brown\CUPS\CUPS', 'G.CUPS'
     597    if (G.CUPS.version \== '') then
     598        call SayVerbose 'eCUPS version 'G.CUPS.version' detected in "'G.CUPS.path'"'
     599    else
     600        call SayVerbose 'eCUPS is not found.'
     601
     602    if (G.CUPS.version >= "1.3.11") then do
     603        G.CUPS.path = FixDirNoSlash(G.CUPS.path)'\cups';
     604        G.CFG_CUPS = "yes"
     605        G.CUPS_INCLUDEPATH = G.CUPS.path'\include'
     606        G.CUPS_LIBS = '-L'G.CUPS.path'\lib libcups.a pthread.lib'
     607    end
     608    else do
     609        G.CFG_CUPS = "no"
     610        G.CUPS_INCLUDEPATH = ''
     611        G.CUPS_LIBS = ''
     612        /* so far, CUPS is the only printing system we support so disable
     613         * the printer classses at all when CUPS is not available */
     614        call SaySay 'WARNING: Printing support is completely disabled due to',
     615                    'missing or outdated eCUPS framework.'
     616        G.D_FLAGS = Join(G.D_FLAGS, "QT_NO_PRINTER")
     617        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_PRINTER")
     618    end
     619
     620    /* NIS support is always off for now */
     621    G.CFG_NIS = "no"
     622
    595623    /*--------------------------------------------------------------------------
    596624     post process QT_INSTALL_* variables
     
    10611089        G.QT_CONFIG = Join(G.QT_CONFIG, "system-zlib")
    10621090
    1063 /* @todo do we really need this?
     1091    if (G.CFG_CUPS == "yes") then
     1092        G.QT_CONFIG = Join(G.QT_CONFIG, "cups")
    10641093    if (G.CFG_NIS == "yes") then
    10651094        G.QT_CONFIG = Join(G.QT_CONFIG, "nis")
    1066     if (G.CFG_CUPS == "yes") then
    1067         G.QT_CONFIG = Join(G.QT_CONFIG, "cups")
     1095
     1096/* @todo do we really need this?
    10681097    if (G.CFG_ICONV == "yes") then
    10691098        G.QT_CONFIG = Join(G.QT_CONFIG, "iconv")
     
    12411270     * to be included in the build key */
    12421271    DEFS = ""
     1272    ALL_D_FLAGS = G.D_FLAGS G.QCONFIG_FLAGS
    12431273    do i = 1 to words(G.D_FLAGS)
    12441274        opt = strip(word(G.D_FLAGS, i))
     
    13901420        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_GRAPHICSSYSTEM_OPENGL")
    13911421
     1422    if (G.CFG_CUPS == "no") then
     1423        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_CUPS")
     1424    if (G.CFG_NIS == "no") then
     1425        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_NIS")
     1426
    13921427    /* X11/Unix/Mac only configs */
    13931428/* @todo detect what's actually relevant
    1394     if (G.CFG_CUPS == "no") then
    1395         G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_CUPS")
    13961429    if (G.CFG_ICONV == "no") then
    13971430        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_ICONV")
     
    14141447    if (G.CFG_NAS == "no") then
    14151448        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_NAS")
    1416     if (G.CFG_NIS == "no") then
    1417         G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_NO_NIS")
    14181449    if (G.CFG_OPENSSL == "linked") then
    14191450        G.QCONFIG_FLAGS = Join(G.QCONFIG_FLAGS, "QT_LINKED_OPENSSL")
     
    16201651        call lineout qmake_cache_new, 'OPENSSL_LIBS = -lssl -lcrypto'
    16211652
     1653    /* dump CUPS_INCLUDEPATH and friends */
     1654    if (G.CFG_CUPS == "yes") then do
     1655        if (G.CUPS_INCLUDEPATH \== "") then
     1656            call lineout qmake_cache_new, 'CUPS_INCLUDEPATH = 'G.CUPS_INCLUDEPATH
     1657        if (G.CUPS_LIBS \== "") then
     1658            call lineout qmake_cache_new, 'CUPS_LIBS = 'G.CUPS_LIBS
     1659    end
     1660
    16221661    /* dump the qmake spec */
     1662    call lineout qmake_cache_new, ""
    16231663    if (DirExists(G.OutPath"\mkspecs\"G.XPLATFORM)) then
    16241664       call lineout qmake_cache_new, 'QMAKESPEC = $$QT_BUILD_TREE\mkspecs\'G.XPLATFORM
     
    17091749    call SaySay "Graphics System ..... "G.CFG_GRAPHICS_SYSTEM
    17101750    call SaySay "Accessibility ....... "G.CFG_ACCESSIBILITY
     1751    call SaySay "CUPS support ........ "G.CFG_CUPS
     1752    call SaySay "NIS support ......... "G.CFG_NIS
    17111753/* @todo do we really need this?
    17121754    call SaySay "IPv6 support ........ "G.CFG_IPV6
    17131755    call SaySay "IPv6 ifname support . "G.CFG_IPV6IFNAME
    17141756    call SaySay "getifaddrs support .. "G.CFG_GETIFADDRS
    1715     call SaySay "NIS support ......... "G.CFG_NIS
    1716     call SaySay "CUPS support ........ "G.CFG_CUPS
    17171757    call SaySay "Iconv support ....... "G.CFG_ICONV
    17181758    call SaySay "Glib support ........ "G.CFG_GLIB
     
    19261966 utility functions
    19271967------------------------------------------------------------------------------*/
     1968
     1969GetPkgVersionAndPath: procedure expose (Globals)
     1970    parse arg aPkgId, aStem
     1971    ver = ''
     1972    pth = ''
     1973    WarpInDir = strip(SysIni('USER', 'WarpIN', 'Path'), 'T', '0'x)
     1974    if (WarpInDir \== '') then do
     1975        rc = SysFileTree(WarpInDir'\DATBAS_?.INI', 'inis', 'FO')
     1976        if (rc == 0) then do
     1977            do i = 1 to inis.0
     1978                rc = SysIni(inis.i, 'ALL:', 'apps')
     1979                if (rc == '') then do
     1980                    do j = 1 to apps.0
     1981                        apps.j = strip(apps.j, 'T', '0'x)
     1982                        if (left(apps.j, length(aPkgId)) == aPkgId) then do
     1983                            /* found the app */
     1984                            ver = right(apps.j, length(apps.j) - length(aPkgId) - 1)
     1985                            ver = translate(ver, '.', '\')
     1986                            pth = strip(SysIni(inis.i, apps.j, 'TargetPath'), 'T', '0'x)
     1987                            leave
     1988                        end
     1989                    end
     1990                end
     1991            end
     1992        end
     1993    end
     1994    call value aStem'.version', ver
     1995    call value aStem'.path', pth
     1996    return
    19281997
    19291998MaxLen: procedure expose (Globals)
Note: See TracChangeset for help on using the changeset viewer.