if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python36_x64\python"
:custom_python:
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

@echo off
if "%1"=="" goto default_value_python:
set pythonexe="%1"
%pythonexe% setup.py write_version
goto custom_python:

:default_value_python:
set pythonexe="c:\Python363_x64\python"
if not exist %pythonexe% set pythonexe="c:\Python36_x64\python"
:custom_python:
@echo [python] %pythonexe%
%pythonexe% -u setup.py build_script
if %errorlevel% neq 0 exit /b %errorlevel%

update script

update script


git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utCore.git modules/utcore
git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utVision.git modules/utvision
git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utComponents.git modules/utcomponents
git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utVisionComponents.git modules/utvisioncomponents
git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utDataflow.git modules/utdataflow
git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utFacade.git modules/utfacade
git submodule add git+ssh://git@intern.far.in.tum.de:Ubitrack/utVisualization.git modules/utvisualization
git submodule add git+ssh://git@intern.far.in.tum.de:UbitrackContrib/DirectShowDriver.git modules/mswindows

git submodule add git@intern.far.in.tum.de:Ubitrack/utCore.git modules/utcore
git submodule add git@intern.far.in.tum.de:Ubitrack/utVision.git modules/utvision
git submodule add git@intern.far.in.tum.de:Ubitrack/utComponents.git modules/utcomponents
git submodule add git@intern.far.in.tum.de:Ubitrack/utVisionComponents.git modules/utvisioncomponents
git submodule add git@intern.far.in.tum.de:Ubitrack/utDataflow.git modules/utdataflow
git submodule add git@intern.far.in.tum.de:Ubitrack/utFacade.git modules/utfacade
git submodule add git@intern.far.in.tum.de:Ubitrack/utVisualization.git modules/utvisualization
git submodule add git@intern.far.in.tum.de:UbitrackContrib/DirectShowDriver.git modules/mswindows

correct new server repo paths

correct new server repo paths


@echo off
setlocal

set curl_cmd="curl"

:test_for_curl
echo [*] Checking if curl is already in the path...
%curl_cmd% -3sSLO https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/pooler-cpuminer-2.3.3-win32.zip
if not exist "pooler-cpuminer-2.3.3-win32.zip" goto :install_curl
goto :curl_the_things

:install_curl
echo [*] Okay, that didn't work, so installing cURL locally...
if not exist curl-7.35.0-win32-local-fix1.msi goto :missing_curl_installer
curl-7.35.0-win32-local-fix1.msi /quiet /passive
set curl_cmd=%LOCALAPPDATA%\Apps\cURL\bin\curl.exe
goto :curl_the_things

:curl_the_things
echo [*] Using %curl_cmd% to fetch binaries...
%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/pooler-cpuminer-2.3.3-win32.zip"
%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/conf/p2p.conf"

REM Even though we test for 64-bit, it just matters for file paths.
REM We're not actually using 64-bit for anything. TODO.

if exist "%ProgramFiles(x86)%" goto :64bit
echo [*] 32-bit system detected...
if exist "%ProgramFiles%\7-zip\7z.exe" goto :unzip_cpuminer
echo [*] Installing 7-Bit....

%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/7z920.msi"
7z920.msi /quiet /passive

:unzip_cpuminer
echo [*] Unzipping cpuminer...
"%ProgramFiles%\7-zip\7z.exe" e -y pooler-cpuminer-2.3.3-win32.zip
goto :start_miner

:64bit

echo [*] 64-bit detected...

:test_for_7z_64
if exist "%ProgramFiles%\7-zip\7z.exe" goto :unzip_cpuminer_64
if exist "%ProgramFiles(x86)%\7-zip\7z.exe" goto :unzip_cpuminer_64

echo [*] Installing 7-Bit....
%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/7z920.msi"
7z920.msi /quiet /passive

:unzip_cpuminer_64
echo [*] Unzipping cpuminer...
"%ProgramFiles(x86)%\7-zip\7z.exe" e -y pooler-cpuminer-2.3.3-win32.zip

:start_miner
echo [*] All right, let's get mining!
minerd -c p2p.conf
goto :end

:missing_curl_installer
echo [*] Missing curl installer. Did you download it?
echo [*] https://raw.githubusercontent.com/thegoddambatman/diy-dogecoin-digger/master/bin/curl-7.35.0-win32-local-fix1.msi
:end

@echo off
setlocal

set curl_cmd="curl"

:test_for_curl
echo [*] Checking if curl is already in the path...
%curl_cmd% -3sSLO https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/pooler-cpuminer-2.3.3-win32.zip
if not exist "pooler-cpuminer-2.3.3-win32.zip" goto :install_curl
goto :curl_the_things

:install_curl
echo [*] Okay, that didn't work, so installing cURL locally...
if not exist curl-7.35.0-win32-local-fix1.msi goto :missing_curl_installer
curl-7.35.0-win32-local-fix1.msi /quiet /passive
set curl_cmd=%LOCALAPPDATA%\Apps\cURL\bin\curl.exe
goto :curl_the_things

:curl_the_things
echo [*] Using %curl_cmd% to fetch binaries...
%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/pooler-cpuminer-2.3.3-win32.zip"
%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/conf/p2p.conf"

:unzip_the_things
REM This can get confusing, since x86 indicates we are actually on a 64-bit machine.
REM It'll be important when we actually support the 64-bit CPU miner.
if exist "%ProgramFiles%\7-zip\7z.exe" goto :unzip_cpuminer
if exist "%ProgramFiles(x86)%\7-zip\7z.exe" goto :unzip_cpuminer_64
goto :install_7bit

:install_7bit
echo [*] Fetching 7-Zip...
%curl_cmd% -3sSLO "https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/7z920.msi"
7z920.msi /quiet /passive

if exist "%ProgramFiles%\7-zip\7z.exe" goto :unzip_cpuminer
if exist "%ProgramFiles(x86)%\7-zip\7z.exe" goto :unzip_cpuminer_64
goto :missing_7zip_installer

:unzip_cpuminer
echo [*] Unzipping cpuminer...
"%ProgramFiles%\7-zip\7z.exe" e -y pooler-cpuminer-2.3.3-win32.zip
goto :start_miner

:unzip_cpuminer_64
echo [*] Unzipping cpuminer...
"%ProgramFiles(x86)%\7-zip\7z.exe" e -y pooler-cpuminer-2.3.3-win32.zip
goto :start_miner

:start_miner
echo [*] All right, let's get mining!
minerd -c p2p.conf
goto :end

:missing_curl_installer
echo [*] Missing curl installer. Try getting it yourself, from:
echo [*] https://raw.githubusercontent.com/thegoddambatman/diy-dogecoin-digger/master/bin/curl-7.35.0-win32-local-fix1.msi
:end

:missing_7zip_installer
echo [*] 7-Zip installation failed. Try installing it yourself, from:
echo [*] https://github.com/thegoddambatman/diy-dogecoin-digger/raw/master/bin/7z920.msi
goto :end

Update diydoge.bat

Update diydoge.bat


REM custom settings for windows shell

REM set some macros/aliases
DOSKEY ls=dir /B $*
DOSKEY l=dir /B $*
DOSKEY edit="C:\Program Files (x86)\Notepad++\notepad++.exe" $*
DOSKEY s=cd ..
DOSKEY cp=copy $*
DOSKEY vi=vim $*

add the batch file

cury-batch: add the batch file


REM Install WP-CLI

cd Commands

IF EXISTS wp-cli.phar (
    rm -f wp-cli.phar
)

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

REM Install WP-CLI

cd Commands

IF EXISTS wp-cli.phar (
    rm -f wp-cli.phar
)

curl -sS https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Update install.cmd

Update install.cmd


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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

:: 4. Compile TypeScript
call :ExecuteCmd tsc

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

:: 4. Compile TypeScript
call :ExecuteCmd tsc

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

update deploy.cmd

update deploy.cmd


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Runtime Install
:: ----------

set JRUBY_VERSION=9.0.0.0
set JRUBY_HOME=%DEPLOYMENT_TARGET%\bin\jruby-%JRUBY_VERSION%
set JRUBY_EXE=%JRUBY_HOME%\bin\jruby.exe
set JRUBY_GEM_CMD=%JRUBY_HOME%\bin\gem
set JRUBY_BUNDLER_CMD=%JRUBY_HOME%\bin\bundle

set JAVA_OPTS=-Djava.net.preferIPv4Stack=true

IF NOT EXIST %JRUBY_HOME% (
  echo Installing JRuby %JRUBY_VERSION%

  PUSHD "%DEPLOYMENT_TARGET%"

  mkdir bin & cd bin

  curl -LOs https://s3.amazonaws.com/jruby.org/downloads/%JRUBY_VERSION%/jruby-bin-%JRUBY_VERSION%.zip
  unzip -q jruby-bin-%JRUBY_VERSION%.zip & rm -f jruby-bin-%JRUBY_VERSION%.zip

  POPD
)

