@rem Copyright 2019 Google Inc. All Rights Reserved.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem     http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.

@setlocal
@echo off

@rem This is a convenience wrapper for recording heap snapshots for
@rem investigating heap memory leaks, as discussed here:
@rem https://docs.microsoft.com/en-us/windows-hardware/test/wpt/record-heap-snapshot
@rem You run this script and pass it the pid of the process of interest,
@rem or a path to a process that you want started. Note that if this batch file
@rem starts a process then it will, necessarily, be run as administrator, and
@rem some initial allocations will be missed.
@rem You can start recording heap data anytime you want, but right at
@rem process startup is one obvious time. wpr will also let you specify the
@rem process of interest by name but that works poorly with Chrome
@rem and its dozens of processes and it is not supported by this script.
@rem When the script runs it tells the specified process to start recording
@rem call stacks for all outstanding memory allocations. When you hit
@rem enter a snapshot of this data is recorded into an ETW trace. You then have
@rem the option to record subsequent traces (one snapshot each) or exit and
@rem disable heap snapshots. Note that it is quite possible to put multiple
@rem snapshots in one file, but this script does not support this.

@rem Set the etwtracedir environment variable if it isn't set already.
@if not "%etwtracedir%" == "" goto TraceDirSet
@set etwtracedir=%homedrive%%homepath%\documents\etwtraces
:TraceDirSet

@rem Make sure %etwtracedir% exists
@if exist "%etwtracedir%" goto TraceDirExists
@mkdir "%etwtracedir%"
:TraceDirExists

if not "%1" == "" goto hasarg
@echo Required argument is missing. Specify a PID or a path to an executable
@echo to launch.
@exit /b
:hasarg

@rem See if %1 is a PID or a process path, start a process if needed, put the
@rem pid in %pid%. Note that if we start the process here then the first few
@rem allocations will be missed. Start the process with DelayedCreateProcess.exe
@rem in another command prompt and then (quickly) run this batch file with the
@rem pid if you want to avoid this.
set pid=none
set "var="&for /f "delims=0123456789" %%i in ("%1") do @set var=%%i
if defined var (
    FOR /f "usebackq tokens=*" %%a in (`DelayedCreateProcess.exe "%*" 0`) do set pid=%%a
    ) else (
    set pid=%1
    )

@rem Exit if CreateProcess failed
if %pid%==none exit /b

@echo Starting at %date%, %time%

@rem Enable echo so that users can see the commands that are being run.
@echo on

@rem Tell the process to start recording stacks on all subsequent outstanding
@rem allocations.
wpr -snapshotconfig heap -pid %pid% enable

@echo Run your scenario and hit any non-'q' key when you want a snapshot saved.
@echo You can stay in this state for as long as you want - days if desired -
@echo but performance of the target process may be worse during this time.
:WaitAgain
@set /p quit=Type 'q' and enter if you want to quit, or enter to save a snapshot:
@if "%quit%"=="q" goto leave

@rem Generate a file name based on the current date and time and put it in
@rem etwtracedir. This is compatible with UIforETW which looks for traces there.
@rem Note: this probably fails in some locales. Sorry.
@for /F "tokens=2-4 delims=/- " %%A in ('date/T') do @set datevar=%%C-%%A-%%B
@for /F "tokens=1-3 delims=:-. " %%A in ('echo %time%') do @set timevar=%%A-%%B-%%C&set hour=%%A
@rem Make sure that morning hours such as 9:00 are handled as 09 rather than 9
@if %hour% LSS 10 set timevar=0%timevar%
@set FileName=%etwtracedir%\%datevar%_%timevar% %username% heapsnapshot %pid%.etl
@echo Trace will be saved to %FileName%

@rem Don't start tracing until we are ready to do the snapshot.
@rem This avoids filling the trace with GB of process-create
@rem events that we don't care about.
wpr -start heapsnapshot -filemode
wpr -singlesnapshot heap %pid%
wpr -stop "%temp%\UIforETW_heap_snapshot.etl"
xperf -merge "%temp%\UIforETW_heap_snapshot.etl" "%FileName%"
del "%temp%\UIforETW_heap_snapshot.etl"
@echo Trace data is in %FileName% -- load it with wpa or xperfview or gpuview.
@dir "%FileName%" | find /i ".etl"

@goto WaitAgain

:leave
@rem When we are done, turn off heap tracing for this process.
wpr -snapshotconfig heap -pid %pid% disable

@rem Copyright 2019 Google Inc. All Rights Reserved.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem     http://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.

@setlocal
@echo off

@rem This is a convenience wrapper for recording heap snapshots for
@rem investigating heap memory leaks, as discussed here:
@rem https://docs.microsoft.com/en-us/windows-hardware/test/wpt/record-heap-snapshot
@rem You run this script and pass it the pid of the process of interest,
@rem or a path to a process that you want started. Note that if this batch file
@rem starts a process then it will, necessarily, be run as administrator, and
@rem some initial allocations will be missed.
@rem You can start recording heap data anytime you want, but right at
@rem process startup is one obvious time. wpr will also let you specify the
@rem process of interest by name but that works poorly with Chrome
@rem and its dozens of processes and it is not supported by this script.
@rem When the script runs it tells the specified process to start recording
@rem call stacks for all outstanding memory allocations. When you hit
@rem enter a snapshot of this data is recorded into an ETW trace. You then have
@rem the option to record subsequent traces (one snapshot each) or exit and
@rem disable heap snapshots. Note that it is quite possible to put multiple
@rem snapshots in one file, but this script does not support this.

@rem Set the etwtracedir environment variable if it isn't set already.
@if not "%etwtracedir%" == "" goto TraceDirSet
@set etwtracedir=%homedrive%%homepath%\documents\etwtraces
:TraceDirSet

@rem Make sure %etwtracedir% exists
@if exist "%etwtracedir%" goto TraceDirExists
@mkdir "%etwtracedir%"
:TraceDirExists

if not "%1" == "" goto hasarg
@echo Required argument is missing. Specify a PID or a path to an executable
@echo to launch.
@exit /b
:hasarg

@rem See if %1 is a PID or a process path, start a process if needed, put the
@rem pid in %pid%. Note that if we start the process here then the first few
@rem allocations will be missed. Start the process with DelayedCreateProcess.exe
@rem in another command prompt and then (quickly) run this batch file with the
@rem pid if you want to avoid this.
set pid=none
set "var="&for /f "delims=0123456789" %%i in ("%1") do @set var=%%i
if defined var (
    FOR /f "usebackq tokens=*" %%a in (`DelayedCreateProcess.exe "%*" 0`) do set pid=%%a
    ) else (
    set pid=%1
    )

@rem Exit if CreateProcess failed
if %pid%==none exit /b

@echo Starting at %date%, %time%

@rem Enable echo so that users can see the commands that are being run.
@echo on

@rem Tell the process to start recording stacks on all subsequent outstanding
@rem allocations.
wpr -snapshotconfig heap -pid %pid% enable

@echo Run your scenario and hit any non-'q' key when you want a snapshot saved.
@echo You can stay in this state for as long as you want - days if desired -
@echo but performance of the target process may be worse during this time.
:WaitAgain
@set /p quit=Type 'q' and enter if you want to quit, or enter to save a snapshot:
@if "%quit%"=="q" goto leave

@rem Generate a file name based on the current date and time and put it in
@rem etwtracedir. This is compatible with UIforETW which looks for traces there.
@rem Note: this probably fails in some locales. Sorry.
@for /F "tokens=2-4 delims=/- " %%A in ('date/T') do @set datevar=%%C-%%A-%%B
@for /F "tokens=1-3 delims=:-. " %%A in ('echo %time%') do @set timevar=%%A-%%B-%%C&set hour=%%A
@rem Make sure that morning hours such as 9:00 are handled as 09 rather than 9
@if %hour% LSS 10 set timevar=0%timevar%
@set FileName=%etwtracedir%\%datevar%_%timevar% %username% heapsnapshot %pid%.etl
@echo Trace will be saved to %FileName%

@rem Don't start tracing until we are ready to do the snapshot.
@rem This avoids filling the trace with GB of process-create
@rem events that we don't care about.
wpr -start heapsnapshot -filemode
wpr -singlesnapshot heap %pid%
wpr -stop "%temp%\UIforETW_heap_snapshot.etl"
@rem Merging the trace ensures that machine-specific data is pulled in, and
@rem gives an opportunity to compress the trace.
xperf -merge "%temp%\UIforETW_heap_snapshot.etl" "%FileName%" -compress
@if not %errorlevel% equ 0 goto noxperf
del "%temp%\UIforETW_heap_snapshot.etl"
@goto xperf_worked
:noxperf
@echo xperf.exe failed (or wasn't found). Skipping merge step. Trace may not work.
move "%temp%\UIforETW_heap_snapshot.etl" "%FileName%"
:xperf_worked
@echo Trace data is in %FileName% -- load it with wpa or xperfview or gpuview.
@dir "%FileName%" | find /i ".etl"

@goto WaitAgain

:leave
@rem When we are done, turn off heap tracing for this process.
wpr -snapshotconfig heap -pid %pid% disable

Update etwheapsnapshot.bat - trace compression

This change adds trace compression to ETW heap snapshot recording. I'm
not sure how that got missed when it was originally written. On the 34
heap snapshot traces that I have lying around this saves 4.6 GB (!!!)
which seems worth doing.

This also modifies the script so that it will handle it more gracefully
if xperf.exe is not available. I don't know for sure if the resulting
(unmerged) trace will work correctly but it's worth a try.


@echo off
@echo SCRIPT: windows_prefix
if "%1"=="" goto default_value_python:
if "%1"=="default" goto default_value_python:
set pythonexe=%1
goto start_script:

:default_value_python:
set pythonexe=c:\Python36_x64\python

@echo ~SET pythonexe=%pythonexe%

:start_script:
set current=%~dp0
@echo ~SET current=%current%
set PYTHONPATH=%current%\src

%pythonexe% -u %current%..\setup.py update_grammars
if %errorlevel% neq 0 exit /b %errorlevel%

@echo off
@echo SCRIPT: windows_prefix
if "%1"=="" goto default_value_python:
if "%1"=="default" goto default_value_python:
set pythonexe=%1
goto start_script:

:default_value_python:
set pythonexe=c:\Python36_x64\python

@echo ~SET pythonexe=%pythonexe%

:start_script:
set current=%~dp0
@echo ~SET current=%current%
set PYTHONPATH=%current%\src

%pythonexe% -u %current%..\setup.py update_grammars MokadiGrammar_fr.g4
if %errorlevel% neq 0 exit /b %errorlevel%

fix script to update the grammar

fix script to update the grammar


@rem = ' vim: set filetype=perl: ';
@rem = ' --*-Perl-*-- ';
@rem = '
@echo off
setlocal
set PATH=%~dp0\perl\bin;%~dp0\bin;%PATH%
perl -w "%~f0" %*
exit /B %ERRORLEVEL%
';

# StorScore
#
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

use strict;
use warnings;

use File::Basename;
use English;

my $script_name = basename( $PROGRAM_NAME );
my $script_dir = dirname( $PROGRAM_NAME );

unless( scalar @ARGV == 1 )
{
    warn "usage: $script_name OUTFILE\n";
    exit(-1);
}

my $outfile = "$script_dir\\$ARGV[0]";

sub my_exec
{
    my $cmd = shift;

    system( "echo TEST_BEGIN >> $outfile" );
    system( "echo $cmd >> $outfile" );

    system( "$cmd >> $outfile 2>&1" );

    system( "echo TEST_END >> $outfile" );
    system( "echo. >> $outfile" );
}

sub run_one
{
    my $args = shift;

    my $cargs;
    $cargs .= "--target=1234 ";
    $cargs .= "--pretend ";
    $cargs .= "--verbose ";
    $cargs .= "--noprompt ";

    # ISSUE-REVIEW:
    # Do --target_type=ssd and --target_type=hdd here instead of below?

    # run default recipe
    my_exec(
        "storscore.cmd $cargs $args"
    );

    # run corners
    my_exec(
        "storscore.cmd $cargs $args --recipe=recipes\\corners.rcp"
    );
}

unlink( $outfile );
chdir( ".." );

# Preserve existing results directory
rename( "results", "results.orig" );

run_one( "" );
run_one( "--this_flag_does_not_exist" );
run_one( "--noinitialize" );
run_one( "--noprecondition" );
run_one( "--target_type=ssd" );
run_one( "--target_type=hdd" );
run_one( "--raw_disk" );
run_one( "--active_range=50" );
run_one( "--partition_bytes=1000000000" );
run_one( "--test_id=regr" );
run_one( "--test_id_prefix=regr" );

# Restore original results directory
system( "rmdir /S /Q results >NUL 2>&1" );
rename( "results.orig", "results" );

# Post process output file to remove noise
rename( $outfile, "$outfile.orig" );

open( my $in, "<$outfile.orig" );
open( my $out, ">$outfile" );

while( my $line = <$in> )
{
    # Remove random temp file names
    $line =~ s/AppData\\\S*//;

    # Remove ETA info
    $line =~ s/\d{2}:\d{2}:\d{2} (AM|PM)//g;

    # Remove time from autogenerated results dir
    if( $line =~ /results/ )
    {
        $line =~ s/-\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}//;
    }

    # Remove "Done" line with overall runtime
    $line =~ s/^Done.*//;

    print $out $line;
}

