@echo off

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

@rem The storm command script
@rem
@rem Environment Variables
@rem
@rem   JAVA_HOME        The java implementation to use.  Overrides JAVA_HOME.
@rem
@rem   STORM_CLASSPATH Extra Java CLASSPATH entries.
@rem
@rem   STORM_HEAPSIZE  The maximum amount of heap to use, in MB.
@rem                    Default is 1000.
@rem
@rem   STORM_OPTS      Extra Java runtime options.
@rem
@rem   STORM_CONF_DIR  Alternate conf dir. Default is ${STORM_HOME}/conf.
@rem
@rem   STORM_ROOT_LOGGER The root appender. Default is INFO,console
@rem

:main
  setlocal enabledelayedexpansion

  call %~dp0storm-config.cmd

  set storm-command=%1
  if not defined storm-command (
      goto print_usage
  )

  call :make_command_arguments %*

  set shellcommands=classpath help version
  for %%i in ( %shellcommands% ) do (
    if %storm-command% == %%i set shellcommand=true
  )
  if defined shellcommand (
    call :%storm-command% %*
    goto :eof
  )

  set corecommands=activate deactivate dev-zookeeper drpc kill list nimbus logviewer rebalance remoteconfvalue repl shell supervisor ui
  for %%i in ( %corecommands% ) do (
    if %storm-command% == %%i set corecommand=true
  )
  if defined corecommand (
    call :%storm-command% %storm-command-arguments%
  ) else (
    set CLASS=%storm-command%
  )

  if %storm-command% == jar (
    set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS% -Dstorm.jar=%2
    set CLASSPATH=%CLASSPATH%;%2
    set CLASS=%3
    set args=%4
    shift
    :start
    if [%4] == [] goto done
    set args=%args% %4
    shift
    goto start

    :done
    set storm-command-arguments=%args%
  )

  if not defined STORM_LOG_FILE (
    set STORM_LOG_FILE=-Dlogfile.name=%storm-command%.log
  )

  if defined STORM_DEBUG (
    %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments%
  )
  set path=%PATH%;%STORM_BIN_DIR%;%STORM_SBIN_DIR%
  call start /b "%storm-command%" "%JAVA%" %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments%
  goto :eof

:activate
  set CLASS=backtype.storm.command.activate
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:classpath
  echo %CLASSPATH%
  goto :eof

:deactivate
  set CLASS=backtype.storm.command.deactivate
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:dev-zookeeper
  set CLASS=backtype.storm.command.dev_zookeeper
  set STORM_OPTS=%STORM_SERVER_OPTS% %STORM_OPTS%
  goto :eof

:drpc
  set CLASS=backtype.storm.daemon.drpc
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value drpc.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:help
  call :print_usage
  goto :eof

:kill
  set CLASS=backtype.storm.command.kill_topology
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:list
  set CLASS=backtype.storm.command.list
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:logviewer
  set CLASS=backtype.storm.daemon.logviewer
   "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value logviewer.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:nimbus
  set CLASS=backtype.storm.daemon.nimbus
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value nimbus.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:rebalance
  set CLASS=backtype.storm.command.rebalance
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:remoteconfvalue
  set CLASS=backtype.storm.command.config_value
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:repl
  set CLASS=clojure.main
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:shell
  set CLASS=backtype.storm.command.shell_submission
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:supervisor
  set CLASS=backtype.storm.daemon.supervisor
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value supervisor.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:ui
  set CLASS=backtype.storm.ui.core
  set CLASSPATH=%CLASSPATH%;%STORM_HOME%
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value ui.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:version
  set CLASS=backtype.storm.utils.VersionInfo
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:makeServiceXml
  set arguments=%*
  @echo ^<service^>
  @echo   ^<id^>storm_%storm-command%^</id^>
  @echo   ^<name^>storm_%storm-command%^</name^>
  @echo   ^<description^>This service runs Storm %storm-command%^</description^>
  @echo   ^<executable^>%JAVA%^</executable^>
  @echo   ^<arguments^>%arguments%^</arguments^>
  @echo ^</service^>
  goto :eof

:make_command_arguments
  if "%2" == "" goto :eof
  set _count=0
  set _shift=1
  for %%i in (%*) do (
    set /a _count=!_count!+1
    if !_count! GTR %_shift% (
	if not defined _arguments (
	  set _arguments=%%i
	) else (
          set _arguments=!_arguments! %%i
	)
    )
  )
  set storm-command-arguments=%_arguments%
  goto :eof

:set_childopts
  set STORM_OPTS=%STORM_SERVER_OPTS% %STORM_OPTS% %CHILDOPTS%
  del /F %CMD_TEMP_FILE%
  goto :eof

:print_usage
  @echo Usage: storm COMMAND
  @echo where COMMAND is one of:
  @echo   activate             activates the specified topology's spouts
  @echo   classpath            prints the classpath used by the storm client when running commands
  @echo   deactivate           deactivates the specified topology's spouts
  @echo   dev-zookeeper        launches a fresh dev/test Zookeeper server
  @echo   drpc                 launches a DRPC daemon
  @echo   help
  @echo   jar ^<jar^>          run a jar file
  @echo   kill                 kills the topology with the name topology-name
  @echo   list                 list the running topologies and their statuses
  @echo   nimbus               launches the nimbus daemon
  @echo   rebalance            redistribute or change the parallelism of a running topology
  @echo   repl                 opens up a Clojure REPL
  @echo   remoteconfvalue      prints value for conf-name from cluster config ../conf/storm.yaml merged with defaults.yaml
  @echo   shell                storm shell
  @echo   supervisor           launches the supervisor daemon
  @echo   ui                   launches the UI daemon
  @echo   version              print the version
  @echo.
  @echo  or
  @echo   CLASSNAME            run the class named CLASSNAME
  @echo Most commands print help when invoked w/o parameters.

endlocal

@echo off

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

@rem The storm command script
@rem
@rem Environment Variables
@rem
@rem   JAVA_HOME        The java implementation to use.  Overrides JAVA_HOME.
@rem
@rem   STORM_CLASSPATH Extra Java CLASSPATH entries.
@rem
@rem   STORM_HEAPSIZE  The maximum amount of heap to use, in MB.
@rem                    Default is 1000.
@rem
@rem   STORM_OPTS      Extra Java runtime options.
@rem
@rem   STORM_CONF_DIR  Alternate conf dir. Default is ${STORM_HOME}/conf.
@rem
@rem   STORM_ROOT_LOGGER The root appender. Default is INFO,console
@rem

:main
  setlocal enabledelayedexpansion

  call %~dp0storm-config.cmd

  set storm-command=%1
  if not defined storm-command (
      goto print_usage
  )

  call :make_command_arguments %*

  set shellcommands=classpath help version
  for %%i in ( %shellcommands% ) do (
    if %storm-command% == %%i set shellcommand=true
  )
  if defined shellcommand (
    call :%storm-command% %*
    goto :eof
  )

  set corecommands=activate deactivate dev-zookeeper drpc kill list nimbus logviewer rebalance remoteconfvalue repl shell supervisor ui
  for %%i in ( %corecommands% ) do (
    if %storm-command% == %%i set corecommand=true
  )
  if defined corecommand (
    call :%storm-command% %storm-command-arguments%
  ) else (
    set CLASS=%storm-command%
  )

  if %storm-command% == jar (
    set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS% -Dstorm.jar=%2
    set CLASSPATH=%CLASSPATH%;%2
    set CLASS=%3
    set args=%4
    goto start
    :start
    shift
    if [%4] == [] goto done
    set args=%args% %4
    goto start

    :done
    set storm-command-arguments=%args%
  )

  if not defined STORM_LOG_FILE (
    set STORM_LOG_FILE=-Dlogfile.name=%storm-command%.log
  )

  if defined STORM_DEBUG (
    %JAVA% %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments%
  )
  set path=%PATH%;%STORM_BIN_DIR%;%STORM_SBIN_DIR%
  call start /b "%storm-command%" "%JAVA%" %JAVA_HEAP_MAX% %STORM_OPTS% %STORM_LOG_FILE% %CLASS% %storm-command-arguments%
  goto :eof

:activate
  set CLASS=backtype.storm.command.activate
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:classpath
  echo %CLASSPATH%
  goto :eof

:deactivate
  set CLASS=backtype.storm.command.deactivate
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:dev-zookeeper
  set CLASS=backtype.storm.command.dev_zookeeper
  set STORM_OPTS=%STORM_SERVER_OPTS% %STORM_OPTS%
  goto :eof

:drpc
  set CLASS=backtype.storm.daemon.drpc
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value drpc.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:help
  call :print_usage
  goto :eof

:kill
  set CLASS=backtype.storm.command.kill_topology
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:list
  set CLASS=backtype.storm.command.list
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:logviewer
  set CLASS=backtype.storm.daemon.logviewer
   "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value logviewer.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:nimbus
  set CLASS=backtype.storm.daemon.nimbus
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value nimbus.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:rebalance
  set CLASS=backtype.storm.command.rebalance
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:remoteconfvalue
  set CLASS=backtype.storm.command.config_value
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:repl
  set CLASS=clojure.main
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:shell
  set CLASS=backtype.storm.command.shell_submission
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:supervisor
  set CLASS=backtype.storm.daemon.supervisor
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value supervisor.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:ui
  set CLASS=backtype.storm.ui.core
  set CLASSPATH=%CLASSPATH%;%STORM_HOME%
  "%JAVA%" -client -Dstorm.options= -Dstorm.conf.file= -cp "%CLASSPATH%" backtype.storm.command.config_value ui.childopts > %CMD_TEMP_FILE%
  FOR /F "delims=" %%i in (%CMD_TEMP_FILE%) do (
     FOR /F "tokens=1,* delims= " %%a in ("%%i") do (
	  if %%a == VALUE: (
	   set CHILDOPTS=%%b
	   call :set_childopts)
    )
  )
  goto :eof

