Recheck include/ with IWYU
[LibreOffice.git] / odk / config / setsdkenv_windows.bat
blobe6d1335ad77b2420d9fa89e3f73496e1efa2710e
1 rem
2 rem This file is part of the LibreOffice project.
3 rem
4 rem This Source Code Form is subject to the terms of the Mozilla Public
5 rem License, v. 2.0. If a copy of the MPL was not distributed with this
6 rem file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 rem
8 rem This file incorporates work covered by the following license notice:
9 rem
10 rem   Licensed to the Apache Software Foundation (ASF) under one or more
11 rem   contributor license agreements. See the NOTICE file distributed
12 rem   with this work for additional information regarding copyright
13 rem   ownership. The ASF licenses this file to you under the Apache
14 rem   License, Version 2.0 (the "License"); you may not use this file
15 rem   except in compliance with the License. You may obtain a copy of
16 rem   the License at http://www.apache.org/licenses/LICENSE-2.0 .
17 rem
19 @echo off
21 set SDK_DIR_TMP=%~dp0
22 set SDK_DIR=%SDK_DIR_TMP:~0,-1%
24 if "%@RIGHT[5,%SDK_DIR%]" EQU "~0,-1" (
25    set SDK_DIR=%@FULL[%0]
26    set /A LENGTH=%@LEN[%SDK_DIR%] - 22
27    set SDK_DIR=%@LEFT[%LENGTH%,%SDK_DIR%]
28    unset LENGTH
31 set OO_SDK_NAME=__SDKNAME__
33 set OO_USER_SDK_DIR=%APPDATA%\%OO_SDK_NAME%
34 set OO_USER_SDKENV_SCRIPT=%OO_USER_SDK_DIR%\setsdkenv_windows.bat
36 if "%1" EQU "--force-configure" (
37    if exist "%OO_USER_ENV_SCRIPT%". (
38       del "%OO_USER_SDKENV_SCRIPT%"
39    )
40    goto start
43 if "%1" EQU "-h" goto printhelp
44 if "%1" EQU "--help" goto printhelp
45 if "%1" NEQ "" goto printhelp
47 :start
48 cls
50 if not exist "%OO_USER_SDKENV_SCRIPT%". (
51    echo.
52    echo  ******************************************************************
53    echo  *
54    echo  *  You have to configure your SDK environment first before you can
55    echo  *  use it. The configuration has to be done only once.
56    echo  *
57    echo  ******************************************************************
58    echo.
60    cscript //e:javascript //I //Nologo "%SDK_DIR%\cfgWin.js"
61    goto setenv
64 goto setenv
66 :printhelp
67 echo.
68 echo  using: setsdkenv_windows.bat [options]
69 echo.
70 echo  options:
71 echo     --force-configure : force a new configuration of your SDK environment.
72 echo                         Alternatively can you edit your SDK environment script directly:
73 echo                           "%OO_USER_SDKENV_SCRIPT%"
74 echo     -h, --help        : print this help and exit
75 echo.
76 goto end
79 :setenv
80 call "%OO_USER_SDKENV_SCRIPT%"
82 :end