close $in;
close $out;

unlink( "$outfile.orig" );

print "Done! Diff $outfile against another run.\n";

@rem = ' vim: set filetype=perl: ';
@rem = ' --*-Perl-*-- ';
@rem = '
@echo off
setlocal
set PATH=%~dp0\perl\bin;%~dp0\bin;%PATH%
perl -w "%~f0" %*
exit /B %ERRORLEVEL%
';

# StorScore
#
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

use strict;
use warnings;

use File::Basename;
use English;

my $script_name = basename( $PROGRAM_NAME );
my $script_dir = dirname( $PROGRAM_NAME );

unless( scalar @ARGV == 1 )
{
    warn "usage: $script_name OUTFILE\n";
    exit(-1);
}

my $outfile = "$script_dir\\$ARGV[0]";

sub my_exec
{
    my $cmd = shift;

    system( "echo TEST_BEGIN >> $outfile" );
    system( "echo $cmd >> $outfile" );

    system( "$cmd >> $outfile 2>&1" );

    system( "echo TEST_END >> $outfile" );
    system( "echo. >> $outfile" );
}

sub run_one
{
    my $args = shift;

    my $common_args;
    $common_args .= "--target=1234 ";
    $common_args .= "--pretend ";
    $common_args .= "--verbose ";
    $common_args .= "--noprompt ";

    foreach my $target_type ( qw( auto ssd hdd error ) )
    {
        foreach my $recipe ( undef, 'recipes\\corners.rcp' )
        {
            my $cmd = "storscore.cmd $common_args ";

            $cmd .= "--target_type=$target_type ";
            $cmd .= "--recipe=$recipe " if defined $recipe;

            my_exec( "$cmd $args" );
        }
    }
}

unlink( $outfile );
chdir( ".." );

# Preserve existing results directory
rename( "results", "results.orig" );

run_one( "" );
run_one( "--this_flag_does_not_exist" );
run_one( "--initialize" );
run_one( "--noinitialize" );
run_one( "--precondition" );
run_one( "--noprecondition" );
run_one( "--raw_disk" );
run_one( "--active_range=0" );
run_one( "--active_range=1" );
run_one( "--active_range=50" );
run_one( "--active_range=100" );
run_one( "--active_range=110" );
run_one( "--partition_bytes=1000000000" );
run_one( "--partition_bytes=1000000000 --raw_disk" );
run_one( "--demo_mode" );
run_one( "--test_id=regr" );
run_one( "--test_id_prefix=regr" );
run_one( "--nocollect_smart" );
run_one( "--nocollect_logman" );
run_one( "--nocollect_power" );
run_one( "--start_on_step=2" );
run_one( "--stop_on_step=2" );
run_one( "--test_time_override=42" );
run_one( "--warmup_time_override=42" );
run_one( "--compressibility=0" );
run_one( "--compressibility=1" );
run_one( "--compressibility=20" );
run_one( "--compressibility=80" );
run_one( "--compressibility=99" );

# Restore original results directory
system( "rmdir /S /Q results >NUL 2>&1" );
rename( "results.orig", "results" );

# Post process output file to remove noise
rename( $outfile, "$outfile.orig" );

open( my $in, "<$outfile.orig" );
open( my $out, ">$outfile" );

while( my $line = <$in> )
{
    # Remove random temp file names
    $line =~ s/AppData\\\S*//;

    # Remove ETA info
    $line =~ s/\d{2}:\d{2}:\d{2} (AM|PM)//g;

    # Remove time from autogenerated results dir
    if( $line =~ /results/ )
    {
        $line =~ s/-\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}//;
    }

    # Remove "Done" line with overall runtime
    $line =~ s/^Done.*//;

    print $out $line;
}

close $in;
close $out;

unlink( "$outfile.orig" );

print "Done! Diff $outfile against another run.\n";

Expand regression test coverage.

Expand regression test coverage.


rem per user startup.cmd
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F

PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Scripts\unpin-all.ps1"

Update Startup.cmd

Update Startup.cmd


add a temp run p4 bat.

add a temp run p4 bat.


@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
@REM watchmedo.bat
@echo off
set SCRIPT_ERRORLEVEL=
if "%OS%" == "Windows_NT" goto WinNT

@REM Windows 9x/Me you better not have more than 9 arguments.
python watchmedo %1 %2 %3 %4 %5 %6 %7 %8 %9
@REM No way to set exit status of this script for 9x/Me
goto endscript

@REM Windows NT+
:WinNT
setlocal
set path=%~dp0;%~dp0..;%path%
python watchmedo %*
endlocal & set SCRIPT_ERRORLEVEL=%ERRORLEVEL%

if not "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
if errorlevel 9009 echo You do not have python in your PATH environment variable.
goto endscript

:returncode
exit /B %SCRIPT_ERRORLEVEL%

:endscript
call :returncode %SCRIPT_ERRORLEVEL%

@REM Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
@REM watchmedo.bat
@echo off
set SCRIPT_ERRORLEVEL=
if "%OS%" == "Windows_NT" goto WinNT

@REM Windows 9x/Me you better not have more than 9 arguments.
python -c "from watchdog import watchmedo; watchmedo.main()" %1 %2 %3 %4 %5 %6 %7 %8 %9
@REM No way to set exit status of this script for 9x/Me
goto endscript

@REM Windows NT+
:WinNT
setlocal
set path=%~dp0;%~dp0..;%path%
python -c "from watchdog import watchmedo; watchmedo.main()" %*
endlocal & set SCRIPT_ERRORLEVEL=%ERRORLEVEL%

if not "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto returncode
if errorlevel 9009 echo You do not have python in your PATH environment variable.
goto endscript

:returncode
exit /B %SCRIPT_ERRORLEVEL%

:endscript
call :returncode %SCRIPT_ERRORLEVEL%

Update the watchmedo.bat script to import watchdog and execute the entry-point function via the python command line.

Signed-off-by: Gora Khargosh <a2078c57e3ac12c6dfb97b7c2c4e6d6d7db7e92f@gmail.com>


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

if %2.==. (
  echo "No project"
  call :Help
  goto :eof
)

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

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

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

set ARCH=%1
set PROJECT=%2

if %3.==. (
  set SHORT_TARGET=10
) else (
  set SHORT_TARGET=%3
)

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

set TARGET=%SHORT_TARGET%
if "%TARGET%"=="10" (
  set TARGET=10.0.17763.0
)

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

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

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

echo CL path: "%CLCACHE_CL%"

:: install clcache.exe as cl.exe
copy C:\tools\Python35-%ARCH%\Scripts\clcache.exe C:\clcache\cl.exe
set PATH=C:\clcache;%PATH%

if "%PROJECT%"=="xdk" (
  call "clcache.exe" -M 3000000000
)
:: if we need to change cache max size: clcache -M <size-in-bytes>

set IMAGE_NAME=windows-%SHORT_TARGET%-%ARCH%-vc%VCVER%
echo Generated IMAGE_NAME: %IMAGE_NAME%

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

:: debug section for git
echo Home dir : %HOMEDRIVE%%HOMEPATH%
mkdir tmp
cd tmp
git clone git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-artifact.git --branch master --depth 1 sbact
cd sbact
git checkout -b test_branch
echo "v" >foo
git add foo
git commit -m "Test commit"
set GIT_SSH_COMMAND="ssh -vvv"
git push origin test_branch
exit /b 1

goto :eof

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

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

if %2.==. (
  echo "No project"
  call :Help
  goto :eof
)

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

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

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

set ARCH=%1
set PROJECT=%2

if %3.==. (
  set SHORT_TARGET=10
) else (
  set SHORT_TARGET=%3
)

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

set TARGET=%SHORT_TARGET%
if "%TARGET%"=="10" (
  set TARGET=10.0.17763.0
)

:: Setup home dir
set HOMEDRIVE=C:
set HOMEPATH=\Users\otbbot

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

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

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

echo CL path: "%CLCACHE_CL%"

:: install clcache.exe as cl.exe
copy C:\tools\Python35-%ARCH%\Scripts\clcache.exe C:\clcache\cl.exe
set PATH=C:\clcache;%PATH%

if "%PROJECT%"=="xdk" (
  call "clcache.exe" -M 3000000000
)
:: if we need to change cache max size: clcache -M <size-in-bytes>

set IMAGE_NAME=windows-%SHORT_TARGET%-%ARCH%-vc%VCVER%
echo Generated IMAGE_NAME: %IMAGE_NAME%

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

:: debug section for git
echo Home dir : %HOMEDRIVE%%HOMEPATH%
echo User: %USERNAME%
@echo on
mkdir tmp
cd tmp
git clone git@gitlab.orfeo-toolbox.org:gbonnefille/superbuild-artifact.git --branch master --depth 1 sbact
cd sbact
git checkout -b test_branch
echo "v" >foo
git add foo
git commit -m "Test commit"
git push origin test_branch
exit /b 1

goto :eof

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

fix home dir

CI: fix home dir


Fix rebaseline.bat to work again

Fix rebaseline.bat to work again

TBR=dpranke
TEST=rebaseline.bat works again!
BUG=none

Review URL: http://codereview.chromium.org/555086

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@37054 0039d316-1c4b-4281-b951-d872f2087c98


@echo off

set config=%1
set zipcmd=%~dp0\tools\7z\7z.exe

pushd %~dp0

echo ============ Cleaning up ============
rmdir /S /Q appleseed-max2015 2>nul
rmdir /S /Q appleseed-max2016 2>nul
rmdir /S /Q appleseed-max2017 2>nul
del appleseed-max2015-x.x.x-yyyy.zip 2>nul
del appleseed-max2016-x.x.x-yyyy.zip 2>nul
del appleseed-max2017-x.x.x-yyyy.zip 2>nul
echo.

echo ============ Creating 3ds Max 2015 archive ============
mkdir appleseed-max2015
xcopy /S ..\sandbox\max2015\%config%\*.* appleseed-max2015
%zipcmd% a -r -mx=9 appleseed-max2015-x.x.x-yyyy.zip appleseed-max2015
rmdir /S /Q appleseed-max2015
echo.

echo ============ Creating 3ds Max 2016 archive ============
mkdir appleseed-max2016
xcopy /S ..\sandbox\max2016\%config%\*.* appleseed-max2016
%zipcmd% a -r -mx=9 appleseed-max2016-x.x.x-yyyy.zip appleseed-max2016
rmdir /S /Q appleseed-max2016
echo.

echo ============ Creating 3ds Max 2017 archive ============
mkdir appleseed-max2017
xcopy /S ..\sandbox\max2017\%config%\*.* appleseed-max2017
%zipcmd% a -r -mx=9 appleseed-max2017-x.x.x-yyyy.zip appleseed-max2017
rmdir /S /Q appleseed-max2017
echo.

popd

pause

@echo off

set config=%1
set zipcmd=%~dp0\tools\7z\7z.exe

pushd %~dp0

echo ============ Cleaning up ============
rmdir /S /Q appleseed-max2015 2>nul
rmdir /S /Q appleseed-max2016 2>nul
rmdir /S /Q appleseed-max2017 2>nul
rmdir /S /Q appleseed-max2018 2>nul
del appleseed-max2015-x.x.x-yyyy.zip 2>nul
del appleseed-max2016-x.x.x-yyyy.zip 2>nul
del appleseed-max2017-x.x.x-yyyy.zip 2>nul
del appleseed-max2018-x.x.x-yyyy.zip 2>nul
echo.

