@ECHO OFF

REM Command file for Sphinx documentation

if "%SPHINXAPIDOC%" == "" (
	set SPHINXAPIDOC=sphinx-apidoc
)
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.  clean      to delete the build directory and all RST files except index.rst
	echo.  rst        to build the RST files from the source directory
	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" (
	move index.rst index.rst.saved
	del /q /s *.rst
        move index.rst.saved index.rst
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
	del /q /s %BUILDDIR%
	goto end
)

%SPHINXAPIDOC% 2> nul
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-apidoc' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXAPIDOC environment variable to point
	echo.to the full path of the 'sphinx-apidoc' 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
)

%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" == "rst" (
        %SPHINXAPIDOC% -f -T -o . .. ../tests
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The RST pages are in in the current directory.
	goto end
)

if "%1" == "html" (
	%SPHINXBUILD% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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\sphinx.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sphinx.ghc
	goto end
)

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

if "%1" == "epub" (
	%SPHINXBUILD% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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 "%SPHINXAPIDOC%" == "" (
	set SPHINXAPIDOC=sphinx-apidoc
)
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.  clean      to delete the build directory and all RST files except index.rst
	echo.  rst        to build the RST files from the source directory
	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" (
	move index.rst index.rst.saved
	del /q /s *.rst
        move index.rst.saved index.rst
	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
	del /q /s %BUILDDIR%
	goto end
)

%SPHINXAPIDOC% 2> nul
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-apidoc' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXAPIDOC environment variable to point
	echo.to the full path of the 'sphinx-apidoc' 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
)

%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" == "rst" (
        %SPHINXAPIDOC% -f -T -M -o . .. ../tests
	if errorlevel 1 exit /b 1
	echo.
	echo.Build finished. The RST pages are in in the current directory.
	goto end
)

if "%1" == "html" (
	%SPHINXBUILD% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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\sphinx.qhcp
	echo.To view the help file:
	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\sphinx.ghc
	goto end
)

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

if "%1" == "epub" (
	%SPHINXBUILD% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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% -f -T -o . .. ../tests
	%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

docs/make.bat: Make sure the module summary (i.e. module docstring) is put before the API documentation.


@echo off
title Python Data Transfer
echo Creating anaconda environment...
call \Users\Jocelyn\Anaconda3\Scripts\activate.bat
echo Environment creation sucessful.
echo Starting python script runner.py...
python \ucsd_ch\chamber\runner.py "\Users\Jocelyn\Desktop\Data Logger - Networked\Data" %*
pause

Revert "Deletes data_transfer_script.bat"

This reverts commit 85e5e6a91b027f0124d4c2575a53a6f8a5582a09.


@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.

set CLASS=org.apache.hive.service.server.HiveServer2
pushd %HIVE_LIB%
for /f %%a IN ('dir /b hive-service-*.jar') do (
  set JAR=%HIVE_LIB%\%%a
)
popd

if defined HBASE_HOME (
	dir %HBASE_HOME%\lib > nul
	if %errorlevel%==0 (
		pushd %HBASE_HOME%\lib
		set HIVE_HBASE_PATH=
		for /f %%a IN ('dir /b hbase-server-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-client-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-protocol-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b htrace-core-**.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-common-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-hadoop-compat-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
    )
    popd
	if defined HBASE_CONF_DIR (
		dir %HBASE_CONF_DIR% > nul
		if %errorlevel%==0 (
			call :AddToHiveHbasePath  %HBASE_CONF_DIR%
		)
	)
  )
)

if [%1]==[hiveserver2_help] goto :hiveserver2_help

if [%1]==[hiveserver2_catservice] goto :hiveserver2_catservice

if [%1]==[hiveserver2_catcmd] goto :hiveserver2_catcmd

:hiveserver2
  echo "Starting Hive Thrift Server"

  @rem hadoop 20 or newer - skip the aux_jars option and hiveconf
  call %HIVE_BIN_PATH%\ext\util\execHiveCmd.cmd %CLASS%
goto :EOF

:hiveserver2_help
  set HIVEARGS=-h
  goto :hiveserver2
goto :EOF

:hiveserver2_catservice
@echo ^<service^>
@echo   ^<id^>HiveServer2^</id^>
@echo   ^<name^>HiveServer2^</name^>
@echo   ^<description^>Hadoop HiveServer2 Service^</description^>
@echo   ^<executable^>%SystemRoot%\system32\cmd.exe^</executable^>
@echo   ^<arguments^>/c %HIVE_BIN_PATH%\ext\hs2service.cmd ^</arguments^>
@echo ^</service^>
goto :EOF

:hiveserver2_catcmd
if not defined HADOOP_CLASSPATH (
  @echo set HADOOP_CLASSPATH=%HIVE_LIB%\*
  ) else (
  @echo set HADOOP_CLASSPATH=%HADOOP_CLASSPATH%;%HIVE_LIB%\*
  )
@echo %JAVA_HOME%\bin\java %JAVA_HEAP_MAX% %HADOOP_OPTS% -classpath %CLASSPATH%;%HIVE_HBASE_PATH% %CLASS% -hiveconf hive.hadoop.classpath=%HIVE_LIB%\* -hiveconf hive.metastore.uris=" " -hiveconf hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator  %HIVE_OPTS%
goto :EOF

:AddToHiveHbasePath
if not defined HIVE_HBASE_PATH (
   set HIVE_HBASE_PATH=%1
   ) else (
   set HIVE_HBASE_PATH=%HIVE_HBASE_PATH%;%1
   )
)
goto :EOF

@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.

set CLASS=org.apache.hive.service.server.HiveServer2
pushd %HIVE_LIB%
for /f %%a IN ('dir /b hive-service-*.jar') do (
  set JAR=%HIVE_LIB%\%%a
)
popd

if defined HBASE_HOME (
	dir %HBASE_HOME%\lib > nul
	if %errorlevel%==0 (
		pushd %HBASE_HOME%\lib
		set HIVE_HBASE_PATH=
		for /f %%a IN ('dir /b hbase-server-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-client-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-protocol-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b htrace-core-**.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-common-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
		for /f %%a IN ('dir /b hbase-hadoop-compat-**-hadoop2.jar') do (
		  call :AddToHiveHbasePath  %HBASE_HOME%\lib\%%a
		)
    )
    popd
	if defined HBASE_CONF_DIR (
		dir %HBASE_CONF_DIR% > nul
		if %errorlevel%==0 (
			call :AddToHiveHbasePath  %HBASE_CONF_DIR%
		)
	)
  )
)

if [%1]==[hiveserver2_help] goto :hiveserver2_help

if [%1]==[hiveserver2_catservice] goto :hiveserver2_catservice

if [%1]==[hiveserver2_catcmd] goto :hiveserver2_catcmd

:hiveserver2
  echo "Starting Hive Thrift Server"

  @rem hadoop 20 or newer - skip the aux_jars option and hiveconf
  call %HIVE_BIN_PATH%\ext\util\execHiveCmd.cmd %CLASS%
goto :EOF

:hiveserver2_help
  set HIVEARGS=-h
  goto :hiveserver2
goto :EOF

:hiveserver2_catservice
@echo ^<service^>
@echo   ^<id^>HiveServer2^</id^>
@echo   ^<name^>HiveServer2^</name^>
@echo   ^<description^>Hadoop HiveServer2 Service^</description^>
@echo   ^<executable^>%SystemRoot%\system32\cmd.exe^</executable^>
@echo   ^<arguments^>/c %HIVE_BIN_PATH%\ext\hs2service.cmd ^</arguments^>
@echo ^</service^>
goto :EOF

:hiveserver2_catcmd
if not defined HADOOP_CLASSPATH (
  @echo set HADOOP_CLASSPATH=%HIVE_LIB%\*
  ) else (
  @echo set HADOOP_CLASSPATH=%HADOOP_CLASSPATH%;%HIVE_LIB%\*
  )
@echo %JAVA_HOME%\bin\java %JAVA_HEAP_MAX% %HADOOP_OPTS% -classpath %CLASSPATH%;%HIVE_HBASE_PATH% %CLASS% -hiveconf hive.metastore.uris=" " -hiveconf hive.security.authorization.manager=org.apache.hadoop.hive.ql.security.authorization.plugin.sqlstd.SQLStdHiveAuthorizerFactory -hiveconf hive.security.authenticator.manager=org.apache.hadoop.hive.ql.security.SessionStateUserAuthenticator  %HIVE_OPTS%
goto :EOF

:AddToHiveHbasePath
if not defined HIVE_HBASE_PATH (
   set HIVE_HBASE_PATH=%1
   ) else (
   set HIVE_HBASE_PATH=%HIVE_HBASE_PATH%;%1
   )
)
goto :EOF

HIVE-7030: Remove hive.hadoop.classpath from hiveserver2.cmd (Hari Sankar Sivarama Subramaniyan via Vaibhav Gumashta)

git-svn-id: c2303eb81cb646bce052f55f7f0d14f181a5956c@1593594 13f79535-47bb-0310-9956-ffa450edef68


@echo off
cd C:\projects\spectre\src\Spectre.Angular2Client
IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\karma-tests.xml" (
    powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.Angular2Client\karma-tests.xml
)
IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\protractor-tests.xml" (
    powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.Angular2Client\protractor-tests.xml
)

@echo off
cd C:\projects\spectre\src\Spectre.Angular2Client
IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\karma-tests.xml" (
    powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.AngularClient\karma-tests.xml
)
IF EXIST "C:\projects\spectre\src\Spectre.AngularClient\protractor-tests.xml" (
    powershell C:\projects\spectre\scripts\Upload-TestResult.ps1 -fileName C:\projects\spectre\src\Spectre.AngularClient\protractor-tests.xml
)

Fix frontend test results uploader

Fix frontend test results uploader

Had old path.


@echo off

echo.
echo == Create Translations files
echo.

set TARGET_DIR="..\extracted"

echo.
echo Unknwon-Horizons
cd "%TARGET_DIR%\extracted\unknown-horizons\unknown-horizons-master\development\"
python compile_translation_win.py

dir "%TARGET_DIR%"

@echo off

echo.
echo == Create Translations files
echo.

set TARGET_DIR="..\extracted"
set msgfmt "..\build-tools\gettext\bin\msgfmt.exe"

