@echo off

:: current path with a slash \
for %%A in ("%~dp0\..") do set "CURRENT_PATH=%%~fA\"

:: change path to where script was run (root dir)
cd /D "%CURRENT_PATH%"

:: localization
@call module\i18n.inc.bat
set i18n=module\i18n.inc.bat

set TOOLS_PATH=%CURRENT_PATH%module\tools\
set EXEC_TOOL=%TOOLS_PATH%exec_tool.bat
set URL_TOOL_WGET=http://mirror.ufs.ac.za/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-bin.zip
set URL_TOOL_WGET_DEP=http://mirror.ufs.ac.za/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-dep.zip
set URL_TOOL_MD5SUM=http://www.etree.org/cgi-bin/counter.cgi/software/md5sum.exe
set URL_TOOL_UNZIP=https://fossies.org/windows/misc/unz600xn.exe/unzip.exe
set URL_TOOL_VSWHERE=https://github.com/Microsoft/vswhere/releases/download/1.0.58/vswhere.exe

set CMAKE_VERSION=cmake-3.8.0-rc4-win32-x86
set URL_TOOL_CMAKE=https://cmake.org/files/v3.8/%CMAKE_VERSION%.zip

:: ----------- build_pvpgn VARIABLES ------------

:: LOG=false output cmake and vs output to console
:: LOG=true logs cmake and vs output to cmake.log, visualstudio.log
set LOG=false

set PVPGN_SOURCE=source\
set PVPGN_BUILD=build\

set URL_UPDATE=https://raw.githubusercontent.com/pvpgn/pvpgn-magic-builder/master/

set PVPGN_ZIP=https://github.com/pvpgn/pvpgn-server/archive/master.zip

set ZLIB_PATH=module\include\zlib\1.2.11\
set LUA_PATH=module\include\lua\5.1\
:: FIXME: important full path?
set ATLMFC_INCLUDE_PATH=%CURRENT_PATH%module\include\atlmfc\

:: ----------- build_d2gs VARIABLES ------------
set URL_MPQ=http://cdn.pvpgn.pro/diablo2/

set D2GS_RELEASE=d2gs\
set URL_BNHASH_API=http://harpywar.pvpgn.pl/api.php?method=hash^&password=

:: ----------- build_pvpgn_dev VARIABLES ------------

:: current path with a backslash /
set CURRENT_PATH_BACKSLASH=%CURRENT_PATH:\=/%

:: root dir for any project
set PROJECT_ROOT_DIR=..\..\..\

set PVPGN_DEVKIT=dev\

@echo off

:: current path with a slash \
for %%A in ("%~dp0\..") do set "CURRENT_PATH=%%~fA\"

:: change path to where script was run (root dir)
cd /D "%CURRENT_PATH%"

:: localization
@call module\i18n.inc.bat
set i18n=module\i18n.inc.bat

set TOOLS_PATH=%CURRENT_PATH%module\tools\
set EXEC_TOOL=%TOOLS_PATH%exec_tool.bat
set URL_TOOL_WGET=https://kent.dl.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-bin.zip
set URL_TOOL_WGET_DEP=https://kent.dl.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-dep.zip
set URL_TOOL_MD5SUM=http://www.etree.org/cgi-bin/counter.cgi/software/md5sum.exe
set URL_TOOL_UNZIP=https://fossies.org/windows/misc/unz600xn.exe/unzip.exe
set URL_TOOL_VSWHERE=https://github.com/Microsoft/vswhere/releases/download/1.0.58/vswhere.exe

set CMAKE_VERSION=cmake-3.8.0-rc4-win32-x86
set URL_TOOL_CMAKE=https://cmake.org/files/v3.8/%CMAKE_VERSION%.zip

:: ----------- build_pvpgn VARIABLES ------------

:: LOG=false output cmake and vs output to console
:: LOG=true logs cmake and vs output to cmake.log, visualstudio.log
set LOG=false

set PVPGN_SOURCE=source\
set PVPGN_BUILD=build\

set URL_UPDATE=https://raw.githubusercontent.com/pvpgn/pvpgn-magic-builder/master/

set PVPGN_ZIP=https://github.com/pvpgn/pvpgn-server/archive/master.zip

set ZLIB_PATH=module\include\zlib\1.2.11\
set LUA_PATH=module\include\lua\5.1\
:: FIXME: important full path?
set ATLMFC_INCLUDE_PATH=%CURRENT_PATH%module\include\atlmfc\

:: ----------- build_d2gs VARIABLES ------------
set URL_MPQ=http://cdn.pvpgn.pro/diablo2/

set D2GS_RELEASE=d2gs\
set URL_BNHASH_API=http://harpywar.pvpgn.pl/api.php?method=hash^&password=

:: ----------- build_pvpgn_dev VARIABLES ------------

:: current path with a backslash /
set CURRENT_PATH_BACKSLASH=%CURRENT_PATH:\=/%

:: root dir for any project
set PROJECT_ROOT_DIR=..\..\..\

set PVPGN_DEVKIT=dev\

fix wget download url, previous doesn't work


:: Start Emotion in Motion in Windows Machine

:: Imports latest dataBase dump (mongod needs to be running)
mongorestore --port 28017 -d emotion-in-motion-dev --drop ./mongodb-dump/emotion-in-motion-dev
mongorestore --port 28017 -d emotion-in-motion-test --drop ./mongodb-dump/emotion-in-motion-test
mongorestore --port 28017 -d emotion-in-motion-production --drop ./mongodb-dump/emotion-in-motion-production

:: Start Node (not necessary in EiM terminals)
:: node server.js

pause

:: Start Emotion in Motion in Windows Machine

:: Imports latest dataBase dump (mongod needs to be running)
mongorestore --port 27017 -d emotion-in-motion-dev --drop ./mongodb-dump/emotion-in-motion-dev
mongorestore --port 27017 -d emotion-in-motion-test --drop ./mongodb-dump/emotion-in-motion-test
mongorestore --port 27017 -d emotion-in-motion-production --drop ./mongodb-dump/emotion-in-motion-production

:: Start Node (not necessary in EiM terminals)
:: node server.js

pause

Use default MongoDB port in database update script


@echo off

::Specify the PHP binaries path here
set PHP_PATH=bin\php
::Specify the main PHP executable here
set PHP_EXE=php.exe

if exist "%PHP_PATH%\%PHP_EXE%" (
    "%PHP_PATH%\%PHP_EXE%" phartools.php %*
) else (
    echo PHP Executable not found. Please set the right PHP path.
)

Create phartools.bat

Create phartools.bat


@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
	move readme.rst readme.rst.saved
	del /q /s *.rst
        move index.rst.saved index.rst
        move readme.rst.saved readme.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 -e -M -o . .. ../setup.py ../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

Use tabs.

docs/make.bat: Use tabs.


@echo off
@setlocal
:: Purge a whole site

:: Sample usage: Purge the entire site
::   purge-fastly-service.bat xyz9bpgo87jaTDEPx0pQH purge_all

:: Sample usage: Purge a surrogate key
::   purge-fastly-service.bat xyz9bpgo87jaTDEPx0pQH key12

set ConfigFile=Fastly-config.txt

:: Set auth variables from config file
if not exist %ConfigFile% (
    echo Configuration file: %ConfigFile% does not exist. Aborting purge!
	goto finish
)

:: Set auth variables from config file
set PATH=%PATH%;..\..\common
@call source %ConfigFile%

set site_id=%1
set Purge_Command=%2

set APIendpoint=https://api.fastly.com

IF /I "%Purge_Command%" == "purge_all"  (set PurgeString=purge_all) ELSE (set PurgeString=purge/%Purge_Command%)

curl -s -X POST %APIendpoint%/service/%site_id%/%PurgeString% -H "Fastly-Key: %Fastly_Key%" -H "Accept: application/json"

:finish
echo.

Create purge-fastly-service.bat

Create purge-fastly-service.bat


"del /s /q Makefile*"
"del /s /q *.user"
"del /s /q debug"
"del /s /q *.o"
"del /s /q moc_*"
"del /s /q ui*.h"
"del /s /q object_script*"

Add windows distclean script.

Add windows distclean script.


cmake ^
    -G "Ninja" ^
    -D CMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
    -D CMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
    -D CMAKE_BUILD_TYPE=Release ^
    .
if errorlevel 1 exit 1

ninja
if errorlevel 1 exit 1

cp gemmi.exe "%LIBRARY_BIN%"
if errorlevel 1 exit 1

"%PYTHON%" -m pip install . --no-deps -vv
if errorlevel 1 exit 1

cmake ^
    -G "Ninja" ^
    -D CMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
    -D CMAKE_VERBOSE_MAKEFILE:BOOL=ON ^
    -D CMAKE_BUILD_TYPE=Release ^
    .
if errorlevel 1 exit 1

ninja
if errorlevel 1 exit 1