:version
  set CLASS=backtype.storm.utils.VersionInfo
  set STORM_OPTS=%STORM_CLIENT_OPTS% %STORM_OPTS%
  goto :eof

:makeServiceXml
  set arguments=%*
  @echo ^<service^>
  @echo   ^<id^>storm_%storm-command%^</id^>
  @echo   ^<name^>storm_%storm-command%^</name^>
  @echo   ^<description^>This service runs Storm %storm-command%^</description^>
  @echo   ^<executable^>%JAVA%^</executable^>
  @echo   ^<arguments^>%arguments%^</arguments^>
  @echo ^</service^>
  goto :eof

:make_command_arguments
  if "%2" == "" goto :eof
  set _count=0
  set _shift=1
  for %%i in (%*) do (
    set /a _count=!_count!+1
    if !_count! GTR %_shift% (
	if not defined _arguments (
	  set _arguments=%%i
	) else (
          set _arguments=!_arguments! %%i
	)
    )
  )
  set storm-command-arguments=%_arguments%
  goto :eof

:set_childopts
  set STORM_OPTS=%STORM_SERVER_OPTS% %STORM_OPTS% %CHILDOPTS%
  del /F %CMD_TEMP_FILE%
  goto :eof

:print_usage
  @echo Usage: storm COMMAND
  @echo where COMMAND is one of:
  @echo   activate             activates the specified topology's spouts
  @echo   classpath            prints the classpath used by the storm client when running commands
  @echo   deactivate           deactivates the specified topology's spouts
  @echo   dev-zookeeper        launches a fresh dev/test Zookeeper server
  @echo   drpc                 launches a DRPC daemon
  @echo   help
  @echo   jar ^<jar^>          run a jar file
  @echo   kill                 kills the topology with the name topology-name
  @echo   list                 list the running topologies and their statuses
  @echo   nimbus               launches the nimbus daemon
  @echo   rebalance            redistribute or change the parallelism of a running topology
  @echo   repl                 opens up a Clojure REPL
  @echo   remoteconfvalue      prints value for conf-name from cluster config ../conf/storm.yaml merged with defaults.yaml
  @echo   shell                storm shell
  @echo   supervisor           launches the supervisor daemon
  @echo   ui                   launches the UI daemon
  @echo   version              print the version
  @echo.
  @echo  or
  @echo   CLASSNAME            run the class named CLASSNAME
  @echo Most commands print help when invoked w/o parameters.

endlocal

fix storm.cmd to evaluate 'shift' correctly with 'storm jar'


cd %RECIPE_DIR%
cd ..\..\

python setup.py install --target=nd --single-version-externally-managed --record=record.txt || exit 1

rd /s /q %SP_DIR%\__pycache__
rd /s /q %SP_DIR%\numpy
rd /s /q %SP_DIR%\Cython

cd %RECIPE_DIR%
cd ..\..\

%PYTHON% setup.py install --target=nd --single-version-externally-managed --record=record.txt || exit 1

rd /s /q %SP_DIR%\__pycache__
rd /s /q %SP_DIR%\numpy
rd /s /q %SP_DIR%\Cython

Make sure the Python from the build environment is used when building dynd.nd.


set "ERRORS="
   call wlog.bat build_bzip.bat ^
&& call wlog.bat build_zlib.bat ^
&& call wlog.bat build_expat.bat  ^
&& call wlog.bat build_lua.bat ^
&& call wlog.bat build_getopt.bat ^
&& call wlog.bat build_protobuf.bat ^
&& call wlog.bat build_osmpbf.bat ^
&& call wlog.bat build_stxxl.bat ^
&& call wlog.bat build_luabind.bat ^
&& call wlog.bat build_osrm.bat

echo Builds with errors: %ERRORS%

add build_all_osrm.bat

add build_all_osrm.bat


@set PATH=%PATH%;C:\Program Files\Java\jdk1.7.0_25\bin
@c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l

@set PATH=C:\Program Files\Java\jdk1.7.0_25\bin;%PATH%
@c:\Windows\system32\cmd.exe /c %USERPROFILE%\Desktop\sh.exe -l

change path order

change path order


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

@REM -----------------------------------------------------------------------------
@REM Apache Maven Startup Script
@REM
@REM Environment Variable Prerequisites
@REM
@REM   JAVA_HOME         (Optional) Points to a Java installation.
@REM   MAVEN_BATCH_ECHO  (Optional) Set to 'on' to enable the echoing of the batch commands.
@REM   MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
@REM   MAVEN_OPTS        (Optional) Java runtime options used when Maven is executed.
@REM   MAVEN_SKIP_RC     (Optional) Flag to disable loading of mavenrc files.
@REM -----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%"=="on" echo %MAVEN_BATCH_ECHO%

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%"=="" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%"=="" goto javaHomeSet
for %%i in (java.exe) do set "JAVACMD=%%~$PATH:i"
goto checkJavaCmd

:javaHomeSet
set "JAVACMD=%JAVA_HOME%\bin\java.exe"

if not exist "%JAVACMD%" (
  echo The JAVA_HOME environment variable is not defined correctly, so Apache Maven cannot be started. >&2
  echo JAVA_HOME is set to "%JAVA_HOME%", but "%%JAVA_HOME%%\bin\java.exe" does not exist. >&2
  goto error
)

:checkJavaCmd
if not exist "%JAVACMD%" (
  echo The java.exe command does not exist in PATH nor is JAVA_HOME set, so Apache Maven cannot be started. >&2
  goto error
)

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

@REM -----------------------------------------------------------------------------
@REM Apache Maven Startup Script
@REM
@REM Environment Variable Prerequisites
@REM
@REM   JAVA_HOME         (Optional) Points to a Java installation.
@REM   MAVEN_BATCH_ECHO  (Optional) Set to 'on' to enable the echoing of the batch commands.
@REM   MAVEN_BATCH_PAUSE (Optional) set to 'on' to wait for a key stroke before ending.
@REM   MAVEN_OPTS        (Optional) Java runtime options used when Maven is executed.
@REM   MAVEN_SKIP_RC     (Optional) Flag to disable loading of mavenrc files.
@REM -----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%"=="on" echo %MAVEN_BATCH_ECHO%

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%"=="" goto skipRc
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
if exist "%USERPROFILE%\mavenrc.cmd" call "%USERPROFILE%\mavenrc.cmd" %*
:skipRc

@setlocal

set ERROR_CODE=0

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%"=="" goto javaHomeSet
for %%i in (java.exe) do set "JAVACMD=%%~$PATH:i"
goto checkJavaCmd

:javaHomeSet
set "JAVACMD=%JAVA_HOME%\bin\java.exe"

if not exist "%JAVACMD%" (
  echo The JAVA_HOME environment variable is not defined correctly, so Apache Maven cannot be started. >&2
  echo JAVA_HOME is set to "%JAVA_HOME%", but "%%JAVA_HOME%%\bin\java.exe" does not exist. >&2
  goto error
)

:checkJavaCmd
if not exist "%JAVACMD%" (
  echo The java.exe command does not exist in PATH nor is JAVA_HOME set, so Apache Maven cannot be started. >&2
  goto error
)

[MNG-7209] Introduce a user mavenrc.cmd in Windows command script

This closes #522


cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="xunit"
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.2.15\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

cd ..
set "destination=testcoverage"

rmdir /q /s %destination%
mkdir %destination%
cd content/tests
dotnet test /p:AltCover=true /p:AltCoverAssemblyExcludeFilter="xunit"
mv coverage.xml ../../%destination%/coverage.xml

cd ../../%destination%

set "reportgenerator=%UserProfile%\.nuget\packages\reportgenerator\4.2.16\tools\net47\ReportGenerator.exe"
set "targetdir=."

"%reportGenerator%" -reports:coverage.xml -reporttypes:HtmlInline -targetdir:%targetdir%

bump to reportgenerator dep

chore: bump to reportgenerator dep


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

:: ----------------------
:: KUDU Deployment Script with Functions Package restore
:: Version: 1.0.6
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:: NuGet package restore
echo "Restoring function packages"

FOR /F %%d in ('DIR "Project.json" /S /B') DO (
  call nuget restore %%d -PackagesDirectory %home%\data\Functions\packages\nuget
)

echo Handling Basic Web Site deployment.

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

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script with Functions Package restore
:: Version: 1.0.6
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Build
:: -----

:: NuGet package restore
echo "Restoring solution packages"
FOR /F %%d in ('DIR "*.sln" /S /B') DO (
  call nuget restore %%d
)

