@echo off
rem #------------------------------------------------------------------------------
rem # Copyright 2015 Esri
rem # Licensed under the Apache License, Version 2.0 (the "License");
rem # you may not use this file except in compliance with the License.
rem # You may obtain a copy of the License at
rem #
rem #   http://www.apache.org/licenses/LICENSE-2.0
rem #
rem # Unless required by applicable law or agreed to in writing, software
rem # distributed under the License is distributed on an "AS IS" BASIS,
rem # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rem # See the License for the specific language governing permissions and
rem # limitations under the License.
rem #==============================================================================
rem # Name:          MessageSimulator.bat
rem #
rem # Purpose:       Enables and run the OS Schechuled Task "MessageSimulator"
rem #
rem #==============================================================================
set ops_scriptName=MessageSimulator.bat
set ops_ChkErrLevelFile=%~dp0..\..\SupportFiles\BatchFiles\CheckErrorLevel.bat

set ops_taskName=MessageSimulator

set sectionBreak===================================================================================

REM ---------------------------------------------------------------------
REM Check if command prompt is running in elevated permissions mode
REM (i.e. "run as administrator)
REM ---------------------------------------------------------------------
echo.
echo --Checking if Windows Command window is running as administrator
echo   by querying LOCAL SERVICE user registry entries...
echo.
reg query HKU\S-1-5-19
if "%ERRORLEVEL%"=="1" (
    echo.
    echo **********************************************************
    echo **  ERROR:
    echo **  You are _NOT_ running Windows Command window
    echo **  in elevated administrator mode ^(i.e., the CMD.exe
    echo **  must be "Run as administrator"^).
    echo **  Exiting %ops_scriptName%.
    echo **********************************************************
    echo.
    goto end
)
cls

echo.
echo %sectionBreak%
echo Run %ops_taskName% scheduled task

REM ---------------------------------------------------------------------
REM Enable Windows Scheduled Task
REM ---------------------------------------------------------------------
echo.
echo.
echo --Enable Windows Scheduled Task for %ops_taskName%...
echo.
set execute=SCHTASKS /Change /TN %ops_taskName% /ENABLE
echo %execute%
echo.
%execute%
set error=%ERRORLEVEL%
Call %ops_ChkErrLevelFile% %ERRORLEVEL%
PING 127.0.0.1 -n 3 > nul

REM If enable failed end script
if "%error%"=="1" (
	goto end
)

REM ---------------------------------------------------------------------
REM Run Windows Scheduled Task
REM ---------------------------------------------------------------------
echo.
echo.
echo --Run the %ops_taskName% task...
echo.
set execute=SCHTASKS /Run /TN %ops_taskName%
echo %execute%
echo.
%execute%
Call %ops_ChkErrLevelFile% %ERRORLEVEL%
PING 127.0.0.1 -n 3 > nul

:end
REM ---------------------------------------------------------------------
REM End Block
REM ---------------------------------------------------------------------
@echo on

Fix to issue #912

Fix to issue #912

Create batch file to enable and run the Message Simulator.


@echo off
@REM Decide how to startup depending on the version of windows

@REM -- Win98ME
if NOT "%OS%"=="Windows_NT" goto Win9xArg

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

@REM -- Regular WinNT shell
set MAVEN_CMD_LINE_ARGS=%*
goto endInit

@REM The 4NT Shell from jp software
:4NTArgs
set MAVEN_CMD_LINE_ARGS=%$
goto endInit

:Win9xArg
@REM Slurp the command line arguments.  This loop allows for an unlimited number
@REM of agruments (up to the command line limit, anyway).
set MAVEN_CMD_LINE_ARGS=
:Win9xApp
if %1a==a goto endInit
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
shift
goto Win9xApp

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

SET INCLUDES=continuum-api/pom.xml,continuum-cc/pom.xml,continuum-core/pom.xml,continuum-model/pom.xml,continuum-notifiers/pom.xml,continuum-notifiers/continuum-notifier-irc/pom.xml,continuum-notifiers/continuum-notifier-jabber/pom.xml,continuum-notifiers/continuum-notifier-msn/pom.xml,continuum-web/pom.xml,continuum-xmlrpc/pom.xml

call m2 -N install %MAVEN_CMD_LINE_ARGS%
cd continuum-notifiers
call m2 -N install %MAVEN_CMD_LINE_ARGS%
cd ..
call m2 -r -Dmaven.reactor.includes=*/pom.xml clean:clean %MAVEN_CMD_LINE_ARGS%
call m2 -r -Dmaven.reactor.includes="%INCLUDES%" install %MAVEN_CMD_LINE_ARGS%
cd continuum-plexus-application
call build.bat %MAVEN_CMD_LINE_ARGS%
cd ..

@echo off
@REM Decide how to startup depending on the version of windows

@REM -- Win98ME
if NOT "%OS%"=="Windows_NT" goto Win9xArg

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

@REM -- Regular WinNT shell
set MAVEN_CMD_LINE_ARGS=%*
goto endInit

@REM The 4NT Shell from jp software
:4NTArgs
set MAVEN_CMD_LINE_ARGS=%$
goto endInit

:Win9xArg
@REM Slurp the command line arguments.  This loop allows for an unlimited number
@REM of agruments (up to the command line limit, anyway).
set MAVEN_CMD_LINE_ARGS=
:Win9xApp
if %1a==a goto endInit
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
shift
goto Win9xApp

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

SET INCLUDES=continuum-api/pom.xml,continuum-cc/pom.xml,continuum-core/pom.xml,continuum-model/pom.xml,continuum-notifiers/pom.xml,continuum-notifiers/continuum-notifier-irc/pom.xml,continuum-notifiers/continuum-notifier-jabber/pom.xml,continuum-notifiers/continuum-notifier-msn/pom.xml,continuum-web/pom.xml,continuum-xfire/pom.xml,continuum-xmlrpc/pom.xml

call m2 -N install %MAVEN_CMD_LINE_ARGS%
cd continuum-notifiers
call m2 -N install %MAVEN_CMD_LINE_ARGS%
cd ..
call m2 -r -Dmaven.reactor.includes=*/pom.xml clean:clean %MAVEN_CMD_LINE_ARGS%
call m2 -r -Dmaven.reactor.includes="%INCLUDES%" install %MAVEN_CMD_LINE_ARGS%
cd continuum-plexus-application
call build.bat %MAVEN_CMD_LINE_ARGS%
cd ..

add continuum-xfire

add continuum-xfire

git-svn-id: 1d22bf2b43db35b985fe5d7437c243537c14eeaa@210095 13f79535-47bb-0310-9956-ffa450edef68


set SDL2DIR=C:\SDL2-2.0.3
mkdir build
cd build
cmake ..

set SDL2DIR=C:\SDL2-2.0.3
mkdir build
cd build
:: Call me with "Visual Studio 12 2013" or "Visual Studio 12 2013 Win64"
cmake .. -G%1

Update build.bat

Update build.bat

Allow passing in the generator for 32/64bit builds


@powershell -NoProfile -ExecutionPolicy unrestricted -Command "&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))}"
cmd /c %userprofile%\.dnx\bin\dnvm install latest
pushd %cd%
cd %userprofile%\.dnx\runtimes\dnx*\bin
set path=%path%;%cd%
popd

cmd /c dnu restore
cmd /c dnu build src\Accounts.Web

Adjust project folder path

Adjust project folder path


@echo off
:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows

IF "%DISTUTILS_USE_SDK%"=="1" (
    ECHO Configuring environment to build with MSVC on a 64bit architecture
    ECHO Using Windows SDK 7.1
    "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
    SET MSSdk=1
    REM Need the following to allow tox to see the SDK compiler
    SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB
) ELSE (
    ECHO Using default MSVC build environment
)

CALL %*

:: To build extensions for 64 bit Python 3, we need to configure environment
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
::
:: To build extensions for 64 bit Python 2, we need to configure environment
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
::
:: 32 bit builds do not require specific environment configurations.
::
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
:: cmd interpreter, at least for (SDK v7.0)
::
:: More details at:
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
:: http://stackoverflow.com/a/13751649/163740
::
:: Author: Olivier Grisel
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
@ECHO OFF

SET COMMAND_TO_RUN=%*
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows

SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
IF %MAJOR_PYTHON_VERSION% == "2" (
    SET WINDOWS_SDK_VERSION="v7.0"
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
    SET WINDOWS_SDK_VERSION="v7.1"
) ELSE (
    ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
    EXIT 1
)

IF "%PYTHON_ARCH%"=="64" (
    ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
    SET DISTUTILS_USE_SDK=1
    SET MSSdk=1
    "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
    "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
) ELSE (
    ECHO Using default MSVC build environment for 32 bit architecture
    ECHO Executing: %COMMAND_TO_RUN%
    call %COMMAND_TO_RUN% || EXIT 1
)

fix appveyor environment setup

fix appveyor environment setup


@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_DOTNET_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_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 %*

Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL


@echo off

set msbuild=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

set projectfile=build\build.proj

 :start
call %BuildCommonDir%\prebuild.bat

set target=
if NOT "%1" == "" set target=/t:%1
 %msbuild% %_loglevel% %target% %projectfile%
shift
if "%1" == "" goto nomoreparams
goto start

 :nomoreparams
if ERRORLEVEL 1 goto error
echo completed
goto end

 :error
echo Failed
goto end

 :end

@echo off

set msbuild=C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

set projectfile=build\build.proj

 :start
set target=
if NOT "%1" == "" set target=/t:%1
 %msbuild% %_loglevel% %target% %projectfile%
shift
if "%1" == "" goto nomoreparams
goto start

 :nomoreparams
if ERRORLEVEL 1 goto error
echo completed
goto end

 :error
echo Failed
goto end

 :end

Fix #3. Redundant line removed from build.bat


:: This file generates debug unity builds for rapid iteration

@echo off
pushd %~dp0
if not exist build mkdir build
if not exist build\enet mkdir build\enet
if not exist build\imgui mkdir build\imgui
if not exist build\lib mkdir build\lib
if not exist build\bin mkdir build\bin

:: [Compiler options]
:: /nologo: suppress copyright message
:: /Gm-: Disable minimal rebuild
:: /MDd: Runtime library: Multi-threaded Debug DLL
:: /GR-: disable RTTI
:: /EHs-c-: disable exceptions
:: /fp:fast: "fast" floating-point model; results are less predictable
:: /fp:except-: disable floating-point exceptions when generating code
:: /Oi: enable intrinsic functions
:: /Ob1: only __inline function expansion
:: /WX: treat warnings as errors
:: /W4: warning level 4
:: /wd4100:
:: /wd4505:
:: /Bt: display timings (undocumented)

set slBasicCompile=/nologo /Gm- /MDd /GR- /EHs-c- /fp:fast /fp:except- /Oi
set slDefinitions=-DSL_CL -D_DEBUG -DUNICODE -D_UNICODE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DVC_EXTRALEAN -DSTRICT -DWIN32_LEAN_AND_MEAN -DNOGDI -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS
set slInclude=/I..\..\src /I..\..\external\glm /I..\..\external\flatbuffers-1.3.0\include /I..\..\external\protobuf-2.6.1\src /I..\..\external\enet-1.3.13\include /I..\..\external\imgui-1.47
set slCompile=%slBasicCompile% %slDefinitions% %slInclude% /Ob1 /WX /W4 /wd4100 /wd4505 /Z7 /Bt
::set slFxCompile=/Zi /E"main" /Od /Vn"g_%(Filename)" /WX /Fh"src/%(Filename).h" /nologo

:: [Linker options]
:: /time: display timings (undocumented)

set slLink=/time /incremental:no /LIBPATH:../lib enet.lib imgui.lib winmm.lib ws2_32.lib

:cook
if exist build\bin\assets goto enet
cook build\bin\assets

:enet
if exist build\lib\enet.lib goto imgui
echo. && echo [ENet]
pushd external\enet-1.3.13
cl /c %slBasicCompile% /Fo..\..\build\enet\ /Iinclude *.c
popd
pushd build\enet
lib /nologo /out:..\lib\enet.lib *.obj
popd

:imgui
if exist build\lib\imgui.lib goto starlight
echo. && echo [ImGui]
pushd external\imgui-1.47
cl /c %slBasicCompile% /Fo..\..\build\imgui\ /I. imgui.cpp imgui_demo.cpp imgui_draw.cpp examples\directx11_example\imgui_impl_dx11.cpp
popd
pushd build\imgui
lib /nologo /out:..\lib\imgui.lib *.obj
popd

:starlight
echo. && echo [starlight_ub]
pushd build\bin
cl %slCompile% /LD /Festarlight.dll ..\..\src\starlight_ub.cpp /link %slLink% /PDB:starlight_%random%.pdb

:starlight_win32
echo. && echo [starlight_win32_ub]
fxc /Zi /E"main" /Od /Vn"g_SimplePixelShader" /WX /T ps_4_0 /Fh"..\..\src/SimplePixelShader.h" /nologo ..\..\src/SimplePixelShader.hlsl
fxc /Zi /E"main" /Od /Vn"g_SimpleVertexShader" /WX /T vs_4_0 /Fh"..\..\src/SimpleVertexShader.h" /nologo ..\..\src/SimpleVertexShader.hlsl
cl %slCompile% /Festarlight.exe /I..\..\external\imgui-1.47\examples\directx11_example ..\..\src\starlight_win32_ub.cpp /link %slLink% d3dcompiler.lib d3d11.lib
popd
popd

:: This file generates debug unity builds for rapid iteration

@echo off
pushd %~dp0
if not exist build mkdir build
if not exist build\enet mkdir build\enet
if not exist build\imgui mkdir build\imgui
if not exist build\lib mkdir build\lib
if not exist build\bin mkdir build\bin

:: [Compiler options]
:: /nologo: suppress copyright message
:: /Gm-: Disable minimal rebuild
:: /MDd: Runtime library: Multi-threaded Debug DLL
:: /GR-: disable RTTI
:: /EHs-c-: disable exceptions
:: /fp:fast: "fast" floating-point model; results are less predictable
:: /fp:except-: disable floating-point exceptions when generating code
:: /Oi: enable intrinsic functions
:: /Ob1: only __inline function expansion
:: /WX: treat warnings as errors
:: /W4: warning level 4
:: /wd4100:
:: /wd4505:
:: /Bt: display timings (undocumented)

set slBasicCompile=/nologo /Gm- /MDd /GR- /EHs-c- /fp:fast /fp:except- /Oi
set slDefinitions=-DSL_CL -D_DEBUG -DUNICODE -D_UNICODE -D_SCL_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -DNOMINMAX -DVC_EXTRALEAN -DSTRICT -DWIN32_LEAN_AND_MEAN -DNOGDI -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS
set slInclude=/I..\..\src /I..\..\external\glm /I..\..\external\flatbuffers-1.3.0\include /I..\..\external\protobuf-2.6.1\src /I..\..\external\enet-1.3.13\include /I..\..\external\imgui-1.47
set slCompile=%slBasicCompile% %slDefinitions% %slInclude% /Ob1 /WX /W4 /wd4100 /wd4505 /Z7 /Bt
::set slFxCompile=/Zi /E"main" /Od /Vn"g_%(Filename)" /WX /Fh"src/%(Filename).h" /nologo

:: [Linker options]
:: /time: display timings (undocumented)

set slLink=/time /incremental:no /LIBPATH:../lib enet.lib imgui.lib winmm.lib ws2_32.lib

:cook
if exist build\bin\assets goto enet
call cook build\bin\assets

:enet
if exist build\lib\enet.lib goto imgui
echo. && echo [ENet]
pushd external\enet-1.3.13
cl /c %slBasicCompile% /Fo..\..\build\enet\ /Iinclude *.c
popd
pushd build\enet
lib /nologo /out:..\lib\enet.lib *.obj
popd

:imgui
if exist build\lib\imgui.lib goto starlight
echo. && echo [ImGui]
pushd external\imgui-1.47
cl /c %slBasicCompile% /Fo..\..\build\imgui\ /I. imgui.cpp imgui_demo.cpp imgui_draw.cpp examples\directx11_example\imgui_impl_dx11.cpp
popd
pushd build\imgui
lib /nologo /out:..\lib\imgui.lib *.obj
popd

:starlight
echo. && echo [starlight_ub]
pushd build\bin
cl %slCompile% /LD /Festarlight.dll ..\..\src\starlight_ub.cpp /link %slLink% /PDB:starlight_%random%.pdb

:starlight_win32
echo. && echo [starlight_win32_ub]
fxc /Zi /E"main" /Od /Vn"g_SimplePixelShader" /WX /T ps_4_0 /Fh"..\..\src/SimplePixelShader.h" /nologo ..\..\src/SimplePixelShader.hlsl
fxc /Zi /E"main" /Od /Vn"g_SimpleVertexShader" /WX /T vs_4_0 /Fh"..\..\src/SimpleVertexShader.h" /nologo ..\..\src/SimpleVertexShader.hlsl
cl %slCompile% /Festarlight.exe /I..\..\external\imgui-1.47\examples\directx11_example ..\..\src\starlight_win32_ub.cpp /link %slLink% d3dcompiler.lib d3d11.lib
popd
popd

Fix build.bat stopping early

Fix build.bat stopping early


@echo off
::Env
if %PROCESSOR_ARCHITECTURE%==x86 (
	set MSBuild="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
) else (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
)

::Clean
rm -rf lib/proto
rm -rf lib/release

::Build
pushd .
cd ./src
set ABS_PATH=%CD%
%MSBUILD% %ABS_PATH%/fsharp-proto-build.proj /p:TargetFramework=net40
mv "../lib/release" "../lib/proto"

%MSBUILD% %ABS_PATH%/fsharp-library-build.proj /p:TargetFramework=net40 /p:Configuration=Release
%MSBUILD% %ABS_PATH%/fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release
popd

@echo off
::Env
if %PROCESSOR_ARCHITECTURE%==x86 (
	set MSBuild="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe"
) else (
	set MSBUILD=%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe
)

::Clean
del /F /S /Q lib\proto
del /F /S /Q lib\release

::Build
pushd .
cd ./src
set ABS_PATH=%CD%
%MSBUILD% %ABS_PATH%/fsharp-proto-build.proj /p:TargetFramework=net40
mv "../lib/release" "../lib/proto"

%MSBUILD% %ABS_PATH%/fsharp-library-build.proj /p:TargetFramework=net40 /p:Configuration=Release
%MSBUILD% %ABS_PATH%/fsharp-compiler-build.proj /p:TargetFramework=net40 /p:Configuration=Release
popd

Fix build.bat on windows

Fix build.bat on windows


@echo off
set startPath=%cd%
set startDrive= %startPath:~0,2%
set fileDrive=%~dp0
%fileDrive:~0,2%
cd %~dp0
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild build.msbuild  /m:4 %*
%startDrive%
cd %startPath%

@echo off
set startPath=%cd%
set startDrive= %startPath:~0,2%
set fileDrive=%~dp0
%fileDrive:~0,2%
cd %~dp0
msbuild build.msbuild  /m:4 %*
%startDrive%
cd %startPath%

Fix #395 VS2013 packages MSBuild and not .Net.

Fix by not using absolute path to msbuild.


SET PYVER=%1

FOR /F "TOKENS=1 DELIMS=." %%A IN ("%PYVER%") DO SET PYVER_MAJOR=%%A
FOR /F "TOKENS=2 DELIMS=." %%A IN ("%PYVER%") DO SET PYVER_MINOR=%%A

IF [%BUILDID%] == [] (
   ECHO BUILDID is not set
   EXIT /b
)

if [%CONDA_PREFIX%] == [] (
   if NOT [%ChocolateyToolsLocation%] == [] (
      SET CONDA_PREFIX=%ChocolateyToolsLocation%\miniconda3
   )
)

IF NOT EXIST "%CONDA_PREFIX%" (
   ECHO "Please install miniconda3 with chocolatey or exec this script on Anaconda Prompt(miniconda3)".
   EXIT /b 255
)
SET CONDAENV=nnabla-build-%BUILDID%-py%PYVER_MAJOR%%PYVER_MINOR%

IF [%BUILDID%] == [local] (
   ECHO Skip Cleanup local CONDA environment.
   EXIT /b
)

CALL %CONDA_PREFIX%\Scripts\activate.bat
CALL %CONDA_PREFIX%\Scripts\activate.bat %CONDAENV%

SET ENVNAME=%CONDA_DEFAULT_ENV%
SET ENVDIR=%CONDA_PREFIX%

ECHO Cleanup CONDA environment.
CALL conda deactivate
CALL conda env remove -y -n %CONDAENV%
IF [%ENVNAME%] == [%CONDAENV%] (
   RMDIR /s /q %ENVDIR%
)

# Ignore error.
EXIT /b 0

SET PYVER=%1

FOR /F "TOKENS=1 DELIMS=." %%A IN ("%PYVER%") DO SET PYVER_MAJOR=%%A
FOR /F "TOKENS=2 DELIMS=." %%A IN ("%PYVER%") DO SET PYVER_MINOR=%%A

IF [%BUILDID%] == [] (
   ECHO BUILDID is not set
   EXIT /b
)

if [%CONDA_PREFIX%] == [] (
   if NOT [%ChocolateyToolsLocation%] == [] (
      SET CONDA_PREFIX=%ChocolateyToolsLocation%\miniconda3
   )
)

IF NOT EXIST "%CONDA_PREFIX%" (
   ECHO "Please install miniconda3 with chocolatey or exec this script on Anaconda Prompt(miniconda3)".
   EXIT /b 255
)
SET CONDAENV=nnabla-build-%BUILDID%-py%PYVER_MAJOR%%PYVER_MINOR%

IF [%BUILDID%] == [local] (
   ECHO Skip Cleanup local CONDA environment.
   EXIT /b
)

CALL %CONDA_PREFIX%\Scripts\activate.bat
CALL %CONDA_PREFIX%\Scripts\activate.bat %CONDAENV%

SET ENVNAME=%CONDA_DEFAULT_ENV%
SET ENVDIR=%CONDA_PREFIX%

ECHO Cleanup CONDA environment.
CALL conda deactivate
CALL conda env remove -y -n %CONDAENV%
IF [%ENVNAME%] == [%CONDAENV%] (
   RMDIR /s /q %ENVDIR%
)

REM Ignore error.
EXIT /b 0

fix comment error in .bat

fix comment error in .bat


set msbuild=%windir%\Microsoft.NET\v4.0.30319\msbuild.exe

if exist build\bin. (
	del /S /Q build\bin\*
) else (
	mkdir build\bin
)

msbuild src\Cassette.Web\Cassette.Web.csproj /p:Configuration=Release /p:OutDir=..\..\build\bin\

set msbuild=%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

if exist build\bin. (
	del /S /Q build\bin\*
) else (
	mkdir build\bin
)

%msbuild% src\Cassette.Web\Cassette.Web.csproj /p:Configuration=Release /p:OutDir=..\..\build\bin\

Fix build.bat.

Fix build.bat.


set versionNumber=%1

del builds\Unquote-%versionNumber%.zip
del builds\Unquote.%versionNumber%.nupkg

REM preparing staging dirs

mkdir builds
mkdir staging
mkdir staging\net45
copy LICENSE staging
copy NOTICE staging

REM building for net45 ...
"C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe" -o:staging\net45\Unquote.dll --noframework --define:TRACE --doc:staging\net45\Unquote.xml --optimize+ -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Core.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Numerics.dll" --target:library --warn:3 --warnaserror:76 --vserrors --validate-type-providers --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ Unquote\Utils\Prelude.fs Unquote\Utils\Regex.fs Unquote\Utils\Printf.fs Unquote\Utils\List.fs Unquote\Utils\Type.fs Unquote\AssemblyInfo.fs Unquote\DynamicOperators.fs Unquote\EvaluationException.fs Unquote\Evaluation.fs Unquote\OperatorPrecedence.fs Unquote\ExtraReflection.fs Unquote\ExtraPatterns.fs Unquote\ReductionException.fs Unquote\Decompilation.fs Unquote\Reduction.fs Unquote\UnquotedExpression.fs Unquote\Extensions.fs Unquote\Operators.fs Unquote\AssertionFailedException.fs Unquote\Assertions.fs

REM zip builds ...
cd staging
..\tools\7z\7za.exe a -tzip ..\builds\Unquote-%versionNumber%.zip *
cd ..

REM preparing nuget dirs

mkdir nuget
mkdir nuget\lib
mkdir nuget\lib\net45
copy Unquote.nuspec nuget

REM copy staging builds to nuget package...

copy staging\net45\Unquote.dll nuget\lib\net45\Unquote.dll
copy staging\net45\Unquote.xml nuget\lib\net45\Unquote.xml

REM create nuget package...

".nuget\nuget.exe" pack nuget\Unquote.nuspec -Version %versionNumber%
copy Unquote.%versionNumber%.nupkg builds
del Unquote.%versionNumber%.nupkg

REM build .net core if .net core sdk is installed
dotnet --info
if "%ERRORLEVEL%" == "0" (
    pushd Unquote.NetStandard

    REM restore packages
    dotnet restore

    REM build package
    dotnet pack -c Release /p:PackageVersion=%versionNumber%

    REM merge package
    dotnet mergenupkg --source "..\builds\Unquote.%versionNumber%.nupkg" --other "bin\Release\Unquote.%versionNumber%.nupkg" --framework netstandard2.0

    popd
)

REM cleanup...

rd /q /s staging
rd /q /s nuget

pause

remove build script pause

remove build script pause


@ECHO OFF
set LIBSASS="3.3.3"
set SASSC="3.3.2"

:: set git="%ProgramFiles(x86)%\Git\bin\git" :: for older git-bash installs
set git="%ProgramFiles%\Git\bin\git"

:: s/14/12/ for VS2013 (min req) instead of VS2015
set msbuild="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild"

%git% submodule init
%git% submodule update

cmd /c "cd libsass && %git% checkout tags/%LIBSASS%" >nul
cmd /c "cd sassc.git && %git% checkout tags/%SASSC%" >nul

xcopy sassc.git\* libsass\sassc /s /i >nul
cmd /c "cd libsass\sassc && %msbuild% win\sassc.sln /p:Configuration=Release" >nul

copy libsass\sassc\bin\sassc.exe sassc.exe >nul
echo "Built sassc.exe. Copy to appropriate directories."

Add Windows build script (first attempt)


@echo Off
set config=%1
if "%config%" == "" (
   set config=debug
)

.nuget\NuGet.exe restore JabbR.sln -configFile %~dp0\.nuget\NuGet.config -nocache
msbuild %~dp0\Build\Build.proj /p:Configuration="%config%" /v:M /fl /flp:LogFile=msbuild.log;Verbosity=Normal /nr:false /p:VisualStudioVersion=11.0

Remove the vs version flag.

Remove the vs version flag.


echo OFF

set UPLOAD_TARGETS=python-parse python-pkgtk

if "%ANACONDA_USERNAME%" == "" (
  set /p ANACONDA_USERNAME="Username: "
) else (
  echo Username: %ANACONDA_USERNAME%;
)

if "%ANACONDA_PASSWORD%" == "" (
  set /p ANACONDA_USERNAME=%ANACONDA_USERNAME%%"'s password: "
) else (
  echo %ANACONDA_USERNAME%'s password: [secure];
)

set ANACONDA_UPLOAD_FLAGS=-c conda-forge %ANACONDA_UPLOAD_FLAGS%
if "%ANACONDA_CHANNEL%" == "" (
    set ANACONDA_CHANNEL=statiskit
) else (
    echo Using anaconda channel: %ANACONDA_CHANNEL%
    set ANACONDA_UPLOAD_FLAGS=-c statiskit %ANACONDA_UPLOAD_FLAGS%
)

echo ON

conda install -n root anaconda-client
if %errorlevel% neq 0 (
  exit /b %errorlevel%
)

echo OFF

echo y|anaconda login --username %ANACONDA_USERNAME% --password %ANACONDA_PASSWORD%
if %errorlevel% neq 0 (
  exit /b %errorlevel%
)

echo ON

git clone https://gist.github.com/c491cb08d570beeba2c417826a50a9c3.git toolchain
if %errorlevel% neq 0 (
  anaconda logout
  exit /b %errorlevel%
)
cd toolchain
call config.bat
if %errorlevel% neq 0 (
  cd ..
  anaconda logout
  rmdir toolchain /s /q
  exit /b %errorlevel%
)
cd ..
rmdir toolchain /s /q

for %%x in (%UPLOAD_TARGETS%) do (
  <nul set /p="for /f %%%%i in ('conda build " >> _upload.bat
  <nul set /p=%%x >> _upload.bat
  <nul set /p=" -c " >> _upload.bat
  <nul set /p=%ANACONDA_CHANNEL% >> _upload.bat
  <nul set /p=" " >> _upload.bat
  <nul set /p=%ANACONDA_UPLOAD_FLAGS% >> _upload.bat
  <nul set /p=" --output') do set UPLOAD_FILE=%%%%i" >> _upload.bat
  echo. >> _upload.bat
  <nul set /p="anaconda upload --user " >> _upload.bat
  <nul set /p=%ANACONDA_CHANNEL% >> _upload.bat
  <nul set /p=" %%UPLOAD_FILE%%" >> _upload.bat
  echo. >> _upload.bat
  call _upload.bat
  del _upload.bat
)

anaconda logout

echo OFF

set UPLOAD_TARGETS=python-parse python-pkgtk

if "%ANACONDA_USERNAME%" == "" (
  set /p ANACONDA_USERNAME="Username: "
) else (
  echo Username: %ANACONDA_USERNAME%;
)

if "%ANACONDA_PASSWORD%" == "" (
  set /p ANACONDA_USERNAME=%ANACONDA_USERNAME%%"'s password: "
) else (
  echo %ANACONDA_USERNAME%'s password: [secure];
)

set ANACONDA_UPLOAD_FLAGS=-c conda-forge %ANACONDA_UPLOAD_FLAGS%
if "%ANACONDA_CHANNEL%" == "" (
    set ANACONDA_CHANNEL=statiskit
) else (
    echo Using anaconda channel: %ANACONDA_CHANNEL%
    set ANACONDA_UPLOAD_FLAGS=-c statiskit %ANACONDA_UPLOAD_FLAGS%
)

echo ON

conda install -n root anaconda-client
if %errorlevel% neq 0 (
  exit /b %errorlevel%
)

echo OFF

echo y|anaconda login --username %ANACONDA_USERNAME% --password %ANACONDA_PASSWORD%
if %errorlevel% neq 0 (
  exit /b %errorlevel%
)

echo ON

git clone https://gist.github.com/c491cb08d570beeba2c417826a50a9c3.git toolchain
if %errorlevel% neq 0 (
  anaconda logout
  exit /b %errorlevel%
)
cd toolchain
call config.bat
if %errorlevel% neq 0 (
  cd ..
  anaconda logout
  rmdir toolchain /s /q
  exit /b %errorlevel%
)
cd ..
rmdir toolchain /s /q

for %%x in (%UPLOAD_TARGETS%) do (
  for /f %%i in ('conda build %%x -c %ANACONDA_CHANNEL% %ANACONDA_FLAGS% --output') do set UPLOAD_FILE=%%i
  anaconda upload --user %ANACONDA_CHANNEL% %UPLOAD_FILE%
  :: <nul set /p="for /f %%%%i in ('conda build " >> _upload.bat
  :: <nul set /p=%%x >> _upload.bat
  :: <nul set /p=" -c " >> _upload.bat
  :: <nul set /p=%ANACONDA_CHANNEL% >> _upload.bat
  :: <nul set /p=" " >> _upload.bat
  :: <nul set /p=%ANACONDA_UPLOAD_FLAGS% >> _upload.bat
  :: <nul set /p=" --output') do set UPLOAD_FILE=%%%%i" >> _upload.bat
  :: echo. >> _upload.bat
  :: <nul set /p="anaconda upload --user " >> _upload.bat
  :: <nul set /p=%ANACONDA_CHANNEL% >> _upload.bat
  :: <nul set /p=" %%UPLOAD_FILE%%" >> _upload.bat
  :: echo. >> _upload.bat
  :: call _upload.bat
  :: del _upload.bat
)

anaconda logout

Update upload.bat

Update upload.bat


@if "%_echo%" neq "on" echo off
rem
rem This file invokes cmake and generates the build system for windows.

set argC=0
for %%x in (%*) do Set /A argC+=1

if NOT %argC%==3 GOTO :USAGE
if %1=="/?" GOTO :USAGE

setlocal
set __sourceDir=%~dp0
:: VS 2015 is the minimum supported OS
set __VSString=14 2015

:: Set the target architecture to a format cmake understands. ANYCPU defaults to x64
if /i "%3" == "x86"     (set __VSString=%__VSString%)
if /i "%3" == "x64"     (set __VSString=%__VSString% Win64)
if /i "%3" == "arm"     (set __VSString=%__VSString% ARM)
if /i "%3" == "arm64"   (set __VSString=%__VSString% Win64)

if defined CMakePath goto DoGen

:: Eval the output from probe-win1.ps1
pushd "%__sourceDir%"
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy RemoteSigned "& .\probe-win.ps1"') do %%a
popd

:DoGen
"%CMakePath%" %__SDKVersion% "-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%" "-DCMAKE_INSTALL_PREFIX=%__CMakeBinDir%" -G "Visual Studio %__VSString%" -B. -H%1
endlocal
GOTO :DONE

:USAGE
  echo "Usage..."
  echo "gen-buildsys-win.bat <path to top level CMakeLists.txt> <VSVersion> <Target Architecture"
  echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP"
  echo "Specify the VSVersion to be used - VS2013 or VS2015"
  echo "Specify the Target Architecture - x86, AnyCPU, ARM, or x64."
  EXIT /B 1

:DONE
  EXIT /B 0

@if "%_echo%" neq "on" echo off
rem
rem This file invokes cmake and generates the build system for windows.

set argC=0
for %%x in (%*) do Set /A argC+=1

if NOT %argC%==3 GOTO :USAGE
if %1=="/?" GOTO :USAGE

setlocal
set __sourceDir=%~dp0
:: VS 2015 is the minimum supported toolset
set __VSString=14 2015

:: Set the target architecture to a format cmake understands. ANYCPU defaults to x64
if /i "%3" == "x86"     (set __VSString=%__VSString%)
if /i "%3" == "x64"     (set __VSString=%__VSString% Win64)
if /i "%3" == "arm"     (set __VSString=%__VSString% ARM)
if /i "%3" == "arm64"   (set __VSString=%__VSString% Win64)

if defined CMakePath goto DoGen

:: Eval the output from probe-win1.ps1
pushd "%__sourceDir%"
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy RemoteSigned "& .\probe-win.ps1"') do %%a
popd

:DoGen
"%CMakePath%" %__SDKVersion% "-DCMAKE_BUILD_TYPE=%CMAKE_BUILD_TYPE%" "-DCMAKE_INSTALL_PREFIX=%__CMakeBinDir%" -G "Visual Studio %__VSString%" -B. -H%1
endlocal
GOTO :DONE

:USAGE
  echo "Usage..."
  echo "gen-buildsys-win.bat <path to top level CMakeLists.txt> <VSVersion> <Target Architecture"
  echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP"
  echo "Specify the VSVersion to be used - VS2013 or VS2015"
  echo "Specify the Target Architecture - x86, AnyCPU, ARM, or x64."
  EXIT /B 1

:DONE
  EXIT /B 0

Fix a typo about toolset.

Fix a typo about toolset.


Update generate_solution.bat

Update generate_solution.bat


@echo off
set OLDDIR=%CD%
cd /d %~dp0
REM ============================================
echo *** Generating a Windows GPAC installer ***
REM ============================================

echo:
REM ============================================
echo Check NSIS is in your PATH
REM ============================================

set NSIS_EXEC="%PROGRAMFILES%\NSIS\makensis.exe"
echo   Assuming NSIS at default location %NSIS_EXEC%

echo:
REM ============================================
echo Retrieving version/revision information
REM ============================================
if not exist include/gpac/version.h echo   version couldn't be found - check include/gpac/version.h exists
if not exist include/gpac/version.h goto abort

REM execute svnversion and check if the result if found within version.h
for /f "delims=" %%i in ('svnversion.exe') do Set VarRevisionSVN=%%i
REM 'M', 'S', 'P', ':' are special 'svnversion' results
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r M^"') do goto RevisionAbort
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r S^"') do goto RevisionAbort
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r P^"') do goto RevisionAbort
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r :^"') do goto RevisionAbort
for /f "delims=" %%i in ('type include\gpac\version.h ^| findstr /i /r "%VarRevisionSVN%"') do Set VarRevisionBuild=%%i
if !"%VarRevisionBuild%"==!"" echo   local revision and last build revision are not congruent - please consider rebuilding before generating an installer
if !"%VarRevisionBuild%"==!"" goto abort
echo   version found: %VarRevisionSVN%

move bin\win32\release\nsis_install\default.out bin\win32\release\nsis_install\default.out_
echo Name "GPAC Framework ${GPAC_VERSION} revision %VarRevisionSVN%" > bin\win32\release\nsis_install\default.out
echo OutFile "GPAC.Framework.Setup-${GPAC_VERSION}-rev%VarRevisionSVN%.exe" >> bin\win32\release\nsis_install\default.out

echo:
REM ============================================
echo Executing NSIS
REM ============================================
call %NSIS_EXEC% bin\win32\release\nsis_install\gpac_installer.nsi

echo:
REM ============================================
echo Removing temporary files
REM ============================================
move bin\win32\release\nsis_install\default.out_ bin\win32\release\nsis_install\default.out

echo:
REM ============================================
echo Windows GPAC installer generated - goodbye!
REM ============================================
exit/b

:RevisionAbort
echo   SVN revision "%VarRevisionSVN%" is not a simple number, you may have local modification (please check 'svnrevision' flags meaning or execute the NSIS script manually)

:abort
echo:
echo  *** ABORTING: CHECK ERROR MESSAGES ABOVE ***
set VarRevisionSVN=
set VarRevisionBuild=
cd /d %OLDDIR%
exit/b

@echo off
set OLDDIR=%CD%
cd /d %~dp0
REM ============================================
echo *** Generating a Windows GPAC installer ***
REM ============================================

echo:
REM ============================================
echo Check NSIS is in your PATH
REM ============================================

set NSIS_EXEC="%PROGRAMFILES%\NSIS\makensis.exe"
if not exist "%PROGRAMFILES%\NSIS\makensis.exe" echo   NSIS couldn't be found at default location %NSIS_EXEC%
if not exist "%PROGRAMFILES%\NSIS\makensis.exe" goto Abort
echo   Found NSIS at default location %NSIS_EXEC%

echo:
REM ============================================
echo Retrieving version/revision information
REM ============================================
if not exist include/gpac/version.h echo   version couldn't be found - check include/gpac/version.h exists
if not exist include/gpac/version.h goto Abort

REM execute svnversion and check if the result if found within version.h
for /f "delims=" %%i in ('svnversion.exe') do Set VarRevisionSVN=%%i
REM 'M', 'S', 'P', ':' are special 'svnversion' results
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r M^"') do goto RevisionAbort
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r S^"') do goto RevisionAbort
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r P^"') do goto RevisionAbort
for /f "delims=" %%i in ('echo %VarRevisionSVN% ^| findstr /i /r :^"') do goto RevisionAbort
for /f "delims=" %%i in ('type include\gpac\version.h ^| findstr /i /r "%VarRevisionSVN%"') do Set VarRevisionBuild=%%i
echo VarRevisionBuild = %VarRevisionBuild%
echo VarRevisionSVN   = %VarRevisionSVN%
if !"%VarRevisionBuild%"==!"%VarRevisionSVN%" echo   local revision and last build revision are not congruent - please consider rebuilding before generating an installer
if !"%VarRevisionBuild%"==!"%VarRevisionSVN%" goto Abort
REM echo   version found: %VarRevisionSVN%

move bin\win32\release\nsis_install\default.out bin\win32\release\nsis_install\default.out_
echo Name "GPAC Framework ${GPAC_VERSION} revision %VarRevisionSVN%" > bin\win32\release\nsis_install\default.out
echo OutFile "GPAC.Framework.Setup-${GPAC_VERSION}-rev%VarRevisionSVN%.exe" >> bin\win32\release\nsis_install\default.out

echo:
REM ============================================
echo Executing NSIS
REM ============================================
call %NSIS_EXEC% bin\win32\release\nsis_install\gpac_installer.nsi

echo:
REM ============================================
echo Removing temporary files
REM ============================================
move bin\win32\release\nsis_install\default.out_ bin\win32\release\nsis_install\default.out

echo:
REM ============================================
echo Windows GPAC installer generated - goodbye!
REM ============================================
goto LeaveBatch

:RevisionAbort
echo   SVN revision "%VarRevisionSVN%" is not a simple number, you may have local modification (please check 'svnrevision' flags meaning or execute the NSIS script manually)

:Abort
echo:
echo  *** ABORTING: CHECK ERROR MESSAGES ABOVE ***

:LeaveBatch
set VarRevisionSVN=
set VarRevisionBuild=
cd /d %OLDDIR%
exit/b

update batch installer

[bouqueau] update batch installer


cls
call ../../src/locatevc.bat
cl /c /DEBUG ring_vmmysql.c -I"..\..\include" -I"..\..\libdepwin\mysql\include"
link /DEBUG ring_vmmysql.obj  ..\..\lib\ring.lib ..\..\libdepwin\MySQL\lib\libmysql.lib /DLL /OUT:..\..\bin\ring_mysql.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_vmmysql.obj

cls
call ../../src/locatevc.bat
cl /c /DEBUG ring_vmmysql.c -I"..\..\include" -I"..\..\extensions\libdepwin\mysql\include"
link /DEBUG ring_vmmysql.obj  ..\..\lib\ring.lib ..\..\extensions\libdepwin\MySQL\lib\libmysql.lib /DLL /OUT:..\..\bin\ring_mysql.dll /SUBSYSTEM:CONSOLE,"5.01"
del ring_vmmysql.obj

Update RingMySQL - extensions/ringmysql/buildvc.bat


@echo off

echo ---------------------------------------------------------------------------
echo                             Quick IP Setter
echo               Copyright (c) 2014 Cai Guanhao (Choi Goon-ho)

:start
echo ---------------------------------------------------------------------------

for /f %%A in ('"prompt $H &echo on &for %%B in (1) do rem"') do set BS=%%A

:hostipaddr
set /p hostipaddr="%BS%              XenServer Host IP: "
if [%hostipaddr%]==[] goto hostipaddr

:vmposition
set /p vmposition="%BS%      Position of this VM [1-4]: "
if [%vmposition%]==[] goto vmposition

set /p subnetmask="%BS%  Subnet mask [255.255.255.248]: "
if [%subnetmask%]==[] set subnetmask="255.255.255.248"

set /p local_conn="%BS%   Connection [LocalConnection]: "
if [%local_conn%]==[] set local_conn="LocalConnection"

set subnetmask=%subnetmask:"=%
set local_conn=%local_conn:"=%

for /f "tokens=1-4 delims=." %%a in ("%hostipaddr%") do (
  set first=%%a.%%b.%%c
  set /a minus=%%d-1
  set /a add=%%d+%vmposition%
)

echo ---------------------------------------------------------------------------
echo                         Gateway:  %first%.%minus%
echo               XenServer Host IP:  %hostipaddr%
echo                      IP address:  %first%.%add%
echo                     Subnet Mask:  %subnetmask%

echo ---------------------------------------------------------------------------
set /p OK="%BS%    [Enter to Yes, others to No]  Is this OK? "

if [%OK%]==[] netsh interface ip set address name="%local_conn%"^
  static %first%.%add% %subnetmask% %first%.%minus% 1
if [%OK%]==[] netsh interface ip set dns name="%local_conn%"^
  static 8.8.8.8 >nul
if [%OK%]==[] netsh interface ip add dns name="%local_conn%"^
  8.8.4.4 index=2 >nul

if %ERRORLEVEL% GEQ 1 goto start

if [%OK%]==[] ^
echo                          Status:  Completed! Press enter to leave.

pause >nul

add ipset.bat -- the Windows Quick IP Setter;


@echo off
SET st2Path=C:\Program Files\Sublime Text 3\sublime_text.exe

rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"         /t REG_SZ /v "" /d "Open with Sublime Text 3"   /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f

rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"         /t REG_SZ /v "" /d "Open with Sublime Text 3"   /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"         /t REG_EXPAND_SZ /v "Icon" /d "%st2Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st2Path% \"%%1\"" /f
pause

Add OpenWithSublimeText3 context menu Windows script


md include
md include\google
md include\google\protobuf
md include\google\protobuf\stubs
md include\google\protobuf\io
md include\google\protobuf\compiler
md include\google\protobuf\compiler\cpp
md include\google\protobuf\compiler\java
md include\google\protobuf\compiler\python
copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h
copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h
copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h
copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h
copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h
copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h
copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h
copy ..\src\google\protobuf\message.h include\google\protobuf\message.h
copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ops.h
copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h
copy ..\src\google\protobuf\service.h include\google\protobuf\service.h
copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h
copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h
copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h
copy ..\src\google\protobuf\wire_format_inl.h include\google\protobuf\wire_format_inl.h
copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h
copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h
copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h
copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h
copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h
copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h
copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h
copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h
copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h
copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h
copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h
copy ..\src\google\protobuf\compiler\python\python_generator.h include\google\protobuf\compiler\python\python_generator.h

md include
md include\google
md include\google\protobuf
md include\google\protobuf\stubs
md include\google\protobuf\io
md include\google\protobuf\compiler
md include\google\protobuf\compiler\cpp
md include\google\protobuf\compiler\java
md include\google\protobuf\compiler\python
copy ..\src\google\protobuf\stubs\common.h include\google\protobuf\stubs\common.h
copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h
copy ..\src\google\protobuf\descriptor.h include\google\protobuf\descriptor.h
copy ..\src\google\protobuf\descriptor.pb.h include\google\protobuf\descriptor.pb.h
copy ..\src\google\protobuf\descriptor_database.h include\google\protobuf\descriptor_database.h
copy ..\src\google\protobuf\dynamic_message.h include\google\protobuf\dynamic_message.h
copy ..\src\google\protobuf\extension_set.h include\google\protobuf\extension_set.h
copy ..\src\google\protobuf\generated_message_reflection.h include\google\protobuf\generated_message_reflection.h
copy ..\src\google\protobuf\message.h include\google\protobuf\message.h
copy ..\src\google\protobuf\reflection_ops.h include\google\protobuf\reflection_ops.h
copy ..\src\google\protobuf\repeated_field.h include\google\protobuf\repeated_field.h
copy ..\src\google\protobuf\service.h include\google\protobuf\service.h
copy ..\src\google\protobuf\text_format.h include\google\protobuf\text_format.h
copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_field_set.h
copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h
copy ..\src\google\protobuf\wire_format_inl.h include\google\protobuf\wire_format_inl.h
copy ..\src\google\protobuf\io\coded_stream.h include\google\protobuf\io\coded_stream.h
copy ..\src\google\protobuf\io\gzip_stream.h include\google\protobuf\io\gzip_stream.h
copy ..\src\google\protobuf\io\printer.h include\google\protobuf\io\printer.h
copy ..\src\google\protobuf\io\tokenizer.h include\google\protobuf\io\tokenizer.h
copy ..\src\google\protobuf\io\zero_copy_stream.h include\google\protobuf\io\zero_copy_stream.h
copy ..\src\google\protobuf\io\zero_copy_stream_impl.h include\google\protobuf\io\zero_copy_stream_impl.h
copy ..\src\google\protobuf\compiler\code_generator.h include\google\protobuf\compiler\code_generator.h
copy ..\src\google\protobuf\compiler\command_line_interface.h include\google\protobuf\compiler\command_line_interface.h
copy ..\src\google\protobuf\compiler\importer.h include\google\protobuf\compiler\importer.h
copy ..\src\google\protobuf\compiler\parser.h include\google\protobuf\compiler\parser.h
copy ..\src\google\protobuf\compiler\cpp\cpp_generator.h include\google\protobuf\compiler\cpp\cpp_generator.h
copy ..\src\google\protobuf\compiler\java\java_generator.h include\google\protobuf\compiler\java\java_generator.h
copy ..\src\google\protobuf\compiler\python\python_generator.h include\google\protobuf\compiler\python\python_generator.h

Update extract_includes.bat to include new public headers in rev 120.


call dnvm use 1.0.0-rc1-update1 -r clr
IF ERRORLEVEL 1 EXIT /B 1
call dnu restore
IF ERRORLEVEL 1 EXIT /B 1
call dnu build src\Google.Api.CommonProtos
IF ERRORLEVEL 1 EXIT /B 1
call dnu build src\Google.Api.Gax
IF ERRORLEVEL 1 EXIT /B 1
call dnu build src\Google.Api.Gax.Rest
IF ERRORLEVEL 1 EXIT /B 1
call dnu build testing\Google.Api.Gax.Testing
IF ERRORLEVEL 1 EXIT /B 1
call dnu build test\Google.Api.Gax.Tests
IF ERRORLEVEL 1 EXIT /B 1
call dnu build test\Google.Api.Gax.Rest.Tests
IF ERRORLEVEL 1 EXIT /B 1
call dnx -p test\Google.Api.Gax.Tests test
IF ERRORLEVEL 1 EXIT /B 1
call dnx -p test\Google.Api.Gax.Rest.Tests test
IF ERRORLEVEL 1 EXIT /B 1
call dnu pack src\Google.Api.CommonProtos
IF ERRORLEVEL 1 EXIT /B 1
call dnu pack src\Google.Api.Gax
IF ERRORLEVEL 1 EXIT /B 1
call dnu pack src\Google.Api.Gax.Rest
IF ERRORLEVEL 1 EXIT /B 1
call dnu pack testing\Google.Api.Gax.Testing
IF ERRORLEVEL 1 EXIT /B 1

call dnvm use 1.0.0-rc1-update1 -r clr || goto error
call dnu restore || goto error

set PROJECTS=src\Google.Api.CommonProtos src\Google.Api.Gax src\Google.Api.Gax.Rest testing\Google.Api.Gax.Testing
set TESTS=test\Google.Api.Gax.Tests test\Google.Api.Gax.Rest.Tests

for %%P in (%PROJECTS%) do (
  call dnu build --configuration %Configuration% %%P || goto error
)

for %%P in (%TESTS%) do (
  call dnu build --configuration %Configuration% %%P || goto error
  call dnx --configuration %Configuration% -p %%P test || goto error
)

for %%P in (%PROJECTS%) do (
  call dnu pack --configuration %Configuration% %%P || goto error
)

goto end

:error
echo Build failed due to error. Please address.
exit /b 1

:end

Update myget script

Update myget script


pip install pipwin
pipwin install marisa-trie
pip install pythainlp

Create install_pythainlp.bat

Create install_pythainlp.bat


@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

::build
rmdir /q /s build
set ROOT=%SELF_PATH%\..\..
lrelease %ROOT%\ScreenTranslator.pro
mkdir build
cd build
qmake INCLUDEPATH+=%cd%\..\installed\include LIBS+=-L%cd%\..\installed\bin LIBS+=-L%cd%\..\installed\lib %ROOT%
nmake
cd ..
if %errorlevel% neq 0 exit /b %errorlevel%

::pack
rmdir /q /s iss
mkdir iss
copy /Y %ROOT%\distr\iss\* iss
copy /Y %ROOT%\distr\Changelog_en.txt iss\
copy /Y %ROOT%\distr\Changelog_ru.txt iss\
copy /Y %ROOT%\LICENSE.md iss\LICENSE_en.md
copy /Y %ROOT%\images\icon.ico iss\icon.ico

mkdir iss\content
copy /Y build\release\ScreenTranslator.exe iss\content\ScreenTranslator.exe
copy /Y installed\bin\*.dll iss\content
mkdir iss\content\translations
copy /Y %ROOT%\translations\*.qm iss\content\translations
mkdir iss\content\translators
copy /Y %ROOT%\translators\* iss\content\translators

windeployqt --release iss\content\ScreenTranslator.exe

for /f "delims=" %%i in ('findstr versionString %ROOT%\version.json') do set VERSION_LINE=%%i
set UNQUOTED=%VERSION_LINE:"='%
for /f "tokens=4 delims='" %%i in ("%UNQUOTED%") do set VERSION=%%i
echo #define MyAppVersion "%VERSION%" > iss\defines.iss

cd iss
iscc.exe InnoSetup.iss
cd ..

if "%WITH_TESSDATA%" == ""  goto end

mkdir iss\tessdata
copy /Y download\tessdata\* iss\tessdata

cd iss
iscc.exe InnoSetupWithTessdata.iss
cd ..

:end

@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

::build
rmdir /q /s build
set ROOT=%SELF_PATH%\..\..
lrelease %ROOT%\ScreenTranslator.pro
mkdir build
cd build
qmake INCLUDEPATH+=%cd%\..\installed\include LIBS+=-L%cd%\..\installed\bin LIBS+=-L%cd%\..\installed\lib %ROOT%
nmake
cd ..
if %errorlevel% neq 0 exit /b %errorlevel%

::pack
rmdir /q /s iss
mkdir iss
copy /Y %ROOT%\distr\iss\* iss
copy /Y %ROOT%\distr\Changelog_en.txt iss\
copy /Y %ROOT%\distr\Changelog_ru.txt iss\
copy /Y %ROOT%\LICENSE.md iss\LICENSE_en.md
copy /Y %ROOT%\images\icon.ico iss\icon.ico

mkdir iss\content
copy /Y build\release\ScreenTranslator.exe iss\content\ScreenTranslator.exe
copy /Y installed\bin\*.dll iss\content
copy /Y c:\OpenSSL-Win32\bin\libeay32.dll iss\content
copy /Y c:\OpenSSL-Win32\bin\ssleay32.dll iss\content
mkdir iss\content\translations
copy /Y %ROOT%\translations\*.qm iss\content\translations
mkdir iss\content\translators
copy /Y %ROOT%\translators\* iss\content\translators

windeployqt --release iss\content\ScreenTranslator.exe

for /f "delims=" %%i in ('findstr versionString %ROOT%\version.json') do set VERSION_LINE=%%i
set UNQUOTED=%VERSION_LINE:"='%
for /f "tokens=4 delims='" %%i in ("%UNQUOTED%") do set VERSION=%%i
echo #define MyAppVersion "%VERSION%" > iss\defines.iss

cd iss
iscc.exe InnoSetup.iss
cd ..

if "%WITH_TESSDATA%" == ""  goto end

mkdir iss\tessdata
copy /Y download\tessdata\* iss\tessdata

cd iss
iscc.exe InnoSetupWithTessdata.iss
cd ..

:end

Embed ssl into installer.

Embed ssl into installer.


@echo off

rem   $Id$
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   Enviroment variables
rem   SERVER_PORT (optional) - define the rmiregistry and server port
rem
rem   JVM_ARGS - Java flags - these are handled by jmeter.bat
rem
rem   ===============================================================

REM Protect environment against changes if possible:
if "%OS%"=="Windows_NT" setlocal

rem Need to check if we are using the 4NT shell...
rem [Does that support the ~ constructs?]
if "%eval[2+2]" == "4" goto winNT1
if exist jmeter-server.bat goto winNT1
echo Changing to JMeter home directory
cd /D %~dp0
:winNT1

if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Could not find ApacheJmeter_core.jar ...
REM Try to work out JMETER_HOME
echo ... Trying JMETER_HOME=..
set JMETER_HOME=..
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo ... trying JMETER_HOME=.
set JMETER_HOME=.
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Cannot determine JMETER_HOME !
goto exit

:setCP
echo Found ApacheJMeter_core.jar
set CLASSPATH=%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar;%JMETER_HOME%\lib\logkit-1.2.jar

START rmiregistry %SERVER_PORT%

if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart

rem Need to check if we are using the 4NT shell...
if "%eval[2+2]" == "4" goto setup4NT

rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*
goto doneStart

:setup4NT
set JMETER_CMD_LINE_ARGS=%$
goto doneStart

:win9xStart
rem Slurp the command line arguments.  This loop allows for an unlimited number of
rem agruments (up to the command line limit, anyway).

set JMETER_CMD_LINE_ARGS=

:setupArgs
if %1a==a goto doneStart
set JMETER_CMD_LINE_ARGS=%JMETER_CMD_LINE_ARGS% %1
shift
goto setupArgs

:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

if not "%SERVER_PORT%" == "" goto port

call jmeter -s %JMETER_CMD_LINE_ARGS%
goto end

:port
call jmeter -Dserver_port=%SERVER_PORT% -s %JMETER_CMD_LINE_ARGS%

:end

taskkill /F /IM rmiregistry.exe

:exit

@echo off

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

rem   ===============================================================
rem   Enviroment variables
rem   SERVER_PORT (optional) - define the rmiregistry and server port
rem
rem   JVM_ARGS - Java flags - these are handled by jmeter.bat
rem
rem   ===============================================================

REM Protect environment against changes if possible:
if "%OS%"=="Windows_NT" setlocal

rem Need to check if we are using the 4NT shell...
rem [Does that support the ~ constructs?]
if "%eval[2+2]" == "4" goto winNT1
if exist jmeter-server.bat goto winNT1
echo Changing to JMeter home directory
cd /D %~dp0
:winNT1

if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Could not find ApacheJmeter_core.jar ...
REM Try to work out JMETER_HOME
echo ... Trying JMETER_HOME=..
set JMETER_HOME=..
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo ... trying JMETER_HOME=.
set JMETER_HOME=.
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Cannot determine JMETER_HOME !
goto exit

:setCP
echo Found ApacheJMeter_core.jar
set CLASSPATH=%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar;%JMETER_HOME%\lib\logkit-1.2.jar

START rmiregistry %SERVER_PORT%

if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart

rem Need to check if we are using the 4NT shell...
if "%eval[2+2]" == "4" goto setup4NT

rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*
goto doneStart

:setup4NT
set JMETER_CMD_LINE_ARGS=%$
goto doneStart

:win9xStart
rem Slurp the command line arguments.  This loop allows for an unlimited number of
rem agruments (up to the command line limit, anyway).

set JMETER_CMD_LINE_ARGS=

:setupArgs
if %1a==a goto doneStart
set JMETER_CMD_LINE_ARGS=%JMETER_CMD_LINE_ARGS% %1
shift
goto setupArgs

:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

if not "%SERVER_PORT%" == "" goto port

call jmeter -s %JMETER_CMD_LINE_ARGS%
goto end

:port
call jmeter -Dserver_port=%SERVER_PORT% -s %JMETER_CMD_LINE_ARGS%

:end

taskkill /F /IM rmiregistry.exe

:exit

Remove $id

Remove $id

git-svn-id: d3b254b790bfb0dc06e982e64646283fdd6e0f68@498487 13f79535-47bb-0310-9956-ffa450edef68


@echo off
cd "%~dp0\.."
mkdir cmake-build\mingw-w64
cd    cmake-build\mingw-w64
cmake -G "MinGW Makefiles" ..\..
cmake --build . --target cs               -- -j4
cmake --build . --target cs_dbg           -- -j4
cd ..\..
rd /S /Q build
mkdir build\bin
mkdir build\lib
xcopy /Y cmake-build\mingw-w64\*.exe build\bin\
xcopy /Y cmake-build\mingw-w64\*.a   build\lib\
rd /S /Q csdev
mkdir csdev\include\covscript
mkdir csdev\lib
xcopy /E /Y include\covscript csdev\include\covscript
xcopy /E /Y build\lib         csdev\lib\

@echo off
cd "%~dp0\.."
mkdir cmake-build\mingw-w64
cd    cmake-build\mingw-w64
cmake -G "MinGW Makefiles" ..\..
cmake --build . --target cs               -- -j8
cmake --build . --target cs_dbg           -- -j8
cd ..\..
rd /S /Q build
mkdir build\bin
mkdir build\lib
xcopy /Y cmake-build\mingw-w64\*.exe build\bin\
xcopy /Y cmake-build\mingw-w64\*.a   build\lib\
rd /S /Q csdev
mkdir csdev\include\covscript
mkdir csdev\lib
xcopy /E /Y include\covscript csdev\include\covscript
xcopy /E /Y build\lib         csdev\lib\

Update make.bat

Update make.bat


@echo off

call "%~dp0lib_base.cmd"
call "%%~dp0lib_console.cmd"
set lib_git=call "%~dp0lib_git.cmd"

if "%~1" == "/h" (
    %lib_base% help "%~0"
) else if "%1" neq "" (
    call :%*
)

exit /b

:read_version
:::===============================================================================
:::read_version - Get the git.exe verion
:::.
:::include:
:::.
:::  call "lib_git.cmd"
:::.
:::usage:
:::.
:::  %lib_git% read_version "[dir_path]"
:::.
:::required:
:::.
:::  [GIT SCOPE]   <in> USER | VENDORED
:::  [GIT PATH]    <in> Fully qualified path to the Git command root.
:::.
:::output:
:::.
:::  GIT_VERSION_[GIT SCOPE] <out> Env variable containing Git semantic version string
:::-------------------------------------------------------------------------------

    :: clear the variables
    set GIT_VERSION_%~1=

    :: set the executable path
    set "git_executable=%~2\git.exe"
    %lib_console% debug_output :read_version "Env Var - git_executable=%git_executable%"

    :: check if the executable actually exists
    if not exist "%git_executable%" (
        %lib_console% debug_output :read_version "%git_executable% does not exist."
        exit /b -255
    )

    :: get the git version in the provided directory

    "%git_executable%" --version > "%temp%\git_version.txt"
    setlocal enabledelayedexpansion
    for /F "tokens=1,2,3 usebackq" %%A in (`type "%temp%\git_version.txt" 2^>nul`) do (
        if /i "%%A %%B" == "git version" (
            set "GIT_VERSION=%%C"
        ) else (
            echo "'git --version' returned an inproper version string!"
            pause
            exit /b
        )
    )
    endlocal & set "GIT_VERSION_%~1=%GIT_VERSION%" & %lib_console% debug_output :read_version "Env Var - GIT_VERSION_%~1=%GIT_VERSION%"

    exit /b

:parse_version
:::===============================================================================
:::parse_version - Parse semantic version string 'x.x.x.x' and return the pieces
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% parse_version "[VERSION]"
:::.
:::required:
:::.
:::  [SCOPE]     <in> USER | VENDORED
:::  [VERSION]   <in> Semantic version String. Ex: 1.2.3.4
:::.
:::output:
:::.
:::  [SCOPE]_MAJOR <out> Scoped Major version.
:::  [SCOPE]_MINOR <out> Scoped Minor version.
:::  [SCOPE]_PATCH <out> Scoped Patch version.
:::  [SCOPE]_BUILD <out> Scoped Build version.
:::-------------------------------------------------------------------------------

    :: process a `x.x.x.xxxx.x` formatted string
    %lib_console% debug_output :parse_version "ARGV[1]=%~1, ARGV[2]=%~2"

    setlocal enabledelayedexpansion
    for /F "tokens=1-3* delims=.,-" %%A in ("%2") do (
        set "%~1_MAJOR=%%A"
        set "%~1_MINOR=%%B"
        set "%~1_PATCH=%%C"
        set "%~1_BUILD=%%D"
    )

    REM endlocal & set "%~1_MAJOR=!%~1_MAJOR!" & set "%~1_MINOR=!%~1_MINOR!" & set "%~1_PATCH=!%~1_PATCH!" & set "%~1_BUILD=!%~1_BUILD!"
    if "%~1" == "VENDORED" (
      endlocal & set "%~1_MAJOR=%VENDORED_MAJOR%" & set "%~1_MINOR=%VENDORED_MINOR%" & set "%~1_PATCH=%VENDORED_PATCH%" & set "%~1_BUILD=%VENDORED_BUILD%"
    ) else (
      endlocal & set "%~1_MAJOR=%USER_MAJOR%" & set "%~1_MINOR=%USER_MINOR%" & set "%~1_PATCH=%USER_PATCH%" & set "%~1_BUILD=%USER_BUILD%"
    )

    exit /b

:endlocal_set_git_version

:validate_version
:::===============================================================================
:::validate_version - Validate semantic version string 'x.x.x.x'.
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% validate_version [SCOPE] [VERSION]
:::.
:::required:
:::.
:::  [SCOPE]     <in> Example:  USER | VENDORED
:::  [VERSION]   <in> Semantic version String. Ex: 1.2.3.4
:::-------------------------------------------------------------------------------

    :: now parse the version information into the corresponding variables
    %lib_console% debug_output :validate_version "ARGV[1]=%~1, ARGV[2]=%~2"

    call :parse_version %~1 %~2

    :: ... and maybe display it, for debugging purposes.
    REM %lib_console% debug_output :validate_version "Found Git Version for %~1: !%~1_MAJOR!.!%~1_MINOR!.!%~1_PATCH!.!%~1_BUILD!"
    if "%~1" == "VENDORED" (
      %lib_console% debug_output :validate_version "Found Git Version for %~1: %VENDORED_MAJOR%.%VENDORED_MINOR%.%VENDORED_PATCH%.%VENDORED_BUILD%"
    ) else (
      %lib_console% debug_output :validate_version "Found Git Version for %~1: %USER_MAJOR%.%USER_MINOR%.%USER_PATCH%.%USER_BUILD%"
    )
    exit /b

:compare_versions
:::===============================================================================
:::compare_version - Compare semantic versions return latest version.
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% validate_version [SCOPE1] [SCOPE2]
:::.
:::required:
:::.
:::  [SCOPE1]    <in> Example: USER
:::  [SCOPE2]    <in> Example: VENDOR
:::-------------------------------------------------------------------------------

    :: checks all major, minor, patch and build variables for the given arguments.
    :: whichever binary that has the most recent version will be used based on the return code.

    %lib_console% debug_output Comparing:
    %lib_console% debug_output %~1: %USER_MAJOR%.%USER_MINOR%.%USER_PATCH%.%USER_BUILD%
    %lib_console% debug_output %~2: %VENDORED_MAJOR%.%VENDORED_MINOR%.%VENDORED_PATCH%.%VENDORED_BUILD%

    setlocal enabledelayedexpansion
    if !%~1_MAJOR! GTR !%~2_MAJOR! (endlocal & exit /b  1)
    if !%~1_MAJOR! LSS !%~2_MAJOR! (endlocal & exit /b -1)

    if !%~1_MINOR! GTR !%~2_MINOR! (endlocal & exit /b  1)
    if !%~1_MINOR! LSS !%~2_MINOR! (endlocal & exit /b -1)

    if !%~1_PATCH! GTR !%~2_PATCH! (endlocal & exit /b  1)
    if !%~1_PATCH! LSS !%~2_PATCH! (endlocal & exit /b -1)

    if !%~1_BUILD! GTR !%~2_BUILD! (endlocal & exit /b  1)
    if !%~1_BUILD! LSS !%~2_BUILD! (endlocal & exit /b -1)

    :: looks like we have the same versions.
    endlocal & exit /b 0

:::===============================================================================
:::is_git_shim
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% is_git_shim [filepath]
:::.
:::required:
:::.
:::  [filepath]    <in>
:::-------------------------------------------------------------------------------

:is_git_shim
    pushd "%~1"
    :: check if there's shim - and if yes follow the path
    setlocal enabledelayedexpansion
    if exist git.shim (
        for /F "tokens=2 delims== " %%I in (git.shim) do (
            pushd %%~dpI
            set "test_dir=!CD!"
            popd
        )
    ) else (
        set "test_dir=!CD!"
    )
    endlocal & set "test_dir=%test_dir%"

    popd
    exit /b

:::===============================================================================
:::compare_git_versions
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% compare_git_versions
:::-------------------------------------------------------------------------------

:compare_git_versions
    if %errorlevel% geq 0 (
        :: compare the user git version against the vendored version
        %lib_git% compare_versions USER VENDORED

        :: use the user provided git if its version is greater than, or equal to the vendored git
        if %errorlevel% geq 0 if exist "%test_dir:~0,-4%\cmd\git.exe" (
            set "GIT_INSTALL_ROOT=%test_dir:~0,-4%"
            set test_dir=
        ) else if %errorlevel% geq 0 (
            set "GIT_INSTALL_ROOT=%test_dir%"
            set test_dir=
        ) else (
            call :verbose_output Found old %GIT_VERSION_USER% in "%test_dir%", but not using...
            set test_dir=
        )
    ) else (
        :: compare the user git version against the vendored version
        :: if the user provided git executable is not found
        if %errorlevel% equ -255 (
            call :verbose_output No git at "%git_executable%" found.
            set test_dir=
        )
    )
    exit /b

:::===============================================================================
:::get_user_git_version - get the version information for the user provided git binary
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% get_user_git_version
:::-------------------------------------------------------------------------------

:get_user_git_version
    :: get the version information for the user provided git binary
    %lib_git% read_version USER "%test_dir%"
    %lib_git% validate_version USER %GIT_VERSION_USER%
    exit  /b

@echo off

call "%~dp0lib_base.cmd"
call "%%~dp0lib_console.cmd"
set lib_git=call "%~dp0lib_git.cmd"

if "%~1" == "/h" (
    %lib_base% help "%~0"
) else if "%1" neq "" (
    call :%*
)

exit /b

:read_version
:::===============================================================================
:::read_version - Get the git.exe verion
:::.
:::include:
:::.
:::  call "lib_git.cmd"
:::.
:::usage:
:::.
:::  %lib_git% read_version "[dir_path]"
:::.
:::required:
:::.
:::  [GIT SCOPE]   <in> USER | VENDORED
:::  [GIT PATH]    <in> Fully qualified path to the Git command root.
:::.
:::output:
:::.
:::  GIT_VERSION_[GIT SCOPE] <out> Env variable containing Git semantic version string
:::-------------------------------------------------------------------------------

    :: clear the variables
    set GIT_VERSION_%~1=

    :: set the executable path
    set "git_executable=%~2\git.exe"
    %lib_console% debug_output :read_version "Env Var - git_executable=%git_executable%"

    :: check if the executable actually exists
    if not exist "%git_executable%" (
        %lib_console% debug_output :read_version "%git_executable% does not exist."
        exit /b -255
    )

    :: get the git version in the provided directory

    "%git_executable%" --version > "%temp%\git_version.txt"
    setlocal enabledelayedexpansion
    for /F "tokens=1,2,3 usebackq" %%A in (`type "%temp%\git_version.txt" 2^>nul`) do (
        if /i "%%A %%B" == "git version" (
            set "GIT_VERSION=%%C"
        ) else (
            echo "'git --version' returned an inproper version string!"
            pause
            exit /b
        )
    )
    endlocal & set "GIT_VERSION_%~1=%GIT_VERSION%" & %lib_console% debug_output :read_version "Env Var - GIT_VERSION_%~1=%GIT_VERSION%"

    exit /b

:parse_version
:::===============================================================================
:::parse_version - Parse semantic version string 'x.x.x.x' and return the pieces
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% parse_version "[VERSION]"
:::.
:::required:
:::.
:::  [SCOPE]     <in> USER | VENDORED
:::  [VERSION]   <in> Semantic version String. Ex: 1.2.3.4
:::.
:::output:
:::.
:::  [SCOPE]_MAJOR <out> Scoped Major version.
:::  [SCOPE]_MINOR <out> Scoped Minor version.
:::  [SCOPE]_PATCH <out> Scoped Patch version.
:::  [SCOPE]_BUILD <out> Scoped Build version.
:::-------------------------------------------------------------------------------

    :: process a `x.x.x.xxxx.x` formatted string
    %lib_console% debug_output :parse_version "ARGV[1]=%~1, ARGV[2]=%~2"

    setlocal enabledelayedexpansion
    for /F "tokens=1-3* delims=.,-" %%A in ("%2") do (
        set "%~1_MAJOR=%%A"
        set "%~1_MINOR=%%B"
        set "%~1_PATCH=%%C"
        set "%~1_BUILD=%%D"
    )

    REM endlocal & set "%~1_MAJOR=!%~1_MAJOR!" & set "%~1_MINOR=!%~1_MINOR!" & set "%~1_PATCH=!%~1_PATCH!" & set "%~1_BUILD=!%~1_BUILD!"
    if "%~1" == "VENDORED" (
      endlocal & set "%~1_MAJOR=%VENDORED_MAJOR%" & set "%~1_MINOR=%VENDORED_MINOR%" & set "%~1_PATCH=%VENDORED_PATCH%" & set "%~1_BUILD=%VENDORED_BUILD%"
    ) else (
      endlocal & set "%~1_MAJOR=%USER_MAJOR%" & set "%~1_MINOR=%USER_MINOR%" & set "%~1_PATCH=%USER_PATCH%" & set "%~1_BUILD=%USER_BUILD%"
    )

    exit /b

:endlocal_set_git_version

:validate_version
:::===============================================================================
:::validate_version - Validate semantic version string 'x.x.x.x'.
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% validate_version [SCOPE] [VERSION]
:::.
:::required:
:::.
:::  [SCOPE]     <in> Example:  USER | VENDORED
:::  [VERSION]   <in> Semantic version String. Ex: 1.2.3.4
:::-------------------------------------------------------------------------------

    :: now parse the version information into the corresponding variables
    %lib_console% debug_output :validate_version "ARGV[1]=%~1, ARGV[2]=%~2"

    call :parse_version %~1 %~2

    :: ... and maybe display it, for debugging purposes.
    REM %lib_console% debug_output :validate_version "Found Git Version for %~1: !%~1_MAJOR!.!%~1_MINOR!.!%~1_PATCH!.!%~1_BUILD!"
    if "%~1" == "VENDORED" (
      %lib_console% debug_output :validate_version "Found Git Version for %~1: %VENDORED_MAJOR%.%VENDORED_MINOR%.%VENDORED_PATCH%.%VENDORED_BUILD%"
    ) else (
      %lib_console% debug_output :validate_version "Found Git Version for %~1: %USER_MAJOR%.%USER_MINOR%.%USER_PATCH%.%USER_BUILD%"
    )
    exit /b

:compare_versions
:::===============================================================================
:::compare_version - Compare semantic versions return latest version.
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% validate_version [SCOPE1] [SCOPE2]
:::.
:::required:
:::.
:::  [SCOPE1]    <in> Example: USER
:::  [SCOPE2]    <in> Example: VENDOR
:::-------------------------------------------------------------------------------

    :: checks all major, minor, patch and build variables for the given arguments.
    :: whichever binary that has the most recent version will be used based on the return code.

    %lib_console% debug_output Comparing:
    %lib_console% debug_output %~1: %USER_MAJOR%.%USER_MINOR%.%USER_PATCH%.%USER_BUILD%
    %lib_console% debug_output %~2: %VENDORED_MAJOR%.%VENDORED_MINOR%.%VENDORED_PATCH%.%VENDORED_BUILD%

    setlocal enabledelayedexpansion
    if !%~1_MAJOR! GTR !%~2_MAJOR! (endlocal & exit /b  1)
    if !%~1_MAJOR! LSS !%~2_MAJOR! (endlocal & exit /b -1)

    if !%~1_MINOR! GTR !%~2_MINOR! (endlocal & exit /b  1)
    if !%~1_MINOR! LSS !%~2_MINOR! (endlocal & exit /b -1)

    if !%~1_PATCH! GTR !%~2_PATCH! (endlocal & exit /b  1)
    if !%~1_PATCH! LSS !%~2_PATCH! (endlocal & exit /b -1)

    if !%~1_BUILD! GTR !%~2_BUILD! (endlocal & exit /b  1)
    if !%~1_BUILD! LSS !%~2_BUILD! (endlocal & exit /b -1)

    :: looks like we have the same versions.
    endlocal & exit /b 0

:::===============================================================================
:::is_git_shim
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% is_git_shim [filepath]
:::.
:::required:
:::.
:::  [filepath]    <in>
:::-------------------------------------------------------------------------------

:is_git_shim
    pushd "%~1"
    :: check if there's shim - and if yes follow the path
    setlocal enabledelayedexpansion
    if exist git.shim (
        for /F "tokens=2 delims== " %%I in (git.shim) do (
            pushd %%~dpI
            set "test_dir=!CD!"
            popd
        )
    ) else (
        set "test_dir=!CD!"
    )
    endlocal & set "test_dir=%test_dir%"

    popd
    exit /b

:::===============================================================================
:::compare_git_versions
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% compare_git_versions
:::-------------------------------------------------------------------------------

:compare_git_versions
    if ERRORLEVEL 0 (
        :: compare the user git version against the vendored version
        %lib_git% compare_versions USER VENDORED

        :: use the user provided git if its version is greater than, or equal to the vendored git
        if ERRORLEVEL 0 if exist "%test_dir:~0,-4%\cmd\git.exe" (
            set "GIT_INSTALL_ROOT=%test_dir:~0,-4%"
            set test_dir=
        ) else if ERRORLEVEL 0 (
            set "GIT_INSTALL_ROOT=%test_dir%"
            set test_dir=
        ) else (
            call :verbose_output Found old %GIT_VERSION_USER% in "%test_dir%", but not using...
            set test_dir=
        )
    ) else (
        :: compare the user git version against the vendored version
        :: if the user provided git executable is not found
        IF ERRORLEVEL -255 IF NOT ERRORLEVEL -254 (
            call :verbose_output No git at "%git_executable%" found.
            set test_dir=
        )
    )
    exit /b

:::===============================================================================
:::get_user_git_version - get the version information for the user provided git binary
:::.
:::include:
:::.
:::  call "$0"
:::.
:::usage:
:::.
:::  %lib_git% get_user_git_version
:::-------------------------------------------------------------------------------

:get_user_git_version
    :: get the version information for the user provided git binary
    %lib_git% read_version USER "%test_dir%"
    %lib_git% validate_version USER %GIT_VERSION_USER%
    exit  /b

Use ERRORLEVEL instead of %errorlevel% to compare git versions

%errorlevel% was always 0, even if the vendored git version was more current than the installed one
Usually exiting a batch script with "exit /b exitCode" as used in :compare_versions
sets %errorlevel% to the specified exit code
However, this may not work if %errorlevel% was set before with "Set errorlevel="
I didn't find the location where this might have happened,
but I saw the consequence of %errorlevel% always being 0
Thus I decided to use ERRORLEVEL instead as this will always work regardless of environment variable

For more information check https://ss64.com/nt/errorlevel.html


:: docker rmi $(docker images -a -q)
:: docker rm $(docker ps -a -f status=exited -q)
docker volume prune
docker system prune

add clean script

add clean script


rem USAGE: unity_RunAutoTests.bat [<UnityExe>] [<SdkRepoName>] [<ProjRootPath>] [<BuildIdentifier>]
@echo on
rem Make folder links from the UnitySdk to this test project
rem Requires mklink which may require administrator
rem Requires the following environment variables:
rem   TestAndroid - (Optional - Default true if unset) set to "false" (without quotes) to skip building Android APK
rem   TestiPhone - (Optional - Default true if unset) set to "false" (without quotes) to skip building iOS XCode project
rem   TestWp8 - (Optional - Default true if unset) set to "false" (without quotes) to skip building Windows Universal 8 vs-sln
rem   TestPS4 - (Optional - Default true if unset) set to "false" (without quotes) to skip building PS4
rem   UNITY_PUBLISH_VERSION - (Not required if %1 is defined) Versioned Unity executable name (Assumes multiple potential Unity installations, all in your PATH, each uniquely renamed)
rem   EXECUTOR_NUMBER - (Not required if %4 is defined) Automatic Jenkins variable

setlocal
if [%1]==[] (
    set UnityExe=%UNITY_PUBLISH_VERSION%
) ELSE (
    set UnityExe=%1
)
if [%2]==[] (
    set SdkName=UnitySDK
) ELSE (
    set SdkName=%2
)
if [%3]==[] (
    set ProjRootPath=C:\dev\UnityProjects\%UnityExe%
) ELSE (
    set ProjRootPath=%~3
)
if [%4]==[] (
    set BuildIdentifier=JBuild_%SdkName%_%EXECUTOR_NUMBER%
) ELSE (
    set BuildIdentifier=%4
)
if [%TestAndroid%]==[] (set TestAndroid=true)
if [%TestiPhone%]==[] (set TestiPhone=true)
if [%TestWp8%]==[] (set TestWp8=true)
if [%TestPS4%]==[] (set TestPS4=false)

call :SetProjDefines
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :RunClientJenkernaught1
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :RunClientJenkernaught2
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :RunClientJenkernaught3
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestAndroid%]==[true] (call :BuildAndroid)
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestiPhone%]==[true] (call :BuildiPhone)
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestWp8%]==[true] (call :BuildWp8)
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestPS4%]==[true] (call :BuildPS4)
endlocal
exit /b %errorLevel%