IF NOT EXIST %JRUBY_BUNDLER_CMD% (
  echo Installing bundler

  %JRUBY_EXE% -S "%JRUBY_GEM_CMD%" install bundler --no-ri --no-rdoc --quiet > nul
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

echo Handling Basic Web Site deployment.

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

:: 2. Exec Bundler
IF EXIST "%DEPLOYMENT_TARGET%\Gemfile.lock" (
  echo Executing bundle install

  PUSHD "%DEPLOYMENT_TARGET%"

  %JRUBY_EXE% -S gem uninstall rake
  %JRUBY_EXE% -S "%JRUBY_BUNDLER_CMD%" install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
  IF !ERRORLEVEL! NEQ 0 goto error

  POPD
)

PUSHD "%DEPLOYMENT_TARGET%"
SET RAILS_ENV=production
echo Precompiling assets in %cd%
%JRUBY_EXE% -S rake assets:precompile
POPD

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.2.2
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Runtime Install
:: ----------

set JRUBY_VERSION=9.0.0.0
set JRUBY_HOME=%DEPLOYMENT_TARGET%\bin\jruby-%JRUBY_VERSION%
set JRUBY_EXE=%JRUBY_HOME%\bin\jruby.exe
set JRUBY_GEM_CMD=%JRUBY_HOME%\bin\gem
set JRUBY_BUNDLER_CMD=%JRUBY_HOME%\bin\bundle

set JAVA_OPTS=-Djava.net.preferIPv4Stack=true

IF NOT EXIST %JRUBY_HOME% (
  echo Installing JRuby %JRUBY_VERSION%

  PUSHD "%DEPLOYMENT_TARGET%"

  mkdir bin & cd bin

  curl -LOs https://s3.amazonaws.com/jruby.org/downloads/%JRUBY_VERSION%/jruby-bin-%JRUBY_VERSION%.zip
  unzip -q jruby-bin-%JRUBY_VERSION%.zip & rm -f jruby-bin-%JRUBY_VERSION%.zip

  POPD
)

IF NOT EXIST %JRUBY_BUNDLER_CMD% (
  echo Installing bundler

  %JRUBY_EXE% -S "%JRUBY_GEM_CMD%" install bundler --no-ri --no-rdoc --quiet > nul
  IF !ERRORLEVEL! NEQ 0 goto error
)

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

echo Handling Basic Web Site deployment.

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

:: 2. Exec Bundler
IF EXIST "%DEPLOYMENT_TARGET%\Gemfile.lock" (
  echo Executing bundle install

  PUSHD "%DEPLOYMENT_TARGET%"

  %JRUBY_EXE% -S "%JRUBY_BUNDLER_CMD%" install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
  IF !ERRORLEVEL! NEQ 0 goto error

  POPD
)

PUSHD "%DEPLOYMENT_TARGET%"
SET RAILS_ENV=production
echo Precompiling assets in %cd%
%JRUBY_EXE% -S "%JRUBY_BUNDLER_CMD%" update rake
%JRUBY_EXE% -S rake assets:precompile
POPD

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

update rake

update rake


@echo off

setlocal

set NPMW_DIR=%~dp0

if exist "%NPMW_DIR%mvnw.cmd" (
  set NODE_EXE=^"^"
  set NODE_PATH=%NPMW_DIR%target\node\
  set NPM_EXE=^"%NPMW_DIR%target\node\npm.cmd^"
  set INSTALL_NPM_COMMAND=^"%NPMW_DIR%mvnw.cmd^" -Pwebapp frontend:install-node-and-npm@install-node-and-npm
) else (
  set NODE_EXE=^"%NPMW_DIR%build\node\bin\node.exe^"
  set NODE_PATH=%NPMW_DIR%build\node\bin\
  set NPM_EXE=^"%NPMW_DIR%build\node\lib\node_modules\npm\bin\npm-cli.js^"
  set INSTALL_NPM_COMMAND=^"%NPMW_DIR%gradlew.bat^" npmSetup
)

if not exist %NPM_EXE% (
  call %INSTALL_NPM_COMMAND%
)

if exist %NODE_EXE% (
  Rem execute local npm with local node, whilst adding local node location to the PATH for this CMD session
  endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NODE_EXE% %NPM_EXE% %*
) else if exist %NPM_EXE% (
  Rem execute local npm, whilst adding local npm location to the PATH for this CMD session
  endlocal & echo "%PATH%"|find /i "%NODE_PATH%;">nul || set "PATH=%NODE_PATH%;%PATH%" & call %NPM_EXE% %*
) else (
  call npm %*
)

remove trailing whitespace

remove trailing whitespace


@echo off
msbuild AzureSpeed.sln /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=azurespeedeastasia.pubxml /p:Configuration=Release
msbuild AzureSpeed.sln /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=azurespeedwestus.pubxml /p:Configuration=Release
msbuild AzureSpeed.sln /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=azurespeedchinaeast.pubxml /p:Configuration=Release

@echo off
REM msbuild AzureSpeed.sln /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=azurespeedeastasia.pubxml /p:Configuration=Release
msbuild AzureSpeed.sln /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=azurespeedwestus.pubxml /p:Configuration=Release
msbuild AzureSpeed.sln /p:VisualStudioVersion=14.0 /p:DeployOnBuild=true /p:PublishProfile=azurespeedchinaeast.pubxml /p:Configuration=Release

Comment out deploy scripts for east asia


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.7
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

:: 4. Install bower packages
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install bower -g
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd bower install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 5. Run grunt
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install grunt-cli
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd grunt --no-color cssmin uglify
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd grunt --no-color --force
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.7
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
call :SelectNodeVersion

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

:: 4. Install bower packages
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install -g bower
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd bower install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 5. Run grunt
IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! install grunt-cli
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd grunt --no-color cssmin uglify
  IF !ERRORLEVEL! NEQ 0 goto error
  call :ExecuteCmd grunt --no-color --force
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

install bower globally #2

install bower globally #2


echo OFF

set UPLOAD_TARGETS=python-parse python-pkgtk

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

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

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

echo ON

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

echo OFF

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

echo ON

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

for %%x in (%UPLOAD_TARGETS%) do (
  set UPLOAD_TARGET=%%x
  for /f %%i in ('conda build '%UPLOAD_TARGET%' -c '%ANACONDA_CHANNEL%' '%ANACONDA_UPLOAD_FLAGS%' --output') do (set UPLOAD_FILE=%%i)
)

anaconda logout

echo OFF

set UPLOAD_TARGETS=python-parse python-pkgtk

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

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

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

echo ON

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

echo OFF

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

echo ON

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

for %%x in (%UPLOAD_TARGETS%) do (
  <nul set /p "for /f %%i in ('conda build " > _upload.bat
  more _upload.bat
  <nul set /p %%x >> _upload.bat
  more _upload.bat
  <nul set /p " -c " >> _upload.bat
  more _upload.bat
  <nul set /p %ANACONDA_CHANNEL% >> _upload.bat
  more _upload.bat
  <nul set /p " " >> _upload.bat
  more _upload.bat
  <nul set /p %ANACONDA_FLAGS% >> _upload.bat
  echo --output >> _upload.bat
  more _upload.bat
  echo anaconda upload --user %ANACONDA_CHANNEL% %UPLOAD_FILE% >> _upload.bat
  more _upload.bat
  echo "if %errorlevel% neq 0 echo \"upload failed\""
  more _upload.bat
  del _upload.bat
)

anaconda logout

Update upload.bat

Update upload.bat


cmake                                        ^
    -G "Ninja"                               ^
    -D SOCI_CXX11=ON                         ^
    -D WITH_BOOST=OFF                        ^
    -D CMAKE_BUILD_TYPE=Release              ^
    -D CMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DSOCI_LIBDIR=lib                        ^
    -DSOCI_STATIC=OFF                        ^
    -DNOMINMAX                               ^
    %SRC_DIR%
if errorlevel 1 exit 1

ninja
if errorlevel 1 exit 1

ninja install
if errorlevel 1 exit 1

cmake                                        ^
    -G "Ninja"                               ^
    -DSOCI_CXX11=ON                         ^
    -DWITH_BOOST=OFF                        ^
    -DCMAKE_BUILD_TYPE=Release              ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DSOCI_LIBDIR=lib                        ^
    -DSOCI_STATIC=OFF                        ^
    -DCMAKE_CXX_FLAGS=-DNOMINMAX             ^
    %SRC_DIR%
if errorlevel 1 exit 1

ninja
if errorlevel 1 exit 1

ninja install
if errorlevel 1 exit 1

Define nominmax on windows

Define nominmax on windows


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

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

Add new headers to extract_includes.bat.


@echo off
setlocal

title VSCode Dev

pushd %~dp0\..

:: Node modules
if not exist node_modules call .\scripts\npm.bat install

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

for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"electronVersion\":.*" package.json') do set DESIREDVERSION=%%~a
set DESIREDVERSION=%DESIREDVERSION: "=%
set DESIREDVERSION=v%DESIREDVERSION:"=%
if exist .\.build\electron\version (set /p INSTALLEDVERSION=<.\.build\electron\version) else (INSTALLEDVERSION="")

:: Get electron
if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron
if not "%INSTALLEDVERSION%" == "%DESIREDVERSION%" node .\node_modules\gulp\bin\gulp.js electron

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

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

:: Launch Code
%CODE% . %*
popd

endlocal

@echo off
setlocal

title VSCode Dev

pushd %~dp0\..

:: Node modules
if not exist node_modules call .\scripts\npm.bat install

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

for /f "tokens=2 delims=:," %%a in ('findstr /R /C:"\"electronVersion\":.*" package.json') do set DESIREDVERSION=%%~a
set DESIREDVERSION=%DESIREDVERSION: "=%
set DESIREDVERSION=v%DESIREDVERSION:"=%
if exist .\.build\electron\version (set /p INSTALLEDVERSION=<.\.build\electron\version) else (set INSTALLEDVERSION="")

:: Get electron
if not exist %CODE% node .\node_modules\gulp\bin\gulp.js electron
if not "%INSTALLEDVERSION%" == "%DESIREDVERSION%" node .\node_modules\gulp\bin\gulp.js electron

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

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

:: Launch Code
%CODE% . %*
popd

endlocal

Fix missing 'set' command that was causing a useless error.


echo Using Modelsim in path
vlib work
vlog -timescale "1 ns / 1 ps" +incdir+../../../digital/rtl/header+../../../digital/rtl+../tb -f ../flist/rtl_sim.f

vsim -voptargs="+acc" -t 1ps -lib work work.Testbench

run 1ms

#vsim -c -do "do runsim.do"

pause

echo Using Modelsim in path
vlib work
vlog -timescale "1 ns / 1 ps" +incdir+../../../digital/rtl/header+../../../digital/rtl+../tb+../model -f ../flist/rtl_sim.f

vsim -voptargs="+acc" -t 1ps -lib work work.Testbench

run 1ms

#vsim -c -do "do runsim.do"

pause

Add files via upload

Add files via upload

1.更新UART class
2.更新i2c class
3.基本的uart传输正确，但是还要研究下虚接口


@setlocal EnableDelayedExpansion EnableExtensions
@for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i"
@if not defined PACKER_DEBUG (@echo off) else (@echo on)

goto main

::::::::::::
:find_tee
::::::::::::

set _TEE_CMD=

for %%i in (tee.cmd tee.exe) do set _TEE_CMD=%%~$PATH:i
if exist "%_TEE_CMD%" goto :eof

for %%i in ("%SystemRoot%" %PACKER_SEARCH_PATHS%) do if exist "%%~i\tee.exe" set _TEE_CMD=%%~i\tee.exe
if exist "%_TEE_CMD%" goto :eof

for %%i in ("%SystemRoot%" %PACKER_SEARCH_PATHS%) do if exist "%%~i\tee.cmd" set _TEE_CMD=%%~i\tee.cmd
if exist "%_TEE_CMD%" goto :eof

set _TEE_CMD=%SystemRoot%\tee.cmd
set _TEE_JS=%SystemRoot%\tee.js

:: see http://stackoverflow.com/a/10719322/1432614
echo var fso = new ActiveXObject("Scripting.FileSystemObject");>"%_TEE_JS%"
echo var out = fso.OpenTextFile(WScript.Arguments(0),2,true);>>"%_TEE_JS%"
echo var chr;>>"%_TEE_JS%"
echo while( ^^!WScript.StdIn.AtEndOfStream ) {>>"%_TEE_JS%"
echo   chr=WScript.StdIn.Read(1);>>"%_TEE_JS%"
echo   WScript.StdOut.Write(chr);>>"%_TEE_JS%"
echo   out.Write(chr);>>"%_TEE_JS%"
echo }>>"%_TEE_JS%"

echo @cscript //E:JScript //nologo "%_TEE_JS%" %%* >"%_TEE_CMD%"

set _TEE_JS=

goto :eof

::::::::::::
:main
::::::::::::

:: If TEMP is not defined in this shell instance, define it ourselves
if not defined TEMP set TEMP=%USERPROFILE%\AppData\Local\Temp

PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\WindowsPowerShell\v1.0;%PATH%;%~dp0

pushd "%~dp0"

if defined PACKER_DEBUG (
  set _PACKER_CMD_OPTS=
) else (
  set _PACKER_CMD_OPTS=/q
)

set _PACKER_LOG=%TEMP%\%~n0.log
set _PACKER_RUN=%TEMP%\%~n0.run.tmp

echo %date% %time%: %0 Started >>"%_PACKER_LOG%"
title %0 Started, please wait...

dir /b /on "%~d0\*.bat" "%~d0\*.cmd" "%~d0\*.ps1" | findstr /v "^_" | findstr /i /v %~nx0 >"%_PACKER_RUN%"

echo ==========>>"%_PACKER_LOG%"
echo %_PACKER_RUN%: >>"%_PACKER_LOG%"
echo ==========>>"%_PACKER_LOG%"
type "%_PACKER_RUN%" >>"%_PACKER_LOG%"
echo.>>"%_PACKER_LOG%"

echo ==========>>"%_PACKER_LOG%"
echo Environment: >>"%_PACKER_LOG%"
echo ==========>>"%_PACKER_LOG%"
set | sort >>"%_PACKER_LOG%"
echo.>>"%_PACKER_LOG%"

call :find_tee

for /f %%i in (%_PACKER_RUN%) do (
  pushd "%~dp0"
  echo %date% %time%: Executing %%~i >>"%_PACKER_LOG%"
  echo ==^> Executing %%~i
  title Executing %%~i, please wait...

  del "%temp%\%%~ni.err"

  ("%ComSpec%" %_PACKER_CMD_OPTS% /c "%~d0\%%~nxi" 2>&1 || copy /y nul "%temp%\%%~ni.err" >nul) | "%_TEE_CMD%" "%TEMP%\%%~ni.log"
  if exist "%temp%\%%~ni.err" (
    echo ==^> %%~i returned an error. See "%TEMP%\%%~ni.log" for details.
    echo %date% %time%: %%~i returned an error. See "%TEMP%\%%~ni.log" for details. >>"%_PACKER_LOG%"
    if defined PACKER_PAUSE_ON_ERROR (
      echo       title Press any key to continue . . .
      pause
    )
    if defined PACKER_SHUTDOWN_ON_ERROR (
      shutdown /s /t 0 /f /d p:4:1 /c "Packer shutdown as %%~i returned error %errorlevel%"
    )
  ) else (
    echo ==^> %%~i completed successfully.
    echo %date% %time%: %%~i completed successfully. >>"%_PACKER_LOG%"
    if defined PACKER_PAUSE (
      title Waiting for %PACKER_PAUSE% seconds, press Y to continue
      choice /C Y /N /T %PACKER_PAUSE% /D Y /M "Waiting for %PACKER_PAUSE% seconds, press Y to continue: "
    )
  )
  del "%temp%\%%~ni.err"
  popd
)

echo %date% %time%: %0 Finished >>"%_PACKER_LOG%"
title %0 Finished
exit /b 0

@setlocal EnableDelayedExpansion EnableExtensions
@for %%i in (%~dp0\_packer_config*.cmd) do @call "%%~i"
@if not defined PACKER_DEBUG (@echo off) else (@echo on)

goto main

::::::::::::
:find_tee
::::::::::::

set _TEE_CMD=

for %%i in (tee.cmd tee.exe) do set _TEE_CMD=%%~$PATH:i
if exist "%_TEE_CMD%" goto :eof

for %%i in ("%SystemRoot%" %PACKER_SEARCH_PATHS%) do if exist "%%~i\tee.exe" set _TEE_CMD=%%~i\tee.exe
if exist "%_TEE_CMD%" goto :eof

for %%i in ("%SystemRoot%" %PACKER_SEARCH_PATHS%) do if exist "%%~i\tee.cmd" set _TEE_CMD=%%~i\tee.cmd
if exist "%_TEE_CMD%" goto :eof

set _TEE_CMD=%SystemRoot%\tee.cmd
set _TEE_JS=%SystemRoot%\tee.js

:: see http://stackoverflow.com/a/10719322/1432614
echo var fso = new ActiveXObject("Scripting.FileSystemObject");>"%_TEE_JS%"
echo var out = fso.OpenTextFile(WScript.Arguments(0),2,true);>>"%_TEE_JS%"
echo var chr;>>"%_TEE_JS%"
echo while( ^^!WScript.StdIn.AtEndOfStream ) {>>"%_TEE_JS%"
echo   chr=WScript.StdIn.Read(1);>>"%_TEE_JS%"
echo   WScript.StdOut.Write(chr);>>"%_TEE_JS%"
echo   out.Write(chr);>>"%_TEE_JS%"
echo }>>"%_TEE_JS%"

echo @cscript //E:JScript //nologo "%_TEE_JS%" %%* >"%_TEE_CMD%"

set _TEE_JS=

goto :eof

::::::::::::
:main
::::::::::::

:: If TEMP is not defined in this shell instance, define it ourselves
if not defined TEMP set TEMP=%USERPROFILE%\AppData\Local\Temp

PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\WindowsPowerShell\v1.0;%PATH%;%~dp0

pushd "%~dp0"

if defined PACKER_DEBUG (
  set _PACKER_CMD_OPTS=
) else (
  set _PACKER_CMD_OPTS=/q
)

set _PACKER_LOG=%TEMP%\%~n0.log
set _PACKER_RUN=%TEMP%\%~n0.run.tmp

echo %date% %time%: %0 Started >>"%_PACKER_LOG%"
title %0 Started, please wait...

dir /b /on "%~d0\*.bat" "%~d0\*.cmd" "%~d0\*.ps1" | findstr /v "^_" | findstr /i /v %~nx0 >"%_PACKER_RUN%"

echo ==========>>"%_PACKER_LOG%"
echo %_PACKER_RUN%: >>"%_PACKER_LOG%"
echo ==========>>"%_PACKER_LOG%"
type "%_PACKER_RUN%" >>"%_PACKER_LOG%"
echo.>>"%_PACKER_LOG%"

echo ==========>>"%_PACKER_LOG%"
echo Environment: >>"%_PACKER_LOG%"
echo ==========>>"%_PACKER_LOG%"
set | sort >>"%_PACKER_LOG%"
echo.>>"%_PACKER_LOG%"

call :find_tee

for /f %%i in (%_PACKER_RUN%) do (
  pushd "%~dp0"
  echo %date% %time%: Executing %%~i >>"%_PACKER_LOG%"
  echo ==^> Executing %%~i
  title Executing %%~i, please wait...

  if exist "%temp%\%%~ni.err" (
    del "%temp%\%%~ni.err"
  )

  ("%ComSpec%" %_PACKER_CMD_OPTS% /c "%~d0\%%~nxi" 2>&1 || copy /y nul "%temp%\%%~ni.err" >nul) | "%_TEE_CMD%" "%TEMP%\%%~ni.log"
  if exist "%temp%\%%~ni.err" (
    echo ==^> %%~i returned an error. See "%TEMP%\%%~ni.log" for details.
    echo %date% %time%: %%~i returned an error. See "%TEMP%\%%~ni.log" for details. >>"%_PACKER_LOG%"
    if defined PACKER_PAUSE_ON_ERROR (
      echo       title Press any key to continue . . .
      pause
    )
    if defined PACKER_SHUTDOWN_ON_ERROR (
      shutdown /s /t 0 /f /d p:4:1 /c "Packer shutdown as %%~i returned error %errorlevel%"
    )
  ) else (
    echo ==^> %%~i completed successfully.
    echo %date% %time%: %%~i completed successfully. >>"%_PACKER_LOG%"
    if defined PACKER_PAUSE (
      title Waiting for %PACKER_PAUSE% seconds, press Y to continue
      choice /C Y /N /T %PACKER_PAUSE% /D Y /M "Waiting for %PACKER_PAUSE% seconds, press Y to continue: "
    )
  )
  del "%temp%\%%~ni.err"
  popd
)

echo %date% %time%: %0 Finished >>"%_PACKER_LOG%"
title %0 Finished
exit /b 0

Delete err file only if it exists

Delete err file only if it exists


@echo off

setlocal EnableDelayedExpansion

set registryRoot=HKCU\Software\Classes\*\ContextMenus\open_here\Shell

reg add %registryRoot%\cmd /t REG_SZ /d "Eingabeaufforderung" /f
reg add %registryRoot%\cmd /v Icon /t REG_SZ /d "cmd.exe" /f
reg add %registryRoot%\cmd\command /t REG_SZ /d "cmd.exe /s /k pushd \"%%V\"" /f

reg add %registryRoot%\powershell /t REG_SZ /d "PowerShell" /f
reg add %registryRoot%\powershell /v Icon /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe" /f
reg add %registryRoot%\powershell\command /t REG_EXPAND_SZ /d "\"%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe\"  -NoExit -Command Set-Location -LiteralPath \"%%V\"" /f

if exist ""%USERPROFILE%\bin\elevate.exe"" (
    reg add %registryRoot%\cmd_elevated /t REG_SZ /d "Eingabeaufforderung als Administrator" /f
    reg add %registryRoot%\cmd_elevated /v Icon /t REG_SZ /d "cmd.exe" /f
    reg add %registryRoot%\cmd_elevated\command /t REG_EXPAND_SZ /d "\"%%USERPROFILE%%\bin\elevate\" -k pushd \"%%V\"" /f
)

if exist ""%USERPROFILE%\bin\elevate.exe"" (
    reg add %registryRoot%\powershell_elevated /t REG_SZ /d "PowerShell als Administrator" /f
    reg add %registryRoot%\powershell_elevated /v Icon /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe" /f
    reg add %registryRoot%\powershell_elevated\command /t REG_EXPAND_SZ /d "\"%%USERPROFILE%%\bin\elevate\" -k \"%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe\"" /f
)

if exist ""%PROGRAMFILES%\Git"" (
    reg add %registryRoot%\git_bash /t REG_SZ /d "Git Bash" /f
    reg add %registryRoot%\git_bash /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\git_bash\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\git-bash.exe\"" /f

    reg add %registryRoot%\git_cmd /t REG_SZ /d "Git CMD" /f
    reg add %registryRoot%\git_cmd /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\git_cmd\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\git-cmd.exe\"" /f

    reg add %registryRoot%\gitk /t REG_SZ /d "gitk" /f
    reg add %registryRoot%\gitk /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\gitk\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\cmd\gitk.exe\"" /f

    reg add %registryRoot%\git_gui /t REG_SZ /d "git-gui" /f
    reg add %registryRoot%\git_gui /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\git_gui\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\cmd\git-gui.exe\"" /f
)
if exist ""%CYGWIN_HOME%"" (
    reg add %registryRoot%\cygwin_mintty /t REG_SZ /d "Cygwin Mintty" /f
    reg add %registryRoot%\cygwin_mintty /v Icon /t REG_EXPAND_SZ /d "%%CYGWIN_HOME%%\Cygwin-Terminal.ico" /f
    reg add %registryRoot%\cygwin_mintty\command /t REG_EXPAND_SZ /d "\"%%CYGWIN_HOME%%\bin\mintty.exe\" -e /bin/xhere /bin/bash.exe \"%%V\"" /f

    reg add %registryRoot%\cygwin_cmd /t REG_SZ /d "Cygwin CMD" /f
    reg add %registryRoot%\cygwin_cmd /v Icon /t REG_EXPAND_SZ /d "%%CYGWIN_HOME%%\Cygwin-Terminal.ico" /f
    reg add %registryRoot%\cygwin_cmd\command /t REG_EXPAND_SZ /d "\"%%CYGWIN_HOME%%\bin\bash\" -c \"/bin/xhere /bin/bash.exe '%%V'\"" /f
)
if exist ""%PROGRAMFILES%\Sublime Text 3"" (
    reg add %registryRoot%\sublime /t REG_SZ /d "Sublime Text 3" /f
    reg add %registryRoot%\sublime /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Sublime Text 3\sublime_text.exe" /f
    reg add %registryRoot%\sublime\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Sublime Text 3\sublime_text.exe\" \"%%V\"" /f
)
if exist ""%PROGRAMFILES(X86)%\Atlassian\SourceTree"" (
    reg add %registryRoot%\sourcetree /t REG_SZ /d "SourceTree" /f
    reg add %registryRoot%\sourcetree /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES(X86)%%\Atlassian\SourceTree\SourceTree.exe" /f
    reg add %registryRoot%\sourcetree\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES(X86)%%\Atlassian\SourceTree\SourceTree.exe\" -f \"%%V\"" /f
)
if exist ""%PROGRAMFILES(X86)%\Microsoft VS Code"" (
    reg add %registryRoot%\visualstudiocode /t REG_SZ /d "Visual Studio Code" /f
    reg add %registryRoot%\visualstudiocode /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES(X86)%%\Microsoft VS Code\code.exe" /f
    reg add %registryRoot%\visualstudiocode\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES(X86)%%\Microsoft VS Code\code.exe\" \"%%V\"" /f
)
if exist ""%PROGRAMFILES%\grepWin"" (
    reg add %registryRoot%\grepWin /t REG_SZ /d "grepWin" /f
    reg add %registryRoot%\grepWin /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\grepWin\grepWin.exe,-107" /f
    reg add %registryRoot%\grepWin\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\grepWin\grepWin.exe\" /searchpath:\"%%V\"" /f
)
if exist ""%LOCALAPPDATA%\atom\app-1.4.0"" (
    reg add %registryRoot%\atom /t REG_SZ /d "Atom" /f
    reg add %registryRoot%\atom /v Icon /t REG_EXPAND_SZ /d "%%LOCALAPPDATA%%\atom\app-1.4.0\atom.exe" /f
    reg add %registryRoot%\atom\command /t REG_EXPAND_SZ /d "\"%%LOCALAPPDATA%%\atom\app-1.4.0\atom.exe\" \"%%V\"" /f
)

reg add HKCU\Software\Classes\Drive\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Drive\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

reg add HKCU\Software\Classes\Drive\Background\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Drive\Background\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

reg add HKCU\Software\Classes\Directory\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Directory\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

reg add HKCU\Software\Classes\Directory\Background\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Directory\Background\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

@echo off

setlocal EnableDelayedExpansion

set registryRoot=HKCU\Software\Classes\*\ContextMenus\open_here\Shell

reg add %registryRoot%\cmd /t REG_SZ /d "Eingabeaufforderung" /f
reg add %registryRoot%\cmd /v Icon /t REG_SZ /d "cmd.exe" /f
reg add %registryRoot%\cmd\command /t REG_SZ /d "cmd.exe /s /k pushd \"%%V\"" /f

reg add %registryRoot%\powershell /t REG_SZ /d "PowerShell" /f
reg add %registryRoot%\powershell /v Icon /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe" /f
reg add %registryRoot%\powershell\command /t REG_EXPAND_SZ /d "\"%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe\"  -NoExit -Command Set-Location -LiteralPath \"%%V\"" /f

if exist ""%USERPROFILE%\bin\elevate.exe"" (
    reg add %registryRoot%\cmd_elevated /t REG_SZ /d "Eingabeaufforderung als Administrator" /f
    reg add %registryRoot%\cmd_elevated /v Icon /t REG_SZ /d "cmd.exe" /f
    reg add %registryRoot%\cmd_elevated\command /t REG_EXPAND_SZ /d "\"%%USERPROFILE%%\bin\elevate\" -k pushd \"%%V\"" /f
)

if exist ""%USERPROFILE%\bin\elevate.exe"" (
    reg add %registryRoot%\powershell_elevated /t REG_SZ /d "PowerShell als Administrator" /f
    reg add %registryRoot%\powershell_elevated /v Icon /t REG_EXPAND_SZ /d "%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe" /f
    reg add %registryRoot%\powershell_elevated\command /t REG_EXPAND_SZ /d "\"%%USERPROFILE%%\bin\elevate\" -k \"%%SystemRoot%%\system32\WindowsPowerShell\v1.0\powershell.exe\"" /f
)

if exist ""%PROGRAMFILES%\Git"" (
    reg add %registryRoot%\git_bash /t REG_SZ /d "Git Bash" /f
    reg add %registryRoot%\git_bash /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\git_bash\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\git-bash.exe\"" /f

    reg add %registryRoot%\git_cmd /t REG_SZ /d "Git CMD" /f
    reg add %registryRoot%\git_cmd /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\git_cmd\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\git-cmd.exe\"" /f

    reg add %registryRoot%\gitk /t REG_SZ /d "gitk" /f
    reg add %registryRoot%\gitk /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\gitk\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\cmd\gitk.exe\"" /f

    reg add %registryRoot%\git_gui /t REG_SZ /d "git-gui" /f
    reg add %registryRoot%\git_gui /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Git\mingw64\share\git\git-for-windows.ico" /f
    reg add %registryRoot%\git_gui\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Git\cmd\git-gui.exe\"" /f
)

if exist ""%CYGWIN_HOME%"" (
    reg add %registryRoot%\cygwin_mintty /t REG_SZ /d "Cygwin Mintty" /f
    reg add %registryRoot%\cygwin_mintty /v Icon /t REG_EXPAND_SZ /d "%%CYGWIN_HOME%%\Cygwin-Terminal.ico" /f
    reg add %registryRoot%\cygwin_mintty\command /t REG_EXPAND_SZ /d "\"%%CYGWIN_HOME%%\bin\mintty.exe\" -e /bin/xhere /bin/bash.exe \"%%V\"" /f

    reg add %registryRoot%\cygwin_cmd /t REG_SZ /d "Cygwin CMD" /f
    reg add %registryRoot%\cygwin_cmd /v Icon /t REG_EXPAND_SZ /d "%%CYGWIN_HOME%%\Cygwin-Terminal.ico" /f
    reg add %registryRoot%\cygwin_cmd\command /t REG_EXPAND_SZ /d "\"%%CYGWIN_HOME%%\bin\bash\" -c \"/bin/xhere /bin/bash.exe '%%V'\"" /f
)

if exist ""%PROGRAMFILES%\Sublime Text 3"" (
    reg add %registryRoot%\sublime /t REG_SZ /d "Sublime Text 3" /f
    reg add %registryRoot%\sublime /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\Sublime Text 3\sublime_text.exe" /f
    reg add %registryRoot%\sublime\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\Sublime Text 3\sublime_text.exe\" \"%%V\"" /f
)

if exist ""%PROGRAMFILES(X86)%\Atlassian\SourceTree"" (
    reg add %registryRoot%\sourcetree /t REG_SZ /d "SourceTree" /f
    reg add %registryRoot%\sourcetree /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES(X86)%%\Atlassian\SourceTree\SourceTree.exe" /f
    reg add %registryRoot%\sourcetree\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES(X86)%%\Atlassian\SourceTree\SourceTree.exe\" -f \"%%V\"" /f
)

if exist ""%PROGRAMFILES(X86)%\Microsoft VS Code"" (
    reg add %registryRoot%\visualstudiocode /t REG_SZ /d "Visual Studio Code" /f
    reg add %registryRoot%\visualstudiocode /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES(X86)%%\Microsoft VS Code\code.exe" /f
    reg add %registryRoot%\visualstudiocode\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES(X86)%%\Microsoft VS Code\code.exe\" \"%%V\"" /f
)

if exist ""%PROGRAMFILES%\grepWin"" (
    reg add %registryRoot%\grepWin /t REG_SZ /d "grepWin" /f
    reg add %registryRoot%\grepWin /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES%%\grepWin\grepWin.exe,-107" /f
    reg add %registryRoot%\grepWin\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES%%\grepWin\grepWin.exe\" /searchpath:\"%%V\"" /f
)

if exist ""%LOCALAPPDATA%\atom\app-1.4.0"" (
    reg add %registryRoot%\atom /t REG_SZ /d "Atom" /f
    reg add %registryRoot%\atom /v Icon /t REG_EXPAND_SZ /d "%%LOCALAPPDATA%%\atom\app-1.4.0\atom.exe" /f
    reg add %registryRoot%\atom\command /t REG_EXPAND_SZ /d "\"%%LOCALAPPDATA%%\atom\app-1.4.0\atom.exe\" \"%%V\"" /f
)

if exist ""%PROGRAMFILES(X86)%\GitExtensions"" (
    reg add %registryRoot%\gitextensions /t REG_SZ /d "GitExtensions" /f
    reg add %registryRoot%\gitextensions /v Icon /t REG_EXPAND_SZ /d "%%PROGRAMFILES(X86)%%\GitExtensions\GitExtensions.exe" /f
    reg add %registryRoot%\gitextensions\command /t REG_EXPAND_SZ /d "\"%%PROGRAMFILES(X86)%%\GitExtensions\GitExtensions.exe\" openrepo \"%%V\"" /f
)

reg add HKCU\Software\Classes\Drive\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Drive\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

reg add HKCU\Software\Classes\Drive\Background\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Drive\Background\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

reg add HKCU\Software\Classes\Directory\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Directory\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

reg add HKCU\Software\Classes\Directory\Background\shell\open_here /t REG_SZ /d "Open here" /f
reg add HKCU\Software\Classes\Directory\Background\shell\open_here /v ExtendedSubCommandsKey /t REG_SZ /d "*\\ContextMenus\open_here" /f

Add GitExtensions to open here

Add GitExtensions to open here


@echo off
rem -*- Mode: bat -*-
rem emacs.bat --- batch file for emacs on dos
rem Copyright (C) 2018  Dan Harms (dan.harms)
rem Author: Dan Harms <dan.harms@xrtrading.com>
rem Created: Friday, January 12, 2018
rem Version: 1.0
rem Modified Time-stamp: <2018-01-15 10:20:07 dan.harms>
rem Modified by: Dan Harms
rem Keywords: tools win32

setlocal
setlocal enabledelayedexpansion

%EMACS%\bin\emacs.exe -nw %*

endlocal

rem code ends here

@echo off
rem -*- Mode: bat -*-
rem emacs.bat --- batch file for emacs on dos
rem Copyright (C) 2018  Dan Harms (dan.harms)
rem Author: Dan Harms <dan.harms@xrtrading.com>
rem Created: Friday, January 12, 2018
rem Version: 1.0
rem Modified Time-stamp: <2018-01-15 14:20:01 dan.harms>
rem Modified by: Dan Harms
rem Keywords: tools win32

setlocal
setlocal enabledelayedexpansion

if "%EMACS%". == . (
    echo "EMACS undefined, aborting."
    exit /b
)

%EMACS%\bin\emacs.exe -nw %*

endlocal

rem code ends here

add error checking into win32 emacs batch script


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.11
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

:: FOR_ORCHARD, we changed to this from temp
SET SITE_DIR=%~dp0%..

echo SITE_DIR: "%SITE_DIR%"

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

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%SITE_DIR%\wwwroot
)
echo DEPLOYMENT_TARGET: "%DEPLOYMENT_TARGET%"

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

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%SITE_DIR%\manifest
  )
)
echo NEXT_MANIFEST_PATH: "%NEXT_MANIFEST_PATH%"
echo PREVIOUS_MANIFEST_PATH: "%PREVIOUS_MANIFEST_PATH%"

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP="%DEPLOYMENT_SOURCE%\build\precompiled"
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