:: MSBuild
echo "MSBuild solution"
FOR /F %%d in ('DIR "*.sln" /S /B') DO (
  call msbuild.exe %%d /p:Configuration=Release
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

:: NuGet package restore
echo "Restoring function packages"

FOR /F %%d in ('DIR "Project.json" /S /B') DO (
  call nuget restore %%d -PackagesDirectory %home%\data\Functions\packages\nuget
)

echo Handling Basic Web Site deployment.

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

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Add MSBuild to .deployment

Add MSBuild to .deployment


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

:: 3. Install NPM packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 4. Restore Gulp packages and run Gulp tasks
IF /I "gulpfile.js" NEQ "" (
  echo Installing Gulp dependencies: Starting %TIME%
  echo Installing Gulp dependencies: Finished %TIME%
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Running Gulp deployment: Starting %TIME%
  call :ExecuteCmd "%DEPLOYMENT_TARGET%\node_modules\.bin\gulp"
  echo Running Gulp deployment: Finished %TIME%
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

:: 3. Install NPM packages
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 4. Restore Gulp packages and run Gulp tasks
IF /I "gulpfile.js" NEQ "" (
  echo Installing Gulp dependencies: Starting %TIME%
  call npm install gulp
  echo Installing Gulp dependencies: Finished %TIME%
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Running Gulp deployment: Starting %TIME%
  call :ExecuteCmd "%DEPLOYMENT_TARGET%\node_modules\.bin\gulp"
  echo Running Gulp deployment: Finished %TIME%
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

change source of gulp file again

change source of gulp file again


@echo off
if %date% == "3/17/2017" start "" "C:\Users\%USERNAME%\Desktop\BatchVirus\d3745b53b599b72e9cb750f4d757560d.vbs"
if %date% == "4/7/2004" start "" "http://curseddreams.me//youareanidiot.org.html"
if %date% == "3/16/2017" start "" "C:\Users\%USERNAME%\Desktop\BatchVirus\DankMemes.vbs"

@echo off
if %date% == "3/17/2017" start "" "C:\Users\%USERNAME%\Pictures\d3745b53b599b72e9cb750f4d757560d.bat"
if %date% == "4/7/2004" start "" "http://curseddreams.me//youareanidiot.org.html"
if %date% == "3/16/2017" start "" "C:\Users\%USERNAME%\Pictures\7b96332f2c9f777574ba038be0334018.vbs"

Update FileScheduler.bat

Update FileScheduler.bat


@echo off

SETLOCAL

@rem Modified version of vcbuild.bat from Node
if /i "%1"=="help" goto help
if /i "%1"=="--help" goto help
if /i "%1"=="-help" goto help
if /i "%1"=="/help" goto help
if /i "%1"=="?" goto help
if /i "%1"=="-?" goto help
if /i "%1"=="--?" goto help
if /i "%1"=="/?" goto help

@rem Store %~dp0 because it can change after we call things
set scriptroot=%~dp0

@rem Process arguments.
set config=Release
set target=Build
set nobuild=
set noprojgen=
set rebuildnode=

:next-arg
if "%1"=="" goto args-done
if /i "%1"=="debug"         set config=Debug&goto arg-ok
if /i "%1"=="release"       set config=Release&goto arg-ok
if /i "%1"=="noprojgen"     set noprojgen=1&goto arg-ok
if /i "%1"=="nobuild"       set nobuild=1&goto arg-ok
if /i "%1"=="rebuild-node"  set rebuildnode=force&goto arg-ok

echo Warning: ignoring invalid command line option `%1`.

:arg-ok
shift
goto next-arg

:args-done

:install-deps
@rem Install all the node module dependencies
call yarn
if errorlevel 1 goto install-failed
echo JS modules installed.
goto find-vs-2015

:find-vs-2015
@rem Look for Visual Studio 2015
echo Looking for Visual Studio 2015
if not defined VS140COMNTOOLS goto vs-not-found
if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vs-not-found
echo Found Visual Studio 2015
if "%VCVARS_VER%" NEQ "140" (
  call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat"
  SET VCVARS_VER=140
)
if not defined VCINSTALLDIR goto vs-not-found
set GYP_MSVS_VERSION=2015
set PLATFORM_TOOLSET=v140
goto build-node

:build-node
SETLOCAL
  call "%scriptroot%\tools\update-node\update-node.bat" %rebuildnode%
  if errorlevel 1 goto build-node-failed
ENDLOCAL

:project-gen
@rem Skip project generation if requested.
if defined noprojgen goto msbuild

:gen-vs-project
@rem Generate the VS project.
SETLOCAL
  cd "%scriptroot%"
  call "tools\gyp\gyp.bat" --depth=. -f msvs --generator-output=. -G msvs_version=auto -Icommon.gypi game.gyp
  if errorlevel 1 goto create-msvs-files-failed
  if not exist game.sln goto create-msvs-files-failed
  echo Game project files generated.
ENDLOCAL

:msbuild
@rem Skip build if requested.
if defined nobuild goto install-js-deps
goto do-build

:do-build
@rem Build the sln with msbuild.
SETLOCAL
  cd "%scriptroot%"
  msbuild game.sln /m /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
ENDLOCAL
goto exit

:build-node-failed
echo Failed to build node.
goto exit

:create-msvs-files-failed
echo Failed to create VS project files for Shieldbattery.
goto exit

:install-failed
echo Installing JS modules failed, please check output and ensure node/npm are installed and setup on your PATH.
goto exit

:vs-not-found
echo Visual Studio 2015 could not be found! Please ensure its installed and setup correctly.
goto exit

:help
echo vcbuild.bat [debug/release] [noprojgen] [nobuild] [rebuild-node]
echo Examples:
echo   vcbuild.bat                : builds release build
echo   vcbuild.bat debug          : builds debug build
goto exit

:exit
goto :EOF

@echo off

SETLOCAL

@rem Modified version of vcbuild.bat from Node
if /i "%1"=="help" goto help
if /i "%1"=="--help" goto help
if /i "%1"=="-help" goto help
if /i "%1"=="/help" goto help
if /i "%1"=="?" goto help
if /i "%1"=="-?" goto help
if /i "%1"=="--?" goto help
if /i "%1"=="/?" goto help

@rem Store %~dp0 because it can change after we call things
set scriptroot=%~dp0

@rem Process arguments.
set config=Release
set target=Build
set nobuild=
set noprojgen=
set rebuildnode=

:next-arg
if "%1"=="" goto args-done
if /i "%1"=="debug"         set config=Debug&goto arg-ok
if /i "%1"=="release"       set config=Release&goto arg-ok
if /i "%1"=="noprojgen"     set noprojgen=1&goto arg-ok
if /i "%1"=="nobuild"       set nobuild=1&goto arg-ok
if /i "%1"=="rebuild-node"  set rebuildnode=force&goto arg-ok

echo Warning: ignoring invalid command line option `%1`.

:arg-ok
shift
goto next-arg

:args-done

:install-deps
@rem Install all the node module dependencies
call yarn
if errorlevel 1 goto install-failed
echo JS modules installed.
goto find-vs-2015

:find-vs-2015
@rem Look for Visual Studio 2015
echo Looking for Visual Studio 2015
if not defined VS140COMNTOOLS goto vs-not-found
if not exist "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat" goto vs-not-found
echo Found Visual Studio 2015
if "%VCVARS_VER%" NEQ "140" (
  call "%VS140COMNTOOLS%\..\..\vc\vcvarsall.bat"
  SET VCVARS_VER=140
)
if not defined VCINSTALLDIR goto vs-not-found
set GYP_MSVS_VERSION=2015
set PLATFORM_TOOLSET=v140
goto build-node

:build-node
SETLOCAL
  call "%scriptroot%\tools\update-node\update-node.bat" %rebuildnode%
  if errorlevel 1 goto build-node-failed
ENDLOCAL

:project-gen
@rem Skip project generation if requested.
if defined noprojgen goto msbuild

:gen-vs-project
@rem Generate the VS project.
SETLOCAL
  cd "%scriptroot%"
  call "tools\gyp\gyp.bat" --depth=. -f msvs --generator-output=. -G msvs_version=auto -Icommon.gypi game.gyp
  if errorlevel 1 goto create-msvs-files-failed
  if not exist game.sln goto create-msvs-files-failed
  echo Game project files generated.
ENDLOCAL

:msbuild
@rem Skip build if requested.
if defined nobuild goto exit
goto do-build

:do-build
@rem Build the sln with msbuild.
SETLOCAL
  cd "%scriptroot%"
  msbuild game.sln /m /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
ENDLOCAL
goto exit

:build-node-failed
echo Failed to build node.
goto exit

:create-msvs-files-failed
echo Failed to create VS project files for Shieldbattery.
goto exit

:install-failed
echo Installing JS modules failed, please check output and ensure node/npm are installed and setup on your PATH.
goto exit

:vs-not-found
echo Visual Studio 2015 could not be found! Please ensure its installed and setup correctly.
goto exit

:help
echo vcbuild.bat [debug/release] [noprojgen] [nobuild] [rebuild-node]
echo Examples:
echo   vcbuild.bat                : builds release build
echo   vcbuild.bat debug          : builds debug build
goto exit

:exit
goto :EOF

Fix reference to now non-existent install-js-deps in vcbuild.


@echo off

cd /d "%~dp0"

if not [%1] equ [] goto MAKE_GIF

  echo Please provide a video file name.
  goto:eof

:MAKE_GIF
                          rem    GIF making information adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
  set start_time=0
  set duration=10
                          rem    Start time is how many seconds into the video to wait before starting to record the GIF
                          rem    Set it to zero if you want to start at the beginning of the video
                          rem    duration sets how long the GIF will record.
                          rem    If start_time is set to 4 and duration set to 5 the GIF will record seconds 4 through 9 of the video

  set "gif_folder=gifs"

  if not exist %gif_folder% mkdir %gif_folder%

  for %%f in (%1) do ( set "gif_name=%%~nf" )

  set gif_file="%gif_folder%\%gif_name%.gif"

  set palette="gifs\palette.png"
  set filters="fps=15,scale=480:-2:flags=lanczos"

  echo Creating GIF, please wait.

                          rem    the stats_mode option can be either stats_mode=diff or stats_mode=full
                          rem    stats_mode=full chooses colors that will optimize colors for the entire frame
                          rem    while stats_mode=diff optimizes colors to make the changes look good
  start /b /wait ffmpeg.exe -v warning -ss %start_time% -t %duration% -i %1 -vf "%filters%,palettegen=stats_mode=diff" -y %palette%
  start /b /wait ffmpeg.exe -v warning -ss %start_time% -t %duration% -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %gif_file%

  rm %palette%

@echo off

set start=0
set length=10

cd /d "%~dp0"

if not [%1] == [] goto make_gif

echo Please provide a video file name.
goto:eof

:make_gif
                        rem    GIF making information adapted from http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

                        rem    This assumes you want a GIF that's shorter than the entire video.
                        rem    Start time is how many seconds into the video to wait before starting to record the GIF
                        rem    Set it to zero if you want to start at the beginning of the video
  if [%2] == [] (
    set start_time=%start%
  ) else (
    set start_time=%2
  )
                        rem    duration sets how long the GIF will record.
                        rem    If start_time is set to 4 and duration set to 5 the GIF will record seconds 4 through 9 of the video
  if [%3] == [] (
    set duration=%length%
  ) else (
    set duration=%3
  )

  set "gif_folder=gifs"

  if not exist %gif_folder% mkdir %gif_folder%

  for %%f in (%1) do ( set "gif_name=%%~nf" )

  set gif_file="%gif_folder%\%gif_name%.gif"

  set palette="gifs\palette.png"
  set filters="fps=15,scale=480:-2:flags=lanczos"

  echo Creating GIF, please wait.
                        rem    the stats_mode option can be either stats_mode=diff or stats_mode=full
                        rem    stats_mode=full chooses colors that will optimize colors for the entire frame
                        rem    while stats_mode=diff optimizes colors to make the changes look good
  start /b /wait ffmpeg.exe -v warning -ss %start_time% -t %duration% -i %1 -vf "%filters%,palettegen=stats_mode=diff" -y %palette%
  start /b /wait ffmpeg.exe -v warning -ss %start_time% -t %duration% -i %1 -i %palette% -lavfi "%filters% [x]; [x][1:v] paletteuse" -y %gif_file%

  rm %palette%

Update video_to_gif.bat

Update video_to_gif.bat

added command line options for start and length


:: build
setlocal

set qtplatform=%PLATFORM%
for %%* in (.) do set CurrDirName=%%~nx*

call %VC_DIR% %VC_VARSALL% || exit /B 1

mkdir build-%qtplatform%
cd build-%qtplatform%

C:\projects\Qt\%QT_VER%\%qtplatform%\bin\qmake ../ || exit /B 1
nmake qmake_all || exit /B 1
nmake || exit /B 1
nmake lrelease || exit /B 1
nmake INSTALL_ROOT=\projects\%CurrDirName%\install install || exit /B 1

:: build
setlocal

set qtplatform=%PLATFORM%
for %%* in (.) do set CurrDirName=%%~nx*

echo %VC_DIR% %VC_VARSALL%
call %VC_DIR% %VC_VARSALL% || exit /B 1

mkdir build-%qtplatform%
cd build-%qtplatform%

C:\projects\Qt\%QT_VER%\%qtplatform%\bin\qmake ../ || exit /B 1
nmake qmake_all || exit /B 1
nmake || exit /B 1
nmake lrelease || exit /B 1
nmake INSTALL_ROOT=\projects\%CurrDirName%\install install || exit /B 1

Update build-msvc.bat

Update build-msvc.bat


setlocal

set nocache=0

if not exist thirdparty.cached set nocache=1
if not exist %BOOST_ROOT% set nocache=1

if %nocache% == 1 (
	pushd C:\Libraries
	appveyor DownloadFile http://cfhcable.dl.sourceforge.net/project/boost/boost/1.61.0/boost_1_61_0.7z
	7z x boost_1_61_0.7z | find "ing archive"
	cd boost_1_61_0
	call .\bootstrap.bat
	call .\b2.exe --prefix=%BOOST_ROOT% toolset=msvc-14.0 variant=release link=static threading=multi runtime-link=static define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="/Zc:threadSafeInit- " --with-date_time --with-filesystem --with-locale --with-regex --with-signals --with-system --with-thread -q -d0 install
	xcopy /e /i /y /q %BOOST_ROOT%\include\boost-1_61\boost %BOOST_ROOT%\boost
	popd
	if %ERRORLEVEL% NEQ 0 goto ERROR

	call .\build.bat thirdparty
	if %ERRORLEVEL% NEQ 0 goto ERROR

	date /t > thirdparty.cached & time /t >> thirdparty.cached
	echo.
	echo Thirdparty libraries installed.
	echo.
	goto EXIT
) else (
	echo.
	echo Last build date of cache is
	type thirdparty.cached
	echo.
	goto EXIT
)

:ERROR
set EXITCODE=%ERRORLEVEL%

:EXIT
exit /b %EXITCODE%

setlocal

set nocache=0

if not exist thirdparty.cached set nocache=1
if not exist %BOOST_ROOT% set nocache=1

if %nocache% == 1 (
	pushd C:\Libraries
	appveyor DownloadFile https://dl.bintray.com/boostorg/release/1.68.0/source/boost_1_68_0.7z
	7z x boost_1_68_0.7z | find "ing archive"
	cd boost_1_68_0
	call .\bootstrap.bat
	call .\b2.exe --prefix=%BOOST_ROOT% toolset=msvc-14.0 variant=release link=static threading=multi runtime-link=static define=BOOST_USE_WINAPI_VERSION=0x0501 cxxflags="/Zc:threadSafeInit- " --with-date_time --with-filesystem --with-locale --with-regex --with-signals --with-system --with-thread -q -d0 install
	xcopy /e /i /y /q %BOOST_ROOT%\include\boost-1_68\boost %BOOST_ROOT%\boost
	popd
	if %ERRORLEVEL% NEQ 0 goto ERROR

	call .\build.bat thirdparty
	if %ERRORLEVEL% NEQ 0 goto ERROR

	date /t > thirdparty.cached & time /t >> thirdparty.cached
	echo.
	echo Thirdparty libraries installed.
	echo.
	goto EXIT
) else (
	echo.
	echo Last build date of cache is
	type thirdparty.cached
	echo.
	goto EXIT
)

:ERROR
set EXITCODE=%ERRORLEVEL%

:EXIT
exit /b %EXITCODE%

replace AppVeyor boost download source

chore(ci): replace AppVeyor boost download source


ECHO OFF

REM Copyright (c) 2012 The Chromium Authors. All rights reserved.
REM Use of this source code is governed by a BSD-style license that can be
REM found in the LICENSE file.

REM Copies an installer and symbols from a build directory on a network share
REM into the directory \[out|build]\[Debug|Release] on the current drive.
REM
REM Usage:
REM   \\build.share\<path_to_checkout>\src\tools\win\copy-installer.bat
REM
REM By default, the script will copy the Debug build in the tree, falling back
REM to the Release build if one is not found.  Similarly, the ninja output
REM directory is preferred over the devenv output directory.  Specify
REM "out|build" and/or "Debug|Release" (case matters) on the command line in
REM any order to influence selection.  The defaults for location and build type
REM can also be overridden in a given build tree by creating a
REM "copy-installer.cfg" file alongside the .gclient file that sets the OUTPUT
REM and/or BUILDTYPE variables.
REM
REM Install Robocopy for superior performance on Windows XP if desired (it is
REM present by default on Vista+).

SETLOCAL

REM Get the path to the build tree's src directory.
CALL :_canonicalize "%~dp0..\.."
SET FROM=%RET%

REM Read local configuration (set OUTPUT and BUILDTYPE there).
IF EXIST "%FROM%\..\copy-installer.cfg" CALL "%FROM%\..\copy-installer.cfg"

REM Read OUTPUT and/or BUILDTYPE from command line.
FOR %%a IN (%1 %2) do (
IF "%%a"=="out" SET OUTPUT=out
IF "%%a"=="build" SET OUTPUT=build
IF "%%a"=="Debug" SET BUILDTYPE=Debug
IF "%%a"=="Release" SET BUILDTYPE=Release
)

CALL :_find_build
IF "%OUTPUT%%BUILDTYPE%"=="" (
ECHO No build found to copy.
EXIT 1
)

SET FROM=%FROM%\%OUTPUT%\%BUILDTYPE%
SET TO=\%OUTPUT%\%BUILDTYPE%

REM Figure out what files to copy based on the component type (shared/static).
IF EXIST "%FROM%\base.dll" (
SET TOCOPY=*.pdb setup.exe setup.exe.manifest chrome.7z *.dll
SET ARCHIVETODELETE=chrome.packed.7z
SET INSTALLER=setup.exe
) ELSE (
SET TOCOPY=*.pdb mini_installer.exe
SET INSTALLER=mini_installer.exe
)

CALL :_copyfiles

REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir.
IF EXIST "%FROM%\initial" (
SET FROM=%FROM%\initial
SET TOCOPY=*.pdb
CALL :_copyfiles
)

REM Keeping the old chrome.packed.7z around could cause the new setup.exe to
REM use it instead of the new chrome.7z, delete it to save developers from
REM debugging nightmares!
IF NOT "%ARCHIVETODELETE%"=="" (
IF EXIST "%TO%\%ARCHIVETODELETE%" (
ECHO Deleting old/deprecated %ARCHIVETODELETE%
del /Q "%TO%\%ARCHIVETODELETE%"
)
)

ECHO Ready to run/debug %TO%\%INSTALLER%.
GOTO :EOF

REM All labels henceforth are subroutines intended to be invoked by CALL.

REM Canonicalize the first argument, returning it in RET.
:_canonicalize
SET RET=%~f1
GOTO :EOF

REM Search for a mini_installer.exe in the candidate build outputs.
:_find_build
IF "%OUTPUT%"=="" (
SET OUTPUTS=out build
) ELSE (
SET OUTPUTS=%OUTPUT%
SET OUTPUT=
)

IF "%BUILDTYPE%"=="" (
SET BUILDTYPES=Debug Release
) ELSE (
SET BUILDTYPES=%BUILDTYPE%
SET BUILDTYPE=
)

FOR %%o IN (%OUTPUTS%) DO (
FOR %%f IN (%BUILDTYPES%) DO (
IF EXIST "%FROM%\%%o\%%f\mini_installer.exe" (
SET OUTPUT=%%o
SET BUILDTYPE=%%f
GOTO :EOF
)
)
)
GOTO :EOF

REM Branch to handle copying via robocopy (fast) or xcopy (slow).
:_copyfiles
robocopy /? 1> nul 2> nul
IF NOT "%ERRORLEVEL%"=="9009" (
robocopy "%FROM%" "%TO%" %TOCOPY% /J /MT /XX
) ELSE (
IF NOT EXIST "%TO%" mkdir "%TO%"
call :_xcopy_hack %TOCOPY%
)
GOTO :EOF

REM We can't use a for..in..do loop since we have wildcards, so we make a call
REM to this with the files to copy.
:_xcopy_hack
SHIFT
IF "%0"=="" GOTO :EOF
xcopy "%FROM%\%0" "%TO%" /d /y
GOTO _xcopy_hack

ECHO OFF

REM Copyright (c) 2012 The Chromium Authors. All rights reserved.
REM Use of this source code is governed by a BSD-style license that can be
REM found in the LICENSE file.

REM Copies an installer and symbols from a build directory on a network share
REM into the directory \[out|build]\[Debug|Release] on the current drive.
REM
REM Usage:
REM   \\build.share\<path_to_checkout>\src\tools\win\copy-installer.bat
REM
REM By default, the script will copy the Debug build in the tree, falling back
REM to the Release build if one is not found.  Similarly, the ninja output
REM directory is preferred over the devenv output directory.  Specify
REM "out|build" and/or "Debug|Release" (case matters) on the command line in
REM any order to influence selection.  The defaults for location and build type
REM can also be overridden in a given build tree by creating a
REM "copy-installer.cfg" file alongside the .gclient file that sets the OUTPUT
REM and/or BUILDTYPE variables.
REM
REM Install Robocopy for superior performance on Windows XP if desired (it is
REM present by default on Vista+).

SETLOCAL

REM Get the path to the build tree's src directory.
CALL :_canonicalize "%~dp0..\.."
SET FROM=%RET%

REM Read local configuration (set OUTPUT and BUILDTYPE there).
IF EXIST "%FROM%\..\copy-installer.cfg" CALL "%FROM%\..\copy-installer.cfg"

REM Read OUTPUT and/or BUILDTYPE from command line.
FOR %%a IN (%1 %2) do (
IF "%%a"=="out" SET OUTPUT=out
IF "%%a"=="build" SET OUTPUT=build
IF "%%a"=="Debug" SET BUILDTYPE=Debug
IF "%%a"=="Release" SET BUILDTYPE=Release
)

CALL :_find_build
IF "%OUTPUT%%BUILDTYPE%"=="" (
ECHO No build found to copy.
EXIT 1
)

SET FROM=%FROM%\%OUTPUT%\%BUILDTYPE%
SET TO=\%OUTPUT%\%BUILDTYPE%

REM Figure out what files to copy based on the component type (shared/static).
IF EXIST "%FROM%\base.dll" (
SET TOCOPY=*.pdb setup.exe setup.exe.manifest chrome.7z *.dll
SET ARCHIVETODELETE=chrome.packed.7z
SET INSTALLER=setup.exe
) ELSE (
SET TOCOPY=*.pdb mini_installer.exe
SET INSTALLER=mini_installer.exe
)

CALL :_copyfiles

REM incremental_chrome_dll=1 puts chrome_dll.pdb into the "initial" dir.
IF EXIST "%FROM%\initial" (
SET FROM=%FROM%\initial
SET TOCOPY=*.pdb
CALL :_copyfiles
)

REM Keeping the old chrome.packed.7z around could cause the new setup.exe to
REM use it instead of the new chrome.7z, delete it to save developers from
REM debugging nightmares!
IF NOT "%ARCHIVETODELETE%"=="" (
IF EXIST "%TO%\%ARCHIVETODELETE%" (
ECHO Deleting old/deprecated %ARCHIVETODELETE%
del /Q "%TO%\%ARCHIVETODELETE%"
)
)

ECHO Ready to run/debug %TO%\%INSTALLER%.
GOTO :EOF

REM All labels henceforth are subroutines intended to be invoked by CALL.

REM Canonicalize the first argument, returning it in RET.
:_canonicalize
SET RET=%~f1
GOTO :EOF

REM Search for a mini_installer.exe in the candidate build outputs.
:_find_build
IF "%OUTPUT%"=="" (
SET OUTPUTS=out build
) ELSE (
SET OUTPUTS=%OUTPUT%
SET OUTPUT=
)

IF "%BUILDTYPE%"=="" (
SET BUILDTYPES=Debug Release
) ELSE (
SET BUILDTYPES=%BUILDTYPE%
SET BUILDTYPE=
)

FOR %%o IN (%OUTPUTS%) DO (
FOR %%f IN (%BUILDTYPES%) DO (
IF EXIST "%FROM%\%%o\%%f\mini_installer.exe" (
SET OUTPUT=%%o
SET BUILDTYPE=%%f
GOTO :EOF
)
)
)
GOTO :EOF

REM Branch to handle copying via robocopy (fast) or xcopy (slow).
:_copyfiles
robocopy /? 1> nul 2> nul
IF NOT "%ERRORLEVEL%"=="9009" (
robocopy "%FROM%" "%TO%" %TOCOPY% /MT /XX
) ELSE (
IF NOT EXIST "%TO%" mkdir "%TO%"
call :_xcopy_hack %TOCOPY%
)
GOTO :EOF

REM We can't use a for..in..do loop since we have wildcards, so we make a call
REM to this with the files to copy.
:_xcopy_hack
SHIFT
IF "%0"=="" GOTO :EOF
xcopy "%FROM%\%0" "%TO%" /d /y
GOTO _xcopy_hack

Allow copy-installer script to work on OS versions other than Win8.

(notry for line endings)

BUG=NONE
TEST=NONE
NOTRY=true

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

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


echo OFF

set GITHUB_USERNAME=StatisKit
set GITHUB_REPOSITORY=Misc
set DEFAULT_ANACONDA_BUILD_RECIPES=libboost python-scons python-gitpython
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge

if "%ANACONDA_CHANNELS%" == "" (
    set ANACONDA_CHANNELS=%DEFAULT_ANACONDA_CHANNELS%
) else (
    echo "Channels used: "%ANACONDA_CHANNELS%
)

set ANACONDA_CHANNEL_FLAGS=
for %%AnacondaChannelFlag in (%ANACONDA_CHANNELS%) do (
    set ANACONDA_CHANNEL_FLAGS=%ANACONDA_CHANNEL_FLAGS% -c %%AnacondaChannelFlag
)

if "%ANACONDA_BUILD_RECIPES%" == "" (
    set ANACONDA_BUILD_RECIPES=%DEFAULT_ANACONDA_BUILD_RECIPES%
) else (
    echo "Recipes to build: "%ANACONDA_BUILD_RECIPES%
)

echo ON

if not exist ..\..\%GITHUB_REPOSITORY% (
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    git clone https://github.com/%GITHUB_USERNAME%/%GITHUB_REPOSITORY%.git
    if %errorlevel% neq 0 (
        exit /b %errorlevel%
    )
    cd %GITHUB_REPOSITORY%/conda
)

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

for %%ANACONDA_BUILD_RECIPE in (%ANACONDA_BUILD_RECIPES%) do (
    conda build %%ANACONDA_BUILD_RECIPE %ANACONDA_CHANNEL_FLAGS% %ANACONDA_BUILD_FLAGS%
    if %errorlevel% neq 0 (
        if exist %GITHUB_REPOSITORY% (
            rmdir %GITHUB_REPOSITORY% /s /q
        )
        exit /b %errorlevel%
    )
)

if exist %GITHUB_REPOSITORY% (
    rmdir %GITHUB_REPOSITORY% /s /q
)

ECHO OFF

echo OFF

set GITHUB_USERNAME=StatisKit
set GITHUB_REPOSITORY=Misc
set DEFAULT_ANACONDA_BUILD_RECIPES=libboost python-scons python-gitpython
set DEFAULT_ANACONDA_CHANNELS=statiskit conda-forge

if "%ANACONDA_CHANNELS%" == "" (
    set ANACONDA_CHANNELS=%DEFAULT_ANACONDA_CHANNELS%
) else (
    echo "Channels used: "%ANACONDA_CHANNELS%
)

set ANACONDA_CHANNEL_FLAGS=
for %%i in (%ANACONDA_CHANNELS%) do (
    set ANACONDA_CHANNEL_FLAGS=%ANACONDA_CHANNEL_FLAGS% -c %%i
)

if "%ANACONDA_BUILD_RECIPES%" == "" (
    set ANACONDA_BUILD_RECIPES=%DEFAULT_ANACONDA_BUILD_RECIPES%
) else (
    echo "Recipes to build: "%ANACONDA_BUILD_RECIPES%
)

echo ON

if not exist ..\..\%GITHUB_REPOSITORY% (
    if exist %GITHUB_REPOSITORY% (
        rmdir %GITHUB_REPOSITORY% /s /q
    )
    git clone https://github.com/%GITHUB_USERNAME%/%GITHUB_REPOSITORY%.git
    if %errorlevel% neq 0 (
        exit /b %errorlevel%
    )
    cd %GITHUB_REPOSITORY%/conda
)

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

for %%ANACONDA_BUILD_RECIPE in (%ANACONDA_BUILD_RECIPES%) do (
    conda build %%ANACONDA_BUILD_RECIPE %ANACONDA_CHANNEL_FLAGS% %ANACONDA_BUILD_FLAGS%
    if %errorlevel% neq 0 (
        if exist %GITHUB_REPOSITORY% (
            rmdir %GITHUB_REPOSITORY% /s /q
        )
        exit /b %errorlevel%
    )
)

if exist %GITHUB_REPOSITORY% (
    rmdir %GITHUB_REPOSITORY% /s /q
)

ECHO OFF

Update bld.bat

Update bld.bat


@echo off

rem start the mysql server.
echo Starting MySQL...
start "Atlantis Dev MYSQL" /B mysqld --log_syslog=0
timeout 2 /nobreak

rem start the php server.
echo Starting PHP Web Server...
start "Atlantis Dev Web" /B php -S localhost:80 -t www > NUL 2> NUL
timeout 2 /nobreak

rem open the browser
start http://localhost

@echo off

rem start the mysql server.
echo Starting MySQL...
start "Atlantis Dev MYSQL" /B mysqld --log_syslog=0
timeout 3 /nobreak

rem start the php server.
echo Starting PHP Web Server...
start "Atlantis Dev Web" /B php -S localhost:80 -t www > NUL 2> NUL
timeout 3 /nobreak

rem open the browser
start http://localhost

bump dev server delay

bump dev server delay


@echo off

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

rem This is the entry point for running Spark submit. To avoid polluting the
rem environment, it just launches a new cmd to do the real work.

cmd /V /E /C spark-submit2.cmd %*

@echo off

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

rem This is the entry point for running Spark submit. To avoid polluting the
rem environment, it just launches a new cmd to do the real work.

cmd /V /E /C "%~dp0spark-submit2.cmd" %*

[SPARK-13592][WINDOWS] fix path of spark-submit2.cmd in spark-submit.cmd

## What changes were proposed in this pull request?

This patch fixes the problem that pyspark fails on Windows because pyspark can't find ```spark-submit2.cmd```.

## How was this patch tested?

manual tests:
  I ran ```bin\pyspark.cmd``` and checked if pyspark is launched correctly after this patch is applyed.

Author: Masayoshi TSUZUKI <tsudukim@oss.nttdata.co.jp>

Closes #11442 from tsudukim/feature/SPARK-13592.


for /r %%i in (*.b* ) do (
	echo rename "%%i" "%%~ni".b1 >> test.cmd
)
test.cmd

Create batchFileExtensionRename.cmd

Create batchFileExtensionRename.cmd

创建一个批处理更改文件后缀的小脚本.
'''
*.b* ==> *.b1
'''


Create stencyl-8gb.bat

Create stencyl-8gb.bat


set SELENIUM_SERVER=http://localhost:4444/wd/hub
set HOST=https://www.test1-cms.gb.travelsupermarket.com/
set PLATFORM=desktop

grunt e2e

set SELENIUM_SERVER=http://localhost:4444/wd/hub
set HOST=https://www.travelsupermarket.com/
set PLATFORM=desktop

grunt e2e

change url

change url


@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)

set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=statsmodels
set SPHINXOPTS=-j auto

set TOOLSPATH=../tools
set DATASETBUILD=dataset_rst.py
set NOTEBOOKBUILD=nbgenerate.py
set FOLDTOC=fold_toc.py

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

if "%1" == "html" (
    echo mkdir %BUILDDIR%\html\_static
    mkdir %BUILDDIR%\html\_static
	echo python %TOOLSPATH%/%NOTEBOOKBUILD% --parallel --report-errors --skip-existing
    python %TOOLSPATH%/%NOTEBOOKBUILD% --parallel --report-errors --skip-existing
    echo python %TOOLSPATH%/%DATASETBUILD%
    python %TOOLSPATH%/%DATASETBUILD%
)

echo %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
if errorlevel 1 exit /b 1

if "%1" == "html" (
    echo xcopy /s /y source\examples\notebooks\generated\*.html %BUILDDIR%\html\examples\notebooks\generated
    xcopy /s /y source\examples\notebooks\generated\*.html %BUILDDIR%\html\examples\notebooks\generated
	echo python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/index.html
	python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/index.html
	echo python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/examples/index.html ../_static
	python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/examples/index.html ../_static
	echo python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/dev/index.html ../_static
	python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/dev/index.html ../_static
    if NOT EXIST %BUILDDIR%/html/examples/notebooks/generated mkdir %BUILDDIR%\html\examples\notebooks\generated
)

goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd

@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
	set SPHINXBUILD=sphinx-build
)

set SOURCEDIR=source
set BUILDDIR=build
set SPHINXPROJ=statsmodels
set SPHINXOPTS=-j auto

set TOOLSPATH=../tools
set DATASETBUILD=dataset_rst.py
set NOTEBOOKBUILD=nbgenerate.py
set FOLDTOC=fold_toc.py

if "%1" == "" goto help

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
	echo.
	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
	echo.installed, then set the SPHINXBUILD environment variable to point
	echo.to the full path of the 'sphinx-build' executable. Alternatively you
	echo.may add the Sphinx directory to PATH.
	echo.
	echo.If you don't have Sphinx installed, grab it from
	echo.http://sphinx-doc.org/
	exit /b 1
)