echo ============ Creating 3ds Max 2015 archive ============
mkdir appleseed-max2015
xcopy /S ..\sandbox\max2015\%config%\*.* appleseed-max2015
%zipcmd% a -r -mx=9 appleseed-max2015-x.x.x-yyyy.zip appleseed-max2015
rmdir /S /Q appleseed-max2015
echo.

echo ============ Creating 3ds Max 2016 archive ============
mkdir appleseed-max2016
xcopy /S ..\sandbox\max2016\%config%\*.* appleseed-max2016
%zipcmd% a -r -mx=9 appleseed-max2016-x.x.x-yyyy.zip appleseed-max2016
rmdir /S /Q appleseed-max2016
echo.

echo ============ Creating 3ds Max 2017 archive ============
mkdir appleseed-max2017
xcopy /S ..\sandbox\max2017\%config%\*.* appleseed-max2017
%zipcmd% a -r -mx=9 appleseed-max2017-x.x.x-yyyy.zip appleseed-max2017
rmdir /S /Q appleseed-max2017
echo.

echo ============ Creating 3ds Max 2018 archive ============
mkdir appleseed-max2018
xcopy /S ..\sandbox\max2018\%config%\*.* appleseed-max2018
%zipcmd% a -r -mx=9 appleseed-max2018-x.x.x-yyyy.zip appleseed-max2018
rmdir /S /Q appleseed-max2018
echo.

popd

pause

Modify make-package script to support 3ds max 2018


set /p versionNumber=

REM clean up
del builds\im-only-resting-%versionNumber%.zip
rd /q /s builds\im-only-resting-%versionNumber%
rd /q /s builds\im-only-resting

REM preparing staging dir
mkdir staging
copy LICENSE staging
copy NOTICE staging
copy Ior\bin\Release\im-only-resting.exe staging
copy Ior\bin\Release\libtidy.dll staging
copy Ior\bin\Release\Newtonsoft.Json.dll staging
copy Ior\bin\Release\PropertyGridEx.dll staging
copy Ior\bin\Release\RestSharp.dll staging
copy Ior\bin\Release\TidyManaged.dll staging
copy Ior\bin\Release\Utils.dll staging
copy Ior\bin\Release\NLog.config staging

REM zip staging files
cd staging
"..\tools\7z\7za.exe" a -tzip "..\builds\im-only-resting-%versionNumber%.zip" *
cd ..

REM extract build
"tools\7z\7za.exe" e "builds\im-only-resting-%versionNumber%.zip" -o"builds\im-only-resting-%versionNumber%"
"tools\7z\7za.exe" e "builds\im-only-resting-%versionNumber%.zip" -o"builds\im-only-resting"

REM clean up
rd /q /s staging

pause

set /p versionNumber=

REM clean up
del builds\im-only-resting-%versionNumber%.zip
rd /q /s builds\im-only-resting-%versionNumber%
rd /q /s builds\im-only-resting

REM preparing staging dir
mkdir staging
copy LICENSE staging
copy NOTICE staging
copy Ior\bin\Release\im-only-resting.exe staging
copy Ior\bin\Release\libtidy.dll staging
copy Ior\bin\Release\Newtonsoft.Json.dll staging
copy Ior\bin\Release\PropertyGridEx.dll staging
copy Ior\bin\Release\RestSharp.dll staging
copy Ior\bin\Release\TidyManaged.dll staging
copy Ior\bin\Release\Utils.dll staging
copy Ior\bin\Release\NLog.config staging
copy Ior\bin\Release\NLog.dll staging

REM zip staging files
cd staging
"..\tools\7z\7za.exe" a -tzip "..\builds\im-only-resting-%versionNumber%.zip" *
cd ..

REM extract build
"tools\7z\7za.exe" e "builds\im-only-resting-%versionNumber%.zip" -o"builds\im-only-resting-%versionNumber%"
"tools\7z\7za.exe" e "builds\im-only-resting-%versionNumber%.zip" -o"builds\im-only-resting"

REM clean up
rd /q /s staging

pause

include NLog.dll in archiver

include NLog.dll in archiver


java^
 -Xms64m^
 -Xmx4096m^
 -XX:CompileCommand=exclude,javax/swing/text/GlyphView,getBreakSpot^
 -XX:-OmitStackTraceInFastThrow^
 -jar sw.jar

add exclude GlyphView,getBreakSpot argument


IF DEFINED APPVEYOR (

	REM mkdir "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.targets\ImportBefore"
	REM copy packages\MSBuild.SonarQube.Runner.Tool.1.0.0\tools\Targets\SonarQube.Integration.ImportBefore.targets "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\"

	echo Sonarqube analysis for: %APPVEYOR_REPO_COMMIT%

	IF DEFINED APPVEYOR_PULL_REQUEST_NUMBER (
		echo Analysing Pull Request %APPVEYOR_PULL_REQUEST_NUMBER%
		@echo off

		REM SONAR_PROJECT_KEY
		REM SONAR_PROJECT_NAME
		REM SONAR_ORGANIZATION
		REM SONAR_URL

		REM waarschijnlijk niet nodig
		REM /d:"sonar.organization=coenm-github"

		REM /v:"%APPVEYOR_REPO_COMMIT%"

		REM /d:sonar.cs.xunit.reportsPaths="%CD%\XUnitResults.xml"
		REM packages\xunit.runner.console.2.1.0\tools\xunit.console.exe XUnitProject1\bin\Debug\XUnitProject1.dll -xml XUnitResults.xml
		REM xunit.console.exe -appveyor -xml XUnitResults.xml

		REM extra:
		REM /n:"PlaygroundDotNetCore"  /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"

		REM with xunit result file
		REM SonarQube.Scanner.MSBuild.exe begin /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.xunit.reportsPaths=xunit-results.xml" /d:"sonar.login=%sonar_login%" /d:"sonar.analysis.mode=preview" /d:"sonar.github.oauth=%github_oauth_token%" /d:"sonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER%" /d:"sonar.links.scm_dev=https://github.com/coenm/PlaygroundCoreDotNet" /d:sonar.issuesReport.console.enable=true /d:"sonar.github.repository=coenm/PlaygroundCoreDotNet" /d:sonar.verbose=true /n:"PlaygroundDotNetCore"  /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"
		REM with trx result file
		SonarQube.Scanner.MSBuild.exe begin /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx" /d:"sonar.login=%sonar_login%" /d:"sonar.analysis.mode=preview" /d:"sonar.github.oauth=%github_oauth_token%" /d:"sonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER%" /d:"sonar.links.scm_dev=https://github.com/coenm/PlaygroundCoreDotNet" /d:sonar.issuesReport.console.enable=true /d:"sonar.github.repository=coenm/PlaygroundCoreDotNet" /d:sonar.verbose=true /n:"PlaygroundDotNetCore"  /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"

		REM SonarQube.Scanner.MSBuild.exe begin /k:"Stryker.NET"          /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx" /d:"sonar.login=%sonar_login%" /d:"sonar.analysis.mode=preview" /d:"sonar.github.oauth=%github_oauth_token%" /d:"sonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER%" /d:"sonar.links.scm_dev=https://github.com/coenm/PlaygroundCoreDotNet" /d:sonar.issuesReport.console.enable=true /d:"sonar.github.repository=coenm/PlaygroundCoreDotNet" /d:sonar.verbose=true

	) ELSE (
		echo Analysing commit %APPVEYOR_REPO_COMMIT%
		@echo off
		REM /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx"
		REM SonarQube.Scanner.MSBuild.exe begin /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.xunit.reportsPaths=xunit-results.xml"              /d:"sonar.login=%sonar_login%" /n:"PlaygroundDotNetCore
		SoarQube.Scanner.MSBuild.exe begin    ^
		  /k:"PlaygroundDotNetCore" ^
		  /n:"PlaygroundDotNetCore" ^
		  /d:sonar.cs.opencover.reportsPaths="coverage-dotnet.xml" ^
		  /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx" ^
		  /d:"sonar.organization=coenm-github" ^
		  /d:"sonar.host.url=https://sonarcloud.io" ^
		  /d:"sonar.login=%sonar_login%" ^
		  /v:%appveyor_build_version% ^
		  /d:"sonar.branch=%GitVersion_BranchName%" ^
		  /d:"sonar.cpd.cross_project=true"

		REM SonarQube.Scanner.MSBuild.exe begin /X /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.login=%sonar_login%" /n:"PlaygroundDotNetCore"
	)

) ELSE (
	echo Sonarqube analysis only supported at appveyor.
)

IF DEFINED APPVEYOR (

	REM mkdir "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.targets\ImportBefore"
	REM copy packages\MSBuild.SonarQube.Runner.Tool.1.0.0\tools\Targets\SonarQube.Integration.ImportBefore.targets "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Microsoft.Common.targets\ImportBefore\"

	echo Sonarqube analysis for: %APPVEYOR_REPO_COMMIT%

	IF DEFINED APPVEYOR_PULL_REQUEST_NUMBER (
		echo Analysing Pull Request %APPVEYOR_PULL_REQUEST_NUMBER%
		@echo off

		REM SONAR_PROJECT_KEY
		REM SONAR_PROJECT_NAME
		REM SONAR_ORGANIZATION
		REM SONAR_URL

		REM waarschijnlijk niet nodig
		REM /d:"sonar.organization=coenm-github"

		REM /v:"%APPVEYOR_REPO_COMMIT%"

		REM /d:sonar.cs.xunit.reportsPaths="%CD%\XUnitResults.xml"
		REM packages\xunit.runner.console.2.1.0\tools\xunit.console.exe XUnitProject1\bin\Debug\XUnitProject1.dll -xml XUnitResults.xml
		REM xunit.console.exe -appveyor -xml XUnitResults.xml

		REM extra:
		REM /n:"PlaygroundDotNetCore"  /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"

		REM with xunit result file
		REM SonarQube.Scanner.MSBuild.exe begin /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.xunit.reportsPaths=xunit-results.xml" /d:"sonar.login=%sonar_login%" /d:"sonar.analysis.mode=preview" /d:"sonar.github.oauth=%github_oauth_token%" /d:"sonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER%" /d:"sonar.links.scm_dev=https://github.com/coenm/PlaygroundCoreDotNet" /d:sonar.issuesReport.console.enable=true /d:"sonar.github.repository=coenm/PlaygroundCoreDotNet" /d:sonar.verbose=true /n:"PlaygroundDotNetCore"  /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"
		REM with trx result file
		SonarQube.Scanner.MSBuild.exe begin /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx" /d:"sonar.login=%sonar_login%" /d:"sonar.analysis.mode=preview" /d:"sonar.github.oauth=%github_oauth_token%" /d:"sonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER%" /d:"sonar.links.scm_dev=https://github.com/coenm/PlaygroundCoreDotNet" /d:sonar.issuesReport.console.enable=true /d:"sonar.github.repository=coenm/PlaygroundCoreDotNet" /d:sonar.verbose=true /n:"PlaygroundDotNetCore"  /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"

		REM SonarQube.Scanner.MSBuild.exe begin /k:"Stryker.NET"          /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx" /d:"sonar.login=%sonar_login%" /d:"sonar.analysis.mode=preview" /d:"sonar.github.oauth=%github_oauth_token%" /d:"sonar.github.pullRequest=%APPVEYOR_PULL_REQUEST_NUMBER%" /d:"sonar.links.scm_dev=https://github.com/coenm/PlaygroundCoreDotNet" /d:sonar.issuesReport.console.enable=true /d:"sonar.github.repository=coenm/PlaygroundCoreDotNet" /d:sonar.verbose=true

	) ELSE (
		echo Analysing commit %APPVEYOR_REPO_COMMIT%
		@echo off
		REM /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx"
		REM SonarQube.Scanner.MSBuild.exe begin /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.cs.xunit.reportsPaths=xunit-results.xml"              /d:"sonar.login=%sonar_login%" /n:"PlaygroundDotNetCore
		SonarQube.Scanner.MSBuild.exe begin    /k:"PlaygroundDotNetCore" /n:"PlaygroundDotNetCore" /d:sonar.cs.opencover.reportsPaths="coverage-dotnet.xml" /d:"sonar.cs.vstest.reportsPaths=%APPVEYOR_BUILD_FOLDER%\TestResults.trx" /d:"sonar.organization=coenm-github" /d:"sonar.host.url=https://sonarcloud.io" /d:"sonar.login=%sonar_login%" /v:%appveyor_build_version% /d:"sonar.branch=%GitVersion_BranchName%" /d:"sonar.cpd.cross_project=true"

		REM SonarQube.Scanner.MSBuild.exe begin /X /k:"PlaygroundDotNetCore" /d:"sonar.host.url=https://sonarcloud.io" /v:"%appveyor_build_version%" /d:"sonar.cs.opencover.reportsPaths=coverage-dotnet.xml" /d:"sonar.login=%sonar_login%" /n:"PlaygroundDotNetCore"
	)

) ELSE (
	echo Sonarqube analysis only supported at appveyor.
)