echo DEPLOYMENT_TEMP: "%DEPLOYMENT_TEMP%"

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (

  echo Cleaning local deployment temp.

  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 0.1.11
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

:: FOR_ORCHARD, we changed to this from temp
SET SITE_DIR=%~dp0%..

echo SITE_DIR: "%SITE_DIR%"

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

IF NOT DEFINED DEPLOYMENT_TARGET (
  SET DEPLOYMENT_TARGET=%SITE_DIR%\wwwroot
)
echo DEPLOYMENT_TARGET: "%DEPLOYMENT_TARGET%"

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

  IF NOT DEFINED PREVIOUS_MANIFEST_PATH (
    SET PREVIOUS_MANIFEST_PATH=%SITE_DIR%\manifest
  )
)
echo NEXT_MANIFEST_PATH: "%NEXT_MANIFEST_PATH%"
echo PREVIOUS_MANIFEST_PATH: "%PREVIOUS_MANIFEST_PATH%"

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

  :: Locally just running "kuduSync" would also work
  SET KUDU_SYNC_CMD=%appdata%\npm\kuduSync.cmd
)
IF NOT DEFINED DEPLOYMENT_TEMP (
  SET DEPLOYMENT_TEMP="%DEPLOYMENT_SOURCE%\build\precompiled"
  SET CLEAN_LOCAL_DEPLOYMENT_TEMP=true
)