echo.
echo Unknwon-Horizons
cd "%TARGET_DIR%\extracted\unknown-horizons\unknown-horizons-master\development"
compile_translation_win.py

dir "%TARGET_DIR%"

Update create-translation script to use gettext


@echo off
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v BSDCONV_PATH /t REG_SZ /d "%CD%" /f

@echo off
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v BSDCONV_PATH /t REG_SZ /d %~dp0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /d %PATH%;%~dp0 /f
pause

improve tools/setEnvVar.bat

improve tools/setEnvVar.bat


verinc src/WinUI/WinUI.rc
msbuild /m /p:configuration=release /t:rebuild

添加release.bat

添加release.bat


@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/b170d42bfb70234d79fd3f831a4f8e53384b4f75
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/c16ac95171ab89e1a23d45b330e7e646fa56b782
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

Update to new kuduscript version. Fixes #1192


@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/30eb44889eedb6a317501efcaa781801a5adc5b3
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

@echo off
setlocal enabledelayedexpansion

pushd %1

set attempts=5
set counter=0

:retry
set /a counter+=1
echo Attempt %counter% out of %attempts%

cmd /c npm install https://github.com/projectkudu/KuduScript/tarball/a68ce56fa9640f4c81d62889ed7e806730daf712
IF %ERRORLEVEL% NEQ 0 goto error

goto end

:error
if %counter% GEQ %attempts% goto :lastError
goto retry

:lastError
popd
echo An error has occured during npm install.
exit /b 1

:end
popd
echo Finished successfully.
exit /b 0

update kuduscript

update kuduscript


CD /D %~dp0
call npm install -g grunt-cli
call npm install

call grunt --level=WHITESPACE_ONLY
call grunt develop

pause

[build] Add script for switching branches without server restart


@echo on
setlocal enableextensions enabledelayedexpansion

REM note this script only works if it is in the parent directory
REM of the wix xml files.
REM

if "~%1"=="~" goto useage
if "~%2"=="~" goto useage
set RUNEVAL=-sval
if "%USERNAME%" == "" goto noruneval
if not "%_CONDOR_SLOT%" == "" goto noruneval
set RUNEVAL=
:noruneval

set _condor_path=%~sdf1
pushd %~sdp0

set _WXS_FILES=
for %%I in (xml\*.wxs) do set _WXS_FILES=!_WXS_FILES! %%I
rem echo %_WXS_FILES%
rem echo %_WXS_FILES:.wxs=.wixobj%
set _WIXOBJ_FILES=%_WXS_FILES:xml\=%

heat dir %_condor_path% -ke -g1 -srd -gg -var var.Source -t:xml\win.xsl -out "%~n2.wxs"

candle -ext WixFirewallExtension -dSource=%_condor_path% "%~n2.wxs" %_WXS_FILES%

light %RUNEVAL% -ext WixUIExtension -ext WixFirewallExtension -dWixUILicenseRtf=.\license.rtf -out "%2" "%~n2.wixobj" %_WIXOBJ_FILES:.wxs=.wixobj%
popd
goto finis

:useage
@echo USEAGE: %O {condor_path} {msi_fullpath}
@echo  {condor_path} is the location of a properly laid out condor installation.
@echo  This can created by unzipping Condor-X.Y.Z.zip to {condor_path}.
@echo  .
@echo  {msi_fullpath} is the full_path of the output package file
@echo  for example {msi_fullpath} might be c:\scratch\temp\condor-7.5.5.msi
:finis

@echo on
setlocal enableextensions enabledelayedexpansion

REM note this script only works if it is in the parent directory
REM of the wix xml files.
REM

if "~%1"=="~" goto useage
if "~%2"=="~" goto useage
set RUNEVAL=-sval
if "%USERNAME%" == "" goto noruneval
if not "%_CONDOR_SLOT%" == "" goto noruneval
set RUNEVAL=
:noruneval

set _condor_path=%~sdf1
pushd %~sdp0

set _WXS_FILES=
for %%I in (xml\*.wxs) do set _WXS_FILES=!_WXS_FILES! %%I
rem echo %_WXS_FILES%
rem echo %_WXS_FILES:.wxs=.wixobj%
set _WIXOBJ_FILES=%_WXS_FILES:xml\=%

heat dir %_condor_path% -ke -g1 -srd -gg -var var.Source -t:xml\condor.xsl -out "%~n2.wxs"

candle -ext WixFirewallExtension -dSource=%_condor_path% "%~n2.wxs" %_WXS_FILES%

light %RUNEVAL% -ext WixUIExtension -ext WixFirewallExtension -dWixUILicenseRtf=.\license.rtf -out "%2" "%~n2.wixobj" %_WIXOBJ_FILES:.wxs=.wixobj%
popd
goto finis

:useage
@echo USEAGE: %O {condor_path} {msi_fullpath}
@echo  {condor_path} is the location of a properly laid out condor installation.
@echo  This can created by unzipping Condor-X.Y.Z.zip to {condor_path}.
@echo  .
@echo  {msi_fullpath} is the full_path of the output package file
@echo  for example {msi_fullpath} might be c:\scratch\temp\condor-7.5.5.msi
:finis

Modify do_wix.bat to use the new xsl file. Ticket #1657.


rem cygwin_setup.bat configuration.
set _PACKAGES=cron,diffutils,inetutils,ncurses,netcat,openssh,p7zip,procps,python,rsync,screen,unzip,vim,zip,w3m
set _ROOTDIR=C:\cygwin
set _SITE=http://mirrors.xmission.com/cygwin

rem Enable logging of sshd and it's ilk to /var/log.
set _CONFIG_SYSLOGD=True

rem Enable OpenSSH server.
set _CONFIG_SSHD=True

rem Enable LSA authentication.
rem See http://cygwin.com/cygwin-ug-net/ntsec.html
set _CONFIG_LSA=True

rem cygwin_setup.bat configuration.
set _PACKAGES=cron,diffutils,inetutils,ncurses,netcat,openssh,p7zip,procps,python,rsync,screen,unzip,vim,zip,w3m
set _ROOTDIR=C:\cygwin
set _SITE=http://mirrors.kernel.org/sourceware/cygwin

rem Enable logging of sshd and it's ilk to /var/log.
set _CONFIG_SYSLOGD=True

rem Enable OpenSSH server.
set _CONFIG_SSHD=True

rem Enable LSA authentication.
rem See http://cygwin.com/cygwin-ug-net/ntsec.html
set _CONFIG_LSA=True

cygwin_setup_config.bat: change _SITE from xmission.com to kernel.org


@echo off
SETLOCAL EnableDelayedExpansion
if "%~1" == "" goto show_instructions
SET WIPERDOG_HOME=%~1
echo Param %WIPERDOG_HOME% "%~1"

REM Check OS 64 bit or 32 bit
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto WIN_64bit
SET JAVASERVICE_STUB=%WIPERDOG_HOME%\bin\wiperdog_service_32bit.exe
GOTO SET_OTHER_PARAM

:WIN_64bit
SET JAVASERVICE_STUB=%WIPERDOG_HOME%\bin\wiperdog_service_64bit.exe

:SET_OTHER_PARAM
SET SERVICE_NAME=Wiperdog
SET GROOVY_SCRIPT=%WIPERDOG_HOME%\bin\service.groovy
SET LOGS_FOLDER=%WIPERDOG_HOME%\log

echo.
echo.
echo INSTALLING %SERVICE_NAME%
echo.
echo JavaService executable is %JAVASERVICE_STUB%
echo Service name is %SERVICE_NAME%
echo GROOVY target is %GROOVY_SCRIPT%
echo LOGS folder is %LOGS_FOLDER%
echo.
echo JAVA_HOME is %JAVA_HOME%
echo.
echo.
if not exist "%WIPERDOG_HOME%"\log md "%WIPERDOG_HOME%"\log
REM stoping service
net stop "%SERVICE_NAME%"
"%JAVASERVICE_STUB%" -uninstall "%SERVICE_NAME%"

REM check JDK/JRE
if exist "%JAVA_HOME%"\bin\client GOTO SET_JRE_CLIENT_DLL
if exist "%JAVA_HOME%"\bin\server GOTO SET_JRE_SERVER_DLL

REM set JDK client jvm.dll path
if not exist "%JAVA_HOME%"\jre\bin\client GOTO SET_JDK_SERVER_DLL
SET JVM_DLL=%JAVA_HOME%\jre\bin\client\jvm.dll
GOTO START_MAIN_APP

REM set JDK server jvm.dll path
:SET_JDK_SERVER_DLL
if not exist "%JAVA_HOME%"\jre\bin\server GOTO NOTFOUND_JVM
SET JVM_DLL=%JAVA_HOME%\jre\bin\server\jvm.dll
GOTO START_MAIN_APP

:NOTFOUND_JVM
echo.
echo.
echo Can not found JVM. Exit install service process.
echo.
echo.
goto end

:SET_JRE_CLIENT_DLL
REM set JRE jvm.dll path
SET JVM_DLL=%JAVA_HOME%\bin\client\jvm.dll
GOTO START_MAIN_APP

:SET_JRE_SERVER_DLL
REM set JRE jvm.dll path
SET JVM_DLL=%JAVA_HOME%\bin\server\jvm.dll
GOTO START_MAIN_APP

