|
Lines 70-230
Link Here
|
| 70 |
|
70 |
|
| 71 |
|
71 |
|
| 72 |
#------------------------------------------------------------------------------- |
72 |
#------------------------------------------------------------------------------- |
| 73 |
# check commercial license |
73 |
# Free license only: no check for other licenses |
| 74 |
#------------------------------------------------------------------------------- |
74 |
#------------------------------------------------------------------------------- |
| 75 |
|
75 |
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes |
| 76 |
# Qtopia Edition. |
76 |
[ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes |
| 77 |
if [ -f $relpath/LICENSE.Qtopia ]; then |
77 |
Edition="free" |
| 78 |
Edition="qtopia" |
78 |
Licensee="Free" |
| 79 |
Licensee="Qtopia" |
79 |
Products="qt-free" |
| 80 |
Products="qt-enterprise" |
80 |
|
| 81 |
# Open Source Edition - may only be used under the terms of the QPL or GPL. |
81 |
# modules depending on free license |
| 82 |
# Qt/X11, Qt/Embedded |
82 |
MODULES="styles tools kernel widgets dialogs iconview workspace inputmethod \ |
| 83 |
elif [ -f $relpath/LICENSE.QPL -o -f $relpath/LICENSE.GPL2 -o -f $relpath/LICENSE.GPL3 ]; then |
83 |
network canvas table xml opengl sql" |
| 84 |
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes |
|
|
| 85 |
[ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes |
| 86 |
Edition="free" |
| 87 |
Licensee="Free" |
| 88 |
Products="qt-free" |
| 89 |
# Evaluation version. |
| 90 |
# Qt/X11, Qt/Embedded, Qt/Mac |
| 91 |
elif [ -f $relpath/LICENSE.EVAL ]; then |
| 92 |
[ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes |
| 93 |
Edition="eval" |
| 94 |
Licensee="Evaluation" |
| 95 |
Products="qt-eval" |
| 96 |
# Internal Trolltech edition. |
| 97 |
# Qt/X11, Qt/Embedded, Qt/Mac, Qt/QNX |
| 98 |
elif [ -f $relpath/LICENSE.TROLL ]; then |
| 99 |
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes |
| 100 |
[ "$PLATFORM_QNX" = "maybe" ] && PLATFORM_QNX=yes |
| 101 |
Edition="troll" |
| 102 |
Licensee="Trolltech" |
| 103 |
Products="qt-internal" |
| 104 |
# Commercial edition - needs a license. |
| 105 |
# Qt/X11, Qt/Embedded, Qt/Mac |
| 106 |
elif [ -f $relpath/.LICENSE ]; then |
| 107 |
[ "$PLATFORM_MAC" = "maybe" ] && PLATFORM_MAC=yes |
| 108 |
[ "$PLATFORM_QWS" = "maybe" ] && PLATFORM_QWS=yes |
| 109 |
echo |
| 110 |
Desc="" |
| 111 |
if [ -f $HOME/.qt-license ]; then |
| 112 |
. $HOME/.qt-license >/dev/null 2>&1 |
| 113 |
if [ -z "$LicenseKey" ]; then |
| 114 |
echo |
| 115 |
echo "You are using an old license file." |
| 116 |
echo |
| 117 |
echo "Please install the license file supplied by Trolltech," |
| 118 |
echo "or install the Qt Open Source Edition if you intend to develop" |
| 119 |
echo "open source software." |
| 120 |
exit 1 |
| 121 |
fi |
| 122 |
else |
| 123 |
if [ -z "$LicenseKey" ]; then |
| 124 |
echo |
| 125 |
if echo '\c' | grep '\c' >/dev/null; then |
| 126 |
echo -n "Please enter your license key: " |
| 127 |
else |
| 128 |
echo "Please enter your license key: \c" |
| 129 |
fi |
| 130 |
read LicenseKey |
| 131 |
fi |
| 132 |
fi |
| 133 |
if echo $LicenseKey | grep "....-....-...." >/dev/null 2>&1; then |
| 134 |
# get the first character of the key |
| 135 |
keyTest=`echo $LicenseKey | cut -b1` |
| 136 |
# this character should fit the platform |
| 137 |
if [ "$PLATFORM_QWS" = "yes" ]; then |
| 138 |
case $keyTest in |
| 139 |
A|B|C|D|E|F|G|H|a|b|c|d|e|f|g|h) |
| 140 |
# Qt/Embedded |
| 141 |
echo |
| 142 |
;; |
| 143 |
*) |
| 144 |
echo |
| 145 |
echo "You are not licensed for the Qt/Embedded platform." |
| 146 |
echo |
| 147 |
echo "Please contact sales@trolltech.com to upgrade your license" |
| 148 |
echo "to include the Qt/Embedded platform, or install the" |
| 149 |
echo "Qt Open Source Edition if you intend to develop open source" |
| 150 |
echo "software." |
| 151 |
exit 1 |
| 152 |
;; |
| 153 |
esac |
| 154 |
elif [ "$PLATFORM_MAC" = "yes" ]; then |
| 155 |
case $keyTest in |
| 156 |
*) ### |
| 157 |
# Qt/Mac |
| 158 |
echo |
| 159 |
;; |
| 160 |
*) |
| 161 |
echo |
| 162 |
echo "You are not licensed for the Qt/Mac platform." |
| 163 |
echo |
| 164 |
echo "Please contact sales@trolltech.com to upgrade your license" |
| 165 |
echo "to include the Qt/Mac platform." |
| 166 |
exit 1 |
| 167 |
;; |
| 168 |
esac |
| 169 |
else |
| 170 |
case $keyTest in |
| 171 |
6|7|8|9|E|F|G|H|e|f|g|h) |
| 172 |
# Qt/X11 |
| 173 |
echo |
| 174 |
;; |
| 175 |
*) |
| 176 |
echo |
| 177 |
echo "You are not licensed for the Qt/X11 platform." |
| 178 |
echo |
| 179 |
echo "Please contact sales@trolltech.com to upgrade your license to" |
| 180 |
echo "include the Qt/X11 platform, or install the Qt Open Source Edition" |
| 181 |
echo "if you intend to develop open source software." |
| 182 |
exit 1 |
| 183 |
;; |
| 184 |
esac |
| 185 |
fi |
| 186 |
case $keyTest in |
| 187 |
4|5|8|9|C|D|G|H|c|d|g|h) |
| 188 |
# Enterprise |
| 189 |
Products=qt-enterprise |
| 190 |
Desc="Enterprise" |
| 191 |
Edition="ent" |
| 192 |
;; |
| 193 |
*) |
| 194 |
# Professional |
| 195 |
Products=qt-professional |
| 196 |
Desc="Professional" |
| 197 |
Edition="pro" |
| 198 |
;; |
| 199 |
esac |
| 200 |
case $keyTest in |
| 201 |
3|5|7|9|B|D|F|H|b|d|f|h) |
| 202 |
# US |
| 203 |
cp -f $relpath/.LICENSE-US $relpath/LICENSE |
| 204 |
;; |
| 205 |
*) |
| 206 |
cp -f $relpath/.LICENSE $relpath/LICENSE |
| 207 |
;; |
| 208 |
esac |
| 209 |
else |
| 210 |
echo |
| 211 |
echo "Invalid license key. Please check the license key." |
| 212 |
exit 1 |
| 213 |
fi |
| 214 |
else |
| 215 |
echo "The LICENSE, LICENSE.QPL, or LICENSE.GPL2 file shipped with" |
| 216 |
echo "this software has disappeared." |
| 217 |
echo |
| 218 |
echo "Sorry, you are not licensed to use this software." |
| 219 |
echo "Try re-installing." |
| 220 |
echo |
| 221 |
exit 1 |
| 222 |
fi |
| 223 |
|
| 224 |
# licensed modules depend on type of commercial license |
| 225 |
MODULES="styles tools kernel widgets dialogs iconview workspace inputmethod" |
| 226 |
[ "$PLATFORM_QWS" = "yes" ] && [ "$Products" = "qt-professional" ] && MODULES="$MODULES network" |
| 227 |
[ "$Products" != "qt-professional" ] && MODULES="$MODULES network canvas table xml opengl sql" |
| 228 |
CFG_MODULES_AVAILABLE=$MODULES |
84 |
CFG_MODULES_AVAILABLE=$MODULES |
| 229 |
QMAKE_VARS="$QMAKE_VARS \"QT_PRODUCT=$Products\"" |
85 |
QMAKE_VARS="$QMAKE_VARS \"QT_PRODUCT=$Products\"" |
| 230 |
QMAKE_VARS="$QMAKE_VARS \"styles += windows motif mac platinum sgi cde motifplus\"" |
86 |
QMAKE_VARS="$QMAKE_VARS \"styles += windows motif mac platinum sgi cde motifplus\"" |
|
Lines 2358-2591
Link Here
|
| 2358 |
|
2214 |
|
| 2359 |
|
2215 |
|
| 2360 |
# ----------------------------------------------------------------------------- |
2216 |
# ----------------------------------------------------------------------------- |
| 2361 |
# LICENSING, INTERACTIVE PART |
2217 |
# LICENSING |
| 2362 |
# ----------------------------------------------------------------------------- |
2218 |
# ----------------------------------------------------------------------------- |
| 2363 |
|
2219 |
|
| 2364 |
# check for license confirmation |
2220 |
echo |
| 2365 |
if [ "$Edition" = "qtopia" ]; then |
2221 |
if [ "$PLATFORM_QWS" = "yes" ]; then |
| 2366 |
if [ "$PLATFORM_X11" = "yes" ]; then |
2222 |
echo "This is the Qt/Embedded Open Source Edition." |
| 2367 |
Platform="Qt/X11" |
2223 |
elif [ "$PLATFORM_MAC" = "yes" ]; then |
| 2368 |
else |
2224 |
echo "This is the Qt/Mac Open Source Edition." |
| 2369 |
echo |
2225 |
elif [ "$PLATFORM_X11" = "yes" ]; then |
| 2370 |
echo "Internal error: unknown platform." |
2226 |
echo "This is the Qt/X11 Open Source Edition." |
| 2371 |
echo |
|
|
| 2372 |
exit 2 |
| 2373 |
fi |
| 2374 |
TheLicense=`head -n 1 $relpath/LICENSE.Qtopia` |
| 2375 |
while true; do |
| 2376 |
echo |
| 2377 |
echo "This is the $Platform Qtopia Edition." |
| 2378 |
echo |
| 2379 |
echo "You are licensed to use this software under the terms of" |
| 2380 |
echo "the $TheLicense." |
| 2381 |
echo |
| 2382 |
echo "Type '?' to view the $TheLicense." |
| 2383 |
echo "Type 'yes' to accept this license offer." |
| 2384 |
echo "Type 'no' to decline this license offer." |
| 2385 |
echo |
| 2386 |
if echo '\c' | grep '\c' >/dev/null; then |
| 2387 |
echo -n "Do you accept the terms of the $TheLicense? " |
| 2388 |
else |
| 2389 |
echo "Do you accept the terms of the $TheLicense? \c" |
| 2390 |
fi |
| 2391 |
read acceptance |
| 2392 |
echo |
| 2393 |
if [ "$acceptance" = yes ]; then |
| 2394 |
break |
| 2395 |
else |
| 2396 |
if [ "$acceptance" = no ]; then |
| 2397 |
echo "You are not licensed to use this software." |
| 2398 |
echo |
| 2399 |
exit 0 |
| 2400 |
elif [ "$acceptance" = "?" ]; then |
| 2401 |
more $relpath/LICENSE.Qtopia |
| 2402 |
fi |
| 2403 |
fi |
| 2404 |
done |
| 2405 |
elif [ "$Edition" = "free" ]; then |
| 2406 |
while true; do |
| 2407 |
if [ "$PLATFORM_QWS" = "yes" ]; then |
| 2408 |
echo |
| 2409 |
echo "This is the Qt/Embedded Open Source Edition." |
| 2410 |
echo |
| 2411 |
echo "You are licensed to use this software under the terms of" |
| 2412 |
echo "the GNU General Public License (GPL) versions 2 or 3." |
| 2413 |
echo |
| 2414 |
affix="the" |
| 2415 |
elif [ "$PLATFORM_MAC" = "yes" ]; then |
| 2416 |
echo |
| 2417 |
echo "This is the Qt/Mac Open Source Edition." |
| 2418 |
echo |
| 2419 |
echo "You are licensed to use this software under the terms of" |
| 2420 |
echo "the GNU General Public License (GPL) versions 2 or 3." |
| 2421 |
echo |
| 2422 |
affix="the" |
| 2423 |
elif [ "$PLATFORM_X11" = "yes" ]; then |
| 2424 |
echo |
| 2425 |
echo "This is the Qt/X11 Open Source Edition." |
| 2426 |
echo |
| 2427 |
echo "You are licensed to use this software under the terms of either" |
| 2428 |
echo "the Q Public License (QPL) or the GNU General Public License (GPL)" |
| 2429 |
echo "versions 2 or 3." |
| 2430 |
echo |
| 2431 |
echo "Type 'Q' to view the Q Public License." |
| 2432 |
affix="either" |
| 2433 |
else |
| 2434 |
echo |
| 2435 |
echo "Internal error." |
| 2436 |
echo |
| 2437 |
exit 2 |
| 2438 |
fi |
| 2439 |
echo "Type '2' to view the GNU General Public License version 2." |
| 2440 |
echo "Type '3' to view the GNU General Public License version 3." |
| 2441 |
echo "Type 'yes' to accept this license offer." |
| 2442 |
echo "Type 'no' to decline this license offer." |
| 2443 |
echo |
| 2444 |
if echo '\c' | grep '\c' >/dev/null; then |
| 2445 |
echo -n "Do you accept the terms of $affix license? " |
| 2446 |
else |
| 2447 |
echo "Do you accept the terms of $affix license? \c" |
| 2448 |
fi |
| 2449 |
read acceptance |
| 2450 |
echo |
| 2451 |
if [ "$acceptance" = "yes" ]; then |
| 2452 |
break |
| 2453 |
elif [ "$acceptance" = "no" ]; then |
| 2454 |
echo "You are not licensed to use this software." |
| 2455 |
echo |
| 2456 |
exit 0 |
| 2457 |
elif [ "$acceptance" = "2" ]; then |
| 2458 |
more $relpath/LICENSE.GPL2 |
| 2459 |
elif [ "$acceptance" = "3" ]; then |
| 2460 |
more $relpath/LICENSE.GPL3 |
| 2461 |
elif [ "$acceptance" = "Q" -o "$acceptance" = "q" ]; then |
| 2462 |
if [ "$PLATFORM_QWS" != "yes" ]; then |
| 2463 |
more $relpath/LICENSE.QPL |
| 2464 |
fi |
| 2465 |
fi |
| 2466 |
done |
| 2467 |
elif [ "$Edition" = "eval" ]; then |
| 2468 |
while true; do |
| 2469 |
if [ "$PLATFORM_QWS" = "yes" ]; then |
| 2470 |
echo |
| 2471 |
echo "This is the Qt/Embedded Evaluation version." |
| 2472 |
echo |
| 2473 |
elif [ "$PLATFORM_X11" = "yes" ]; then |
| 2474 |
echo |
| 2475 |
echo "This is the Qt/X11 Evaluation version." |
| 2476 |
echo |
| 2477 |
else |
| 2478 |
echo >&2 |
| 2479 |
echo "Internal error." >&2 |
| 2480 |
echo >&2 |
| 2481 |
exit 2 |
| 2482 |
fi |
| 2483 |
echo "You are licensed to use this software under the terms of" |
| 2484 |
echo "the Qt EVALUATION VERSION LICENSE AGREEMENT" |
| 2485 |
echo |
| 2486 |
echo "Type '?' to view the Evaluation License." |
| 2487 |
echo "Type 'yes' to accept this license offer." |
| 2488 |
echo "Type 'no' to decline this license offer." |
| 2489 |
echo |
| 2490 |
if echo '\c' | grep '\c' >/dev/null; then |
| 2491 |
echo -n "Do you accept the terms of the license? " |
| 2492 |
else |
| 2493 |
echo "Do you accept the terms of the license? \c" |
| 2494 |
fi |
| 2495 |
read acceptance |
| 2496 |
echo |
| 2497 |
if [ "$acceptance" = "yes" ]; then |
| 2498 |
break |
| 2499 |
elif [ "$acceptance" = "no" ] ;then |
| 2500 |
echo "You are not licensed to use this software." |
| 2501 |
echo |
| 2502 |
exit 0 |
| 2503 |
elif [ "$acceptance" = "?" ]; then |
| 2504 |
more $relpath/LICENSE.EVAL |
| 2505 |
fi |
| 2506 |
done |
| 2507 |
elif [ "$Edition" = "troll" ]; then |
| 2508 |
if [ "$PLATFORM_QNX" = "yes" ]; then |
| 2509 |
Platform="Qt/QNX" |
| 2510 |
elif [ "$PLATFORM_QWS" = "yes" ]; then |
| 2511 |
Platform="Qt/Embedded" |
| 2512 |
elif [ "$PLATFORM_MAC" = "yes" ]; then |
| 2513 |
Platform="Qt/Mac" |
| 2514 |
elif [ "$PLATFORM_X11" = "yes" ]; then |
| 2515 |
Platform="Qt/X11" |
| 2516 |
else |
| 2517 |
echo |
| 2518 |
echo "Internal error: unknown platform." |
| 2519 |
echo |
| 2520 |
exit 2 |
| 2521 |
fi |
| 2522 |
echo |
| 2523 |
echo "This is the Trolltech in-house version of $Platform." |
| 2524 |
echo |
| 2525 |
else |
2227 |
else |
| 2526 |
if [ -f $HOME/.qt-license ]; then |
2228 |
echo "Internal error: unknown platform." |
| 2527 |
ExpiryDate=`echo $ExpiryDate | sed -e "s,-,,g" | tr -d "\n\r"` |
|
|
| 2528 |
[ -z "$ExpiryDate" ] && ExpiryDate="0" |
| 2529 |
Today=`date +%Y%m%d` |
| 2530 |
if [ "$Today" -gt "$ExpiryDate" ]; then |
| 2531 |
echo |
| 2532 |
echo "WARNING WARNING WARNING WARNING" |
| 2533 |
echo |
| 2534 |
echo " Your support and upgrade period has expired." |
| 2535 |
echo |
| 2536 |
echo " You may continue to use your last licensed release" |
| 2537 |
echo " of Qt under the terms of your existing license" |
| 2538 |
echo " agreement. But you are not entitled to technical" |
| 2539 |
echo " support, nor are you entitled to use any more recent" |
| 2540 |
echo " Qt releases." |
| 2541 |
echo |
| 2542 |
echo " Please contact sales@trolltech.com to renew your" |
| 2543 |
echo " support and upgrades for this license." |
| 2544 |
echo |
| 2545 |
echo "WARNING WARNING WARNING WARNING" |
| 2546 |
echo |
| 2547 |
sleep 3 |
| 2548 |
fi |
| 2549 |
fi |
| 2550 |
if [ "$PLATFORM_QWS" = "yes" ]; then |
| 2551 |
Platform="Qt/Embedded" |
| 2552 |
elif [ "$PLATFORM_MAC" = "yes" ]; then |
| 2553 |
Platform="Qt/Mac" |
| 2554 |
elif [ "$PLATFORM_X11" = "yes" ]; then |
| 2555 |
Platform="Qt/X11" |
| 2556 |
else |
| 2557 |
echo >&2 |
| 2558 |
echo "Internal error." >&2 |
| 2559 |
echo >&2 |
| 2560 |
exit 2 |
| 2561 |
fi |
| 2562 |
echo |
| 2563 |
echo "This is the $Platform $Desc Edition." |
| 2564 |
echo |
2229 |
echo |
| 2565 |
while true; do |
2230 |
exit 2 |
| 2566 |
echo |
|
|
| 2567 |
echo "Type '?' to view the $Platform License." |
| 2568 |
echo "Type 'yes' to accept this license offer." |
| 2569 |
echo "Type 'no' to decline this license offer." |
| 2570 |
echo |
| 2571 |
if echo '\c' | grep '\c' >/dev/null; then |
| 2572 |
echo -n "Do you accept the terms of the $Platform License? " |
| 2573 |
else |
| 2574 |
echo "Do you accept the terms of the $Platform License? \c" |
| 2575 |
fi |
| 2576 |
read acceptance |
| 2577 |
echo |
| 2578 |
if [ "$acceptance" = "yes" ]; then |
| 2579 |
break |
| 2580 |
elif [ "$acceptance" = "no" ]; then |
| 2581 |
echo "You are not licensed to use this software." |
| 2582 |
echo |
| 2583 |
exit 0 |
| 2584 |
else [ "$acceptance" = "?" ] |
| 2585 |
more $relpath/LICENSE |
| 2586 |
fi |
| 2587 |
done |
| 2588 |
fi |
2231 |
fi |
|
|
2232 |
echo |
| 2233 |
echo "You are licensed to use this software under the terms of" |
| 2234 |
echo "the GNU General Public License (GPL) versions 2 or 3." |
| 2235 |
echo |
| 2589 |
|
2236 |
|
| 2590 |
# work around for broken system header files in IRIX 6.5.18 - 6.5.22 |
2237 |
# work around for broken system header files in IRIX 6.5.18 - 6.5.22 |
| 2591 |
case "$PLATFORM" in |
2238 |
case "$PLATFORM" in |