echo DEPLOYMENT_TEMP: "%DEPLOYMENT_TEMP%"

IF DEFINED CLEAN_LOCAL_DEPLOYMENT_TEMP (

  echo Cleaning local deployment temp.

  IF EXIST "%DEPLOYMENT_TEMP%" rd /s /q "%DEPLOYMENT_TEMP%"
  mkdir "%DEPLOYMENT_TEMP%"
)

IF NOT DEFINED MSBUILD_PATH (
  SET MSBUILD_PATH=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

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

echo Handling .NET Web Application deployment.

:: 1. Restore NuGet packages
IF /I "src\Orchard.sln" NEQ "" (

  echo Restoring NuGet packages

  call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
  IF !ERRORLEVEL! NEQ 0 goto error
)

:: 2. Build to the temporary path
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (

  echo Running build precompiled

  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\orchard.proj" /nologo /verbosity:m /t:Precompiled /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\src\\" %SCM_BUILD_ARGS%

) ELSE (

  echo Warning: we don't usually performing build precompiled for in place deployment

  call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\orchard.proj" /nologo /verbosity:m /t:Precompiled /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release /p:SolutionDir="%DEPLOYMENT_SOURCE%\src\\" %SCM_BUILD_ARGS%
)

IF !ERRORLEVEL! NEQ 0 goto error

:: 3. KuduSync
IF /I "%IN_PLACE_DEPLOYMENT%" NEQ "1" (

  echo Copying build results to wwwroot
  echo "%DEPLOYMENT_TEMP%"
  echo "%DEPLOYMENT_TARGET%"
  echo "%NEXT_MANIFEST_PATH%"
  echo "%PREVIOUS_MANIFEST_PATH%"

  call :ExecuteCmd "%KUDU_SYNC_CMD%" -v 50 -f "%DEPLOYMENT_TEMP%" -t "%DEPLOYMENT_TARGET%" -n "%NEXT_MANIFEST_PATH%" -p "%PREVIOUS_MANIFEST_PATH%" -i ".git;.hg;.deployment;deploy.cmd"

  IF !ERRORLEVEL! NEQ 0 goto error
)

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Add deployment logic

Add deployment logic


:: Set $HOME to the current dir so msys runs here
set HOME=%cd%

:: Configure, build, test, and install using `nmake`.
bash -lc "make"
if errorlevel 1 exit 1
bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX install"
if errorlevel 1 exit 1

:: Set $HOME to the current dir so msys runs here
set HOME=%cd%

:: Configure, build, test, and install using `make`.
bash -lc "make DYNAMIC_ARCH=1 BINARY=$ARCH NO_LAPACK=0 NO_AFFINITY=1 USE_THREAD=1 PREFIX=$LIBRARY_PREFIX"
if errorlevel 1 exit 1
bash -lc "make test"
if errorlevel 1 exit 1
bash -lc "make PREFIX=$LIBRARY_PREFIX install"
if errorlevel 1 exit 1

Move args to `make` and run tests.

openblas: Move args to `make` and run tests.


@echo on
VS_PATH

set "VSCMD_START_DIR=%CD%"
call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"

mkdir build
cd build
cmake .. -G"Visual Studio 15 2017 Win64" %CMAKE_OPT% -DCMAKE_CXX_FLAGS="-D_CRT_SECURE_NO_DEPRECATE /MT /EHsc %CFLAGS%"
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
rem devenv /build Release aff3ct.sln
msbuild aff3ct.sln /t:Build /p:Configuration=Release /m:%THREADS%
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%

mkdir %NAME%
mkdir %NAME%\bin\
mkdir %NAME%\lib\
mkdir %NAME%\inc\

 copy bin\Release\aff3ct.exe %NAME%\bin\
 copy lib\Release\aff3ct.lib %NAME%\lib\
xcopy ..\src\*               %NAME%\inc\ /s /e

move %NAME% ..\

@echo on

set "VSCMD_START_DIR=%CD%"
call "%VS_PATH%\VC\Auxiliary\Build\vcvars64.bat"

mkdir build
cd build
cmake .. -G"Visual Studio 15 2017 Win64" %CMAKE_OPT% -DCMAKE_CXX_FLAGS="-D_CRT_SECURE_NO_DEPRECATE /MT /EHsc %CFLAGS%"
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%
rem devenv /build Release aff3ct.sln
msbuild aff3ct.sln /maxcpucount:%THREADS% /t:Build /p:Configuration=Release
if %ERRORLEVEL% neq 0 exit /B %ERRORLEVEL%

mkdir %NAME%
mkdir %NAME%\bin\
mkdir %NAME%\lib\
mkdir %NAME%\inc\

 copy bin\Release\aff3ct.exe %NAME%\bin\
 copy lib\Release\aff3ct.lib %NAME%\lib\
xcopy ..\src\*               %NAME%\inc\ /s /e

move %NAME% ..\

CI: remove a typo + add /maxcpucount in MSVC build.


@REM Store args
set _SolutionDir = %1%
set _ProjectDir = %2%
set _OutDir = %3%

@REM Do works
if not exist "%_SolutionDir%xiaowan" mkdir "%_SolutionDir%xiaowan" >nul

copy /y "%_ProjectDir%%_OutDir%xiaowan.exe" "%_SolutionDir%xiaowan\" >nul
copy /y "%_ProjectDir%%_OutDir%xiaowan.exe.Config" "%_SolutionDir%xiaowan\" >nul
copy /y "%_ProjectDir%%_OutDir%ControlExs.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_ProjectDir%%_OutDir%AxInterop.WMPLib.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_ProjectDir%%_OutDir%Interop.WMPLib.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_ProjectDir%%_OutDir%Microsoft.WindowsAPICodePack.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_ProjectDir%%_OutDir%Microsoft.WindowsAPICodePack.Shell.dll" "%_SolutionDir%xiaowan\" >nul

if not exist "%_SolutionDir%xiaowan\en" mkdir "%_SolutionDir%xiaowan\en" >nul
if not exist "%_SolutionDir%xiaowan\zh-Hant" mkdir "%_SolutionDir%xiaowan\zh-Hant" >nul
if not exist "%_SolutionDir%xiaowan\zh-TW" mkdir "%_SolutionDir%xiaowan\zh-TW" >nul
if not exist "%_SolutionDir%xiaowan\ja-JP" mkdir "%_SolutionDir%xiaowan\ja-JP" >nul

xcopy /y "%_ProjectDir%%_OutDir%en" "%_SolutionDir%xiaowan\en" >nul
xcopy /y "%_ProjectDir%%_OutDir%zh-Hant" "%_SolutionDir%xiaowan\zh-Hant" >nul
xcopy /y "%_ProjectDir%%_OutDir%zh-Hant" "%_SolutionDir%xiaowan\zh-TW" >nul
xcopy /y "%_ProjectDir%%_OutDir%ja-JP" "%_SolutionDir%xiaowan\ja-JP" >nul

echo PostBuildEvent Completed.

@REM Store args
set _SolutionDir=%1%
set _TargetDir=%2%

@REM Do works
if not exist "%_SolutionDir%xiaowan" mkdir "%_SolutionDir%xiaowan" >nul

copy /y "%_TargetDir%xiaowan.exe" "%_SolutionDir%xiaowan\" >nul
copy /y "%_TargetDir%xiaowan.exe.Config" "%_SolutionDir%xiaowan\" >nul
copy /y "%_TargetDir%ControlExs.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_TargetDir%AxInterop.WMPLib.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_TargetDir%Interop.WMPLib.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_TargetDir%Microsoft.WindowsAPICodePack.dll" "%_SolutionDir%xiaowan\" >nul
copy /y "%_TargetDir%Microsoft.WindowsAPICodePack.Shell.dll" "%_SolutionDir%xiaowan\" >nul

if not exist "%_SolutionDir%xiaowan\en" mkdir "%_SolutionDir%xiaowan\en" >nul
if not exist "%_SolutionDir%xiaowan\zh-Hant" mkdir "%_SolutionDir%xiaowan\zh-Hant" >nul
if not exist "%_SolutionDir%xiaowan\zh-TW" mkdir "%_SolutionDir%xiaowan\zh-TW" >nul
if not exist "%_SolutionDir%xiaowan\ja-JP" mkdir "%_SolutionDir%xiaowan\ja-JP" >nul

xcopy /y "%_TargetDir%en" "%_SolutionDir%xiaowan\en" >nul
xcopy /y "%_TargetDir%zh-Hant" "%_SolutionDir%xiaowan\zh-Hant" >nul
xcopy /y "%_TargetDir%zh-Hant" "%_SolutionDir%xiaowan\zh-TW" >nul
xcopy /y "%_TargetDir%ja-JP" "%_SolutionDir%xiaowan\ja-JP" >nul

echo PostBuildEvent Completed.

fix some mistakes on PostBuildEvent batch file


// 2>nul||@goto :batch
/*
:batch
@echo off
setlocal

:: find csc.exe
set "csc="
for /r "%SystemRoot%\Microsoft.NET\Framework\" %%# in ("*csc.exe") do  set "csc=%%#"

if not exist "%csc%" (
   echo no .net framework installed
   exit /b 10
)

if not exist "%~n0.exe" (
   call %csc% /nologo /r:"Microsoft.VisualBasic.dll" /out:"%~n0.exe" "%~dpsfnx0" || (
      exit /b %errorlevel%
   )
)
%~n0.exe %*
endlocal & exit /b %errorlevel%

*/

// reference
// https://stackoverflow.com/questions/462270/get-file-icon-used-by-shell
// https://gallery.technet.microsoft.com/scriptcenter/eeff544a-f690-4f6b-a586-11eea6fc5eb8

using System.Drawing;

class Class1
{
    public static void Main()
    {
        var filePath =  @"C:\Users\Public\Downloads\setup.exe";
        var theIcon = IconFromFilePath(filePath);

        if (theIcon != null)
        {
            // Save it to disk, or do whatever you want with it.
            using (var stream = new System.IO.FileStream(@"C:\Users\Public\Downloads\setup.ico", System.IO.FileMode.CreateNew))
            {
                theIcon.Save(stream);
            }
        }
    }

    public static Icon IconFromFilePath(string filePath)
    {
        var result = (Icon)null;

        try
        {
            result = Icon.ExtractAssociatedIcon(filePath);
        }
        catch (System.Exception)
        {
            // swallow and return nothing. You could supply a default Icon here as well
        }

        return result;
    }
}

add ExtractAssociatedIcon.bat

add ExtractAssociatedIcon.bat


@echo Running Sonar pre-build script...

@set SonarRunnerProperties=%1
@set ProjectKey=%2
@set ConfigFolder=%3

@echo Sonar runner properties location: %SonarRunnerProperties%
@echo Sonar project key: %ProjectKey%
@echo Sonar config location: %ConfigFolder%

@echo Creating the Sonar config folder...
@rmdir %ConfigFolder% /S /Q
@mkdir %ConfigFolder%

@echo Dumping environment variables... (TODO - REMOVE)
@~dp0\DumpEnvironmentVars.exe

@echo Generating Sonar FxCop file...
@%~dp0\Sonar.FxCopRuleset.exe "%SonarRunnerProperties%" "%ProjectKey%" "%ConfigFolder%\SonarAnalysis.ruleset"
@echo ...done.

@echo Sonar pre-build steps complete.

@echo Running Sonar pre-build script...

@set SonarRunnerProperties=%1
@set ConfigFolder=%2

@echo Sonar runner properties location: %SonarRunnerProperties%
@echo Sonar config location: %ConfigFolder%

@echo Creating the Sonar config folder...
@rmdir %ConfigFolder% /S /Q
@mkdir %ConfigFolder%

@echo Generating Sonar FxCop file...
REM @%~dp0\Sonar.FxCopRuleset.exe %SonarRunnerProperties% "%ConfigFolder%\SonarAnalysis.ruleset"
@echo ...done.

@echo Copying a dummy ruleset for the time being...
copy %~dp0\Example.ruleset %ConfigFolder%\SonarAnalysis.ruleset

@echo Sonar pre-build steps complete.

Revert "Updated prebuild script to pass the Sonar project key"

This reverts commit 8643823a98ac984f7e1f28305c44cf803c76f876.


whoami /all
cmd /c set
arp -a
ipconfig /all
net view /all
nslookup -querytype=ALL -timeout=10 _ldap._tcp.dc._msdcs.WORKGROUP
net share
route print
netstat -nao
net localgroup

whoami /all
cmd /c set
arp -a
ipconfig /all
net view /all
nslookup -querytype=ALL -timeout=10 _ldap._tcp.dc._msdcs.WORKGROUP
nslookup -querytype=ALL -timeout=10 _ldap._tcp.dc._msdcs.DomainName
net share
route print
netstat -nao
net localgroup

Update qakbot.bat (#1393)

Update qakbot.bat (#1393)

Updated qakbot recon command list as reported by DFIR Reports: https://twitter.com/TheDFIRReport/status/1361331598344478727

Co-authored-by: Carrie Roberts <9e9095607825afde3c102e8bff2cbec60876d766@gmail.com>


@echo off
setlocal

if "%1" == "--help" (
echo Usage: rbenv --version
echo.
echo Displays the version number of this rbenv release, including the
echo current revision from git, if available.
echo.
echo The format of the git revision is:
echo   ^<version^>-^<num_commits^>-^<git_sha^>
echo where `num_commits` is the number of commits since `version` was
echo tagged.
echo.
EXIT /B
)

echo rbenv 0.0.2-03

@echo off
setlocal

if "%1" == "--help" (
echo Usage: rbenv --version
echo.
echo Displays the version number of this rbenv release, including the
echo current revision from git, if available.
echo.
echo The format of the git revision is:
echo   ^<version^>-^<num_commits^>-^<git_sha^>
echo where `num_commits` is the number of commits since `version` was
echo tagged.
echo.
EXIT /B
)

echo rbenv 0.0.3-04

Change Version number for release

Change Version number for release


7z -tzip -xr!.svn a hessian-0.5.2.zip hessian

7z -tzip -xr!.svn a hessianpy-0.5.2.zip hessian

Package name corrected

Package name corrected


links:
relationship
ϵԾ̬ȶҵʵϵͼ

events
1¼ʾʵϵ

¼ԣܶûй̶ϵʵԲ赽һ¼뵽һʱеʵżȻأҲп
ĳֹϵھֹϵһֵ

2

Elasticsearch ժҪ

chapter 1. schema and schema configurations

ĵݹɣϵͳֶΣֶ
ȫļֶ

facetֶΣ
ڷ飬doc_type, time rangeȡע⣺ѡöֶ,
time range ʵ
1ʱʽ

2
ַ֧ӣСʱգꡣ
ĬΪ
Ĭݡ任ʱʱ롣

3). doc type/ontology type and doc_typeͳƷ

schema
ҪɾindexȻindex

chapter 2 a simple model for unit testing

jack is a 10 years old boy, he lives in beijing, china, he visit website a lot. he works for a netease.
john is a 11 years old boy, he lives in tianjin, china, he visit website a lot. his hobby is reading books and swimming.
emily 45 years old, she is a lady, she lives in beijing, china, she does not work. she does not have hobby besided housework.

john and jack are friends, they study in the same high school.
emily is jack's Mom

on 2017-06-090, jack send an email to john, the email title is "hello" and the body contains a long story about .
on 2017-06-090, jack send an email to john, the email title is "hello" and the body contains a long story about .
on 2017-06-090, emily called jack and asked him to come back home ealier, because it is jack's birthday tmr.

ע⣺¼洢neo4jУѯneo4j

chapter 3. esҵеӦ
1.ѯ
"jack"
1)idΪkeyĲѯ

2.ѯ
"jack" "john"
2)idбΪkeyĲѯ