:START_MAIN_APP
echo.
REM for JDK only "%JAVASERVICE_STUB%" -install "%SERVICE_NAME%" "%JAVA_HOME%"\jre\bin\server\jvm.dll ^
REM below for using JRE
"%JAVASERVICE_STUB%" -install "%SERVICE_NAME%" "%JVM_DLL%" ^
-Djava.class.path="%WIPERDOG_HOME%\service\dasboot.jar" ^
-Dcom.lilypepper.groovy.localfolder="%WIPERDOG_HOME%\service" ^
-Dcom.lilypepper.groovy.runner="com.lilypepper.groovy.ServiceRunner" ^
-Djava.system.class.loader="com.lilypepper.groovy.boot.GoshClassLoader" ^
-Dfelix.home="%WIPERDOG_HOME%" ^
-Dfelix.system.properties="file:%WIPERDOG_HOME%\etc\system.properties" ^
-Djava.util.logging.config.file="%WIPERDOG_HOME%\etc\java.util.logging.properties"    ^
-Dlog4j.ignoreTCL=true ^
-Djava.ext.dirs="%WIPERDOG_HOME%"\lib\java\ext    ^
-Dbin_home="%WIPERDOG_HOME%"\bin\ ^
-Dprogram.name="" ^
-Dgroovy.home="%WIPERDOG_HOME%" ^
-Dgroovy.starter.conf="%WIPERDOG_HOME%\etc\groovy-starter.conf" ^
-Dscript.name="%WIPERDOG_HOME%\bin\startWiperdog.groovy"  ^
-classpath "%WIPERDOG_HOME%"\bin\..\lib\java\bundle\*;"%WIPERDOG_HOME%"\bin\..\lib\java\bundle.a\*;"%WIPERDOG_HOME%"\bin\..\lib\java\bundle.d\*;"%WIPERDOG_HOME%"\bin\..\lib\java\ext\* org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf "%WIPERDOG_HOME%"\bin\..\etc\groovy-starter.conf ^
-verbose:gc ^
-Xmx1024M ^
-Xrs ^
-XX:CompileThreshold=100 ^
-XX:MaxPermSize=256m ^
-start com.lilypepper.groovy.boot.Bootstrap -method main -params "start" "%GROOVY_SCRIPT%" ^
-stop com.lilypepper.groovy.boot.Bootstrap -method main -params "stop" ^
-out "%LOGS_FOLDER%"\stdout.log ^
-err "%LOGS_FOLDER%"\stderr.log ^
-current "%LOGS_FOLDER%"

echo.
echo.

if "" == "" goto end

:show_instructions
echo Error: command must start with parameter WIPERDOG_HOME
echo E.g.: create_wiperdog_service.bat E:\wiperdog
echo NOTICE: you must use JRE instead of using JDK
:end
ENDLOCAL

@echo off
SETLOCAL EnableDelayedExpansion
if "%~1" == "" goto show_instructions
SET WIPERDOG_HOME=%~1
echo Param %WIPERDOG_HOME% "%~1"

REM Check OS 64 bit or 32 bit
if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto WIN_64bit
SET JAVASERVICE_STUB=%WIPERDOG_HOME%\bin\wiperdog_service_32bit.exe
GOTO SET_OTHER_PARAM

:WIN_64bit
SET JAVASERVICE_STUB=%WIPERDOG_HOME%\bin\wiperdog_service_64bit.exe

:SET_OTHER_PARAM
SET SERVICE_NAME=Wiperdog
SET GROOVY_SCRIPT=%WIPERDOG_HOME%\bin\service.groovy
SET LOGS_FOLDER=%WIPERDOG_HOME%\log

echo.
echo.
echo INSTALLING %SERVICE_NAME%
echo.
echo JavaService executable is %JAVASERVICE_STUB%
echo Service name is %SERVICE_NAME%
echo GROOVY target is %GROOVY_SCRIPT%
echo LOGS folder is %LOGS_FOLDER%
echo.
echo JAVA_HOME is %JAVA_HOME%
echo.
echo.
if not exist "%WIPERDOG_HOME%"\log md "%WIPERDOG_HOME%"\log
REM stoping service
net stop "%SERVICE_NAME%"
"%JAVASERVICE_STUB%" -uninstall "%SERVICE_NAME%"

REM check JDK/JRE
if exist "%JAVA_HOME%"\bin\client GOTO SET_JRE_CLIENT_DLL
if exist "%JAVA_HOME%"\bin\server GOTO SET_JRE_SERVER_DLL

REM set JDK client jvm.dll path
if not exist "%JAVA_HOME%"\jre\bin\client GOTO SET_JDK_SERVER_DLL
SET JVM_DLL=%JAVA_HOME%\jre\bin\client\jvm.dll
GOTO START_MAIN_APP

REM set JDK server jvm.dll path
:SET_JDK_SERVER_DLL
if not exist "%JAVA_HOME%"\jre\bin\server GOTO NOTFOUND_JVM
SET JVM_DLL=%JAVA_HOME%\jre\bin\server\jvm.dll
SET JVM_EXT_LIB=%JAVA_HOME%\jre\lib\ext
GOTO START_MAIN_APP

:NOTFOUND_JVM
echo.
echo.
echo Can not found JVM. Exit install service process.
echo.
echo.
goto end

:SET_JRE_CLIENT_DLL
REM set JRE jvm.dll path
SET JVM_DLL=%JAVA_HOME%\bin\client\jvm.dll
SET JVM_EXT_LIB=%JAVA_HOME%\lib\ext
GOTO START_MAIN_APP

:SET_JRE_SERVER_DLL
REM set JRE jvm.dll path
SET JVM_DLL=%JAVA_HOME%\bin\server\jvm.dll
SET JVM_EXT_LIB=%JAVA_HOME%\lib\ext
GOTO START_MAIN_APP

:START_MAIN_APP
echo.
REM for JDK only "%JAVASERVICE_STUB%" -install "%SERVICE_NAME%" "%JAVA_HOME%"\jre\bin\server\jvm.dll ^
REM below for using JRE
"%JAVASERVICE_STUB%" -install "%SERVICE_NAME%" "%JVM_DLL%" ^
-Djava.class.path="%WIPERDOG_HOME%\service\dasboot.jar" ^
-Dcom.lilypepper.groovy.localfolder="%WIPERDOG_HOME%\service" ^
-Dcom.lilypepper.groovy.runner="com.lilypepper.groovy.ServiceRunner" ^
-Djava.system.class.loader="com.lilypepper.groovy.boot.GoshClassLoader" ^
-Dfelix.home="%WIPERDOG_HOME%" ^
-Dfelix.system.properties="file:%WIPERDOG_HOME%\etc\system.properties" ^
-Djava.util.logging.config.file="%WIPERDOG_HOME%\etc\java.util.logging.properties"    ^
-Dlog4j.ignoreTCL=true ^
-Djava.ext.dirs="%WIPERDOG_HOME%\lib\java\ext;%JVM_EXT_LIB%" ^
-Dbin_home="%WIPERDOG_HOME%"\bin\ ^
-Dprogram.name="" ^
-Dgroovy.home="%WIPERDOG_HOME%" ^
-Dgroovy.starter.conf="%WIPERDOG_HOME%\etc\groovy-starter.conf" ^
-Dscript.name="%WIPERDOG_HOME%\bin\startWiperdog.groovy"  ^
-classpath "%WIPERDOG_HOME%"\bin\..\lib\java\bundle\*;"%WIPERDOG_HOME%"\bin\..\lib\java\bundle.a\*;"%WIPERDOG_HOME%"\bin\..\lib\java\bundle.d\*;"%WIPERDOG_HOME%"\bin\..\lib\java\ext\* org.codehaus.groovy.tools.GroovyStarter --main groovy.ui.GroovyMain --conf "%WIPERDOG_HOME%"\bin\..\etc\groovy-starter.conf ^
-verbose:gc ^
-Xmx1024M ^
-Xrs ^
-XX:CompileThreshold=100 ^
-XX:MaxPermSize=256m ^
-start com.lilypepper.groovy.boot.Bootstrap -method main -params "start" "%GROOVY_SCRIPT%" ^
-stop com.lilypepper.groovy.boot.Bootstrap -method main -params "stop" ^
-out "%LOGS_FOLDER%"\stdout.log ^
-err "%LOGS_FOLDER%"\stderr.log ^
-current "%LOGS_FOLDER%"

echo.
echo.

if "" == "" goto end

:show_instructions
echo Error: command must start with parameter WIPERDOG_HOME
echo E.g.: create_wiperdog_service.bat E:\wiperdog
echo NOTICE: you must use JRE instead of using JDK
:end
ENDLOCAL

fix bug to decrypt password (add java extention library)


REM    Copyright 2014 Steve Francia
REM
REM    Licensed under the Apache License, Version 2.0 (the "License");
REM    you may not use this file except in compliance with the License.
REM    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.

@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%

@set APP_DIR=%HOME%\.spf13-vim-3
IF NOT EXIST "%APP_DIR%" (
  call git clone --recursive -b 3.0 https://github.com/spf13/spf13-vim.git "%APP_DIR%"
) ELSE (
	@set ORIGINAL_DIR=%CD%
    echo updating spf13-vim
    chdir /d "%APP_DIR%"
	call git pull
    chdir /d "%ORIGINAL_DIR%"
	call cd "%APP_DIR%"
)

call mklink "%HOME%\.vimrc" "%APP_DIR%\.vimrc"
call mklink "%HOME%\_vimrc" "%APP_DIR%\.vimrc"
call mklink "%HOME%\.vimrc.fork" "%APP_DIR%\.vimrc.fork"
call mklink "%HOME%\.vimrc.bundles" "%APP_DIR%\.vimrc.bundles"
call mklink "%HOME%\.vimrc.bundles.fork" "%APP_DIR%\.vimrc.bundles.fork"
call mklink "%HOME%\.vimrc.before" "%APP_DIR%\.vimrc.before"
call mklink "%HOME%\.vimrc.before.fork" "%APP_DIR%\.vimrc.before.fork"
call mklink /J "%HOME%\.vim" "%APP_DIR%\.vim"

IF NOT EXIST "%APP_DIR%\.vim\bundle" (
	call mkdir "%APP_DIR%\.vim\bundle"
)

IF NOT EXIST "%HOME%/.vim/bundle/vundle" (
	call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle"
) ELSE (
  call cd "%HOME%/.vim/bundle/vundle"
  call git pull
  call cd %HOME%
)

call vim -u "%APP_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall

REM    Copyright 2014 Steve Francia
REM
REM    Licensed under the Apache License, Version 2.0 (the "License");
REM    you may not use this file except in compliance with the License.
REM    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.

@if not exist "%HOME%" @set HOME=%HOMEDRIVE%%HOMEPATH%
@if not exist "%HOME%" @set HOME=%USERPROFILE%

@set APP_DIR=%HOME%\.spf13-vim-3
IF NOT EXIST "%APP_DIR%" (
  call git clone --recursive -b 3.0 https://github.com/u9520107/spf13-vim.git "%APP_DIR%"
) ELSE (
	@set ORIGINAL_DIR=%CD%
    echo updating spf13-vim
    chdir /d "%APP_DIR%"
	call git pull
    chdir /d "%ORIGINAL_DIR%"
	call cd "%APP_DIR%"
)

