@echo off

IF "%1"=="" goto Usage
SET GOTVERSION=false
IF NOT "%1"=="2013OGL" SET GOTVERSION=true
IF NOT "%1"=="201364" SET GOTVERSION=true
IF NOT "%1"=="2013OGL64" SET GOTVERSION=true

IF "%GOTVERSION%"=="false" GOTO Usage

SET VSVERSION=%1
REM Default Qt dir
SET "BASE_DIR_QT=C:\Qt\5.4"

IF "%VSVERSION%"=="2013OGL" set QT_LIBS="%BASE_DIR_QT%\msvc2013_opengl"
IF "%VSVERSION%"=="2013OGL64" set QT_LIBS=%BASE_DIR_QT%"\msvc2013_64_opengl"
IF "%VSVERSION%"=="201364" set QT_LIBS=%BASE_DIR_QT%"\msvc2013_64"

REM Openssl lib (default is 32 bit, change for anything else if needed)
IF "%VSVERSION%"=="2013OGL" SET "OPENSSL_PATH=C:\OpenSSL-Win32"
IF "%VSVERSION%"=="2013OGL64" SET "OPENSSL_PATH=C:\OpenSSL-Win64"
IF "%VSVERSION%"=="201364" SET "OPENSSL_PATH=C:\OpenSSL-Win64"

REM needed to copy the necessary Angle libs
SET ANGLEUSE=false
IF "%VSVERSION%"=="201364" SET ANGLEUSE=true

IF NOT EXIST %QT_LIBS% GOTO Nonexistentdir

REM
REM copying binaries to the package directory
REM
@setlocal enableextensions enabledelayedexpansion

echo [1] Copying pip3line binaries
md package > nul 2> nul
cd package
copy "..\lib\transform.dll"
copy "..\bin\pip3line.exe"
copy "..\bin\pip3linecmd.exe"
md plugins > nul 2> nul
copy "..\bin\plugins\*.dll" ".\plugins"

REM QT libraries
echo [2] Copying QT libraries
copy %QT_LIBS%"\bin\Qt5Core.dll"
copy %QT_LIBS%"\bin\Qt5Gui.dll"
copy %QT_LIBS%"\bin\Qt5Network.dll"
copy %QT_LIBS%"\bin\Qt5Svg.dll"
copy %QT_LIBS%"\bin\Qt5Widgets.dll"
copy %QT_LIBS%"\bin\Qt5XmlPatterns.dll"
copy %QT_LIBS%"\bin\Qt5Concurrent.dll"
copy %QT_LIBS%"\bin\icudt53.dll"
copy %QT_LIBS%"\bin\icuin53.dll"
copy %QT_LIBS%"\bin\icuuc53.dll"

echo [3] Copying QT mandatory plugins
REM QT mandatory plug-ins, if missing the application won't even start
md platforms
copy %QT_LIBS%"\plugins\platforms\qminimal.dll" ".\platforms"
copy %QT_LIBS%"\plugins\platforms\qwindows.dll" ".\platforms"

echo [4] Copying distorm lib (if present)
REM Distorm3 lib
SET "DISTORM_PATH=..\..\distorm"
IF NOT EXIST %DISTORM_PATH% GOTO Nonexistentdistorm
copy %DISTORM_PATH%"\distorm3.dll"

echo [5] Copying OpenSSL lib (if present)
IF NOT EXIST %OPENSSL_PATH% GOTO NonexistentOpenssl
copy %OPENSSL_PATH%"\bin\ssleay32.dll"
copy %OPENSSL_PATH%"\bin\libeay32.dll"

REM if you are using the ANGLE version of the Qt windows binaries
REM you need to copy a couple of more files
IF "%ANGLEUSE%"=="false" GOTO EndInstall
echo [6] Copying ANGLE Libraries
copy %QT_LIBS%"\bin\d3dcompiler_47.dll"
copy %QT_LIBS%"\bin\libEGL.dll"
copy %QT_LIBS%"\bin\libGLESv2.dll"

echo [6] Copying Misc. files
copy ..\vs_redist.README

%QT_LIBS%/bin/windeployqt --release pip3line.exe

:EndInstall
cd ..
GOTO End

:Usage
ECHO.
ECHO Need Qt Visual Studio version, i.e.
ECHO %~n0.bat 2013OGL
ECHO
ECHO Available versions :
ECHO     2013OGL64 : VS 2013 amd64 with OpenGL
ECHO     201364    : VS 2013 amd64 (using ANGLE)
ECHO     2013OGL   : VS 2013 x86 with OpenGL
GOTO End

:Nonexistentdir
ECHO.
ECHO The directory %QT_LIBS% does not exist
GOTO End

:Nonexistentdistorm
ECHO The directory %DISTORM_PATH% not found, skipping.
GOTO End

:NonexistentOpenssl
ECHO The directory %OPENSSL_PATH% not found, skipping.
GOTO End

:End
ENDLOCAL

@echo off

IF "%1"=="" goto Usage
SET GOTVERSION=false
IF NOT "%1"=="2013OGL" SET GOTVERSION=true
IF NOT "%1"=="201364" SET GOTVERSION=true
IF NOT "%1"=="2013OGL64" SET GOTVERSION=true

IF "%GOTVERSION%"=="false" GOTO Usage

SET VSVERSION=%1
REM Default Qt dir
SET "BASE_DIR_QT=C:\Qt\5.4"

IF "%VSVERSION%"=="2013OGL" set QT_LIBS="%BASE_DIR_QT%\msvc2013_opengl"
IF "%VSVERSION%"=="2013OGL64" set QT_LIBS=%BASE_DIR_QT%"\msvc2013_64_opengl"
IF "%VSVERSION%"=="201364" set QT_LIBS=%BASE_DIR_QT%"\msvc2013_64"

REM Openssl lib (default is 32 bit, change for anything else if needed)
IF "%VSVERSION%"=="2013OGL" SET "OPENSSL_PATH=C:\OpenSSL-Win32"
IF "%VSVERSION%"=="2013OGL64" SET "OPENSSL_PATH=C:\OpenSSL-Win64"
IF "%VSVERSION%"=="201364" SET "OPENSSL_PATH=C:\OpenSSL-Win64"

REM needed to copy the necessary Angle libs
SET ANGLEUSE=false
IF "%VSVERSION%"=="201364" SET ANGLEUSE=true

IF NOT EXIST %QT_LIBS% GOTO Nonexistentdir

REM
REM copying binaries to the package directory
REM
@setlocal enableextensions enabledelayedexpansion

echo [1] Copying pip3line binaries
md package > nul 2> nul
cd package
copy "..\lib\transform.dll"
copy "..\bin\pip3line.exe"
copy "..\bin\pip3linecmd.exe"
md plugins > nul 2> nul
copy "..\bin\plugins\*.dll" ".\plugins"

REM QT libraries
echo [2] Copying QT libraries
copy %QT_LIBS%"\bin\Qt5Core.dll"
copy %QT_LIBS%"\bin\Qt5Gui.dll"
copy %QT_LIBS%"\bin\Qt5Network.dll"
copy %QT_LIBS%"\bin\Qt5Svg.dll"
copy %QT_LIBS%"\bin\Qt5Widgets.dll"
copy %QT_LIBS%"\bin\Qt5XmlPatterns.dll"
copy %QT_LIBS%"\bin\Qt5Concurrent.dll"
copy %QT_LIBS%"\bin\icudt53.dll"
copy %QT_LIBS%"\bin\icuin53.dll"
copy %QT_LIBS%"\bin\icuuc53.dll"

echo [3] Copying QT mandatory plugins
REM QT mandatory plug-ins, if missing the application won't even start
md platforms
copy %QT_LIBS%"\plugins\platforms\qminimal.dll" ".\platforms"
copy %QT_LIBS%"\plugins\platforms\qwindows.dll" ".\platforms"

echo [4] Copying distorm lib (if present)
REM Distorm3 lib
SET "DISTORM_PATH=..\..\distorm"
IF NOT EXIST %DISTORM_PATH% GOTO Nonexistentdistorm
copy %DISTORM_PATH%"\distorm3.dll"

echo [5] Copying OpenSSL lib (if present)
IF NOT EXIST %OPENSSL_PATH% GOTO NonexistentOpenssl
copy %OPENSSL_PATH%"\bin\ssleay32.dll"
copy %OPENSSL_PATH%"\bin\libeay32.dll"

REM if you are using the ANGLE version of the Qt windows binaries
REM you need to copy a couple of more files
IF "%ANGLEUSE%"=="false" GOTO EndInstall
echo [6] Copying ANGLE Libraries
copy %QT_LIBS%"\bin\d3dcompiler_47.dll"
copy %QT_LIBS%"\bin\libEGL.dll"
copy %QT_LIBS%"\bin\libGLESv2.dll"

:EndInstall
%QT_LIBS%/bin/windeployqt --release pip3line.exe
cd ..
GOTO End

:Usage
ECHO.
ECHO Need Qt Visual Studio version, i.e.
ECHO %~n0.bat 2013OGL
ECHO
ECHO Available versions :
ECHO     2013OGL64 : VS 2013 amd64 with OpenGL
ECHO     201364    : VS 2013 amd64 (using ANGLE)
ECHO     2013OGL   : VS 2013 x86 with OpenGL
GOTO End

:Nonexistentdir
ECHO.
ECHO The directory %QT_LIBS% does not exist
GOTO End

:Nonexistentdistorm
ECHO The directory %DISTORM_PATH% not found, skipping.
GOTO End

:NonexistentOpenssl
ECHO The directory %OPENSSL_PATH% not found, skipping.
GOTO End

:End
ENDLOCAL

Fix windows packager script

Fix windows packager script


:: Copyright 2015 Viktor Szakats <https://github.com/vszakats>
:: See LICENSE.md

@echo off

set _NAM=%~n0
set _NAM=%_NAM:~3%
set _VER=%1
set _CPU=%2

setlocal
pushd "%_NAM%"

:: Build

sh --version

del /s *.o *.a *.lo *.la *.lai *.Plo >> nul 2>&1
sh -x "./configure" 1> 1.txt 2> 2.txt
mingw32-make MAKE=C:\w\mingw64\bin\mingw32-make

:: Make steps for determinism

if exist .libs\*.a strip -p --enable-deterministic-archives -g .libs\*.a