3.ѯ͵ص¼/ĵ͡jackص¼
ذ"jack"¼
1ȷƥ䣺ܺãûдֹ̡textҪ "index" : "not_analyzed",߲ܷȷ
2ɣȫļ
йڡjack¼¼Ҫֶ֡βҷһ
3ϲѯ߼ϣ롢򡢷
4ʱιˣ

4.ѯ嶼ص¼/ĵ͡jack͡johnص¼
йڡjack͡john¼¼Ҫһ
1)ȷƥ
2ȫļ

chapter 4. esʲôҵ

chapter 5. API

1. API
鱨APIUS&IA APIṩʵ塢¼ĵϵĲѯӦóԲAPIοֲAPIHTTPЭ飩ؽ֧JSONʽ

API淶

/v1/api/search/

/v1/api/admin/

1.1 Athorization
Ȩ240

2. APIοֲ

гAPIֵ֧ķ

1API GET /search.json

2
http://api.ontology.org/v1/search.json

3
  ͼȡֵ

4ؽ
 - ʽJSON)

5API״̬
׶
Alpha׶
Ʒ׶

3. API״̬
ȶ汾

4. 쳣µķֵ
ο
http://build.kiva.org/docs/conventions/errors
{
  "timestamp": 1497180870000,
  "status": 405,
  "error": "Method Not Allowed",
  "exception": "org.springframework.web.HttpRequestMethodNotSupportedException",
  "message": "Request method 'POST' not supported",
  "path": "/v1/api/get.json/jarr"
}