call mklink "%HOME%\.vimrc" "%APP_DIR%\.vimrc"
call mklink "%HOME%\_vimrc" "%APP_DIR%\.vimrc"
call mklink "%HOME%\.vimrc.fork" "%APP_DIR%\.vimrc.fork"
call mklink "%HOME%\.vimrc.bundles" "%APP_DIR%\.vimrc.bundles"
call mklink "%HOME%\.vimrc.bundles.fork" "%APP_DIR%\.vimrc.bundles.fork"
call mklink "%HOME%\.vimrc.before" "%APP_DIR%\.vimrc.before"
call mklink "%HOME%\.vimrc.before.fork" "%APP_DIR%\.vimrc.before.fork"
call mklink /J "%HOME%\.vim" "%APP_DIR%\.vim"

IF NOT EXIST "%APP_DIR%\.vim\bundle" (
	call mkdir "%APP_DIR%\.vim\bundle"
)

IF NOT EXIST "%HOME%/.vim/bundle/vundle" (
	call git clone https://github.com/gmarik/vundle.git "%HOME%/.vim/bundle/vundle"
) ELSE (
  call cd "%HOME%/.vim/bundle/vundle"
  call git pull
  call cd %HOME%
)

call vim -u "%APP_DIR%/.vimrc.bundles" +BundleInstall! +BundleClean +qall

change script source

change script source


@REM ----------------------------------------------------------------------------
@REM Copyright 2012 Red Hat, Inc. and/or its affiliates.
@REM
@REM Licensed under the Eclipse Public License version 1.0, available at
@REM http://www.eclipse.org/legal/epl-v10.html
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Forge Startup script
@REM
@REM Required Environment vars:
@REM ------------------
@REM JAVA_HOME - location of a JRE home dir
@REM
@REM Optional Environment vars
@REM ------------------
@REM FORGE_HOME - location of Forge's installed home dir
@REM FORGE_OPTS - parameters passed to the Java VM when running Forge
@REM ----------------------------------------------------------------------------

@echo off

@REM set %USERHOME% to equivalent of $HOME
if not "%USERHOME%" == "" goto OkUserhome
set "USERHOME=%USERPROFILE%"

if not "%USERHOME%" == "" goto OkUserhome
set "USERHOME=%HOMEDRIVE%%HOMEPATH%"

:OkUserhome

@REM Execute a user defined script before this one
if exist "%USERHOME%\forgerc_pre.bat" call "%USERHOME%\forgerc_pre.bat"

set ERROR_CODE=0

@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo ERROR: JAVA_HOME not found in your environment.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto chkJVersion

echo.
echo ERROR: JAVA_HOME is set to an invalid directory.
echo JAVA_HOME = "%JAVA_HOME%"
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
echo.
goto error

:chkJVersion
set PATH="%JAVA_HOME%\bin";%PATH%

for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
   set JAVAVER=%%g
)
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
   set JAVAVER_MINOR=%%w
)

if %JAVAVER_MINOR% geq 7 goto chkFHome

echo.
echo A Java 1.7 or higher JRE is required to run Forge. "%JAVA_HOME%\bin\java.exe" is version %JAVAVER%
echo.
goto error

:chkFHome
if not "%FORGE_HOME%"=="" goto valFHome

if "%OS%"=="Windows_NT" SET "FORGE_HOME=%~dp0.."
if "%OS%"=="WINNT" SET "FORGE_HOME=%~dp0.."
if not "%FORGE_HOME%"=="" goto valFHome

echo.
echo ERROR: FORGE_HOME not found in your environment.
echo Please set the FORGE_HOME variable in your environment to match the
echo location of the Forge installation
echo.
goto error

:valFHome

:stripFHome
if not "_%FORGE_HOME:~-1%"=="_\" goto checkFBat
set "FORGE_HOME=%FORGE_HOME:~0,-1%"
goto stripFHome

:checkFBat
if exist "%FORGE_HOME%\bin\forge.bat" goto init

echo.
echo ERROR: FORGE_HOME is set to an invalid directory.
echo FORGE_HOME = "%FORGE_HOME%"
echo Please set the FORGE_HOME variable in your environment to match the
echo location of the Forge installation
echo.
goto error
@REM ==== END VALIDATION ====

@REM Initializing the argument line and the plugin directory if any
:init
set FORGE_CMD_LINE_ARGS=
set FORGE_PLUGIN_DIR=
set FORGE_DEBUG_ARGS=
:initArgs
if %1a==a goto endInit
set FORGE_CMD_LINE_ARGS=%FORGE_CMD_LINE_ARGS% %1
if "%FORGE_PLUGIN_DIR%"=="-pluginDir" set FORGE_PLUGIN_DIR=%1
if "%1"=="-pluginDir" set FORGE_PLUGIN_DIR=%1
if "%1"=="--debug" set FORGE_DEBUG_ARGS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
shift
goto initArgs
@REM Reaching here means variables are defined and arguments have been captured
:endInit

SET FORGE_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

@REM -- 4NT shell
if "%@eval[2+2]" == "4" goto 4NTCWJars

goto runForge

@REM Start Forge
:runForge
set FORGE_MAIN_CLASS=org.jboss.forge.bootstrap.Bootstrap
%FORGE_JAVA_EXE% %FORGE_DEBUG_ARGS% %FORGE_OPTS% "-Dforge.standalone=true" "-Dforge.home=%FORGE_HOME%" ^
   -cp ".;%FORGE_HOME%\lib\*" %FORGE_MAIN_CLASS% %FORGE_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end

:error
if "%OS%"=="Windows_NT" @endlocal
if "%OS%"=="WINNT" @endlocal
set ERROR_CODE=1

:end
@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" goto endNT
if "%OS%"=="WINNT" goto endNT

@REM For old DOS remove the set variables from ENV - we assume they were not set
@REM before we started - at least we don't leave any baggage around
set FORGE_JAVA_EXE=
set FORGE_CMD_LINE_ARGS=
goto postExec

:endNT
@endlocal & set ERROR_CODE=%ERROR_CODE%

:postExec
if exist "%USERHOME%\forgerc_post.bat" call "%USERHOME%\forgerc_post.bat"

if "%FORGE_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

cmd /C exit /B %ERROR_CODE%

@REM ----------------------------------------------------------------------------
@REM Copyright 2012 Red Hat, Inc. and/or its affiliates.
@REM
@REM Licensed under the Eclipse Public License version 1.0, available at
@REM http://www.eclipse.org/legal/epl-v10.html
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Forge Startup script
@REM
@REM Required Environment vars:
@REM ------------------
@REM JAVA_HOME - location of a JRE home dir
@REM
@REM Optional Environment vars
@REM ------------------
@REM FORGE_HOME - location of Forge's installed home dir
@REM FORGE_OPTS - parameters passed to the Java VM when running Forge
@REM ----------------------------------------------------------------------------

@echo off

@REM set %USERHOME% to equivalent of $HOME
if not "%USERHOME%" == "" goto OkUserhome
set "USERHOME=%USERPROFILE%"

if not "%USERHOME%" == "" goto OkUserhome
set "USERHOME=%HOMEDRIVE%%HOMEPATH%"

:OkUserhome

@REM Execute a user defined script before this one
if exist "%USERHOME%\forgerc_pre.bat" call "%USERHOME%\forgerc_pre.bat"

set ERROR_CODE=0

@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" @setlocal
if "%OS%"=="WINNT" @setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo ERROR: JAVA_HOME not found in your environment.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto chkJVersion

echo.
echo ERROR: JAVA_HOME is set to an invalid directory.
echo JAVA_HOME = "%JAVA_HOME%"
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation
echo.
goto error

:chkJVersion
set PATH="%JAVA_HOME%\bin";%PATH%

for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do (
   set JAVAVER=%%g
)
for /f "delims=. tokens=1-3" %%v in ("%JAVAVER%") do (
   set JAVAVER_MINOR=%%w
)

if %JAVAVER_MINOR% geq 7 goto chkFHome

echo.
echo A Java 1.7 or higher JRE is required to run Forge. "%JAVA_HOME%\bin\java.exe" is version %JAVAVER%
echo.
goto error

:chkFHome
if not "%FORGE_HOME%"=="" goto valFHome

if "%OS%"=="Windows_NT" SET "FORGE_HOME=%~dp0.."
if "%OS%"=="WINNT" SET "FORGE_HOME=%~dp0.."
if not "%FORGE_HOME%"=="" goto valFHome

echo.
echo ERROR: FORGE_HOME not found in your environment.
echo Please set the FORGE_HOME variable in your environment to match the
echo location of the Forge installation
echo.
goto error

:valFHome

:stripFHome
if not "_%FORGE_HOME:~-1%"=="_\" goto checkFBat
set "FORGE_HOME=%FORGE_HOME:~0,-1%"
goto stripFHome

:checkFBat
if exist "%FORGE_HOME%\bin\forge.bat" goto init

echo.
echo ERROR: FORGE_HOME is set to an invalid directory.
echo FORGE_HOME = "%FORGE_HOME%"
echo Please set the FORGE_HOME variable in your environment to match the
echo location of the Forge installation
echo.
goto error
@REM ==== END VALIDATION ====

@REM Initializing the argument line and the plugin directory if any
:init
set FORGE_CMD_LINE_ARGS=
set FORGE_PLUGIN_DIR=
set FORGE_DEBUG_ARGS=

set "args=%*"
set "args=%args:,=:comma:%"
set "args=%args:;=:semicolon:%"

for %%x in (%args%) do (
    set "arg=%%~x"
    set "arg=!arg::comma:=,!"
    set "arg=!arg::semicolon:=;!"
    if "!arg!"=="--debug" set FORGE_DEBUG_ARGS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
    set "FORGE_CMD_LINE_ARGS=!FORGE_CMD_LINE_ARGS! "!arg!""
)

:initArgs
setlocal enableextensions enabledelayedexpansion
if %1a==a goto endInit

shift
goto initArgs
@REM Reaching here means variables are defined and arguments have been captured
:endInit