:SetProjDefines
echo === Test compilation in all example projects ===
call :SetEachProjDefine %SdkName%_BUP
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TA
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TC
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TS
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TZ
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
goto :EOF

:SetEachProjDefine
cd "%ProjRootPath%\%1"
%UnityExe% -projectPath "%ProjRootPath%\%1" -quit -batchmode -executeMethod SetupPlayFabExample.Setup -logFile "%ProjRootPath%\compile%1.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\compile%1.txt"
    exit /b %errorLevel%
)
goto :EOF

:RunClientJenkernaught1
echo === Build Win32 Client Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeWin32TestingBuild -logFile "%ProjRootPath%\buildWin32Client.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildWin32Client.txt"
    exit /b %errorLevel%
)
goto :EOF

:RunClientJenkernaught2
echo === Run the %UnityExe% Client UnitTests ===
cd "%ProjRootPath%\%SdkName%_TC\testBuilds"
Win32test -batchmode -nographics -logFile "%ProjRootPath%\clientTestOutput.txt"
if %errorLevel% NEQ 0 (
    exit /b %errorLevel%
)
goto :EOF

:RunClientJenkernaught3
echo === Save test results to Jenkernaught ===
cd %WORKSPACE%/SDKGenerator/JenkinsConsoleUtility/bin/Debug
JenkinsConsoleUtility --listencs -buildIdentifier %BuildIdentifier% -workspacePath %WORKSPACE% -timeout 30 -verbose true
if %errorLevel% NEQ 0 (
    exit /b %errorLevel%
)
goto :EOF