Revert "command multiple lines"

Revert "command multiple lines"

This reverts commit 78c1402babe3419b4a15169bfc77a92fda12a198.


@echo off

SET toolchainpath=%~dp0
CALL %toolchainpath%\..\setenv.bat

SET sdkpath=%xilinxpath%\SDK\%xilinxversion%\bin

SET cfile=..\%~1
SET jsonfile=..\%~2
SET projectname=%~3

SET toolchainpath=%~dp0

if not {%~1} == {} if not {%~2} == {} if not {%~3} == {} (

  cd %projectname%

  python %toolchainpath%\..\python\generateexecutesdktcl.py %cfile% %jsonfile% %projectname%
  %sdkpath%\xsdk.bat -batch -source %projectname%_config_sdk.tcl
  %sdkpath%\xsdk.bat -batch -source %projectname%_execute_sdk.tcl

  cd ..

) else (
  echo "few arguments!"
)

@echo off

SET toolchainpath=%~dp0
CALL %toolchainpath%\..\setenv.bat

SET sdkpath=%xilinxpath%\SDK\%xilinxversion%\bin

SET cfile=..\%~1
SET jsonfile=..\%~2
SET projectname=%~3

SET toolchainpath=%~dp0

if not {%~1} == {} if not {%~2} == {} if not {%~3} == {} (

  cd %projectname%

  python %toolchainpath%\..\python\generateexecutesdktcl.py %cfile% %jsonfile% %projectname%
  rem %sdkpath%\xsdk.bat -batch -source %projectname%_config_sdk.tcl
  %sdkpath%\xsdk.bat -batch -source %projectname%_execute_sdk.tcl

  cd ..

) else (
  echo "few arguments!"
)

divide config and execute scripts

divide config and execute scripts


@echo off
setlocal

title VSCode Dev

pushd %~dp0\..

:: Node modules
if not exist node_modules call yarn

for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"

:: Download Electron if needed
node build\lib\electron.js
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron

:: Build
if not exist out node .\node_modules\gulp\bin\gulp.js compile

:: Configuration
set NODE_ENV=development
set VSCODE_DEV=1
set VSCODE_CLI=1
set ELECTRON_DEFAULT_ERROR_MODE=1
set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_ENABLE_STACK_DUMPING=1

:: Launch Code

:: Use the following to get v8 tracing:
:: %CODE% --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" . %*

%CODE% . %*
popd

endlocal

@echo off
setlocal

title VSCode Dev

pushd %~dp0\..

:: Node modules
if not exist node_modules call yarn

for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"nameShort\":.*" product.json') do set NAMESHORT=%%~a
set NAMESHORT=%NAMESHORT: "=%
set NAMESHORT=%NAMESHORT:"=%.exe
set CODE=".build\electron\%NAMESHORT%"

:: Download Electron if needed
node build\lib\electron.js
if %errorlevel% neq 0 node .\node_modules\gulp\bin\gulp.js electron

:: Get built-in extensions
node build\lib\builtInExtensions.js || .\node_modules\.bin\gulp builtInExtensions

:: Build
if not exist out node .\node_modules\gulp\bin\gulp.js compile

:: Configuration
set NODE_ENV=development
set VSCODE_DEV=1
set VSCODE_CLI=1
set ELECTRON_DEFAULT_ERROR_MODE=1
set ELECTRON_ENABLE_LOGGING=1
set ELECTRON_ENABLE_STACK_DUMPING=1

:: Launch Code

:: Use the following to get v8 tracing:
:: %CODE% --js-flags="--trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces" . %*

%CODE% . %*
popd

endlocal

Install builtInExtensions on windows too


@echo off

setlocal EnableDelayedExpansion

set registryRoot=HKCU\Software\Classes
set key=grepWin...

reg add "%registryRoot%\*\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Directory\background\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Directory\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Drive\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Folder\shell\%key%" /v LegacyDisable /t REG_SZ /f

set key=grepWin

reg add "%registryRoot%\*\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Directory\background\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Directory\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Drive\shell\%key%" /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Folder\shell\%key%" /v LegacyDisable /t REG_SZ /f

Add another key for grepWin to deactivate


@ECHO OFF

REM # switch the current directory to that of this file
PUSHD %~dp0
REM # relative location of the saves folder (where user-configs are stored)
SET "SAVES=..\saves"
REM # relative path to doom.bat
SET "DOOM=..\doom.bat"
REM # relative path for doom.bat to the config folder
SET "CONFIG=..\..\..\config"

:menu
CLS
ECHO:
ECHO  Edit DOOM Engine Defaults:
ECHO  ==========================
ECHO  Note that this will delete your current user-config for an engine!
ECHO:
ECHO  Doom:
ECHO    [A] Chocolate-Doom
ECHO    [B] PRBoom+ ^(hardware^)       [C] PRBoom+ ^(software^)
ECHO    [D] Zandronum ^(v3^)           [E] Zandronum ^(v2^)
ECHO    [F] GZDoom
ECHO    [G] DOOM 64 EX
ECHO:
ECHO  Heretic:
ECHO    [H] Chocolate-Heretic
ECHO    [I] GZDoom
ECHO:
ECHO  Hexen:
ECHO    [J] Chocolate-Hexen
ECHO:
ECHO  Strife:
ECHO    [K] Chocolate-Strife
ECHO:
SET "$="
SET /P "$=? "

IF "%$%" == "" POPD & EXIT /B

REM # Doom:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "A" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-doom.cfg" DEL "%SAVES%\choco-doom\config.choco-doom.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-doom.extra.cfg" DEL "%SAVES%\choco-doom\config.choco-doom.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-doom-setup SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "B" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.glboom-plus.cfg" DEL "%SAVES%\prboom\config.glboom-plus.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT prboom SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "C" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.prboom-plus.cfg" DEL "%SAVES%\prboom\config.prboom-plus.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT /SW prboom SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "D" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.zandronum-3.cfg" DEL "%SAVES%\zandronum\config.zandronum-3.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT zandronum-3 SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "E" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.zandronum-2.cfg" DEL "%SAVES%\zandronum\config.zandronum-2.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT zandronum-2 SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "F" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.gzdoom.cfg" DEL "%SAVES%\gzdoom\config.gzdoom.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT gzdoom SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "G" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.doom64ex.cfg" DEL "%SAVES%\doom64ex\config.doom64ex.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT doom64ex DOOM64.WAD
)

REM # Heretic:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "H" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-heretic.cfg" DEL "%SAVES%\choco-heretic\config.choco-heretic.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-heretic.extra.cfg" DEL "%SAVES%\choco-heretic\config.choco-heretic.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-heretic-setup SHAREWARE\HERETIC1.WAD
)
IF /I "%$%" == "I" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.gzdoom.cfg" DEL "%SAVES%\gzdoom\config.gzdoom.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT gzdoom SHAREWARE\HERETIC1.WAD
)

REM # Hexen:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "J" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-hexen.cfg" DEL "%SAVES%\choco-hexen\config.choco-hexen.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-hexen.extra.cfg" DEL "%SAVES%\choco-hexen\config.choco-hexen.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-hexen-setup SHAREWARE\HEXEN.WAD
)

REM # Strife:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "K" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-strife.cfg" DEL "%SAVES%\choco-strife\config.choco-strife.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-strife.extra.cfg" DEL "%SAVES%\choco-strife\config.choco-strife.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-strife-setup SHAREWARE\STRIFE0.WAD
)

ECHO:
PAUSE
GOTO :menu

@ECHO OFF

REM # switch the current directory to that of this file
PUSHD %~dp0
REM # relative location of the saves folder (where user-configs are stored)
SET "SAVES=..\saves"
REM # relative path to doom.bat
SET "DOOM=..\doom.bat"
REM # relative path for doom.bat to the config folder
SET "CONFIG=..\..\..\config"

:menu
CLS
ECHO:
ECHO  Edit DOOM Engine Defaults:
ECHO  ==========================
ECHO  Note that this will delete your current user-config for an engine!
ECHO:
ECHO  Doom:
ECHO    [A] Chocolate-Doom
ECHO    [B] PRBoom+ ^(hardware^)       [C] PRBoom+ ^(software^)
ECHO    [D] Zandronum ^(v3^)           [E] Zandronum ^(v2^)
ECHO    [F] GZDoom
ECHO    [G] DOOM 64 EX
ECHO:
ECHO  Heretic:
ECHO    [H] Chocolate-Heretic
ECHO    [I] GZDoom
ECHO:
ECHO  Hexen:
ECHO    [J] Chocolate-Hexen
ECHO:
ECHO  Strife:
ECHO    [K] Chocolate-Strife
ECHO:
SET "$="
SET /P "$=? "

IF "%$%" == "" POPD & EXIT /B

REM # Doom:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "A" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-doom.cfg" DEL "%SAVES%\choco-doom\config.choco-doom.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-doom.extra.cfg" DEL "%SAVES%\choco-doom\config.choco-doom.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-doom-setup SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "B" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.glboom-plus.cfg" DEL "%SAVES%\prboom\config.glboom-plus.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT prboom SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "C" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.prboom-plus.cfg" DEL "%SAVES%\prboom\config.prboom-plus.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT /SW prboom SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "D" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.zandronum-3.cfg" DEL "%SAVES%\zandronum\config.zandronum-3.ini"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT zandronum-3 SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "E" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.zandronum-2.cfg" DEL "%SAVES%\zandronum\config.zandronum-2.ini"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT zandronum-2 SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "F" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.gzdoom.cfg" DEL "%SAVES%\gzdoom\config.gzdoom.ini"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT gzdoom SHAREWARE\DOOM1.WAD
)
IF /I "%$%" == "G" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.doom64ex.cfg" DEL "%SAVES%\doom64ex\config.doom64ex.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT doom64ex DOOM64.WAD
)

REM # Heretic:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "H" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-heretic.cfg" DEL "%SAVES%\choco-heretic\config.choco-heretic.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-heretic.extra.cfg" DEL "%SAVES%\choco-heretic\config.choco-heretic.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-heretic-setup SHAREWARE\HERETIC1.WAD
)
IF /I "%$%" == "I" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.gzdoom.cfg" DEL "%SAVES%\gzdoom\config.gzdoom.ini"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT gzdoom SHAREWARE\HERETIC1.WAD
)

REM # Hexen:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "J" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-hexen.cfg" DEL "%SAVES%\choco-hexen\config.choco-hexen.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-hexen.extra.cfg" DEL "%SAVES%\choco-hexen\config.choco-hexen.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-hexen-setup SHAREWARE\HEXEN.WAD
)

REM # Strife:
REM --------------------------------------------------------------------------------------------------------------------
IF /I "%$%" == "K" (
	REM # delete the user's config that would override the default
	IF EXIST "%SAVES%\config.choco-strife.cfg" DEL "%SAVES%\choco-strife\config.choco-strife.cfg"  >NUL 2>&1
	IF EXIST "%SAVES%\config.choco-strife.extra.cfg" DEL "%SAVES%\choco-strife\config.choco-strife.extra.cfg"  >NUL 2>&1
	REM # launch the engine using our default config file
	CALL %DOOM% /DEFAULT /WAIT choco-strife-setup SHAREWARE\STRIFE0.WAD
)

ECHO:
PAUSE
GOTO :menu

fix wrong config files in edit_defaults.bat

z-based engines use .ini config files.


call taskkill /f /im "TI-Nspire CAS Student Software.exe"
call "%JDK_HOME%\bin\java" -cp "exportDoc-0.0.1-SNAPSHOT-jar-with-dependencies.jar" tiproject.ExportDoc
call luacompile ../finance/src/finance.lua
copy /Y \tmp\finance.tns ..
pause