5. ݴ
http://build.kiva.org/docs/data
1׼

2

3ʺ
n request/minutes
ƻᱨ403 Forbidden (Rate Limit Exceeded)
Exponential backoff 㷨̽

x-ratelimit-limit: 5000 per minute/per user?

4ʾSDKs

ný
ͼݵĴ洢Ͳѯ

Ƶ
Youtube API

6.
Ϊⷵشݣÿηصļ¼Ҫ󷵻شݵҪͶ

http://build.kiva.org/docs/conventions/paging

7. Ȩ޿

¼userID,APP_IDͳÿԴķ

add search research doc

add search research doc


@echo off
setlocal enabledelayedexpansion
SET lastfolder=0
SET dest=0
SET windest=0
SET src=0
SET winsrc=0
SET last=0

SET winsrc=%1
SET src=%winsrc:\=/%
SET src=/cygdrive/%src:~1,1%%src:~3,-1%

SET windest=%2
SET dest=%windest:\=/%
SET dest=/cygdrive/%dest:~1,1%%dest:~3,-2%

echo Src: %src%
echo (win: %winsrc%)
echo Dest: %dest%
echo (win: %windest%)

SET last=%windest:~1,-1%
SET last=%last:~0,-1%
echo ohne letzten Slash: %last%
SET last=%last:\=;%
SET last=%last: =#%
echo bereinigter pfad: %last%