touch -c .libs/*.a -r Changes

popd
endlocal

:: Copyright 2015 Viktor Szakats <https://github.com/vszakats>
:: See LICENSE.md

@echo off

set _NAM=%~n0
set _NAM=%_NAM:~3%
set _VER=%1
set _CPU=%2

setlocal
pushd "%_NAM%"

:: Build

sh --version

del /s *.o *.a *.lo *.la *.lai *.Plo >> nul 2>&1
sh --debug --verbose -x "./configure"
mingw32-make MAKE=C:\w\mingw64\bin\mingw32-make

:: Make steps for determinism

if exist .libs\*.a strip -p --enable-deterministic-archives -g .libs\*.a

touch -c .libs/*.a -r Changes

popd
endlocal

debug more

debug more


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windowz variants

if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*
goto execute

:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

Convert line endings from CRLF to LF.

Convert line endings from CRLF to LF.


regsvr32  %~dp0\audio_sniffer.dll /s
regsvr32 %~dp0audio_sniffer.dll /s
regsvr32 audio_sniffer.dll /s

Update register_run_as_admin.bat

Update register_run_as_admin.bat


@echo off

doc_src\build_autodoc_files.py
sphinx-build -b html doc_src pywinauto\docs

REM c:\.temp\pudge\pudge\cli  --documents doc_source\index.rst,doc_source\controls_overview.rst,doc_source\howto.rst,doc_source\getting_started.rst,history.txt,license.txt,todo.txt --title pywinauto  -v  -d website  -m pywinauto.application,pywinauto.taskbar,pywinauto.clipboard,pywinauto.timings,pywinauto.findbestmatch,pywinauto.findwindows,pywinauto.handleprops,pywinauto.XMLHelpers,pywinauto.controls,pywinauto.tests   -t doc_source\template

REM These are the python modules
REM application.py
REM clipboard.py
REM findbestmatch.py
REM findwindows.py
REM handleprops.py
REM taskbar.py
REM win32defines.py
REM win32functions.py
REM win32structures.py
REM XMLHelpers.py

REM controls
REM tests

REM c:\.temp\pudge\pudge\cli --title pywinauto -v -m pywinauto --documents docs\index.rst,history.txt,license.txt,todo.txt,docs\howto.rst -d pudge_output_green_paste   -t \.temp\pudge\pudge\template\green_paste

@echo off

python docs\build_autodoc_files.py

sphinx-build -w warnings.txt -E -b html .\docs .\html_docs 1>sphinx_build_log.txt 2>&1
::sphinx-build -w warnings.txt -E -b latex .\docs .\pdf_docs 1>sphinx_build_log.txt 2>&1

Update makedocs.bat (fix #408).

Update makedocs.bat (fix #408).


@echo off

NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
    ECHO Not an admin, exiting.
    EXIT /B 1
)

setlocal EnableDelayedExpansion

:: ############################
:: # Create symlinks from the home directory to any desired dotfiles directory.
:: ############################

:: dotfiles directory
set dotfilesdir=%USERPROFILE%\.dotfiles

:: backup directory
set backupdir=%USERPROFILE%\dotfiles_backup

:: list of files/folders to symlink in homedir
set dotfiles=bashrc bash_profile bash dir_colors inputrc minttyrc gitconfig

for %%A in (%dotfiles%) DO (
  set target=%dotfilesdir%\%%A
  set link=%USERPROFILE%\.%%A
  set linkExists="0"

  if exist "!link!" (
    set Z=&& for %%B in ("!link!") do set Z=%%~aB
    if "!Z:~8,1!" == "l" (
      set linkExists="1"
    ) else (
      if not exist "%backupdir%" (
        mkdir "%backupdir%"
      )
      echo Moving existing !link! to %backupdir%
      move "!link!" "%backupdir%"
    )
  )

  if !linkExists! == "0" (
    if exist "!target!\" (
      mklink /d "!link!" "!target!"
    ) else (
      mklink "!link!" "!target!"
    )
    attrib /L "!link!" +h
  )
)

if exist "%USERPROFILE%\AppData\Roaming\Sublime Text 2" (
  cd "%USERPROFILE%\AppData\Roaming\Sublime Text 2"
  mkdir "Backup"
  move "Installed Packages" "Backup"
  move "Packages" "Backup"
  move "Pristine Packages" "Backup"
  mklink /D "Installed Packages" "%USERPROFILE%\.dotfiles\sublime\Installed Packages"
  mklink /D "Packages" "%USERPROFILE%\.dotfiles\sublime\Packages"
  mklink /D "Pristine Packages" "%USERPROFILE%\.dotfiles\sublime\Pristine Packages"
)

@echo off

NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
    ECHO Not an admin, exiting.
    EXIT /B 1
)

setlocal EnableDelayedExpansion

:: ############################
:: # Create symlinks from the home directory to any desired dotfiles directory.
:: ############################

:: dotfiles directory
set dotfilesdir=%USERPROFILE%\.dotfiles

:: backup directory
set backupdir=%USERPROFILE%\dotfiles_backup

:: list of files/folders to symlink in homedir
set dotfiles=bashrc bash_profile bash dir_colors inputrc minttyrc gitconfig

for %%A in (%dotfiles%) DO (
  set target=%dotfilesdir%\%%A
  set link=%USERPROFILE%\.%%A
  set linkExists="0"

  if exist "!link!" (
    set Z=&& for %%B in ("!link!") do set Z=%%~aB
    if "!Z:~8,1!" == "l" (
      set linkExists="1"
    ) else (
      if not exist "%backupdir%" (
        mkdir "%backupdir%"
      )
      echo Moving existing !link! to %backupdir%
      move "!link!" "%backupdir%"
    )
  )

  if !linkExists! == "0" (
    if exist "!target!\" (
      mklink /d "!link!" "!target!"
    ) else (
      mklink "!link!" "!target!"
    )
    attrib /L "!link!" +h
  )
)

set sublime=%USERPROFILE%\AppData\Roaming\Sublime Text 2

if exist "%sublime%" (
  mkdir "%sublime%\Backup"
  move "%sublime%\Installed Packages" "%sublime%\Backup"
  move "%sublime%\Packages" "%sublime%\Backup"
  move "%sublime%\Pristine Packages" "%sublime%\Backup"
  mklink /D "%sublime%\Installed Packages" "%~dp0sublime\Installed Packages"
  mklink /D "%sublime%\Packages" "%~dp0sublime\Packages"
  mklink /D "%sublime%\Pristine Packages" "%~dp0sublime\Pristine Packages"
)

Use direct directory in case install.bat is executed from a different drive


@echo OFF
@setlocal
@rem Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.

@rem ################################
@rem # A configuration script for Windows
@rem #
@rem # The options and (optional) arguments are:
@rem #  --clean : this is exclusive of anything else and cleans the environment
@rem #    from built and installed files
@rem #
@rem #  --python < path to python.exe> : this must be the first argument and set
@rem #    the path to the Python executable to use. If < path to python.exe> is
@rem #    set to "path", then the executable will be the python.exe available
@rem #    in the PATH.
@rem #
@rem #  <some conf path> : this must be the last argument and sets the path to a
@rem #    configuration directory to use.
@rem ################################

@rem ################################
@rem # Defaults. Change these variables to customize this script locally
@rem ################################
@rem # you can define one or more thirdparty dirs, each where the varibale name
@rem # is prefixed with TPP_DIR
set "TPP_DIR=thirdparty"

@rem # default configurations for dev
set "CONF_DEFAULT=etc/conf/dev"

@rem # default thirdparty dist for dev
if ""%CONF_DEFAULT%""==""etc/conf/dev"" (
    set "TPP_DIR_DEV=thirdparty/dev"
)

@rem # default supported version for Python 3
set SUPPORTED_PYTHON3=3.6

@rem #################################

@rem python --version
@rem python -c "import sys;print(sys.executable)"

@rem Current directory where this .bat files lives
set CFG_ROOT_DIR=%~dp0

@rem path where a configured Python should live in the current virtualenv if installed
set CONFIGURED_PYTHON=%CFG_ROOT_DIR%Scripts\python.exe

set PYTHON_EXECUTABLE=

@rem parse command line options and arguments
:collectopts
if "%1" EQU "--help" (goto cli_help)
if "%1" EQU "--clean" (call rmdir /s /q "%CFG_ROOT_DIR%tmp") && call exit /b
if "%1" EQU "--python" (set PROVIDED_PYTHON=%~2) && shift && shift && goto collectopts

@rem We are not cleaning: Either we have a provided configure config path or we use a default.
if ""%1""=="""" (
    set CFG_CMD_LINE_ARGS=%CONF_DEFAULT%
) else (
    set CFG_CMD_LINE_ARGS=%1
)

@rem If we have a pre-configured Python in our virtualenv, reuse this as-is and run
if exist ""%CONFIGURED_PYTHON%"" (
    set PYTHON_EXECUTABLE=%CONFIGURED_PYTHON%
    goto run
)

@rem If we have a command arg for Python use this as-is
if ""%PROVIDED_PYTHON%""==""path"" (
    @rem use a bare python available in the PATH
    set PYTHON_EXECUTABLE=python
    goto run
)
if exist ""%PROVIDED_PYTHON%"" (
    set PYTHON_EXECUTABLE=%PROVIDED_PYTHON%
    goto run
)

@rem otherwise we search for a suitable Python interpreter
:find_python

@rem First check the existence of the "py" launcher (available in Python 3)
@rem if we have it, check if we have a py -3 installed with the good version or a py 2.7
@rem if not, check if we have an old py 2.7
@rem exist if all fails

where py >nul 2>nul
if %ERRORLEVEL% == 0 (
    @rem we have a py launcher, check for the availability of our required Python 3 version
    py -3.6 --version >nul 2>nul
    if %ERRORLEVEL% == 0 (
        set PYTHON_EXECUTABLE=py -3.6
    ) else (
        @rem we have no required python 3, let's try python 2:
        py -2 --version >nul 2>nul
        if %ERRORLEVEL% == 0 (
            set PYTHON_EXECUTABLE=py -2
        ) else (
            @rem we have py and no python 3 and 2, exit
            echo * Unable to find an installation of Python.
            exit /b 1
        )
    )
) else (
    @rem we have no py launcher, check for a default Python 2 installation
    if not exist ""%DEFAULT_PYTHON2%"" (
       echo * Unable to find an installation of Python.
       exit /b 1
    ) else (
        set PYTHON_EXECUTABLE=%DEFAULT_PYTHON2%
    )
)

:run

@rem without this things may not always work on Windows 10, but this makes things slower
set PYTHONDONTWRITEBYTECODE=1

call mkdir "%CFG_ROOT_DIR%tmp"
call curl -o "%CFG_ROOT_DIR%tmp\virtualenv.pyz" https://bootstrap.pypa.io/virtualenv.pyz
call %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%tmp\virtualenv.pyz" "%CFG_ROOT_DIR%tmp"
call "%CFG_ROOT_DIR%tmp\Scripts\activate"
call "%CFG_ROOT_DIR%tmp\Scripts\pip" install --upgrade pip virtualenv setuptools wheel

@rem Return a proper return code on failure
if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)
endlocal
goto activate

:cli_help
echo A configuration script for Windows
echo usage: configure [options] [path/to/config/directory]
echo.
echo The options and arguments are:
echo  [path/to/config/directory] : this optionally sets the path to a
echo    configuration directory to use. Defaults to etc/conf/dev if not set
echo.
echo  --clean : this is exclusive of anything else and cleans the environment
echo    from built and installed files
echo.
echo  --python path/to/python.exe : this is set to the path of an alternative
echo    Python executable to use. If path/to/python.exe is set to "path",
echo    then the executable will be the python.exe available in the PATH.
echo.

:activate
@rem Activate the virtualenv
if exist "%CFG_ROOT_DIR%Scripts\activate" (
    "%CFG_ROOT_DIR%Scripts\activate"
)

@echo OFF
@setlocal
@rem Copyright (c) nexB Inc. http://www.nexb.com/ - All rights reserved.

@rem ################################
@rem # A configuration script for Windows
@rem #
@rem # The options and (optional) arguments are:
@rem #  --clean : this is exclusive of anything else and cleans the environment
@rem #    from built and installed files
@rem #
@rem #  --python < path to python.exe> : this must be the first argument and set
@rem #    the path to the Python executable to use. If < path to python.exe> is
@rem #    set to "path", then the executable will be the python.exe available
@rem #    in the PATH.
@rem ################################

@rem Current directory where this .bat files lives
set CFG_ROOT_DIR=%~dp0
@rem path where a configured Python should live in the current virtualenv if installed
set CONFIGURED_PYTHON=%CFG_ROOT_DIR%tmp\Scripts\python.exe
set PYTHON_EXECUTABLE=

@rem parse command line options and arguments
:collectopts
if "%1" EQU "--help" (goto cli_help)
if "%1" EQU "--clean" (call rmdir /s /q "%CFG_ROOT_DIR%tmp") && call exit /b
if "%1" EQU "--python" (set PROVIDED_PYTHON=%~2) && shift && shift && goto collectopts

@rem If we have a pre-configured Python in our virtualenv, reuse this as-is and run
if exist ""%CONFIGURED_PYTHON%"" (
    set PYTHON_EXECUTABLE=%CONFIGURED_PYTHON%
    goto run
)

@rem If we have a command arg for Python use this as-is
if ""%PROVIDED_PYTHON%""==""path"" (
    @rem use a bare python available in the PATH
    set PYTHON_EXECUTABLE=python
    goto run
)
if exist ""%PROVIDED_PYTHON%"" (
    set PYTHON_EXECUTABLE=%PROVIDED_PYTHON%
    goto run
)

@rem otherwise we search for a suitable Python interpreter
:find_python
@rem First check the existence of the "py" launcher (available in Python 3)
@rem if we have it, check if we have a py -3 installed with the good version or a py 2.7
@rem if not, check if we have an old py 2.7
@rem exist if all fails

where py >nul 2>nul
if %ERRORLEVEL% == 0 (
    @rem we have a py launcher, check for the availability of our required Python 3 version
    py -3.6 --version >nul 2>nul
    if %ERRORLEVEL% == 0 (
        set PYTHON_EXECUTABLE=py -3.6
    ) else (
        @rem we have no required python 3, let's try python 2:
        py -2 --version >nul 2>nul
        if %ERRORLEVEL% == 0 (
            set PYTHON_EXECUTABLE=py -2
        ) else (
            @rem we have py and no python 3 and 2, exit
            echo * Unable to find an installation of Python.
            exit /b 1
        )
    )
) else (
    @rem we have no py launcher, check for a default Python 2 installation
    if not exist ""%DEFAULT_PYTHON2%"" (
       echo * Unable to find an installation of Python.
       exit /b 1
    ) else (
        set PYTHON_EXECUTABLE=%DEFAULT_PYTHON2%
    )
)

:run
@rem without this things may not always work on Windows 10, but this makes things slower
set PYTHONDONTWRITEBYTECODE=1

call mkdir "%CFG_ROOT_DIR%tmp"
call curl -o "%CFG_ROOT_DIR%tmp\virtualenv.pyz" https://bootstrap.pypa.io/virtualenv.pyz
call %PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%tmp\virtualenv.pyz" "%CFG_ROOT_DIR%tmp"
call "%CFG_ROOT_DIR%tmp\Scripts\activate"
call "%CFG_ROOT_DIR%tmp\Scripts\pip" install --upgrade pip virtualenv setuptools wheel

@rem Return a proper return code on failure
if %ERRORLEVEL% neq 0 (
    exit /b %ERRORLEVEL%
)
endlocal
goto activate

:cli_help
echo A configuration script for Windows
echo usage: configure [options] [path/to/config/directory]
echo.
echo The options and arguments are:
echo  --clean : this is exclusive of anything else and cleans the environment
echo    from built and installed files
echo.
echo  --python path/to/python.exe : this is set to the path of an alternative
echo    Python executable to use. If path/to/python.exe is set to "path",
echo    then the executable will be the python.exe available in the PATH.
echo.

:activate
@rem Activate the virtualenv
if exist "%CFG_ROOT_DIR%tmp\Scripts\activate" (
    "%CFG_ROOT_DIR%tmp\Scripts\activate"
)

Fix path to Scripts directory

Fix path to Scripts directory

    * Remove unused variables and options

Signed-off-by: Jono Yang <d854f27e52c3c8670cc141b8492808363459e2bd@nexb.com>


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@latest || goto :error
call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

@rem The image we're currently running has a broken version of Node.js enabled
@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional
@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to
@rem install npm for v10.15.3.
call nvm use v8.9.1 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error
call nvm use v10.15.3 || goto :error
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error

call npm install || goto :error
call npm run test || goto :error

goto :EOF

:error
exit /b 1

build: patch Windows container, fixing Node 10 (#113)


@echo off

set errorlevel=1
set errorlevel=

pushd src\xpiks-qt\
qmake "CONFIG+=%configuration% appveyor" xpiks-qt.pro
nmake.exe

if errorlevel 1 exit /b %errorlevel%

echo "Build finished for branch %APPVEYOR_REPO_BRANCH%"

if "%APPVEYOR_REPO_BRANCH%" == "master" (
    echo "Creating deployment package..."
    cd %configuration%
    windeployqt.exe --debug --qmldir=../../xpiks-qt/CollapserTabs/ --qmldir=../../xpiks-qt/Components/ --qmldir=../../xpiks-qt/Constants/ --qmldir=../../xpiks-qt/Dialogs/ --qmldir=../../xpiks-qt/StackViews/ --qmldir=../../xpiks-qt/StyledControls/ --qmldir=../../xpiks-qt/ Xpiks.exe
    xcopy /Y /s c:\projects\xpiks\src\xpiks-qt\deps .
    xcopy /Y /s c:\projects\xpiks-deps\windows-libs\ffmpeg-x64\debug\*.dll .
    copy /Y ..\..\..\libs\%configuration%\libcurl*.dll .
    copy /Y ..\..\..\libs\%configuration%\quazip*.dll .
    copy /Y ..\..\..\libs\%configuration%\ssdll.dll .
    copy /Y ..\..\..\libs\%configuration%\mman.dll .
    copy /Y ..\..\..\libs\%configuration%\face.dll .
    copy /Y ..\..\..\libs\%configuration%\z.dll .
    del *.obj
    del *.cpp
    cd ..
    7z a xpiks-qt-%configuration%.zip %configuration%
    appveyor PushArtifact xpiks-qt-%configuration%-%APPVEYOR_BUILD_VERSION%.zip
)

popd

@echo off

set errorlevel=1
set errorlevel=

pushd src\xpiks-qt\
qmake "CONFIG+=%configuration% appveyor" xpiks-qt.pro
nmake.exe

if errorlevel 1 exit /b %errorlevel%

echo "Build finished for branch %APPVEYOR_REPO_BRANCH%"

if "%APPVEYOR_REPO_BRANCH%" == "master" (
    echo "Creating deployment package..."
    cd %configuration%
    windeployqt.exe --debug --qmldir=../../xpiks-qt/CollapserTabs/ --qmldir=../../xpiks-qt/Components/ --qmldir=../../xpiks-qt/Constants/ --qmldir=../../xpiks-qt/Dialogs/ --qmldir=../../xpiks-qt/StackViews/ --qmldir=../../xpiks-qt/StyledControls/ --qmldir=../../xpiks-qt/ Xpiks.exe
    xcopy /Y /s c:\projects\xpiks\src\xpiks-qt\deps .
    xcopy /Y /s c:\projects\xpiks-deps\windows-libs\ffmpeg-x64\debug\*.dll .
    copy /Y ..\..\..\libs\%configuration%\libcurl*.dll .
    copy /Y ..\..\..\libs\%configuration%\quazip*.dll .
    copy /Y ..\..\..\libs\%configuration%\ssdll.dll .
    copy /Y ..\..\..\libs\%configuration%\mman.dll .
    copy /Y ..\..\..\libs\%configuration%\face.dll .
    copy /Y ..\..\..\libs\%configuration%\z.dll .
    del *.obj
    del *.cpp
    cd ..
    set ARCHIVE_NAME=xpiks-qt-%configuration%-%APPVEYOR_BUILD_VERSION%.zip
    7z a %ARCHIVE_NAME% %configuration%
    appveyor PushArtifact %ARCHIVE_NAME%
)

popd

Fix appveyor artifact creation

Fix appveyor artifact creation


@echo off
"%SystemDrive%\Python35x64\python.exe" "%~dp0DecoraterBot.py" 2>resources\Logs\unhandled_tracebacks.txt
pause - stop

Create DecoraterBot64-3.5.bat

Create DecoraterBot64-3.5.bat


@echo off

pushd %~dp0

SET PACKAGEPATH=.\packages\
SET NUGET=.\tools\nuget\NuGet.exe
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion

IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 (
  %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0
)

IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.4 (
  %NUGET% install FAKE.BuildLib -Version 0.1.4 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.4
)

set encoding=utf-8
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*

popd

@echo off

pushd %~dp0

SET PACKAGEPATH=.\packages\
SET NUGET=.\tools\nuget\NuGet.exe
SET NUGETOPTIONS=-ConfigFile .\tools\nuget\NuGet.Config -OutputDirectory %PACKAGEPATH% -ExcludeVersion

IF NOT EXIST %PACKAGEPATH%FAKE\Ver_4.23.0 (
  %NUGET% install FAKE -Version 4.23.0 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE\Ver_4.23.0
)

IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.5 (
  %NUGET% install FAKE.BuildLib -Version 0.1.5 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.5
)

set encoding=utf-8
"%PACKAGEPATH%FAKE\tools\FAKE.exe" build.fsx %*

popd

Use Fake.BuildLib 0.1.5 in Build.cmd

Use Fake.BuildLib 0.1.5 in Build.cmd


"c:\Program Files\7-Zip\7z" a -tzip  ..\folderAccountBeta.xpi *  -x!PackUp.bat -x!.git

Fix packup script to work with git repo

Fix packup script to work with git repo


pushd src\Pickles\Pickles.PowerShell && ..\.nuget\nuget.exe pack Pickles.nuspec -Version %1
popd
pushd src\Pickles\Pickles.MSBuild && ..\.nuget\nuget.exe pack Pickles.MSBuild.nuspec -Version %1
popd

Update NuGetPackAll.cmd to create MSBuild package


@rem Common file shared between external.bat and external-amd64.bat.  Responsible for
@rem fetching external components into the root\.. buildbot directories.

cd ..

@rem XXX: This will be gone soon after Windows7(py3k) buildbot will run.

@rem Print nasmw version
for %%i in (nasmw.exe) do (
	if not "%%=$PATH" == "" (
		%%~$PATH:i -v
	)
)

@rem Compare asm files
for %%i in (openssl-1.0.0a\asm32\*.asm) do (
	fc %%~fi openssl-1.0.0a\tmp32\%%~nxi
)

@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
@rem the following, check it in, then check it out, comment it out, then check it back in.
@rem if exist bzip2-1.0.5 rd /s/q bzip2-1.0.5
@rem if exist tcltk rd /s/q tcltk
@rem if exist tcltk64 rd /s/q tcltk64
@rem if exist tcl8.4.12 rd /s/q tcl8.4.12
@rem if exist tcl8.4.16 rd /s/q tcl8.4.16
@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1
@rem if exist tk8.4.12 rd /s/q tk8.4.12
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
if exist openssl-1.0.0a rd /s/q openssl-1.0.0a
@rem if exist sqlite-3.6.21 rd /s/q sqlite-3.6.21

@rem bzip
if not exist bzip2-1.0.5 (
   rd /s/q bzip2-1.0.3
  svn export http://svn.python.org/projects/external/bzip2-1.0.5
)

@rem Sleepycat db
if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20-vs9 db-4.4.20

@rem OpenSSL
if not exist openssl-1.0.0a svn export http://svn.python.org/projects/external/openssl-1.0.0a

@rem tcl/tk
if not exist tcl-8.5.2.1 (
   rd /s/q tcltk tcltk64
   svn export http://svn.python.org/projects/external/tcl-8.5.2.1
)
if not exist tk-8.5.2.0 svn export http://svn.python.org/projects/external/tk-8.5.2.0

@rem sqlite3
if not exist sqlite-3.6.21 (
  rd /s/q sqlite-source-3.3.4
  svn export http://svn.python.org/projects/external/sqlite-3.6.21
)

@rem Common file shared between external.bat and external-amd64.bat.  Responsible for
@rem fetching external components into the root\.. buildbot directories.

cd ..
@rem XXX: If you need to force the buildbots to start from a fresh environment, uncomment
@rem the following, check it in, then check it out, comment it out, then check it back in.
@rem if exist bzip2-1.0.5 rd /s/q bzip2-1.0.5
@rem if exist tcltk rd /s/q tcltk
@rem if exist tcltk64 rd /s/q tcltk64
@rem if exist tcl8.4.12 rd /s/q tcl8.4.12
@rem if exist tcl8.4.16 rd /s/q tcl8.4.16
@rem if exist tcl-8.4.18.1 rd /s/q tcl-8.4.18.1
@rem if exist tk8.4.12 rd /s/q tk8.4.12
@rem if exist tk8.4.16 rd /s/q tk8.4.16
@rem if exist tk-8.4.18.1 rd /s/q tk-8.4.18.1
@rem if exist db-4.4.20 rd /s/q db-4.4.20
@rem if exist openssl-1.0.0a rd /s/q openssl-1.0.0a
@rem if exist sqlite-3.6.21 rd /s/q sqlite-3.6.21

@rem bzip
if not exist bzip2-1.0.5 (
   rd /s/q bzip2-1.0.3
  svn export http://svn.python.org/projects/external/bzip2-1.0.5
)

@rem Sleepycat db
if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20-vs9 db-4.4.20

@rem OpenSSL
if not exist openssl-1.0.0a svn export http://svn.python.org/projects/external/openssl-1.0.0a

@rem tcl/tk
if not exist tcl-8.5.2.1 (
   rd /s/q tcltk tcltk64
   svn export http://svn.python.org/projects/external/tcl-8.5.2.1
)
if not exist tk-8.5.2.0 svn export http://svn.python.org/projects/external/tk-8.5.2.0

@rem sqlite3
if not exist sqlite-3.6.21 (
  rd /s/q sqlite-source-3.3.4
  svn export http://svn.python.org/projects/external/sqlite-3.6.21
)

Revert previous commit.

Revert previous commit.


call "%VS140COMNTOOLS%vcvarsqueryregistry.bat" 64bit
call "%VCINSTALLDIR%vcvarsall.bat" amd64

mkdir .\build\windows10
cd .\build\windows10
cmake ..\.. -G "Visual Studio 14 2015 Win64"

for %%t in (shell,daemon,osquery_tests,osquery_additional_tests,osquery_tables_tests) do (
  cmake --build . --target %%t --config Release -- /maxcpucount /verbosity:minimal
  if errorlevel 1 goto end
)

ctest --output-on-failure

:end

call "%VS140COMNTOOLS%vcvarsqueryregistry.bat" 64bit
call "%VCINSTALLDIR%vcvarsall.bat" amd64

mkdir .\build\windows10
cd .\build\windows10
cmake ..\.. -G "Visual Studio 14 2015 Win64"

for %%t in (shell,daemon,osquery_tests,osquery_additional_tests,osquery_tables_tests) do (
  cmake --build . --target %%t --config Release -- /verbosity:minimal
  if errorlevel 1 goto end
)

ctest --output-on-failure

:end

Remove /maxcpucount from Windows build script (#2699)


@echo off
cd C:\Users\dzony\Documents\projects\system\env\system\Scripts

start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\server__client\ && python start_server.py"
sleep 0.1
start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\backend\ && python start.py"

@echo off
cd C:\Users\dzony\Documents\projects\system\env\system\Scripts

start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\server__client\ && python start.py"
sleep 0.1
start cmd /k "activate && cd C:\Users\dzony\Documents\projects\system\backend\ && python start.py"

Update bat file for starting system

Update bat file for starting system


REM Start from a clean build directory
rmdir /Q /S C:\Dashboards\TubeTK\TubeTK-Release

REM Update the TubeTK Dashboard scripts
cd C:\Dashboards\TubeTK\TubeTK-DashboardScripts
REM "C:\Program Files (x86)\Git\bin\git" reset --hard HEAD
"C:\Program Files (x86)\Git\bin\git" pull
cd ..

REM Run the nightly CTest
"C:\Program Files (x86)\CMake 2.8\bin\ctest.exe" -S "C:\Dashboards\TubeTK\TubeTK-DashboardScripts\Deathstar_Win7VM_Kitware_TubeTK.cmake" -O "C:\Dashboards\TubeTK\TubeTK_CDashClient_Nightly_log.txt"

Add .bat script for Deathstar_Win7VM.

ENH: Add .bat script for Deathstar_Win7VM.


xcopy %RECIPE_DIR%\CMakeLists.txt %SRC_DIR%

mkdir build
cd build

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

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

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

Create bld.bat

Create bld.bat


@echo off
SET users=pool-bitcoincoid-btc.conf
if not exist pool-bitcoincoid-btc.conf (
  if exist pool-bitcoincoid.btc.conf.txt (
    SET users=pool-bitcoincoid-btc.conf.txt
  ) else (
    @echo on
    echo error: You must specify a file called pool-bitcoincoid-btc.conf with your exchange data
    pause
    exit
  )
)
@echo on
..\python\client.py %users%

@echo off
SET users=pool-bitcoincoid-btc.conf
if not exist pool-bitcoincoid-btc.conf (
  if exist pool-bitcoincoid.btc.conf.txt (
    SET users=pool-bitcoincoid-btc.conf.txt
  ) else (
    @echo on
    echo error: You must specify a file called pool-bitcoincoid-btc.conf with your exchange data
    pause
    exit
  )
)
@echo on
..\..\python\client.py %users%

Update client-bitcoincoid-btc.bat

Update client-bitcoincoid-btc.bat


@echo off
setlocal ENABLEDELAYEDEXPANSION

call build_installer.bat || goto ERROR_HANDLER
call make_7z_package.bat || goto ERROR_HANDLER
call doxygen DoxyfileRpcFunctions || goto ERROR_HANDLER

exit /B

:ERROR_HANDLER
    set ORIGINAL_ERROR_LEVEL=%ERRORLEVEL%
    echo Failed to make: installer, 7z package, documentation. Error code %ORIGINAL_ERROR_LEVEL%
    exit /B %ORIGINAL_ERROR_LEVEL%

add build script

add build script


;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e.=explorer .
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
msbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gai=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Diff
gd=git diff $*
gdc=git diff --cached $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*

;= Git Log
gl=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%cN %C(3)%cr %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" $*
gla=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%cN %C(3)%cr %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glag=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%cN %C(3)%cr %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
gld=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%cN %C(3)%cr %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
gldp=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%cN %C(3)%cr %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glg=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%cN %C(3)%cr %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset $*
gwc=git clean $*

;= echo off
;= rem Call DOSKEY and use this file as the macrofile
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
;= rem In batch mode, jump to the end of the file
;= goto:eof
;= Add aliases below here

clear=cls
cmderr=cd /d "%CMDER_ROOT%"
e.=explorer .
gvim="C:\Program Files (x86)\Vim\vim80\gvim.exe" $*
history=cat "%CMDER_ROOT%\config\.history"
ll=ls -l -h --show-control-chars -F --color $*
ls=ls --show-control-chars -F --color $*
msbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe" $*
nuget="C:\workspace\nuget\nuget.exe" $*
pip2="C:\Program Files\Anaconda2\Scripts\pip.exe" $*
pip3="C:\Program Files\Anaconda3\Scripts\pip.exe" $*
pwd=cd
unalias=alias /d $1
vi=vim $*
vim="C:\Program Files (x86)\Vim\vim80\vim.exe" $*
vimdiff="C:\Program Files (x86)\Vim\vim80\vim.exe" -d $*
vsdevcmd="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
vsmsbuild="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsMSBuildCmd.bat"

;= Git
g=git $*

;= Git Add
ga=git add --verbose $*
gae=git add --verbose --edit $*
gai=git add --verbose --interactive $*
gap=git add --verbose --patch $*
gau=git add --verbose --update $*

;= Git Branch
gb=git branch -vv $*
gba=git branch -vv --all $*
gbc=git checkout -b $*
gbd=git branch --delete $*
gbm=git branch --move $*
gbs=git show-branch $*

;= Git Commit
gc=git commit -v $*
gca=git commit -v --all $*
gcF=git commit -v --amend $*
gcm=git commit --message $*
gcp=git cherry-pick --ff $*
gcS=git commit --gpg-sign $*
gcSF=git commit --amend --gpg-sign $*
gco=git checkout $*
gcs=git show $*

;= Git Diff
gd=git diff $*
gdc=git diff --cached $*

;= Git Fetch
gf=git fetch --all --tags --prune $*
gfc=git clone $*
gfcr=git clone --recurse-submodules $*
gfm=git pull
gfr=git pull --rebase
gfx="C:\workspace\aliases\gfx.cmd" $*
gfu=git remote --verbose update --prune $*

;= Git Grep
gg=git grep $*
ggi=git grep --interactive $*
ggl=git grep --files-with-matches $*
ggv=git grep --invert-match $*
ggw=git grep --word-regexp $*

;= Git Index
gia=git add $*
gid=git diff --cached $*
gir=git reset $*

;= Git Log
gl=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" $*
gla=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all $*
glag=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --all --graph $*
gld=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent $*
gldp=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --no-merges --first-parent --patch $*
glg=git log --pretty=format:"%C(4)%aN %C(4)%ar %C(3)%aD %C(2)%h%C(3)%d %C(7)%<(80,trunc)%s" --graph $*

;= Git Merge
gm=git merge $*
gma=git merge --abort $*
gmt=git mergetool $*

;= Git Push
gp=git push $*
gpt=git push --tags $*

;= Git Rebase
gr=git rebase $*
gra=git rebase --abort $*
grc=git rebase --continue $*
gri=git rebase --interactive $*

;= Git Remote

;= Git Stash
gs=git stash $*
gsa=git stash apply $*
gsd=git stash show --patch --stat $*
gsx=git stash drop $*
gsl=git stash list $*
gsp=git stash pop $*
gss=git stash save --include-untracked $*

;= Git Working Copy
gwa=git add --verbose $*
gws=git status $*
gwd=git diff $*
gwr=git reset --soft $*
gwc=git clean $*

Update windows cmder user-aliases

Update windows cmder user-aliases


@echo off
setlocal
set mypath=%~dp0
set PATH=%PATH%;%mypath%\python2.7
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%

doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commonlib.commands engine $*

echo OpenQuake environment loaded
cmd /k

endlocal

@echo off
setlocal
set mypath=%~dp0
set PATH=%PATH%;%mypath%\python2.7
set PYTHONPATH=%mypath%\lib
set OQ_SITE_CFG_PATH=%mypath%

doskey oq=python.exe -m openquake.commands.__main__ $*
doskey oq-engine=python.exe -m openquake.commands.__main__ engine $*

echo OpenQuake environment loaded
echo The command 'oq-engine' is deprecated and will be removed. Please use 'oq engine' instead
cmd /k

endlocal

Add deprecation warnign and fix a command


@echo off
pushd %~dp0..
call .\scripts\build.bat
call dotnet pack .\src\Adaptive.Aeron\Adaptive.Aeron.csproj -c Release -o ..\..\nupkgs
call dotnet pack .\src\Adaptive.Agrona\Adaptive.Agrona.csproj -c Release -o ..\..\nupkgs
call dotnet pack .\src\Adaptive.Cluster\Adaptive.Cluster.csproj -c Release -o ..\..\nupkgs
call dotnet pack .\src\Adaptive.Archiver\Adaptive.Archiver.csproj -c Release -o ..\..\nupkgs
call .\scripts\nuget pack .\driver\Aeron.Driver.nuspec ..\nupkgs
popd

@echo off
pushd %~dp0..
call dotnet pack src\Adaptive.Aeron\Adaptive.Aeron.csproj                -c Release --output ..\..\nupkgs
call dotnet pack src\Adaptive.Agrona\Adaptive.Agrona.csproj              -c Release --output ..\..\nupkgs
call dotnet pack src\Adaptive.Cluster\Adaptive.Cluster.csproj            -c Release --output ..\..\nupkgs
call dotnet pack src\Adaptive.Archiver\Adaptive.Archiver.csproj          -c Release --output ..\..\nupkgs
call .\scripts\nuget pack .\driver\Aeron.Driver.nuspec                   -OutputDirectory nupkgs
popd

Tidy up build-nuget-packages.bat

Tidy up build-nuget-packages.bat


@echo setting Phython path
path c:\Python27\;%PATH%
@echo with minwg, you can try this make version:
c:\MinGW\bin\mingw32-make.exe

@echo setting Phython path
@path c:\Python27\;%PATH%
@echo with MinGW, you can try this make version:
@echo c:\MinGW\bin\mingw32-make.exe

fix typo and output

fix typo and output


@echo Off

echo ====== Starting to build dvc installer for Windows... ======

if not exist dvc\NUL (echo Error: Please run this script from repository root && goto :error)

rmdir /Q /S build
rmdir /Q /S dist
del /Q /S dvc.spec
del /Q /S "dvc-*.exe"

where pip
if %errorlevel% neq 0 (echo Error: pip not found && goto :error)

if not exist "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" (echo Error: Couldn't find Inno Setup compiler. Please go to jrsoftware.org/isinfo.php and install Inno Setup 5 && goto :error)

echo ====== Installing requirements... ======
call pip install -r requirements.txt || goto :error
call pip install pyinstaller || goto :error

echo ====== Building dvc binary... ======
call pyinstaller --onefile --additional-hooks-dir scripts\hooks dvc/__main__.py --name dvc --specpath build

echo ====== Building dvc installer... ======
set PYTHONPATH=%cd%
call python scripts\innosetup\config_gen.py || goto :error
call "C:\Program Files (x86)\Inno Setup 5\iscc" scripts\innosetup\setup.iss || goto :error

echo ====== DONE ======
goto :EOF

:error
echo ====== FAIL ======
exit /b 1

@echo Off

echo ====== Starting to build dvc installer for Windows... ======

if not exist dvc\NUL (echo Error: Please run this script from repository root && goto :error)

rmdir /Q /S build
rmdir /Q /S dist
del /Q /S dvc.spec
del /Q /S "dvc-*.exe"

where pip
if %errorlevel% neq 0 (echo Error: pip not found && goto :error)

if not exist "C:\Program Files (x86)\Inno Setup 5\ISCC.exe" (echo Error: Couldn't find Inno Setup compiler. Please go to jrsoftware.org/isinfo.php and install Inno Setup 5 && goto :error)

echo ====== Installing requirements... ======
call pip install -r requirements.txt || goto :error
call pip install pyinstaller || goto :error

echo ====== Building dvc binary... ======
call pyinstaller --onefile --additional-hooks-dir scripts\hooks dvc/__main__.py --name dvc --specpath build

echo ====== Copying additional files... ======
copy scripts\innosetup\addSymLinkPermissions.ps1 dist\ || goto :error

echo ====== Building dvc installer... ======
set PYTHONPATH=%cd%
call python scripts\innosetup\config_gen.py || goto :error
call "C:\Program Files (x86)\Inno Setup 5\iscc" scripts\innosetup\setup.iss || goto :error

echo ====== DONE ======
goto :EOF

:error
echo ====== FAIL ======
exit /b 1

Revert "build: win: don't look for symlink ps script"

This reverts commit 4164eddb920ad4df2b9dd805497424eb53caebf9.


REM This file is placed in $INSTDIR\Dependencies\cmder\config\profile.d...
CALL %~dp0cea-env.bat
ALIAS find="%~dp0Dependencies\cmder\vendor\git-for-windows\usr\bin\find.exe" $*

REM This file is placed in $INSTDIR\Dependencies\cmder\config\profile.d...
SET CEA-INSTDIR=%~dp0..\..\..\..
PUSHD %CEA-INSTDIR%
SET CEA-INSTDIR=%CD%
POPD

CALL %CEA-INSTDIR%\cea-env.bat
ALIAS find="%CEA-INSTDIR%\Dependencies\cmder\vendor\git-for-windows\usr\bin\find.exe" $*

Update cmder-config.bat

Update cmder-config.bat


Add run file.

Add run file.


@echo off

set PTOOLSPATH="%~dp0\"
php %PTOOLSPATH%phalcon.php %*

@echo off

set PTOOLSPATH=%~dp0
php %PTOOLSPATH%phalcon.php %*

Fix initialization home directory in Windows batch file.


@echo off

if NOT "%1"=="" SET VERSION="%1"
if NOT "%1"=="" GOTO GOT_VERSION

SET VERSION="08.02.0200"

echo.
echo Version not specified - defaulting to %VERSION%
echo.

:GOT_VERSION

echo.
echo Building psqlODBC merge module...

candle -nologo -dVERSION=%VERSION% -dPROGRAMFILES="%ProgramFiles%" psqlodbcm.wxs
IF ERRORLEVEL 1 GOTO ERR_HANDLER

light -nologo -out psqlodbc.msm psqlodbcm.wixobj
IF ERRORLEVEL 1 GOTO ERR_HANDLER

echo.
echo Building psqlODBC installer database...

candle -nologo -dVERSION=%VERSION% -dPROGRAMFILES="%ProgramFiles%" psqlodbc.wxs
IF ERRORLEVEL 1 GOTO ERR_HANDLER

light -nologo psqlodbc.wixobj
IF ERRORLEVEL 1 GOTO ERR_HANDLER

echo.
echo Done!
GOTO EXIT

:ERR_HANDLER
echo.
echo Aborting build!
GOTO EXIT

:EXIT

@echo off

if NOT "%1"=="" SET VERSION="%1"
if NOT "%1"=="" GOTO GOT_VERSION

SET VERSION="08.01.0200"

echo.
echo Version not specified - defaulting to %VERSION%
echo.

:GOT_VERSION

echo.
echo Building psqlODBC merge module...

candle -nologo -dVERSION=%VERSION% -dPROGRAMFILES="%ProgramFiles%" psqlodbcm.wxs
IF ERRORLEVEL 1 GOTO ERR_HANDLER

light -nologo -out psqlodbc.msm psqlodbcm.wixobj
IF ERRORLEVEL 1 GOTO ERR_HANDLER

echo.
echo Building psqlODBC installer database...

candle -nologo -dVERSION=%VERSION% -dPROGRAMFILES="%ProgramFiles%" psqlodbc.wxs
IF ERRORLEVEL 1 GOTO ERR_HANDLER

light -nologo psqlodbc.wixobj
IF ERRORLEVEL 1 GOTO ERR_HANDLER

echo.
echo Done!
GOTO EXIT

:ERR_HANDLER
echo.
echo Aborting build!
GOTO EXIT

:EXIT

Fix typo

Fix typo


"C:\Program Files\7-Zip\7z.exe" u -uq0 -mx9 psdle.zip ./psdle/* -r -x!*.db -x!*.ini

"C:\Program Files\7-Zip\7z.exe" u -uq0 -mx9 psdle.zip -mtc- ./psdle/* -r -x!*.db -x!*.ini

Update Chrome 7z bat file.

Update Chrome 7z bat file.


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

set CMD_LINE_ARGS=%*
set ORG_CMD_LINE_ARGS=%*

echo Executing
echo.
echo   gradlew %CMD_LINE_ARGS%
echo.

for /F "tokens=1,2*" %%i in (project-mappings) do call :process %%i %%j

if not "%ORG_CMD_LINE_ARGS%" == "%CMD_LINE_ARGS%" (
  type deprecation-warning.txt

  echo Changed command to
  echo.
  echo   gradlew %CMD_LINE_ARGS%
  echo.
)

gradlew_orig.bat %CMD_LINE_ARGS%
EXIT /B 0

:process
set VAR1=%1
set VAR2=%2
call set CMD_LINE_ARGS=%%CMD_LINE_ARGS:%VAR1%=%VAR2%%%
EXIT /B 0

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

pushd %~dp0

set CMD_LINE_ARGS=%*
set ORG_CMD_LINE_ARGS=%*

for /F "tokens=1,2*" %%i in (project-mappings) do call :process %%i %%j

if not "%ORG_CMD_LINE_ARGS%" == "%CMD_LINE_ARGS%" (
  type deprecation-warning.txt

  echo Changed command to
  echo.
  echo   gradlew %CMD_LINE_ARGS%
  echo.
)

gradlew_orig.bat %CMD_LINE_ARGS% & popd
EXIT /B 0

:process
set VAR1=%1
set VAR2=%2
call set CMD_LINE_ARGS=%%CMD_LINE_ARGS:%VAR1%=%VAR2%%%
EXIT /B 0

[BEAM-4046] Allow running gradlew from repo subdirs (windows)


@echo off
setlocal

set SCRIPTDIR=%~dp0
set PROJDIR=%SCRIPTDIR%..\..\
set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"

cd %PROJDIR%

@echo on
set BUILDDIR=%PROJDIR%build_win32\
set OUTPUTDIR=%PROJDIR%output\win32\
rmdir /S/Q %BUILDDIR%
mkdir %BUILDDIR%
cd %BUILDDIR%
cmake %PROJDIR% -G"Visual Studio 14 2015" -DBUILD_SHARED_LIBS=ON -DCMAKE_CONFIGURATION_TYPES=Release
%MSBUILDBIN% ALL_BUILD.vcxproj /property:Configuration=Release
cd ..

set BUILDDIR=%PROJDIR%build_win64\
set OUTPUTDIR=%PROJDIR%output\win64\
rmdir /S/Q %BUILDDIR%
mkdir %BUILDDIR%
cd %BUILDDIR%
cmake %PROJDIR% -G"Visual Studio 14 2015 Win64" -DBUILD_SHARED_LIBS=ON -DCMAKE_CONFIGURATION_TYPES=Release
%MSBUILDBIN% ALL_BUILD.vcxproj /property:Configuration=Release
cd ..

@echo off
setlocal

set SCRIPTDIR=%~dp0
set PROJDIR=%SCRIPTDIR%..\..\
set MSBUILDBIN="C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe"

cd %PROJDIR%

@echo on
set BUILDDIR=%PROJDIR%build_win32\
set OUTPUTDIR=%PROJDIR%output\win32\
rmdir /S/Q %BUILDDIR%
mkdir %BUILDDIR%
cd %BUILDDIR%
cmake %PROJDIR% -G"Visual Studio 14 2015" -DBUILD_SHARED_LIBS=ON -DENABLE_TESTING=ON -DCMAKE_CONFIGURATION_TYPES=Release || EXIT /B 1
cmake --build . --config Release --clean-first || EXIT /B 1
ctest -C Release . || EXIT /B 1
cd ..

set BUILDDIR=%PROJDIR%build_win64\
set OUTPUTDIR=%PROJDIR%output\win64\
rmdir /S/Q %BUILDDIR%
mkdir %BUILDDIR%
cd %BUILDDIR%
cmake %PROJDIR% -G"Visual Studio 14 2015 Win64" -DBUILD_SHARED_LIBS=ON -DENABLE_TESTING=ON -DENABLE_AVX2=ON -DCMAKE_CONFIGURATION_TYPES=Release || EXIT /B 1
cmake --build . --config Release --clean-first || EXIT /B 1
ctest -C Release . || EXIT /B 1
cd ..

add enable avx2 flag to windows build script


@echo off

:: --------------------------------------------------------
::
:: Do not edit
::
:: --------------------------------------------------------

set PYBLISH_BASE=%~dp0git\pyblish-base
set PYBLISH_MAYA=%~dp0git\pyblish-maya
set PYBLISH_NUKE=%~dp0git\pyblish-nuke
set PYBLISH_QML=%~dp0git\pyblish-qml
set PYBLISH_LITE=%~dp0git\pyblish-lite
set MINDBENDER_CORE=%~dp0git\mindbender-core
set REPLACE_ME=%~dp0git\mindbender-example\projects
set MBBAT=%~dp0mindbender-core\bin\_mb.bat

:: ---------------------------------------------------------
::
:: Edit here
::
:: ---------------------------------------------------------

:: Replace "%REPLACE_ME%" with e.g. "m:\f03_projects"
call %MBBAT% %REPLACE_ME% %*

@echo off

:: --------------------------------------------------------
::
:: Do not edit
::
:: --------------------------------------------------------

set PYBLISH_BASE=%~dp0git\pyblish-base
set PYBLISH_MAYA=%~dp0git\pyblish-maya
set PYBLISH_NUKE=%~dp0git\pyblish-nuke
set PYBLISH_QML=%~dp0git\pyblish-qml
set PYBLISH_LITE=%~dp0git\pyblish-lite
set MINDBENDER_CORE=%~dp0git\mindbender-core
set REPLACE_ME=%~dp0git\mindbender-example\projects
set MBBAT=%~dp0git\mindbender-core\bin\_mb.bat

:: ---------------------------------------------------------
::
:: Edit here
::
:: ---------------------------------------------------------

:: Replace "%REPLACE_ME%" with e.g. "m:\f03_projects"
call %MBBAT% %REPLACE_ME% %*

Fix mb.bat

Fix mb.bat


@echo on
mkdir build
if errorlevel 1 exit /B 1
cd build
if errorlevel 1 exit /B 1

qmake QMAKE_CC=%CC% QMAKE_CXX=%CXX% ..\libQGLViewer-$PKG_VERSION.pro
if errorlevel 1 exit /B 1

jom -j%CPU_COUNT%
if errorlevel 1 exit /B 1
jom check
if errorlevel 1 exit /B 1
jom install

Create bld.bat

Create bld.bat


@echo off

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

rem   =====================================================
rem   Environment variables that can be defined externally:
rem
rem   JMETER_BIN - JMeter bin directory (must end in \)
rem   JM_LAUNCH - java.exe (default) or javaw.exe
rem   JVM_ARGS - additional java options, e.g. -Dprop=val
rem
rem   =====================================================

if .%JM_LAUNCH% == . set JM_LAUNCH=java.exe

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

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

if exist jmeter.bat goto winNT1
if .%JMETER_BIN% == . set JMETER_BIN=%~dp0

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

:setup4NT
set JMETER_CMD_LINE_ARGS=%$
goto doneStart

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

set JMETER_CMD_LINE_ARGS=

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

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

rem The following link describes the -XX options:
rem http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
rem http://java.sun.com/developer/TechTips/2000/tt1222.html has some more descriptions
rem Unfortunately TechTips no longer seem to be available

rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms512m -Xmx512m
set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m
set SURVIVOR=-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50%
set TENURING=-XX:MaxTenuringThreshold=2
set RMIGC=-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
set PERM=-XX:PermSize=64m -XX:MaxPermSize=64m
rem set DEBUG=-verbose:gc -XX:+PrintTenuringDistribution

rem Always dump on OOM (does not cost anything unless triggered)
set DUMP=-XX:+HeapDumpOnOutOfMemoryError

rem Additional settings that might help improve GUI performance on some platforms
rem See: http://java.sun.com/products/java-media/2D/perf_graphics.html

set DDRAW=
rem  Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of a lot of rendering problems on Win32.
rem set DDRAW=%DDRAW% -Dsun.java2d.noddraw=true

rem  Setting this flag to false turns off DirectDraw offscreen surfaces acceleration by forcing all createVolatileImage calls to become createImage calls, and disables hidden acceleration performed on surfaces created with createImage .
rem set DDRAW=%DDRAW% -Dsun.java2d.ddoffscreen=false

rem Setting this flag to true enables hardware-accelerated scaling.
rem set DDRAW=%DDRAW% -Dsun.java2d.ddscale=true

rem Server mode
rem Collect the settings defined above
set ARGS=%DUMP% %HEAP% %NEW% %SURVIVOR% %TENURING% %RMIGC% %PERM% %DDRAW%

%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

rem If the errorlevel is not zero, then display it and pause

if NOT errorlevel 0 goto pause
if errorlevel 1 goto pause

goto end

:pause
echo errorlevel=%ERRORLEVEL%
pause

:end

@echo off

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

rem   =====================================================
rem   Environment variables that can be defined externally:
rem
rem   JMETER_BIN - JMeter bin directory (must end in \)
rem   JM_LAUNCH - java.exe (default) or javaw.exe
rem   JVM_ARGS - additional java options, e.g. -Dprop=val
rem
rem   =====================================================

if .%JM_LAUNCH% == . set JM_LAUNCH=java.exe

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

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

if exist jmeter.bat goto winNT1
if .%JMETER_BIN% == . set JMETER_BIN=%~dp0

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

:setup4NT
set JMETER_CMD_LINE_ARGS=%$
goto doneStart

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

set JMETER_CMD_LINE_ARGS=

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

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

rem The following link describes the -XX options:
rem http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
rem http://java.sun.com/developer/TechTips/2000/tt1222.html has some more descriptions
rem Unfortunately TechTips no longer seem to be available

rem See the unix startup file for the rationale of the following parameters,
rem including some tuning recommendations
set HEAP=-Xms512m -Xmx512m
set NEW=-XX:NewSize=128m -XX:MaxNewSize=128m
set SURVIVOR=-XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=50%
set TENURING=-XX:MaxTenuringThreshold=2
set RMIGC=-Dsun.rmi.dgc.client.gcInterval=600000 -Dsun.rmi.dgc.server.gcInterval=600000
set PERM=-XX:PermSize=64m -XX:MaxPermSize=128m -XX:+CMSClassUnloadingEnabled
rem set DEBUG=-verbose:gc -XX:+PrintTenuringDistribution

rem Always dump on OOM (does not cost anything unless triggered)
set DUMP=-XX:+HeapDumpOnOutOfMemoryError

rem Additional settings that might help improve GUI performance on some platforms
rem See: http://java.sun.com/products/java-media/2D/perf_graphics.html

set DDRAW=
rem  Setting this flag to true turns off DirectDraw usage, which sometimes helps to get rid of a lot of rendering problems on Win32.
rem set DDRAW=%DDRAW% -Dsun.java2d.noddraw=true

rem  Setting this flag to false turns off DirectDraw offscreen surfaces acceleration by forcing all createVolatileImage calls to become createImage calls, and disables hidden acceleration performed on surfaces created with createImage .
rem set DDRAW=%DDRAW% -Dsun.java2d.ddoffscreen=false

rem Setting this flag to true enables hardware-accelerated scaling.
rem set DDRAW=%DDRAW% -Dsun.java2d.ddscale=true

rem Server mode
rem Collect the settings defined above
set ARGS=%DUMP% %HEAP% %NEW% %SURVIVOR% %TENURING% %RMIGC% %PERM% %DDRAW%

%JM_START% %JM_LAUNCH% %ARGS% %JVM_ARGS% -jar "%JMETER_BIN%ApacheJMeter.jar" %JMETER_CMD_LINE_ARGS%

rem If the errorlevel is not zero, then display it and pause

if NOT errorlevel 0 goto pause
if errorlevel 1 goto pause

goto end

:pause
echo errorlevel=%ERRORLEVEL%
pause

:end

Synchronise settings with Unix version

Synchronise settings with Unix version

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1507623 13f79535-47bb-0310-9956-ffa450edef68

Former-commit-id: c483a5c1787e2fc8b583d4b1a262b1dec36d1521


Update generate_solution.bat

Update generate_solution.bat


mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=True ^
    %SRC_DIR%
if errorlevel 1 exit 1

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

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

Create bld_cxx.bat

Create bld_cxx.bat


dotnet test "test\Infrastructure\Skeleton.Common.Tests" -c %1
dotnet test "test\Infrastructure\Skeleton.CQRS.Implementations.Tests" -c %1
dotnet test "test\Infrastructure\Skeleton.Dapper.Tests" -c %1

cd "test\Web.Tests"
dotnet test -c %1
cd "..\.."

Fix for tests running script was added

Fix for tests running script was added


@ECHO OFF

REM Little batch file to run nearly foerver
REM see http://malektips.com/dos0017.html
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 ping is started as subprocess which runs '%1' seconds

echo "[ping.bat] Blocking for %1 seconds ..."
ping.exe -n %1 -w 1000 127.0.0.1 > nul

@ECHO OFF

REM Little batch file to pause for a number of seconds
REM see http://malektips.com/dos0017.html
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 ping is started as subprocess which runs '%1' seconds

echo "[ping.bat] Blocking for %1 seconds ..."
ping.exe -n %1 -w 1000 127.0.0.1 > nul

Fix doc

Fix doc

git-svn-id: 152f48a1866dc7886cc2b83d2001e6645df26423@1705920 13f79535-47bb-0310-9956-ffa450edef68


if not exist "C:\Windows\Temp\7z1900-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
)
if not exist "C:\Windows\Temp\7z1900-x64.msi" (
    powershell -Command "Start-Sleep 5 ; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z1900-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
if "%PACKER_BUILDER_TYPE%" equ "qemu" goto :qemu
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('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.5.0/14665864/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\"

del /Q "C:\Windows\Temp\vmware-tools.tar"
del /Q "C:\Windows\Temp\windows.iso"
rd /S /Q "C:\Windows\Temp\VMware"
goto :done

:virtualbox

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

if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
    powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://download.virtualbox.org/virtualbox/6.0.10/VBoxGuestAdditions_6.0.10.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
cmd /c for %%i in (C:\Windows\Temp\virtualbox\cert\vbox*.cer) do C:\Windows\Temp\virtualbox\cert\VBoxCertUtil add-trusted-publisher %%i --root %%i
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
rd /S /Q "C:\Windows\Temp\virtualbox"
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"
)
goto :done

:qemu
if exist "E:\guest-agent\" (
    msiexec /qb /x E:\guest-agent\qemu-ga-x86_64.msi
)

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

if not exist "C:\Windows\Temp\7z1900-x64.msi" (
    powershell -Command "(New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
)
if not exist "C:\Windows\Temp\7z1900-x64.msi" (
    powershell -Command "Start-Sleep 5 ; (New-Object System.Net.WebClient).DownloadFile('https://www.7-zip.org/a/7z1900-x64.msi', 'C:\Windows\Temp\7z1900-x64.msi')" <NUL
)
msiexec /qb /i C:\Windows\Temp\7z1900-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
if "%PACKER_BUILDER_TYPE%" equ "qemu" goto :qemu
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('https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.5.1/15018445/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\"

del /Q "C:\Windows\Temp\vmware-tools.tar"
del /Q "C:\Windows\Temp\windows.iso"
rd /S /Q "C:\Windows\Temp\VMware"
goto :done

:virtualbox

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

if not exist "C:\Windows\Temp\VBoxGuestAdditions.iso" (
    powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://download.virtualbox.org/virtualbox/6.1.2/VBoxGuestAdditions_6.1.2.iso', 'C:\Windows\Temp\VBoxGuestAdditions.iso')" <NUL
)

cmd /c ""C:\Program Files\7-Zip\7z.exe" x C:\Windows\Temp\VBoxGuestAdditions.iso -oC:\Windows\Temp\virtualbox"
cmd /c for %%i in (C:\Windows\Temp\virtualbox\cert\vbox*.cer) do C:\Windows\Temp\virtualbox\cert\VBoxCertUtil add-trusted-publisher %%i --root %%i
cmd /c C:\Windows\Temp\virtualbox\VBoxWindowsAdditions.exe /S
rd /S /Q "C:\Windows\Temp\virtualbox"
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"
)
goto :done

:qemu
if exist "E:\guest-agent\" (
    msiexec /qb /x E:\guest-agent\qemu-ga-x86_64.msi
)

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

Update VMware 15.5.1, update VirtualBox 6.1.2


java -Xmx200m -Xms100m -XX:+UseG1GC -jar failchat-${project.version}.jar --no-gui --enable-console-logging

Add 'enable-console-logging' parameter to failchat-no-gui.bat


del coverage.xml
del /Q report\*
dotnet test /p:AltCover=true
dotnet reportgenerator -reports:coverage.xml -targetdir:report "-assemblyfilters:-xunit.*"

fix runcover.bat to delete the prev results before running


dir "%LIBRARY_BIN%"
exit 1

:: Compile clapack
%PYTHON% %RECIPE_DIR%\get_clapack_src.py
if errorlevel 1 exit 1

mkdir build_clapack
if errorlevel 1 exit 1
cd build_clapack
if errorlevel 1 exit 1

cmake ^
    -G "%CMAKE_GENERATOR%" ^
    -DCMAKE_INSTALL_PREFIX="%SRC_DIR%\ext" ^
    -DBoost_ROOT_DIR="%LIBRARY_INC%" ^
    ../clapack
if errorlevel 1 exit 1

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

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

:: Start actual ALPS build
cd %SRC_DIR%
if errorlevel 1 exit 1

mkdir build
if errorlevel 1 exit 1

cd build
if errorlevel 1 exit 1

set PYTHON_LIBRARY=%PREFIX%\libs\python%PY_VER:~0,1%%PY_VER:~2,1%.lib

cmake ^
      -Wno-dev ^
      -G "%CMAKE_GENERATOR%" ^
      -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
      -DBUILD_STATIC_LIBS=1 ^
      -DBUILD_SHARED_LIBS=1 ^
      -DALPS_ENABLE_MPI=OFF ^
      -DALPS_BUILD_APPLICATIONS=ON ^
      -DALPS_BUILD_EXAMPLES=OFF ^
      -DBOOST_ROOT="%PREFIX%" ^
      -DBoost_NO_SYSTEM_PATHS=ON ^
      -DBOOST_INCLUDEDIR="%LIBRARY_INC%" ^
      -DBOOST_LIBRARYDIR="%LIBRARY_BIN%" ^
      -DLAPACK_FOUND=TRUE ^
      -DBLAS_LIBRARY="%SRC_DIR%\ext\lib\blas.lib" ^
      -DLAPACK_LIBRARY="%SRC_DIR%\ext\lib\lapack.lib" ^
      -DPYTHON_EXECUTABLE="%PYTHON%" ^
      -DPYTHON_INCLUDE_DIR:PATH="%PREFIX%/include" ^
      -DPYTHON_LIBRARY:FILEPATH="%PYTHON_LIBRARY%" ^
      -DPYTHON_NUMPY_INCLUDE_DIR:PATH="%SP_DIR%/numpy/core/include" ^
      ..
if errorlevel 1 exit 1

cmake --build . --config Release --target alps
if errorlevel 1 exit 1

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

ctest --output-on-failure
if errorlevel 1 exit 1

:: Move pyalps to site packages
move %LIBRARY_LIB%\pyalps "%SP_DIR%"

Update bld.bat

Update bld.bat


@echo off
:: Get the file name
for /f "delims=" %%a in ('dir /b wix.d\MinionMSI\bin\Release\*.msi')   do @set "msi=%%a"

@echo on

msiexec /x wix.d\MinionMSI\bin\Release\%msi% /qb! KEEP_CONFIG=0
dir /s /b \salt

@echo off
:: Get the file name
for /f "delims=" %%a in ('dir /b wix.d\MinionMSI\bin\Release\*.msi')   do @set "msi=%%a"

@echo on
msiexec /x wix.d\MinionMSI\bin\Release\%msi% /qb! KEEP_CONFIG=0
@echo off

dir "C:\salt" >nul 2>&1
if %errorLevel%==0 (
  dir /s /b c:\salt
)

check before dir

check before dir


@rem
@call :amazonIsdn 1626710104
@call :amazonIsdn 0321942051
@call :amazonIsdn 012408138X
@goto:eof

:amazonIsdn
@echo input ISDN is %~1
@set isdn=%~1
@curl -s -L http://www.amazon.com/dp/%isdn% 1>tmpFile

@for /f "tokens=1 delims="  %%a in ('findstr /R "btAsinTitle" tmpFile') do @set title="%%a"
@rem echo %title%
@for /f "tokens=2 delims=>" %%b in ('echo %title%') do @set title="%%b"
@rem echo %title%
@for /f "tokens=1 delims=<" %%c in ('echo %title%') do @set title="%%c"

@for /f "tokens=1 delims=" %%d in ('findstr /R "Publication.*Date.*ISBN-10.*%isbn%.*Edition.*" tmpFile') do @set details="%%d"
@rem echo Details : %details%

@for /f "tokens=1 delims=|" %%e in ('echo %details%') do @set publishdate='%%e'
@for /f "tokens=2 delims=|" %%f in ('echo %details%') do @set isbn-10=%%f
@for /f "tokens=3 delims=|" %%f in ('echo %details%') do @set isbn-13=%%f
@for /f "tokens=4 delims=|" %%f in ('echo %details%') do @set edition="%%f"

@set title=%title:~2,-1%
@set publishdate=%publishdate:~105,-35%
@set isbn-10=%isbn-10:~50,-35%
@set isbn-13=%isbn-13:~50,-35%
@set edition=%edition:~51,-17%
@echo Title   : %title%
@echo Publish : %publishdate%
@echo ISBN-10 : %isbn-10%
@echo ISBN-13 : %isbn-13%
@echo Edition : %edition%

@del tmpFile

@rem
@call :amazonIsdn 1626710104
@call :amazonIsdn 0321942051
@call :amazonIsdn 012408138X
@call :amazonIsdn B00BFWI6CG
@goto:eof

:amazonIsdn
@echo input ISDN is %~1
@set isdn=%~1
@curl -s -L http://www.amazon.com/dp/%isdn% 1>tmpFile

@rem do check first

@findstr /R "btAsinTitle" tmpFile > tempfindoutput
@rem Notice 'findstr /R /N "^" tempfindoutput ^| find /C ":"' is count of fileline.
@for /f %%i in ('findstr /R /N "^" tempfindoutput ^| find /C ":"') do @set FINDOUTPUT=%%i
@IF %FINDOUTPUT%==0 @goto:notFoundExit

@for /f "tokens=1 delims="  %%a in ('findstr /R "btAsinTitle" tmpFile') do @set title="%%a"
@rem echo %title%
@for /f "tokens=2 delims=>" %%b in ('echo %title%') do @set title="%%b"
@rem echo %title%
@for /f "tokens=1 delims=<" %%c in ('echo %title%') do @set title="%%c"

@for /f "tokens=1 delims=" %%d in ('findstr /R "Publication.*Date.*ISBN-10.*%isbn%.*Edition.*" tmpFile') do @set details="%%d"
@rem echo Details : %details%

@for /f "tokens=1 delims=|" %%e in ('echo %details%') do @set publishdate='%%e'
@for /f "tokens=2 delims=|" %%f in ('echo %details%') do @set isbn-10=%%f
@for /f "tokens=3 delims=|" %%f in ('echo %details%') do @set isbn-13=%%f
@for /f "tokens=4 delims=|" %%f in ('echo %details%') do @set edition="%%f"

@set title=%title:~2,-1%
@set publishdate=%publishdate:~105,-35%
@set isbn-10=%isbn-10:~50,-35%
@set isbn-13=%isbn-13:~50,-35%
@set edition=%edition:~51,-17%
@echo Title   : %title%
@echo Publish : %publishdate%
@echo ISBN-10 : %isbn-10%
@echo ISBN-13 : %isbn-13%
@echo Edition : %edition%
@goto :cleanExit

:notFoundExit
@echo Error: No result found for %isdn%
:cleanExit
@rem clean varibles
@set title=
@set details=
@del tempfindoutput
@del tmpFile

improve for dos batch for renaming ebook


@SETLOCAL enableextensions enabledelayedexpansion
@ECHO OFF

SET CURRENT_DIR=%cd%

:JAVAC_READY
WHERE "javac.exe">nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=JDK ã  ϴ.
	GOTO :ERR
)
ECHO === JDK غ [OK]

:PYTHON_READY
WHERE "python.exe">nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=̽ ã  ϴ
	GOTO :ERR
)
ECHO === ̽ غ [OK]

:ANDROID_SDK_READY
WHERE "SDK Manager.exe">nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=ȵ̵ SDK ã  ϴ.
	GOTO :ERR
)
ECHO === ȵ̵ SDK [OK]

:MAKE_APK_PY_READY
ECHO === make_apk.py  ã ֽϴ.
WHERE /R %HOMEPATH%\desktop make_apk.py >temp_path.txt 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=make_apk.py  ã  ϴ
	GOTO :ERR
)

:SET_XWALK_PATH
SET /p TEMP_XWALK_PATH=0<temp_path.txt
DEL temp_path.txt
SET XWALK_PATH=%TEMP_XWALK_PATH%
ECHO === make_apk.py غ [OK]
SET /p PACKAGE=package name Էϼ(com.biud436.example.sample):
IF EXIST manifest.json (
	SET MANIFEST=manifest.json
) ELSE (
	SET ERRORMSG=manifest.json  ã  ϴ.
	GOTO :ERR
)
ECHO === manifest.json غ [OK]
IF EXIST *.keystore (
	GOTO :FOUND_ALREADY_KEYSTORE
) ELSE (
	GOTO :NOT_FOUND
)

:FOUND_ALREADY_KEYSTORE
ECHO === Ű  غ [OK]
ECHO === Ű  ã ֽϴ.
WHERE /r %CURRENT_DIR% *.keystore >temp_path.txt 2>nul
SET /p KS_PATH=0<temp_path.txt
DEL temp_path.txt
ECHO %KS_PATH% ãҽϴ.
SET /p KS_ALIAS=Ű Ī Էϼ:
SET /p KS_PASSCODE=Ű йȣ Էϼ(6ڸ̻):
SET /p KS_ALIAS_PASSCODE=Ű йȣ ٽ   Էϼ(6ڸ̻):
GOTO :MAKE_APK

:NOT_FOUND

ECHO Ű  ã  ϴ.
CHOICE /C YN -M "Ű  Ͻðڽϱ?"
IF %ERRORLEVEL%==1 (
	GOTO :CREATE_KEYSTORE
) ELSE (
	GOTO :OTHER_KEYSTORE_SET
)

:CREATE_KEYSTORE

where keytool.exe>nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=keytool Ƿ Ű    ϴ.
	GOTO ERR
)
SET /p KS_PATH=Ű θ Էϼ(Ȯڴ keystore):
SET /p KS_ALIAS=Ű Ī Էϼ:
SET /p KS_PASSCODE=Ű йȣ Էϼ:
SET /P KS_ALIAS_PASSCODE=Ű йȣ ٽ   Էϼ:
SET CN=%PACKAGE%
SET /P OU=  ̸ Էϼ:
SET /P O= ̸ Էϼ:
SET /P L=// ̸ Էϼ:
SET /P S=/ ̸ Էϼ:
SET C=KR
keytool -genkey -v -keystore %KS_PATH% -alias %KS_ALIAS% -keyalg RSA -keysize 2048 -validity 10000 -keypass %KS_PASSCODE% -storepass %KS_ALIAS_PASSCODE% -dname "CN=%CN%,OU=%OU%,O=%O%,L=%L%,S=%S%,C=%C%"
GOTO :MAKE_APK

:OTHER_KEYSTORE_SET

SET /p KS_PATH=Ű  θ Էϼ (game.keystore):

IF NOT EXIST %KS_PATH% (
	SET ERRORMSG=Ű  ϴ.
	GOTO :ERR
)
SET /p KS_ALIAS=Ű Ī Էϼ:
SET /p KS_PASSCODE=Ű йȣ Էϼ(6ڸ̻):
SET /p KS_ALIAS_PASSCODE=Ű йȣ ٽ   Էϼ(6ڸ̻):

:MAKE_APK
SET ARCH=arm
SET MODE=embedded
SET XCL='--ignore-gpu-blacklist:--show-fps-counter'

%XWALK_PATH% --package=%PACKAGE% --manifest=%MANIFEST% --keystore-path=%KS_PATH% --keystore-alias=%KS_ALIAS% --keystore-passcode=%KS_PASSCODE% --keystore-alias-passcode=%KS_ALIAS_PASSCODE% --keep-screen-on --fullscreen --orientation=landscape --arch=%ARCH% --mode=%MODE% --xwalk-command-line=%XCL% --enable-remote-debugging

@ENDLOCAL
GOTO :EOF
PAUSE >NUL

:ERR
ECHO %ERRORMSG%
PAUSE >NUL
GOTO :EOF

@SETLOCAL enableextensions enabledelayedexpansion
@ECHO OFF

SET CURRENT_DIR=%cd%

:JAVAC_READY
WHERE "javac.exe">nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=JDK ã  ϴ.
	GOTO :ERR
)
ECHO === JDK غ [OK]

:PYTHON_READY
WHERE "python.exe">nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=̽ ã  ϴ
	GOTO :ERR
)
ECHO === ̽ غ [OK]

:ANDROID_SDK_READY
WHERE "SDK Manager.exe">nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=ȵ̵ SDK ã  ϴ.
	GOTO :ERR
)
ECHO === ȵ̵ SDK [OK]

:MAKE_APK_PY_READY
ECHO === make_apk.py  ã ֽϴ.
WHERE /R %HOMEPATH%\desktop make_apk.py >temp_path.txt 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=make_apk.py  ã  ϴ
	GOTO :ERR
)

:SET_XWALK_PATH
SET /p TEMP_XWALK_PATH=0<temp_path.txt
DEL temp_path.txt
SET XWALK_PATH=%TEMP_XWALK_PATH%
ECHO === make_apk.py غ [OK]
SET /p PACKAGE=package name Էϼ(com.biud436.example.sample):
IF EXIST manifest.json (
	SET MANIFEST=manifest.json
) ELSE (
	SET ERRORMSG=manifest.json  ã  ϴ.
	GOTO :ERR
)
ECHO === manifest.json غ [OK]
IF EXIST *.keystore (
	GOTO :FOUND_ALREADY_KEYSTORE
) ELSE (
	GOTO :NOT_FOUND
)

:FOUND_ALREADY_KEYSTORE
ECHO === Ű  غ [OK]
ECHO === Ű  ã ֽϴ.
WHERE /r %CURRENT_DIR% *.keystore >temp_path.txt 2>nul
SET /p KS_PATH=0<temp_path.txt
DEL temp_path.txt
ECHO %KS_PATH% ãҽϴ.
SET /p KS_ALIAS=Ű Ī Էϼ:
SET /p KS_PASSCODE=Ű йȣ Էϼ(6ڸ̻):
SET /p KS_ALIAS_PASSCODE=Ű йȣ ٽ   Էϼ(6ڸ̻):
GOTO :MAKE_APK

:NOT_FOUND

ECHO Ű  ã  ϴ.
CHOICE /C YN -M "Ű  Ͻðڽϱ?"
IF %ERRORLEVEL%==1 (
	GOTO :CREATE_KEYSTORE
) ELSE (
	GOTO :OTHER_KEYSTORE_SET
)

:CREATE_KEYSTORE

where keytool.exe>nul 2>nul
IF NOT %errorlevel%==0 (
	SET ERRORMSG=keytool Ƿ Ű    ϴ.
	GOTO ERR
)
SET /p KS_PATH=Ű θ Էϼ(Ȯڴ keystore):
SET /p KS_ALIAS=Ű Ī Էϼ:
SET /p KS_PASSCODE=Ű йȣ Էϼ:
SET /P KS_ALIAS_PASSCODE=Ű йȣ ٽ   Էϼ:
SET CN=%PACKAGE%
SET /P OU=  ̸ Էϼ:
SET /P O= ̸ Էϼ:
SET /P L=// ̸ Էϼ:
SET /P S=/ ̸ Էϼ:
SET C=KR
keytool -genkey -v -keystore %KS_PATH% -alias %KS_ALIAS% -keyalg RSA -keysize 2048 -validity 10000 -keypass %KS_PASSCODE% -storepass %KS_ALIAS_PASSCODE% -dname "CN=%CN%,OU=%OU%,O=%O%,L=%L%,S=%S%,C=%C%"
GOTO :MAKE_APK

:OTHER_KEYSTORE_SET

SET /p KS_PATH=Ű  θ Էϼ (game.keystore):

IF NOT EXIST %KS_PATH% (
	SET ERRORMSG=Ű  ϴ.
	GOTO :ERR
)
SET /p KS_ALIAS=Ű Ī Էϼ:
SET /p KS_PASSCODE=Ű йȣ Էϼ(6ڸ̻):
SET /p KS_ALIAS_PASSCODE=Ű йȣ ٽ   Էϼ(6ڸ̻):

:MAKE_APK
SET ARCH=arm
SET MODE=embedded
SET XCL='--ignore-gpu-blacklist'

%XWALK_PATH% --package=%PACKAGE% --manifest=%MANIFEST% --keystore-path=%KS_PATH% --keystore-alias=%KS_ALIAS% --keystore-passcode=%KS_PASSCODE% --keystore-alias-passcode=%KS_ALIAS_PASSCODE% --keep-screen-on --fullscreen --orientation=landscape --arch=%ARCH% --mode=%MODE% --xwalk-command-line=%XCL% --enable-remote-debugging

@ENDLOCAL
GOTO :EOF
PAUSE >NUL

:ERR
ECHO %ERRORMSG%
PAUSE >NUL
GOTO :EOF

build file updated

build file updated


REM modify the line below to point to the folder where the OC Data Importer Python Script is stored
"C:\path_to_where_the_Importer_Script_is_stored\OC Data Importer 1.0.py"

Create import.cmd

Create import.cmd


@ECHO OFF
:: Performs necessary setup steps to allow the use of
:: virtualenv commands such as "mkvirtualenv [ENV_NAME]"
:: for creating and using Python virtual environments.

python -m pip install --upgrade virtualenv
python -m pip install --upgrade virtualenvwrapper-win
echo:
echo:
echo: *** You may now use virtualenv commands in your command shell. ***
echo:
echo: virtualenv commands:
echo:   *  "mkvirtualenv [ENV_NAME]"  -  Create a Python virtual environment
echo:   *  "deactivate"               -  Exit the current virtual environment
echo:   *  "workon [ENV_NAME]"        -  Enter an existing virtual environment
echo:   *  "lsvirtualenv" OR "workon" -  List all virtual environments
echo:   *  "rmvirtualenv [ENV_NAME]"  -  Delete a virtual environment
echo:
echo: Example:
echo:       mkvirtualenv seleniumbase
echo:       mkvirtualenv seleniumbase --python=[PATH_TO_PYTHON]
echo:

@ECHO OFF
:: Performs necessary setup steps to allow the use of
:: virtualenv commands such as "mkvirtualenv [ENV_NAME]"
:: for creating and using Python virtual environments.

python -m pip install --upgrade virtualenvwrapper-win
echo:
echo:
echo: *** You may now use virtualenv commands in your command shell. ***
echo:
echo: virtualenv commands:
echo:   *  "mkvirtualenv [ENV_NAME]"  -  Create a Python virtual environment
echo:   *  "deactivate"               -  Exit the current virtual environment
echo:   *  "workon [ENV_NAME]"        -  Enter an existing virtual environment
echo:   *  "lsvirtualenv" OR "workon" -  List all virtual environments
echo:   *  "rmvirtualenv [ENV_NAME]"  -  Delete a virtual environment
echo:
echo: Example:
echo:       mkvirtualenv seleniumbase
echo:       mkvirtualenv seleniumbase --python=[PATH_TO_PYTHON]
echo:

Simplify virtualenv installation on Windows


dotnet restore
dotnet pack -c Release CommandLineArgumentsParser\project.json
pause

add build command for nuget

add build command for nuget


@echo off
@rem Wrapper arounf jpm

janet %~dp0\jpm.janet %*

@echo off
@rem Wrapper around jpm

janet %~dp0\jpm.janet %*

Fix typo in jpm.bat

Fix typo in jpm.bat


@echo off

call semver.bat %* -s version

@echo on

add release

[GladiatorCots] add release


cd /d %~dp0

@echo off
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFLoginServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFMasterServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFProxyServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFWorldServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFGameServer\\ /Y

copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFLoginServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFMasterServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFProxyServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFWorldServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFGameServer\\ /Y

cd  AFMasterServer

echo Starting AFMasterServer...
start "" "PluginLoader_d.exe"

choice /t 2 /d y /n >nul
cd  ..
cd  AFWorldServer
echo Starting AFWorldServer...
start "" "PluginLoader_d.exe"

REM choice /t 5 /d y /n >nul

REM cd  ..
REM cd  AFLoginServer
REM echo Starting AFLoginServer...
REM start "" "PluginLoader_d.exe"

REM choice /t 2 /d y /n >nul

REM cd  ..
REM cd  AFGameServer
REM echo Starting AFGameServer...
REM start "" "PluginLoader_d.exe"

REM choice /t 4 /d y /n >nul

REM cd  ..
REM cd  AFProxyServer
REM echo Starting AFProxyServer...
REM start "" "PluginLoader_d.exe"

cd /d %~dp0

@echo off
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFLoginServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFMasterServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFProxyServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFWorldServer\\ /Y
copy ..\\..\\..\\Bin\\Comm\\Debug\\PluginLoader_d.exe AFGameServer\\ /Y

copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFLoginServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFMasterServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFProxyServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFWorldServer\\ /Y
copy ..\\..\\..\\Dep\\lib\\Debug\\libproto*d.dll AFGameServer\\ /Y

cd  AFMasterServer

echo Starting AFMasterServer...
start "" "PluginLoader_d.exe"

choice /t 2 /d y /n >nul
cd  ..
cd  AFWorldServer
echo Starting AFWorldServer...
start "" "PluginLoader_d.exe"

choice /t 5 /d y /n >nul

cd  ..
cd  AFLoginServer
echo Starting AFLoginServer...
start "" "PluginLoader_d.exe"

choice /t 2 /d y /n >nul

cd  ..
cd  AFGameServer
echo Starting AFGameServer...
start "" "PluginLoader_d.exe"

choice /t 4 /d y /n >nul

cd  ..
cd  AFProxyServer
echo Starting AFProxyServer...
start "" "PluginLoader_d.exe"

modify run.bat run AFLoginServer,AFGameServer,AFProxySe

Former-commit-id: 42783e6c6978cb5619e7698fe08423e00db604a3
Former-commit-id: 3b2e6766d6301618c700390de04d0ae7d4211196


:: Enable command line extensions
VERIFY OTHER 2>NUL
SETLOCAL ENABLEEXTENSIONS
IF ERRORLEVEL 1 (
    ECHO "Cannot enable command line extensions."
    EXIT /B 1
)

:: Change to Workcraft home directory and put it into the WORKCRAFT_HOME variable
SET WORKCRAFT_HOME=%~dp0
PUSHD "%WORKCRAFT_HOME%"

:: SET the JVM executable in the JAVA_BIN variable (if not defined yet)
IF NOT DEFINED JAVA_BIN (
    IF NOT DEFINED JAVA_HOME (
        SET JAVA_BIN=javaw.exe
    ) ELSE (
        IF EXIST "%JAVA_HOME%\bin\javaw.exe" (
            SET "JAVA_BIN=%JAVA_HOME%\bin\javaw.exe"
        ) ELSE (
            SET "JAVA_BIN=%JAVA_HOME%\javaw.exe"
        )
    )
)

:: Add all the plugins and third-party JARs to the CLASSPATH variable
SET CLASSPATH=^
%WORKCRAFT_HOME%\CircuitPlugin\bin;^
%WORKCRAFT_HOME%\CpogsPlugin\bin;^
%WORKCRAFT_HOME%\DfsPlugin\bin;^
%WORKCRAFT_HOME%\FsmPlugin\bin;^
%WORKCRAFT_HOME%\FstPlugin\bin;^
%WORKCRAFT_HOME%\GraphPlugin\bin;^
%WORKCRAFT_HOME%\MpsatSynthesisPlugin\bin;^
%WORKCRAFT_HOME%\MpsatVerificationPlugin\bin;^
%WORKCRAFT_HOME%\PcompPlugin\bin;^
%WORKCRAFT_HOME%\PetriNetPlugin\bin;^
%WORKCRAFT_HOME%\PetrifyExtraPlugin\bin;^
%WORKCRAFT_HOME%\PetrifyPlugin\bin;^
%WORKCRAFT_HOME%\PolicyNetPlugin\bin;^
%WORKCRAFT_HOME%\PunfPlugin\bin;^
%WORKCRAFT_HOME%\SONPlugin\bin;^
%WORKCRAFT_HOME%\STGPlugin\bin;^
%WORKCRAFT_HOME%\ThirdParty\*;^
%WORKCRAFT_HOME%\ThirdParty\batik\*;^
%WORKCRAFT_HOME%\WorkcraftCore\bin;^
%WORKCRAFT_HOME%\XmasPlugin\bin;^
;

:: Run Workcraft with the specific JAVA_BIN and CLASSPATH
"%JAVA_BIN%" org.workcraft.Console %*

:: Restore the current working directory
POPD
ENDLOCAL

:: Enable command line extensions
VERIFY OTHER 2>NUL
SETLOCAL ENABLEEXTENSIONS
IF ERRORLEVEL 1 (
    ECHO "Cannot enable command line extensions."
    EXIT /B 1
)

:: Change to Workcraft home directory and put it into the WORKCRAFT_HOME variable
SET WORKCRAFT_HOME=%~dp0
CD "%WORKCRAFT_HOME%"

:: SET the JVM executable in JAVA_BIN variable (if not defined yet)
IF NOT DEFINED JAVA_BIN (
    IF NOT DEFINED JAVA_HOME (
        SET JAVA_BIN=javaw.exe
    ) ELSE (
        IF EXIST "%JAVA_HOME%\bin\javaw.exe" (
            SET "JAVA_BIN=%JAVA_HOME%\bin\javaw.exe"
        ) ELSE (
            SET "JAVA_BIN=%JAVA_HOME%\javaw.exe"
        )
    )
)

SET CLASSPATH=%WORKCRAFT_HOME%\workcraft.jar;%WORKCRAFT_HOME%\plugins\*

"%JAVA_BIN%" org.workcraft.Console %*

ENDLOCAL

Update of workcraft.bat runner script for Windows


powershell -ExecutionPolicy Bypass -command "(Get-AuthenticodeSignature \"C:\Temp\CatalogPC.cab\").Status -eq 'Valid'"

REM https://stackoverflow.com/a/19876949

Update PS_VerifyFileSig.bat

Update PS_VerifyFileSig.bat


@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\..\apm\bin\apm" %*
) ELSE (
  node  "%~dp0\..\apm\bin\apm" %*
)

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe"  "%~dp0\..\bin\apm" %*
) ELSE (
  node "%~dp0\..\bin\apm" %*
)

Fix apm.cmd paths

Fix apm.cmd paths