add kill previous task

add kill previous task


:: Copyright (c) 2017 Sony Corporation. All Rights Reserved.
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
::     http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.

SET protobuf_tag=v3.4.1

:: Build protobuf libs
SET protobuf_folder=%third_party_folder%\protobuf-%protobuf_tag%
SET protobuf_include_dir=%protobuf_folder%\src
SET protobuf_bin_folder=%protobuf_folder%\build-folder\%build_type%
SET protobuf_lib_suffix=.lib
IF [%build_type%] == [Debug] (
  SET protobuf_lib_suffix=.dlib
)
SET protobuf_library=%protobuf_bin_folder%\libprotobuf%protobuf_lib_suffix%
SET protobuf_lite_library=%protobuf_bin_folder%\libprotobuf-lite%protobuf_lib_suffix%
SET protobuf_protoc_executable=%protobuf_bin_folder%\protoc.exe
IF NOT EXIST %protobuf_folder% (
	git clone https://github.com/google/protobuf.git --branch %protobuf_tag% --depth=1 %protobuf_folder% || GOTO :error
)

CD %protobuf_folder%
IF NOT EXIST build-folder (
   MD build-folder
)

CD build-folder
cmake.exe -G "%generate_target%" -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_TESTS=OFF ..\cmake || GOTO :error
cmake.exe --build . --config %build_type% || GOTO :error

:: Copyright (c) 2017 Sony Corporation. All Rights Reserved.
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
:: You may obtain a copy of the License at
::
::     http://www.apache.org/licenses/LICENSE-2.0
::
:: Unless required by applicable law or agreed to in writing, software
:: distributed under the License is distributed on an "AS IS" BASIS,
:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
:: See the License for the specific language governing permissions and
:: limitations under the License.

SET protobuf_tag=v3.4.1

:: Build protobuf libs
SET protobuf_folder=%third_party_folder%\protobuf-%protobuf_tag%
SET protobuf_include_dir=%protobuf_folder%\src
SET protobuf_bin_folder=%protobuf_folder%\build-folder\%build_type%
SET protobuf_lib_suffix=.lib
IF [%build_type%] == [Debug] (
  SET protobuf_lib_suffix=d.lib
)
SET protobuf_library=%protobuf_bin_folder%\libprotobuf%protobuf_lib_suffix%
SET protobuf_lite_library=%protobuf_bin_folder%\libprotobuf-lite%protobuf_lib_suffix%
SET protobuf_protoc_executable=%protobuf_bin_folder%\protoc.exe
IF NOT EXIST %protobuf_folder% (
	git clone https://github.com/google/protobuf.git --branch %protobuf_tag% --depth=1 %protobuf_folder% || GOTO :error
)

CD %protobuf_folder%
IF NOT EXIST build-folder (
   MD build-folder
)

CD build-folder
cmake.exe -G "%generate_target%" -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_BUILD_TESTS=OFF ..\cmake || GOTO :error
cmake.exe --build . --config %build_type% || GOTO :error

Fix d.lib

Fix d.lib


mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DBUILD_TESTING:BOOL=ON ^
    %SRC_DIR%
if errorlevel 1 exit 1

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

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

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

mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DFMI4CPP_BUILD_TESTS:BOOL=ON  ^
    %SRC_DIR%
if errorlevel 1 exit 1

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

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

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

Update bld.bat

Update bld.bat


ECHO OFF

ECHO.
ECHO ----------------------------------------
ECHO copy file to converter
ECHO ----------------------------------------

mkdir "%~dp0\App_Data"
mkdir "%~dp0\FileConverter\bin"
mkdir "%~dp0\FileConverter\bin\HtmlFileInternal"

cd /D "%~dp0\FileConverter\bin" || goto ERROR
copy "..\..\..\core\build\bin\windows\icudt.dll" "."
copy "..\..\..\core\build\bin\icu\win_32\icudt55.dll" "."
copy "..\..\..\core\build\bin\icu\win_32\icuuc55.dll" "."
copy "..\..\..\core\build\lib\win_32\doctrenderer.dll" "."
copy "..\..\..\core\build\lib\win_32\HtmlRenderer.dll" "."
copy "..\..\..\core\build\lib\win_32\DjVuFile.dll" "."
copy "..\..\..\core\build\lib\win_32\XpsFile.dll" "."
copy "..\..\..\core\build\lib\win_32\PdfReader.dll" "."
copy "..\..\..\core\build\lib\win_32\PdfWriter.dll" "."
copy "..\..\..\core\build\lib\win_32\HtmlFile.dll" "."
copy "..\..\..\core\build\lib\win_32\UnicodeConverter.dll" "."
copy "..\..\..\core\build\lib\win_32\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "..\..\..\core\build\cef\win_32" ".\HtmlFileInternal"
copy "..\..\..\core\build\bin\win_32\x2t.exe" "."

"..\..\..\core\build\bin\AllFontsGen\win_32.exe" "%windir%\Fonts" "%~dp0\..\sdkjs\common\AllFonts.js" "%~dp0\..\sdkjs\common\Images" "%~dp0\FileConverter\bin\font_selection.bin"

ECHO.
ECHO ----------------------------------------
ECHO Start build skd-all.js
ECHO ----------------------------------------
CD /D %~dp0\..\sdkjs\build
call npm install -g grunt-cli
call npm install
call grunt --src="./configs" --level=WHITESPACE_ONLY --formatting=PRETTY_PRINT

ECHO.
ECHO ----------------------------------------
ECHO Install node.js modules
ECHO ----------------------------------------

CD /D %~dp0\DocService || goto ERROR
call npm install

cd /D ..\Common || goto ERROR
call npm install

cd /D ..\FileConverter || goto ERROR
call npm install

cd /D ..\SpellChecker || goto ERROR
call npm install

SET RUN_DIR=%~dp0
SET NODE_ENV=development-windows
SET NODE_CONFIG_DIR=%RUN_DIR%\Common\config

cd "%RUN_DIR%\DocService\sources"
start /min /b node server.js
start /min /b node gc.js

cd "%RUN_DIR%\FileConverter\sources"
start /min /b node convertermaster.js

:ERROR
:SUCCESS
pause

ECHO OFF

reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32||set OS=64

ECHO.
ECHO ----------------------------------------
ECHO copy file to converter
ECHO ----------------------------------------

mkdir "%~dp0\App_Data"
mkdir "%~dp0\FileConverter\bin"
mkdir "%~dp0\FileConverter\bin\HtmlFileInternal"

cd /D "%~dp0\FileConverter\bin" || goto ERROR
copy "..\..\..\core\build\bin\win_64\icudt.dll" "."
copy "..\..\..\core\build\bin\icu\win_%OS%\icudt55.dll" "."
copy "..\..\..\core\build\bin\icu\win_%OS%\icuuc55.dll" "."
copy "..\..\..\core\build\lib\DoctRenderer.config" "."
copy "..\..\..\core\build\lib\win_%OS%\doctrenderer.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlRenderer.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\DjVuFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\XpsFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\PdfReader.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\PdfWriter.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlFile.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\UnicodeConverter.dll" "."
copy "..\..\..\core\build\lib\win_%OS%\HtmlFileInternal.exe" ".\HtmlFileInternal"
xcopy /s/h/e/k/c/y/q "..\..\..\core\build\cef\win_%OS%" ".\HtmlFileInternal"
copy "..\..\..\core\build\bin\win_%OS%\x2t.exe" "."

"..\..\..\core\build\bin\AllFontsGen\win_%OS%.exe" "%windir%\Fonts" "%~dp0\..\sdkjs\common\AllFonts.js" "%~dp0\..\sdkjs\common\Images" "%~dp0\FileConverter\bin\font_selection.bin"

ECHO.
ECHO ----------------------------------------
ECHO Start build skd-all.js
ECHO ----------------------------------------
CD /D %~dp0\..\sdkjs\build
call npm install -g grunt-cli
call npm install
call grunt --src="./configs" --level=WHITESPACE_ONLY --formatting=PRETTY_PRINT

ECHO.
ECHO ----------------------------------------
ECHO Install node.js modules
ECHO ----------------------------------------

CD /D %~dp0\DocService || goto ERROR
call npm install

cd /D ..\Common || goto ERROR
call npm install

cd /D ..\FileConverter || goto ERROR
call npm install

cd /D ..\SpellChecker || goto ERROR
call npm install

SET RUN_DIR=%~dp0
SET NODE_ENV=development-windows
SET NODE_CONFIG_DIR=%RUN_DIR%\Common\config

cd "%RUN_DIR%\DocService\sources"
start /min /b node server.js
start /min /b node gc.js

cd "%RUN_DIR%\FileConverter\sources"
start /min /b node convertermaster.js

:ERROR
:SUCCESS
pause

copy x2t by OS version

copy x2t by OS version


@echo off

rem @echo.
rem @echo lisp/toylisp
rem @pushd lisp\toylisp
rem @..\..\bench 5 toylisp ..\..\tests\fib.py
rem @popd

@echo.
@echo as/angelscript
@bench 5 angelscript\as tests\fib.as //Angelscript,[angelscript](http://www.angelcode.com/angelscript/)

@echo.
@echo as/angelscript-jit
@bench 5 angelscript\asjit tests\fib.as //Angelscript,[angelscript-jit](https://github.com/BlindMindStudios/AngelScript-JIT-Compiler)

@echo.
@echo c/c4
@bench 5 c\c4\c4 tests\fib.c //C,[c4](https://github.com/rswier/c4)

@echo.
@echo c/c4-jit
@bench 5 c\c4jit\c4jit tests\fib.c //C,[c4-jit](https://github.com/EarlGray/c4)

@echo.
@echo c/picoc
@bench 5 c\picoc\picoc tests\fib.c //C,[picoC](https://github.com/zsaleeba/picoc)

@echo.
@echo c/tcc
@bench 5 c\tcc-0.9.26\win32\tcc tests\fib.c -run //C,[libtcc](http://bellard.org/tcc/)

@echo.
@echo c/vc
@cl tests\fib.c /Ox /Oy /MT /DNDEBUG /nologo > nul
@bench 5 fib //C,[vc](https://www.visualstudio.com/)

@echo.
@echo chai/chaiscript
@bench 1 chaiscript\chai tests\fib.chai //ChaiScript,[chaiscript](https://github.com/ChaiScript/ChaiScript)

@echo.
@echo dao/dao
@bench 5 dao\dao tests\fib.dao //Dao,[dao](https://github.com/daokoder/dao)

@echo.
@echo gm/gamemonkey
@bench 5 gamemonkey\bin\gme64 tests\fib.gm //GameMonkey,[gamemonkey](http://www.gmscript.com/)

@echo.
@echo gml
@bench 1 gml\gml tests\fib.gml --no-history //GML,[gml](https://github.com/graphitemaster/gml)

@echo.
@echo java/jog
@pushd java\jog
@..\..\bench 5 jog ..\..\tests\fib.java //Java,[Jog](https://code.google.com/p/jog-interpreter)
@popd

@echo.
@echo jetscript
@bench 5 jetscript\jet tests\fib.jet //JetScript,[JetScript](https://github.com/matt-attack/JetScript)

@echo.
@echo js/42tiny-js
@bench 1 javascript\42tiny-js\42tinyjs tests\fib.js //JavaScript,[42tiny-js](https://github.com/ardi69/42tiny-js)

@echo.
@echo js/duktape
@bench 5 javascript\duktape\duktape tests\fib.js //JavaScript,[duktape](https://github.com/svaarala/duktape)

@echo.
@echo js/v7
@bench 1 javascript\v7\v7 tests\fib.js //JavaScript,[v7](https://github.com/cesanta/v7)

@echo.
@echo jtc/jtc
@bench 1 jtc\jtc tests\fib.jtc //JTC,[jtc](https://github.com/progschj/jtc)

@echo.
@echo jx9
@bench 5 jx9\jx9 tests\fib.jx9 //JX9,[jx9](http://jx9.symisc.net/)

@echo.
@echo lily/lily
@bench 5 lily\lily tests\fib.lly //Lily,[lily](https://github.com/jesserayadkins/lily)

@echo.
@echo lisp/lispy90
@bench 1 lisp\lispy90\lispy90 tests\fib.l //Lisp,[lispy90](http://howtowriteaprogram.blogspot.com.es/2010/11/lisp-interpreter-in-90-lines-of-c.html)