cp gemmi.exe "%LIBRARY_BIN%"
if errorlevel 1 exit 1

"%PYTHON%" -m pip install . --no-deps -vv
if errorlevel 1 exit 1

add verbose mode on windows

add verbose mode on windows


@echo off
setlocal

call set_environment.cmd
call require_admin.cmd || exit /b 1

set INSTALL_PATH=%ProgramFiles%\Tailviewer.PluginRepository
set OLD_REPO=%INSTALL_PATH%\repository.exe
set DATABASE_FOLDER=%ALLUSERSPROFILE%\Tailviewer.PluginRepository
set DATABASE_PATH=%DATABASE_FOLDER%\Plugins.isdb
set DATABASE_EXPORT_PATH=%temp%\tailviewer.pluginrepository\upgrade
set DATABASE_IMPORT_SCRIPT=%DATABASE_EXPORT_PATH%\import.cmd

if exist "%OLD_REPO%" (
    pushd "%INSTALL_PATH%"
    call "delete_service.cmd" || goto :ERROR
    popd

    echo Exporting database...
    "%OLD_REPO%" export "%DATABASE_EXPORT_PATH%" || goto :ERROR

    echo Removing previous installation...
    rmdir /s /q "%INSTALL_PATH%"
)

if exist "%DATABASE_PATH%" (
    echo Renaming old database...
    if exist "%DATABASE_FOLDER%\Plugins.isdb.old" del "%DATABASE_FOLDER%\Plugins.isdb.old"

    ren "%DATABASE_PATH%" "Plugins.isdb.old"
    timeout /t 1 /nobreak > NUL
)

echo Installing...
if not exist "%INSTALL_PATH%" mkdir "%INSTALL_PATH%"
xcopy "%ScriptDir%*" "%INSTALL_PATH%" /i /s || goto :ERROR

if exist "%DATABASE_IMPORT_SCRIPT%" (
    pushd "%INSTALL_PATH%
    echo Import database...
    call "%DATABASE_IMPORT_SCRIPT%" || goto :ERROR
    popd
)

echo Starting service...
pushd %INSTALL_PATH%
call "create_service.cmd" || goto :ERROR
call "start_service.cmd" || goto :ERROR
popd

goto :SUCCESS

:NOADMIN
echo NO administrative permissions found.
exit /b -1

:ERROR
echo Installation failed!
exit /b %errorlevel%

:SUCCESS
echo Installation successful!
exit /b 0

endlocal

@echo off
setlocal

call set_environment.cmd
call require_admin.cmd || exit /b 1

set INSTALL_PATH=%ProgramFiles%\Tailviewer.PluginRepository
set OLD_REPO=%INSTALL_PATH%\repository.exe
set DATABASE_FOLDER=%ALLUSERSPROFILE%\Tailviewer.PluginRepository
set DATABASE_PATH=%DATABASE_FOLDER%\Database.isdb
set DATABASE_OLD_PATH=%DATABASE_FOLDER%\Database.old.isdb
set DATABASE_EXPORT_PATH=%temp%\tailviewer.pluginrepository\upgrade
set DATABASE_IMPORT_SCRIPT=%DATABASE_EXPORT_PATH%\import.cmd

if exist "%OLD_REPO%" (
    pushd "%INSTALL_PATH%"
    call "delete_service.cmd" || goto :ERROR
    popd

    echo Exporting database...
    "%OLD_REPO%" export "%DATABASE_EXPORT_PATH%" || goto :ERROR

    echo Removing previous installation...
    rmdir /s /q "%INSTALL_PATH%"
)

if exist "%DATABASE_PATH%" (
    echo Renaming old database...
    if exist "%DATABASE_OLD_PATH%" del "%DATABASE_OLD_PATH%"

    ren "%DATABASE_PATH%" "Database.isdb.old" || goto :ERROR
    timeout /t 1 /nobreak > NUL
)

echo Installing...
if not exist "%INSTALL_PATH%" mkdir "%INSTALL_PATH%"
xcopy "%ScriptDir%*" "%INSTALL_PATH%" /i /s || goto :ERROR

if exist "%DATABASE_IMPORT_SCRIPT%" (
    pushd "%INSTALL_PATH%
    echo Import database...
    call "%DATABASE_IMPORT_SCRIPT%" || goto :ERROR
    popd
)

echo Starting service...
pushd %INSTALL_PATH%
call "create_service.cmd" || goto :ERROR
call "start_service.cmd" || goto :ERROR
popd

goto :SUCCESS

:NOADMIN
echo NO administrative permissions found.
exit /b -1

:ERROR
echo Installation failed!
exit /b %errorlevel%

:SUCCESS
echo Installation successful!
exit /b 0

endlocal

Update install.cmd

Update install.cmd


@echo off
setlocal
set BASENAME=apktool_
chcp 65001 2>nul >nul

set java_exe=java.exe

if defined JAVA_HOME (
set java_exe="%JAVA_HOME%\bin\java.exe"
)

rem Find the highest version .jar available in the same directory as the script
setlocal EnableDelayedExpansion
pushd "%~dp0"
if exist apktool.jar (
    set BASENAME=apktool
    goto skipversioned
)
set max=0
for /f "tokens=1* delims=-_.0" %%A in ('dir /b /a-d %BASENAME%*.jar') do if %%~B gtr !max! set max=%%~nB
:skipversioned
popd
setlocal DisableDelayedExpansion

rem Find out if the commandline is a parameterless .jar or directory, for fast unpack/repack
if "%~1"=="" goto load
if not "%~2"=="" goto load
set ATTR=%~a1
if "%ATTR:~0,1%"=="d" (
    rem Directory, rebuild
    set fastCommand=b
)
if "%ATTR:~0,1%"=="-" if "%~x1"==".apk" (
    rem APK file, unpack
    set fastCommand=d
)

:load
"%java_exe%" -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0%BASENAME%%max%.jar" %fastCommand% %*

rem Pause when ran non interactively
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" pause

@echo off
setlocal
set BASENAME=apktool_
chcp 65001 2>nul >nul

set java_exe=java.exe

if defined JAVA_HOME (
set "java_exe=%JAVA_HOME%\bin\java.exe"
)

rem Find the highest version .jar available in the same directory as the script
setlocal EnableDelayedExpansion
pushd "%~dp0"
if exist apktool.jar (
    set BASENAME=apktool
    goto skipversioned
)
set max=0
for /f "tokens=1* delims=-_.0" %%A in ('dir /b /a-d %BASENAME%*.jar') do if %%~B gtr !max! set max=%%~nB
:skipversioned
popd
setlocal DisableDelayedExpansion

rem Find out if the commandline is a parameterless .jar or directory, for fast unpack/repack
if "%~1"=="" goto load
if not "%~2"=="" goto load
set ATTR=%~a1
if "%ATTR:~0,1%"=="d" (
    rem Directory, rebuild
    set fastCommand=b
)
if "%ATTR:~0,1%"=="-" if "%~x1"==".apk" (
    rem APK file, unpack
    set fastCommand=d
)

:load
"%java_exe%" -jar -Duser.language=en -Dfile.encoding=UTF8 "%~dp0%BASENAME%%max%.jar" %fastCommand% %*

rem Pause when ran non interactively
for /f "tokens=2" %%# in ("%cmdcmdline%") do if /i "%%#" equ "/c" pause