SET FORGE_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

@REM -- 4NT shell
if "%@eval[2+2]" == "4" goto 4NTCWJars

goto runForge

@REM Start Forge
:runForge
set FORGE_MAIN_CLASS=org.jboss.forge.bootstrap.Bootstrap
%FORGE_JAVA_EXE% %FORGE_DEBUG_ARGS% %FORGE_OPTS% "-Dforge.standalone=true" "-Dforge.home=%FORGE_HOME%" ^
   -cp ".;%FORGE_HOME%\lib\*" %FORGE_MAIN_CLASS% %FORGE_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end

:error
if "%OS%"=="Windows_NT" @endlocal
if "%OS%"=="WINNT" @endlocal
set ERROR_CODE=1

:end
@REM set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" goto endNT
if "%OS%"=="WINNT" goto endNT

@REM For old DOS remove the set variables from ENV - we assume they were not set
@REM before we started - at least we don't leave any baggage around
set FORGE_JAVA_EXE=
set FORGE_CMD_LINE_ARGS=
goto postExec

:endNT
@endlocal & set ERROR_CODE=%ERROR_CODE%

:postExec
if exist "%USERHOME%\forgerc_post.bat" call "%USERHOME%\forgerc_post.bat"

if "%FORGE_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

cmd /C exit /B %ERROR_CODE%

Fix FORGE-1427 issue in forge.bad

Fix FORGE-1427 issue in forge.bad


@echo off
pushd .
svn co https://llvm.org/svn/llvm-project/llvm/branches/release_31/ llvm
cd llvm\tools
svn co https://llvm.org/svn/llvm-project/cfe/branches/release_31/ clang
popd

git clone --config core.autocrlf=false https://github.com/llvm/llvm-project.git llvm
git checkout release/11.x

Update get script to pull from github and checkout at the release needed


set DEPOT="%CD%"

IF NOT EXIST mobility.pro GOTO NOSOURCE
set CETESTCOMMAND=cetest -cache %QTDIR%\.qmake.cache -libpath \Windows

IF NOT EXIST %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\ GOTO SKIPDEPLOY
cd %DEPOT%\..\..\qa-dungeon\mainline\tests\wince\deploy\
call %CETESTCOMMAND%

:SKIPDEPLOY
cd %DEPOT%\tests\auto\qcontact
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactactions\unittest
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactasync\unittest
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetail
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetaildefinition
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactdetails
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactfilter
call %CETESTCOMMAND%
cd %DEPOT%\testsauto\qcontactgroup
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanager
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanagerfiltering
call %CETESTCOMMAND%
cd %DEPOT%\tests\auto\qcontactmanagerplugins\unittest
call %CETESTCOMMAND%
GOTO EOF

:NOSOURCE
echo "Unable to find mobility.pro check current directory is QtContacts source"
GOTO EOF

:EOF
cd %DEPOT%

Add a rununittests script for Windows CE

Test must be run in the source directory


@echo off
setlocal

:: set batch file directory as current
pushd "%~dp0"

set SHARPMAKE_EXECUTABLE=bin\debug\Sharpmake.Application.exe

if not defined VS140COMNTOOLS (
    echo ERROR: Cannot determine the location of the VS Common Tools folder.
    goto error
)

call "%VS140COMNTOOLS%VsMSBuildCmd.bat"

call :NugetRestore Sharpmake/Sharpmake.csproj
call :BuildCsproj Sharpmake.Application/Sharpmake.Application.csproj Debug AnyCPU

set SM_CMD=%SHARPMAKE_EXECUTABLE% /sources("Sharpmake.Main.sharpmake.cs") /verbose
echo %SM_CMD%
%SM_CMD%

echo Sharpmake solution generated.
goto end

@REM -----------------------------------------------------------------------
:NugetRestore
echo Restoring nuget packages for %~1
dotnet restore "%~1"
if errorlevel 1 (
    echo ERROR: Failed to restore nuget package for %~1
    goto error
)
exit /b 0

@REM -----------------------------------------------------------------------
:BuildCsproj
echo Compiling %~1 in "%~2|%~3"...

msbuild /nologo /verbosity:quiet /p:Configuration="%~2" /p:Platform="%~3" "%~1"
if errorlevel 1 (
    echo ERROR: Failed to compile %~1 in "%~2|%~3".
    goto error
)
exit /b 0

@REM -----------------------------------------------------------------------
:end
:: restore caller current directory
popd
COLOR
exit /b 0

@REM -----------------------------------------------------------------------
:error
:: restore caller current directory
popd
COLOR 4F
pause
exit /b 1

@echo off
setlocal

:: set batch file directory as current
pushd "%~dp0"

set SHARPMAKE_EXECUTABLE=bin\debug\Sharpmake.Application.exe

if not defined VS140COMNTOOLS (
    echo ERROR: Cannot determine the location of the VS Common Tools folder.
    goto error
)

call "%VS140COMNTOOLS%VsMSBuildCmd.bat"

call :NugetRestore Sharpmake/Sharpmake.csproj
call :BuildCsproj Sharpmake.Application/Sharpmake.Application.csproj Debug AnyCPU

set SM_CMD=%SHARPMAKE_EXECUTABLE% /sources("Sharpmake.Main.sharpmake.cs") /verbose

echo %SM_CMD%
%SM_CMD%

if %errorlevel% NEQ 0 (
    goto error
)

echo Sharpmake solution generated.
goto end

@REM -----------------------------------------------------------------------
:NugetRestore
echo Restoring nuget packages for %~1
dotnet restore "%~1"
if errorlevel 1 (
    echo ERROR: Failed to restore nuget package for %~1
    goto error
)
exit /b 0

@REM -----------------------------------------------------------------------
:BuildCsproj
echo Compiling %~1 in "%~2|%~3"...

msbuild /nologo /verbosity:quiet /p:Configuration="%~2" /p:Platform="%~3" "%~1"
if errorlevel 1 (
    echo ERROR: Failed to compile %~1 in "%~2|%~3".
    goto error
)
exit /b 0

@REM -----------------------------------------------------------------------
:end
:: restore caller current directory
popd
COLOR
exit /b 0

@REM -----------------------------------------------------------------------
:error
:: restore caller current directory
popd
COLOR 4F
pause
exit /b 1

[Bootstrap] Test return code of sharpmake to pause the batch when it fails


@ECHO OFF

SET ERRORLEVEL=0
SET VER=2.1.0.0

REM #SET MSB="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild"
SET MSB="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
SET MSB_ARG=/tv:14.0 /t:Build

SET ZIP="C:\Program Files\7-Zip\7z.exe"
SET ZIPEXL="-xr!.svn\* -xr!.vs\* -xr!bin -xr!obj -xr!*.user"

SET OUT_REPO=_Output

IF NOT EXIST %MSB% (
  ECHO Missing MSB
  GOTO :EOF
)

IF NOT EXIST %ZIP% (
  ECHO Missing ZIP
  GOTO :EOF
)

IF "%1"=="-x" GOTO archive

ECHO ---------------------- Minimum -------------------------
SET CFG=Minimum
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

SET CFG=WPFMinimum
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

IF NOT %ERRORLEVEL% LEQ 0 (
  PAUSE
  GOTO :EOF
)

ECHO ------------------ Standard Release ---------------------
SET CFG=Release
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /s /q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO --------------------- WPF ------------------------
SET CFG=WPFRelease
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO -------------------  Extension -----------------------

SET CFG=Extension
%MSB% ReoGrid.sln %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /s /q
MKDIR %OUT_DIR%

COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\FastColoredTextBox.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.EditorLib.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO ---------------- Demo EN ---------------------

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-Demo-Binary
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%

COPY Editor\Bin\Extension\unvell.ReoGridEditor.exe %OUT_DIR%\ /Y
COPY ReoGrid\Bin\Extension\unvell.ReoGrid.dll %OUT_DIR%\ /Y
COPY Demo\Bin\Release\ReoGridDemo.exe %OUT_DIR%\ /Y

MKDIR %OUT_DIR%\_Templates
XCOPY Demo\_Templates %OUT_DIR%\_Templates /e
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\FastColoredTextBox.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.EditorLib.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\
XCOPY Editor\Bin\Extension\ja-JP %OUT_DIR%\ja-JP\ /e
XCOPY Editor\Bin\Extension\ru-RU %OUT_DIR%\ru-RU\ /e
XCOPY Editor\Bin\Extension\zh-CN %OUT_DIR%\zh-CN\ /e

ECHO ---------------- Demo JP ---------------------

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-Demo_Ja-Binary
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%

COPY Editor\Bin\Extension\unvell.ReoGridEditor.exe DemoJP\Ref /Y
COPY ReoGrid\Bin\Extension\unvell.ReoGrid.dll DemoJP\Ref /Y

COPY Editor\Bin\Extension\unvell.ReoGridEditor.exe %OUT_DIR%\ /Y
COPY ReoGrid\Bin\Extension\unvell.ReoGrid.dll %OUT_DIR%\ /Y
COPY DemoJP\Bin\Release\ReoGridDemoJP.exe %OUT_DIR%\ /Y

MKDIR %OUT_DIR%\_Templates
XCOPY DemoJP\_Templates %OUT_DIR%\_Templates /e
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\FastColoredTextBox.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.EditorLib.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\
XCOPY Editor\Bin\Extension\ja-JP %OUT_DIR%\ja-JP\ /e
XCOPY Editor\Bin\Extension\ru-RU %OUT_DIR%\ru-RU\ /e
XCOPY Editor\Bin\Extension\zh-CN %OUT_DIR%\zh-CN\ /e

ECHO -------------------  WPFExtension -----------------------

SET CFG=Extension
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPF%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO -------------------  WPFRelease -----------------------

SET CFG=Release
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPF%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO -------------------  WPFMinimum -----------------------

SET CFG=Minimum
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPF%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO ----------------- Demo WPF ---------------------

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPFDemo-Binary
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%

COPY DemoWPF\bin\Release\WPFDemo.exe %OUT_DIR%\
COPY ReoGrid\Bin\WPFRelease\unvell.ReoGrid.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

IF NOT %ERRORLEVEL% LEQ 0 (
  PAUSE
  GOTO :EOF
)

