Repository navigation
Expand file tree
/
Copy pathconfigure.bat
More file actions
62 lines (53 loc) · 1.87 KB
/
Copy pathconfigure.bat
File metadata and controls
62 lines (53 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@echo OFF
@rem Copyright (c) 2018 nexB Inc. http://www.nexb.com/ - All rights reserved.
@rem ################################
@rem # change these variables to customize this script locally
@rem ################################
@rem # you can define one or more thirdparty dirs, each prefixed with TPP_DIR
set TPP_DIR=thirdparty
@rem # default configurations for dev
set CONF_DEFAULT="etc/conf/dev"
@rem #################################
set SCANCODE_ROOT_DIR=%~dp0
@rem !!!!!!!!!!! ATTENTION !!!!!
@rem there is a space at the end of the set SCANCODE_CLI_ARGS= line ...
@rem NEVER remove this!
@rem otherwise, this script and scancode do not work.
set SCANCODE_CLI_ARGS=
@rem Collect/Slurp all command line arguments in a variable
:collectarg
if ""%1""=="""" (
goto continue
)
call set SCANCODE_CLI_ARGS=%SCANCODE_CLI_ARGS% %1
shift
goto collectarg
:continue
@rem default to dev configuration when no args are passed
if "%SCANCODE_CLI_ARGS%"==" " (
set SCANCODE_CLI_ARGS="%CONF_DEFAULT%"
goto configure
)
:configure
if not exist "c:\python27\python.exe" (
echo(
echo On Windows, ScanCode requires Python 2.7.x 32 bits to be installed first.
echo(
echo Please download and install Python 2.7 ^(Windows x86 MSI installer^) version 2.7.10.
echo Install Python on the c: drive and use all default installer options.
echo Do NOT install Python v3 or any 64 bits edition.
echo Instead download Python from this url and see the README.rst file for more details:
echo(
echo https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi
echo(
exit /b 1
)
call c:\python27\python.exe "%SCANCODE_ROOT_DIR%etc\configure.py" %SCANCODE_CLI_ARGS%
if %errorlevel% neq 0 (
exit /b %errorlevel%
)
if exist "%SCANCODE_ROOT_DIR%bin\activate" (
"%SCANCODE_ROOT_DIR%bin\activate"
)
goto EOS
:EOS