Correct helper script quoting (#2882)

Windows: Correct helper script quoting (#2882)


electron-packager ./ --out=c:/KolpaqueClientElectron --platform=win32,linux,darwin --arch=ia32,x64 --icon=./icon.ico --overwrite
pause

Build releases bat.

Build releases bat.


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DNX_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Update K_BUILD_VERSION/kre/KRE/.k => DNX_BUILD_VERSION/dnx/DNX/.dnx.


@echo off

set nsis_compiler=

if defined NSIS_HOME (
    if exist "%NSIS_HOME%\makensis.exe" (
        set "nsis_compiler=%NSIS_HOME%"
    )
)

if %PROCESSOR_ARCHITECTURE%==x86 (
    set RegQry=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NSIS
) else (
    set RegQry=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NSIS
)

if not defined nsis_compiler (
    for /F "tokens=2*" %%a in ('reg query "%RegQry%" /v InstallLocation ^|findstr InstallLocation') do set nsis_compiler=%%b
)

if not defined nsis_compiler (
    for %%X in (makensis.exe) do (set nsis_compiler=%%~dp$PATH:X)
)

set args=
:loop
    set args=%args% %1
    shift
if not "%~1"=="" goto loop

if defined nsis_compiler (
    "%nsis_compiler%\makensis.exe" %args%
) else (
    echo "Error, build system cannot find NSIS! Please reinstall it, and make sure makensis.exe is in to your PATH or NSIS_HOME environment variable."
)

@echo off

set nsis_compiler=

if defined NSIS_HOME (
    if exist "%NSIS_HOME%\makensis.exe" (
        set "nsis_compiler=%NSIS_HOME%"
    )
)

if %PROCESSOR_ARCHITECTURE%==x86 (
    set RegQry=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\NSIS
) else (
    set RegQry=HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NSIS
)

if not defined nsis_compiler (
    for /F "tokens=2*" %%a in ('reg query "%RegQry%" /v InstallLocation ^|findstr InstallLocation') do set nsis_compiler=%%b
)

if not defined nsis_compiler (
    for %%X in (makensis.exe) do (set nsis_compiler=%%~dp$PATH:X)
)

set args=
:loop
    set args=%args% %1
    shift
if not "%~1"=="" goto loop

if defined nsis_compiler (
    "%nsis_compiler%\makensis.exe" %args%
) else (
    echo "Error: makensis.exe isn't in your PATH or NSIS_HOME environment variable."
)

update dialog

update dialog


@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*"

@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"

Return the error code from build.cmd

Return the error code from build.cmd


@echo off

msbuild src\iislua.sln /p:Platform=Win32 /p:Configuration=Release /m
msbuild src\iislua.sln /p:Platform=x64 /p:Configuration=Release /m

add build.cmd

add build.cmd


Return the error code from build.cmd

Return the error code from build.cmd


@setlocal enableextensions
@cd /d "%~dp0"

echo "start ourjs"

cd %~dp0

:dowhile

    node ./svr/ourjs.js config.magazine.js

    ping -n 5 127.0.0.1 >nul
    REM "Server stop working, waiting for restart...\r\n\r\n\r\n\r\n"

goto :dowhile

@setlocal enableextensions
@cd /d "%~dp0"

echo "start ourjs"

cd %~dp0

:dowhile

    node ./svr/ourjs.js config.js

    ping -n 5 127.0.0.1 >nul
    REM "Server stop working, waiting for restart...\r\n\r\n\r\n\r\n"

goto :dowhile

fix configuration

fix configuration


@echo off

set "CLINK_NAME=clink"

if exist "%~dp0vendors\identify.bat" call "%~dp0vendors\identify.bat" app clink

if not defined CLINK_NAME goto :continue
if not exist "%~dp0vendors\%CLINK_NAME%\clink.bat" goto :continue

:: ========================================================================

:: Inject clink
call "%~dp0vendors\%CLINK_NAME%\clink.bat" inject --quiet --profile "%~dp0etc\clink"

:: Integrate Git into prompt
prompt $p$s{git}$_$g$s

:: ========================================================================

:continue
if exist "%~dp0shellenv.bat" call "%~dp0shellenv.bat"

:: ========================================================================

:: EOF

@echo off

set "CLINK_NAME=clink"

if exist "%~dp0vendors\identify.bat" call "%~dp0vendors\identify.bat" app clink

if exist "%~dp0shellenv.bat" call "%~dp0shellenv.bat"
set "HOME=%~dp0home"

if not defined CLINK_NAME goto :EOF
if not exist "%~dp0vendors\%CLINK_NAME%\clink.bat" goto :EOF

:: ========================================================================

:: Inject clink
call "%~dp0vendors\%CLINK_NAME%\clink.bat" inject --quiet --profile "%~dp0etc\clink"

:: Integrate Git into prompt
prompt $p$s{git}$_$g$s

:: ========================================================================

:: EOF

simplify clink invocation

simplify clink invocation


mkdir build
cd build

cmake ^
    -G "NMake Makefiles" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
    -DBUILD_TESTING=ON ^
    -DUNITTESTS=OFF ^
    %SRC_DIR%
if errorlevel 1 exit 1

:: Build.
cmake --build . --config Release
if errorlevel 1 exit 1

:: Install.
cmake --build . --config Release --target install
if errorlevel 1 exit 1

:: Test
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

Create bld.bat

Create bld.bat


@echo off
rem
rem
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.
rem

rem
rem handle specific scripts; the SCRIPT_NAME is exactly the name of the Karaf
rem script; for example karaf.bat, start.bat, stop.bat, admin.bat, client.bat, ...
rem
rem if "%KARAF_SCRIPT%" == "SCRIPT_NAME" (
rem   Actions go here...
rem )

rem
rem general settings which should be applied for all scripts go here; please keep
rem in mind that it is possible that scripts might be executed more than once, e.g.
rem in example of the start script where the start script is executed first and the
rem karaf script afterwards.
rem

rem
rem The following section shows the possible configuration options for the default
rem karaf scripts
rem
rem Window name of the windows console
rem SET KARAF_TITLE

rem Minimum memory for the JVM
rem SET JAVA_MIN_MEM=512M

rem Maximum memory for the JVM
rem SET JAVA_MAX_MEM=512M

rem Minimum perm memory for the JVM
rem SET JAVA_PERM_MEM=128M

rem Maximum memory for the JVM
rem SET JAVA_MAX_PERM_MEM=128M

rem Additional JVM options
rem SET EXTRA_JAVA_OPTS

rem Karaf home folder
rem SET KARAF_HOME

rem Karaf data folder
rem SET KARAF_DATA

rem Karaf base folder
rem SET KARAF_BASE

rem Karaf etc folder
rem SET KARAF_ETC

rem Additional available Karaf options
rem SET KARAF_OPTS

@echo off
rem
rem
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.
rem

rem
rem handle specific scripts; the SCRIPT_NAME is exactly the name of the Karaf
rem script; for example karaf.bat, start.bat, stop.bat, admin.bat, client.bat, ...
rem
rem if "%KARAF_SCRIPT%" == "SCRIPT_NAME" (
rem   Actions go here...
rem )

rem
rem general settings which should be applied for all scripts go here; please keep
rem in mind that it is possible that scripts might be executed more than once, e.g.
rem in example of the start script where the start script is executed first and the
rem karaf script afterwards.
rem

rem
rem The following section shows the possible configuration options for the default
rem karaf scripts
rem
rem Window name of the windows console
rem SET KARAF_TITLE

rem Minimum memory for the JVM
SET JAVA_MIN_MEM=512M

rem Maximum memory for the JVM
SET JAVA_MAX_MEM=512M

rem Minimum perm memory for the JVM
SET JAVA_PERM_MEM=128M

rem Maximum memory for the JVM
SET JAVA_MAX_PERM_MEM=256M

rem Additional JVM options
rem SET EXTRA_JAVA_OPTS

rem Karaf home folder
rem SET KARAF_HOME

rem Karaf data folder
rem SET KARAF_DATA

rem Karaf base folder
rem SET KARAF_BASE

rem Karaf etc folder
rem SET KARAF_ETC

rem Additional available Karaf options
rem SET KARAF_OPTS

Set windows setenv default values to same as Linux setenv


@ECHO OFF &SETLOCAL ENABLEDELAYEDEXPANSION
SET "HFile=file"
SET "search=// @version"

FOR /f %%a IN ('^<"%HFile%" find /c /v ""') DO SET /a lines=%%a
< "%HFile%" (
FOR /l %%a IN (1,1,%lines%) DO (
     SET "line="
     SET /p "line="
     IF NOT "!line!"=="" IF NOT "!line:%search%=!"=="!line!" (
          SET /a replace=!line:%search%=!+1
          SET "line=%search% !replace!"
     )
     ECHO(!line!
))>"%HFile%.new"
MOVE /y "%HFile%.new" "%HFile%"
TYPE "%HFile%"

update bot

update bot


@ECHO OFF
goto comment
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
:comment

set BIN_DIR=%~dp0

"%BIN_DIR%check_reqs"

pushd %BIN_DIR%..
call npm install
popd

node.exe "%BIN_DIR%create.js" %*

@ECHO OFF
goto comment
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
:comment

set BIN_DIR=%~dp0

call "%BIN_DIR%check_reqs"

if "%ERRORLEVEL%" == "1" exit /B 1

pushd %BIN_DIR%..
call npm install
popd

node.exe "%BIN_DIR%create.js" %*

[CB-3830] Update Windows create script to look at check_req error code


@echo off
set BASE=$$BASE$$
cd "%BASE%"
set PATH=%BASE%ruby\bin;%BASE%java\bin;%BASE%tools;%BASE%svn\bin;%BASE%nmap;%BASE%postgresql\bin;%PATH%
IF NOT EXIST "%BASE%java" GOTO NO_JAVA
set JAVA_HOME="%BASE%java"
:NO_JAVA
set MSF_DATABASE_CONFIG="%BASE%\config\database.yml"
cd "%BASE%msf3"
start ruby msfrpcd -a 127.0.0.1 -U $$USER$$ -P $$PASS$$ -t Msg -f

@echo off
set BASE=$$BASE$$
cd "%BASE%"
set PATH=%BASE%ruby\bin;%BASE%java\bin;%BASE%tools;%BASE%svn\bin;%BASE%nmap;%BASE%postgresql\bin;%PATH%
IF NOT EXIST "%BASE%java" GOTO NO_JAVA
set JAVA_HOME="%BASE%java"
:NO_JAVA
set MSF_DATABASE_CONFIG="%BASE%\config\database.yml"
cd "%BASE%msf3"
start rubyw msfrpcd -a 127.0.0.1 -U $$USER$$ -P $$PASS$$ -t Msg -f

make the starting of metasploit silent.

make the starting of metasploit silent.


rem	Simple Batch file to update Ring in the Android-LibSDL Version
rem	Author : Mahmoud Fayed <msfclipper@yahoo.com>

copy ..\..\..\src\*.c ..\project\jni\ring\src\
copy ..\..\..\extensions\ringsdl\ring_libsdl.c ..\project\jni\ring\src\
copy ring_ext.c ..\project\jni\ring\src\
copy ..\..\..\include\*.h ..\project\jni\ring\include\
copy ring_ext.h ..\project\jni\ring\include\
copy ..\..\..\ringlibs\gameengine\gameengine.ring ..\project\assets\
copy ..\..\..\ringlibs\gameengine\gameengine.rh ..\project\assets\
copy ..\..\..\ringlibs\gameengine\classes\*.ring ..\project\assets\classes
copy ..\..\..\ringlibs\gameengine\gl_allegro.ring ..\project\assets\
copy ..\..\..\ringlibs\gameengine\gl_libsdl.ring ..\project\assets\
copy ..\..\..\extensions\ringsdl\libsdl.ring ..\project\assets\
copy ..\..\..\extensions\ringsdl\ring_libsdl.rh ..\project\assets\
copy ..\..\..\extensions\ringsdl\sdl.rh ..\project\assets\

rem	Simple Batch file to update Ring in the Android-LibSDL Version
rem	Author : Mahmoud Fayed <msfclipper@yahoo.com>

copy ..\..\..\..\src\*.c ..\project\jni\ring\src\
copy ..\..\..\ringsdl\ring_libsdl.c ..\project\jni\ring\src\
copy ring_ext.c ..\project\jni\ring\src\
copy ..\..\..\..\include\*.h ..\project\jni\ring\include\
copy ring_ext.h ..\project\jni\ring\include\
copy ..\..\..\..\ringlibs\gameengine\gameengine.ring ..\project\assets\
copy ..\..\..\..\ringlibs\gameengine\gameengine.rh ..\project\assets\
copy ..\..\..\..\ringlibs\gameengine\classes\*.ring ..\project\assets\classes
copy ..\..\..\..\ringlibs\gameengine\gl_allegro.ring ..\project\assets\
copy ..\..\..\..\ringlibs\gameengine\gl_libsdl.ring ..\project\assets\
copy ..\..\..\ringsdl\libsdl.ring ..\project\assets\
copy ..\..\..\ringsdl\ring_libsdl.rh ..\project\assets\
copy ..\..\..\ringsdl\sdl.rh ..\project\assets\

Update extensions/android/ringlibsdl/update_ring/update.bat


@echo off
rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

#replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled

reg.exe load HKLM\DEFAULT "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload HKLM\DEFAULT

reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /q /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /q /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /q /I "%WINDIR%\Setup\Files\7z1801-x64.msi"
msiexec.exe /q /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /q /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /q /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%WINDIR%\Setup\Files\setup.ps1'"

rem "%WINDIR%\Setup-githubbox.exe"

Update SetupComplete.cmd

Update SetupComplete.cmd


@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.17
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

echo NEXT_MANIFEST_PATH=%NEXT_MANIFEST_PATH%
echo PREVIOUS_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)

IF NOT DEFINED SYNC_CMD (
  SET SYNC_CMD=robocopy.exe
)
goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  echo %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm
  SET NODE_EXE=node
)

goto :EOF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

:Deployment
echo Handling node.js deployment.

:: 1. KuduSync
::echo 1. KuduSync
::IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
::  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
::  IF !ERRORLEVEL! NEQ 0 goto error
::)

