@ECHO OFF

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html       to make standalone HTML files
	echo.  dirhtml    to make HTML files named index.html in directories
	echo.  singlehtml to make a single large HTML file
	echo.  pickle     to make pickle files
	echo.  json       to make JSON files
	echo.  htmlhelp   to make HTML files and a HTML help project
	echo.  qthelp     to make HTML files and a qthelp project
	echo.  devhelp    to make HTML files and a Devhelp project
	echo.  epub       to make an epub
	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  text       to make text files
	echo.  man        to make manual pages
	echo.  texinfo    to make Texinfo files
	echo.  gettext    to make PO message catalogs
	echo.  changes    to make an overview over all changed/added/deprecated items
	echo.  xml        to make Docutils-native XML files
	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
	echo.  linkcheck  to check all external links for integrity
	echo.  doctest    to run all doctests embedded in the documentation if enabled
	goto end
)

if "%1" == "clean" (
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
	del /q /s %BUILDDIR%\*
	goto end
)

%SPHINXBUILD% 2> nul
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

if "%1" == "html" (
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
	goto end
)

if "%1" == "dirhtml" (
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
	goto end
)

if "%1" == "singlehtml" (
	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
	goto end
)

if "%1" == "pickle" (
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can process the pickle files.
	goto end
)

if "%1" == "json" (
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can process the JSON files.
	goto end
)

if "%1" == "htmlhelp" (
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
	goto end
)

if "%1" == "qthelp" (
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Numba.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Numba.ghc
	goto end
)

if "%1" == "devhelp" (
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished.
	goto end
)

if "%1" == "epub" (
	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The epub file is in %BUILDDIR%/epub.
	goto end
)

if "%1" == "latex" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "latexpdf" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf
	cd %BUILDDIR%/..
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "latexpdfja" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf-ja
	cd %BUILDDIR%/..
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "text" (
	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The text files are in %BUILDDIR%/text.
	goto end
)

if "%1" == "man" (
	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The manual pages are in %BUILDDIR%/man.
	goto end
)

if "%1" == "texinfo" (
	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
	goto end
)

if "%1" == "gettext" (
	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
	goto end
)

if "%1" == "changes" (
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
	if errorlevel 1 exit /b 1
	echo.
	echo.The overview file is in %BUILDDIR%/changes.
	goto end
)

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
	if errorlevel 1 exit /b 1
	echo.
	echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
	goto end
)

if "%1" == "doctest" (
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
	if errorlevel 1 exit /b 1
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
	goto end
)

if "%1" == "xml" (
	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The XML files are in %BUILDDIR%/xml.
	goto end
)

if "%1" == "pseudoxml" (
	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
	goto end
)

:end

@ECHO OFF

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)

if "%1" == "" goto help

if "%1" == "help" (
	:help
	echo.Please use `make ^<target^>` where ^<target^> is one of
	echo.  html       to make standalone HTML files
	echo.  dirhtml    to make HTML files named index.html in directories
	echo.  singlehtml to make a single large HTML file
	echo.  pickle     to make pickle files
	echo.  json       to make JSON files
	echo.  htmlhelp   to make HTML files and a HTML help project
	echo.  qthelp     to make HTML files and a qthelp project
	echo.  devhelp    to make HTML files and a Devhelp project
	echo.  epub       to make an epub
	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
	echo.  text       to make text files
	echo.  man        to make manual pages
	echo.  texinfo    to make Texinfo files
	echo.  gettext    to make PO message catalogs
	echo.  changes    to make an overview over all changed/added/deprecated items
	echo.  xml        to make Docutils-native XML files
	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
	echo.  linkcheck  to check all external links for integrity
	echo.  doctest    to run all doctests embedded in the documentation if enabled
	goto end
)

if "%1" == "clean" (
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
	del /q /s %BUILDDIR%\*
	goto end
)

%SPHINXBUILD% 2> nul
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

if "%1" == "html" (
	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
	goto end
)

if "%1" == "dirhtml" (
	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
	goto end
)

if "%1" == "singlehtml" (
	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
	goto end
)

if "%1" == "pickle" (
	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can process the pickle files.
	goto end
)

if "%1" == "json" (
	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can process the JSON files.
	goto end
)

if "%1" == "htmlhelp" (
	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
	goto end
)

if "%1" == "qthelp" (
	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Numba.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Numba.ghc
	goto end
)

if "%1" == "devhelp" (
	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished.
	goto end
)

if "%1" == "epub" (
	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The epub file is in %BUILDDIR%/epub.
	goto end
)

if "%1" == "latex" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "latexpdf" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf
	cd %BUILDDIR%/..
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "latexpdfja" (
	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
	cd %BUILDDIR%/latex
	make all-pdf-ja
	cd %BUILDDIR%/..
	echo.
	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
	goto end
)

if "%1" == "text" (
	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The text files are in %BUILDDIR%/text.
	goto end
)

if "%1" == "man" (
	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The manual pages are in %BUILDDIR%/man.
	goto end
)

if "%1" == "texinfo" (
	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
	goto end
)

if "%1" == "gettext" (
	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
	goto end
)

if "%1" == "changes" (
	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
	if errorlevel 1 exit /b 1
	echo.
	echo.The overview file is in %BUILDDIR%/changes.
	goto end
)

if "%1" == "linkcheck" (
	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
	if errorlevel 1 exit /b 1
	echo.
	echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
	goto end
)

if "%1" == "doctest" (
	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
	if errorlevel 1 exit /b 1
	echo.
	echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
	goto end
)

if "%1" == "xml" (
	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The XML files are in %BUILDDIR%/xml.
	goto end
)

if "%1" == "pseudoxml" (
	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
	goto end
)

:end

fix building docs on windows

fix building docs on windows


export IDES_HOME=%HOME%/ides
export ECLIPSE_VERSION_NAME=lunajee
export ECLIPSE_HOME=export IDES_HOME=%HOME%/ides
export ECLIPSE_VERSION_NAME=lunajee
export ECLIPSE_HOME=%IDES_HOME%/eclipse/%ECLIPSE_VERSION_NAME%/eclipse
export WORKSPACES_HOME=%HOME%/workspaces
export WORKSPACE_HOME=%WORKSPACES_HOME%/jaulp.core
export ECLIPSE_EXECUTABLE=%ECLIPSE_HOME%/eclipse
export JAVA_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
export VM_ARGS=-Xms384m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=512M
%ECLIPSE_EXECUTABLE% /i /max /high -data %WORKSPACE_HOME% -showlocation vmargs %VM_ARGS% -javaagent:%ECLIPSE_HOME%/lombok.jar -Xbootclasspath/a:%ECLIPSE_HOME%/lombok.jar -Djava.library.path=%JAVA_LIBRARY_PATH%IDES_HOME%/eclipse/%ECLIPSE_VERSION_NAME%/eclipse
export WORKSPACES_HOME=%HOME%/workspaces
export WORKSPACE_HOME=%WORKSPACES_HOME%/jaulp.core
export ECLIPSE_EXECUTABLE=%ECLIPSE_HOME%/eclipse
export JAVA_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/jni/libsvnjavahl-1.so
export VM_ARGS=-Xms384m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=512M
%ECLIPSE_EXECUTABLE% /i /max /high -data %WORKSPACE_HOME% -showlocation vmargs %VM_ARGS% -javaagent:%ECLIPSE_HOME%/lombok.jar -Xbootclasspath/a:%ECLIPSE_HOME%/lombok.jar -Djava.library.path=%JAVA_LIBRARY_PATH%

Create start-eclipse.bat

Create start-eclipse.bat


@echo on

rmdir /S /Q .\Install

for /d %%x in (objfre_*) do rmdir /S /Q %%x
for /d %%x in (objchk_*) do rmdir /S /Q %%x
rmdir /S /Q .\sdv
rmdir /S /Q .\sdv.temp

del /F *.log *.wrn *.err *.sdf
del viogpudo.dvl.xml
del sdv-map.h

@echo on

rmdir /S /Q .\Install

for /d %%x in (objfre_*) do rmdir /S /Q %%x
for /d %%x in (objchk_*) do rmdir /S /Q %%x
rmdir /S /Q .\sdv
rmdir /S /Q .\sdv.temp

del /F *.log *.wrn *.err *.sdf *.sdv *.xml
del viogpudo.dvl.xml
del build.sdv.config
del sdv-map.h

adjust clean batch file

[viogpudo] adjust clean batch file

Signed-off-by: Vadim Rozenfeld <ec7704e9ba81ee09e4d04d359fcabafc60694303@redhat.com>


@REM
@REM Copyright (c) 2006, Intel Corporation
@REM All rights reserved. This program and the accompanying materials
@REM are licensed and made available under the terms and conditions of the BSD License
@REM which accompanies this distribution.  The full text of the license may be found at
@REM http://opensource.org/licenses/bsd-license.php
@REM
@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@REM

@echo off

:check_java
if "%JAVA_HOME%"=="" goto no_jdk

:check_wks
if "%WORKSPACE%"=="" goto no_wks

:check_ant
if "%ANT_HOME%"=="" goto no_ant
@REM set ANT_HOME=%WORKSPACE%\Tools\bin\apache-ant

:check_xmlbeans
if "%XMLBEANS_HOME"=="" goto no_xmlbeans
@REM set XMLBEANS_HOME=%WORKSPACE%\Tools\bin\xmlbeans

set Framework_Tools_Path=%WORKSPACE%\Tools\bin

set PATH=%WORKSPACE%\Tools\bin;%PATH%

set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%WORKSPACE%\Tools\Jars\GenBuild.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar;%WORKSPACE%\Tools\Jars\frameworktasks.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\saxon8-jdom.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8-sql.jar;%XMLBEANS_HOME%\lib\resolver.jar

call "ant" -f %WORKSPACE%\Tools\Source\PackageEditor\build.xml

call "java" -jar %WORKSPACE%\Tools\bin\PackageEditor.jar

goto end

:no_jdk
echo.
echo !!! Please set JAVA_HOME !!!
echo.
goto check_wks

:no_wks
echo.
echo !!! Please set WORKSPACE !!!
echo.
goto check_ant

:no_ant
echo.
echo !!! Please set ANT_HOME !!!
echo.
goto check_xmlbeans

:no_xmlbeans
echo.
echo !!! Please set XMLBEANS_HOME !!!
echo.
goto end

:end
@echo on

@REM
@REM Copyright (c) 2006, Intel Corporation
@REM All rights reserved. This program and the accompanying materials
@REM are licensed and made available under the terms and conditions of the BSD License
@REM which accompanies this distribution.  The full text of the license may be found at
@REM http://opensource.org/licenses/bsd-license.php
@REM
@REM THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@REM

@echo off

:check_java
if "%JAVA_HOME%"=="" goto no_jdk

:check_wks
if "%WORKSPACE%"=="" goto no_wks

:check_ant
if "%ANT_HOME%"=="" goto no_ant
@REM set ANT_HOME=%WORKSPACE%\Tools\bin\apache-ant

:check_xmlbeans
if "%XMLBEANS_HOME"=="" goto no_xmlbeans
@REM set XMLBEANS_HOME=%WORKSPACE%\Tools\bin\xmlbeans

set Framework_Tools_Path=%WORKSPACE%\Tools\bin

set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;%WORKSPACE%\Tools\bin;%XMLBEANS_HOME%\bin;%PATH%

set CLASSPATH=%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%WORKSPACE%\Tools\Jars\GenBuild.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\cpptasks.jar;%WORKSPACE%\Tools\Jars\frameworktasks.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\saxon8-jdom.jar
set CLASSPATH=%CLASSPATH%;%XMLBEANS_HOME%\lib\saxon8-sql.jar;%XMLBEANS_HOME%\lib\resolver.jar
set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\bin\PackageEditor.jar

