<commit_before>:: Copyright 2013-2014 The 'mumble-releng' Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that
:: can be found in the LICENSE file in the source tree or at
:: <http://mumble.info/mumble-releng/LICENSE>.

:: setup.cmd sets up a new Mumble build environment
:: in the user's home directory (%USERPROFILE%).
::
:: It calls the script setup\name.cmd, which attempts
:: to use a git binary in the user's %PATH% to determine
:: a unique name for the build environment.
::
:: For example, on a builder, the build environment
:: would be installed in a directory such as:
:: C:\Users\builder\MumbleBuild-2013-08-25-3dc1638

@echo off

set CYGWIN=nodosfilewarning

:: Check that git is in the user's path.
where git.exe 1>NUL 2>NUL
if not "%errorlevel%"=="0" (
	echo.
	echo Unable to find git in your PATH.
	echo How did you check out this repository?!
	exit /b
)

:: Get the basename of the build environment.
if %WANT_WIN64_BUILDENV% == 1 (
	for /f %%I in ('setup\name64.cmd') do set NAME=%%I
) else (
	for /f %%I in ('setup\name.cmd') do set NAME=%%I
)

:: Set the absolute path of the build env target.
set MUMBLE_PREFIX=C:\MumbleBuild\%NAME%
set MUMBLE_PREFIX_BUILD=%MUMBLE_PREFIX%.build

if not exist "C:\MumbleBuild" (
	echo.
	echo The C:\MumbleBuild directory does not exist. Please create it, and
	echo make sure your current user has full access to it.
	echo.
	echo The easiest way to do this is to create a junction from C:\MumbleBuild
	echo into your user's home directory.
	echo.
	echo Open a admin command prompt [Ctrl-X followed by A on Win 8] and ensure
	echo you're at the root of C:, and run the following set of commands:
	echo.
	echo   "c:\> mkdir %%USERPROFILE%%\MumbleBuild"
	echo   "c:\> mklink /j MumbleBuild %%USERPROFILE%%\MumbleBuild"
	echo.
	echo Anything that allows you to write to c:\MumbleBuild works, though.
	echo [Including mounting a directory from another partition in C:\MumbleBuild]
	echo.
	if not "%1"=="/noninteractive" (
		pause<commit_msg>buildenv/1.3.x/win32-static: fix 'syntax error' in setup.cmd when WANT_WIN64_BUILDENV is not set.<commit_after>:: Copyright 2013-2014 The 'mumble-releng' Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that
:: can be found in the LICENSE file in the source tree or at
:: <http://mumble.info/mumble-releng/LICENSE>.

:: setup.cmd sets up a new Mumble build environment
:: in the user's home directory (%USERPROFILE%).
::
:: It calls the script setup\name.cmd, which attempts
:: to use a git binary in the user's %PATH% to determine
:: a unique name for the build environment.
::
:: For example, on a builder, the build environment
:: would be installed in a directory such as:
:: C:\Users\builder\MumbleBuild-2013-08-25-3dc1638

@echo off

set CYGWIN=nodosfilewarning

:: Check that git is in the user's path.
where git.exe 1>NUL 2>NUL
if not "%errorlevel%"=="0" (
	echo.
	echo Unable to find git in your PATH.
	echo How did you check out this repository?!
	exit /b
)

:: Get the basename of the build environment.
if "%WANT_WIN64_BUILDENV%" == "1" (
	for /f %%I in ('setup\name64.cmd') do set NAME=%%I
) else (
	for /f %%I in ('setup\name.cmd') do set NAME=%%I
)

:: Set the absolute path of the build env target.
set MUMBLE_PREFIX=C:\MumbleBuild\%NAME%
set MUMBLE_PREFIX_BUILD=%MUMBLE_PREFIX%.build

if not exist "C:\MumbleBuild" (
	echo.
	echo The C:\MumbleBuild directory does not exist. Please create it, and
	echo make sure your current user has full access to it.
	echo.
	echo The easiest way to do this is to create a junction from C:\MumbleBuild
	echo into your user's home directory.
	echo.
	echo Open a admin command prompt [Ctrl-X followed by A on Win 8] and ensure
	echo you're at the root of C:, and run the following set of commands:
	echo.
	echo   "c:\> mkdir %%USERPROFILE%%\MumbleBuild"
	echo   "c:\> mklink /j MumbleBuild %%USERPROFILE%%\MumbleBuild"
	echo.
	echo Anything that allows you to write to c:\MumbleBuild works, though.
	echo [Including mounting a directory from another partition in C:\MumbleBuild]
	echo.
	if not "%1"=="/noninteractive" (
		pause
{'fraction_non_alphanumeric': 0.1044776119402985, 'fraction_numerical': 0.01636976408281175, 'mean_word_length': 3.9939903846153846, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6422588', 'n_tokens_mistral': 1412, 'n_tokens_neox': 1317, 'n_words': 579}