echo 1. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  call :ExecuteCmd "%SYNC_CMD%" "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" /s /mt
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Select node version
echo 2. Select node version
call :SelectNodeVersion

:: 3. Install npm packages
echo 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  echo Running npm install --production
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install --production
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Completed npm install --production
  popd
)

:: 4. Restore nuget packages
echo 4. Restore nuget packages
IF EXIST "%DEPLOYMENT_TARGET%\packages.config" (
  echo Running nuget restore
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd nuget restore "%DEPLOYMENT_TARGET%\packages.config" -PackagesDirectory "%DEPLOYMENT_TARGET%\packages"
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Completed nuget restore
  popd
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.17
:: ----------------------

:: Prerequisites
:: -------------

:: Verify node.js installed
where node 2>nul >nul
IF %ERRORLEVEL% NEQ 0 (
  echo Missing node.js executable, please install node.js, if already installed make sure it can be reached from current environment.
  goto error
)

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

IF NOT DEFINED DEPLOYMENT_SOURCE (
  SET DEPLOYMENT_SOURCE=%~dp0%.
)

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%ARTIFACTS%\wwwroot
)

IF NOT DEFINED NEXT_MANIFEST_PATH (
  SET NEXT_MANIFEST_PATH=%ARTIFACTS%\manifest

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%ARTIFACTS%\manifest
  )
)

echo NEXT_MANIFEST_PATH=%NEXT_MANIFEST_PATH%
echo PREVIOUS_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%

IF NOT DEFINED KUDU_SYNC_CMD (
  :: Install kudu sync
  echo Installing Kudu Sync
  call npm install kudusync -g --silent
  IF !ERRORLEVEL! NEQ 0 goto error

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)

IF NOT DEFINED SYNC_CMD (
  SET SYNC_CMD=robocopy.exe
)
goto Deployment

:: Utility Functions
:: -----------------

:SelectNodeVersion

IF DEFINED KUDU_SELECT_NODE_VERSION_CMD (
  :: The following are done only on Windows Azure Websites environment
  echo %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  call %KUDU_SELECT_NODE_VERSION_CMD% "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" "%DEPLOYMENT_TEMP%"
  IF !ERRORLEVEL! NEQ 0 goto error

  IF EXIST "%DEPLOYMENT_TEMP%\__nodeVersion.tmp" (
    SET /p NODE_EXE=<"%DEPLOYMENT_TEMP%\__nodeVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF EXIST "%DEPLOYMENT_TEMP%\__npmVersion.tmp" (
    SET /p NPM_JS_PATH=<"%DEPLOYMENT_TEMP%\__npmVersion.tmp"
    IF !ERRORLEVEL! NEQ 0 goto error
  )

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

  SET NPM_CMD="!NODE_EXE!" "!NPM_JS_PATH!"
) ELSE (
  SET NPM_CMD=npm
  SET NODE_EXE=node
)

goto :EOF

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Deployment
:: ----------

:Deployment
echo Handling node.js deployment.

:: 1. KuduSync
::echo 1. KuduSync
::IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
::  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_SOURCE%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"
::  IF !ERRORLEVEL! NEQ 0 goto error
::)

echo 1. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (
  "%SYNC_CMD%" "%DEPLOYMENT_SOURCE%" "%DEPLOYMENT_TARGET%" /s /mt
  IF !ERRORLEVEL! GEQ 8 goto error
)

:: 2. Select node version
echo 2. Select node version
call :SelectNodeVersion

:: 3. Install npm packages
echo 3. Install npm packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  echo Running npm install --production
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install --production
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Completed npm install --production
  popd
)

:: 4. Restore nuget packages
echo 4. Restore nuget packages
IF EXIST "%DEPLOYMENT_TARGET%\packages.config" (
  echo Running nuget restore
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd nuget restore "%DEPLOYMENT_TARGET%\packages.config" -PackagesDirectory "%DEPLOYMENT_TARGET%\packages"
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Completed nuget restore
  popd
)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
goto end

:: Execute command routine that will echo out when error
:ExecuteCmd
setlocal
set _CMD_=%*
call %_CMD_%
if "%ERRORLEVEL%" NEQ "0" echo Failed exitCode=%ERRORLEVEL%, command=%_CMD_%
exit /b %ERRORLEVEL%

:error
endlocal
echo An error has occurred during web site deployment.
call :exitSetErrorLevel
call :exitFromFunction 2>nul

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Update deploy.cmd

Update deploy.cmd

handle robocopy error


@echo off
REM Extract subcatchment geometries and attributes from SWMM input (*.inp) file
REM and save into shapefile.
REM Syntax:
REM 	python inp2gis.py [PATH TO *.inp FILE] 'EPSG:[XXXX]'

REM Activate conda environment (with necessary packages installed)
REM (here called 'gistoswmm5')
call activate gistoswmm5

REM Example of running inp2gis.py
REM '^' is used only to split long lines here
python "../utils/inp2gis.py"^
 "../demo_catchment/out/SWMM_in/demo_catchment_rect.inp"^
 "EPSG:3879"