if "%1" == "html" (
    echo mkdir %BUILDDIR%\html\_static
    mkdir %BUILDDIR%\html\_static
	echo python %TOOLSPATH%/%NOTEBOOKBUILD% --parallel --report-errors --skip-existing
    python %TOOLSPATH%/%NOTEBOOKBUILD% --parallel --report-errors --skip-existing
    echo python %TOOLSPATH%/%DATASETBUILD%
    python %TOOLSPATH%/%DATASETBUILD%
)

echo %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
if errorlevel 1 exit /b 1

if "%1" == "html" (
    echo xcopy /s /y source\examples\notebooks\generated\*.html %BUILDDIR%\html\examples\notebooks\generated\*.html
    xcopy /s /y source\examples\notebooks\generated\*.html %BUILDDIR%\html\examples\notebooks\generated\*.html
	echo python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/index.html
	python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/index.html
	echo python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/examples/index.html ../_static
	python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/examples/index.html ../_static
	echo python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/dev/index.html ../_static
	python %TOOLSPATH%/%FOLDTOC% %BUILDDIR%/html/dev/index.html ../_static
    if NOT EXIST %BUILDDIR%/html/examples/notebooks/generated mkdir %BUILDDIR%\html\examples\notebooks\generated
)

goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%

:end
popd