:BuildAndroid
echo === Build Android Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeAndroidBuild -logFile "%ProjRootPath%\buildAndroidOutput.txt"
if %errorLevel% NEQ 0 (
    "%ProjRootPath%\buildAndroidOutput.txt"
    exit /b %errorLevel%
)
goto :EOF

:BuildiPhone
echo === Build iPhone Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeIPhoneBuild -logFile "%ProjRootPath%\buildiPhoneOutput.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildiPhoneOutput.txt"
    exit /b %errorLevel%
)
goto :EOF

:BuildWp8
echo === Build WinPhone Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeWp8Build -logFile "%ProjRootPath%\buildWp8Output.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildWp8Output.txt"
    exit /b %errorLevel%
)
goto :EOF

:BuildPS4
echo === Build PS4 Target ===
cd "%ProjRootPath%\%SdkName%_TC"
pushd "%WORKSPACE%/SDKGenerator/SDKBuildScripts"
sh unity_copyTestTitleData.sh "%WORKSPACE%/sdks/UnitySDK/Testing/Resources" copy
popd
%UnityExe% -projectPath="%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakePS4Build -logFile "%ProjRootPath%\buildPS4Output.txt"
pushd "%WORKSPACE%/SDKGenerator/SDKBuildScripts"
sh unity_copyTestTitleData.sh "%WORKSPACE%/sdks/UnitySDK/Testing/Resources" delete
popd
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildPS4Output.txt"
    exit /b %errorLevel%
)
goto :EOF