REM Deactivate conda environment
call deactivate

REM Wait for user input before closing terminal
pause

@echo off
REM Extract subcatchment geometries and attributes from SWMM input (*.inp) file
REM and save into shapefile.
REM Syntax:
REM 	python inp2gis.py [PATH TO *.inp FILE] 'EPSG:[XXXX]'

REM Activate conda environment (with necessary packages installed)
REM (here called 'gistoswmm5')
call conda activate gistoswmm5

REM Example of running inp2gis.py
REM '^' is used only to split long lines here
python "../utils/inp2gis.py"^
 "../demo_catchment/out/SWMM_in/demo_catchment_rect.inp"^
 "EPSG:3879"

REM Deactivate conda environment
call conda deactivate

REM Wait for user input before closing terminal
pause

Replace run_inp2gis.bat

Replace run_inp2gis.bat


git tf configure https://davidpodhola.visualstudio.com/DefaultCollection $/Sync.Today/Main/2015

configure with TFS

configure with TFS


@echo off

:: http://stackoverflow.com/questions/2952401/remove-trailing-slash-from-batch-file-input
set current_dir=%~dp0
IF %current_dir:~-1%==\ SET current_dir=%current_dir:~0,-1%

:: Tell Bundler where the Gemfile and gems are.
set BUNDLE_GEMFILE=%current_dir%\vendor\Gemfile
set BUNDLE_IGNORE_CONFIG=

:: Run the actual app using the bundled Ruby interpreter, with Bundler activated.
@"%current_dir%\ruby\bin\ruby.bat" -rbundler/setup "%current_dir%\app\lib\bootstrap.rb" %*

set current_dir=

@echo off

:: http://stackoverflow.com/questions/2952401/remove-trailing-slash-from-batch-file-input
set current_dir=%~dp0
IF %current_dir:~-1%==\ SET current_dir=%current_dir:~0,-1%

:: Tell Bundler where the Gemfile and gems are.
set BUNDLE_GEMFILE=%current_dir%\vendor\Gemfile
set BUNDLE_IGNORE_CONFIG=

:: Run the actual app using the bundled Ruby interpreter, with Bundler activated.
@"%current_dir%\ruby\bin\ruby.bat" -W0 -rbundler/setup "%current_dir%\app\lib\bootstrap.rb" %*

set current_dir=

Hide warnings in packaged tools for Windows


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

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

disable exit for win

disable exit for win


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

:check_java
if "%JAVA_HOME%"=="" goto no_jdk
:check_wks
if "%WORKSPACE%"=="" goto no_wks
:check_ant
if "%ANT_HOME%"=="" goto no_ant
:check_xmlbeans
if "%XMLBEANS_HOME%"=="" goto no_xmlbeans

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

set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar;%WORKSPACE%\Tools\bin\FrameworkWizard.jar;.

@REM Build SurfaceArea first
call "ant" -f %WORKSPACE%\Tools\build.xml SurfaceArea

@REM Build ModuleEditor
call "ant" -f %WORKSPACE%\Tools\Source\FrameworkWizard\build.xml

@REM Run ModuleEditor
call "java" org.tianocore.frameworkwizard.FrameworkWizardUI

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 on

:check_java
if "%JAVA_HOME%"=="" goto no_jdk
:check_wks
if "%WORKSPACE%"=="" goto no_wks
:check_ant
if "%ANT_HOME%"=="" goto no_ant
:check_xmlbeans
if "%XMLBEANS_HOME%"=="" goto no_xmlbeans

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

set CLASSPATH=%CLASSPATH%;%WORKSPACE%\Tools\Jars\SurfaceArea.jar;%XMLBEANS_HOME%\lib\jsr173_1.0_api.jar;%XMLBEANS_HOME%\lib\xbean.jar;%XMLBEANS_HOME%\lib\xbean_xpath.jar;%XMLBEANS_HOME%\lib\xmlpublic.jar;%XMLBEANS_HOME%\lib\saxon8.jar;%XMLBEANS_HOME%\lib\resolver.jar;%WORKSPACE%\Tools\bin\FrameworkWizard.jar;.

@REM Build SurfaceArea first
call "ant" -f %WORKSPACE%\Tools\build.xml SurfaceArea

@REM Build Framework Wizard
call "ant" -f %WORKSPACE%\Tools\Source\FrameworkWizard\build.xml

@REM Run Framework Wizard
call "java" org.tianocore.frameworkwizard.FrameworkWizardUI

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

Fix a typo error

Fix a typo error

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


echo ON

pip install ipdb
pip install ipdbplugin
pip install sphinxcontrib-blockdiag

echo OFF

echo ON

pip install ipdb
pip install ipdbplugin
pip install sphinxcontrib-blockdiag
pip install chios

echo OFF

Update bld.bat

Update bld.bat


@echo off

rem Top-level directory for this product
set TOPDIR=%~dp0..
call %TOPDIR%\bin\sparkling-env.cmd
rem Verify there is Spark installation
call %LIBSW% checkSparkHome
call %LIBSW% checkSparkVersion
rem end of checking Sparkling environment

rem Default memory for shell
set DRIVER_MEMORY=3G
if not defined DRIVER_MEMORY (
SET DRIVER_MEMORY=%DEFAULT_DRIVER_MEMORY%
)
rem Default MASTER
if not defined MASTER (
SET MASTER=%DEFAULT_MASTER%
)

call %LIBSW% :banner

SET SPARK_OPTS=--driver-memory !DRIVER_MEMORY! --conf spark.driver.extraJavaOptions="-XX:MaxPermSize=384m"
SET SPARK_OPT_JARS=--jars !TOPDIR!/assembly/build/libs/!FAT_JAR!
cd %TOPDIR%
call !SPARK_HOME!/bin/spark-shell2.cmd !SPARK_OPT_JARS! !SPARK_OPTS! %*

exit /b %ERRORLEVEL%
rem end of main script

@echo off

rem Top-level directory for this product
set TOPDIR=%~dp0..
call %TOPDIR%\bin\sparkling-env.cmd
rem Verify there is Spark installation
call %LIBSW% checkSparkHome
call %LIBSW% checkSparkVersion
rem end of checking Sparkling environment

rem Default memory for shell
set DRIVER_MEMORY=3G
if not defined DRIVER_MEMORY (
SET DRIVER_MEMORY=%DEFAULT_DRIVER_MEMORY%
)
rem Default MASTER
if not defined MASTER (
SET MASTER=%DEFAULT_MASTER%
)

call %LIBSW% :banner

SET SW_FAT_JAR_FILE=!TOPDIR!/assembly/build/libs/!FAT_JAR!
SET SPARK_OPTS=--driver-memory !DRIVER_MEMORY! --conf spark.driver.extraJavaOptions="-XX:MaxPermSize=384m"
rem Because of SPARK-18648 we need to put assembly also on driver/executor class paths
SET SPARK_OPT_JARS=--jars !SW_FAT_JAR_FILE! --conf spark.driver.extraClassPath=!SW_FAT_JAR_FILE! --conf spark.executor.extraClassPath=!SW_FAT_JAR_FILE!
cd %TOPDIR%
call !SPARK_HOME!/bin/spark-shell2.cmd !SPARK_OPT_JARS! !SPARK_OPTS! %*

exit /b %ERRORLEVEL%
rem end of main script

Fix Windows Sparkling Shell

[SW-349] Fix Windows Sparkling Shell

The bug https://issues.apache.org/jira/browse/SPARK-18648 is fixed
by this commit.


@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------
if '%1' == 'start' C:\Windows\system32\net.exe start ioBroker
if '%1' == 'stop' C:\Windows\system32\net.exe stop ioBroker
if '%1' == '' (
	C:\Windows\system32\net.exe stop ioBroker
	C:\Windows\system32\net.exe start ioBroker
)
if '%1' == 'restart' (
	C:\Windows\system32\net.exe stop ioBroker
	C:\Windows\system32\net.exe start ioBroker
)

@echo off

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params = %*:"=""
    echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"
    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"
:--------------------------------------
if '%1' == 'start' %WINDIR%\system32\net.exe start ioBroker
if '%1' == 'stop' %WINDIR%\system32\net.exe stop ioBroker
if '%1' == '' (
	%WINDIR%\system32\net.exe stop ioBroker
	%WINDIR%\system32\net.exe start ioBroker
)
if '%1' == 'restart' (
	%WINDIR%\system32\net.exe stop ioBroker
	%WINDIR%\system32\net.exe start ioBroker
)

Update service_ioBroker.bat

Update service_ioBroker.bat

Replace c:\windows with %WINDIR%


@REM ============================================================
@REM Copy music files from original KaM TPR game
@REM ============================================================
@REM take music from previous KMR version for now
@REM xcopy "%KaMOrigDir%"\data\sfx\songs\*.sng "%kam_folder%"\Music\*.mp2 /y /r /s

