- Timestamp:
- Apr 30, 2010, 10:19:14 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
packaging/QtEnv.cmd
r544 r722 1 1 /* 2 * Script to set up the environment for the Qt4 development package 2 * Script to set up the environment for the Qt4 Development package 3 */ 4 5 /* 6 * You do not normally need to change anything in this script 7 *------------------------------------------------------------------------------ 3 8 */ 4 9 5 10 '@echo off' 6 11 trace off 12 7 13 8 14 parse arg aArgs … … 16 22 say 17 23 say 'Qt4 Environment is already set up.' 18 say19 24 exit 0 20 25 end 26 27 21 28 22 29 etc = value('ETC',, 'OS2ENVIRONMENT') … … 24 31 if (etc == '') then etc = SysBootDrive() 25 32 33 34 35 36 37 38 39 40 41 42 26 43 look = 0 27 44 G.Prefix = '' 28 45 G.Binaries = '' 29 qt_conf = etc"\qtsys.conf"30 46 do while lines(qt_conf) 31 47 v = linein(qt_conf) … … 47 63 curdir = directory() 48 64 49 basedir = stream(qt_conf, 'C', 'QUERY EXISTS')50 if (basedir \== '') then51 basedir = filespec('D', basedir)||filespec('P',basedir)52 else do53 say 'ERROR: Cannot find "'qt_conf'". Proabaly, the Qt4 development package is not installed.'54 exit 155 end56 57 65 call directory basedir 58 66 if (G.Prefix \== '') then … … 60 68 else 61 69 G.Prefix = basedir 70 62 71 63 72 if (G.Binaries \== '') then … … 65 74 else 66 75 G.Binaries = G.Prefix'\bin' 76 67 77 68 say 69 say 'Qt4 base directory is : "'G.Prefix'"' 70 say 'Qt4 binary directory is : "'G.Binaries'"' 71 say 78 call directory curdir 79 80 /* Set up the environment */ 81 82 'set QT_BASE='G.Prefix 83 'set QT_BIN='G.Binaries 72 84 73 85 'set PATH='G.Binaries';%PATH%' 74 86 'set BEGINLIBPATH='G.Binaries';%BEGINLIBPATH%' 87 88 89 90 91 92 93 94 95 75 96 'set QTENV_CMD_DONE=1' 76 97 77 say 'Qt4 Environment is set up.' 78 say 98 if (aArgs \== '') then do 99 /* Start the program */ 100 prg = translate(word(aArgs, 1)) 101 isCmd = 0 102 realPrg = SysSearchPath(PATH, prg) 103 if (realPrg == '') then realPrg = SysSearchPath(PATH, prg'.EXE') 104 if (realPrg == '') then realPrg = SysSearchPath(PATH, prg'.COM') 105 if (realPrg == '') then realPrg = SysSearchPath(PATH, prg'.CMD') 106 if (realPrg \== '') then do 107 if (right(realPrg, 4) == '.CMD') then isCmd = 1 108 end 109 if (isCmd) then 'call' aArgs 110 else aArgs 111 end 112 else do 113 /* Print some information about the environment */ 114 say 115 say 'Qt4 base directory (QT_BASE) : 'G.Prefix 116 say 'Qt4 binary directory (QT_BIN) : 'G.Binaries 117 say 118 say 'Qt4 Environment is set up. If you use the qmake tool, it already knows' 119 say 'where to look for Qt parts. If you use your own makefiles, you may use the' 120 say 'environment variables shown in parenthesis above to refer to the corresponding' 121 say 'locations.' 122 say 123 say 'Please note that this script does *not* set up the compiler environment!' 124 say 'You should do it yourself in order to be able to compile Qt programs.' 125 end 79 126 80 call directory curdir 127 exit 81 128 82 if (aArgs \= '') then 83 '%COMSPEC% /c' aArgs 129 FixDir: procedure 130 parse arg aDir 131 if (right(aDir, 1) == '\') then 132 aDir = left(aDir, length(aDir) - 1) 133 return aDir 84 134 85 exit 0 135 OnError: 136 exit 86 137
Note:
See TracChangeset
for help on using the changeset viewer.