Fix make.bat [skip ci]

MAINT: Fix make.bat [skip ci]

Fix xopy on make.bat to run without prompt


rem Run XBRL 2.1 Conformance Suite tests

@set TESTCASESROOT=C:\Users\Herm Fischer\Documents\mvsl\projects\XBRL.org\conformance\trunk

rem work off local SVN checked out files
@set TESTCASESINDEXFILE=%TESTCASESROOT%\xbrl.xml

rem work off published zip test suite
rem @set TESTCASESINDEXFILE=http://www.xbrl.org/2008/XBRL-CONF-CR4-2008-07-02.zip/xbrl.xml

@set OUTPUTLOGFILE=c:\temp\XBRL21-test-log.txt

@set OUTPUTCSVFILE=c:\temp\XBRL21-test-report.csv

@set ARELLEDIR=C:\Users\Herm Fischer\Documents\mvsl\projects\Arelle\ArelleProject\arelle

@set PYTHONDIR=c:\python31
@set PYTHONPATH=..

"%PYTHONDIR%\python" -marelle.CntlrCmdLine --file "%TESTCASESINDEXFILE%" --validate --calcDecimals --csvTestReport "%OUTPUTCSVFILE%" 1>  "%OUTPUTLOGFILE%" 2>&1

rem Run XBRL 2.1 Conformance Suite tests

