| 1 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|---|
| 2 | ::
|
|---|
| 3 | :: Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|---|
| 4 | :: Contact: Qt Software Information (qt-info@nokia.com)
|
|---|
| 5 | ::
|
|---|
| 6 | :: This file is part of the tools applications of the Qt Toolkit.
|
|---|
| 7 | ::
|
|---|
| 8 | :: $QT_BEGIN_LICENSE:LGPL$
|
|---|
| 9 | :: Commercial Usage
|
|---|
| 10 | :: Licensees holding valid Qt Commercial licenses may use this file in
|
|---|
| 11 | :: accordance with the Qt Commercial License Agreement provided with the
|
|---|
| 12 | :: Software or, alternatively, in accordance with the terms contained in
|
|---|
| 13 | :: a written agreement between you and Nokia.
|
|---|
| 14 | ::
|
|---|
| 15 | :: GNU Lesser General Public License Usage
|
|---|
| 16 | :: Alternatively, this file may be used under the terms of the GNU Lesser
|
|---|
| 17 | :: General Public License version 2.1 as published by the Free Software
|
|---|
| 18 | :: Foundation and appearing in the file LICENSE.LGPL included in the
|
|---|
| 19 | :: packaging of this file. Please review the following information to
|
|---|
| 20 | :: ensure the GNU Lesser General Public License version 2.1 requirements
|
|---|
| 21 | :: will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|---|
| 22 | ::
|
|---|
| 23 | :: In addition, as a special exception, Nokia gives you certain
|
|---|
| 24 | :: additional rights. These rights are described in the Nokia Qt LGPL
|
|---|
| 25 | :: Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
|---|
| 26 | :: 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 are unsure which license is appropriate for your use, please
|
|---|
| 37 | :: contact the sales department at qt-sales@nokia.com.
|
|---|
| 38 | :: $QT_END_LICENSE$
|
|---|
| 39 | ::
|
|---|
| 40 | :: This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
|---|
| 41 | :: WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
|---|
| 42 | ::
|
|---|
| 43 | :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|---|
| 44 | rem @echo off
|
|---|
| 45 | call :init
|
|---|
| 46 | if "%IWMAKE_STATUS%"=="failed" goto FAILED
|
|---|
| 47 | if not exist "%IWMAKE_SCRIPTDIR%\config\%1.conf" goto FAILED
|
|---|
| 48 | if not "%~2"=="" set IWMAKE_SECTION=%~2
|
|---|
| 49 | for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\config.default) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j
|
|---|
| 50 | if "%IWMAKE_STATUS%"=="failed" goto FAILED
|
|---|
| 51 | if 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
|
|---|
| 52 | if "%IWMAKE_STATUS%"=="failed" goto FAILED
|
|---|
| 53 | call :checkrequirements
|
|---|
| 54 | if "%IWMAKE_STATUS%"=="failed" goto FAILED
|
|---|
| 55 | for /F "eol=# tokens=1,2*" %%i in (%IWMAKE_SCRIPTDIR%\config\%1.conf) do set IWMAKE_TMP=%%k& call :func_delegate %%i %%j
|
|---|
| 56 | if "%IWMAKE_STATUS%"=="failed" goto FAILED
|
|---|
| 57 | goto DONE
|
|---|
| 58 |
|
|---|
| 59 | :func_delegate
|
|---|
| 60 | if "%IWMAKE_STATUS%"=="failed" goto :eof
|
|---|
| 61 | set IWMAKE_TMP="%IWMAKE_TMP:"=%"
|
|---|
| 62 |
|
|---|
| 63 | if /i "%1"=="sectionend" echo Leaving Section& set IWMAKE_PARSESECTION=1& goto :eof
|
|---|
| 64 | if /i not "%1"=="section" goto callScript
|
|---|
| 65 | echo Entering Section %~2
|
|---|
| 66 | for %%m in (%IWMAKE_SECTION%) do call :checkSection %%m %~2
|
|---|
| 67 | goto :eof
|
|---|
| 68 |
|
|---|
| 69 | :callScript
|
|---|
| 70 | if "%IWMAKE_PARSESECTION%"=="0" goto :eof
|
|---|
| 71 |
|
|---|
| 72 | call "%IWMAKE_SCRIPTDIR%\batch\%1.bat" %2 %IWMAKE_TMP%
|
|---|
| 73 | if not "%errorlevel%"=="0" echo %1 %2 failed! >> %IWMAKE_LOGFILE%& set IWMAKE_STATUS=failed
|
|---|
| 74 | goto :eof
|
|---|
| 75 |
|
|---|
| 76 | :checkSection
|
|---|
| 77 | if /i "%1"=="%2" echo Skipping Section& set IWMAKE_PARSESECTION=0
|
|---|
| 78 | goto :eof
|
|---|
| 79 |
|
|---|
| 80 | :checkrequirements
|
|---|
| 81 | if not exist %IWMAKE_ROOT% mkdir %IWMAKE_ROOT%
|
|---|
| 82 | if not "%IWMAKE_SIGNPATH%"=="" goto CheckSIGNOK
|
|---|
| 83 | call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync sign
|
|---|
| 84 | call "%IWMAKE_SCRIPTDIR%\batch\env.bat" signPath "%IWMAKE_ROOT%\sign"
|
|---|
| 85 | :CheckSIGNOK
|
|---|
| 86 | if not "%IWMAKE_WGET%"=="" goto CheckWGETOK
|
|---|
| 87 | call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync wget
|
|---|
| 88 | call "%IWMAKE_SCRIPTDIR%\batch\env.bat" wgetDir wget
|
|---|
| 89 | :CheckWGETOK
|
|---|
| 90 | if exist "%IWMAKE_PERLPATH%\perl.exe" goto CheckPerlOK
|
|---|
| 91 | set IWMAKE_STATUS=failed
|
|---|
| 92 | echo Perl not found in %IWMAKE_PERLPATH%! (check your config file)
|
|---|
| 93 | :CheckPerlOK
|
|---|
| 94 | if not "%IWMAKE_UNZIPAPP%"=="" goto CheckUNZIPOK
|
|---|
| 95 | call "%IWMAKE_SCRIPTDIR%\batch\copy.bat" extsync unzip
|
|---|
| 96 | call "%IWMAKE_SCRIPTDIR%\batch\env.bat" unzipApp "%IWMAKE_ROOT%\unzip\unzip.exe"
|
|---|
| 97 | :CheckUNZIPOK
|
|---|
| 98 | if exist "%IWMAKE_NSISPATH%\makensis.exe" goto CheckNSISOK
|
|---|
| 99 | set IWMAKE_STATUS=failed
|
|---|
| 100 | echo NSIS not found! (check your config file)
|
|---|
| 101 | :CheckNSISOK
|
|---|
| 102 | call "%IWMAKE_SCRIPTDIR%\batch\installer.bat" updateplugins
|
|---|
| 103 | goto :eof
|
|---|
| 104 |
|
|---|
| 105 | :init
|
|---|
| 106 | set IWMAKE_SCRIPTDIR=%~dp0
|
|---|
| 107 | set IWMAKE_SCRIPTDIR=%IWMAKE_SCRIPTDIR:~0,-1%
|
|---|
| 108 | call "%IWMAKE_SCRIPTDIR%\batch\env.bat" setglobals
|
|---|
| 109 | goto :eof
|
|---|
| 110 |
|
|---|
| 111 | :cleanup
|
|---|
| 112 | pushd "%IWMAKE_STARTDIR%"
|
|---|
| 113 | call "%IWMAKE_SCRIPTDIR%\batch\env.bat" removeglobals
|
|---|
| 114 | popd
|
|---|
| 115 | goto :eof
|
|---|
| 116 |
|
|---|
| 117 | :FAILED
|
|---|
| 118 | call :cleanup
|
|---|
| 119 | echo Failed!
|
|---|
| 120 | goto END
|
|---|
| 121 |
|
|---|
| 122 | :DONE
|
|---|
| 123 | call :cleanup
|
|---|
| 124 | echo Done!
|
|---|
| 125 | goto END
|
|---|
| 126 |
|
|---|
| 127 | :END
|
|---|