rem USAGE: unity_RunAutoTests.bat [<UnityExe>] [<SdkRepoName>] [<ProjRootPath>] [<BuildIdentifier>]
@echo on
rem Make folder links from the UnitySdk to this test project
rem Requires mklink which may require administrator
rem Requires the following environment variables:
rem   TestAndroid - (Optional - Default true if unset) set to "false" (without quotes) to skip building Android APK
rem   TestiPhone - (Optional - Default true if unset) set to "false" (without quotes) to skip building iOS XCode project
rem   TestWp8 - (Optional - Default true if unset) set to "false" (without quotes) to skip building Windows Universal 8 vs-sln
rem   TestPS4 - (Optional - Default true if unset) set to "false" (without quotes) to skip building PS4
rem   UNITY_PUBLISH_VERSION - (Not required if %1 is defined) Versioned Unity executable name (Assumes multiple potential Unity installations, all in your PATH, each uniquely renamed)
rem   EXECUTOR_NUMBER - (Not required if %4 is defined) Automatic Jenkins variable

setlocal
if [%1]==[] (
    set UnityExe=%UNITY_PUBLISH_VERSION%
) ELSE (
    set UnityExe=%1
)
if [%2]==[] (
    set SdkName=UnitySDK
) ELSE (
    set SdkName=%2
)
if [%3]==[] (
    set ProjRootPath=C:\dev\UnityProjects\%UnityExe%
) ELSE (
    set ProjRootPath=%~3
)
if [%4]==[] (
    set BuildIdentifier=JBuild_%SdkName%_%EXECUTOR_NUMBER%
) ELSE (
    set BuildIdentifier=%4
)
if [%TestAndroid%]==[] (set TestAndroid=true)
if [%TestiPhone%]==[] (set TestiPhone=true)
if [%TestWp8%]==[] (set TestWp8=true)
if [%TestPS4%]==[] (set TestPS4=false)