@echo.
@echo lisp/minilisp
@bench 1 lisp\minilisp\minilisp < tests\fib.l //Lisp,[minilisp](https://github.com/rui314/minilisp)

@echo.
@echo lisp/paren
@pushd lisp\paren\
@..\..\bench 5 paren-1.9.6 ..\..\tests\fib.pn //Lisp,[paren](https://bitbucket.org/ktg/paren)
@popd

@echo.
@echo lua/lua
@bench 5 lua tests\fib.lua //Lua,[lua](https://github.com/LuaDist/lua)

@echo.
@echo lua/luajit
@bench 5 lua\luajit-2.0\src\luajit tests\fib.lua //Lua,[luajit](https://github.com/LuaDist/luajit)

@echo.
@echo neko/nekovm
@neko\bin\nekoc tests\fib.neko
@bench 5 neko\neko tests\fib.n //Neko,[nekovm](https://github.com/HaxeFoundation/neko)

@echo.
@echo os/objectscript
@bench 5 os\os tests\fib.os //ObjectScript,[objectscript](https://github.com/unitpoint/objectscript)

@echo.
@echo pawn
@pawn\pawn\bin\pawncc tests\fib.p -d0 -O3 -v2 > nul
@bench 5 pawn\pawn fib.amx //Pawn,[pawn](http://www.compuphase.com/pawn/pawn.htm)

@echo.
@echo pawn-asm
@pawn\pawn\bin\pawncc tests\fib.p -d0 -O3 -v2 > nul
@bench 5 pawn\pawn-asm fib.amx //Pawn,[pawn-asm](http://www.compuphase.com/pawn/pawn.htm)

@echo.
@echo php/ph7
@bench 1 php\ph7\ph7 tests\fib.php //PHP,[ph7](https://github.com/symisc/PH7)

@echo.
@echo psl/psl
@bench 1 psl\psl tests\fib.psl //PSL,[psl](https://github.com/Silica/PSL)

@echo.
@echo python/micropython
@bench 5 python\mpython tests\fib.py //Python,[micropython](https://github.com/micropython/micropython)

@echo.
@echo python/tinypy
@bench 5 python\tinypy-panda\build\tinypy tests\fib.py //Python,[tinypy(panda)](https://github.com/dkasak/tinypy-panda)

@echo.
@echo quakec/gmqcc
@pushd tests\quakec
@..\..\quakec\gmqcc\gmqcc -O3 > nul
@popd
@bench 5 quakec\gmqcc\qcvm tests\quakec\progs.dat //QuakeC,[gmqcc](https://github.com/graphitemaster/gmqcc)

@echo.
@echo ruby/mruby
@bench 5 ruby\mruby tests\fib.rb //Ruby,[mruby](https://github.com/mruby/mruby)

@echo.
@echo ruby/tinyrb
@pushd ruby\tinyrb-ist
@..\..\bench 5 tinyrb ..\..\tests\fib.rb //Ruby,[tinyrb(ist)](https://github.com/sanchapereira/tinyrb-ist)
@popd

@echo.
@echo scheme/chibi
@pushd scheme\chibi-scheme\
@..\..\bench 5 chibi ..\..\tests\fib.scm //Scheme,[chibi](https://github.com/ashinn/chibi-scheme)
@popd

@echo.
@echo scheme/s7
@pushd scheme\s7\
@..\..\bench 5 s7 ..\..\tests\fib.scm //Scheme,[s7](https://ccrma.stanford.edu/software/snd/snd/s7.html)
@popd

@echo.
@echo scheme/s9
@pushd scheme\s9
@..\..\bench 1 s9 ..\..\tests\fib.scm //Scheme,[s9](http://www.t3x.org/s9fes/)
@popd

@echo.
@echo scheme/tinyscheme
@pushd scheme\tinyscheme-1.41
@..\..\bench 1 scheme ..\..\tests\fib.scm //Scheme,[tinyscheme](http://tinyscheme.sourceforge.net/home.html)
@popd

@echo.
@echo squirrel/squirrel3
@bench 5 squirrel\sq3 tests\fib.nut //Squirrel,[squirrel](http://squirrel-lang.org/)

@echo.
@echo tcl/picol
@bench 1 tcl\picol\picol tests\fib.tcl //Tcl,[picol](http://wiki.tcl.tk/17893)

@echo.
@echo tcl/jim
@bench 5 tcl\jim\jimsh tests\fib.tcl //Tcl,[jim](https://github.com/antirez/Jim)

@echo.
@echo terra
@bench 5 terra\terra tests\fib.t //Terra,[terra](https://github.com/zdevito/terra/)

@echo.
@echo tinyvm
@bench 5 tinyvm\tvm tests\fib.tvm //TinyVM,[tinyvm](https://github.com/jakogut/tinyvm)

@echo.
@echo wren
@bench 5 wren\wren tests\fib.wren //Wren,[wren](https://github.com/munificent/wren)

@echo.
@echo c/oc
@c\oc\parse < tests\fib.oc > tests\fib.ooc
@rem bench 5 c\oc\interp < tests\fib.ooc //C,[OC](http://exmortis.narod.ru/src_pcode_eng.html)

@echo .
@echo lisp/aria
@bench 5 lisp\aria\aria tests\fib.lsp //Lisp,[aria](http://github.com/rxi/aria)

@echo .
@echo lil
@bench 1 tcl\lil tests\fib.lil //Tcl,[lil](https://github.com/badsector/lil/)

@echo .
@echo sgscript
@bench 5 sgscript\sgs tests\fib.sgs //SGScript,[sgscript](https://github.com/snake5/sgscript/)

@echo .
@echo minischeme
@bench 1 scheme\minischeme\miniscm.exe tests\fib.scm //MiniScheme,[MiniScheme](https://github.com/catseye/minischeme)

@echo off

rem @echo.
rem @echo lisp/toylisp
rem @pushd lisp\toylisp
rem @..\..\bench 5 toylisp ..\..\tests\fib.py
rem @popd

@echo.
@echo as/angelscript
@bench 5 angelscript\as tests\fib.as //Angelscript,[angelscript](http://www.angelcode.com/angelscript/)

@echo.
@echo as/angelscript-jit
@bench 5 angelscript\asjit tests\fib.as //Angelscript,[angelscript-jit](https://github.com/BlindMindStudios/AngelScript-JIT-Compiler)

@echo.
@echo c/c4
@bench 5 c\c4\c4 tests\fib.c //C,[c4](https://github.com/rswier/c4)

@echo.
@echo c/c4-jit
@bench 5 c\c4jit\c4jit tests\fib.c //C,[c4-jit](https://github.com/EarlGray/c4)

@echo.
@echo c/picoc
@bench 5 c\picoc\picoc tests\fib.c //C,[picoC](https://github.com/zsaleeba/picoc)

@echo.
@echo c/tcc
@bench 5 c\tcc-0.9.26\win32\tcc tests\fib.c -run //C,[libtcc](http://bellard.org/tcc/)

@echo.
@echo c/vc
@cl tests\fib.c /Ox /Oy /MT /DNDEBUG /nologo > nul
@bench 5 fib //C,[vc](https://www.visualstudio.com/)

@echo.
@echo chai/chaiscript
@bench 1 chaiscript\chai tests\fib.chai //ChaiScript,[chaiscript](https://github.com/ChaiScript/ChaiScript)

@echo.
@echo dao/dao
@bench 5 dao\dao tests\fib.dao //Dao,[dao](https://github.com/daokoder/dao)

@echo.
@echo gm/gamemonkey
@bench 5 gamemonkey\bin\gme64 tests\fib.gm //GameMonkey,[gamemonkey](http://www.gmscript.com/)

@echo.
@echo gml
@bench 1 gml\gml tests\fib.gml --no-history //GML,[gml](https://github.com/graphitemaster/gml)

@echo.
@echo java/jog
@pushd java\jog
@..\..\bench 5 jog ..\..\tests\fib.java //Java,[Jog](https://code.google.com/p/jog-interpreter)
@popd

@echo.
@echo jetscript
@bench 5 jetscript\jet tests\fib.jet //JetScript,[JetScript](https://github.com/matt-attack/JetScript)

@echo.
@echo js/42tiny-js
@bench 1 javascript\42tiny-js\42tinyjs tests\fib.js //JavaScript,[42tiny-js](https://github.com/ardi69/42tiny-js)

@echo.
@echo js/duktape
@bench 5 javascript\duktape\duktape tests\fib.js //JavaScript,[duktape](https://github.com/svaarala/duktape)

@echo.
@echo js/v7
@bench 1 javascript\v7\v7 tests\fib.js //JavaScript,[v7](https://github.com/cesanta/v7)

@echo.
@echo jtc/jtc
@bench 1 jtc\jtc tests\fib.jtc //JTC,[jtc](https://github.com/progschj/jtc)

@echo.
@echo jx9
@bench 5 jx9\jx9 tests\fib.jx9 //JX9,[jx9](http://jx9.symisc.net/)

@echo.
@echo lily/lily
@bench 5 lily\lily tests\fib.lly //Lily,[lily](https://github.com/jesserayadkins/lily)

@echo.
@echo lisp/lispy90
@bench 1 lisp\lispy90\lispy90 tests\fib.l //Lisp,[lispy90](http://howtowriteaprogram.blogspot.com.es/2010/11/lisp-interpreter-in-90-lines-of-c.html)

@echo.
@echo lisp/minilisp
@bench 1 lisp\minilisp\minilisp < tests\fib.l //Lisp,[minilisp](https://github.com/rui314/minilisp)

@echo.
@echo lisp/paren
@pushd lisp\paren\
@..\..\bench 5 paren-1.9.6 ..\..\tests\fib.pn //Lisp,[paren](https://bitbucket.org/ktg/paren)
@popd

@echo.
@echo lua/lua
@bench 5 lua tests\fib.lua //Lua,[lua](https://github.com/LuaDist/lua)

@echo.
@echo lua/luajit
@bench 5 lua\luajit-2.0\src\luajit tests\fib.lua //Lua,[luajit](https://github.com/LuaDist/luajit)

@echo.
@echo lua/luajit-nojit
@bench 5 lua\luajit-2.0\src\luajit -joff tests\fib.lua //Lua,[luajit-nojit](https://github.com/LuaDist/luajit)

@echo.
@echo neko/nekovm
@neko\bin\nekoc tests\fib.neko
@bench 5 neko\neko tests\fib.n //Neko,[nekovm](https://github.com/HaxeFoundation/neko)

@echo.
@echo os/objectscript
@bench 5 os\os tests\fib.os //ObjectScript,[objectscript](https://github.com/unitpoint/objectscript)

@echo.
@echo pawn
@pawn\pawn\bin\pawncc tests\fib.p -d0 -O3 -v2 > nul
@bench 5 pawn\pawn fib.amx //Pawn,[pawn](http://www.compuphase.com/pawn/pawn.htm)

@echo.
@echo pawn-asm
@pawn\pawn\bin\pawncc tests\fib.p -d0 -O3 -v2 > nul
@bench 5 pawn\pawn-asm fib.amx //Pawn,[pawn-asm](http://www.compuphase.com/pawn/pawn.htm)

@echo.
@echo php/ph7
@bench 1 php\ph7\ph7 tests\fib.php //PHP,[ph7](https://github.com/symisc/PH7)

@echo.
@echo psl/psl
@bench 1 psl\psl tests\fib.psl //PSL,[psl](https://github.com/Silica/PSL)

@echo.
@echo python/micropython
@bench 5 python\mpython tests\fib.py //Python,[micropython](https://github.com/micropython/micropython)

@echo.
@echo python/tinypy
@bench 5 python\tinypy-panda\build\tinypy tests\fib.py //Python,[tinypy(panda)](https://github.com/dkasak/tinypy-panda)

@echo.
@echo quakec/gmqcc
@pushd tests\quakec
@..\..\quakec\gmqcc\gmqcc -O3 > nul
@popd
@bench 5 quakec\gmqcc\qcvm tests\quakec\progs.dat //QuakeC,[gmqcc](https://github.com/graphitemaster/gmqcc)

@echo.
@echo ruby/mruby
@bench 5 ruby\mruby tests\fib.rb //Ruby,[mruby](https://github.com/mruby/mruby)