IF EXIST Demo\bin rmdir /s/q Demo\bin
IF EXIST Demo\obj rmdir /s/q Demo\obj
IF EXIST DemoJP\bin rmdir /s/q DemoJP\bin
IF EXIST DemoJP\obj rmdir /s/q DemoJP\obj
IF EXIST DemoWPF\bin rmdir /s/q DemoWPF\bin
IF EXIST DemoWPF\obj rmdir /s/q DemoWPF\obj
IF EXIST TestCase\bin rmdir /s/q TestCase\bin
IF EXIST TestCase\obj rmdir /s/q TestCase\obj
IF EXIST Editor\bin rmdir /s/q Editor\bin
IF EXIST Editor\obj rmdir /s/q Editor\obj

cd %OUT_REPO%

ECHO ----------------- Demo Source En ---------------------
@SET OUT_FILE=ReoGrid-%VER%-Demo-Source.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ..\Demo ..\Readme.md ..\license* ..\Demo2008.sln -xr!?svn\* -xr!?.vs\* -xr!?*.user

ECHO ----------------- Demo Source Ja ---------------------
@SET OUT_FILE=ReoGrid-%VER%-Demo_Ja-Source.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ..\DemoJP ..\Readme.md ..\license* ..\DemoJP.sln -xr!?svn\* -xr!?.vs\* -xr!?*.user

@SET OUT_FILE=ReoGrid-%VER%-Demo-Binary.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ReoGrid-%VER%-Demo-Binary\

@SET OUT_FILE=ReoGrid-%VER%-DemoWPF-Binary.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ReoGrid-%VER%-WPFDemo-Binary\

ECHO ----------------- Demo WPF Source ---------------------
@SET OUT_FILE=ReoGrid-%VER%-WPFDemo-Source.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ..\DemoWPF ..\DemoWPF.sln ..\Readme.md ..\license* %ZIPEXL%

ECHO ----------------- All Packages EN ---------------------
SET OUT_PKG_NAME=ReoGrid-%VER%-All-Packages.zip
@IF EXIST %OUT_PKG_NAME% DEL %OUT_PKG_NAME%
%ZIP% a -tzip %OUT_PKG_NAME% ^
 ReoGrid-%VER%-Demo-Binary ^
 ReoGrid-%VER%-WPFDemo-Binary ^
 ReoGrid-%VER%-Minimum ^
 ReoGrid-%VER%-WPFMinimum ^
 ReoGrid-%VER%-Release ^
 ReoGrid-%VER%-WPFRelease ^
 ReoGrid-%VER%-Extension ^
 ReoGrid-%VER%-WPFExtension ^
 ReoGrid-%VER%-Demo-Source.zip ^
 ReoGrid-%VER%-WPFDemo-Source.zip

ECHO ----------------- All Packages Ja ---------------------
SET OUT_PKG_NAME=ReoGrid-%VER%-All-Packages-Ja.zip
@IF EXIST %OUT_PKG_NAME% DEL %OUT_PKG_NAME%
%ZIP% a -tzip %OUT_PKG_NAME% ^
 ReoGrid-%VER%-Demo_Ja-Binary ^
 ReoGrid-%VER%-WPFDemo-Binary ^
 ReoGrid-%VER%-Minimum ^
 ReoGrid-%VER%-WPFMinimum ^
 ReoGrid-%VER%-Release ^
 ReoGrid-%VER%-WPFRelease ^
 ReoGrid-%VER%-Extension ^
 ReoGrid-%VER%-WPFExtension ^
 ReoGrid-%VER%-Demo_Ja-Source.zip ^
 ReoGrid-%VER%-WPFDemo-Source.zip

cd..

ECHO --------------------- DONE --------------------------

@ECHO OFF

SET ERRORLEVEL=0
SET VER=2.1.0.0

REM ### set MSB to locate the msbuild.exe in your environment ###
SET MSB="%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"

REM ### Set /tv to fit build tool version of your environment ###
REM ### Visual Studio 2015: 14 ###
REM ### Visual Studio 2017: 15 ###
SET MSB_ARG=/tv:15.0 /t:Build

REM ### set ZIP to locate the 7z.exe in your environment ###
SET ZIP="%ProgramFiles%\7-Zip\7z.exe"
SET ZIPEXL="-xr!.svn\* -xr!.vs\* -xr!bin -xr!obj -xr!*.user"

IF NOT EXIST %MSB% (
  SET MSB="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe"
)

IF NOT EXIST %MSB% (
  ECHO Cannot found msbuild.exe, set MSB to locate the msbuild.exe in your environment
  GOTO :EOF
)

IF NOT EXIST %ZIP% (
  ECHO Missing ZIP
  GOTO :EOF
)

SET OUT_REPO=_Output

IF "%1"=="-x" GOTO archive

ECHO ---------------------- Minimum -------------------------
SET CFG=Minimum
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

SET CFG=WPFMinimum
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

IF NOT %ERRORLEVEL% LEQ 0 (
  PAUSE
  GOTO :EOF
)

ECHO ------------------ Standard Release ---------------------
SET CFG=Release
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /s /q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO --------------------- WPF ------------------------
SET CFG=WPFRelease
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "LICENSE" %OUT_DIR%\
COPY "License.bzip2.txt" %OUT_DIR%\
COPY "License.DotNetZipLib.txt" %OUT_DIR%\
COPY "License.zlib.txt" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO -------------------  Extension -----------------------

SET CFG=Extension
%MSB% ReoGrid.sln %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /s /q
MKDIR %OUT_DIR%

COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\FastColoredTextBox.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.EditorLib.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO ---------------- Demo EN ---------------------

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-Demo-Binary
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%

COPY Editor\Bin\Extension\unvell.ReoGridEditor.exe %OUT_DIR%\ /Y
COPY ReoGrid\Bin\Extension\unvell.ReoGrid.dll %OUT_DIR%\ /Y
COPY Demo\Bin\Release\ReoGridDemo.exe %OUT_DIR%\ /Y

MKDIR %OUT_DIR%\_Templates
XCOPY Demo\_Templates %OUT_DIR%\_Templates /e
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\FastColoredTextBox.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.EditorLib.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\
XCOPY Editor\Bin\Extension\ja-JP %OUT_DIR%\ja-JP\ /e
XCOPY Editor\Bin\Extension\ru-RU %OUT_DIR%\ru-RU\ /e
XCOPY Editor\Bin\Extension\zh-CN %OUT_DIR%\zh-CN\ /e

ECHO ---------------- Demo JP ---------------------

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-Demo_Ja-Binary
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%

COPY Editor\Bin\Extension\unvell.ReoGridEditor.exe DemoJP\Ref /Y
COPY ReoGrid\Bin\Extension\unvell.ReoGrid.dll DemoJP\Ref /Y

COPY Editor\Bin\Extension\unvell.ReoGridEditor.exe %OUT_DIR%\ /Y
COPY ReoGrid\Bin\Extension\unvell.ReoGrid.dll %OUT_DIR%\ /Y
COPY DemoJP\Bin\Release\ReoGridDemoJP.exe %OUT_DIR%\ /Y

MKDIR %OUT_DIR%\_Templates
XCOPY DemoJP\_Templates %OUT_DIR%\_Templates /e
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\FastColoredTextBox.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.EditorLib.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\
XCOPY Editor\Bin\Extension\ja-JP %OUT_DIR%\ja-JP\ /e
XCOPY Editor\Bin\Extension\ru-RU %OUT_DIR%\ru-RU\ /e
XCOPY Editor\Bin\Extension\zh-CN %OUT_DIR%\zh-CN\ /e

ECHO -------------------  WPFExtension -----------------------

SET CFG=Extension
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPF%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY Ref\Antlr3.Runtime.dll %OUT_DIR%\
COPY Ref\unvell.ReoScript.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO -------------------  WPFRelease -----------------------

SET CFG=Release
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPF%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO -------------------  WPFMinimum -----------------------

SET CFG=Minimum
%MSB% ReoGrid\ReoGrid.csproj %MSB_ARG% /p:Configuration=%CFG%;TargetFrameworkVersion=v3.5,Profile=Client

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPF%CFG%
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.dll %OUT_DIR%\
COPY ReoGrid\bin\%CFG%\unvell.ReoGrid.xml %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

ECHO ----------------- Demo WPF ---------------------

SET OUT_DIR=%OUT_REPO%\ReoGrid-%VER%-WPFDemo-Binary
IF EXIST %OUT_DIR% RMDIR %OUT_DIR% /S /Q
MKDIR %OUT_DIR%

COPY DemoWPF\bin\Release\WPFDemo.exe %OUT_DIR%\
COPY ReoGrid\Bin\WPFRelease\unvell.ReoGrid.dll %OUT_DIR%\
COPY "license*" %OUT_DIR%\
COPY "README.md" %OUT_DIR%\

IF NOT %ERRORLEVEL% LEQ 0 (
  PAUSE
  GOTO :EOF
)

IF EXIST Demo\bin rmdir /s/q Demo\bin
IF EXIST Demo\obj rmdir /s/q Demo\obj
IF EXIST DemoJP\bin rmdir /s/q DemoJP\bin
IF EXIST DemoJP\obj rmdir /s/q DemoJP\obj
IF EXIST DemoWPF\bin rmdir /s/q DemoWPF\bin
IF EXIST DemoWPF\obj rmdir /s/q DemoWPF\obj
IF EXIST TestCase\bin rmdir /s/q TestCase\bin
IF EXIST TestCase\obj rmdir /s/q TestCase\obj
IF EXIST Editor\bin rmdir /s/q Editor\bin
IF EXIST Editor\obj rmdir /s/q Editor\obj

cd %OUT_REPO%

ECHO ----------------- Demo Source En ---------------------
@SET OUT_FILE=ReoGrid-%VER%-Demo-Source.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ..\Demo ..\Readme.md ..\license* ..\Demo2008.sln -xr!?svn\* -xr!?.vs\* -xr!?*.user

ECHO ----------------- Demo Source Ja ---------------------
@SET OUT_FILE=ReoGrid-%VER%-Demo_Ja-Source.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ..\DemoJP ..\Readme.md ..\license* ..\DemoJP.sln -xr!?svn\* -xr!?.vs\* -xr!?*.user

