source: trunk/tools/installer/iwmake.bat@ 618

Last change on this file since 618 was 561, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.1 sources.

  • Property svn:executable set to *
File size: 4.7 KB
Line 
1:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2::
3:: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4:: All rights reserved.
5:: Contact: Nokia Corporation ([email protected])
6::
7:: This file is part of the tools applications of the Qt Toolkit.
8::
9:: $QT_BEGIN_LICENSE:LGPL$
10:: Commercial Usage
11:: Licensees holding valid Qt Commercial licenses may use this file in
12:: accordance with the Qt Commercial License Agreement provided with the
13:: Software or, alternatively, in accordance with the terms contained in
14:: a written agreement between you and Nokia.
15::
16:: GNU Lesser General Public License Usage
17:: Alternatively, this file may be used under the terms of the GNU Lesser
18:: General Public License version 2.1 as published by the Free Software
19:: Foundation and appearing in the file LICENSE.LGPL included in the
20:: packaging of this file. Please review the following information to
21:: ensure the GNU Lesser General Public License version 2.1 requirements
22:: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
23::
24:: In addition, as a special exception, Nokia gives you certain additional
25:: rights. These rights are described in the Nokia Qt LGPL Exception
26:: version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
27::
28:: GNU General Public License Usage
29:: Alternatively, this file may be used under the terms of the GNU
30:: General Public License version 3.0 as published by the Free Software
31:: Foundation and appearing in the file LICENSE.GPL included in the
32:: packaging of this file. Please review the following information to
33:: ensure the GNU General Public License version 3.0 requirements will be
34:: met: http://www.gnu.org/copyleft/gpl.html.
35::
36:: If you have questions regarding the use of this file, please contact
37:: Nokia at [email protected].
38:: $QT_END_LICENSE$
39::
40:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
41rem @echo off
42call :init
43if "%IWMAKE_STATUS%"=="failed" goto FAILED
44if not exist "%IWMAKE_SCRIPTDIR%\config\%1.conf" goto FAILED
45if not "%~2"=="" set IWMAKE_SECTION=%~2
46for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.default) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j
47if "%IWMAKE_STATUS%"=="failed" goto FAILED
48if exist "%IWMAKE_SCRIPTDIR%\config\config.%COMPUTERNAME%" for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.%COMPUTERNAME%) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j
49if "%IWMAKE_STATUS%"=="failed" goto FAILED
50call :checkrequirements
51if "%IWMAKE_STATUS%"=="failed" goto FAILED
52for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\%1.conf) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j
53if "%IWMAKE_STATUS%"=="failed" goto FAILED
54goto DONE
55
56:func_delegate
57if "%IWMAKE_STATUS%"=="failed" goto :eof
58set IWMAKE_TMP="%IWMAKE_TMP:"=%"
59
60if /i "%1"=="sectionend" echo Leaving Section& set IWMAKE_PARSESECTION=1& goto :eof
61if /i not "%1"=="section" goto callScript
62echo Entering Section %~2
63for %%m in (%IWMAKE_SECTION%) do call :checkSection %%m %~2
64goto :eof
65
66:callScript
67if "%IWMAKE_PARSESECTION%"=="0" goto :eof
68
69call "%IWMAKE_SCRIPTDIR%\batch\%1.bat" %2 %IWMAKE_TMP%
70if not "%errorlevel%"=="0" echo %1 %2 failed! >> %IWMAKE_LOGFILE%& set IWMAKE_STATUS=failed
71goto :eof
72
73:checkSection
74 if /i "%1"=="%2" echo Skipping Section& set IWMAKE_PARSESECTION=0
75goto :eof
76
77:checkrequirements
78 if not exist %IWMAKE_ROOT% mkdir %IWMAKE_ROOT%
79 if not "%IWMAKE_SIGNPATH%"=="" goto CheckSIGNOK
80 call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sign
81 call "%IWMAKE_SCRIPTDIR%\batch\env.bat" signPath "%IWMAKE_ROOT%\sign"
82:CheckSIGNOK
83 if not "%IWMAKE_WGET%"=="" goto CheckWGETOK
84 call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync wget
85 call "%IWMAKE_SCRIPTDIR%\batch\env.bat" wgetDir wget
86:CheckWGETOK
87 if exist "%IWMAKE_PERLPATH%\perl.exe" goto CheckPerlOK
88 set IWMAKE_STATUS=failed
89 echo Perl not found in %IWMAKE_PERLPATH%! (check your config file)
90:CheckPerlOK
91 if not "%IWMAKE_UNZIPAPP%"=="" goto CheckUNZIPOK
92 call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync unzip
93 call "%IWMAKE_SCRIPTDIR%\batch\env.bat" unzipApp "%IWMAKE_ROOT%\unzip\unzip.exe"
94:CheckUNZIPOK
95 if exist "%IWMAKE_NSISPATH%\makensis.exe" goto CheckNSISOK
96 set IWMAKE_STATUS=failed
97 echo NSIS not found! (check your config file)
98:CheckNSISOK
99 call "%IWMAKE_SCRIPTDIR%\batch\installer.bat" updateplugins
100goto :eof
101
102:init
103 set IWMAKE_SCRIPTDIR=%~dp0
104 set IWMAKE_SCRIPTDIR=%IWMAKE_SCRIPTDIR:~0,-1%
105 call "%IWMAKE_SCRIPTDIR%\batch\env.bat" setglobals
106goto :eof
107
108:cleanup
109 pushd "%IWMAKE_STARTDIR%"
110 call "%IWMAKE_SCRIPTDIR%\batch\env.bat" removeglobals
111 popd
112goto :eof
113
114:FAILED
115 call :cleanup
116 echo Failed!
117goto END
118
119:DONE
120 call :cleanup
121 echo Done!
122goto END
123
124:END
Note: See TracBrowser for help on using the repository browser.