REM ============================================================
REM Copy data folders
REM ============================================================
@REM Copy all data files, except sfx, which should be copied from KMRPrevVersionDir
xcopy ..\data\defines "%kam_folder%"\data\defines\ /y /r /s
xcopy ..\data\gfx "%kam_folder%"\data\gfx\ /y /r /s
xcopy ..\data\Sprites "%kam_folder%"\data\Sprites\ /y /r /s
xcopy ..\data\text "%kam_folder%"\data\text\ /y /r /s
xcopy ..\data\locales.txt "%kam_folder%"\data\locales.txt* /y /r /i
xcopy ..\Campaigns "%kam_folder%"\Campaigns\ /y /r /s
xcopy ..\Maps "%kam_folder%"\Maps\ /y /r /s /exclude:excluded_test_maps.txt
xcopy ..\MapsMP "%kam_folder%"\MapsMP\ /y /r /s
xcopy ..\Tutorials "%kam_folder%"\Tutorials\ /y /r /s
xcopy ..\Docs\Readme "%kam_folder%"\ /y /r /s
xcopy ..\Sounds "%kam_folder%"\Sounds\ /y /r /s
xcopy ..\Music "%kam_folder%"\Music\ /y /r /s
xcopy ..\lib "%kam_folder%"\lib\ /y /r /s

REM ============================================================
REM Copy video files
REM ============================================================
xcopy "%KMRVideosDir%" "%kam_folder%" /y /r /s

REM ============================================================
REM Copy files from KMRPrevVersionDir
REM ============================================================
xcopy "%KMRPrevVersionDir%"\data\sfx "%kam_folder%"\data\sfx\ /y /r /s
xcopy "%KMRPrevVersionDir%"\Music "%kam_folder%"\Music\ /y /r /s
xcopy "%KMRPrevVersionDir%"\Campaigns\*.mp3 "%kam_folder%"\Campaigns\ /y /r /s

@REM ============================================================
@REM Erase source-code files from copied "data\"
@REM ============================================================
@REM erase /F /Q /S .\"%kam_folder%"\*.inc

REM ============================================================
REM Copy selected executable files
REM ============================================================
@REM Adding * to the file name supresses the "Is it a file or a folder" query
@REM xcopy ..\data.pack .\"%kam_folder%"\data.pack* /y /r /i
xcopy ..\KaM_Remake.exe "%kam_folder%"\KaM_Remake.exe* /y /r /i
xcopy ..\KM_TextIDs.inc "%kam_folder%"\KM_TextIDs.inc* /y /r /i
xcopy ..\libzplay.dll "%kam_folder%"\libzplay.dll* /y /r /i
xcopy ..\ogg.dll "%kam_folder%"\ogg.dll* /y /r /i
xcopy ..\vorbis.dll "%kam_folder%"\vorbis.dll* /y /r /i
xcopy ..\vorbisfile.dll "%kam_folder%"\vorbisfile.dll* /y /r /i
xcopy "%KMRPrevVersionDir%"\oalinst.exe "%kam_folder%"\oalinst.exe* /y /r /i

mkdir "%kam_folder%"\Utils

@REM copy ScriptingEditor
if %IncludeScriptingEditor%==True (
xcopy "%ScriptingEditorDir%"\bin\ScriptingEditor.exe* "%kam_folder%"\ScriptingEditor /y /r /i
xcopy "%ScriptingEditorDir%"\bin\SE_Data_KMR "%kam_folder%"\ScriptingEditor\SE_Data\ /y /r /s
xcopy "%ScriptingEditorDir%"\bin\SE_Data\Examples "%kam_folder%"\ScriptingEditor\SE_Data\Examples\ /y /r /s
xcopy "..\Utils\ScriptValidator\ScriptValidator.exe" "%kam_folder%"\Utils\ScriptingEditor\SE_Data\ScriptValidator.exe* /y /r /i
@REM no need for OLD folder there
rmdir /S /Q "%kam_folder%"\bin\SE_Data\OLD
rmdir /S /Q "%kam_folder%"\bin\SE_Data\Logs
)

@REM copy utility applications exe files
xcopy "..\Utils\Campaign builder\KaM_Remake_Settings_ini_readme.txt" "%kam_folder%"\Utils\KaM_Remake_Settings_ini_readme.txt* /y /r /i
xcopy "..\Utils\Campaign builder\CampaignBuilder.exe" "%kam_folder%"\Utils\CampaignBuilder.exe* /y /r /i
xcopy "..\Utils\DedicatedServer\KaM_DedicatedServer.exe" "%kam_folder%"\Utils\KaM_Remake_Server_win32.exe* /y /r /i
xcopy "..\Utils\DedicatedServerGUI\KaM_DedicatedServerGUI.exe" "%kam_folder%"\Utils\KaM_Remake_ServerGUI_win32.exe* /y /r /i
xcopy "..\Utils\ScriptValidator\ScriptValidator.exe" "%kam_folder%"\Utils\ScriptValidator.exe* /y /r /i
xcopy "..\Utils\TranslationManager\TranslationManager.exe" "%kam_folder%"\Utils\TranslationManager.exe* /y /r /i
@REM copy linux dedicated servers
xcopy "..\Utils\DedicatedServer\KaM_Remake_Server_linux_x86" "%kam_folder%"\Utils\KaM_Remake_Server_linux_x86* /y /r /i
xcopy "..\Utils\DedicatedServer\KaM_Remake_Server_linux_x86_64" "%kam_folder%"\Utils\KaM_Remake_Server_linux_x86_64* /y /r /i

@REM ============================================================
@REM Copy music files from original KaM TPR game
@REM ============================================================
@REM take music from previous KMR version for now
@REM xcopy "%KaMOrigDir%"\data\sfx\songs\*.sng "%kam_folder%"\Music\*.mp2 /y /r /s

REM ============================================================
REM Copy data folders
REM ============================================================
@REM Copy all data files, except sfx, which should be copied from KMRPrevVersionDir
xcopy ..\data\defines "%kam_folder%"\data\defines\ /y /r /s
xcopy ..\data\gfx "%kam_folder%"\data\gfx\ /y /r /s
xcopy ..\data\Sprites "%kam_folder%"\data\Sprites\ /y /r /s
xcopy ..\data\text "%kam_folder%"\data\text\ /y /r /s
xcopy ..\data\locales.txt "%kam_folder%"\data\locales.txt* /y /r /i
xcopy ..\Campaigns "%kam_folder%"\Campaigns\ /y /r /s
xcopy ..\Maps "%kam_folder%"\Maps\ /y /r /s /exclude:excluded_test_maps.txt
xcopy ..\MapsMP "%kam_folder%"\MapsMP\ /y /r /s
xcopy ..\Tutorials "%kam_folder%"\Tutorials\ /y /r /s
xcopy ..\Docs\Readme "%kam_folder%"\ /y /r /s
xcopy ..\Sounds "%kam_folder%"\Sounds\ /y /r /s
xcopy ..\Music "%kam_folder%"\Music\ /y /r /s
xcopy ..\lib "%kam_folder%"\lib\ /y /r /s

REM ============================================================
REM Copy video files
REM ============================================================
xcopy "%KMRVideosDir%" "%kam_folder%" /y /r /s

REM ============================================================
REM Copy files from KMRPrevVersionDir
REM ============================================================
xcopy "%KMRPrevVersionDir%"\data\sfx "%kam_folder%"\data\sfx\ /y /r /s
xcopy "%KMRPrevVersionDir%"\Music "%kam_folder%"\Music\ /y /r /s
xcopy "%KMRPrevVersionDir%"\Campaigns\*.mp3 "%kam_folder%"\Campaigns\ /y /r /s

@REM ============================================================
@REM Erase source-code files from copied "data\"
@REM ============================================================
@REM erase /F /Q /S .\"%kam_folder%"\*.inc

REM ============================================================
REM Copy selected executable files
REM ============================================================
@REM Adding * to the file name supresses the "Is it a file or a folder" query
@REM xcopy ..\data.pack .\"%kam_folder%"\data.pack* /y /r /i
xcopy ..\KaM_Remake.exe "%kam_folder%"\KaM_Remake.exe* /y /r /i
xcopy ..\KM_TextIDs.inc "%kam_folder%"\KM_TextIDs.inc* /y /r /i
xcopy ..\libzplay.dll "%kam_folder%"\libzplay.dll* /y /r /i
xcopy ..\ogg.dll "%kam_folder%"\ogg.dll* /y /r /i
xcopy ..\vorbis.dll "%kam_folder%"\vorbis.dll* /y /r /i
xcopy ..\vorbisfile.dll "%kam_folder%"\vorbisfile.dll* /y /r /i
xcopy "%KMRPrevVersionDir%"\oalinst.exe "%kam_folder%"\oalinst.exe* /y /r /i

mkdir "%kam_folder%"\Utils