call "ant" -f %WORKSPACE%\Tools\Source\PackageEditor\build.xml

call "java" org.tianocore.packaging.PackagingMain

goto end

:no_jdk
echo.
echo !!! Please set JAVA_HOME !!!
echo.
goto check_wks

:no_wks
echo.
echo !!! Please set WORKSPACE !!!
echo.
goto check_ant

:no_ant
echo.
echo !!! Please set ANT_HOME !!!
echo.
goto check_xmlbeans

:no_xmlbeans
echo.
echo !!! Please set XMLBEANS_HOME !!!
echo.
goto end

:end
@echo on

Change script to start with class

Change script to start with class

git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@81 6f19259b-4bc3-4df7-8a09-765794883524


Setlocal EnableDelayedExpansion EnableExtensions

set COM0COM_ROOT=c:\com0com
set COM0COM_BASE=com0com-3.0.0.0-i386-and-x64
set COM0COM_URL=http://downloads.sourceforge.net/project/com0com/com0com/3.0.0.0/%COM0COM_BASE%-unsigned.zip

if not exist %COM0COM_ROOT%\setupc.exe (
  mkdir %COM0COM_ROOT%
  echo ======================================================
  echo Download com0com
  echo ======================================================
  curl --silent --fail --max-time 120 --connect-timeout 30 -L --output %COM0COM_ROOT%\com0com.cer https://github.com/hybridgroup/rubyserial/raw/appveyor_deps/com0com.cer
  curl --silent --fail --max-time 120 --connect-timeout 30 -L --output setup_com0com_W7_x64_signed.exe https://github.com/hybridgroup/rubyserial/raw/appveyor_deps/setup_com0com_W7_x64_signed.exe
  echo ======================================================
  echo Install com0com
  echo ======================================================
  setup_com0com_W7_x64_signed.exe /S /D=%COM0COM_ROOT%
  dir %COM0COM_ROOT%
)

echo ======================================================
echo install virtual serial ports
echo ======================================================
cd %COM0COM_ROOT%
CertMgr /add com0com.cer /s /r localMachine root
CertMgr /add com0com.cer /s /r localMachine trustedpublisher
.\setupc.exe --silent --detail-prms install 0 - -
.\setupc.exe --silent --detail-prms install 1 - -

Setlocal EnableDelayedExpansion EnableExtensions

set COM0COM_ROOT=c:\com0com
set COM0COM_BASE=com0com-3.0.0.0-i386-and-x64
set COM0COM_URL=http://downloads.sourceforge.net/project/com0com/com0com/3.0.0.0/%COM0COM_BASE%-unsigned.zip

if not exist %COM0COM_ROOT%\setupc.exe (
  mkdir %COM0COM_ROOT%
  echo ======================================================
  echo Download com0com
  echo ======================================================
  curl --silent --fail --max-time 120 --connect-timeout 30 -L --output %COM0COM_ROOT%\com0com.cer https://github.com/hybridgroup/rubyserial/raw/appveyor_deps/com0com.cer
  curl --silent --fail --max-time 120 --connect-timeout 30 -L --output setup_com0com_W7_x64_signed.exe https://github.com/hybridgroup/rubyserial/raw/appveyor_deps/setup_com0com_W7_x64_signed.exe
)

echo ======================================================
echo install certificate
echo ======================================================
CertMgr /add %COM0COM_ROOT%/com0com.cer /s /r localMachine root
CertMgr /add %COM0COM_ROOT%/com0com.cer /s /r localMachine trustedpublisher

if not exist %COM0COM_ROOT%\setupc.exe (
  echo ======================================================
  echo Install com0com
  echo ======================================================
  setup_com0com_W7_x64_signed.exe /S /D=%COM0COM_ROOT%
  dir %COM0COM_ROOT%
)

echo ======================================================
echo install virtual serial ports
echo ======================================================
cd %COM0COM_ROOT%
.\setupc.exe --silent --detail-prms install 0 - -
.\setupc.exe --silent --detail-prms install 1 - -

Update AppVeyor file

Update AppVeyor file


REM Download ahmine and CanaryMod to set up coderdojobelfast Java room environment.

@echo off
setlocal

IF NOT EXIST %USERPROFILE%\Downloads\ahmine2-code.zip (
  REM get ahmine, from "Learn to Program with Minecraft Plugins", 2nd Edition, Andy Hunt, (c)2014 The Pragmatic Programmers.
  REM bitsadmin.exe /Transfer "Download ahmine" /Download http://media.pragprog.com/titles/ahmine2/code/ahmine2-code.zip %USERPROFILE%\Downloads\ahmine2-code.zip
)

REM get CanaryMod
IF NOT EXIST %USERPROFILE%\Downloads\CanaryMod.jar (
  bitsadmin.exe /Transfer "Download CanaryMod" /Download https://canarymod.net/releases/CanaryMod-1.2.0_0.jar %USERPROFILE%\Downloads\CanaryMod.jar
)

REM unpack ahmine
cd /d %~dp0
Call :UnZipFile "%USERPROFILE%\Downloads" "%USERPROFILE%\Downloads\ahmine2-code.zip"
Move /y "%USERPROFILE%\Downloads\code" "%USERPROFILE%\Desktop"

REM copy starter and jar file to server
md %USERPROFILE%\Desktop\server
Copy /y "%USERPROFILE%\Desktop\code\runtime\start_minecraft.bat" "%USERPROFILE%\Desktop\server"
Copy /y "%USERPROFILE%\Downloads\CanaryMod.jar" "%USERPROFILE%\Desktop\server"

REM Run canarymod first time
cd "%USERPROFILE%\Desktop\server"
.\"start_minecraft.bat"

endlocal
exit /b

:UnZipFile <ExtractTo> <newzipfile>
set vbs="%temp%\_.vbs"
if exist %vbs% del /f /q %vbs%
>%vbs%  echo Set fso = CreateObject("Scripting.FileSystemObject")
>>%vbs% echo If NOT fso.FolderExists(%1) Then
>>%vbs% echo fso.CreateFolder(%1)
>>%vbs% echo End If
>>%vbs% echo set objShell = CreateObject("Shell.Application")
>>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
>>%vbs% echo Call objShell.NameSpace(%1).CopyHere(FilesInZip, 20)
>>%vbs% echo Set fso = Nothing
>>%vbs% echo Set objShell = Nothing
cscript //nologo %vbs%
REM if exist %vbs% del /f /q %vbs%

REM Download ahmine and CanaryMod to set up coderdojobelfast Java room environment.

@echo off
setlocal

REM remove old folders
IF EXIST "%USERPROFILE%\Desktop\server" RD /S /Q "%USERPROFILE%\Desktop\server"
IF EXIST "%USERPROFILE%\Desktop\code" RD /S /Q "%USERPROFILE%\Desktop\code"

REM get ahmine, from "Learn to Program with Minecraft Plugins", 2nd Edition, Andy Hunt, (c)2014 The Pragmatic Programmers.
IF NOT EXIST %USERPROFILE%\Downloads\ahmine2-code.zip (
  bitsadmin.exe /Transfer "Download ahmine" /Download http://media.pragprog.com/titles/ahmine2/code/ahmine2-code.zip %USERPROFILE%\Downloads\ahmine2-code.zip
)

REM get CanaryMod
IF NOT EXIST %USERPROFILE%\Downloads\CanaryMod.jar (
  bitsadmin.exe /Transfer "Download CanaryMod" /Download https://canarymod.net/releases/CanaryMod-1.2.0_0.jar %USERPROFILE%\Downloads\CanaryMod.jar
)

REM unpack ahmine
cd /d %~dp0
Call :UnZipFile "%USERPROFILE%\Downloads" "%USERPROFILE%\Downloads\ahmine2-code.zip"
Move /y "%USERPROFILE%\Downloads\code" "%USERPROFILE%\Desktop"

REM copy starter and jar file to server
md %USERPROFILE%\Desktop\server
Copy /y "%USERPROFILE%\Desktop\code\runtime\start_minecraft.bat" "%USERPROFILE%\Desktop\server"
Copy /y "%USERPROFILE%\Downloads\CanaryMod.jar" "%USERPROFILE%\Desktop\server"

REM Run canarymod first time
cd "%USERPROFILE%\Desktop\server"
.\"start_minecraft.bat"

endlocal
exit /b

:UnZipFile <ExtractTo> <newzipfile>
set vbs="%temp%\_.vbs"
if exist %vbs% del /f /q %vbs%
>%vbs%  echo Set fso = CreateObject("Scripting.FileSystemObject")
>>%vbs% echo If NOT fso.FolderExists(%1) Then
>>%vbs% echo fso.CreateFolder(%1)
>>%vbs% echo End If
>>%vbs% echo set objShell = CreateObject("Shell.Application")
>>%vbs% echo set FilesInZip=objShell.NameSpace(%2).items
>>%vbs% echo Call objShell.NameSpace(%1).CopyHere(FilesInZip, 20)
>>%vbs% echo Set fso = Nothing
>>%vbs% echo Set objShell = Nothing
cscript //nologo %vbs%
if exist %vbs% del /f /q %vbs%

Clean up old code.

Clean up old code.

Remove directories server and code if they exist.


:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal

set GOBUILDFAIL=0

if exist make.bat goto ok
echo Must run make.bat from Go src directory.
goto fail
:ok

:: Grab default GOROOT_FINAL and set GOROOT for build.
:: The expression %VAR:\=\\% means to take %VAR%
:: and apply the substitution \ = \\, escaping the
:: backslashes.  Then we wrap that in quotes to create
:: a C string.
cd ..
set GOROOT=%CD%
cd src
if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%
set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""