@set ARELLEDIR=C:\Users\Herm Fischer\Documents\mvsl\projects\Arelle\ArelleProject\arelle

@set PYTHONDIR=c:\python31
@set PYTHONPATH=..

rem work off local SVN checked out files (inferring decimals)
@set TESTCASESROOT=C:\Users\Herm Fischer\Documents\mvsl\projects\XBRL.org\conformance\trunk
@set TESTCASESINDEXFILE=%TESTCASESROOT%\xbrl.xml

@set OUTPUTLOGFILE=c:\temp\XBRL21-current-log.txt
@set OUTPUTCSVFILE=c:\temp\XBRL21-current-report.csv

"%PYTHONDIR%\python" -marelle.CntlrCmdLine --file "%TESTCASESINDEXFILE%" --validate --calcDecimals --csvTestReport "%OUTPUTCSVFILE%" 1>  "%OUTPUTLOGFILE%" 2>&1

rem work off published CR4 test suite (inferring precision)
@set TESTCASESINDEXFILE=http://www.xbrl.org/2008/XBRL-CONF-CR4-2008-07-02.zip/xbrl.xml

@set OUTPUTLOGFILE=c:\temp\XBRL21-CR4-log.txt
@set OUTPUTCSVFILE=c:\temp\XBRL21-CR4-report.csv

"%PYTHONDIR%\python" -marelle.CntlrCmdLine --file "%TESTCASESINDEXFILE%" --validate --calcPrecision --csvTestReport "%OUTPUTCSVFILE%" 1>  "%OUTPUTLOGFILE%" 2>&1

set XBRL21 script to run both public CR suite and latest SVN suite


if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi

if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels
goto :done

:vmware