@SET OUT_FILE=ReoGrid-%VER%-Demo-Binary.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ReoGrid-%VER%-Demo-Binary\

@SET OUT_FILE=ReoGrid-%VER%-DemoWPF-Binary.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ReoGrid-%VER%-WPFDemo-Binary\

ECHO ----------------- Demo WPF Source ---------------------
@SET OUT_FILE=ReoGrid-%VER%-WPFDemo-Source.zip
IF EXIST %OUT_FILE% del %OUT_FILE%
%ZIP% a -tzip %OUT_FILE% ..\DemoWPF ..\DemoWPF.sln ..\Readme.md ..\license* %ZIPEXL%

ECHO ----------------- All Packages EN ---------------------
SET OUT_PKG_NAME=ReoGrid-%VER%-All-Packages.zip
@IF EXIST %OUT_PKG_NAME% DEL %OUT_PKG_NAME%
%ZIP% a -tzip %OUT_PKG_NAME% ^
 ReoGrid-%VER%-Demo-Binary ^
 ReoGrid-%VER%-WPFDemo-Binary ^
 ReoGrid-%VER%-Minimum ^
 ReoGrid-%VER%-WPFMinimum ^
 ReoGrid-%VER%-Release ^
 ReoGrid-%VER%-WPFRelease ^
 ReoGrid-%VER%-Extension ^
 ReoGrid-%VER%-WPFExtension ^
 ReoGrid-%VER%-Demo-Source.zip ^
 ReoGrid-%VER%-WPFDemo-Source.zip

ECHO ----------------- All Packages Ja ---------------------
SET OUT_PKG_NAME=ReoGrid-%VER%-All-Packages-Ja.zip
@IF EXIST %OUT_PKG_NAME% DEL %OUT_PKG_NAME%
%ZIP% a -tzip %OUT_PKG_NAME% ^
 ReoGrid-%VER%-Demo_Ja-Binary ^
 ReoGrid-%VER%-WPFDemo-Binary ^
 ReoGrid-%VER%-Minimum ^
 ReoGrid-%VER%-WPFMinimum ^
 ReoGrid-%VER%-Release ^
 ReoGrid-%VER%-WPFRelease ^
 ReoGrid-%VER%-Extension ^
 ReoGrid-%VER%-WPFExtension ^
 ReoGrid-%VER%-Demo_Ja-Source.zip ^
 ReoGrid-%VER%-WPFDemo-Source.zip

cd..

ECHO --------------------- DONE --------------------------

fix build script

fix build script


cargo bundle-licenses --format yaml --output DENO_DOM_THIRDPARTY_LICENSES.yml
cargo build --release

IF %errorlevel% NEQ 0 exit 1

MKDIR %LIBRARY_PREFIX%\lib
dir target
DIR target\release
COPY target\release\libplugin.dll %LIBRARY_PREFIX%\lib\deno_dom.dll

MKDIR "%PREFIX%\etc\conda\activate.d"
MKDIR "%PREFIX%\etc\conda\deactivate.d"
echo set "DENO_DOM_PLUGIN=%LIBRARY_PREFIX:/=\%\lib\deno_dom.dll" > %PREFIX%\etc\conda\activate.d\deno_dom.bat
echo set DENO_DOM_PLUGIN= > %PREFIX%\etc\conda\deactivate.d\deno_dom.bat

cargo bundle-licenses --format yaml --output DENO_DOM_THIRDPARTY_LICENSES.yml
cargo build --release

IF %errorlevel% NEQ 0 exit 1

MKDIR %LIBRARY_PREFIX%\lib
dir target
DIR target\release
COPY target\release\plugin.dll %LIBRARY_PREFIX%\lib\deno_dom.dll

MKDIR "%PREFIX%\etc\conda\activate.d"
MKDIR "%PREFIX%\etc\conda\deactivate.d"
echo set "DENO_DOM_PLUGIN=%LIBRARY_PREFIX:/=\%\lib\deno_dom.dll" > %PREFIX%\etc\conda\activate.d\deno_dom.bat
echo set DENO_DOM_PLUGIN= > %PREFIX%\etc\conda\deactivate.d\deno_dom.bat

fix dll filename (no lib)

fix dll filename (no lib)


@echo off
"%SystemDrive%\Python35\python.exe" "%~dp0DecoraterBot.py" 2>resources\Logs\unhandled_tracebacks.txt
pause - stop

Create DecoraterBot-3.5.bat

Create DecoraterBot-3.5.bat


@echo on
@setlocal disabledelayedexpansion
set witharg=

for %%I in (%0) do if /%%~dpI/ == /%CD%\/ (
    echo don't run in win32 directory.
    exit /b 999
)

echo> ~tmp~.mak ####
echo>> ~tmp~.mak conf = %0
echo>> ~tmp~.mak $(conf): nul
echo>> ~tmp~.mak 	@del ~setup~.mak
echo>> ~tmp~.mak 	@$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
if exist pathlist.tmp del pathlist.tmp
echo>confargs.tmp #define CONFIGURE_ARGS \
:loop
set opt=%1
if "%1" == "" goto :end
if "%1" == "--prefix" goto :prefix
if "%1" == "--srcdir" goto :srcdir
if "%1" == "srcdir" goto :srcdir
if "%1" == "--target" goto :target
if "%1" == "target" goto :target
if "%1" == "--with-static-linked-ext" goto :extstatic
if "%1" == "--program-prefix" goto :pprefix
if "%1" == "--program-suffix" goto :suffix
if "%1" == "--program-name" goto :installname
if "%1" == "--install-name" goto :installname
if "%1" == "--so-name" goto :soname
if "%1" == "--enable-install-doc" goto :enable-rdoc
if "%1" == "--disable-install-doc" goto :disable-rdoc
if "%1" == "--enable-install-static-library" goto :enable-lib
if "%1" == "--disable-install-static-library" goto :disable-lib
if "%1" == "--enable-debug-env" goto :enable-debug-env
if "%1" == "--disable-debug-env" goto :disable-debug-env
if "%1" == "--enable-rubygems" goto :enable-rubygems
if "%1" == "--disable-rubygems" goto :disable-rubygems
if "%1" == "--enable-mjit-support" goto :enable-mjit-support
if "%1" == "--disable-mjit-support" goto :disable-mjit-support
if "%1" == "--extout" goto :extout
if "%1" == "--path" goto :path
if "%1" == "--with-baseruby" goto :baseruby
if "%1" == "--without-baseruby" goto :baseruby
if "%1" == "--with-ntver" goto :ntver
if "%1" == "--with-libdir" goto :libdir
if "%1" == "--with-git" goto :git
if "%1" == "--without-git" goto :nogit
if "%1" == "--without-ext" goto :witharg
if "%1" == "--without-extensions" goto :witharg
if "%opt:~0,10%" == "--without-" goto :withoutarg
if "%opt:~0,7%" == "--with-" goto :witharg
if "%1" == "-h" goto :help
if "%1" == "--help" goto :help
  if "%opt:~0,1%" == "-" (
    echo>>confargs.tmp  %1 \
    set witharg=
  ) else if "%witharg" == "" (
    echo>>confargs.tmp  %1 \
  ) else (
    echo>>confargs.tmp ,%1\
  )
  shift
goto :loop ;
:srcdir
  echo>> ~tmp~.mak 	"srcdir=%~2" \
  echo>>confargs.tmp --srcdir=%2 \
  shift
  shift
goto :loop ;
:prefix
  echo>> ~tmp~.mak 	"prefix=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:pprefix
  echo>> ~tmp~.mak 	"PROGRAM_PREFIX=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:suffix
  echo>> ~tmp~.mak 	"PROGRAM_SUFFIX=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:installname
  echo>> ~tmp~.mak 	"RUBY_INSTALL_NAME=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:soname
  echo>> ~tmp~.mak 	"RUBY_SO_NAME=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:target
  echo>> ~tmp~.mak 	"%~2" \
  echo>>confargs.tmp --target=%2 \
  if NOT "%~2" == "x64-mswin64" goto target3
:target2
  echo>> ~tmp~.mak 	"TARGET_OS=mswin64" \
:target3
  shift
  shift
goto :loop ;
:extstatic
  echo>> ~tmp~.mak 	"EXTSTATIC=static" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-rdoc
  echo>> ~tmp~.mak 	"RDOCTARGET=rdoc" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-rdoc
  echo>> ~tmp~.mak 	"RDOCTARGET=nodoc" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-lib
  echo>> ~tmp~.mak 	"INSTALL_STATIC_LIBRARY=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-lib
  echo>> ~tmp~.mak 	"INSTALL_STATIC_LIBRARY=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-debug-env
  echo>> ~tmp~.mak 	"ENABLE_DEBUG_ENV=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-debug-env
  echo>> ~tmp~.mak 	"ENABLE_DEBUG_ENV=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-rubygems
  echo>> ~tmp~.mak 	"USE_RUBYGEMS=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-rubygems
  echo>> ~tmp~.mak 	"USE_RUBYGEMS=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-mjit-support
  echo>> ~tmp~.mak 	"MJIT_SUPPORT=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-mjit-support
  echo>> ~tmp~.mak 	"MJIT_SUPPORT=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:ntver
  echo>> ~tmp~.mak 	"NTVER=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:extout
  echo>> ~tmp~.mak 	"EXTOUT=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:path
  echo>>pathlist.tmp %~2;\
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:baseruby
  echo>> ~tmp~.mak 	"BASERUBY=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:nobaseruby
  echo>> ~tmp~.mak 	"HAVE_BASERUBY=no" \
  echo>>confargs.tmp  %1=%2 \
  shift
goto :loop ;
:libdir
  echo>> ~tmp~.mak 	"libdir_basename=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:git
  echo>> ~tmp~.mak 	"GIT=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:nogit
  echo>> ~tmp~.mak 	"GIT=never-use" \
  echo>> ~tmp~.mak 	"HAVE_GIT=no" \
  echo>>confargs.tmp  %1 \
  shift
goto :loop ;
:witharg
  echo>>confargs.tmp  %1=%2\
  set witharg=1
  shift
  shift
goto :loop ;
:withoutarg
  echo>>confargs.tmp  %1 \
  shift