call :SetProjDefines
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :RunClientJenkernaught1
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :RunClientJenkernaught2
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :RunClientJenkernaught3
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestAndroid%]==[true] (call :BuildAndroid)
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestiPhone%]==[true] (call :BuildiPhone)
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestWp8%]==[true] (call :BuildWp8)
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
IF [%TestPS4%]==[true] (call :BuildPS4)
endlocal
exit /b %errorLevel%

:SetProjDefines
echo === Test compilation in all example projects ===
call :SetEachProjDefine %SdkName%_BUP
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TA
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TC
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TS
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
call :SetEachProjDefine %SdkName%_TZ
if %errorLevel% NEQ 0 (exit /b %errorLevel%)
goto :EOF

:SetEachProjDefine
cd "%ProjRootPath%\%1"
%UnityExe% -projectPath "%ProjRootPath%\%1" -quit -batchmode -executeMethod SetupPlayFabExample.Setup -logFile "%ProjRootPath%\compile%1.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\compile%1.txt"
    exit /b %errorLevel%
)
goto :EOF

:RunClientJenkernaught1
echo === Build Win32 Client Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeWin32TestingBuild -logFile "%ProjRootPath%\buildWin32Client.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildWin32Client.txt"
    exit /b %errorLevel%
)
goto :EOF