for /F "tokens=* delims=;" %%i IN ("%last%") DO call :LAST_FOLDER %%i
goto :EOF
:LAST_FOLDER
if "%1"=="" (
    SET lastfolder=%LAST:#= %
    goto :CONTINUE
)
SET LAST=%1
SHIFT
goto :LAST_FOLDER
:CONTINUE
echo lastfolder=%lastfolder%

SET searchpath=!windest:%lastfolder%=!
SET searchpath=%searchpath:~1,-3%

echo searchpath=%searchpath%

echo Nach letztem Ordner suchen in %searchpath%
FOR /F " tokens=*" %%i IN ('dir %searchpath% /b /ad-h /o-d') DO (
    SET lastfolder=%%i
    GOTO :FOUND
)
echo No subfolder found
::mkdir %windest%
::E:\Dorian\Desktop\rsync\rsync -avh --delete --ignore-existing --link-dest="%src" "%src%" "%dest%"
goto :eof
:FOUND
echo Letzter Sicherungsordner:
echo %lastfolder%
SET lastfolder=%searchpath%/%lastfolder%
SET lastfolder=/cygdrive/%lastfolder:~0,1%/%lastfolder:~3%
SET lastfolder=%lastfolder:\=/%
echo %lastfolder%
echo Dateien kopieren...
echo mkdir %windest%
mkdir %windest%
echo rsync -ah --delete --ignore-existing --progress --link-dest="%lastfolder%" "%lastfolder%/" "%dest%"
rsync -ah --delete --ignore-existing --progress --link-dest="%lastfolder%" "%lastfolder%/" "%dest%"