goto :loop ;
:help
  echo Configuration:
  echo   --help                  display this help
  echo   --srcdir=DIR            find the sources in DIR [configure dir or `..']
  echo Installation directories:
  echo   --prefix=PREFIX         install files in PREFIX [/usr]
  echo System types:
  echo   --target=TARGET         configure for TARGET [i386-mswin32]
  echo Optional Package:
  echo   --with-baseruby=RUBY    use RUBY as baseruby [ruby]
  echo   --with-static-linked-ext link external modules statically
  echo   --with-ext="a,b,..."    use extensions a, b, ...
  echo   --without-ext="a,b,..." ignore extensions a, b, ...
  echo   --with-opt-dir=DIR-LIST add optional headers and libraries directories separated by `;'
  echo   --disable-install-doc   do not install rdoc indexes during install
  echo   --with-ntver=0xXXXX     target NT version (shouldn't use with old SDK)
  del *.tmp
  del ~tmp~.mak
goto :exit
:end
echo>> ~tmp~.mak 	WIN32DIR=$(@D:\=/)
echo.>>confargs.tmp
echo>confargs.c #define $ $$ //
echo>>confargs.c !ifndef CONFIGURE_ARGS
type>>confargs.c confargs.tmp
echo>>confargs.c configure_args = CONFIGURE_ARGS
echo>>confargs.c !endif
echo>>confargs.c #undef $
if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
if exist pathlist.tmp type>>confargs.c pathlist.tmp
if exist pathlist.tmp echo.>>confargs.c
if exist pathlist.tmp echo>>confargs.c pathlist = PATH_LIST
cl -EP confargs.c > ~setup~.mak 2>nul
if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
type>>~setup~.mak ~tmp~.mak
del *.tmp > nul
del ~tmp~.mak > nul
echo>>~setup~.mak 	@if exist Makefile.old del Makefile.old
echo>>~setup~.mak 	@if exist Makefile ren Makefile Makefile.old
echo>>~setup~.mak 	@ren Makefile.new Makefile
nmake -alf ~setup~.mak MAKEFILE=Makefile.new
exit /b %ERRORLEVEL%
:exit
@endlocal

@echo off
@setlocal disabledelayedexpansion
set witharg=

for %%I in (%0) do if /%%~dpI/ == /%CD%\/ (
    echo don't run in win32 directory.
    exit /b 999
)

echo> ~tmp~.mak ####
echo>> ~tmp~.mak conf = %0
echo>> ~tmp~.mak $(conf): nul
echo>> ~tmp~.mak 	@del ~setup~.mak
echo>> ~tmp~.mak 	@$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
if exist pathlist.tmp del pathlist.tmp
echo>confargs.tmp #define CONFIGURE_ARGS \
:loop
set opt=%1
if "%1" == "" goto :end
if "%1" == "--prefix" goto :prefix
if "%1" == "--srcdir" goto :srcdir
if "%1" == "srcdir" goto :srcdir
if "%1" == "--target" goto :target
if "%1" == "target" goto :target
if "%1" == "--with-static-linked-ext" goto :extstatic
if "%1" == "--program-prefix" goto :pprefix
if "%1" == "--program-suffix" goto :suffix
if "%1" == "--program-name" goto :installname
if "%1" == "--install-name" goto :installname
if "%1" == "--so-name" goto :soname
if "%1" == "--enable-install-doc" goto :enable-rdoc
if "%1" == "--disable-install-doc" goto :disable-rdoc
if "%1" == "--enable-install-static-library" goto :enable-lib
if "%1" == "--disable-install-static-library" goto :disable-lib
if "%1" == "--enable-debug-env" goto :enable-debug-env
if "%1" == "--disable-debug-env" goto :disable-debug-env
if "%1" == "--enable-rubygems" goto :enable-rubygems
if "%1" == "--disable-rubygems" goto :disable-rubygems
if "%1" == "--enable-mjit-support" goto :enable-mjit-support
if "%1" == "--disable-mjit-support" goto :disable-mjit-support
if "%1" == "--extout" goto :extout
if "%1" == "--path" goto :path
if "%1" == "--with-baseruby" goto :baseruby
if "%1" == "--without-baseruby" goto :baseruby
if "%1" == "--with-ntver" goto :ntver
if "%1" == "--with-libdir" goto :libdir
if "%1" == "--with-git" goto :git
if "%1" == "--without-git" goto :nogit
if "%1" == "--without-ext" goto :witharg
if "%1" == "--without-extensions" goto :witharg
if "%opt:~0,10%" == "--without-" goto :withoutarg
if "%opt:~0,7%" == "--with-" goto :witharg
if "%1" == "-h" goto :help
if "%1" == "--help" goto :help
  if "%opt:~0,1%" == "-" (
    echo>>confargs.tmp  %1 \
    set witharg=
  ) else if "%witharg" == "" (
    echo>>confargs.tmp  %1 \
  ) else (
    echo>>confargs.tmp ,%1\
  )
  shift
goto :loop ;
:srcdir
  echo>> ~tmp~.mak 	"srcdir=%~2" \
  echo>>confargs.tmp --srcdir=%2 \
  shift
  shift
goto :loop ;
:prefix
  echo>> ~tmp~.mak 	"prefix=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:pprefix
  echo>> ~tmp~.mak 	"PROGRAM_PREFIX=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:suffix
  echo>> ~tmp~.mak 	"PROGRAM_SUFFIX=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:installname
  echo>> ~tmp~.mak 	"RUBY_INSTALL_NAME=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:soname
  echo>> ~tmp~.mak 	"RUBY_SO_NAME=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:target
  echo>> ~tmp~.mak 	"%~2" \
  echo>>confargs.tmp --target=%2 \
  if NOT "%~2" == "x64-mswin64" goto target3
:target2
  echo>> ~tmp~.mak 	"TARGET_OS=mswin64" \
:target3
  shift
  shift
goto :loop ;
:extstatic
  echo>> ~tmp~.mak 	"EXTSTATIC=static" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-rdoc
  echo>> ~tmp~.mak 	"RDOCTARGET=rdoc" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-rdoc
  echo>> ~tmp~.mak 	"RDOCTARGET=nodoc" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-lib
  echo>> ~tmp~.mak 	"INSTALL_STATIC_LIBRARY=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-lib
  echo>> ~tmp~.mak 	"INSTALL_STATIC_LIBRARY=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-debug-env
  echo>> ~tmp~.mak 	"ENABLE_DEBUG_ENV=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-debug-env
  echo>> ~tmp~.mak 	"ENABLE_DEBUG_ENV=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-rubygems
  echo>> ~tmp~.mak 	"USE_RUBYGEMS=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-rubygems
  echo>> ~tmp~.mak 	"USE_RUBYGEMS=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:enable-mjit-support
  echo>> ~tmp~.mak 	"MJIT_SUPPORT=yes" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:disable-mjit-support
  echo>> ~tmp~.mak 	"MJIT_SUPPORT=no" \
  echo>>confargs.tmp %1 \
  shift
goto :loop ;
:ntver
  echo>> ~tmp~.mak 	"NTVER=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:extout
  echo>> ~tmp~.mak 	"EXTOUT=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:path
  echo>>pathlist.tmp %~2;\
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:baseruby
  echo>> ~tmp~.mak 	"BASERUBY=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:nobaseruby
  echo>> ~tmp~.mak 	"HAVE_BASERUBY=no" \
  echo>>confargs.tmp  %1=%2 \
  shift
goto :loop ;
:libdir
  echo>> ~tmp~.mak 	"libdir_basename=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:git
  echo>> ~tmp~.mak 	"GIT=%~2" \
  echo>>confargs.tmp  %1=%2 \
  shift
  shift
goto :loop ;
:nogit
  echo>> ~tmp~.mak 	"GIT=never-use" \
  echo>> ~tmp~.mak 	"HAVE_GIT=no" \
  echo>>confargs.tmp  %1 \
  shift
goto :loop ;
:witharg
  echo>>confargs.tmp  %1=%2\
  set witharg=1
  shift
  shift
goto :loop ;
:withoutarg
  echo>>confargs.tmp  %1 \
  shift
goto :loop ;
:help
  echo Configuration:
  echo   --help                  display this help
  echo   --srcdir=DIR            find the sources in DIR [configure dir or `..']
  echo Installation directories:
  echo   --prefix=PREFIX         install files in PREFIX [/usr]
  echo System types:
  echo   --target=TARGET         configure for TARGET [i386-mswin32]
  echo Optional Package:
  echo   --with-baseruby=RUBY    use RUBY as baseruby [ruby]
  echo   --with-static-linked-ext link external modules statically
  echo   --with-ext="a,b,..."    use extensions a, b, ...
  echo   --without-ext="a,b,..." ignore extensions a, b, ...
  echo   --with-opt-dir=DIR-LIST add optional headers and libraries directories separated by `;'
  echo   --disable-install-doc   do not install rdoc indexes during install
  echo   --with-ntver=0xXXXX     target NT version (shouldn't use with old SDK)
  del *.tmp
  del ~tmp~.mak
goto :exit
:end
echo>> ~tmp~.mak 	WIN32DIR=$(@D:\=/)
echo.>>confargs.tmp
echo>confargs.c #define $ $$ //
echo>>confargs.c !ifndef CONFIGURE_ARGS
type>>confargs.c confargs.tmp
echo>>confargs.c configure_args = CONFIGURE_ARGS
echo>>confargs.c !endif
echo>>confargs.c #undef $
if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
if exist pathlist.tmp type>>confargs.c pathlist.tmp
if exist pathlist.tmp echo.>>confargs.c
if exist pathlist.tmp echo>>confargs.c pathlist = PATH_LIST
cl -EP confargs.c > ~setup~.mak 2>nul
if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
type>>~setup~.mak ~tmp~.mak
del *.tmp > nul
del ~tmp~.mak > nul
echo>>~setup~.mak 	@if exist Makefile.old del Makefile.old
echo>>~setup~.mak 	@if exist Makefile ren Makefile Makefile.old
echo>>~setup~.mak 	@ren Makefile.new Makefile
nmake -alf ~setup~.mak MAKEFILE=Makefile.new
exit /b %ERRORLEVEL%
:exit
@endlocal

Update configure.bat

Update configure.bat