:RunClientJenkernaught2
echo === Run the %UnityExe% Client UnitTests ===
cd "%ProjRootPath%\%SdkName%_TC\testBuilds"
Win32test -batchmode -nographics -logFile "%ProjRootPath%\clientTestOutput.txt"
if %errorLevel% NEQ 0 (
    exit /b %errorLevel%
)
goto :EOF

:RunClientJenkernaught3
echo === Save test results to Jenkernaught ===
cd %WORKSPACE%/SDKGenerator/JenkinsConsoleUtility/bin/Debug
JenkinsConsoleUtility --listencs -buildIdentifier %BuildIdentifier% -workspacePath %WORKSPACE% -timeout 30 -verbose true
if %errorLevel% NEQ 0 (
    exit /b %errorLevel%
)
goto :EOF

:BuildAndroid
echo === Build Android Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeAndroidBuild -logFile "%ProjRootPath%\buildAndroidOutput.txt"
if %errorLevel% NEQ 0 (
    "%ProjRootPath%\buildAndroidOutput.txt"
    exit /b %errorLevel%
)
goto :EOF

:BuildiPhone
echo === Build iPhone Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeIPhoneBuild -logFile "%ProjRootPath%\buildiPhoneOutput.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildiPhoneOutput.txt"
    exit /b %errorLevel%
)
goto :EOF

