Added a build script

Added a build script

--- build.bat
+++ build.bat
@@ -0,0 +1,4 @@
+rmdir /s /q "dist/" && ^
+pip3 install wheel && ^
+python setup.py sdist bdist_wheel && ^
+twine upload dist/*


Build Command

Build Command

Local jekyll build commamd

error: pathspec 'build.bat' did not match any file(s) known to git

--- build.bat
+++ build.bat
@@ -0,0 +1 @@
+jekyll build


more cleanup

more cleanup

--- build.bat
+++ build.bat
@@ -7,7 +7,7 @@
 dotnet build -c %BUILD_CONFIG% ConsoleAppLauncher

 echo Running tests...
-dotnet test -c %BUILD_CONFIG% -f net45 ConsoleAppLauncher.Tests
+dotnet test -c %BUILD_CONFIG% ConsoleAppLauncher.Tests

 echo Building Samples...
 dotnet build -c %BUILD_CONFIG% ConsoleAppLauncher.Samples


Updated with new commands.

Updated with new commands.

--- build.bat
+++ build.bat
@@ -1,2 +1,2 @@
-go build elrepl.go command.go commandparser.go dispatcher.go httpclient.go handler.go handlealias.go handledir.go handledoc.go handleenv.go handleexit.go handleget.go handlehelp.go handlehost.go handleindex.go handleload.go handlelog.go handleport.go handlepost.go handleput.go handlereindex.go handlerun.go handleversion.go handleduplicatescount.go
+go build elrepl.go command.go commandparser.go dispatcher.go httpclient.go handler.go handlealias.go handledir.go handledoc.go handleenv.go handleexit.go handleget.go handlehelp.go handlehost.go handleindex.go handleload.go handlelog.go handleport.go handlepost.go handleput.go handlereindex.go handlerun.go handlestatus.go handleversion.go handleduplicatescount.go
 pause


Run coverage in build.cmd

Run coverage in build.cmd

--- build.cmd
+++ build.cmd
@@ -6,7 +6,8 @@
 call npm install
 call npm run check
 call npm run build
-call npm run validate
+call npm run lint
+call npm run coverage
 call npm run integration-test

 if %ERRORLEVEL% neq 0 goto BuildFail


Use binary logger

Use binary logger

--- build.cmd
+++ build.cmd
@@ -12,4 +12,4 @@
 ::       assembly.

 if not exist bin mkdir bin
-"%MSBUILD_PATH%" /nologo /m /v:m /nr:false /flp:verbosity=normal;LogFile=bin\msbuild.log %*
+"%MSBUILD_PATH%" /nologo /m /v:m /nr:false /bl:bin\msbuild.binlog %*


Adding switch to build.cmd to skip KRE install

--- build.cmd
+++ build.cmd
@@ -18,6 +18,8 @@
 IF EXIST packages\KoreBuild goto run
 .nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
 .nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion
+
+IF "%SKIP_KRE_INSTALL%"=="1" goto run
 CALL packages\KoreBuild\build\kvm upgrade -svr50 -x86
 CALL packages\KoreBuild\build\kvm install default -svrc50 -x86


Build log filename variable

Build log filename variable

- Set name of build log file and build project file into env variable so
they are more easily discoverable in the log file, and only defined
once.
- Fix URL for .NET Developer Guide and minor typo in comments.

--- build.cmd
+++ build.cmd
@@ -3,21 +3,23 @@

 :: Note: We've disabled node reuse because it causes file locking issues.
 ::       The issue is that we extend the build with our own targets which
-::       means that that rebuilding cannot successully delete the task
+::       means that that rebuilding cannot successfully delete the task
 ::       assembly.

 :: Check prerequisites
 if not defined VS120COMNTOOLS (
     if not defined VS140COMNTOOLS (
         echo Error: build.cmd should be run from a Visual Studio 2013 or 2015 Command Prompt.
-        echo        Please see https://github.com/dotnet/corefx/wiki/Developer%%20Guide for build instructions.
+        echo        Please see https://github.com/dotnet/corefx/wiki/Developer-Guide for build instructions.
         exit /b 1
     )
 )

 :: Log build command line
+set _buildproj=%~dp0build.proj
+set _buildlog=%~dp0msbuild.log
 set _buildprefix=echo
-set _buildpostfix=^> "%~dp0msbuild.log"
+set _buildpostfix=^> "%_buildlog%"
 call :build %*

 :: Build
@@ -28,5 +30,5 @@
 goto :eof

 :build
-%_buildprefix% msbuild "%~dp0build.proj" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%~dp0msbuild.log";Append %* %_buildpostfix%
+%_buildprefix% msbuild "%_buildproj%" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%_buildlog%";Append %* %_buildpostfix%
 goto :eof


build default platform

build default platform

--- build.cmd
+++ build.cmd
@@ -13,7 +13,7 @@
 if "%XYO_PLATFORM%" == "win32-msvc-2019" set DEFAULT_PLATFORM=msvc
 if "%XYO_PLATFORM%" == "win64-msvc-2017" set DEFAULT_PLATFORM=msvc
 if "%XYO_PLATFORM%" == "win32-msvc-2017" set DEFAULT_PLATFORM=msvc
-if "%XYO_PLATFORM%" == "" goto Info
+if "%DEFAULT_PLATFORM%" == "" set DEFAULT_PLATFORM=msvc
 if not exist ".\port\build.%DEFAULT_PLATFORM%.cmd" goto Info
 call ".\port\build.%DEFAULT_PLATFORM%.cmd" %1
 goto :eof


Updated build stamp to 2.1.1

Updated build stamp to 2.1.1

--- build.cmd
+++ build.cmd
@@ -16,6 +16,6 @@
 echo Building...
 color

-"%SystemDrive%\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" build\Local.proj /t:Package /p:build_version=2.0.1 /verbosity:minimal /p:build_number=2.0.1.1 /nologo
+"%SystemDrive%\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" build\Local.proj /t:Package /p:build_version=2.1.1 /verbosity:minimal /p:build_number=2.0.1.1 /nologo

 pause


Also add build.cmd.

Also add build.cmd.

error: pathspec 'build.cmd' did not match any file(s) known to git

--- build.cmd
+++ build.cmd
@@ -0,0 +1,21 @@
+@echo off
+:: To build extensions for 64 bit Python 3, we need to configure environment
+:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
+:: MS Windows SDK for Windows 7 and .NET Framework 4
+::
+:: More details at:
+:: https://github.com/cython/cython/wiki/CythonExtensionsOnWindows
+
+IF "%DISTUTILS_USE_SDK%"=="1" (
+    ECHO Configuring environment to build with MSVC on a 64bit architecture
+    ECHO Using Windows SDK 7.1
+    "C:\Program Files\Microsoft SDKs\Windows\v7.1\Setup\WindowsSdkVer.exe" -q -version:v7.1
+    CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64 /release
+    SET MSSdk=1
+    REM Need the following to allow tox to see the SDK compiler
+    SET TOX_TESTENV_PASSENV=DISTUTILS_USE_SDK MSSdk INCLUDE LIB
+) ELSE (
+    ECHO Using default MSVC build environment
+)
+
+CALL %*


Improving build script.

Improving build script.

--- build.cmd
+++ build.cmd
@@ -38,6 +38,7 @@
 rem I clean macos because I don't trust unity
 rmdir /s /q build\macos
 mkdir build\macos
+mkdir build\macos\Valkyrie.app

 rem read build version
 set /p version=<Assets\Resources\version.txt


Update 'build.cmd' to pull Sake from v2 NuGet feed.

--- build.cmd
+++ build.cmd
@@ -23,7 +23,7 @@
 ) ELSE (
 	.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
 )
-.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion
+.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages

 IF "%SKIP_DNX_INSTALL%"=="1" goto run
 IF %BUILDCMD_DNX_VERSION%=="" (


remove file copy hack from fsharp.core.unit tests (#1738)

--- build.cmd
+++ build.cmd
@@ -778,13 +778,10 @@

 if '%TEST_CORECLR_COREUNIT_SUITE%' == '1' (

-	set XMLFILE=!RESULTSDIR!\test-coreclr-coreunit-results.xml
-	set OUTPUTFILE=!RESULTSDIR!\test-coreclr-coreunit-output.log
-	set ERRORFILE=!RESULTSDIR!\test-coreclr-coreunit-errors.log
-
-    REM these copies should not be needed, see https://github.com/fsharp/fsharp/issues/642
-    xcopy /S /Q /Y src\fsharp\FSharp.Core.Unittests\bin\!BUILD_CONFIG!\netcoreapp1.0\* "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\"
-
+    set XMLFILE=!RESULTSDIR!\test-coreclr-coreunit-results.xml
+    set OUTPUTFILE=!RESULTSDIR!\test-coreclr-coreunit-output.log
+    set ERRORFILE=!RESULTSDIR!\test-coreclr-coreunit-errors.log
+
     echo "%_dotnetexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!
          "%_dotnetexe%" "%~dp0tests\testbin\!BUILD_CONFIG!\coreclr\FSharp.Core.Unittests\FSharp.Core.Unittests.dll" !WHERE_ARG_NUNIT!

@@ -806,15 +803,15 @@

 if '%TEST_CORECLR_FSHARP_SUITE%' == '1' (

-	set single_threaded=true
-	set permutations=FSC_CORECLR
-	set XMLFILE=%RESULTSDIR!\test-coreclr-fsharp-results.xml
-	set OUTPUTFILE=!RESULTSDIR!\test-coreclr-fsharp-output.log
-	set ERRORFILE=!RESULTSDIR!\test-coreclr-fsharp-errors.log
+    set single_threaded=true
+    set permutations=FSC_CORECLR
+    set XMLFILE=%RESULTSDIR!\test-coreclr-fsharp-results.xml
+    set OUTPUTFILE=!RESULTSDIR!\test-coreclr-fsharp-output.log
+    set ERRORFILE=!RESULTSDIR!\test-coreclr-fsharp-errors.log
     echo "!NUNIT3_CONSOLE!" --verbose "!FSCBINPATH!\..\..\coreclr\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 --work:"!FSCBINPATH!"  --output:"!OUTPUTFILE!" --err:"!ERRORFILE!" --result:"!XMLFILE!;format=nunit3" !WHERE_ARG_NUNIT!
          "!NUNIT3_CONSOLE!" --verbose "!FSCBINPATH!\..\..\coreclr\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 --work:"!FSCBINPATH!"  --output:"!OUTPUTFILE!" --err:"!ERRORFILE!" --result:"!XMLFILE!;format=nunit3" !WHERE_ARG_NUNIT!

-	call :UPLOAD_TEST_RESULTS "!XMLFILE!" "!OUTPUTFILE!"  "!ERRORFILE!"
+    call :UPLOAD_TEST_RESULTS "!XMLFILE!" "!OUTPUTFILE!"  "!ERRORFILE!"
     if NOT '!saved_errorlevel!' == '0' (
         echo --------------begin coreclr-fsharp test output -------------------
         type "!OUTPUTFILE!"


r6784/sofa-dev : ADD : script for Windows users to allow to parse only one or several .pro files, instead of running always ProjectVCx.bat each time a file is added. warning, this works for .pro modification but, not for a new .pro created. Typically if you add a new plugin, you have to rebuild all the sofa.sln

error: pathspec 'project_options.bat' did not match any file(s) known to git

--- project_options.bat
+++ project_options.bat
@@ -0,0 +1,138 @@
+@echo off
+REM This batch permit to create all dsp project or vcproj project for
+REM Visual C++ 2003 or 2005
+REM use : project [VC7 / VC8 / vc9 / clean] [id# project]
+REM default visual project depends on the environment variable QMAKESPEC
+
+@if not "%QMAKEPATH%" == ""  goto subproject
+set QMAKEPATH=%CD%\tools\qt4win
+set QTDIR=%CD%\tools\qt4win
+set PATH=%QMAKEPATH%\bin;%PATH%
+
+:subproject
+set mode= "%2"
+if "%mode" == "" goto menu
+
+:menu
+echo *------------------------------------*
+echo *  Welcome to the Sofa qmake parser  *
+echo *------------------------------------*
+echo What do you want to rebuild ?
+echo 0 : rebuild all
+echo 1 : rebuild projects
+echo 2 : rebuild plugins
+echo 2 : rebuild tutorials
+echo 3 : rebuild all components
+echo 4 :   - rebuild behaviormodel
+echo 5 :   - rebuild collision
+echo 6 :   - rebuild constraint
+echo 7 :   - rebuild contextobject
+echo 8 :   - rebuild controller
+echo 9 :   - rebuild engine
+echo 10 :  - rebuild fem
+echo 11 :  - rebuild forcefield
+echo 12 :  - rebuild interactionforcefield
+echo 13 :  - rebuild linearsolver
+echo 14 :  - rebuild loader
+echo 15 :  - rebuild mapping
+echo 16 :  - rebuild mass
+echo 17 :  - rebuild mastersolver
+echo 18 :  - rebuild misc
+echo 19 :  - rebuild odesolver
+echo 20 :  - rebuild topology
+echo 21 :  - rebuild typedef
+echo 22 :  - rebuild visualmodel
+echo 23 : rebuild gui
+echo 24 : rebuild simulation
+echo 25 : rebuild cuda module
+set /p choix=your choice :
+if %choix%==0	set mode=Sofa&		set proj=Sofa.sln
+if %choix%==1	set mode=projects&	set proj=Sofa.sln&	cd applications\projects
+if %choix%==2	set mode=plugins&	set proj=Sofa.sln&	cd applications\plugins
+if %choix%==3 	set mode=component&	set proj=Sofa.sln&	cd modules\sofa\component
+if %choix%==4 	set mode=behaviormodel& 			set proj=sofacomponentbehaviormodel.vcproj&	 cd modules\sofa\component\behaviormodel
+if %choix%==5 	set mode=collision& 				set proj=sofacomponentcollision.vcproj&	 cd modules\sofa\component\collision
+if %choix%==6 	set mode=constraint& 				set proj=sofacomponentconstraint.vcproj&	 cd modules\sofa\component\constraint
+if %choix%==7 	set mode=contextobject& 			set proj=sofacomponentcontextobject.vcproj&	 cd modules\sofa\component\contextobject
+if %choix%==8 	set mode=controller& 				set proj=sofacomponentcontroller.vcproj&	 cd modules\sofa\component\controller
+if %choix%==9 	set mode=engine& 					set proj=sofacomponentengine.vcproj&	 cd modules\sofa\component\engine
+if %choix%==10	set mode=fem& 						set proj=sofacomponentfem.vcproj&	cd modules\sofa\component\fem
+if %choix%==11	set mode=forcefield& 				set proj=sofacomponentforcefield.vcproj&	 cd modules\sofa\component\forcefield
+if %choix%==12 	set mode=interactionforcefield& 	set proj=sofacomponentinteractionforcefield.vcproj&	 cd modules\sofa\component\interactionforcefield
+if %choix%==13 	set mode=linearsolver& 				set proj=sofacomponentlinearsolver.vcproj&	 cd modules\sofa\component\linearsolver
+if %choix%==14 	set mode=loader& 					set proj=sofacomponentloader.vcproj&	 cd modules\sofa\component\loader
+if %choix%==15 	set mode=mapping& 					set proj=sofacomponentmapping.vcproj&	 cd modules\sofa\component\mapping
+if %choix%==16 	set mode=mass& 						set proj=sofacomponentmass.vcproj&	 cd modules\sofa\component\mass
+if %choix%==17 	set mode=mastersolver& 				set proj=sofacomponentmastersolver.vcproj&	 cd modules\sofa\component\mastersolver
+if %choix%==18 	set mode=misc& 						set proj=sofacomponentmisc.vcproj&	 cd modules\sofa\component\misc
+if %choix%==19 	set mode=odesolver& 				set proj=sofacomponentodesolver.vcproj&	 cd modules\sofa\component\odesolver
+if %choix%==20 	set mode=topology& 					set proj=sofacomponenttopology.vcproj&	 cd modules\sofa\component\topology
+if %choix%==21 	set mode=typedef& 					set proj=sofacomponenttypedef.vcproj&	 cd modules\sofa\component\typedef
+if %choix%==22 	set mode=visualmodel& 				set proj=sofacomponentvisualmodel.vcproj&	 cd modules\sofa\component\visualmodel
+if %choix%==23 	set mode=gui&	set proj=Sofa.sln&	cd applications\sofa\gui
+if %choix%==24 	set mode=gpu&	set proj=Sofa.sln&	cd modules\sofa\simulation
+if %choix%==25 	set mode=gpu&	set proj=Sofa.sln&	cd modules\sofa\gpu
+echo you chose %mode%
+goto params
+
+
+:params
+if "%1" == "VC7" goto vc7
+if "%1" == "VC8" goto vc8
+if "%1" == "VC9" goto vc9
+if "%1" == "clean" goto clean
+if "%1" == "" goto menu_versions
+
+:menu_versions
+echo ------------
+echo For wich Visual Studio ?
+echo 0 : visual 7 (.net)
+echo 1 : visual 8 (2005)
+echo 2 : visual 9 (2008)
+set /p choix=your choice :
+if %choix%==0 goto vc7
+if %choix%==1 goto vc8
+if %choix%==2 goto vc9
+
+
+:console
+@echo on
+@echo Making Makefiles
+qmake -recursive
+@goto end
+
+:vc7
+set QMAKESPEC=win32-msvc.net
+@echo on
+@echo Making Visual project 7
+qmake -tp vc -recursive -o %proj% %mode%.pro QT_INSTALL_PREFIX="%QTDIR%"
+goto common
+
+:vc8
+set QMAKESPEC=win32-msvc2005
+@echo on
+@echo Making Visual project 8
+qmake -tp vc -recursive -o %proj% %mode%.pro QT_INSTALL_PREFIX="%QTDIR%"
+goto common
+
+:vc9
+set QMAKESPEC=win32-msvc2008
+@echo on
+@echo Making Visual project 9
+qmake -tp vc -recursive -o %proj% %mode%.pro QT_INSTALL_PREFIX="%QTDIR%"
+goto common
+
+:common
+@if "%ERRORLEVEL%"=="0" goto end
+echo ERROR %ERRORLEVEL%
+pause
+@goto end
+
+:clean
+@echo cleaning all VC Projects
+for /R %%i in (*.ncb, *.suo, Makefile, *.idb, *.pdb, *.plg, *.opt) do del "%%i"
+cd src
+for /R %%i in (*.dsp, *.vcproj, *.vcproj.*) do del "%%i"
+cd ..
+
+:end


Windows script to remove all compiled Python.

error: pathspec 'clean.bat' did not match any file(s) known to git

--- clean.bat
+++ clean.bat
@@ -0,0 +1,2 @@
+del /s *.bak
+del /s *.pyc


Install selenium-standalone globally.

Install selenium-standalone globally.

--- setup.cmd
+++ setup.cmd
@@ -18,7 +18,7 @@
 REM nodemon to run webapp while debugging browser code
 npm install -g nodemon
 REM selenium
-npm install selenium-standalone
+npm install -g selenium-standalone
 selenium-standalone install
 REM install all local modules in package.json
 npm install


Only force compiler in publish script

Only force compiler in publish script

--- make.bat
+++ make.bat
@@ -6,12 +6,12 @@

 :large
 ECHO "Building large"
-cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild -G"Visual Studio 12 2013 Win64"
+cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild
 GOTO :build

 :tiny
 ECHO "Building tiny"
-cmake -H. -Bbuild -G"Visual Studio 12 2013 Win64"
+cmake -H. -Bbuild
 GOTO :build

 :build
@@ -39,11 +39,11 @@
 ECHO "Building all versions"
 git submodule update --init --recursive
 CALL make.bat clean
-CALL make.bat tiny
+cmake -H. -Bbuild -G"Visual Studio 12 2013 Win64"
 CALL make.bat test
 COPY build\Release\luvi.exe luvi-binaries\Windows\luvi-tiny.exe
 CALL make.bat clean
-CALL make.bat large
+cmake -DWithOpenSSL=ON -DWithSharedOpenSSL=OFF -DWithZLIB=ON -DWithSharedZLIB=OFF -H. -Bbuild -G"Visual Studio 12 2013 Win64"
 CALL make.bat test
 COPY build\Release\luvi.exe luvi-binaries\Windows\luvi.exe
 CD luvi-binaries


add script to generate cover report @ windows

error: pathspec 'cover.bat' did not match any file(s) known to git

--- cover.bat
+++ cover.bat
@@ -0,0 +1,3 @@
+@echo off
+go test . -cover -coverprofile cover.out
+go tool cover -html=cover.out


Add etw_cpuusage_longterm.bat

Add etw_cpuusage_longterm.bat

This batch file is designed for long-running recording of context switch
data and nothing else. This allows monitoring of all processes CPU usage
(including interrupts and DPCs) for periods of around an hour at a time.
The goal is to investigate badly-behaved processes (svchost.exe, I'm
looking at you) which spring to life at annoying times and waste battery
life.

error: pathspec 'bin/etw_cpuusage_longterm.bat' did not match any file(s) known to git

--- bin/etw_cpuusage_longterm.bat
+++ bin/etw_cpuusage_longterm.bat
@@ -0,0 +1,64 @@
+@rem Copyright 2015 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
+
+@rem Set the etwtracedir environment variable if it
+@rem isn't set already.
+@if not "%etwtracedir%" == "" goto TraceDirSet
+@set etwtracedir=%homedrive%%homepath%\documents\xperftraces
+:TraceDirSet
+
+@rem Make sure %etwtracedir% exists
+@if exist %etwtracedir% goto TraceDirExists
+@mkdir %etwtracedir%
+:TraceDirExists
+
+@rem %temp% should be a good location for temporary traces.
+@rem Make sure this is a fast drive, preferably an SSD.
+@set xperftemptracedir=%temp%
+
+@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 tracefile=%etwtracedir%\%datevar%_%timevar%_per_process_cpu_usage.etl
+@set textfile=%etwtracedir%\%datevar%_%timevar%_per_process_cpu_usage.txt
+
+@set kernelfile=%temp%\kernel_trace.etl
+
+@echo This repords context switches, DPCs, and interrupts and nothing else, to allow for very long running tracing.
+xperf.exe -start "NT Kernel Logger" -on PROC_THREAD+LOADER+DPC+INTERRUPT+CSWITCH -buffersize 1024 -minbuffers 60 -maxbuffers 60 -f "%kernelfile%"
+@set starttime=%time%
+@if not %errorlevel% equ 0 goto failure
+@echo Tracing started at %starttime%
+
+@echo Run the test you want to profile here
+@pause
+xperf.exe -stop "NT Kernel Logger"
+xperf.exe -merge "%kernelfile%" "%tracefile%" -compress
+@del "%kernelfile%"
+@echo Tracing ran from %starttime% to %time%
+@echo Tracing ran from %starttime% to %time% > %textfile%
+
+@echo Trace data is in "%tracefile%"
+@dir "%tracefile%" | find /i ".etl"
+@exit /b
+
+:failure
+@echo Failure!
+@exit /b


Added BatchGotAdmin

Added BatchGotAdmin

Found at: https://sites.google.com/site/eneerge/scripts/batchgotadmin

--- autoclean-start.bat
+++ autoclean-start.bat
@@ -1,10 +1,32 @@
-rem need to add permissions check
 rem test del %homedir%/desktop/techtutors/ command
 rem add test for techtemp
 rem add test for non null entries
 rem check where netletter test went...

 @echo off
+:: BatchGotAdmin
+:-------------------------------------
+REM  --> Check for permissions
+>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
+
+REM --> If error flag set, we do not have admin.
+if '%errorlevel%' NEQ '0' (
+    echo Requesting administrative privileges...
+    goto UACPrompt
+) else ( goto gotAdmin )
+
+:UACPrompt
+    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
+    echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
+
+    "%temp%\getadmin.vbs"
+    exit /B
+
+:gotAdmin
+    if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
+    pushd "%CD%"
+    CD /D "%~dp0"
+:--------------------------------------
     color 1f
     mode 90,35
 	title TechTutor's Clean Up Script


update publish_on_pypi.bat

update publish_on_pypi.bat

--- publish_on_pipy.bat
+++ publish_on_pipy.bat
@@ -1,9 +1,9 @@
 if "%1"=="" goto default_value:
-set path=%path%;%1;%1\Scripts
+set pythonexe=%1\python
 goto custom_python:

 :default_value:
-set path=%path%;c:\Python34;c:\Python34\Scripts
+set pythonexe=c:\Python34\python

 :custom_python:
 %pythonexe% setup.py sdist register upload


Instrument build script to code-sign UcsFPHub executable

--- contrib/UcsFPHub/scripts/build.bat
+++ contrib/UcsFPHub/scripts/build.bat
@@ -8,6 +8,7 @@
 set "Ummm=%bin_dir%\UMMM.exe"
 set "mt=C:\Work\BuildTools\UMMM\mt.exe"
 set "replace=cscript //nologo C:\Work\BuildTools\WixScripts\Replace.vbs"
+set "codesign=call C:\Work\BuildTools\Certificates\codesign.bat"
 if not exist "%mt%" set "mt=mt.exe"
 set "Vb6=%ProgramFiles%\Microsoft Visual Studio\VB98\VB6.EXE"
 if not exist "%Vb6%" set "Vb6=%ProgramFiles(x86)%\Microsoft Visual Studio\VB98\VB6.EXE"
@@ -40,6 +41,10 @@
 "%Ummm%" "%file_dir%\UcsFPHub.ini"
 "%mt%" -nologo -manifest "%file_dir%\UcsFPHub.ini.manifest" -outputresource:"%output_exe%;1"

+
+echo Code-signing %output_exe%...
+%codesign% /d "Unicontsoft Fiscal Printers Hub" %output_exe%
+
 git checkout -- "%bin_dir%\..\src\Shared\mdJson.bas"

 echo Done.


Fix the condition to compare strings in the script on Windows.

--- bin/hubot.cmd
+++ bin/hubot.cmd
@@ -8,7 +8,7 @@

 for /f "delims=\" %%i in ("%CD%") do set UID=%%i

-if "%REDIS_URL%" = "" (
+if "%REDIS_URL%" == "" (
   set REDIS_URL=redis://localhost:6379/%UID%
 )


MAKE: 加入 zFALCOM 项目到全编译

MAKE: 加入 zFALCOM 项目到全编译


bigger icon

bigger icon

--- resources/icons.bat
+++ resources/icons.bat
@@ -1,20 +1,20 @@
-convert -geometry 48x48 projects.png ../KnitDroid/res/drawable-hdpi/projects.png
-convert -geometry 32x32 projects.png ../KnitDroid/res/drawable-mdpi/projects.png
-convert -geometry 64x64 projects.png ../KnitDroid/res/drawable-xhdpi/projects.png
+convert -geometry 48x48 projects.png ../Yarrn/res/drawable-hdpi/projects.png
+convert -geometry 32x32 projects.png ../Yarrn/res/drawable-mdpi/projects.png
+convert -geometry 64x64 projects.png ../Yarrn/res/drawable-xhdpi/projects.png

-convert -geometry 48x48 login.png ../KnitDroid/res/drawable-hdpi/login.png
-convert -geometry 32x32 login.png ../KnitDroid/res/drawable-mdpi/login.png
-convert -geometry 64x64 login.png ../KnitDroid/res/drawable-xhdpi/login.png
+convert -geometry 48x48 login.png ../Yarrn/res/drawable-hdpi/login.png
+convert -geometry 32x32 login.png ../Yarrn/res/drawable-mdpi/login.png
+convert -geometry 64x64 login.png ../Yarrn/res/drawable-xhdpi/login.png

-convert -geometry 48x48 favorites.png ../KnitDroid/res/drawable-hdpi/favorites.png
-convert -geometry 32x32 favorites.png ../KnitDroid/res/drawable-mdpi/favorites.png
-convert -geometry 64x64 favorites.png ../KnitDroid/res/drawable-xhdpi/favorites.png
+convert -geometry 48x48 favorites.png ../Yarrn/res/drawable-hdpi/favorites.png
+convert -geometry 32x32 favorites.png ../Yarrn/res/drawable-mdpi/favorites.png
+convert -geometry 64x64 favorites.png ../Yarrn/res/drawable-xhdpi/favorites.png

-convert -geometry 48x48 logo.png ../KnitDroid/res/drawable-hdpi/logo.png
-convert -geometry 32x32 logo.png ../KnitDroid/res/drawable-mdpi/logo.png
-convert -geometry 64x64 logo.png ../KnitDroid/res/drawable-xhdpi/logo.png
+convert -geometry 48x48 logo.png ../Yarrn/res/drawable-hdpi/logo.png
+convert -geometry 32x32 logo.png ../Yarrn/res/drawable-mdpi/logo.png
+convert -geometry 64x64 logo.png ../Yarrn/res/drawable-xhdpi/logo.png

-convert -geometry 48x48 mail.png ../KnitDroid/res/drawable-hdpi/mail.png
-convert -geometry 32x32 mail.png ../KnitDroid/res/drawable-mdpi/mail.png
-convert -geometry 64x64 mail.png ../KnitDroid/res/drawable-xhdpi/mail.png
+convert -geometry 48x48 mail.png ../Yarrn/res/drawable-hdpi/mail.png
+convert -geometry 32x32 mail.png ../Yarrn/res/drawable-mdpi/mail.png
+convert -geometry 64x64 mail.png ../Yarrn/res/drawable-xhdpi/mail.png


Log all to console

Log all to console

--- src/YardFrontend/gen.cmd
+++ src/YardFrontend/gen.cmd
@@ -1,4 +1,4 @@
 @echo off

 ..\..\Bin\Release\v40\YC.YaccConstructor.exe   -f FsYaccFrontend -i Parser.fsy ^
-    -g "RNGLRGenerator -o Parser.fs -module Yard.Frontends.YardFrontend.GrammarParser -pos Source.Position -token Source.t" > log.txt+    -g "RNGLRGenerator -o Parser.fs -module Yard.Frontends.YardFrontend.GrammarParser -pos Source.Position -token Source.t"


updated script

updated script

--- ci/appveyor-with-compiler.cmd
+++ ci/appveyor-with-compiler.cmd
@@ -1,23 +1,95 @@
-:: Very simple setup:
-:: - if WINDOWS_SDK_VERSION is set then activate the SDK.
-:: - disable the WDK if it's around.
+:: EXPECTED ENV VARS: PYTHON_ARCH (either x86 or x64)
+::                    CONDA_PY (either 27, 33, 35 etc. - only major version is extracted)
+::
+::
+:: To build extensions for 64 bit Python 3, we need to configure environment
+:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
+:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
+::
+:: To build extensions for 64 bit Python 2, we need to configure environment
+:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
+:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
+::
+:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific
+:: environment configurations.
+::
+:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
+:: cmd interpreter, at least for (SDK v7.0)
+::
+:: More details at:
+:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
+:: http://stackoverflow.com/a/13751649/163740
+::
+:: Author: Phil Elson
+:: Original Author: Olivier Grisel (https://github.com/ogrisel/python-appveyor-demo)
+:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
+::
+:: Notes about batch files for Python people:
+::
+:: Quotes in values are literally part of the values:
+::      SET FOO="bar"
+:: FOO is now five characters long: " b a r "
+:: If you don't want quotes, don't include them on the right-hand side.
+::
+:: The CALL lines at the end of this file look redundant, but if you move them
+:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y
+:: case, I don't know why.
+:: originally from https://github.com/pelson/Obvious-CI/blob/master/scripts/obvci_appveyor_python_build_env.cmd
+@ECHO OFF

 SET COMMAND_TO_RUN=%*
 SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
-SET WIN_WDK="c:\Program Files (x86)\Windows Kits\10\Include\wdf"
-ECHO SDK: %WINDOWS_SDK_VERSION% ARCH: %PYTHON_ARCH%

-IF EXIST %WIN_WDK% (
-    REM See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/
-    REN %WIN_WDK% 0wdf
+:: Extract the major and minor versions, and allow for the minor version to be
+:: more than 9.  This requires the version number to have two dots in it.
+SET MAJOR_PYTHON_VERSION=%CONDA_PY:~0,1%
+
+IF "%CONDA_PY:~2,1%" == "" (
+    :: CONDA_PY style, such as 27, 34 etc.
+    SET MINOR_PYTHON_VERSION=%CONDA_PY:~1,1%
+) ELSE (
+    IF "%CONDA_PY:~3,1%" == "." (
+     SET MINOR_PYTHON_VERSION=%CONDA_PY:~2,1%
+    ) ELSE (
+     SET MINOR_PYTHON_VERSION=%CONDA_PY:~2,2%
+    )
 )
-IF "%WINDOWS_SDK_VERSION%"=="" GOTO main

-SET DISTUTILS_USE_SDK=1
-SET MSSdk=1
-"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
-CALL "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
+:: Based on the Python version, determine what SDK version to use, and whether
+:: to set the SDK for 64-bit.
+IF %MAJOR_PYTHON_VERSION% == 2 (
+    SET WINDOWS_SDK_VERSION="v7.0"
+    SET SET_SDK_64=Y
+) ELSE (
+    IF %MAJOR_PYTHON_VERSION% == 3 (
+        SET WINDOWS_SDK_VERSION="v7.1"
+        IF %MINOR_PYTHON_VERSION% LEQ 4 (
+            SET SET_SDK_64=Y
+        ) ELSE (
+            SET SET_SDK_64=N
+        )
+    ) ELSE (
+        ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
+        EXIT /B 1
+    )
+)

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


[ci] Remove trailing space in bootstrap.cmd

--- bootstrap.cmd
+++ bootstrap.cmd
@@ -3,4 +3,4 @@
 NuGet.exe install MSBuildTasks        -OutputDirectory .nuget\packages\ -NonInteractive -Version 1.5.0.214
 NuGet.exe install NUnit               -OutputDirectory .nuget\packages\ -NonInteractive -Version 3.5.0
 NuGet.exe install NUnit.ConsoleRunner -OutputDirectory .nuget\packages\ -NonInteractive -Version 3.5.0
-NuGet.exe install WiX                 -OutputDirectory .nuget\packages\ -NonInteractive -Version 4.0.0.4506-pre -Pre
+NuGet.exe install WiX                 -OutputDirectory .nuget\packages\ -NonInteractive -Version 4.0.0.4506-pre -Pre


Renamed to match parent folder

Renamed to match parent folder

--- FastTask/another/linksGo/webGoto/webGoto.bat
+++ FastTask/another/linksGo/webGoto/webGoto.bat
@@ -1,2 +1,2 @@
-@echo
+@echo
 START https://google.com


Run php web server in the watch.cmd script on Windows together with sassc.

--- watch.cmd
+++ watch.cmd
@@ -5,6 +5,8 @@

 SETLOCAL

+REM Use PHP binary from the PATH.
+SET php=php.exe
 for %%f in (bin\sassc*%PROCESSOR_ARCHITECTURE%.exe) do SET sassc=%%f
 for %%f in (bin\*fswatch*%PROCESSOR_ARCHITECTURE%.exe) do SET fswatch=%%f

@@ -15,6 +17,9 @@

 SET watch_folder=scss

+REM Launch local php web server in background.
+START "" /B %php% -S localhost:8888 -t www || ECHO ERROR while launching %php% web server. && EXIT /B 1
+
 REM Rebuild scss on the launch once and watch for any scss folder changes indefinitely.
 :loop
 ECHO Rebuilding %sassc_output%


tidy bootstrap.cmd

tidy bootstrap.cmd

removed unused SETLOCAL / ENDLOCAL

--- bootstrap.cmd
+++ bootstrap.cmd
@@ -10,7 +10,7 @@

 rem note that there is limited error checking or idiot-proofing in the file at this time.

-SETLOCAL
+
 echo dev-shell bootstrap v0.1 (c) seapagan 2015
 echo.
 echo Downloading the 'TinyPerl' distribution ...
@@ -34,5 +34,9 @@
 	pause
 	exit /b 254
 )
-ENDLOCAL
+
+rem now run the perl script to continue...
+cd %~dp0support\bootstrap
+%~dp0support\tinyperl\tinyperl bootstrap.pl
+
 pause


Update build_win.bat to handle new amalg script.

--- build_win.bat
+++ build_win.bat
@@ -8,16 +8,16 @@
 @rem Ensure correct command prompt
 @if not defined INCLUDE goto :BADCMD

+@rem Set compile and link options here
+@setlocal
+@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS
+@set JANET_LINK=link /nologo
+
 @rem Sub commands
 @if "%1"=="help" goto HELP
 @if "%1"=="clean" goto CLEAN
 @if "%1"=="test" goto TEST
 @if "%1"=="dist" goto DIST
-
-@rem Set compile and link options here
-@setlocal
-@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS
-@set JANET_LINK=link /nologo

 mkdir build
 mkdir build\core
@@ -112,7 +112,14 @@
 :DIST
 mkdir dist
 janet.exe tools\gendoc.janet > dist\doc.html
-janet.exe tools\amalg.janet > dist\janet.c
+
+@rem Gen amlag
+setlocal enabledelayedexpansion
+set "amalg_files="
+for %%f in (src\core\*.c) do (
+    set "amalg_files=!amalg_files! %%f"
+)
+janet.exe tools\amalg.janet src\core\util.h src\core\state.h src\core\gc.h src\core\vector.h src\core\fiber.h src\core\regalloc.h src\core\compile.h src\core\emit.h src\core\symcache.h %amalg_files% build\core_image.c > dist\janet.c
 copy janet.exe dist\janet.exe
 copy LICENSE dist\LICENSE
 copy README.md dist\README.md


So close - docs build now.

So close - docs build now.

--- builddocs.bat
+++ builddocs.bat
@@ -7,7 +7,7 @@
 msbuild "src\NodaTime-All.sln" /property:Configuration=Release
 IF ERRORLEVEL 1 EXIT /B 1

-src\NodaTime.Tools.BuildMarkdownDocs\bin\Release\NodaTime.Tools.BuildMarkdownDocs src\tools\userguide docs\userguide
+src\NodaTime.Tools.BuildMarkdownDocs\bin\Release\NodaTime.Tools.BuildMarkdownDocs src\docs\userguide docs\userguide
 IF ERRORLEVEL 1 EXIT /B 1
 src\NodaTime.Tools.BuildMarkdownDocs\bin\Release\NodaTime.Tools.BuildMarkdownDocs src\docs\developer docs\developer
 IF ERRORLEVEL 1 EXIT /B 1


Enable implicit auto-upgrade to python 2.7.5.

This will automatically upgrade python to 2.7.5 unless
set DEPOT_TOOLS_PYTHON_275=0
is used.

R=iannucci@chromium.org
BUG=241769

Review URL: https://codereview.chromium.org/53313002

git-svn-id: bd64dd6fa6f3f0ed0c0666d1018379882b742947@235140 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

--- bootstrap/win/win_tools.bat
+++ bootstrap/win/win_tools.bat
@@ -113,8 +113,8 @@

 :PYTHON_CHECK
-if "%DEPOT_TOOLS_PYTHON_275%" == "1" goto :PY275_CHECK
-goto :PY26_CHECK
+if "%DEPOT_TOOLS_PYTHON_275%" == "0" goto :PY26_CHECK
+goto :PY275_CHECK

 :PY26_CHECK


remove target folder, all components ship their own top level dir "x-master"

--- build-scripts/2-extract.bat
+++ build-scripts/2-extract.bat
@@ -49,25 +49,23 @@

 echo.
 echo Fifengine Mapeditor
-%ZIP% x fife-editor.zip -o..\extracted\fife-editor > nul
+%ZIP% x fife-editor.zip -o..\extracted > nul

 echo.
 echo Fifengine Python Demos
-%ZIP% x fife-python-demos.zip -o..\extracted\fife-python-demos > nul
+%ZIP% x fife-python-demos.zip -o..\extracted > nul

 echo.
 echo Fifengine Python Tutorials
-%ZIP% x fife-python-tutorials.zip -o..\extracted\fife-python-tutorials > nul
+%ZIP% x fife-python-tutorials.zip -o..\extracted > nul

 rem echo.
 rem echo Fifengine C++ Tutorials
-rem %ZIP% x fife-c++-tutorials.zip -o..\extracted\fife-c++-tutorials > nul
-rem move "%TARGET_DIR%\fife-c++-tutorials*" "%TARGET_DIR%\fife-c++-tutorials"
+rem %ZIP% x fife-c++-tutorials.zip -o..\extracted > nul

 rem echo.
 rem echo Fifengine Atlas Creator
 rem %ZIP% x ?.zip -o..\extracted\fifengine-atlas-creator > nul
-rem move "%TARGET_DIR%\fifengine-atlas-creator*" "%TARGET_DIR%\fifengine-atlas-creator"

 rem echo.
 rem echo Fifengine Documentations


Update bld.bat

Update bld.bat

--- recipes/openbabel/bld.bat
+++ recipes/openbabel/bld.bat
@@ -10,5 +10,5 @@

 cmake --build . --target install --config Release

-xcopy %PREFIX%\bin\data %PREFIX%\share\openbabel /e /c
-rmdir /s /q %PREFIX%\bin\data
+xcopy %LIBRARY_PREFIX%\data %PREFIX%\share\openbabel /e /c
+rmdir /s /q %LIBRARY_PREFIX%\data


batch to run all examples for Windows

batch to run all examples for Windows

error: pathspec 'examples/RUN_ALL_WINDOWS.bat' did not match any file(s) known to git

--- examples/RUN_ALL_WINDOWS.bat
+++ examples/RUN_ALL_WINDOWS.bat
@@ -0,0 +1,8 @@
+call EVALUATE_TS1_TRACKER.bat
+call EVALUATE_TS2_TRACKER_DETAILS.bat
+call EVALUATE_TS3_TRACKER.bat
+call EVALUATE_TS3_STAR.bat
+call EVALUATE_TS5_TRACKER_SEG.bat
+call EVALUATE_TS5_STAR_SEG.bat
+call COMPARE_TS3.bat
+call COMPARE_TS5.bat


Verbose test output for windows

Verbose test output for windows

--- build_win.bat
+++ build_win.bat
@@ -37,7 +37,7 @@

 powershell -ExecutionPolicy Bypass -File .\apply_version.ps1

-go test ./...
+go test -v ./...

 go build -o "build/%OUT%"
 copy %GIT2GO_VENDOR_PATH%\install\bin\git2.dll build\git2.dll


Fix build_win.

Fix build_win.

--- build_win.bat
+++ build_win.bat
@@ -189,10 +189,12 @@
 @if errorlevel 1 goto :TESTINSTALLFAIL
 call jpm --verbose --test --modpath=. install https://github.com/janet-lang/argparse.git
 @if errorlevel 1 goto :TESTINSTALLFAIL
+popd
+exit /b 0
+
 :TESTINSTALLFAIL
 popd
 goto :TESTFAIL
-exit /b 0

 @rem build, test, dist, install. Useful for local dev.
 :ALL


Update to VirtualBox 5.2.6

Update to VirtualBox 5.2.6

--- step0-packer-windows-vagrantbox/scripts/vm-guest-tools.bat
+++ step0-packer-windows-vagrantbox/scripts/vm-guest-tools.bat
@@ -13,7 +13,7 @@
 )

 if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
-    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.2.2/VBoxGuestAdditions_5.2.2.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
+    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://download.virtualbox.org/virtualbox/5.2.6/VBoxGuestAdditions_5.2.6.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
 )

 cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"


[bouqueau] update batch installer

[bouqueau] update batch installer

git-svn-id: ab66a9de07fa9d47c5829c82992f5279466c775f@2758 63c20433-aa62-49bd-875c-5a186b69a8fb

--- generate_installer.bat
+++ generate_installer.bat
@@ -12,7 +12,9 @@
 REM ============================================

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

 echo:
@@ -20,7 +22,7 @@
 echo Retrieving version/revision information
 REM ============================================
 if not exist include/gpac/version.h echo   version couldn't be found - check include/gpac/version.h exists
-if not exist include/gpac/version.h goto abort
+if not exist include/gpac/version.h goto Abort

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

 move bin\win32\release\nsis_install\default.out bin\win32\release\nsis_install\default.out_
 echo Name "GPAC Framework ${GPAC_VERSION} revision %VarRevisionSVN%" > bin\win32\release\nsis_install\default.out
@@ -57,14 +61,16 @@
 REM ============================================
 echo Windows GPAC installer generated - goodbye!
 REM ============================================
-exit/b
+goto LeaveBatch

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

-:abort
+:Abort
 echo:
 echo  *** ABORTING: CHECK ERROR MESSAGES ABOVE ***
+
+:LeaveBatch
 set VarRevisionSVN=
 set VarRevisionBuild=
 cd /d %OLDDIR%


Improve local windows script

Improve local windows script

--- bin/hubot.cmd
+++ bin/hubot.cmd
@@ -1,3 +1,3 @@
 @echo off
-
+@SET PATH=%PATH%;"%~dp0..\node_modules\.bin"
 npm install && node_modules\.bin\hubot.cmd --name "donkeybot" %*


Update conduitspkiller.bat

Update conduitspkiller.bat

added avayvaxvaa directory to deletion

--- conduitspkiller.bat
+++ conduitspkiller.bat
@@ -24,6 +24,7 @@
 call :deleteDirectory "%ALLUSERSAPPDATA%\SearchProtect"
 call :deleteDirectory "%APPDATA%\SearchProtect"
 call :deleteDirectory "%LOCALAPPDATA%\SearchProtect"
+call :deleteDirectory "%LOCALAPPDATA%\avayvaxvaa"

 reg delete "HKLM\SOFTWARE\SearchProtect" /f
 reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\SearchProtect" /f


remove erroneous #TODO in bld.bat by meaningful stuff (that is however not working)

--- pygimli/bld.bat
+++ pygimli/bld.bat
@@ -1 +1,3 @@
-#TODO
+%PYTHON% setup.py install
+copy C:\Guenther.T\src\gimli\gimli37\python\pygimli\core\*.dll %CONDA_PREFIX%\lib
+copy C:\Guenther.T\src\gimli\gimli37\python\pygimli\core\*.pyd %CONDA_PREFIX%\lib


Added --noconsole flag

Added --noconsole flag

Console output isn't really needed for a GUI program and it looks like crap. I'm not outputting any sort of debugging yet either, so it's pointless.

--- build_exe.bat
+++ build_exe.bat
@@ -4,7 +4,7 @@
 )
 :build_exe
 del /Q %script_name%.exe
-start /wait pyinstaller --onefile --icon=favicon.ico %script_name%.py
+start /wait pyinstaller --onefile --noconsole --icon=favicon.ico %script_name%.py
 rmdir /S /Q build
 del /Q %script_name%.spec
 move /-y dist\%script_name%.exe .\


fix for GRAILS-1914

fix for GRAILS-1914

git-svn-id: 29aad96320b2a07b98332cd568fc1316025c072f@6152 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d

--- bin/startGrails.bat
+++ bin/startGrails.bat
@@ -118,7 +118,7 @@

 :execute
 @rem Setup the command line
-set STARTER_CLASSPATH=%GRAILS_HOME%\lib\groovy-all-1.1-rc-3.jar;%GRAILS_HOME%\dist\grails-cli-1.0-RC2-SNAPSHOT.jar
+set STARTER_CLASSPATH=%GRAILS_HOME%\lib\groovy-all-1.1-final-SNAPSHOT.jar;%GRAILS_HOME%\dist\grails-cli-1.0-RC2-SNAPSHOT.jar

 if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"


update windows build

update windows build

--- make.bat
+++ make.bat
@@ -12,13 +12,16 @@
 ECHO.Compiling headers ...
 ECHO.#ifndef _LIBVEX_H>libvex.h
 ECHO.#define _LIBVEX_H>>libvex.h
+ECHO.>>libvex.h
+ECHO.// import easyC API>>libvex.h
+ECHO.#include "API.h">>libvex.h
 FOR /F "tokens=*" %%F in ('dir /b include\*.h') DO TYPE include\%%F >>libvex.h
 ECHO.#endif>>libvex.h

 ECHO.Compiling source ...
 ECHO.#include "libvex.h">libvex.c
 ECHO.#ifdef _LIBVEX_H>>libvex.c
-FOR /F "tokens=*" %%F in ('dir /b src\*.c') DO TYPE src\%%F >>libvex.c
+FOR /F "tokens=*" %%F in ('dir /b lib\*.c') DO TYPE src\%%F >>libvex.c
 ECHO.#endif>>libvex.c

 GOTO :EOF
@@ -34,7 +37,7 @@
 ECHO.Compiling source ...
 ECHO.#include "libvex.h">test\libvex.c
 ECHO.#ifdef _LIBVEX_H>>test\libvex.c
-FOR /F "tokens=*" %%F in ('dir /b src\*.c') DO TYPE src\%%F >>test\libvex.c
+FOR /F "tokens=*" %%F in ('dir /b lib\*.c') DO TYPE src\%%F >>test\libvex.c
 ECHO.#endif>>test\libvex.c
 ECHO.Compiling object files ...
 gcc -Itest -c test/libvex.c -o test/libvex.o -Wall


parametrize PYTHON and TSCRIPT env vars

parametrize PYTHON and TSCRIPT env vars

--- make.bat
+++ make.bat
@@ -6,14 +6,19 @@
 REM running tests (for tests run "make.bat test").
 REM This script is modeled after my Windows installation so it might
 REM need some adjustements in order to work on your system.
-REM The following assumptions are made:
-REM - the default Python interpreter is in C:\Python27\python.exe
-REM - the right Visual Studio version is installed
-REM - in case of Python 2.4 and 2.5 mingw32 compiler is used
+REM By default C:\Python27\python.exe is used.
+REM To run another Python version run:
+REM set PYTHON=C:\Python33\python.exe & make test
+REM In case of Python 2.4 and 2.5 mingw32 compiler is used.
 REM ==========================================================================

-SET PYTHON=C:\Python27\python.exe
+if "%PYTHON%" == "" (
+    SET PYTHON=C:\Python27\python.exe
+)
+if "%TSCRIPT%" == "" (
+    SET TSCRIPT=test\test_psutil.py
+)
 SET PATH=%PYTHON%;%PATH%
 SET PATH=C:\MinGW\bin;%PATH%

@@ -71,7 +76,7 @@
 if "%1" == "test" (
     :test
     call :install
-    %PYTHON% test/test_psutil.py
+    %PYTHON% %TSCRIPT%
     goto :eof
 )


Added gitignore to checkout in makefile

Added gitignore to checkout in makefile

--- make.bat
+++ make.bat
@@ -108,7 +108,7 @@
         FOR /D %%i in (*.*) DO @RMDIR /S /Q "%%i"

         :: Checkout necessary files to build the pages
-        git checkout master source data img make.bat
+        git checkout master source data img make.bat .gitignore
         git reset HEAD

         :: Build pages


make.cmd always echo on

make.cmd always echo on

--- make.cmd
+++ make.cmd
@@ -1,4 +1,3 @@
-@echo off
 setlocal

 if exist "%~dp0Misc\version.cmd" call "%~dp0Misc\version.cmd"


windows build: force the use of the cookbook-installed ruby

--- jenkins/build.bat
+++ jenkins/build.bat
@@ -32,6 +32,11 @@

 call copy /Y omnibus.rb.example.windows omnibus.rb || GOTO :error

+rem # we're guaranteed to have the correct ruby installed into C:\Ruby193 from chef-solo cookbooks
+rem # bundle install from here now too
+set PATH=C:\Ruby193\bin;%PATH%
+call bundle install || GOTO :error
+
 call bundle exec rake projects:%omnibus_project%-windows || GOTO :error

 GOTO :EOF


Switch build order

Switch build order

--- MyGet.bat
+++ MyGet.bat
@@ -1,10 +1,10 @@
-dotnet pack src/GladNet.Payload.Authentication/ -c Release
+msbuild src/GladNet.Common/GladLive.Common.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Encryption/GladNet.Encryption.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Engine.Common/GladNet.Engine.Common.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Engine.Server/GladNet.Engine.Server.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Message/GladLive.Message.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Message.Handlers/GladNet.Message.Handlers.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Payload/GladLive.Payload.csproj /p:DebugSymbols=False
+msbuild src/GladNet.Serializer/GladNet.Serializer.csproj /p:DebugSymbols=False

-msbuild ./src/GladNet.Common/GladLive.Common.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Encryption/GladNet.Encryption.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Engine.Common/GladNet.Engine.Common.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Engine.Server/GladNet.Engine.Server.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Message/GladLive.Message.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Message.Handlers/GladNet.Message.Handlers.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Payload/GladLive.Payload.csproj /p:DebugSymbols=False
-msbuild ./src/GladNet.Serializer/GladNet.Serializer.csproj /p:DebugSymbols=False+dotnet pack src/GladNet.Payload.Authentication/ -c Release


Quoted "%GallioEcho%" in case installed into Program Files.

--- MyGet.cmd
+++ MyGet.cmd
@@ -13,7 +13,7 @@
 if not "%errorlevel%"=="0" goto failure

 REM Unit tests
-%GallioEcho% tests\Autofac.Tests.Integration.Mef\bin\%config%\Autofac.Tests.Integration.Mef.dll
+"%GallioEcho%" tests\Autofac.Tests.Integration.Mef\bin\%config%\Autofac.Tests.Integration.Mef.dll
 if not "%errorlevel%"=="0" goto failure

 REM Package


Try building in a build directory (build.sh parallel?)

--- recipes/dcm2niix/bld.bat
+++ recipes/dcm2niix/bld.bat
@@ -1,2 +1,4 @@
+mkdir build
+cd build
 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ..\
 cmake --build . --target INSTALL --config Release


Set install prefix in windows

Set install prefix in windows

--- recipes/openmeeg/bld.bat
+++ recipes/openmeeg/bld.bat
@@ -7,7 +7,9 @@
       -DCMAKE_BUILD_TYPE:STRING=%CMAKE_CONFIG%       ^
       -DBLA_VENDOR:STRING=OpenBLAS                   ^
       -DENABLE_PYTHON:BOOL=ON                        ^
+      -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
       -DBUILD_DOCUMENTATION:BOOL=OFF                 ^
+      -DVCOMP_WORKAROUND=OFF                         ^
       "%SRC_DIR%"
 if errorlevel 1 exit rem 1


Delete old file, rename new file

Delete old file, rename new file

--- repack-docx.bat
+++ repack-docx.bat
@@ -1,113 +0,0 @@
-@echo off
-rem DOCX repacking script using 7zip
-rem AUTHOR: grzegorz.adam.kowalski@outlook.com, grzegorz.kowalski@wit.edu.pl
-
-rem Path to 7-zip executable
-set COMPRESSOR=c:\Program Files\7-Zip\7z.exe
-
-rem Path to Touch utility
-set TOUCH_UTILITY=c:\IT\touch.exe
-set TOUCH_OPTIONS=-c -r %1.bak %1
-
-rem Path to PNG optimizer
-set PNG_OPTIMIZER=c:\IT\optipng-0.7.4-win32\optipng.exe
-
-rem Path to JPEG optimizer executable
-set JPG_OPTIMIZER=c:\IT\jpegtran.exe
-
-rem Folder name with leading backslash
-set TEMP_SUBFOLDER=\Docx-Repack
-
-if not exist %1 goto label_no_input
-
-:decompress
-if not exist "%COMPRESSOR%" goto label_no_compressor
-"%COMPRESSOR%" x -y -tzip %1 -o%TEMP%%TEMP_SUBFOLDER%
-
-:make_backup
-if exist %1.bak del %1.bak
-move %1 %1.bak
-
-:optimize_png
-if not exist "%PNG_OPTIMIZER%" goto optimize_jpeg
-
-rem Media folder for DOCX files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\word\media
-if exist "%MEDIA_FOLDER%" (
-"%PNG_OPTIMIZER%" --preserve -o5 %MEDIA_FOLDER%\*.png
-)
-
-rem Media folder for PPTX files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\ppt\media
-if exist "%MEDIA_FOLDER%" (
-"%PNG_OPTIMIZER%" --preserve -o5 %MEDIA_FOLDER%\*.png
-)
-
-rem Media folder for XLSX files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\xl\media
-if exist "%MEDIA_FOLDER%" (
-"%PNG_OPTIMIZER%" --preserve -o5 %MEDIA_FOLDER%\*.png
-)
-
-rem Media folder for ODT files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\media
-if exist "%MEDIA_FOLDER%" (
-"%PNG_OPTIMIZER%" --preserve -o5 %MEDIA_FOLDER%\*.png
-)
-
-rem Thumbnail folder for ODS files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\Thumbnails
-if exist "%MEDIA_FOLDER%" (
-"%PNG_OPTIMIZER%" --preserve -o5 %MEDIA_FOLDER%\*.png
-)
-
-:optimize_jpeg
-if not exist "%JPG_OPTIMIZER%" goto compress
-
-rem Media folder for DOCX files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\word\media
-if exist "%MEDIA_FOLDER%" (
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpeg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-)
-
-rem Media folder for PPTX files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\ppt\media
-if exist "%MEDIA_FOLDER%" (
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpeg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-)
-
-rem Media folder for XLSX files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\xl\media
-if exist "%MEDIA_FOLDER%" (
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpeg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-)
-
-rem Media folder for ODT files
-set MEDIA_FOLDER=%TEMP%%TEMP_SUBFOLDER%\media
-if exist "%MEDIA_FOLDER%" (
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpeg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-FOR /F %%j IN ('dir /B %MEDIA_FOLDER%\*.jpg') DO %JPG_OPTIMIZER% -optimize %MEDIA_FOLDER%\%%j %MEDIA_FOLDER%\%%j
-)
-
-:compress
-"%COMPRESSOR%" a -tzip %1 -r %TEMP%%TEMP_SUBFOLDER%\* -mx=9 -mfb=258 -mm=Deflate -mpass=15
-
-:copy_modification_date
-if exist "%TOUCH_UTILITY%" "%TOUCH_UTILITY%" %TOUCH_OPTIONS%
-
-:cleanup
-rmdir /S /Q %TEMP%%TEMP_SUBFOLDER%
-goto label_exit
-
-:label_no_input
-echo File "%1" does not exist!
-goto label_exit
-
-:label_no_compressor
-echo No archiving utility at this path: "%COMPRESSOR%"!
-goto label_exit
-
-:label_exit


Classpath was missing a backslash

Classpath was missing a backslash

--- dist/generic/jsqsh.bat
+++ dist/generic/jsqsh.bat
@@ -1,2 +1,2 @@
 @echo off
-java -cp "..\share\jsqsh*" org.sqsh.JSqsh %*
+java -cp "..\share\jsqsh\*" org.sqsh.JSqsh %*


Don't check errors in post-link.bat

Don't check errors in post-link.bat

This prevents the package install fail on update (install latex packages which
are already installed) or when offline. As pdflatex installs packages anyway
when they are missing, there is no harm done other than a longer time on first
use.

--- recipes/miktex-portable/post-link.bat
+++ recipes/miktex-portable/post-link.bat
@@ -1,6 +1,7 @@
 rem latex packages which are needed by nbconvert and other pdf producers
-%PREFIX%\Library\miktex-portable\miktex\bin\mpm --update-db && if errorlevel 1 exit 1
+rem don't check for errors so that this succeeds even if offline, etc...
+%PREFIX%\Library\miktex-portable\miktex\bin\mpm --update-db --quiet
 for %%x in (adjustbox booktabs collectbox fancyvrb ifoddpage mptopdf ucs url) do (
-	%PREFIX%\Library\miktex-portable\miktex\bin\mpm --install %%x  && if errorlevel 1 exit 1
+	%PREFIX%\Library\miktex-portable\miktex\bin\mpm --quiet --install %%x
 )
-if errorlevel 1 exit 1
+rem No final check as this should succeed even if the conda package is updated and the latex packages already installed


upd pack.bat

upd pack.bat

--- pack.bat
+++ pack.bat
@@ -1,4 +1,4 @@
-del TbSync.xpi
-"C:\Program Files\7-Zip\7zG.exe" a -tzip TbSync.xpi content locale skin chrome.manifest install.rdf LICENSE.txt README.md bootstrap.js
+del TbSync-beta.xpi
+"C:\Program Files\7-Zip\7zG.exe" a -tzip TbSync-beta.xpi content locale skin chrome.manifest install.rdf LICENSE.txt README.md bootstrap.js


Восстановлены правильные команды для локального прогона #738

--- test.cmd
+++ test.cmd
@@ -5,7 +5,7 @@

 @set RUNNER_IBCONNECTION=/F./build/ibservice

-@REM @call runner init-dev --src src/tests/cf/83
+@call runner init-dev --src src/tests/cf/83

 @IF ERRORLEVEL 1 goto error

@@ -13,7 +13,7 @@

 @REM @IF ERRORLEVEL 1 goto error

-@REM @call runner run --command СоздатьАдминистратора
+@call runner run --command СоздатьАдминистратора

 @IF ERRORLEVEL 1 goto error

@@ -24,7 +24,7 @@
 @echo .
 @call runner xunit --settings tools/vrunner.json

-@call allure generate ./build/out/allure
+@call allure generate ./build/out/allure --clean

 @IF ERRORLEVEL 1 goto error


Fixed a bug introduced yesterday, breaking VC detection in some cases.

--- C/include/configure.bat
+++ C/include/configure.bat
@@ -154,13 +154,14 @@
 :#   2016-11-07 JFL Include OUTDIR in LIBPATH for SysToolsLibs built here.    *
 :#                  Commented-put Visual Studio 6 path, tested not to work.   *
 :#                  Bug fix: Detect Visual Studio 8 Windows SDK AMD64 lib.    *
+:#   2016-11-08 JFL Fixed a bug introduced yesterday, breaking VC detection.  *
 :#                                                                            *
 :#         Copyright 2016 Hewlett Packard Enterprise Development LP          *
 :# Licensed under the Apache 2.0 license  www.apache.org/licenses/LICENSE-2.0 *
 :#*****************************************************************************

 setlocal EnableExtensions EnableDelayedExpansion
-set "VERSION=2016-11-07"
+set "VERSION=2016-11-08"
 set "SCRIPT=%~nx0"
 set "SPATH=%~dp0" & set "SPATH=!SPATH:~0,-1!"
 set "ARG0=%~f0"
@@ -1227,6 +1228,7 @@
 :# The Visual C++ subdirectory can be named VC, VC98, or VC7 depending on the VS version.
 for %%s in (%~2) do (
   for %%p in (%PF64AND32%) do (
+    :# %ECHO.D% Searching in "%%~p\%~3\VC*\%%s"
     for /d %%d in ("%%~p\%~3\VC*") do if exist "%%d\%%s\cl.exe" (
       set "%VS%=%%~dpd" &:# Remove the VC* subdir name
       set "%VS%=!%VS%:~0,-1!" &:# Remove the trailing '\'.
@@ -1640,7 +1642,7 @@
 :# is to rely on the fact that the PF32 and PF64 variables defined here are left unchanged.
 :# First checking for symlinks C:\Pgm32 and C:\Pgm64, which I had on some of my systems.
 if not defined PF32   set "PF32=C:\Pgm32"
-if not exist "%PF32%" if defined "ProgramFiles(x86)" set "PF32=%ProgramFiles(x86)%"
+if not exist "%PF32%" set "PF32=%ProgramFiles(x86)%"
 if not exist "%PF32%" set "PF32=%ProgramFiles%"

 if not defined PF64   set "PF64=C:\Pgm64"