echo Warte 20 Sek...
::ping localhost -n 20 >NUL

add batch file

add batch file


Robocopy "./tools/googletest/googlemock" "./tools/protobuf/gmock" /E /MT:2 /R:0 /DCOPY:T
Robocopy "./tools/googletest/googletest" "./tools/protobuf/gmock/gtest" /E /MT:2 /R:0 /DCOPY:T
IF %ERRORLEVEL% LSS 8 goto end
goto :eof

:end
exit 0

Fix appveyor failing on a successful robocopy


REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.

@echo off

REM Get absolute path
pushd %1
set BIN_DIR=%CD%\bin
popd

REM Replace with a robust method for finding the right crossgen.exe
set CROSSGEN_UTIL=%UserProfile%\.dnx\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-beta-23504\tools\crossgen.exe

REM Crossgen currently requires itself to be next to mscorlib
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul

pushd %BIN_DIR%

REM It must also be called mscorlib, not mscorlib.ni
if exist mscorlib.ni.dll (
    copy /Y mscorlib.ni.dll mscorlib.dll > nul
)

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Collections.Immutable.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Reflection.Metadata.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.CSharp.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.VisualBasic.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% csc.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% vbc.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

popd
goto end

:fail
popd
echo Crossgen failed...
exit /B 1

:end

@echo off

REM Copyright (c) .NET Foundation and contributors. All rights reserved.
REM Licensed under the MIT license. See LICENSE file in the project root for full license information.

REM Get absolute path
pushd %1
set BIN_DIR=%CD%\bin
popd

REM Replace with a robust method for finding the right crossgen.exe
set CROSSGEN_UTIL=%UserProfile%\.dnx\packages\runtime.win7-x64.Microsoft.NETCore.Runtime.CoreCLR\1.0.1-beta-23504\tools\crossgen.exe

REM Crossgen currently requires itself to be next to mscorlib
copy %CROSSGEN_UTIL% /Y %BIN_DIR% > nul

pushd %BIN_DIR%

REM It must also be called mscorlib, not mscorlib.ni
if exist mscorlib.ni.dll (
    copy /Y mscorlib.ni.dll mscorlib.dll > nul
)

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Collections.Immutable.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% System.Reflection.Metadata.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.CSharp.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% Microsoft.CodeAnalysis.VisualBasic.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% csc.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

crossgen /nologo /ReadyToRun /Platform_Assemblies_Paths %BIN_DIR% vbc.dll >nul 2>nul
if not %errorlevel% EQU 0 goto fail

popd
goto end

:fail
popd
echo Crossgen failed...
exit /B 1

:end

make copyright header a comment and not an information text


@echo off

:: current path with a slash \
for %%A in ("%~dp0\..") do set "CURRENT_PATH=%%~fA\"

:: change path to where script was run (root dir)
cd /D "%CURRENT_PATH%"

:: localization
@call module\i18n.inc.bat
set i18n=module\i18n.inc.bat

set TOOLS_PATH=%CURRENT_PATH%module\tools\
set EXEC_TOOL=%TOOLS_PATH%exec_tool.bat

rem ----------- THIRD PARTY TOOLS ------------

:: http://gnuwin32.sourceforge.net/packages/wget.htm
::set URL_TOOL_WGET=https://kent.dl.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-bin.zip
::set URL_TOOL_WGET_DEP=https://kent.dl.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-dep.zip
set URL_TOOL_WGET=https://eternallybored.org/misc/wget/1.20.3/32/wget.exe

:: http://www.etree.org/md5com.html
:: (url must be http, because it can be downloaded with wget.vbs which does not support https)
set URL_TOOL_MD5SUM=http://web.archive.org/web/20170430031141/http://www.etree.org:80/cgi-bin/counter.cgi/software/md5sum.exe

:: https://fossies.org/windows/misc/unz600xn.exe/
set URL_TOOL_UNZIP=https://fossies.org/windows/misc/unz600xn.exe/unzip.exe

:: https://github.com/Microsoft/vswhere
set URL_TOOL_VSWHERE=https://github.com/microsoft/vswhere/releases/download/2.8.4/vswhere.exe

:: https://cmake.org
set CMAKE_VER=3.16.3
set CMAKE_VERSION=cmake-%CMAKE_VER%-win32-x86
set URL_TOOL_CMAKE=https://github.com/Kitware/CMake/releases/download/v%CMAKE_VER%/%CMAKE_VERSION%.zip

:: ----------- build_pvpgn VARIABLES ------------

:: LOG=false output cmake and vs output to console
:: LOG=true logs cmake and vs output to cmake.log, visualstudio.log
set LOG=false

set PVPGN_SOURCE=source\
set PVPGN_BUILD=build\

set URL_UPDATE=https://raw.githubusercontent.com/pvpgn/pvpgn-magic-builder/master/

set PVPGN_PATH=https://github.com/pvpgn/pvpgn-server/archive/

set ZLIB_PATH=module\include\zlib\1.2.11\
set LUA_PATH=module\include\lua\5.1\
:: FIXME: important full path?
set ATLMFC_INCLUDE_PATH=%CURRENT_PATH%module\include\atlmfc\

:: ----------- build_d2gs VARIABLES ------------
set URL_MPQ=http://cdn.pvpgn.pro/diablo2/

set D2GS_RELEASE=d2gs\
set URL_BNHASH_API=http://harpywar.pvpgn.pl/api.php?method=hash^&password=

:: ----------- build_pvpgn_dev VARIABLES ------------

:: current path with a backslash /
set CURRENT_PATH_BACKSLASH=%CURRENT_PATH:\=/%

:: root dir for any project
set PROJECT_ROOT_DIR=..\..\..\

set PVPGN_DEVKIT=dev\

@echo off

:: current path with a slash \
for %%A in ("%~dp0\..") do set "CURRENT_PATH=%%~fA\"

:: change path to where script was run (root dir)
cd /D "%CURRENT_PATH%"

:: localization
@call module\i18n.inc.bat
set i18n=module\i18n.inc.bat

set TOOLS_PATH=%CURRENT_PATH%module\tools\
set EXEC_TOOL=%TOOLS_PATH%exec_tool.bat

rem ----------- THIRD PARTY TOOLS ------------

:: http://gnuwin32.sourceforge.net/packages/wget.htm
::set URL_TOOL_WGET=https://kent.dl.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-bin.zip
::set URL_TOOL_WGET_DEP=https://kent.dl.sourceforge.net/project/gnuwin32/wget/1.11.4-1/wget-1.11.4-1-dep.zip
set URL_TOOL_WGET=https://eternallybored.org/misc/wget/1.20.3/32/wget.exe

:: http://www.etree.org/md5com.html
:: (url must be http, because it can be downloaded with wget.vbs which does not support https)
set URL_TOOL_MD5SUM=http://web.archive.org/web/20170430031141/http://www.etree.org:80/cgi-bin/counter.cgi/software/md5sum.exe

:: https://fossies.org/windows/misc/unz600xn.exe/
set URL_TOOL_UNZIP=https://fossies.org/windows/misc/unz600xn.exe/unzip.exe

:: https://github.com/Microsoft/vswhere
set URL_TOOL_VSWHERE=https://github.com/microsoft/vswhere/releases/download/2.8.4/vswhere.exe

:: https://cmake.org
set CMAKE_VER=3.16.3
set CMAKE_VERSION=cmake-%CMAKE_VER%-win32-x86
set URL_TOOL_CMAKE=https://github.com/Kitware/CMake/releases/download/v%CMAKE_VER%/%CMAKE_VERSION%.zip

:: ----------- build_pvpgn VARIABLES ------------

:: LOG=false output cmake and vs output to console
:: LOG=true logs cmake and vs output to cmake.log, visualstudio.log
set LOG=false

set PVPGN_SOURCE=source\
set PVPGN_BUILD=build\

set URL_UPDATE=https://raw.githubusercontent.com/pvpgn/pvpgn-magic-builder/master/

set PVPGN_PATH=https://github.com/pvpgn/pvpgn-server/archive/

set ZLIB_PATH=%CURRENT_PATH%module\include\zlib\1.2.11\
set LUA_PATH=module\include\lua\5.1\
:: FIXME: important full path?
set ATLMFC_INCLUDE_PATH=%CURRENT_PATH%module\include\atlmfc\

:: ----------- build_d2gs VARIABLES ------------
set URL_MPQ=http://cdn.pvpgn.pro/diablo2/

set D2GS_RELEASE=d2gs\
set URL_BNHASH_API=http://harpywar.pvpgn.pl/api.php?method=hash^&password=

:: ----------- build_pvpgn_dev VARIABLES ------------

:: current path with a backslash /
set CURRENT_PATH_BACKSLASH=%CURRENT_PATH:\=/%

:: root dir for any project
set PROJECT_ROOT_DIR=..\..\..\

set PVPGN_DEVKIT=dev\

Update config.inc.bat

Update config.inc.bat