Changeset 94 for trunk


Ignore:
Timestamp:
May 2, 2006, 9:25:01 PM (19 years ago)
Author:
dmik
Message:

Improved the configure script:

  • Offer to (re)compile Qt after reconfiguring it.
  • Determine the default mode (release or debug) in the generated qt.cmd using .qtos2config (remains always overridable using R[ELEASE] or D[EBUG] parameters).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.cmd

    r93 r94  
    204204        select
    205205            when choice == 1 then call ConfigureCompiler
    206             when choice == 2 then call ConfigureQt
    207             when choice == 3 then do; call CompileQt; leave; end
     206            when choice == 2 then do
     207                call ConfigureQt
     208                if (G.!DidConfigureQt) then do
     209                    call SaySay 'It is strongly recommended to recompile',
     210                                'the Qt library'
     211                    call SaySay 'after it has been (re)configured.'
     212                    if (GetYesNo('Procceed to compile?', 'Y')) then do
     213                        call CompileQt
     214                        leave
     215                    end
     216                end
     217            end
     218            when choice == 3 then do
     219                call CompileQt
     220                leave
     221            end
    208222            otherwise leave
    209223        end
     
    390404    call lineout G.!QtCmd, ''
    391405    /*
    392      *  determine whether to setup the environment for the debug version of Qt
     406     *  determine whether to setup the environment for the debug version of Qt
     407     *  or for the release one
    393408     */
     409    call lineout G.!QtCmd, '/* determine the default DEBUG value using .qtos2config */'
    394410    call lineout G.!QtCmd, 'DEBUG = 0'
     411    call lineout G.!QtCmd, 'do while (lines(QTDIR''\.qtos2config'') > 0)'
     412    call lineout G.!QtCmd, '    line = strip(linein(QTDIR''\.qtos2config''))'
     413    call lineout G.!QtCmd, '    if (word(line, 1) == ''CONFIG'') then'
     414    call lineout G.!QtCmd, '        if (wordpos(''debug'', line, 3) > 0) then DEBUG = 1'
     415    call lineout G.!QtCmd, 'end'
    395416    call lineout G.!QtCmd, ''
    396417    call lineout G.!QtCmd, '/* parse command line */'
    397     call lineout G.!QtCmd, 'parse arg args'
    398     call lineout G.!QtCmd, 'if (translate(word(args, 1)) == ''D'' |,'
    399     call lineout G.!QtCmd, '    translate(word(args, 1)) == ''DEBUG'') then'
    400     call lineout G.!QtCmd, 'do'
    401     call lineout G.!QtCmd, '    DEBUG = 1'
    402     call lineout G.!QtCmd, '    args = subword(args, 2)'
    403     call lineout G.!QtCmd, 'end'
     418    call lineout G.!QtCmd, 'parse arg arg1 args'
     419    call lineout G.!QtCmd, 'arg1 = translate(arg1)'
     420    call lineout G.!QtCmd, 'if (arg1 == ''D'' | arg1 == ''DEBUG'') then DEBUG = 1'
     421    call lineout G.!QtCmd, 'else if (arg1 == ''R'' | arg1 == ''RELEASE'') then DEBUG = 0'
     422    call lineout G.!QtCmd, 'else parse arg args'
    404423    call lineout G.!QtCmd, ''
    405424    /*
     
    801820    call SaySay 'The Qt Library has been configured.'
    802821    say
    803 
    804     call WaitForAnyKey
    805822
    806823    G.!DidConfigureQt = 1
     
    12261243 *  Shows a Yes/No choice.
    12271244 *
    1228  *  @param  prompt  prompt to show
     1245 *  @param  prompt  prompt to show (specify '' to suppress the prompt)
    12291246 *  @param  default default choice:
    12301247 *      ''      - no default choice
     
    12381255    default = translate(default)
    12391256    if (default \== '' & default \== 'Y') then default = 'N'
    1240     call SaySay prompt
     1257    if (prompt \= '') then call SaySay prompt
    12411258    say
    12421259    call SayPrompt '[YN] ', 1
Note: See TracChangeset for help on using the changeset viewer.