echo # Building C bootstrap tool.
echo cmd/dist
if not exist ..\bin\tool mkdir ..\bin\tool
:: Windows has no glob expansion, so spell out cmd/dist/*.c.
gcc -O2 -Wall -Werror -o cmd/dist/dist.exe -Icmd/dist %DEFGOROOT% cmd/dist/buf.c cmd/dist/build.c cmd/dist/buildgc.c cmd/dist/buildruntime.c cmd/dist/goc2c.c cmd/dist/main.c cmd/dist/windows.c
if errorlevel 1 goto fail
.\cmd\dist\dist env -wp >env.bat
if errorlevel 1 goto fail
call env.bat
del env.bat
:: Echo with no arguments prints whether echo is turned on, so echo dot.
echo .

echo # Building compilers and Go bootstrap tool.
.\cmd\dist\dist bootstrap -a -v
if errorlevel 1 goto fail
:: Delay move of dist tool to now, because bootstrap cleared tool directory.
move .\cmd\dist\dist.exe %GOTOOLDIR%\dist.exe
%GOTOOLDIR%\go_bootstrap clean -i std
echo .

if not %GOHOSTARCH% == %GOARCH% goto localbuild
if not %GOHOSTOS% == %GOOS% goto localbuild
goto mainbuild

:localbuild
echo # Building tools for local system. %GOHOSTOS%/%GOHOSTARCH%
setlocal
set GOOS=%GOHOSTOS%
set GOARCH=%GOHOSTARCH%
%GOTOOLDIR%\go_bootstrap install -v std
endlocal
if errorlevel 1 goto fail
echo .

:mainbuild
echo # Building packages and commands.
%GOTOOLDIR%\go_bootstrap install -a -v std
if errorlevel 1 goto fail
del %GOTOOLDIR%\go_bootstrap.exe
echo .

if x%1==x--no-banner goto nobanner
%GOTOOLDIR%\dist banner
:nobanner

goto end

:fail
set GOBUILDFAIL=1

:end

:: Copyright 2012 The Go Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style
:: license that can be found in the LICENSE file.
@echo off

:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal

set GOBUILDFAIL=0

if exist make.bat goto ok
echo Must run make.bat from Go src directory.
goto fail
:ok

:: Grab default GOROOT_FINAL and set GOROOT for build.
:: The expression %VAR:\=\\% means to take %VAR%
:: and apply the substitution \ = \\, escaping the
:: backslashes.  Then we wrap that in quotes to create
:: a C string.
cd ..
set GOROOT=%CD%
cd src
if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%
set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""

echo # Building C bootstrap tool.
echo cmd/dist
if not exist ..\bin\tool mkdir ..\bin\tool
:: Windows has no glob expansion, so spell out cmd/dist/*.c.
gcc -O2 -Wall -Werror -o cmd/dist/dist.exe -Icmd/dist %DEFGOROOT% cmd/dist/buf.c cmd/dist/build.c cmd/dist/buildgc.c cmd/dist/buildruntime.c cmd/dist/goc2c.c cmd/dist/main.c cmd/dist/windows.c
if errorlevel 1 goto fail
.\cmd\dist\dist env -wp >env.bat
if errorlevel 1 goto fail
call env.bat
del env.bat
:: Echo with no arguments prints whether echo is turned on, so echo dot.
echo .

echo # Building compilers and Go bootstrap tool.
set buildall=-a
if x%1==x--no-clean set buildall=
.\cmd\dist\dist bootstrap %buildall% -v
if errorlevel 1 goto fail
:: Delay move of dist tool to now, because bootstrap cleared tool directory.
move .\cmd\dist\dist.exe %GOTOOLDIR%\dist.exe
%GOTOOLDIR%\go_bootstrap clean -i std
echo .

if not %GOHOSTARCH% == %GOARCH% goto localbuild
if not %GOHOSTOS% == %GOOS% goto localbuild
goto mainbuild

:localbuild
echo # Building tools for local system. %GOHOSTOS%/%GOHOSTARCH%
setlocal
set GOOS=%GOHOSTOS%
set GOARCH=%GOHOSTARCH%
%GOTOOLDIR%\go_bootstrap install -v std
endlocal
if errorlevel 1 goto fail
echo .

:mainbuild
echo # Building packages and commands.
%GOTOOLDIR%\go_bootstrap install -a -v std
if errorlevel 1 goto fail
del %GOTOOLDIR%\go_bootstrap.exe
echo .

if x%1==x--no-banner goto nobanner
%GOTOOLDIR%\dist banner
:nobanner

goto end

:fail
set GOBUILDFAIL=1

:end

implement --no-clean

make.bat: implement --no-clean

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/5656070


@echo off

if not exist installers\python\modules (
    mkdir installers\python\modules
)
if not exist installers\python\msi (
    mkdir installers\python\msi
)

:: get python installers
call:download_python 2.6.6
call:download_python 2.7.9
call:download_python 3.2.5
call:download_python 3.3.5
call:download_python 3.4.2

:: get pywin32 installers
call:download_pywin32 2.6
call:download_pywin32 2.7
call:download_pywin32 3.2
call:download_pywin32 3.3
call:download_pywin32 3.4

:: get pip
echo Downloading get-pip.py
curl --silent -o installers\python\modules\get-pip.py https://bootstrap.pypa.io/get-pip.py

:download_python
    if not "%~1" == "" (
        set PYTHON_VERSION=%~1
        echo Downloading Python %PYTHON_VERSION% 32-bit
        curl --silent -C - -o installers\python\msi\python-%PYTHON_VERSION%-x86.msi https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%.msi
        echo Downloading Python %PYTHON_VERSION% 64-bit
        curl --silent -C - -o installers\python\msi\python-%PYTHON_VERSION%-x64.msi https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%.amd64.msi
    )
goto :eof

:download_pywin32
    if not "%~1" == "" (
        set PYWIN_VERSION=%~1
        echo Downloading pywin32 32-bit for Python %PYWIN_VERSION%
        curl --silent -C - -L -o installers\python\modules\pywin32-219-py%PYWIN_VERSION%-x86.exe http://sourceforge.net/projects/pywin32/files/pywin32/Build%%20219/pywin32-219.win32-py%PYWIN_VERSION%.exe/download
        echo Downloading pywin32 64-bit for Python %PYWIN_VERSION%
        curl --silent -C - -L -o installers\python\modules\pywin32-219-py%PYWIN_VERSION%-x64.exe http://sourceforge.net/projects/pywin32/files/pywin32/Build%%20219/pywin32-219.win-amd64-py%PYWIN_VERSION%.exe/download
    )
goto :eof

@echo off

if not exist installers\python\modules (
    mkdir installers\python\modules
)
if not exist installers\python\msi (
    mkdir installers\python\msi
)

:: get python installers
call:download_python 2.6.6
call:download_python 2.7.9
call:download_python 3.2.5
call:download_python 3.3.5
call:download_python 3.4.2

:: get pywin32 installers
call:download_pywin32 2.6
call:download_pywin32 2.7
call:download_pywin32 3.2
call:download_pywin32 3.3
call:download_pywin32 3.4

:: get pip
echo Downloading get-pip.py
curl --silent -o installers\python\modules\get-pip.py https://bootstrap.pypa.io/get-pip.py

:download_python
    if [%~1] == [] (goto :eof)
    setlocal
    set VERSION=%~1
    echo Downloading Python %VERSION% 32-bit
    curl --silent -C - -o installers\python\msi\python-%VERSION%-x86.msi https://www.python.org/ftp/python/%VERSION%/python-%VERSION%.msi
    echo Downloading Python %VERSION% 64-bit
    curl --silent -C - -o installers\python\msi\python-%VERSION%-x64.msi https://www.python.org/ftp/python/%VERSION%/python-%VERSION%.amd64.msi
    endlocal
goto :eof

:download_pywin32
    if [%~1] == [] (goto :eof)
    setlocal
    set VERSION=%~1
    echo Downloading pywin32 32-bit for Python %VERSION%
    curl --silent -C - -L -o installers\python\modules\pywin32-219-py%VERSION%-x86.exe http://sourceforge.net/projects/pywin32/files/pywin32/Build%%20219/pywin32-219.win32-py%VERSION%.exe/download
    echo Downloading pywin32 64-bit for Python %VERSION%
    curl --silent -C - -L -o installers\python\modules\pywin32-219-py%VERSION%-x64.exe http://sourceforge.net/projects/pywin32/files/pywin32/Build%%20219/pywin32-219.win-amd64-py%VERSION%.exe/download
    endlocal
goto :eof

use local variables

use local variables


@echo off
echo [Pre-Requirement] Makesure install JDK 6.0+ and set the JAVA_HOME.
echo [Pre-Requirement] Makesure install Maven 3.0.3+ and set the PATH.

set MVN=mvn
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m

echo [Step 1] Install all springside modules and archetype to local maven repository.
cd ppcxy-parent
call %MVN% clean install
if errorlevel 1 goto error

cd ..
call %MVN% clean install
if errorlevel 1 goto error

echo [Step 2] Initialize schema and data for all example projects.
cd cyfm-web
call %MVN% antrun:run -Prefresh-db
if errorlevel 1 goto error

start "cyfm-web" %MVN% clean jetty:run -Djetty.port=8081

echo [INFO] Please wait a moment. When you see "[INFO] Started Jetty Server" in both 2 popup consoles, you can access below demo sites:
echo [INFO] http://localhost:8081/cyfm-web

goto end
:error
echo Error Happen!!
:end
pause

@echo off
echo [Pre-Requirement] Makesure install JDK 6.0+ and set the JAVA_HOME.
echo [Pre-Requirement] Makesure install Maven 3.0.3+ and set the PATH.

set MVN=mvn
set MAVEN_OPTS=%MAVEN_OPTS% -XX:MaxPermSize=128m

echo [Step 1] Install all springside modules and archetype to local maven repository.
cd ppcxy-parent
call %MVN% clean install
if errorlevel 1 goto error

cd ..
call %MVN% -Dmaven.test.skip=true clean install
if errorlevel 1 goto error

echo [Step 2] Initialize schema and data for all example projects.
cd cyfm-web
call %MVN% antrun:run -Prefresh-db
if errorlevel 1 goto error

start "cyfm-web" %MVN% clean jetty:run -Djetty.port=8081

echo [INFO] Please wait a moment. When you see "[INFO] Started Jetty Server" in both 2 popup consoles, you can access below demo sites:
echo [INFO] http://localhost:8081/cyfm-web

goto end
:error
echo Error Happen!!
:end
pause

test skip

test skip

quick-start test skip


Make run_webkit_test.bat workable even if we execute it
on a directory other than webkit\tools\layout_tests\.

%~dp0 means Drive name + Path name of the 0th argument (the bat file).

Original patch by tkent@google.com.
See http://codereview.chromium.org/113389
r=ojan

TEST=None
BUG=None

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@16838 4ff67af0-8c30-449e-8e8b-ad334ec8d88c


@echo off
setlocal EnableExtensions EnableDelayedExpansion

rem ==========================================
rem            PARSE ARGUMENTS
rem ==========================================

set CSCOPE_EXE=cscope
set CSCOPE_ARGS=
set DB_FILE=cscope.out
set FILE_LIST_CMD=
set LOG_FILE=

:ParseArgs
if [%1]==[] goto :DoneParseArgs
if [%1]==[-e] (
    set CSCOPE_EXE=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-f] (
    set DB_FILE=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-p] (
    set PROJ_ROOT=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-L] (
    set FILE_LIST_CMD=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-l] (
    set LOG_FILE=%~2
    shift
    goto :LoopParseArgs
)
echo Invalid Argument: %1
goto :Usage

:LoopParseArgs
shift
goto :ParseArgs

:DoneParseArgs

rem ==========================================
rem             GENERATE DATABASE
rem ==========================================

if [%LOG_FILE%]==[] set LOG_FILE=CON

echo Locking db file > %LOG_FILE%
echo locked > "%DB_FILE%.lock"

echo Running cscope >> %LOG_FILE%
if NOT ["%FILE_LIST_CMD%"]==[""] (
    if ["%PROJECT_ROOT%"]==["."] (
        for /F "usebackq delims=" %%F in (`%FILE_LIST_CMD%`) do @echo "%%F">%DB_FILE%.files
    ) else (
        rem Potentially useful:
        rem http://stackoverflow.com/questions/9749071/cmd-iterate-stdin-piped-from-another-command
        for /F "usebackq delims=" %%F in (`%FILE_LIST_CMD%`) do @echo "%PROJECT_ROOT%\%%F">%DB_FILE%.files
    )
) ELSE (
    for /F "usebackq delims=" %%F in (`dir /S /B /A-D .`) do @echo "%%F">%DB_FILE%.files
)
set CSCOPE_ARGS=%CSCOPE_ARGS% -i %DB_FILE%.files
"%CSCOPE_EXE%" %CSCOPE_ARGS% -b -k -f "%DB_FILE%"
if ERRORLEVEL 1 (
    echo ERROR: Cscope executable returned non-zero code. >> %LOG_FILE%
)

echo Unlocking db file >> %LOG_FILE%
del /F "%DB_FILE%.files" "%DB_FILE%.lock"
if ERRORLEVEL 1 (
    echo ERROR: Unable to remove file lock. >> %LOG_FILE%
)

echo Done. >> %LOG_FILE%

goto :EOF

rem ==========================================
rem                 USAGE
rem ==========================================

:Usage
echo Usage:
echo    %~n0 ^<options^>
echo.
echo    -e [exe=cscope]:     The cscope executable to run
echo    -f [file=scope.out]: The path to the database file to create
echo    -p [dir=]:           The path to the project root
echo    -L [cmd=]:           The file list command to run
echo    -l [log=]:           The log file to output to
echo.

@echo off
setlocal EnableExtensions EnableDelayedExpansion

rem ==========================================
rem            PARSE ARGUMENTS
rem ==========================================

set CSCOPE_EXE=cscope
set CSCOPE_ARGS=
set DB_FILE=cscope.out
set FILE_LIST_CMD=
set LOG_FILE=

:ParseArgs
if [%1]==[] goto :DoneParseArgs
if [%1]==[-e] (
    set CSCOPE_EXE=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-f] (
    set DB_FILE=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-p] (
    set PROJ_ROOT=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-L] (
    set FILE_LIST_CMD=%~2
    shift
    goto :LoopParseArgs
)
if [%1]==[-l] (
    set LOG_FILE=%~2
    shift
    goto :LoopParseArgs
)
echo Invalid Argument: %1
goto :Usage

:LoopParseArgs
shift
goto :ParseArgs

:DoneParseArgs

rem ==========================================
rem             GENERATE DATABASE
rem ==========================================

if [%LOG_FILE%]==[] set LOG_FILE=CON

echo Locking db file > %LOG_FILE%
echo locked > "%DB_FILE%.lock"

echo Running cscope >> %LOG_FILE%
if NOT ["%FILE_LIST_CMD%"]==[""] (
    if ["%PROJECT_ROOT%"]==["."] (
        for /F "usebackq delims=" %%F in (`%FILE_LIST_CMD%`) do @echo "%%F">%DB_FILE%.files
    ) else (
        rem Potentially useful:
        rem http://stackoverflow.com/questions/9749071/cmd-iterate-stdin-piped-from-another-command
        for /F "usebackq delims=" %%F in (`%FILE_LIST_CMD%`) do @echo "%PROJECT_ROOT%\%%F">%DB_FILE%.files
    )
) ELSE (
    for /F "usebackq delims=" %%F in (`dir /S /B /A-D .`) do @echo "%%F">%DB_FILE%.files
)
set CSCOPE_ARGS=%CSCOPE_ARGS% -i %DB_FILE%.files
"%CSCOPE_EXE%" %CSCOPE_ARGS% -b -k -f "%DB_FILE%"
if ERRORLEVEL 1 (
    echo ERROR: Cscope executable returned non-zero code. >> %LOG_FILE%
)

echo Unlocking db file >> %LOG_FILE%
del /F "%DB_FILE%.files" "%DB_FILE%.lock"
if ERRORLEVEL 1 (
    echo ERROR: Unable to remove file lock. >> %LOG_FILE%
)

echo Done. >> %LOG_FILE%

goto :EOF

rem ==========================================
rem                 USAGE
rem ==========================================

:Usage
echo Usage:
echo    %~n0 ^<options^>
echo.
echo    -e [exe=cscope]:             The cscope executable to run
echo    -f [file=cscope.out]:        The path to the database file to create
echo    -p [dir=]:                   The path to the project root
echo    -L [cmd=]:                   The file list command to run
echo    -l [log=]:                   The log file to output to
echo.

Fix default value of `-f` option for update_scopedb.cmd


@if not defined _echo @echo off
setlocal enabledelayedexpansion

SET CMDHOME=%~dp0.
if "%BUILD_FLAGS%"=="" SET BUILD_FLAGS=/m:1 /v:m
if not defined BuildConfiguration SET BuildConfiguration=Debug

:: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and
:: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69).
set Platform=

:: Locate dotnet.exe, we're processing multi-line output of where.exe and only matchin the first tag of the
:: found version number

set /p REQUIRED_DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"

echo .Net Core version required: %REQUIRED_DOTNET_VERSION%

for /f "tokens=1 delims=. " %%a in ("%REQUIRED_DOTNET_VERSION%") do set REQUIRED_DOTNET_VERSION_MAJOR=%%a

for /f "tokens=*" %%i in ('where dotnet.exe') do (
  set INSTALLED_DOTNET_EXE=%%i

  echo Found dotnet.exe at: "!INSTALLED_DOTNET_EXE!"

  for /f "tokens=*" %%j in ('"!INSTALLED_DOTNET_EXE!" --version') do set INSTALLED_DOTNET_VERSION=%%j

  if [!INSTALLED_DOTNET_VERSION!] neq [] (
    for /f "tokens=1 delims=. " %%a in ("!INSTALLED_DOTNET_VERSION!") do set INSTALLED_DOTNET_VERSION_MAJOR=%%a
  )

  if [!REQUIRED_DOTNET_VERSION_MAJOR!]==[!INSTALLED_DOTNET_VERSION_MAJOR!] (

    echo .Net Core major version is matching !INSTALLED_DOTNET_VERSION!, using the installed version.

    set _dotnet="!INSTALLED_DOTNET_EXE!"

    goto :dotnet-installed
  )
)

:install-dotnet

:: Restore the Tools directory
call %~dp0init-tools.cmd
if NOT [%ERRORLEVEL%]==[0] exit /b 1

set _toolRuntime=%~dp0Tools
set _dotnet=%_toolRuntime%\dotnetcli\dotnet.exe

SET PATH=%_toolRuntime%\dotnetcli;%PATH%

:dotnet-installed

SET TOOLS_PACKAGES_PATH=%CMDHOME%\packages

SET SOLUTION=%CMDHOME%\Orleans.sln

:: Set DateTime suffix for debug builds
if "%BuildConfiguration%" == "Debug" for /f %%j in ('powershell -NoProfile -ExecutionPolicy ByPass Get-Date -format "{yyyyMMddHHmm}"') do set DATE_SUFFIX=%%j
if "%BuildConfiguration%" == "Debug" SET AdditionalConfigurationProperties=;VersionDateSuffix=%DATE_SUFFIX%

if "%1" == "Pack" GOTO :Package

@echo ===== Building %SOLUTION% =====
SET STEP=Download build tools
call %_dotnet% restore "%CMDHOME%\Build\Tools.csproj" --packages %TOOLS_PACKAGES_PATH%

@echo Build %BuildConfiguration% ==============================
SET STEP=Restore %BuildConfiguration%

call %_dotnet% restore %BUILD_FLAGS% /bl:%BuildConfiguration%-Restore.binlog /p:Configuration=%BuildConfiguration%%AdditionalConfigurationProperties% "%SOLUTION%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo RESTORE ok for %BuildConfiguration% %SOLUTION%

SET STEP=Build %BuildConfiguration%
call %_dotnet% build --no-restore %BUILD_FLAGS% /bl:%BuildConfiguration%-Build.binlog /p:Configuration=%BuildConfiguration%%AdditionalConfigurationProperties% "%SOLUTION%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo BUILD ok for %BuildConfiguration% %SOLUTION%

:Package
@echo Package BuildConfiguration ============================
SET STEP=Pack %BuildConfiguration%

call %_dotnet% pack --no-build --no-restore %BUILD_FLAGS% /bl:%BuildConfiguration%-Pack.binlog /p:Configuration=%BuildConfiguration%%AdditionalConfigurationProperties% "%SOLUTION%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo PACKAGE ok for %BuildConfiguration% %SOLUTION%

:BuildFinished
@echo ===== Build succeeded for %SOLUTION% =====
@GOTO :EOF

:ErrorStop
set RC=%ERRORLEVEL%
if "%STEP%" == "" set STEP=%BuildConfiguration%
@echo ===== Build FAILED for %SOLUTION% -- %STEP% with error %RC% - CANNOT CONTINUE =====
exit /B %RC%
:EOF

@if not defined _echo @echo off
setlocal enabledelayedexpansion

SET CMDHOME=%~dp0.
if "%BUILD_FLAGS%"=="" SET BUILD_FLAGS=/m /v:m
if not defined BuildConfiguration SET BuildConfiguration=Debug

:: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and
:: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69).
set Platform=

:: Locate dotnet.exe, we're processing multi-line output of where.exe and only matchin the first tag of the
:: found version number

set /p REQUIRED_DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"

echo .Net Core version required: %REQUIRED_DOTNET_VERSION%

for /f "tokens=1 delims=. " %%a in ("%REQUIRED_DOTNET_VERSION%") do set REQUIRED_DOTNET_VERSION_MAJOR=%%a

for /f "tokens=*" %%i in ('where dotnet.exe') do (
  set INSTALLED_DOTNET_EXE=%%i

  echo Found dotnet.exe at: "!INSTALLED_DOTNET_EXE!"

  for /f "tokens=*" %%j in ('"!INSTALLED_DOTNET_EXE!" --version') do set INSTALLED_DOTNET_VERSION=%%j

  if [!INSTALLED_DOTNET_VERSION!] neq [] (
    for /f "tokens=1 delims=. " %%a in ("!INSTALLED_DOTNET_VERSION!") do set INSTALLED_DOTNET_VERSION_MAJOR=%%a
  )

  if [!REQUIRED_DOTNET_VERSION_MAJOR!]==[!INSTALLED_DOTNET_VERSION_MAJOR!] (

    echo .Net Core major version is matching !INSTALLED_DOTNET_VERSION!, using the installed version.

    set _dotnet="!INSTALLED_DOTNET_EXE!"

    goto :dotnet-installed
  )
)

:install-dotnet

:: Restore the Tools directory
call %~dp0init-tools.cmd
if NOT [%ERRORLEVEL%]==[0] exit /b 1

set _toolRuntime=%~dp0Tools
set _dotnet=%_toolRuntime%\dotnetcli\dotnet.exe

SET PATH=%_toolRuntime%\dotnetcli;%PATH%

:dotnet-installed

SET TOOLS_PACKAGES_PATH=%CMDHOME%\packages

SET SOLUTION=%CMDHOME%\Orleans.sln

:: Set DateTime suffix for debug builds
if "%BuildConfiguration%" == "Debug" for /f %%j in ('powershell -NoProfile -ExecutionPolicy ByPass Get-Date -format "{yyyyMMddHHmm}"') do set DATE_SUFFIX=%%j
if "%BuildConfiguration%" == "Debug" SET AdditionalConfigurationProperties=;VersionDateSuffix=%DATE_SUFFIX%

if "%1" == "Pack" GOTO :Package

@echo ===== Building %SOLUTION% =====
SET STEP=Download build tools
call %_dotnet% restore "%CMDHOME%\Build\Tools.csproj" --packages %TOOLS_PACKAGES_PATH%

@echo Build %BuildConfiguration% ==============================
SET STEP=Restore %BuildConfiguration%

call %_dotnet% restore %BUILD_FLAGS% /bl:%BuildConfiguration%-Restore.binlog /p:Configuration=%BuildConfiguration%%AdditionalConfigurationProperties% "%SOLUTION%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo RESTORE ok for %BuildConfiguration% %SOLUTION%

SET STEP=Build %BuildConfiguration%
call %_dotnet% build --no-restore %BUILD_FLAGS% /bl:%BuildConfiguration%-Build.binlog /p:Configuration=%BuildConfiguration%%AdditionalConfigurationProperties% "%SOLUTION%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo BUILD ok for %BuildConfiguration% %SOLUTION%

:Package
@echo Package BuildConfiguration ============================
SET STEP=Pack %BuildConfiguration%

call %_dotnet% pack --no-build --no-restore %BUILD_FLAGS% /bl:%BuildConfiguration%-Pack.binlog /p:Configuration=%BuildConfiguration%%AdditionalConfigurationProperties% "%SOLUTION%"
@if ERRORLEVEL 1 GOTO :ErrorStop
@echo PACKAGE ok for %BuildConfiguration% %SOLUTION%

:BuildFinished
@echo ===== Build succeeded for %SOLUTION% =====
@GOTO :EOF

:ErrorStop
set RC=%ERRORLEVEL%
if "%STEP%" == "" set STEP=%BuildConfiguration%
@echo ===== Build FAILED for %SOLUTION% -- %STEP% with error %RC% - CANNOT CONTINUE =====
exit /B %RC%
:EOF

Enable parallel build in Build.cmd (#3554)


echo off
del C:\tmp /q
mkdir C:\tmp
cd C:\tmp
powershell.exe wget https://raw.githubusercontent.com/MaxDistructo/ShellScripts/master/reloads/Script1.ps1 -outfile Script1.ps1
powershell.exe -executionpolicy bypass -file ./Script1.ps1

Create Run.bat

Create Run.bat


@echo off
:: ############################
:: # Install the dotfiles on Windows systems.
:: ############################

NET SESSION >nul 2>&1
if %ERRORLEVEL% neq 0 (
    echo Not an admin, exiting.
    exit /B 1
)

setlocal EnableDelayedExpansion

if exist "%HOME%" (
	set homeDir=%HOME%
) else (
	if exist "%HOMEDRIVE%%HOMEPATH%" (
		set homeDir=%HOMEDRIVE%%HOMEPATH%
	) else (
		set homeDir=%USERPROFILE%
	)
)

IF %homeDir:~-1%==\ SET homeDir=%homeDir:~0,-1%

set dotfilesDir=%~dp0
set backupDir=%homeDir%\dotfiles_backup
set dotfiles=bashrc bash_profile config minttyrc zshenv puppet-lint.rc

:: add registry key for init.bat
if exist "%CLINK_DIR%" (
    reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_EXPAND_SZ /d "%dotfilesDir%init.bat&\"%%CLINK_DIR%%\clink\" inject --profile ~\clink" /f
) else (
    reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "%dotfilesDir%init.bat" /f
)

for %%A in (%dotfiles%) DO (
    call:createSymLink "%dotfilesDir%%%A" "%homeDir%\.%%A" "%backupDir%" true
)

call:createSymLink "%dotfilesDir%config\readline\inputrc" "%homeDir%\.inputrc" "%backupDir%" true

set sublimeDir=%APPDATA%\Sublime Text 3\Packages
set backupDir=%sublimeDir%\dotfiles_backup

if exist "%sublimeDir%" (
    call:createSymLink "%dotfilesDir%sublime\User" "%sublimeDir%\User" "%backupDir%" false
    call:createSymLink "%dotfilesDir%sublime\User (OS Settings)" "%sublimeDir%\User (OS Settings)" "%backupDir%" false
)

set vsCodeDir=%APPDATA%\Code
set backupDir=%vsCodeDir%\dotfiles_backup

if exist "%vsCodeDir%" (
    call:createSymLink "%dotfilesDir%vscode\User" "%vsCodeDir%\User" "%backupDir%" false
)

set backupDir=%homeDir%\dotfiles_backup\atom
set atomfiles=config.cson init.coffee keymap.cson snippets.cson styles.less

for %%A in (%atomfiles%) DO (
    call:createSymLink "%dotfilesDir%\atom\%%A" "%homeDir%\.atom\%%A" "%backupDir%" false
)

set backupDir=%homeDir%\dotfiles_backup\bin
set binfiles=create-eclipse-shortcuts.cmd create-eclipse-shortcuts.ps1 stree.cmd update-everything.cmd

for %%A in (%binfiles%) DO (
    call:createSymLink "%dotfilesDir%\bin\%%A" "%homeDir%\bin\%%A" "%backupDir%" false
)

PowerShell.exe -Command  "& Set-ExecutionPolicy RemoteSigned -Force"
PowerShell.exe -ExecutionPolicy RemoteSigned -File install-win.ps1 %dotfilesDir%Microsoft.PowerShell_profile.ps1

goto:EOF

::function
:createSymLink - target linkName backupDirectory hideLink
    set linkExists="0"
    if exist "%~2" (
        set Z=&& for %%A in ("%~2") do set Z=%%~aA
        if "!Z:~8,1!" == "l" (
            set linkExists="1"
        ) else (
            if not exist "%~3" (
                mkdir "%~3"
            )
            echo Moving existing %2 to %3
            move "%~2" "%~3"
        )
    )

    if !linkExists! == "0" (
        if exist "%~1\" (
            mklink /d "%~2" "%~1"
        ) else (
            mklink "%~2" "%~1"
        )
        if %4 == "true" (
        	attrib /L "%~2" +h
        )
    ) else (
        echo Not replacing existing link %2
    )

goto:EOF

@echo off
:: ############################
:: # Install the dotfiles on Windows systems.
:: ############################

NET SESSION >nul 2>&1
if %ERRORLEVEL% neq 0 (
    echo Not an admin, exiting.
    exit /B 1
)

setlocal EnableDelayedExpansion

if exist "%HOME%" (
	set homeDir=%HOME%
) else (
	if exist "%HOMEDRIVE%%HOMEPATH%" (
		set homeDir=%HOMEDRIVE%%HOMEPATH%
	) else (
		set homeDir=%USERPROFILE%
	)
)

IF %homeDir:~-1%==\ SET homeDir=%homeDir:~0,-1%

set dotfilesDir=%~dp0
set backupDir=%homeDir%\dotfiles_backup
set dotfiles=bashrc bash_profile config minttyrc zshenv puppet-lint.rc

:: add registry key for init.bat
if exist "%CLINK_DIR%" (
    reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_EXPAND_SZ /d "%dotfilesDir%init.bat&\"%%CLINK_DIR%%\clink\" inject --profile ~\clink" /f
) else (
    reg add "HKCU\Software\Microsoft\Command Processor" /v AutoRun /t REG_SZ /d "%dotfilesDir%init.bat" /f
)

for %%A in (%dotfiles%) DO (
    call:createSymLink "%dotfilesDir%%%A" "%homeDir%\.%%A" "%backupDir%" true
)

call:createSymLink "%dotfilesDir%config\readline\inputrc" "%homeDir%\.inputrc" "%backupDir%" true

set sublimeDir=%APPDATA%\Sublime Text 3\Packages
set backupDir=%homeDir%\dotfiles_backup\sublime

if exist "%sublimeDir%" (
    call:createSymLink "%dotfilesDir%sublime\User" "%sublimeDir%\User" "%backupDir%" false
    call:createSymLink "%dotfilesDir%sublime\User (OS Settings)" "%sublimeDir%\User (OS Settings)" "%backupDir%" false
)

set vsCodeDir=%APPDATA%\Code
set backupDir=%homeDir%\dotfiles_backup\code

if exist "%vsCodeDir%" (
    call:createSymLink "%dotfilesDir%vscode\User" "%vsCodeDir%\User" "%backupDir%" false
)

set backupDir=%homeDir%\dotfiles_backup\atom
set atomfiles=config.cson init.coffee keymap.cson snippets.cson styles.less

for %%A in (%atomfiles%) DO (
    call:createSymLink "%dotfilesDir%\atom\%%A" "%homeDir%\.atom\%%A" "%backupDir%" false
)

set backupDir=%homeDir%\dotfiles_backup\bin
set binfiles=create-eclipse-shortcuts.cmd create-eclipse-shortcuts.ps1 stree.cmd update-everything.cmd

for %%A in (%binfiles%) DO (
    call:createSymLink "%dotfilesDir%\bin\%%A" "%homeDir%\bin\%%A" "%backupDir%" false
)

PowerShell.exe -Command  "& Set-ExecutionPolicy RemoteSigned -Force"
PowerShell.exe -ExecutionPolicy RemoteSigned -File install-win.ps1 %dotfilesDir%Microsoft.PowerShell_profile.ps1

goto:EOF

::function
:createSymLink - target linkName backupDirectory hideLink
    set linkExists="0"
    if exist "%~2" (
        set Z=&& for %%A in ("%~2") do set Z=%%~aA
        if "!Z:~8,1!" == "l" (
            set linkExists="1"
        ) else (
            if not exist "%~3" (
                mkdir "%~3"
            )
            echo Moving existing %2 to %3
            move "%~2" "%~3"
        )
    )

    if !linkExists! == "0" (
        if exist "%~1\" (
            mklink /d "%~2" "%~1"
        ) else (
            mklink "%~2" "%~1"
        )
        if %4 == "true" (
        	attrib /L "%~2" +h
        )
    ) else (
        echo Not replacing existing link %2
    )

goto:EOF

Backup everything to ~/dotfiles_backup

Backup everything to ~/dotfiles_backup


@ echo off
:: Script for starting the Salt
:: Accepts all parameters that Salt

:: Define Variables
Set SaltDir=%~dp0
Set SaltDir=%SaltDir:~0,-1%
Set Python=%SaltDir%\bin\python.exe
Set Script=%SaltDir%\bin\Scripts\salt

:: Launch Script
"%Python%" "%Script%" %*

Add missing batch file

Add missing batch file


@echo off
rem Licensed to the Apache Software Foundation (ASF) under one or more
rem contributor license agreements.  See the NOTICE file distributed with
rem this work for additional information regarding copyright ownership.
rem The ASF licenses this file to You under the Apache License, Version 2.0
rem (the "License"); you may not use this file except in compliance with
rem the License.  You may obtain a copy of the License at
rem
rem     http://www.apache.org/licenses/LICENSE-2.0
rem
rem Unless required by applicable law or agreed to in writing, software
rem distributed under the License is distributed on an "AS IS" BASIS,
rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem See the License for the specific language governing permissions and
rem limitations under the License.

SetLocal
IF ["%KAFKA_HEAP_OPTS%"] EQU [""] (
        set KAFKA_HEAP_OPTS=-Xmx512M
)

"%~dp0kafka-run-class.bat" kafka.tools.StreamsResetter %*
EndLocal

KAFKA-8513: Add kafka-streams-application-reset.bat for Windows platform (#6909)

Reviewers: Boyang Chen <26f4d92dc70ec0a9c6d2d5cf6c4b6e9149b478c7@confluent.io>, Matthias J. Sax <matthias@confluent.io>, Bill Bejeck <bill@confluent.io>


@ECHO OFF

setLocal EnableDelayedExpansion
set mainClasspath=
for %%i in (binaries\*.jar) do (set mainClasspath=!mainClasspath!;%%i)
set mainClass=org.drools.examples.DroolsJbpmIntegrationExamplesApp

echo "Usage: runExamples.bat"
echo "For example: runExamples.bat"
echo "Some notes:"
echo "- Working dir should be the directory of this script."
echo "- Java is recommended to be JDK and java 6 for optimal performance"
echo "- The environment variable JAVA_HOME should be set to the JDK installation directory"
echo "  For example: set JAVA_HOME="C:\Program Files\Java\jdk1.6.0"
echo
echo "Starting examples app..."

rem You can use -Xmx128m or less too, but it might be slower
if exist %JAVA_HOME%\bin\java.exe (
    %JAVA_HOME%\bin\java -Xms256m -Xmx512m -server -cp %mainClasspath% %mainClass%
) else (
    java -Xms256m -Xmx512m -cp %mainClasspath% %mainClass%
)

@ECHO OFF
setLocal enableExtensions enableDelayedExpansion

rem You can use -Xmx128m or less too for most examples, but it might be slower
set "jvmOptions=-Xms256m -Xmx1024m"
set "mainClass=org.drools.examples.DroolsJbpmIntegrationExamplesApp"
set "mainClasspath="
for %%i in (binaries\*.jar) do (set "mainClasspath=!mainClasspath!;%%i")
for %%i in (..\binaries\*.jar) do (set "mainClasspath=!mainClasspath!;%%i")

echo Usage: runExamples.bat
echo Notes:
echo - Java must be installed. Get the JRE ^(http://www.java.com^) or the JDK.
echo - For optimal performance, Java is recommended to be OpenJDK 7 or higher.
echo - For JDK, the environment variable JAVA_HOME should be set to the JDK installation directory
echo   For example: set "JAVA_HOME=C:\Program Files\Java\jdk1.6.0"
echo - The working dir should be the directory of this script.
echo.

if exist "%JAVA_HOME%\bin\java.exe" (
    echo Starting examples app with JDK from environment variable JAVA_HOME ^(%JAVA_HOME%^)...
    rem JDK supports -server mode
    "%JAVA_HOME%\bin\java" !jvmOptions! -server -cp !mainClasspath! !mainClass!
    goto endProcess
) else (
    rem Find JRE home in Windows Registry
    set "jreRegKey=HKLM\SOFTWARE\JavaSoft\Java Runtime Environment"
    set "jreVersion="
    for /f "tokens=3" %%v in ('reg query "!jreRegKey!" /v "CurrentVersion" 2^>nul') do set "jreVersion=%%v"
    if not defined jreVersion (
        set "jreRegKey=HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment"
        for /f "tokens=3" %%v in ('reg query "!jreRegKey!" /v "CurrentVersion" 2^>nul') do set "jreVersion=%%v"
        if not defined jreVersion (
            echo ERROR: The JRE is not installed on this system.
            goto failure
        )
    )
    set "jreHome="
    for /f "tokens=2,*" %%d in ('reg query "!jreRegKey!\!jreVersion!" /v "JavaHome" 2^>nul') do set "jreHome=%%e"
    if not defined jreHome (
        echo ERROR: The JRE is not properly installed on this system, although jreVersion ^(!jreVersion!^) exists.
        goto failure
    )

    if not exist "!jreHome!\bin\java.exe" (
        echo ERROR: The JRE home ^(!jreHome!^) does not contain java ^(bin\java.exe^).
        goto failure
    )
    echo Starting examples app with JRE from JRE home ^(!jreHome!^)...
    "!jreHome!\bin\java" !jvmOptions! -cp !mainClasspath! !mainClass!
    goto endProcess
)

:failure
    echo.
    echo Please install Java from http://www.java.com first.
    rem Prevent the terminal window to disappear before the user has seen the error message
    echo Press any key to close this window.
    pause
    goto endProcess

:endProcess
    endLocal

make runExamples.bat work OOTB

[DROOLS-539] make runExamples.bat work OOTB

 * the "java" command is not on PATH when users
   have only JRE installed. The script now looks
   in other places as well before failing

 * thanks @geoffrey for the solution


set conda_env="fc_env"
set copy_dir="FreeCAD_Conda_Build"

mkdir %copy_dir%

conda create ^
 -p %conda_env% ^
 freecad libredwg calculix gitpython gmsh netgen=6.2.1808 ^
 numpy matplotlib-base scipy=1.4.1 sympy pandas pythonocc-core six ^
 pyyaml opencamlib ifcopenshell openglider ^
 freecad.asm3 libredwg pycollada ^
 lxml xlutils olefile requests ^
 blinker opencv qt.py nine docutils ^
 --copy ^
 -c freecad/label/dev ^
 -c conda-forge ^
 -y

if errorlevel 1 exit 1

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy gmsh and calculix
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\mingw-w64\bin * %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Apply Patches
rename %copy_dir%\bin\Lib\ssl.py ssl-orig.py
copy ssl-patch.py %copy_dir%\bin\Lib\ssl.py
rename %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py ctx_mp_python-orig.py
copy C:\Users\travis\build\FreeCAD\FreeCAD-AppImage\conda\modifications\ctx_mp_python.py %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py

%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2]))" > tempver.txt
set /p fcver=<tempver.txt
echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64
echo %cd%
dir

REM if errorlevel1 exit 1

"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64\ -bb
certutil -hashfile "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt
echo  %date%-%time% >>"FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

set conda_env="fc_env"
set copy_dir="FreeCAD_Conda_Build"

mkdir %copy_dir%

conda create ^
 -p %conda_env% ^
 freecad libredwg calculix gitpython gmsh netgen=6.2.1808 ^
 numpy matplotlib-base scipy=1.4.1 sympy pandas pythonocc-core six ^
 pyyaml opencamlib ifcopenshell openglider ^
 freecad.asm3 libredwg pycollada ^
 lxml xlutils olefile requests ^
 blinker opencv qt.py nine docutils ^
 --copy ^
 -c freecad/label/dev ^
 -c conda-forge ^
 -y

if errorlevel 1 exit 1

REM Copy Conda's Python and (U)CRT to FreeCAD/bin
robocopy %conda_env%\DLLs %copy_dir%\bin\DLLs /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Lib %copy_dir%\bin\Lib /XD __pycache__ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Scripts %copy_dir%\bin\Scripts /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ python*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ msvc*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\ ucrt*.* %copy_dir%\bin\ /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy gmsh and calculix
robocopy %conda_env%\Library\bin %copy_dir%\bin\ ccx.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin %copy_dir%\bin\ gmsh.exe /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\mingw-w64\bin * %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy Conda's QT5/plugins to FreeCAD/bin
robocopy %conda_env%\Library\plugins %copy_dir%\bin\ /S /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\bin\ QtWebEngineProces* %copy_dir%\bin\ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\resources %copy_dir%\resources /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\translations %copy_dir%\translations /MT:%NUMBER_OF_PROCESSORS% > nul
echo [Paths] > %copy_dir%\bin\qt.conf
echo Prefix =.. >> "%copy_dir%\bin\qt.conf"
REM get all the dependency .dlls
robocopy %conda_env%\Library\bin *.dll %copy_dir%\bin /XF *.pdb /XF api*.* /MT:%NUMBER_OF_PROCESSORS% > nul
REM Copy FreeCAD build
robocopy %conda_env%\Library\bin FreeCAD* %copy_dir%\bin /XF *.pdb /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\data %copy_dir%\data /XF *.txt /S /MT:%NUMBER_OF_PROCESSORS% > nul
REM robocopy %conda_env%\Library\doc\ *.html %copy_dir%\doc MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Ext %copy_dir%\Ext /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\lib %copy_dir%\lib /XF *.lib /XF *.prl /XF *.sh /MT:%NUMBER_OF_PROCESSORS% > nul
robocopy %conda_env%\Library\Mod %copy_dir%\Mod /S /XD __pycache__ /MT:%NUMBER_OF_PROCESSORS% > nul
REM Apply Patches
rename %copy_dir%\bin\Lib\ssl.py ssl-orig.py
copy ssl-patch.py %copy_dir%\bin\Lib\ssl.py
rename %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py ctx_mp_python-orig.py
copy C:\Users\travis\build\FreeCAD\FreeCAD-AppImage\conda\modifications\ctx_mp_python.py %copy_dir%\bin\Lib\site-packages\mpmath\ctx_mp_python.py

%copy_dir%\bin\python.exe -c "import FreeCAD;print((FreeCAD.Version()[0]) +'.' + (FreeCAD.Version()[1]) +'.' + (FreeCAD.Version()[2]))" > tempver.txt
set /p fcver=<tempver.txt
echo %fcver%
cd %copy_dir%\..
ren %copy_dir% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64
dir

REM if errorlevel1 exit 1

"%ProgramFiles%\7-Zip\7z.exe" a -t7z -mmt=%NUMBER_OF_PROCESSORS% FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64\ -bb
certutil -hashfile "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z" SHA256 > "FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt
echo  %date%-%time% >>"FreeCAD_%fcver:~0,10%-Win-Conda_vc14.x-x86_64.7z"-SHA256.txt

reduce logging onwin

reduce logging onwin


@echo off
call "..\VsDevCmd.cmd"

set platform="%1"
if "%1" == "AnyCPU" (
  set platform="x86"
)

for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do (
  if "%%~nxa"=="Magick.NET.Tests.dll" (
    echo "Running tests from: %%~dpnxa"
    vstest.console /inIsolation /platform:%platform% /logger:AppVeyor %%~dpnxa
    if %errorlevel% neq 0 exit /b %errorlevel%
  )
)

@echo off
call "..\VsDevCmd.cmd"

set platform="%1"
if "%1" == "AnyCPU" (
  set platform="x86"
)

set vstest="%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"

for /r ..\..\Tests\Magick.NET.Tests\bin %%a in (*.dll) do (
  if "%%~nxa"=="Magick.NET.Tests.dll" (
    echo "Running tests from: %%~dpnxa"
    %vstest% %%~dpnxa /inIsolation /platform:%platform% /TestAdapterPath:%%~dpa /logger:AppVeyor
    if %errorlevel% neq 0 exit /b %errorlevel%
  )
)

Use a different version of vstest.console to make sure the exit code is correct.


::Run.bat
::Automates installation for apk files
ADB\adb kill-server
apk_mass_install -m backup -d backup

::Run.bat
::Automates installation for apk files

apk_mass_install -b

Update backup_win.bat

Update backup_win.bat


cls
Packages\NuGet.CommandLine.2.8.6\tools\NuGet.exe install "FAKE" -OutputDirectory "Packages" -ExcludeVersion
@pause

Add batch file to update FAKE

Add batch file to update FAKE


@echo off
setlocal

pushd %~dp0\..

set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2%
set VSCODECRASHDIR=%~dp0\..\.build\crashes

:: Figure out which Electron to use for running tests
if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
	:: Run out of sources: no need to compile as code.bat takes care of it
	chcp 65001
	set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
	set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1

	echo Storing crash reports into '%VSCODECRASHDIR%'.
	echo Running integration tests out of sources.
) else (
	:: Run from a built: need to compile all test extensions
	:: because we run extension tests from their source folders
	:: and the build bundles extensions into .build webpacked
	call yarn gulp 	compile-extension:vscode-api-tests^
					compile-extension:vscode-colorize-tests^
					compile-extension:markdown-language-features^
					compile-extension:typescript-language-features^
					compile-extension:vscode-custom-editor-tests^
					compile-extension:vscode-notebook-tests^
					compile-extension:emmet^
					compile-extension:css-language-features-server^
					compile-extension:html-language-features-server^
					compile-extension:json-language-features-server^
					compile-extension:git

	:: Configuration for more verbose output
	set VSCODE_CLI=1
	set ELECTRON_ENABLE_LOGGING=1

	echo Storing crash reports into '%VSCODECRASHDIR%'.
	echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build.
)

:: Integration & performance tests in AMD
@REM ::call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
@REM ::if %errorlevel% neq 0 exit /b %errorlevel%

:: Tests in the extension host

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testworkspace.code-workspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\workspace-tests --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

REM call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\typescript-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\typescript-language-features --extensionTestsPath=%~dp0\..\extensions\typescript-language-features\out\test --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
REM if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\markdown-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\markdown-language-features --extensionTestsPath=%~dp0\..\extensions\markdown-language-features\out\test --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" $%~dp0\..\extensions\emmet\out\test\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% .
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-notebook-tests\test --enable-proposed-api=vscode.vscode-notebook-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-notebook-tests --extensionTestsPath=%~dp0\..\extensions\vscode-notebook-tests\out --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

for /f "delims=" %%i in ('node -p "require('fs').realpathSync.native(require('os').tmpdir())"') do set TEMPDIR=%%i
set GITWORKSPACE=%TEMPDIR%\git-%RANDOM%
mkdir %GITWORKSPACE%
call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --enable-proposed-api=vscode.git --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

:: Tests in commonJS (CSS, HTML)
REM call %~dp0\node-electron.bat %~dp0\..\extensions\css-language-features/server/test/index.js
REM if %errorlevel% neq 0 exit /b %errorlevel%

call %~dp0\node-electron.bat %~dp0\..\extensions\html-language-features/server/test/index.js
if %errorlevel% neq 0 exit /b %errorlevel%

rmdir /s /q %VSCODEUSERDATADIR%

popd

endlocal

@echo off
setlocal

pushd %~dp0\..

set VSCODEUSERDATADIR=%TEMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,2%
set VSCODECRASHDIR=%~dp0\..\.build\crashes

:: Figure out which Electron to use for running tests
if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
	:: Run out of sources: no need to compile as code.bat takes care of it
	chcp 65001
	set INTEGRATION_TEST_ELECTRON_PATH=.\scripts\code.bat
	set VSCODE_BUILD_BUILTIN_EXTENSIONS_SILENCE_PLEASE=1

	echo Storing crash reports into '%VSCODECRASHDIR%'.
	echo Running integration tests out of sources.
) else (
	:: Run from a built: need to compile all test extensions
	:: because we run extension tests from their source folders
	:: and the build bundles extensions into .build webpacked
	call yarn gulp 	compile-extension:vscode-api-tests^
					compile-extension:vscode-colorize-tests^
					compile-extension:markdown-language-features^
					compile-extension:typescript-language-features^
					compile-extension:vscode-custom-editor-tests^
					compile-extension:vscode-notebook-tests^
					compile-extension:emmet^
					compile-extension:css-language-features-server^
					compile-extension:html-language-features-server^
					compile-extension:json-language-features-server^
					compile-extension:git

	:: Configuration for more verbose output
	set VSCODE_CLI=1
	set ELECTRON_ENABLE_LOGGING=1

	echo Storing crash reports into '%VSCODECRASHDIR%'.
	echo Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build.
)

:: Integration & performance tests in AMD
@REM ::call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
@REM ::if %errorlevel% neq 0 exit /b %errorlevel%

:: Tests in the extension host

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testWorkspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\singlefolder-tests --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-api-tests\testworkspace.code-workspace --enable-proposed-api=vscode.vscode-api-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-api-tests --extensionTestsPath=%~dp0\..\extensions\vscode-api-tests\out\workspace-tests --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-colorize-tests\test --extensionDevelopmentPath=%~dp0\..\extensions\vscode-colorize-tests --extensionTestsPath=%~dp0\..\extensions\vscode-colorize-tests\out --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

REM call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\typescript-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\typescript-language-features --extensionTestsPath=%~dp0\..\extensions\typescript-language-features\out\test --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
REM if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\markdown-language-features\test-workspace --extensionDevelopmentPath=%~dp0\..\extensions\markdown-language-features --extensionTestsPath=%~dp0\..\extensions\markdown-language-features\out\test --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" $%~dp0\..\extensions\emmet\out\test\test-fixtures --extensionDevelopmentPath=%~dp0\..\extensions\emmet --extensionTestsPath=%~dp0\..\extensions\emmet\out\test --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% .
if %errorlevel% neq 0 exit /b %errorlevel%

call "%INTEGRATION_TEST_ELECTRON_PATH%" %~dp0\..\extensions\vscode-notebook-tests\test --enable-proposed-api=vscode.vscode-notebook-tests --extensionDevelopmentPath=%~dp0\..\extensions\vscode-notebook-tests --extensionTestsPath=%~dp0\..\extensions\vscode-notebook-tests\out --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

for /f "delims=" %%i in ('node -p "require('fs').realpathSync.native(require('os').tmpdir())"') do set TEMPDIR=%%i
set GITWORKSPACE=%TEMPDIR%\git-%RANDOM%
mkdir %GITWORKSPACE%
call "%INTEGRATION_TEST_ELECTRON_PATH%" %GITWORKSPACE% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --enable-proposed-api=vscode.git --disable-telemetry --crash-reporter-directory=%VSCODECRASHDIR% --no-cached-data --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

:: Tests in commonJS (CSS, HTML)
call %~dp0\node-electron.bat %~dp0\..\extensions\css-language-features/server/test/index.js
if %errorlevel% neq 0 exit /b %errorlevel%

call %~dp0\node-electron.bat %~dp0\..\extensions\html-language-features/server/test/index.js
if %errorlevel% neq 0 exit /b %errorlevel%

rmdir /s /q %VSCODEUSERDATADIR%

popd

endlocal

bring back css integration tests

bring back css integration tests


@echo off

if not exist .\source cd ..\
if not exist .\source (
	echo [ERROR] Run this script from prof root or a forder one level deep!
	exit /b 1
)

if not "%MSVC_CONFIGURED%" == "TRUE" (
    call .\source\build_scripts\configure_msvc.bat
)

set CommonLinkOptions=/incremental:no .\build\SDL2.lib
set CommonClOptions=/nologo /W4 /wd4204 /wd4100 /wd4152 /wd4201 ^
    /Od /Oi /Zi /MTd /Fe.\build\ /Fd.\build\ /Fo.\build\ /DPT_DEV_BUILD /DGL_RIGOROUS_CHECKS ^
    /I %CD%\source /I %CD%\source\3rdparty /I %CD%\source\3rdparty\SDL2\include
REM /I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"

if not exist .\build\SDL2.dll (
    echo [INFO] Building SDL2...
    xcopy .\source\3rdparty\SDL2 .\build\SDL2 /h /y /s /i /q

    set SDL_MsbuildParams=/nologo /verbosity:quiet ^
        /p:PlatformToolset=%PlatformToolset%;Configuration=Debug;Platform=x64;useenv=true;OutDir=%cd%\build\ ^
		"/p:AdditionalIncludePaths=$(UniversalCRT_IncludePath)"

    msbuild .\build\SDL2\VisualC\SDL\SDL.vcxproj %SDL_MsbuildParams%
    if ERRORLEVEL 1 (
        echo [ERROR] SDL build failed!
        exit /b 1
    )
    msbuild .\build\SDL2\VisualC\SDLmain\SDLmain.vcxproj %SDL_MsbuildParams%
    if ERRORLEVEL 1 (
        echo [ERROR] SDL Main build failed!
        exit /b 1
    )
)

echo [INFO] Building platform layer...
cl %CommonClOptions% ^
  .\source\platform.c ^
  /link %CommonLinkOptions% /subsystem:windows .\build\SDL2main.lib

if ERRORLEVEL 1 (
    echo [WARNING] Platform layer build failed [ignore if hot-reloading]
)

echo [INFO] Building game...
echo wait a minute, you bastard! > .\build\game.lock
cl %CommonClOptions% ^
  .\source\game.c /LDd ^
  /link %CommonLinkOptions% /DLL /export:game_update /pdb:.\build\game_%random%.pdb OpenGL32.lib
del .\build\game.lock

if ERRORLEVEL 1 (
    echo [ERROR] Game build failed!
    exit /b 1
)

REM create symlink of assets folder
if not exist .\build\assets (
    mklink /D .\build\assets ..\assets
    if ERRORLEVEL 1 (
        echo [WARNING] Assets folder symlink creation failed, probably not running this as admin...
    )
)

@echo off

if not exist .\source cd ..\
if not exist .\source (
	echo [ERROR] Run this script from prof root or a forder one level deep!
	exit /b 1
)

if not "%MSVC_CONFIGURED%" == "TRUE" (
    call .\source\build_scripts\configure_msvc.bat
)

set CommonLinkOptions=/incremental:no .\build\SDL2.lib
set CommonClOptions=/nologo /W4 /wd4204 /wd4100 /wd4152 /wd4201 ^
    /Od /Oi /Zi /MTd /Fe.\build\ /Fd.\build\ /Fo.\build\ /DPT_DEV_BUILD /DGL_RIGOROUS_CHECKS ^
    /I %CD%\source /I %CD%\source\3rdparty /I %CD%\source\3rdparty\SDL2\include
REM /I "C:\Program Files (x86)\Windows Kits\10\Include\10.0.10240.0\ucrt"

set SDL_MsbuildParams=/nologo /verbosity:quiet ^
	/p:PlatformToolset=%PlatformToolset%;Configuration=Debug;Platform=x64;useenv=true;OutDir=%cd%\build\ ^
	/p:AdditionalIncludePaths=$(UniversalCRT_IncludePath)

if not exist .\build\SDL2.dll (
    echo [INFO] Building SDL2...
    xcopy .\source\3rdparty\SDL2 .\build\SDL2 /h /y /s /i /q

    msbuild .\build\SDL2\VisualC\SDL\SDL.vcxproj %SDL_MsbuildParams%
    if ERRORLEVEL 1 (
        echo [ERROR] SDL build failed!
        exit /b 1
    )
    msbuild .\build\SDL2\VisualC\SDLmain\SDLmain.vcxproj %SDL_MsbuildParams%
    if ERRORLEVEL 1 (
        echo [ERROR] SDL Main build failed!
        exit /b 1
    )
)

echo [INFO] Building platform layer...
cl %CommonClOptions% ^
  .\source\platform.c ^
  /link %CommonLinkOptions% /subsystem:windows .\build\SDL2main.lib

if ERRORLEVEL 1 (
    echo [WARNING] Platform layer build failed [ignore if hot-reloading]
)

echo [INFO] Building game...
echo wait a minute, you bastard! > .\build\game.lock
cl %CommonClOptions% ^
  .\source\game.c /LDd ^
  /link %CommonLinkOptions% /DLL /export:game_update /pdb:.\build\game_%random%.pdb OpenGL32.lib
del .\build\game.lock

if ERRORLEVEL 1 (
    echo [ERROR] Game build failed!
    exit /b 1
)

REM create symlink of assets folder
if not exist .\build\assets (
    mklink /D .\build\assets ..\assets
    if ERRORLEVEL 1 (
        echo [WARNING] Assets folder symlink creation failed, probably not running this as admin...
    )
)

fix fucking bat file

fix fucking bat file


@echo off

set GIT_VERSION=Git-1.8.5.2-preview20131230

echo ---------------------------------------------------------------------
echo Disable unnecessary services
echo,
echo http://www.blackviper.com/windows-services/
echo,
echo ALG: We're not worrying about using Internet Connection Sharing.
echo,
echo AudioSrv: We don't need audio alerts or audio at all.
echo,
echo ERSvc: We don't need to send error reports to Microsoft.
echo,
echo helpsvc: A waste of resources even on a normal desktop.
echo,
echo JavaQuickStarterService: Uses RAM to preload Java base classes.
echo,
echo LanmanServer: Get rid of the Server service.
echo,
echo LmHosts: NetBIOS Helper
echo,
echo Nla: Network Location Awareness (NLA): Never was clear what this does.
echo,
echo ShellHWDetection: Probably not plugging a lot of devices into a VM.
echo,
echo srservice: System Restore Service isn't necessary when Windows is
echo            in a VM. Snapshot the VM from the outside.
echo,
echo TrkWks: Distributed Link Tracking Client was never clear what benefit
echo         this /ever/ provided besides wasting RAM on millions of computers.
echo,
echo W32Time / Windows Time service is disabled as time is synchronized to
echo virtual machine host's clock
echo,
echo wscsvc: Windows Security Center - I think I've got a handle on it.
echo ---------------------------------------------------------------------
echo,

for %%S in (ALG, AudioSrv, ERSvc, helpsvc, JavaQuickStarterService, LanmanServer, LmHosts, Nla, PolicyAgent, ProtectedStorage, RemoteRegistry, Schedule, ShellHWDetection, Spooler, srservice, SSDPSRV, Themes, TrkWks, W32Time, wscsvc) do (
  echo sc config %%S start= disabled
  sc config %%S start= disabled

  echo sc stop %%S
  sc stop %%S
)

echo ---------------------------------------------------------------------
echo Enable essential services
echo,
echo BITS is required for Windows Update to work
echo (though as of April 2014, that's not going to matter anymore)
echo,
echo EventSystem: required for SENS
echo,
echo Dnscache
echo,
echo SENS: System Event Notification Service (poweroffs, etc.)
echo,
echo wuauserv: Windows Update service
echo ---------------------------------------------------------------------
echo,

for %%S in (EventSystem, Dnscache, SENS) do (
  echo sc config %%S start= demand
  sc config %%S start= demand

  echo sc start %%S
  sc start %%S
)

echo ---------------------------------------------------------------------
echo Disable Windows Update
echo,
echo It chews up huge amounts of CPU on my test system, so if you really
echo /are/ running Windows in a production environment, reenable it.
echo ---------------------------------------------------------------------
echo,

for %%S in (BITS, wuauserv) do (
  echo sc config %%S start= disabled
  sc config %%S start= disabled

  echo sc stop %%S
  sc stop %%S
)

echo ---------------------------------------------------------------------
echo Terminate Java Update Scheduler (Good grief, Oracle!)
echo ---------------------------------------------------------------------
echo,

taskkill /f /im jusched.exe

echo ---------------------------------------------------------------------
echo Remove Java Update Scheduler run at startup from Registry
echo ---------------------------------------------------------------------
echo,

regedit /s provision.reg

echo ---------------------------------------------------------------------
echo Set Time Zone
echo,
echo https://stackoverflow.com/questions/14943431/set-time-zone-on-windows-xp
echo http://www.pcreview.co.uk/forums/select-time-zone-timedate-cpl-batch-command-t3943860.html
echo,
echo On XP, you can provide one of the strings in Date and Time Properties / Time Zone tab
echo to the /Z parameter.
echo,
echo Or look in the registry for usable Time Zone Names:
echo HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
echo,
echo NOTE: Do NOT type quotes around the Time Zone Name.
echo ---------------------------------------------------------------------
echo,

runDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z W. Europe Standard Time

echo ---------------------------------------------------------------------
echo Windows Time Service settings are disabled, since this is provisioning
echo a virtual machine that is synced regularly to the host's clock.
echo ---------------------------------------------------------------------
echo,
echo ---------------------------------------------------------------------
echo Update Windows Time service settings
echo,
echo "Windows Time Service Tools and Settings"
echo http://technet.microsoft.com/en-us/library/cc773263(v=ws.10).aspx
echo ---------------------------------------------------------------------
echo,

rem w32tm /config /manualpeerlist:"0.de.pool.ntp.org time.windows.com time.nist.gov" /update

echo ---------------------------------------------------------------------
echo Install git
echo,
echo Save the file to the same folder as the provision.bat file:
echo %CD%
echo,
echo Then run the Git installer, and make sure to select
echo "Run Git and included Unix tools from the Windows Command Prompt"
echo ---------------------------------------------------------------------
echo,

if not exist %GIT_VERSION%.exe (explorer https://msysgit.googlecode.com/files/%GIT_VERSION%.exe)

:downloadInProgress

if not exist %GIT_VERSION%.exe (
  echo Still downloading.
  ping -n 1 127.0.0.1 > NUL
  goto :downloadInProgress)

:downloadDone

start %GIT_VERSION%.exe

echo ---------------------------------------------------------------------
echo Pause batch file until Git is installed.
echo ---------------------------------------------------------------------
echo,

:gitNotInstalled
SET /P ANSWER=Have you installed the Git package (y/n/q)?

if /i {%ANSWER%}=={y}   (goto :yes)
if /i {%ANSWER%}=={Y}   (goto :yes)
if /i {%ANSWER%}=={yes} (goto :yes)
if /i {%ANSWER%}=={q}   (goto :end)

goto :gitNotInstalled

:yes

echo,
echo ---------------------------------------------------------------------
echo Now pull and deploy other items using Git's curl and tar commands.
echo ---------------------------------------------------------------------
echo,

:end

@echo off

set GIT_VERSION=Git-1.8.5.2-preview20131230

echo ---------------------------------------------------------------------
echo Disable unnecessary services
echo,
echo http://www.blackviper.com/windows-services/
echo,
echo ALG: We're not worrying about using Internet Connection Sharing.
echo,
echo AudioSrv: We don't need audio alerts or audio at all.
echo,
echo ERSvc: We don't need to send error reports to Microsoft.
echo,
echo helpsvc: A waste of resources even on a normal desktop.
echo,
echo JavaQuickStarterService: Uses RAM to preload Java base classes.
echo,
echo LanmanServer: Get rid of the Server service.
echo,
echo LmHosts: NetBIOS Helper
echo,
echo Nla: Network Location Awareness (NLA): Never was clear what this does.
echo,
echo ShellHWDetection: Probably not plugging a lot of devices into a VM.
echo,
echo srservice: System Restore Service isn't necessary when Windows is
echo            in a VM. Snapshot the VM from the outside.
echo,
echo TrkWks: Distributed Link Tracking Client was never clear what benefit
echo         this /ever/ provided besides wasting RAM on millions of computers.
echo,
echo W32Time / Windows Time service is disabled as time is synchronized to
echo virtual machine host's clock
echo,
echo wscsvc: Windows Security Center - I think I've got a handle on it.
echo ---------------------------------------------------------------------
echo,

for %%S in (ALG, AudioSrv, ERSvc, helpsvc, JavaQuickStarterService, LanmanServer, LmHosts, Nla, PolicyAgent, ProtectedStorage, RemoteRegistry, Schedule, ShellHWDetection, Spooler, srservice, SSDPSRV, Themes, TrkWks, W32Time, wscsvc) do (
  echo sc config %%S start= disabled
  sc config %%S start= disabled

  echo sc stop %%S
  sc stop %%S
)

echo ---------------------------------------------------------------------
echo Enable essential services
echo,
echo BITS is required for Windows Update to work
echo (though as of April 2014, that's not going to matter anymore)
echo,
echo EventSystem: required for SENS
echo,
echo Dnscache
echo,
echo SENS: System Event Notification Service (poweroffs, etc.)
echo,
echo wuauserv: Windows Update service
echo ---------------------------------------------------------------------
echo,

for %%S in (EventSystem, Dnscache, SENS) do (
  echo sc config %%S start= demand
  sc config %%S start= demand

  echo sc start %%S
  sc start %%S
)

echo ---------------------------------------------------------------------
echo Disable Windows Update
echo,
echo It chews up huge amounts of CPU on my test system, so if you really
echo /are/ running Windows in a production environment, reenable it.
echo ---------------------------------------------------------------------
echo,

for %%S in (BITS, wuauserv) do (
  echo sc config %%S start= disabled
  sc config %%S start= disabled

  echo sc stop %%S
  sc stop %%S
)

echo ---------------------------------------------------------------------
echo Terminate Java Update Scheduler (Good grief, Oracle!)
echo ---------------------------------------------------------------------
echo,

taskkill /f /im jusched.exe

echo ---------------------------------------------------------------------
echo Remove Java Update Scheduler run at startup from Registry
echo ---------------------------------------------------------------------
echo,

regedit /s provision.reg

echo ---------------------------------------------------------------------
echo Set Time Zone
echo,
echo https://stackoverflow.com/questions/14943431/set-time-zone-on-windows-xp
echo http://www.pcreview.co.uk/forums/select-time-zone-timedate-cpl-batch-command-t3943860.html
echo,
echo On XP, you can provide one of the strings in Date and Time Properties / Time Zone tab
echo to the /Z parameter.
echo,
echo Or look in the registry for usable Time Zone Names:
echo HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
echo,
echo NOTE: Do NOT type quotes around the Time Zone Name.
echo ---------------------------------------------------------------------
echo,

runDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z W. Europe Standard Time

echo ---------------------------------------------------------------------
echo Windows Time Service settings are disabled, since this is provisioning
echo a virtual machine that is synced regularly to the host's clock.
echo ---------------------------------------------------------------------
echo,
echo ---------------------------------------------------------------------
echo Update Windows Time service settings
echo,
echo "Windows Time Service Tools and Settings"
echo http://technet.microsoft.com/en-us/library/cc773263(v=ws.10).aspx
echo ---------------------------------------------------------------------
echo,

rem w32tm /config /manualpeerlist:"0.de.pool.ntp.org time.windows.com time.nist.gov" /update

echo ---------------------------------------------------------------------
echo Install git
echo,
echo Save the file to the same folder as the provision.bat file:
echo %CD%
echo,
echo Then run the Git installer, and make sure to select
echo "Run Git and included Unix tools from the Windows Command Prompt"
echo ---------------------------------------------------------------------
echo,

if not exist %GIT_VERSION%.exe (explorer https://msysgit.googlecode.com/files/%GIT_VERSION%.exe)

:downloadInProgress

if not exist %GIT_VERSION%.exe (
  echo Still downloading.
  ping -n 3 127.0.0.1 > NUL
  goto :downloadInProgress)

:downloadDone

start %GIT_VERSION%.exe

echo ---------------------------------------------------------------------
echo Pause batch file until Git is installed.
echo ---------------------------------------------------------------------
echo,

:gitNotInstalled
SET /P ANSWER=Have you installed the Git package (y/n/q)?

if /i {%ANSWER%}=={y}   (goto :yes)
if /i {%ANSWER%}=={Y}   (goto :yes)
if /i {%ANSWER%}=={yes} (goto :yes)
if /i {%ANSWER%}=={q}   (goto :end)

goto :gitNotInstalled

:yes

echo,
echo ---------------------------------------------------------------------
echo Now pull and deploy other items using Git's curl and tar commands.
echo ---------------------------------------------------------------------
echo,

:end

Set ping sleeper timeout to 3 seconds between executions.


@rem ***************************************************************************
@rem (C) Copyright 2016 Jerome Comte and Dorian Cransac
@rem
@rem This file is part of STEP
@rem
@rem STEP is free software: you can redistribute it and/or modify
@rem it under the terms of the GNU Affero General Public License as published by
@rem the Free Software Foundation, either version 3 of the License, or
@rem (at your option) any later version.
@rem
@rem STEP is distributed in the hope that it will be useful,
@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@rem GNU Affero General Public License for more details.
@rem
@rem You should have received a copy of the GNU Affero General Public License
@rem along with STEP.  If not, see <http://www.gnu.org/licenses/>.
@rem ***************************************************************************
rem @echo off

TITLE STEP MongoDB

SET MONGO_PATH=
rem if mongod.exe isn't on your path, then set your own as follows (watch for the backslash and double quote at the end):
rem SET MONGO_PATH="D:\Program Files\MongoDB\Server\3.0\bin"\

for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined mydate set mydate=%%x

%MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > mongod_%mydate%.log 2>&1

@rem ***************************************************************************
@rem (C) Copyright 2016 Jerome Comte and Dorian Cransac
@rem
@rem This file is part of STEP
@rem
@rem STEP is free software: you can redistribute it and/or modify
@rem it under the terms of the GNU Affero General Public License as published by
@rem the Free Software Foundation, either version 3 of the License, or
@rem (at your option) any later version.
@rem
@rem STEP is distributed in the hope that it will be useful,
@rem but WITHOUT ANY WARRANTY; without even the implied warranty of
@rem MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@rem GNU Affero General Public License for more details.
@rem
@rem You should have received a copy of the GNU Affero General Public License
@rem along with STEP.  If not, see <http://www.gnu.org/licenses/>.
@rem ***************************************************************************
rem @echo off

TITLE STEP MongoDB

SET MONGO_PATH=
rem if mongod.exe isn't on your path, then set your own as follows (watch for the backslash and double quote at the end):
rem SET MONGO_PATH="D:\Program Files\MongoDB\Server\3.0\bin"\

for /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined mydate set mydate=%%x

%MONGO_PATH%mongod.exe -dbpath ..\data\mongodb > ..\log\mongod_%mydate%.log 2>&1

Put MongoDB log files in the log folder

Put MongoDB log files in the log folder