@echo.
@echo ruby/tinyrb
@pushd ruby\tinyrb-ist
@..\..\bench 5 tinyrb ..\..\tests\fib.rb //Ruby,[tinyrb(ist)](https://github.com/sanchapereira/tinyrb-ist)
@popd

@echo.
@echo scheme/chibi
@pushd scheme\chibi-scheme\
@..\..\bench 5 chibi ..\..\tests\fib.scm //Scheme,[chibi](https://github.com/ashinn/chibi-scheme)
@popd

@echo.
@echo scheme/s7
@pushd scheme\s7\
@..\..\bench 5 s7 ..\..\tests\fib.scm //Scheme,[s7](https://ccrma.stanford.edu/software/snd/snd/s7.html)
@popd

@echo.
@echo scheme/s9
@pushd scheme\s9
@..\..\bench 1 s9 ..\..\tests\fib.scm //Scheme,[s9](http://www.t3x.org/s9fes/)
@popd

@echo.
@echo scheme/tinyscheme
@pushd scheme\tinyscheme-1.41
@..\..\bench 1 scheme ..\..\tests\fib.scm //Scheme,[tinyscheme](http://tinyscheme.sourceforge.net/home.html)
@popd

@echo.
@echo squirrel/squirrel3
@bench 5 squirrel\sq3 tests\fib.nut //Squirrel,[squirrel](http://squirrel-lang.org/)

@echo.
@echo tcl/picol
@bench 1 tcl\picol\picol tests\fib.tcl //Tcl,[picol](http://wiki.tcl.tk/17893)

@echo.
@echo tcl/jim
@bench 5 tcl\jim\jimsh tests\fib.tcl //Tcl,[jim](https://github.com/antirez/Jim)

@echo.
@echo terra
@bench 5 terra\terra tests\fib.t //Terra,[terra](https://github.com/zdevito/terra/)

@echo.
@echo tinyvm
@bench 5 tinyvm\tvm tests\fib.tvm //TinyVM,[tinyvm](https://github.com/jakogut/tinyvm)

@echo.
@echo wren
@bench 5 wren\wren tests\fib.wren //Wren,[wren](https://github.com/munificent/wren)

@echo.
@echo c/oc
@c\oc\parse < tests\fib.oc > tests\fib.ooc
@rem bench 5 c\oc\interp < tests\fib.ooc //C,[OC](http://exmortis.narod.ru/src_pcode_eng.html)

@echo .
@echo lisp/aria
@bench 5 lisp\aria\aria tests\fib.lsp //Lisp,[aria](http://github.com/rxi/aria)

@echo .
@echo lil
@bench 1 tcl\lil tests\fib.lil //Tcl,[lil](https://github.com/badsector/lil/)

@echo .
@echo sgscript
@bench 5 sgscript\sgs tests\fib.sgs //SGScript,[sgscript](https://github.com/snake5/sgscript/)

@echo .
@echo minischeme
@bench 1 scheme\minischeme\miniscm.exe tests\fib.scm //MiniScheme,[MiniScheme](https://github.com/catseye/minischeme)

Add LuaJIT with JIT turned off

Add LuaJIT with JIT turned off


@echo off
rem ###############################################################################
rem #
rem #  EGSnrc bat file to build GUIs on Windows
rem #  Copyright (C) 2015 National Research Council Canada
rem #
rem #  This file is part of EGSnrc.
rem #
rem #  EGSnrc is free software: you can redistribute it and/or modify it under
rem #  the terms of the GNU Affero General Public License as published by the
rem #  Free Software Foundation, either version 3 of the License, or (at your
rem #  option) any later version.
rem #
rem #  EGSnrc is distributed in the hope that it will be useful, but WITHOUT ANY
rem #  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
rem #  FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for
rem #  more details.
rem #
rem #  You should have received a copy of the GNU Affero General Public License
rem #  along with EGSnrc. If not, see <http://www.gnu.org/licenses/>.
rem #
rem ###############################################################################
rem #
rem #  Author:          Ernesto Mainegra-Hing, 2011
rem #
rem #  Contributors:
rem #
rem ###############################################################################

echo Checking if object files need to be deleted
echo Argument %1
echo .
echo Deleting objects
     del *.obj
echo .
echo .
echo Checking if GUIs need to be cleaned
echo .
cd ..\..\egs++\view
echo Working in egs++\view...
     if exist Makefile_win2k-cl (
         echo Running nmake clean
         nmake -nologo -f Makefile_win2k-cl clean
     )
     echo Deleting Makefile_win2k-cl
     del Makefile_win2k-cl

cd ..\..\gui\egs_configure
echo Working in egs_configure...
    if exist Makefile_win2k (
        echo Running nmake clean
        nmake -nologo -f Makefile_win2k clean
    )
    echo Deleting Makefile_win2k
    del Makefile_win2k

cd ..\egs_gui
echo Working in egs_gui...
    if exist Makefile_win2k (
        echo Running nmake clean
        nmake -nologo -f Makefile_win2k clean
    )
    echo Deleting Makefile_win2k
    del Makefile_win2k

cd ..\egs_inprz
echo Working in egs_inprz...
    if exist Makefile_win2k (
        echo Running nmake clean
        nmake -nologo -f Makefile_win2k clean
    )
    echo Deleting Makefile_win2k
    del Makefile_win2k

cd ..\egs_install\static
echo Working in egs_install...
    if exist Makefile_win2k (
        echo Running nmake clean
        nmake -nologo -f Makefile_win2k clean
    )
    echo Deleting Makefile_win2k
    del Makefile_win2k

cd ..\..\beam_install
echo Working in beam_install...
    if exist Makefile_win2k (
        echo Running nmake clean
        nmake -nologo -f Makefile_win2k clean
    )
    echo Deleting Makefile_win2k
    del Makefile_win2k

cd ..\..\pieces\windows

Add clean up .bat file for Windows

Add clean up .bat file for Windows


@ECHO off

IF NOT "x%1" == "x" GOTO :%1

:luvit
ECHO "Building luvit"
lit.exe make app
GOTO :end

:lit
ECHO "Building lit"
git clone --depth 1 https://github.com/luvit/luvi-binaries.git
git clone --depth 1 https://github.com/luvit/lit.git lit
SET LUVI_APP=lit/app
SET LUVI_TARGET=lit.exe
luvi-binaries\Windows\luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
GOTO :end

:test
CALL Make.bat luvit
luvit.exe tests\run.lua
GOTO :end

:clean
IF EXIST luvit.exe DEL /F /Q luvit.exe
IF EXIST lit.exe DEL /F /Q lit.exe
IF EXIST lit RMDIR /S /Q lit
IF EXIST luvi-binaries RMDIR /S /Q luvi-binaries

:end

@ECHO off

IF NOT "x%1" == "x" GOTO :%1

:luvit
IF NOT EXIST lit.exe CALL Make.bat lit
ECHO "Building luvit"
lit.exe make app
GOTO :end

:lit
ECHO "Building lit"
git clone --depth 1 https://github.com/luvit/luvi-binaries.git
git clone --depth 1 https://github.com/luvit/lit.git lit
SET LUVI_APP=lit/app
SET LUVI_TARGET=lit.exe
luvi-binaries\Windows\luvi.exe
SET "LUVI_APP="
SET "LUVI_TARGET="
GOTO :end

:test
CALL Make.bat luvit
luvit.exe tests\run.lua
GOTO :end

:clean
IF EXIST luvit.exe DEL /F /Q luvit.exe
IF EXIST lit.exe DEL /F /Q lit.exe
IF EXIST lit RMDIR /S /Q lit
IF EXIST luvi-binaries RMDIR /S /Q luvi-binaries

:end

Make luvit target depend on lit target in Make.bat


@ECHO OFF
REM -- Automates cygwin installation

SETLOCAL

REM -- Change to the directory of the executing batch file
CD %~dp0

REM -- Configure our paths
SET ROOTDIR=C:\cygwin
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/
SET SSHD_PORT=13610
SET SSH_TASK_TEMPLATE_URL=https://raw.githubusercontent.com/weikinhuang/dotfiles/master/dotenv/other/cygwin/win-schtasks-ssh.xml

REM -- Additional variables
SET ADD_ARGS=""
SET LOCALDIR="%ROOTDIR%\setup"
IF "%PROCESSOR_ARCHITECTURE%" == "x86" (
    SET SETUP_NAME=setup-x86.exe
) ELSE (
    SET SETUP_NAME=setup-x86_64.exe
)

REM -- STARTING SCRIPT
set DLOAD_SCRIPT=download.vbs

REM -- pure batch downloader: https://semitwist.com/articles/article/view/downloading-files-from-plain-batch-with-zero-dependencies
REM -- Windows has no built-in wget or curl, so generate a VBS script to do it:
REM -------------------------------------------------------------------------
ECHO Option Explicit                                                    >  %DLOAD_SCRIPT%
ECHO Dim args, http, fileSystem, adoStream, url, target, status         >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO Set args = Wscript.Arguments                                       >> %DLOAD_SCRIPT%
ECHO Set http = CreateObject("WinHttp.WinHttpRequest.5.1")              >> %DLOAD_SCRIPT%
ECHO url = args(0)                                                      >> %DLOAD_SCRIPT%
ECHO target = args(1)                                                   >> %DLOAD_SCRIPT%
ECHO WScript.Echo "Getting '" ^& target ^& "' from '" ^& url ^& "'..."  >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO http.Open "GET", url, False                                        >> %DLOAD_SCRIPT%
ECHO http.Send                                                          >> %DLOAD_SCRIPT%
ECHO status = http.Status                                               >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO If status ^<^> 200 Then                                            >> %DLOAD_SCRIPT%
ECHO     WScript.Echo "FAILED to download: HTTP Status " ^& status      >> %DLOAD_SCRIPT%
ECHO     WScript.Quit 1                                                 >> %DLOAD_SCRIPT%
ECHO End If                                                             >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO Set adoStream = CreateObject("ADODB.Stream")                       >> %DLOAD_SCRIPT%
ECHO adoStream.Open                                                     >> %DLOAD_SCRIPT%
ECHO adoStream.Type = 1                                                 >> %DLOAD_SCRIPT%
ECHO adoStream.Write http.ResponseBody                                  >> %DLOAD_SCRIPT%
ECHO adoStream.Position = 0                                             >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO Set fileSystem = CreateObject("Scripting.FileSystemObject")        >> %DLOAD_SCRIPT%
ECHO If fileSystem.FileExists(target) Then fileSystem.DeleteFile target >> %DLOAD_SCRIPT%
ECHO adoStream.SaveToFile target                                        >> %DLOAD_SCRIPT%
ECHO adoStream.Close                                                    >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
REM -------------------------------------------------------------------------

mkdir "%ROOTDIR%"
mkdir "%LOCALDIR%"

IF NOT EXIST "%ROOTDIR%\%SETUP_NAME%" cscript //Nologo "%DLOAD_SCRIPT%" http://cygwin.com/%SETUP_NAME% "%ROOTDIR%\%SETUP_NAME%"

REM -- cleanup temp files
del "%DLOAD_SCRIPT%"

REM -- These are the packages we will install (in addition to the default packages)
SET PACKAGES=bash-completion,bc,bind,ca-certificates,curl,cygutils-extra,git,git-completion,git-svn,gnupg
SET PACKAGES=%PACKAGES%,inetutils,nc,nc6,ncurses,openssh,openssl,procps,rsync,screen,unzip,vim,wget,xxd
REM -- Extra packages
SET PACKAGES=%PACKAGES%,GraphicsMagick,ImageMagick,aspell,aspell-en,bzip2,fdupes,heimdal,mkisofs,p7zip

REM -- Do it!
ECHO *** INSTALLING DEFAULT PACKAGES
"%ROOTDIR%\%SETUP_NAME%" -q -d -D -L -X -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" %ADD_ARGS%
ECHO.
ECHO.
ECHO *** INSTALLING CUSTOM PACKAGES
"%ROOTDIR%\%SETUP_NAME%" -q -d -D -L -X -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" -P "%PACKAGES%" %ADD_ARGS%

REM -- Show what we did
ECHO.
ECHO.
ECHO cygwin installation updated
ECHO - "%PACKAGES%"
ECHO.

REM -- make cygdrive root / instead of /cygdrive
ECHO.
ECHO.
ECHO updating cygdrive fstab
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/# none \/cygdrive cygdrive /none \/ cygdrive /' /etc/fstab"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/none \/cygdrive cygdrive /none \/ cygdrive /' /etc/fstab"
ECHO.
ECHO.