:BuildWp8
echo === Build WinPhone Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath "%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakeWp8Build -logFile "%ProjRootPath%\buildWp8Output.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildWp8Output.txt"
    exit /b %errorLevel%
)
goto :EOF

:BuildPS4
echo === Build PS4 Target ===
cd "%ProjRootPath%\%SdkName%_TC"
%UnityExe% -projectPath="%ProjRootPath%\%SdkName%_TC" -quit -batchmode -executeMethod PlayFab.Internal.PlayFabPackager.MakePS4Build -logFile "%ProjRootPath%\buildPS4Output.txt"
if %errorLevel% NEQ 0 (
    type "%ProjRootPath%\buildPS4Output.txt"
    exit /b %errorLevel%
)
goto :EOF

Revert "Update unity_RunAutoTests.bat (#511)" (#512)

This reverts commit 4a55c57ee15ead19d203412b02e1e33044bef55e.


SET XLL_PATH=.\utils\QuantLibXL-vc120-mt-s-1_7_0.xll
@REM 30-SEP-2015
SET EVAL_DATE=42277
SET XLS_PATH=.\EUR_Market\EUR_Market.xlsm
START "EXCEL" "EXCEL.EXE" /e .\init.xlam

SET XLL_PATH=..\xll\QuantLibXL-vc90-mt-s-1_8_0.xll
SET XLS_PATH=.\EUR_Market\EUR_Market.xlsm
@REM 30-SEP-2015
SET EVAL_DATE=42277
START "EXCEL" "EXCEL.EXE" /e .\init.xlam

update batch file

update batch file


@echo off
::Build Native Tools Such as Launcher.
::PowerShell Must input param
::BuildNative.bat OS64BIT or OS32BIT or OSARM OSAArch64
::Read http://msdn.microsoft.com/en-us/library/hs24szh9.aspx |http://msdn.microsoft.com/en-us/library/hs24szh9(v=vs.120).aspx
::VisualStudio Express for Windows Desktop Support 32-bit X86 compiler X86_ x64 cross-compiler
::VisualStudio Express for Windows Support 32-bit X86 compiler X86_ x64 cross-compiler X86_arm cross-compiler
::This Tools Must use Visual Studio 11(2012) or Later
IF /i "%1" =="OS64BIT" goto OS64BIT
IF /i "%1" == "OS32BIT" goto OS32BIT
IF /i "%1" == "OSARM" goto OSARM
IF /i "%1" == "OSAArch64" goto OSAARCH64
echo "Goto Default System 32BIT....."
goto OS32BIT
:OS64BIT
goto VS120ENVCALL64C
:OS32BIT
if exist "%SystemRoot%\SysWOW64" goto OS64BIT
goto VS120ENV86CALL
:OSARM
if not exist "%VS140COMNTOOLS%..\..\VC\bin\x86_arm" goto VAILDVSNOTFOUD
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_arm
goto BuildNative

:OSAARCH64
echo "Not Open Support Now"
goto :EOF

::64BIT Build
:VS120ENVCALL64C
IF not exist "%VS120COMNTOOLS%..\..\VC\bin\x86_amd64"  goto VS110ENVCALL64C
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_amd64
goto BuildNative

:VS110ENVCALL64C
if not exist "%VS110COMNTOOLS%..\..\VC\bin\x86_amd64"  goto VS140ENVCALL64C
call "%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_amd64
goto BuildNative

:VS110ENVCALL64C
if not exist "%VS140COMNTOOLS%..\..\VC\bin\x86_amd64"  goto VAILDVSNOTFOUD
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_amd64
goto BuildNative

::X86 Build
:VS120ENV86CALL
IF not exist "%VS120COMNTOOLS%"  goto VS10ENVC86ALL
call "%VS120COMNTOOLS%.\VsDevCmd.bat"
goto BuildNative

:VS110ENVC86ALL
if not exist %VS110COMNTOOLS%  goto VS140ENVC86ALL
call "%VS110COMNTOOLS%\VsDevCmd.bat"
goto BuildNative

:VS140ENV86CALL
if not exist %VS140COMNTOOLS%  goto VAILDVSNOTFOUD
call "%VS140COMNTOOLS%\VsDevCmd.bat"
goto BuildNative

:BuildNative
cd /d %~dp0Launcher
nmake -f Makefile.mk

goto :EOF
:VAILDVSNOTFOUD
echo Couldn't find valid VisualStudio

@echo off
::Build Native Tools Such as Launcher.
::PowerShell Must input param
::BuildNative.bat OS64BIT or OS32BIT or OSARM OSAArch64
::Read http://msdn.microsoft.com/en-us/library/hs24szh9.aspx |http://msdn.microsoft.com/en-us/library/hs24szh9(v=vs.120).aspx
::VisualStudio Express for Windows Desktop Support 32-bit X86 compiler X86_ x64 cross-compiler
::VisualStudio Express for Windows Support 32-bit X86 compiler X86_ x64 cross-compiler X86_arm cross-compiler
::This Tools Must use Visual Studio 11(2012) or Later
IF /i "%1" =="OS64BIT" goto OS64BIT
IF /i "%1" == "OS32BIT" goto OS32BIT
IF /i "%1" == "OSARM" goto OSARM
IF /i "%1" == "OSAArch64" goto OSAARCH64
echo "Goto Default System 32BIT....."
goto OS32BIT
:OS64BIT
goto VS120ENVCALL64C
:OS32BIT
if exist "%SystemRoot%\SysWOW64" goto OS64BIT
goto VS120ENV86CALL
:OSARM
if not exist "%VS140COMNTOOLS%..\..\VC\bin\x86_arm" goto VAILDVSNOTFOUD
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_arm
goto BuildNative

:OSAARCH64
echo "Not Open Support Now"
goto :EOF

::64BIT Build
:VS120ENVCALL64C
IF not exist "%VS120COMNTOOLS%..\..\VC\bin\x86_amd64"  goto VS110ENVCALL64C
call "%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_amd64
goto BuildNative

:VS110ENVCALL64C
if not exist "%VS110COMNTOOLS%..\..\VC\bin\x86_amd64"  goto VS140ENVCALL64C
call "%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_amd64
goto BuildNative

:VS140ENVCALL64C
if not exist "%VS140COMNTOOLS%..\..\VC\bin\x86_amd64"  goto VAILDVSNOTFOUD
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"  x86_amd64
goto BuildNative

::X86 Build
:VS120ENV86CALL
IF not exist "%VS120COMNTOOLS%"  goto VS110ENVC86ALL
call "%VS120COMNTOOLS%.\VsDevCmd.bat"
goto BuildNative

:VS110ENVC86ALL
if not exist %VS110COMNTOOLS%  goto VS140ENVC86ALL
call "%VS110COMNTOOLS%\VsDevCmd.bat"
goto BuildNative

:VS140ENVC86ALL
if not exist %VS140COMNTOOLS%  goto VAILDVSNOTFOUD
call "%VS140COMNTOOLS%\VsDevCmd.bat"
goto BuildNative

:BuildNative
cd /d %~dp0Launcher
nmake -f Makefile.mk

goto :EOF
:VAILDVSNOTFOUD
echo Couldn't find valid VisualStudio

fix Launcher auto build bat

fix Launcher auto build bat