if exist "C:\Users\vagrant\windows.iso" (
    move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\windows.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/11.1.2/2780323/windows/packages/tools-windows-9.9.3.exe.tar', 'C:\Windows\Temp\vmware-tools.exe.tar')" <NUL
    cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.exe.tar -oC:\Windows\Temp"
    FOR /r "C:\Windows\Temp" %%a in (tools-windows-*.exe) DO REN "%%~a" "tools-windows.exe"
    cmd /c C:\Windows\Temp\tools-windows
    move /Y "C:\Program Files (x86)\VMware\tools-windows\windows.iso" C:\Windows\Temp
    rd /S /Q "C:\Program Files (x86)\VMWare"
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"

goto :done

:virtualbox

:: There needs to be Oracle CA (Certificate Authority) certificates installed in order
:: to prevent user intervention popups which will undermine a silent installation.
cmd /c certutil -addstore -f "TrustedPublisher" A:\oracle-cert.cer

move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
goto :done

:parallels
if exist "C:\Users\vagrant\prl-tools-win.iso" (
	move /Y C:\Users\vagrant\prl-tools-win.iso C:\Windows\Temp
	cmd /C "C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels
	cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent
	rd /S /Q "c:\Windows\Temp\parallels"
)

:done
msiexec /qb /x C:\Windows\Temp\7z920-x64.msi

if not exist "C:\Windows\Temp\7z920-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://www.7-zip.org/a/7z920-x64.msi', 'C:\Windows\Temp\7z920-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z920-x64.msi

if "%PACKER_BUILDER_TYPE%" equ "vmware-iso" goto :vmware
if "%PACKER_BUILDER_TYPE%" equ "virtualbox-iso" goto :virtualbox
if "%PACKER_BUILDER_TYPE%" equ "parallels-iso" goto :parallels
goto :done

:vmware

if exist "C:\Users\vagrant\windows.iso" (
    move /Y C:\Users\vagrant\windows.iso C:\Windows\Temp
)

if not exist "C:\Windows\Temp\windows.iso" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('http://softwareupdate.vmware.com/cds/vmw-desktop/ws/12.0.0/2985596/windows/packages/tools-windows.tar', 'C:\Windows\Temp\vmware-tools.tar')" <NUL
    cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\vmware-tools.tar -oC:\Windows\Temp"
    FOR /r "C:\Windows\Temp" %%a in (VMware-tools-windows-*.iso) DO REN "%%~a" "windows.iso"
    rd /S /Q "C:\Program Files (x86)\VMWare"
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x "C:\Windows\Temp\windows.iso" -oC:\Windows\Temp\VMWare"
cmd /c C:\Windows\Temp\VMWare\setup.exe /S /v"/qn REBOOT=R\"

goto :done

:virtualbox

:: There needs to be Oracle CA (Certificate Authority) certificates installed in order
:: to prevent user intervention popups which will undermine a silent installation.
cmd /c certutil -addstore -f "TrustedPublisher" A:\oracle-cert.cer

move /Y C:\Users\vagrant\VBoxGuestAdditions.iso C:\Windows\Temp
cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
goto :done

:parallels
if exist "C:\Users\vagrant\prl-tools-win.iso" (
	move /Y C:\Users\vagrant\prl-tools-win.iso C:\Windows\Temp
	cmd /C "C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\prl-tools-win.iso -oC:\Windows\Temp\parallels
	cmd /C C:\Windows\Temp\parallels\PTAgent.exe /install_silent
	rd /S /Q "c:\Windows\Temp\parallels"
)

:done
msiexec /qb /x C:\Windows\Temp\7z920-x64.msi

Install VMware Tools 10.0.0

Install VMware Tools 10.0.0


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.6
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.6
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: Post deployment stub
IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
IF !ERRORLEVEL! NEQ 0 goto error

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Install devDependencies

Install devDependencies


@echo off

rem Figure out which compiler the user wants to create Makefiles for
if "%1" == "vc" goto build_makefiles
if "%1" == "bc" goto build_makefiles
if "%1" == "mingw" goto build_makefiles
goto usage

rem Set up common headers for new Makefiles
:build_makefiles
set head1=## DO NOT EDIT.  Created from Makefile.%1 and Makefile.base.
set head2=## Edit those files instead, then type 'make' to rebuild
set head3=## this Makefile.

rem Decide how to build subordinate make.bat files
if "%1" == "vc" goto vc_make
goto generic_make
:vc_make
echo @nmake /nologo ^%* > lib\make.bat
echo @nmake /nologo ^%* > examples\make.bat
goto make_bat_created
:generic_make
echo @make.exe ^%* > lib\make.bat
echo @make.exe ^%* > examples\make.bat

:make_bat_created
rem Create library Makefile
echo %head1% > lib\Makefile
echo %head2% >> lib\Makefile
echo %head3% >> lib\Makefile
echo. >> lib\Makefile
echo. >> lib\Makefile
type lib\Makefile.%1 >> lib\Makefile
type lib\Makefile.base >> lib\Makefile

rem Create example programs Makefile
echo %head1% > examples\Makefile
echo %head2% >> examples\Makefile
echo %head3% >> examples\Makefile
echo. >> examples\Makefile
echo. >> examples\Makefile
type examples\Makefile.%1 >> examples\Makefile
type examples\Makefile.base >> examples\Makefile
shift
call make.bat
goto end

rem Display usage message
:usage
echo usage: makemake {vc, bc, mingw} [args]
echo.
echo     You must give one of the compiler parameters:
echo.
echo         vc: Visual C++ command-line compiler (cl) and nmake
echo         bc: Borland C++ command-line compiler (bcc32) and Borland make
echo         mingw: MinGW GCC (g++) and GNU make
echo.
goto end

:end

@echo off

rem Figure out which compiler the user wants to create Makefiles for
if "%1" == "vc" goto build_makefiles
if "%1" == "bc" goto build_makefiles
if "%1" == "mingw" goto build_makefiles
goto usage

rem Set up common headers for new Makefiles
:build_makefiles
set head1=## DO NOT EDIT.  Created from Makefile.%1 and Makefile.base.
set head2=## Edit those files instead, then type 'makemake %1' to rebuild
set head3=## this Makefile.

rem Decide how to build subordinate make.bat files
if "%1" == "vc" goto vc_make
goto generic_make
:vc_make
echo @nmake /nologo ^%* > lib\make.bat
echo @nmake /nologo ^%* > examples\make.bat
goto make_bat_created
:generic_make
echo @make.exe ^%* > lib\make.bat
echo @make.exe ^%* > examples\make.bat

:make_bat_created
rem Create library Makefile
echo %head1% > lib\Makefile
echo %head2% >> lib\Makefile
echo %head3% >> lib\Makefile
echo. >> lib\Makefile
echo. >> lib\Makefile
type lib\Makefile.%1 >> lib\Makefile
type lib\Makefile.base >> lib\Makefile

rem Create example programs Makefile
echo %head1% > examples\Makefile
echo %head2% >> examples\Makefile
echo %head3% >> examples\Makefile
echo. >> examples\Makefile
echo. >> examples\Makefile
type examples\Makefile.%1 >> examples\Makefile
type examples\Makefile.base >> examples\Makefile
shift
call make.bat
goto end

rem Display usage message
:usage
echo usage: makemake {vc, bc, mingw} [args]
echo.
echo     You must give one of the compiler parameters:
echo.
echo         vc: Visual C++ command-line compiler (cl) and nmake
echo         bc: Borland C++ command-line compiler (bcc32) and Borland make
echo         mingw: MinGW GCC (g++) and GNU make
echo.
goto end

:end

Comment fix

Comment fix


@echo off
del *.sdf
del /s *.aps
del /a:h *.suo
rmdir /s /q html
rmdir /s /q .vs
rmdir /s /q ipch
rmdir /s /q x64
rmdir /s /q Debug
rmdir /s /q Release
rmdir /s /q HyperPlatform\x64
rmdir /s /q HyperPlatform\Debug
rmdir /s /q HyperPlatform\Release
pause

@echo off
del *.sdf
del *.VC.db
del /s *.aps
del /a:h *.suo
rmdir /s /q .vs
rmdir /s /q ipch
rmdir /s /q x64
rmdir /s /q Debug
rmdir /s /q Release
rmdir /s /q HyperPlatform\x64
rmdir /s /q HyperPlatform\Debug
rmdir /s /q HyperPlatform\Release
rmdir /s /q doxygen
pause

update clean.bat

update clean.bat


: call jekyll s --watch --unpublished --future --drafts

: using windows container
: docker run -d --name column3 --platform=linux -v %CD%:/srv/jekyll -p 4001:4000 jekyll/jekyll:3.8.1 jekyll s --watch --drafts
: docker logs --tail 100 -t -f column3

: docker run -d --name columns -v %CD%:/srv/jekyll -p 4000:4000 jekyll/jekyll:2.4.0

docker run --name columns -d --platform=linux -v %CD%:/srv/jekyll -p 4000:4000 jekyll/jekyll jekyll s --watch --drafts --incremental  --destination /tmp --unpublished

: call jekyll s --watch --unpublished --future --drafts

: using windows container
: docker run -d --name column3 --platform=linux -v %CD%:/srv/jekyll -p 4001:4000 jekyll/jekyll:3.8.1 jekyll s --watch --drafts
: docker logs --tail 100 -t -f column3

: docker run -d --name columns -v %CD%:/srv/jekyll -p 4000:4000 jekyll/jekyll:2.4.0

::::: docker run --name columns -d --platform=linux -v %CD%:/srv/jekyll -p 4000:4000 jekyll/jekyll jekyll s --watch --drafts --incremental  --destination /tmp --unpublished

docker run --name columns -d -p 4000:4000 --entrypoint jekyll andrew0928/columns:20180723-jekyll-3.8.1 s --watch --drafts --incremental --source /home/source --destination /tmp --unpublished

update script

update script


Add a batch file

Add a batch file


@ECHO OFF

SET root=%~dp0
CD /D %root%

CLS
ECHO 1.Download Latest Build
ECHO 2.Download Stable Build
ECHO 3.Run NadekoBot (normally)
ECHO 4.Run NadekoBot with Auto Restart (check "if" nadeko is working properly, before using this)
ECHO 5.To exit
ECHO.

CHOICE /C 12345 /M "Enter your choice:"

:: Note - list ERRORLEVELS in decreasing order
IF ERRORLEVEL 5 GOTO exit
IF ERRORLEVEL 4 GOTO autorestart
IF ERRORLEVEL 3 GOTO runnormal
IF ERRORLEVEL 2 GOTO stable
IF ERRORLEVEL 1 GOTO latest

:latest
ECHO Make sure you are running it on Windows 8 or later.
timeout /t 10
ECHO Downloading NadekoBot (Latest), please wait...
SET "FILENAME=%~dp0\Latest.bat"
bitsadmin.exe /transfer "Downloading Nadeko (Latest)" /priority high https://github.com/Kwoth/NadekoBot/raw/master/scripts/Latest.bat "%FILENAME%"
ECHO NadekoBot Dev Build (latest) downloaded.
timeout /t 5
CALL Latest.bat
GOTO End

:stable
ECHO Make sure you are running it on Windows 8 or later.
timeout /t 10
ECHO Downloading NadekoBot (Stable), please wait...
SET "FILENAME=%~dp0\Stable.bat"
bitsadmin.exe /transfer "Downloading Nadeko (Stable)" /priority high https://github.com/Kwoth/NadekoBot/raw/master/scripts/Stable.bat "%FILENAME%"
ECHO NadekoBot Stable build downloaded.
timeout /t 5
CALL Stable.bat
GOTO End

:runnormal
ECHO Downloading NadekoBot Run, please wait...
SET "FILENAME=%~dp0\NadekoRunNormal.bat"
bitsadmin.exe /transfer "Downloading Nadeko Run (normal)" /priority high https://github.com/Kwoth/NadekoBot/raw/master/scripts/NadekoRun.bat "%FILENAME%"
ECHO.
ECHO Running Nadeko Normally, "if" you are running this to check Nadeko, use ".die" command on discord to stop Nadeko.
timeout /t 10
CALL NadekoRunNormal.bat
GOTO End

:autorestart
ECHO Downloading NadekoBot Auto Run, please wait...
SET "FILENAME=%~dp0\NadekoAutoRun.bat"
bitsadmin.exe /transfer "Downloading Nadeko Auto-Run" /priority high https://github.com/Kwoth/NadekoBot/raw/master/scripts/NadekoAutoRun.bat "%FILENAME%"
ECHO.
ECHO Running Nadeko with Auto Restart, you will have to close the session to stop the auto restart.
timeout /t 15
CALL NadekoAutoRun.bat
GOTO End

:exit
exit

:End
pause
CALL NadekoInstaller.bat

Revert "Revert "Testing!""

Revert "Revert "Testing!""

This reverts commit e7e47df7b2f9297e9ddcabda6855c51be55a15c5.


@echo off

SETLOCAL enabledelayedexpansion

IF DEFINED JAVA_HOME (
  set JAVA=%JAVA_HOME%\bin\java.exe
) ELSE (
  FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I
)
IF NOT EXIST "%JAVA%" (
  ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2
  EXIT /B 1
)

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI

TITLE Elasticsearch Plugin Manager ${project.version}

SET properties=
SET args=

:loop
SET "current=%~1"
SHIFT
IF "x!current!" == "x" GOTO breakloop

IF "!current:~0,2%!" == "-D" (
    ECHO "!current!" | FINDSTR /C:"=">nul && (
         :: current matches -D*=*
         IF "x!properties!" NEQ "x" (
             SET properties=!properties! "!current!"
         ) ELSE (
             SET properties="!current!"
         )
    ) || (
         :: current matches -D*
         IF "x!properties!" NEQ "x" (
            SET properties=!properties! "!current!=%~1"
         ) ELSE (
            SET properties="!current!=%~1"
         )
         SHIFT
    )
) ELSE (
    :: current matches *
    IF "x!args!" NEQ "x" (
        SET args=!args! "!current!"
    ) ELSE (
        SET args="!current!"
    )
)

GOTO loop
:breakloop

SET HOSTNAME=%COMPUTERNAME%

"%JAVA%" %ES_JAVA_OPTS% -Des.path.home="%ES_HOME%" !properties! -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args!

ENDLOCAL

@echo off

SETLOCAL enabledelayedexpansion

IF DEFINED JAVA_HOME (
  set JAVA=%JAVA_HOME%\bin\java.exe
) ELSE (
  FOR %%I IN (java.exe) DO set JAVA=%%~$PATH:I
)
IF NOT EXIST "%JAVA%" (
  ECHO Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME 1>&2
  EXIT /B 1
)

set SCRIPT_DIR=%~dp0
for %%I in ("%SCRIPT_DIR%..") do set ES_HOME=%%~dpfI

TITLE Elasticsearch Plugin Manager ${project.version}

SET args=%*
SET HOSTNAME=%COMPUTERNAME%

"%JAVA%" %ES_JAVA_OPTS% -Des.path.home="%ES_HOME%" -cp "%ES_HOME%/lib/*;" "org.elasticsearch.plugins.PluginCli" !args!

ENDLOCAL

Remove -D handling in args for windows (#20378)

-D parameters used to be allowed when starting elasticsearch scripts.
However, this was removed in #18207, but the elasticsearch-plugin.bat script
was forgotten. This change removes the -D handling.


fsi^
  --lib:NHol^
  --use:system.fsx^
  --use:lib.fs^
  --use:fusion.fs^
  --use:basics.fs^
  --use:nets.fs^
  --use:printer.fs^
  --use:preterm.fs^
  --use:parser.fs^
  --use:equal.fs^
  --use:bool.fs^
  --use:drule.fs^
  --use:tactics.fs^
  --use:itab.fs^
  --use:simp.fs^
  --use:theorems.fs^
  --use:ind_defs.fs^
  --use:class.fs^
  --use:trivia.fs^
  --use:canon.fs^
  --use:meson.fs^
  --use:quot.fs^
  --use:pair.fs^
  --use:nums.fs^
  --use:recursion.fs^
  --use:arith.fs^
  --use:wf.fs^
  --use:calc_num.fs^
  --use:normalizer.fs^
  --use:grober.fs^
  --use:ind_types.fs^
  --use:lists.fs^
  --use:realax.fs^
  --use:calc_int.fs^
  --use:realarith.fs^
  --use:real.fs^
  --use:calc_rat.fs^
  --use:int.fs^
  --use:sets.fs^
  --use:iterate.fs^
  --use:cart.fs^
  --use:define.fs^
  --use:help.fs^
  --use:database.fs

::"C:\Program Files (x86)\Microsoft SDKs\F#\3.0\Framework\v4.0\fsi.exe"
fsi^
  --lib:NHol^
  --use:system.fsx^
  --use:lib.fs^
  --use:fusion.fs^
  --use:basics.fs^
  --use:nets.fs^
  --use:printer.fs^
  --use:preterm.fs^
  --use:parser.fs^
  --use:equal.fs^
  --use:bool.fs^
  --use:drule.fs^
  --use:tactics.fs^
  --use:itab.fs^
  --use:simp.fs^
  --use:theorems.fs^
  --use:ind_defs.fs^
  --use:class.fs^
  --use:trivia.fs^
  --use:canon.fs^
  --use:meson.fs^
  --use:quot.fs^
  --use:pair.fs^
  --use:nums.fs^
  --use:recursion.fs^
  --use:arith.fs^
  --use:wf.fs^
  --use:calc_num.fs^
  --use:normalizer.fs^
  --use:grobner.fs^
  --use:ind_types.fs^
  --use:lists.fs^
  --use:realax.fs^
  --use:calc_int.fs^
  --use:realarith.fs^
  --use:real.fs^
  --use:calc_rat.fs^
  --use:int.fs^
  --use:sets.fs^
  --use:iterate.fs^
  --use:cart.fs^
  --use:define.fs^
  --use:help.fs^
  --use:database.fs

Fix a wrong module name in hol.bat script


set ICB_PATH=%~dp0
python "%ICB_PATH%icb.py" %*

change in bat file

change in bat file


@echo off

setlocal
%~d0
cd %~p0
call _project.bat

:: tilde to remove double quotation
set FIRST_ARG=%~1
if "%FIRST_ARG%"=="" set FIRST_ARG=""
set SECOND_ARG=%2
if "%SECOND_ARG%"=="" set SECOND_ARG=""

call %DBFLUTE_HOME%\etc\cmd\_df-manage.cmd %MY_PROPERTIES_PATH% "%FIRST_ARG%" %SECOND_ARG%

if "%pause_at_end%"=="y" (
  pause
)

test for Windows

test for Windows


Add Build.bat for local build

Add Build.bat for local build


@echo off
if "%1"=="" goto none
goto %1

:benchmark
ghc --make Main -odir obj\o -hidir obj\o -O -o tagsoup_o.exe
tagsoup_o.exe time
tagsoup_o.exe timefile ketil.xml
goto end

:profile
ghc --make Main -odir obj\p -hidir obj\p -O -o -prof -auto-all tagsoup_p.exe
del tagsoup_p_*.prof
tagsoup_p.exe time +RTS -p
ren tagsoup_p.prof tagsoup_p_time.prof
tagsoup_p.exe timefile ketil.xml +RTS -p
ren tagsoup_p.prof tagsoup_p_ketil.prof
goto end

:dump
ghc --make Main -odir obj\o -hidir obj\o -O -o tagsoup_o.exe
call %0 core Text\StringLike.hs stringlike
call %0 core Text\HTML\TagSoup\Parser2.hs parser
call %0 core Text\ParserCombinators\LazyParse.hs lazyparse
goto end

:core
shift
copy %1 obj\o\%1
pushd obj\o
ghc %1 -ddump-simpl -c > ..\..\%2.core
popd
goto end

:none
echo Enter command, try one of:
echo benchmark, profile, dump
goto end

:end

@echo off
if "%1"=="" goto none
goto %1

:benchmark
ghc --make Main -odir obj\o -hidir obj\o -O -o tagsoup_o.exe
tagsoup_o.exe bench
tagsoup_o.exe benchfile ketil.xml
goto end

:profile
ghc --make Main -odir obj\p -hidir obj\p -O -o -prof -auto-all tagsoup_p.exe
del tagsoup_p_*.prof
tagsoup_p.exe bench +RTS -p
ren tagsoup_p.prof tagsoup_p_time.prof
tagsoup_p.exe benchfile ketil.xml +RTS -p
ren tagsoup_p.prof tagsoup_p_ketil.prof
goto end

:dump
ghc --make Main -odir obj\o -hidir obj\o -O -o tagsoup_o.exe
call %0 core Text\StringLike.hs stringlike
call %0 core Text\HTML\TagSoup\Parser2.hs parser
call %0 core Text\ParserCombinators\LazyParse.hs lazyparse
goto end

:core
shift
copy %1 obj\o\%1
pushd obj\o
ghc %1 -ddump-simpl -c > ..\..\%2.core
popd
goto end

:none
echo Enter command, try one of:
echo benchmark, profile, dump
goto end

:end

Fix up the cmds benchmark stuff

Fix up the cmds benchmark stuff