@REM copy ScriptingEditor
if %IncludeScriptingEditor%==True (
xcopy "%ScriptingEditorDir%"\bin\ScriptingEditor.exe* "%kam_folder%"\Utils\ScriptingEditor /y /r /i
xcopy "%ScriptingEditorDir%"\bin\SE_Data_KMR "%kam_folder%"\Utils\ScriptingEditor\SE_Data\ /y /r /s
xcopy "%ScriptingEditorDir%"\bin\SE_Data\Examples "%kam_folder%"\Utils\ScriptingEditor\SE_Data\Examples\ /y /r /s
xcopy "..\Utils\ScriptValidator\ScriptValidator.exe" "%kam_folder%"\Utils\ScriptingEditor\SE_Data\ScriptValidator.exe* /y /r /i
@REM no need for OLD folder there
rmdir /S /Q "%kam_folder%"\bin\SE_Data\OLD
rmdir /S /Q "%kam_folder%"\bin\SE_Data\Logs
)

@REM copy utility applications exe files
xcopy "..\Utils\Campaign builder\KaM_Remake_Settings_ini_readme.txt" "%kam_folder%"\Utils\KaM_Remake_Settings_ini_readme.txt* /y /r /i
xcopy "..\Utils\Campaign builder\CampaignBuilder.exe" "%kam_folder%"\Utils\CampaignBuilder.exe* /y /r /i
xcopy "..\Utils\DedicatedServer\KaM_DedicatedServer.exe" "%kam_folder%"\Utils\KaM_Remake_Server_win32.exe* /y /r /i
xcopy "..\Utils\DedicatedServerGUI\KaM_DedicatedServerGUI.exe" "%kam_folder%"\Utils\KaM_Remake_ServerGUI_win32.exe* /y /r /i
xcopy "..\Utils\ScriptValidator\ScriptValidator.exe" "%kam_folder%"\Utils\ScriptValidator.exe* /y /r /i
xcopy "..\Utils\TranslationManager\TranslationManager.exe" "%kam_folder%"\Utils\TranslationManager.exe* /y /r /i
@REM copy linux dedicated servers
xcopy "..\Utils\DedicatedServer\KaM_Remake_Server_linux_x86" "%kam_folder%"\Utils\KaM_Remake_Server_linux_x86* /y /r /i
xcopy "..\Utils\DedicatedServer\KaM_Remake_Server_linux_x86_64" "%kam_folder%"\Utils\KaM_Remake_Server_linux_x86_64* /y /r /i

fix bat build script

fix bat build script


set QT=%1

set CETEST=%QT%\bin\cetest.exe
set CETEST_ARGS=-cache %QT%\.qmake.cache -libpath \Windows -f

%CETEST% %CETEST_ARGS% tests\auto\qmallocpool\qmallocpool.pro
%CETEST% %CETEST_ARGS% tests\auto\qpacket\qpacket.pro
%CETEST% %CETEST_ARGS% tests\auto\qpacketprotocol\qpacketprotocol.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespace\qvaluespace.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespaceprovider\qvaluespaceprovider.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber\tst_qvaluespacesubscriber.pro
%CETEST% %CETEST_ARGS% tests\auto\qvaluespacesubscriber\tst_qvaluespacesubscriber_oop\tst_qvaluespacesubscriber_oop.pro
%CETEST% %CETEST_ARGS% tests\auto\qsystemreadwritelock\qsystemreadwritelock\test\test.pro
%CETEST% %CETEST_ARGS% tests\auto\qsystemreadwritelock_oop\qsystemreadwritelock_oop\test\test.pro

Add script to run unit tests on Windows CE.


@echo off
@setlocal

dotnet restore ..\Mallos.Input.sln
dotnet build -c Release ..\Mallos.Input.sln

dotnet pack -c Release ..\src\Mallos.Input\Mallos.Input.csproj
dotnet pack -c Release ..\src\Mallos.Input.Veldrid.SDL2\Mallos.Input.Veldrid.SDL2.csproj
dotnet pack -c Release ..\src\Mallos.Input.Debug.ImGuiNET\Mallos.Input.Debug.ImGuiNET.csproj

Update build-packages.cmd

Update build-packages.cmd


@ECHO OFF

REM $Id$

if "%JAVA_HOME%" == "" goto noJavaHome

set TMP_BARCODE4J_HOME=
rem %~dp0 is the expanded pathname of the current script under NT
if "%OS%"=="Windows_NT" set TMP_BARCODE4J_HOME=%~dp0

set TMP_LIBDIR=%TMP_BARCODE4J_HOME%lib
if exist %TMP_BARCODE4J_HOME%build\barcode4j.jar goto srcdist
:bindist
set TMP_CLASSPATH=%TMP_BARCODE4J_HOME%barcode4j.jar
goto skip1
:srcdist
set TMP_CLASSPATH=%TMP_BARCODE4J_HOME%build\barcode4j.jar
:skip1
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\xml-apis-1.3.04.jar
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\xercesImpl-2.9.0.jar
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\xalan-2.7.0.jar
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\serializer-2.7.0.jar
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\avalon-framework-4.2.0.jar
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\commons-cli-1.0.jar
REM ECHO %TMP_CLASSPATH%

if "%OS%"=="Windows_NT" goto WinNT

:Win98
"%JAVA_HOME%\bin\java" -cp %TMP_CLASSPATH% org.krysalis.barcode4j.cli.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO exit

:WinNT
"%JAVA_HOME%\bin\java" -cp %TMP_CLASSPATH% org.krysalis.barcode4j.cli.Main %*
GOTO exit

:noJavaHome
ECHO Please set the JAVA_HOME environment variable.

:exit

REM @ECHO OFF

REM $Id$

if "%JAVA_HOME%" == "" goto noJavaHome

set TMP_BARCODE4J_HOME=
rem %~dp0 is the expanded pathname of the current script under NT
if "%OS%"=="Windows_NT" set TMP_BARCODE4J_HOME=%~dp0

set TMP_LIBDIR=%TMP_BARCODE4J_HOME%lib
if exist "%TMP_BARCODE4J_HOME%build\barcode4j.jar" goto srcdist
:bindist
set TMP_CLASSPATH=%TMP_BARCODE4J_HOME%barcode4j.jar
goto skip1
:srcdist
set TMP_CLASSPATH=%TMP_BARCODE4J_HOME%build\barcode4j.jar
:skip1
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\avalon-framework-4.2.0.jar
set TMP_CLASSPATH=%TMP_CLASSPATH%;%TMP_LIBDIR%\commons-cli-1.0.jar
REM ECHO %TMP_CLASSPATH%

if "%OS%"=="Windows_NT" goto WinNT

:Win98
"%JAVA_HOME%\bin\java" -cp "%TMP_CLASSPATH%" org.krysalis.barcode4j.cli.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO exit

:WinNT
"%JAVA_HOME%\bin\java" -cp "%TMP_CLASSPATH%" org.krysalis.barcode4j.cli.Main %*
GOTO exit

:noJavaHome
ECHO Please set the JAVA_HOME environment variable.

:exit

Fix problems with spaces in paths.

Fix problems with spaces in paths.


@echo off
:: check input arguments
if %1.==. (
  echo "No arch"
  call :Help
  goto :eof
)

if /I "%1"=="help" (
  call :Help
  goto :eof
)

if /I "%1"=="/help" (
  call :Help
  goto :eof
)

if /I "%1"=="-help" (
  call :Help
  goto :eof
)

set ARCH=%1

if %2.==. (
  set TARGET=10.0.17763.0
) else (
  set TARGET=%2
)

if %3.==. (
  set VCVER=14.0
) else (
  set VCVER=%3
)

:: Setup Python
set PATH=%PATH%;C:\tools\Python35-%ARCH%
set PATH=%PATH%;C:\tools\Python35-%ARCH%\Scripts

:: Setup compiler
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% %TARGET% -vcvars_ver=%VCVER%

:: Setup Clcache
set CLCACHE_DIR=C:\clcache\%ARCH%-%TARGET%-%VCVER%
set CLCACHE_HARDLINK=1
set CLCACHE_SERVER=1
set CLCACHE_CL=
for /F "delims=" %%a in ('where cl.exe') do @if defined CLCACHE_CL (break ) else (set CLCACHE_CL=%%a)

echo CL path: "%CLCACHE_CL%"

set CC=clcache
set CXX=clcache

:: if we need to change cache max size: clcache -M <size-in-bytes>

goto :eof

:Help
setlocal
echo "Usage: dev_env.bat <compiler_arch>  [<target-os>  [<vc_version>]]"
echo "  <compiler_arch> : 'x86' | 'x64'"
echo "  <target-os>     : '8.1' | '10.0.17763.0' (default)"
echo "  <vc_version>    :"
echo "    '14.20' (i.e. VS 2019)"
echo "    '14.16' (i.e. VS 2017)"
echo "    '14.0'  (i.e. VS 2015) (default)"
endlocal

