Changeset 815

Timestamp:
Nov 4, 2010, 1:57:51 AM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

configure.cmd: Added recognition of -prefix and other options that allow to set hard-coded library paths returned by QLibraryInfo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.cmd

    r803 r815  
    347347    G.QT_INSTALL_EXAMPLES = ""
    348348    G.QT_INSTALL_DEMOS = ""
    349     G.QT_HOST_PREFIX = ""
     349    G.QT_ = ""
    350350
    351351    G.QT_LIBINFIX = ""
     
    421421    --------------------------------------------------------------------------*/
    422422
    423     /* @todo */
    424423    if (aArgs \= "") then do
    425         call SayErr
    426         call SayErr "Sorry, command line arguments are not yet processed."
    427         call SayErr "Please run the script again without the arguments."
    428         call SayErr
    429         call Done 1
     424        call TokenizeString aArgs, 'G.Args'
     425        i = 1
     426        do while i <= G.Args.0
     427            a = G.Args.i
     428            if (StartsWith(a, '-')) then do
     429                a = strip(a, 'L', '-')
     430                opt = ''
     431                typ = 'P' /* path */
     432                select
     433                    when (a == "prefix") then
     434                        opt = 'G.QT_INSTALL_PREFIX'
     435                    when (a == "datadir") then
     436                        opt = 'G.QT_INSTALL_DATA'
     437                    when (a == "libdir") then
     438                        opt = 'G.QT_INSTALL_LIBS'
     439                    when (a == "headerdir") then
     440                        opt = 'G.QT_INSTALL_HEADERS'
     441                    when (a == "bindir") then
     442                        opt = 'G.QT_INSTALL_BINS'
     443                    when (a == "plugindir") then
     444                        opt = 'G.QT_INSTALL_PLUGINS'
     445                    when (a == "demosdir") then
     446                        opt = 'G.QT_INSTALL_DEMOS'
     447                    when (a == "examplesdir") then
     448                        opt = 'G.QT_INSTALL_EXAMPLES'
     449                    when (a == "docdir") then
     450                        opt = 'G.QT_INSTALL_DOCS'
     451                    when (a == "translationdir") then
     452                        opt = 'G.QT_INSTALL_TRANSLATIONS'
     453                    when (a == "sysconfdir" | a == "settingsdir") then
     454                        opt = 'G.QT_INSTALL_SETTINGS'
     455                    when (a == "sysconffile") then
     456                        opt = 'G.QT_INSTALL_SYSCONFFILE'
     457                    otherwise typ = ''
     458                end
     459                if (typ == '') then do
     460                    call SayErr "ERROR: Invalid option '"G.Args.i"'."
     461                    call Done 1
     462                end
     463                if (typ == 'P') then do
     464                    if (i == G.Args.0) then do
     465                        call SayErr "ERROR: Option '"G.Args.i"' needs a path value."
     466                        call Done 1
     467                    end
     468                    i = i + 1
     469                    interpret opt "= translate(G.Args."i", '\', '/')"
     470                end
     471            end
     472            else do
     473                call SayErr "ERROR: Invalid argument '"G.Args.i"'."
     474                call Done 1
     475            end
     476            i = i + 1
     477        end
    430478    end
    431479
     
    687735    if (G.QT_INSTALL_DEMOS == "") then
    688736        G.QT_INSTALL_DEMOS = "demos"
     737
    689738
    690739    /*--------------------------------------------------------------------------
     
    777826'#define QT_CONFIGURE_EXAMPLES_PATH "'CPPPath(G.QT_INSTALL_EXAMPLES)'"'G.EOL||,
    778827'#define QT_CONFIGURE_DEMOS_PATH "'CPPPath(G.QT_INSTALL_DEMOS)'"'G.EOL
     828
     829
     830
     831
    779832
    780833    today = date('S')
     
    29412994
    29422995/**
     2996
     2997
     2998
     2999
     3000
     3001
     3002
     3003
     3004
     3005
     3006
     3007
     3008
     3009
     3010
     3011
     3012
     3013
     3014
     3015
     3016
     3017
     3018
     3019
     3020
     3021
     3022
     3023
     3024
     3025
     3026
     3027
     3028
     3029
     3030
     3031
     3032
     3033
     3034
     3035
     3036
     3037
     3038
     3039
     3040
     3041
     3042
     3043
     3044
     3045
     3046
     3047
     3048
     3049
     3050
     3051
     3052
     3053
     3054
     3055
     3056
     3057
     3058
     3059
     3060
     3061
     3062
     3063
     3064
     3065
     3066
     3067
     3068
     3069
     3070
    29433071 * Initializes a new "at exit" slot and returns its ID.
    29443072 */
Note: See TracChangeset for help on using the changeset viewer.