REM -- make the home directory
ECHO.
ECHO.
ECHO making the home directory be the windows home
REM -- WIN XP-
"%ROOTDIR%\bin\bash.exe" --login -c "if [[ -d \"/c/Documents and Settings/$USER\" ]]; then mv \"/home/$USER\" \"/home/$USER.bak\"; ln -s \"/c/Documents and Settings/$USER\" \"/home/$USER\"; fi;"
REM -- WIN Vista+
"%ROOTDIR%\bin\bash.exe" --login -c "if [[ -d \"/c/Users/$USER\" ]]; then mv \"/home/$USER\" \"/home/$USER.bak\"; ln -s \"/c/Users/$USER\" \"/home/$USER\"; fi;"
ECHO.
ECHO.

REM -- setup sshd for local user only
ECHO.
ECHO.
ECHO setup sshd for local user only
"%ROOTDIR%\bin\bash.exe" --login -c "ssh-host-config --no --port %SSHD_PORT%"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^#ListenAddress 0.0.0.0$/ListenAddress 127.0.0.1/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^#ListenAddress ::$/ListenAddress ::1/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^#PasswordAuthentication yes$/PasswordAuthentication no/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^UsePrivilegeSeparation sandbox/UsePrivilegeSeparation no/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "if [[ ! -f ~/.ssh/id_rsa ]]; then ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys; fi;"
"%ROOTDIR%\bin\bash.exe" --login -c "echo > /etc/motd"

REM -- Sadly in the newest Windows 10: http://www.thewindowsclub.com/create-elevated-shortcut-run-programs-bypass-uac instead
"%ROOTDIR%\bin\bash.exe" --login -c "wget -O /startup/ssh-task.xml %SSH_TASK_TEMPLATE_URL%"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/##HOSTNAME##/'$(hostname)'/' /startup/ssh-task.xml"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/##USER##/'$(whoami)'/' /startup/ssh-task.xml"
schtasks /delete /f /tn cygwinsshd
schtasks /create /xml "%ROOTDIR%\startup\ssh-task.xml" /tn cygwinsshd

IF NOT EXIST "%ROOTDIR%\cygsetup.cmd" (
    echo "%ROOTDIR%\%SETUP_NAME%" -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" "%ADD_ARGS%" > "%ROOTDIR%\cygsetup.cmd"
)

ECHO.
ECHO.

ENDLOCAL

PAUSE
EXIT /B 0

@ECHO OFF
REM -- Automates cygwin installation

SETLOCAL

REM -- Change to the directory of the executing batch file
CD %~dp0

REM -- Configure our paths
SET ROOTDIR=C:\cygwin
SET SITE=http://mirrors.kernel.org/sourceware/cygwin/
SET SSHD_PORT=13610
SET SSH_TASK_TEMPLATE_URL=https://raw.githubusercontent.com/weikinhuang/dotfiles/master/dotenv/other/cygwin/win-schtasks-ssh.xml

REM -- Additional variables
SET ADD_ARGS=""
SET LOCALDIR="%ROOTDIR%\setup"
IF "%PROCESSOR_ARCHITECTURE%" == "x86" (
    SET SETUP_NAME=setup-x86.exe
) ELSE (
    SET SETUP_NAME=setup-x86_64.exe
)

REM -- STARTING SCRIPT
set DLOAD_SCRIPT=download.vbs

REM -- pure batch downloader: https://semitwist.com/articles/article/view/downloading-files-from-plain-batch-with-zero-dependencies
REM -- Windows has no built-in wget or curl, so generate a VBS script to do it:
REM -------------------------------------------------------------------------
ECHO Option Explicit                                                    >  %DLOAD_SCRIPT%
ECHO Dim args, http, fileSystem, adoStream, url, target, status         >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO Set args = Wscript.Arguments                                       >> %DLOAD_SCRIPT%
ECHO Set http = CreateObject("WinHttp.WinHttpRequest.5.1")              >> %DLOAD_SCRIPT%
ECHO url = args(0)                                                      >> %DLOAD_SCRIPT%
ECHO target = args(1)                                                   >> %DLOAD_SCRIPT%
ECHO WScript.Echo "Getting '" ^& target ^& "' from '" ^& url ^& "'..."  >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO http.Open "GET", url, False                                        >> %DLOAD_SCRIPT%
ECHO http.Send                                                          >> %DLOAD_SCRIPT%
ECHO status = http.Status                                               >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO If status ^<^> 200 Then                                            >> %DLOAD_SCRIPT%
ECHO     WScript.Echo "FAILED to download: HTTP Status " ^& status      >> %DLOAD_SCRIPT%
ECHO     WScript.Quit 1                                                 >> %DLOAD_SCRIPT%
ECHO End If                                                             >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO Set adoStream = CreateObject("ADODB.Stream")                       >> %DLOAD_SCRIPT%
ECHO adoStream.Open                                                     >> %DLOAD_SCRIPT%
ECHO adoStream.Type = 1                                                 >> %DLOAD_SCRIPT%
ECHO adoStream.Write http.ResponseBody                                  >> %DLOAD_SCRIPT%
ECHO adoStream.Position = 0                                             >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
ECHO Set fileSystem = CreateObject("Scripting.FileSystemObject")        >> %DLOAD_SCRIPT%
ECHO If fileSystem.FileExists(target) Then fileSystem.DeleteFile target >> %DLOAD_SCRIPT%
ECHO adoStream.SaveToFile target                                        >> %DLOAD_SCRIPT%
ECHO adoStream.Close                                                    >> %DLOAD_SCRIPT%
ECHO.                                                                   >> %DLOAD_SCRIPT%
REM -------------------------------------------------------------------------

mkdir "%ROOTDIR%"
mkdir "%LOCALDIR%"

IF NOT EXIST "%ROOTDIR%\%SETUP_NAME%" cscript //Nologo "%DLOAD_SCRIPT%" http://cygwin.com/%SETUP_NAME% "%ROOTDIR%\%SETUP_NAME%"

REM -- cleanup temp files
del "%DLOAD_SCRIPT%"

REM -- These are the packages we will install (in addition to the default packages)
SET PACKAGES=bash-completion,bc,bind,ca-certificates,curl,cygutils-extra,git,git-completion,git-svn,gnupg
SET PACKAGES=%PACKAGES%,inetutils,nc,nc6,ncurses,openssh,openssl,procps,rsync,screen,unzip,vim,wget,xxd
REM -- Extra packages
SET PACKAGES=%PACKAGES%,GraphicsMagick,ImageMagick,aspell,aspell-en,bzip2,fdupes,heimdal,mkisofs,p7zip

REM -- Do it!
ECHO *** INSTALLING DEFAULT PACKAGES
"%ROOTDIR%\%SETUP_NAME%" -q -d -D -L -X -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" %ADD_ARGS%
ECHO.
ECHO.
ECHO *** INSTALLING CUSTOM PACKAGES
"%ROOTDIR%\%SETUP_NAME%" -q -d -D -L -X -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" -P "%PACKAGES%" %ADD_ARGS%

REM -- Show what we did
ECHO.
ECHO.
ECHO cygwin installation updated
ECHO - "%PACKAGES%"
ECHO.

REM -- make cygdrive root / instead of /cygdrive
ECHO.
ECHO.
ECHO updating cygdrive fstab
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/# none \/cygdrive cygdrive /none \/ cygdrive /' /etc/fstab"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/none \/cygdrive cygdrive /none \/ cygdrive /' /etc/fstab"
ECHO.
ECHO.

REM -- make the home directory
ECHO.
ECHO.
ECHO making the home directory be the windows home
REM -- WIN XP-
"%ROOTDIR%\bin\bash.exe" --login -c "if [[ -d \"/c/Documents and Settings/$USER\" ]]; then mv \"/home/$USER\" \"/home/$USER.bak\"; ln -s \"/c/Documents and Settings/$USER\" \"/home/$USER\"; fi;"
REM -- WIN Vista+
"%ROOTDIR%\bin\bash.exe" --login -c "if [[ -d \"/c/Users/$USER\" ]]; then mv \"/home/$USER\" \"/home/$USER.bak\"; ln -s \"/c/Users/$USER\" \"/home/$USER\"; fi;"
ECHO.
ECHO.

REM -- setup sshd for local user only
ECHO.
ECHO.
ECHO setup sshd for local user only
"%ROOTDIR%\bin\bash.exe" --login -c "ssh-host-config --no --port %SSHD_PORT%"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^#ListenAddress 0.0.0.0$/ListenAddress 127.0.0.1/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^#ListenAddress ::$/ListenAddress ::1/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^#PasswordAuthentication yes$/PasswordAuthentication no/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/^UsePrivilegeSeparation sandbox/UsePrivilegeSeparation no/' /etc/sshd_config"
"%ROOTDIR%\bin\bash.exe" --login -c "if [[ ! -f ~/.ssh/id_rsa ]]; then ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa && cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys && chmod 0600 ~/.ssh/authorized_keys; fi;"
"%ROOTDIR%\bin\bash.exe" --login -c "echo > /etc/motd"

REM -- Sadly in the newest Windows 10: http://www.thewindowsclub.com/create-elevated-shortcut-run-programs-bypass-uac instead
"%ROOTDIR%\bin\bash.exe" --login -c "mkdir -p /startup"
"%ROOTDIR%\bin\bash.exe" --login -c "wget -O /startup/ssh-task.xml %SSH_TASK_TEMPLATE_URL%"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/##HOSTNAME##/'$(hostname)'/' /startup/ssh-task.xml"
"%ROOTDIR%\bin\bash.exe" --login -c "sed -i 's/##USER##/'$(whoami)'/' /startup/ssh-task.xml"
schtasks /delete /f /tn cygwinsshd
schtasks /create /xml "%ROOTDIR%\startup\ssh-task.xml" /tn cygwinsshd

IF NOT EXIST "%ROOTDIR%\cygsetup.cmd" (
    echo "%ROOTDIR%\%SETUP_NAME%" -s "%SITE%" -l "%LOCALDIR%" -R "%ROOTDIR%" "%ADD_ARGS%" > "%ROOTDIR%\cygsetup.cmd"
)

ECHO.
ECHO.

ENDLOCAL

PAUSE
EXIT /B 0

Make sure directory is made

Make sure directory is made


:: Start with bootstrap
CALL bootstrap.bat mingw
IF errorlevel 1 exit 1

:: Build step
CALL b2 install ^
    --build-dir=buildboost ^
    --prefix=%LIBRARY_PREFIX% ^
    toolset=gcc ^
    address-model=%ARCH% ^
    variant=release ^
    threading=multi ^
    link=shared ^
    -j%CPU_COUNT% ^
    -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
    -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
    --with-python
IF errorlevel 1 exit 1

:: Install fix-up for a non version-specific boost include
move %LIBRARY_INC%\boost-1_61\boost %LIBRARY_INC%
IF errorlevel 1 exit 1

:: Move dll's to LIBRARY_BIN
move %LIBRARY_LIB%\*vc%LIB_VER%-mt-1_61.dll "%LIBRARY_BIN%"
IF errorlevel 1 exit 1
Status API Training Shop Blog About

:: Start with bootstrap
cd tools\build
CALL bootstrap.bat
CALL .\b2 install --prefix=%LIBRARY_BIN%
cd ..\..

:: Build step
CALL .\b2 install ^
    --build-dir=buildboost ^
    --prefix=%LIBRARY_PREFIX% ^
    toolset=gcc ^
    address-model=%ARCH% ^
    variant=release ^
    threading=multi ^
    link=shared ^
    -j%CPU_COUNT% ^
    -s ZLIB_INCLUDE="%LIBRARY_INC%" ^
    -s ZLIB_LIBPATH="%LIBRARY_LIB%" ^
    --with-python
IF errorlevel 1 exit 1

:: Install fix-up for a non version-specific boost include
move %LIBRARY_INC%\boost-1_61\boost %LIBRARY_INC%
IF errorlevel 1 exit 1

:: Move dll's to LIBRARY_BIN
move %LIBRARY_LIB%\*vc%LIB_VER%-mt-1_61.dll "%LIBRARY_BIN%"
IF errorlevel 1 exit 1
Status API Training Shop Blog About

Update bld.bat

Update bld.bat