@echo off
:: check input arguments
if %1.==. (
  echo "No arch"
  call :Help
  goto :eof
)

if /I "%1"=="help" (
  call :Help
  goto :eof
)

if /I "%1"=="/help" (
  call :Help
  goto :eof
)

if /I "%1"=="-help" (
  call :Help
  goto :eof
)

set ARCH=%1

if %2.==. (
  set TARGET=10.0.17763.0
) else (
  set TARGET=%2
)

if %3.==. (
  set VCVER=14.0
) else (
  set VCVER=%3
)

:: Setup Python
set PATH=%PATH%;C:\tools\Python35-%ARCH%
set PATH=%PATH%;C:\tools\Python35-%ARCH%\Scripts

:: Setup compiler
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% %TARGET% -vcvars_ver=%VCVER%

:: Setup Clcache
set CLCACHE_DIR=C:\clcache\%ARCH%-%TARGET%-%VCVER%
set CLCACHE_HARDLINK=1
set CLCACHE_SERVER=1
set CLCACHE_CL=
for /F "delims=" %%a in ('where cl.exe') do @if defined CLCACHE_CL (break ) else (set CLCACHE_CL=%%a)

echo CL path: "%CLCACHE_CL%"

set CC=clcache
set CXX=clcache

:: if we need to change cache max size: clcache -M <size-in-bytes>

:: setup path to perl, but add it last ... (there is a libstdc++.dll in that folder...)
set PATH=%PATH%;C:\tools\perl\perl\bin

goto :eof

:Help
setlocal
echo "Usage: dev_env.bat <compiler_arch>  [<target-os>  [<vc_version>]]"
echo "  <compiler_arch> : 'x86' | 'x64'"
echo "  <target-os>     : '8.1' | '10.0.17763.0' (default)"
echo "  <vc_version>    :"
echo "    '14.20' (i.e. VS 2019)"
echo "    '14.16' (i.e. VS 2017)"
echo "    '14.0'  (i.e. VS 2015) (default)"
endlocal

fix PATH to find perl

CI: fix PATH to find perl


@echo off
setlocal

pushd %~dp0\..

set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5%

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

	echo "Running integration tests out of sources."
) else (
	:: Run from a built: need to compile all test extensions
	call yarn gulp compile-extension:vscode-api-tests
	call yarn gulp compile-extension:vscode-colorize-tests
	call yarn gulp compile-extension:markdown-language-features
	call yarn gulp compile-extension:emmet
	call yarn gulp compile-extension:css-language-features-server
	call yarn gulp compile-extension:html-language-features-server
	call yarn gulp compile-extension:json-language-features-server

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

	echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build."
)

:: Integration & performance tests in AMD
call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
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 --disable-crash-reporter --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 --disable-crash-reporter --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 --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

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

:: Tests in commonJS (HTML, CSS, JSON language server tests...)
call .\scripts\node-electron.bat .\node_modules\mocha\bin\_mocha .\extensions\*\server\out\test\**\*.test.js
if %errorlevel% neq 0 exit /b %errorlevel%

if exist ".\resources\server\test\test-remote-integration.bat" (
	call .\resources\server\test\test-remote-integration.bat
)

rmdir /s /q %VSCODEUSERDATADIR%

popd

endlocal

@echo off
setlocal

pushd %~dp0\..

set VSCODEUSERDATADIR=%TMP%\vscodeuserfolder-%RANDOM%-%TIME:~6,5%

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

	echo "Running integration tests out of sources."
) else (
	:: Run from a built: need to compile all test extensions
	call yarn gulp compile-extension:vscode-api-tests
	call yarn gulp compile-extension:vscode-colorize-tests
	call yarn gulp compile-extension:markdown-language-features
	call yarn gulp compile-extension:emmet
	call yarn gulp compile-extension:css-language-features-server
	call yarn gulp compile-extension:html-language-features-server
	call yarn gulp compile-extension:json-language-features-server

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

	echo "Running integration tests with '%INTEGRATION_TEST_ELECTRON_PATH%' as build."
)

:: Integration & performance tests in AMD
call .\scripts\test.bat --runGlob **\*.integrationTest.js %*
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 --disable-crash-reporter --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 --disable-crash-reporter --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 --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR%
if %errorlevel% neq 0 exit /b %errorlevel%

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

call "%INTEGRATION_TEST_ELECTRON_PATH%" %TMP%\git-%RANDOM%-%TIME:~6,5% --extensionDevelopmentPath=%~dp0\..\extensions\git --extensionTestsPath=%~dp0\..\extensions\git\out\test --disable-telemetry --disable-crash-reporter --disable-updates --disable-extensions --user-data-dir=%VSCODEUSERDATADIR% .
if %errorlevel% neq 0 exit /b %errorlevel%

:: Tests in commonJS (HTML, CSS, JSON language server tests...)
call .\scripts\node-electron.bat .\node_modules\mocha\bin\_mocha .\extensions\*\server\out\test\**\*.test.js
if %errorlevel% neq 0 exit /b %errorlevel%

if exist ".\resources\server\test\test-remote-integration.bat" (
	call .\resources\server\test\test-remote-integration.bat
)

rmdir /s /q %VSCODEUSERDATADIR%

popd

endlocal

add git to windows integration tests

add git to windows integration tests


@rem Makes a build directory of the viewer, so that you can run the NSIS install script
@rem You should have a directory ..\viewerbuilddlls which has release versions of
@rem all dependency dlls, including Qt core/ui/network/webkit/phonon dll's, and also VS2008
@rem redistributable (vcredist_x86.exe)
@echo off
rmdir build /S /Q
md build
copy readme.txt build
xcopy bin\*.* build /S /C
del build\data\configuration\*.xml
rmdir build\testing /S /Q
del build\*.dll
del build\viewerd.exe
del build\modules\core\*d.dll
xcopy ..\viewerbuilddlls\*.* build /S /C
del build\pymodules\*.pyc
del build\pymodules\apitest\*.pyc
del build\pymodules\circuits\*.pyc
del build\pymodules\communication\*.pyc
del build\pymodules\core\*.pyc
del build\pymodules\usr\*.pyc

@rem Makes a build directory of the viewer, so that you can run the NSIS install script
@rem You should have a directory ..\viewerbuilddlls which has release versions of
@rem all dependency dlls, and also VS2008 redistributable (vcredist_x86.exe)
@echo off
rmdir build /S /Q
md build
copy readme.txt build
xcopy bin\*.* build /S /C /Y
del build\*.dll
del build\viewerd.exe
del build\modules\core\*d.dll
xcopy ..\viewerbuilddlls\*.* build /S /C /Y
del build\pymodules\*.pyc
del build\pymodules\apitest\*.pyc
del build\pymodules\circuits\*.pyc
del build\pymodules\circuits\core\*.pyc
del build\pymodules\circuits\net\*.pyc
del build\pymodules\circuits\tools\*.pyc
del build\pymodules\circuits\web\*.pyc
del build\pymodules\core\*.pyc
del build\pymodules\editgui\*.pyc
del build\pymodules\lib\*.pyc
del build\pymodules\lib\webdav\*.pyc
del build\pymodules\lib\webdav\acp\*.pyc
del build\pymodules\usr\*.pyc
del build\pymodules\webdavinventory\*.pyc
del build\pymodules\webserver\*.pyc
cd build\data
rmdir configuration /S /Q
mkdir configuration
cd ..\..

Delete .pyc files when making build.
Make sure that data/configuration directory exists in the build.

git-svn-id: 65dd0ccd495961f396d5302e5521154b071f0302@1617 5b2332b8-efa3-11de-8684-7d64432d61a3


@echo off
RMDIR ..\packages\psake.4.3.2 /s /q
SET EnableNuGetPackageRestore=true
.nuget\NuGet.exe install .nuget\packages.config -OutputDirectory ..\packages
.nuget\NuGet.exe restore ..\FileHelpers.sln
cd ..
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& {Import-Module '.\packages\psake.*\tools\psake.psm1'; invoke-psake .\Build\default.ps1 docs; if ($LastExitCode -ne 0) {write-host "ERROR: $LastExitCode" -fore RED; exit $lastexitcode} }"
cd Build
adddocs.bat

@echo off
RMDIR ..\packages\psake.4.8.0 /s /q
SET EnableNuGetPackageRestore=true
.nuget\NuGet.exe install .nuget\packages.config -OutputDirectory ..\packages
.nuget\NuGet.exe restore ..\FileHelpers.sln
cd ..
powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& {Import-Module '.\packages\psake.*\tools\psake.psm1'; invoke-psake .\Build\default.ps1 docs; if ($LastExitCode -ne 0) {write-host "ERROR: $LastExitCode" -fore RED; exit $lastexitcode} }"
cd Build
adddocs.bat

Update BuildDoc.bat

Update BuildDoc.bat

Fix Psake Path