@rem make sure node-gyp is on PATH
call npm install node-gyp -g
set BASE=%cd%
@ rem - NODE_PATH only seems to work with forward slashs
set NODE_PATH=%BASE%\lib
@rem put local copy of node-pre-gyp on PATH
set PATH=%BASE%\bin;%PATH%
call node bin/node-pre-gyp -C test/app1 clean
call node bin/node-pre-gyp -C test/app1 unpublish build package testpackage publish info
call node bin/node-pre-gyp -C test/app1 clean install
cd test/app1
call npm test
cd %BASE%
@rem node bin/node-pre-gyp -C test/app1 unpublish build package testpackage publish info --target_arch=x64
node bin/node-pre-gyp -C test/app2 unpublish build package testpackage publish info --custom_include_path=%BASE%\test\app2\include
cd test/app2
call npm test
cd %BASE%
call node bin/node-pre-gyp -C test/app3 unpublish build package testpackage publish info
cd test/app3
call npm test
cd %BASE%
call node bin/node-pre-gyp -C test/app4 unpublish build package testpackage publish info
cd test/app4
call npm test
cd %BASE%

add test runner for windows

add test runner for windows


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

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

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

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

@setlocal

set ERROR_CODE=0

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

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

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

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

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

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

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

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

@setlocal

set ERROR_CODE=0

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

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

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

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

[MNG-7208] Introduce a system-wide mavenrc.cmd in Windows command script

This closes #523


echo run elevated

mklink /D %USERPROFILE%\.vim %USERPROFILE%\dot-files\.vim

mklink %USERPROFILE%\.vimrc %USERPROFILE%\dot-files\.vimrc

git submodule update --install

vim +PluginInstall +qall

Add setup script

Add setup script


REM If GitVersion is not available then run
REM cinst GitVersion.Portable
REM to install it
GitVersion.exe /exec BuildTools\lib\FAKE\tools\Fake.exe /execArgs "scripts\build.fsx %1" /l console

REM If GitVersion is not available then run
REM cinst GitVersion.Portable
REM to install it
GitVersion.exe /exec scripts\lib\FAKE\tools\Fake.exe /execArgs "scripts\build.fsx %1" /l console

Fix path for build tools

Fix path for build tools


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\dotnetsdk upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\dotnetsdk install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\dotnetsdk use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DOTNET_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\dotnetsdk upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\dotnetsdk install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\dotnetsdk use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Rename SKIP_KRE_INSTALL to SKIP_DOTNET_INSTALL


rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load HKLM\DEFAULT "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload HKLM\DEFAULT

reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

rem dennyhalim.com
rem this will be copied after first reboot and then run after next reboot

rem replace defaultlayouts before it gets created
move "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.dennyhalim"
copy /y "%WINDIR%\Setup\Files\DefaultLayouts.xml" "%Public%\..\Default\AppData\Local\Microsoft\Windows\Shell\DefaultLayouts.xml"
move "%SystemRoot%\SysWOW64\OneDriveSetup.exe" "%SystemRoot%\SysWOW64\OneDriveSetup.dennyhalim"
move "%SystemRoot%\System32\OneDriveSetup.exe" "%SystemRoot%\System32\OneDriveSetup.dennyhalim"
rem move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.dennyhalim"
rem startmenu disabled if shellex disabled
rem move "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy" "%windir%\SystemApps\ShellExperienceHost_cw5n1h2txyewy.dennyhalim"

wmic.exe USERACCOUNT WHERE "Name='admin'" set PasswordExpires=FALSE
wmic.exe USERACCOUNT WHERE "Name='user'" set PasswordExpires=FALSE

reg.exe load HKLM\DEFAULT "%Public%\..\default\ntuser.dat"
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People /v PeopleBand /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_TrackProgs /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" /v GlobalUserDisabled /t REG_DWORD /d 1 /f
reg.exe add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /d Deny /f
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload HKLM\DEFAULT

reg.exe add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" /v LetAppsRunInBackground /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferUpgrade /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v BranchReadinessLevel /t REG_DWORD /d 32 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdates /t REG_DWORD /d 1 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v DeferFeatureUpdatesPeriodinDays /t REG_DWORD /d 365 /f
reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseCredShared /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\WcmSvc\wifinetworkmanager\features" /v WiFiSenseOpen /t REG_DWORD /d 0 /f
reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" /v 1 /t REG_SZ /d pool.ntp.org /f

cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon LBP2900" -i "%WINDIR%\Setup\Drivers\CanonLBP2900\CNAB4STD.inf"
cscript.exe "%WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs" -a -m "Canon G2000 series Printer" -i "%WINDIR%\Setup\Drivers\CanonG2000\Driver\G2000P6.inf"
rem move "%WINDIR%\Setup\Drivers\*" "%WINDIR%\INF"

schtasks.exe /change /TN "\Microsoft\Windows\Setup\SetupCleanupTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /DISABLE
schtasks.exe /change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /DISABLE

"%WINDIR%\Setup\Files\chocolatey.exe" /S
"%WINDIR%\Setup\Files\Firefox Setup 52.6.0esr.exe" -ms
"%WINDIR%\Setup\Files\vlc-3.0.1-win64.exe" /L=1033 /S
"%WINDIR%\Setup\Files\SumatraPDF-3.1.2-64-install.exe" /S
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\just-install.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\NpackdCL-1.23.2.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\7z1805-x64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\qalculate-2.4.0a.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\GoogleChromeStandaloneEnterprise64.msi"
msiexec.exe /passive /norestart /I "%WINDIR%\Setup\Files\LibreOffice_5.4.6_Win_x64.msi"
rem "%WINDIR%\Setup\Files\avira_pc_cleaner_en.exe" /s
"%WINDIR%\Setup\Files\mb3-setup-consumer-3.4.5.2467-1.0.342-1.0.4664.exe" /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
"%WINDIR%\Setup\Files\avast_business_antivirus_managed_setup_offline_silent.exe"

powershell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Progs\OpenSSH\install-sshd.ps1"
PowerShell.exe -ExecutionPolicy Bypass -File "%WINDIR%\Setup\Files\setup.ps1"

sc.exe config wuauserv start= demand
sc.exe config DiagTrack start= disabled
sc.exe config dmwappushservice start= disabled
sc.exe config RetailDemo start= disabled
sc.exe config lfsvc start= disabled
sc.exe config ssh-agent start= auto
sc.exe config sshd start= auto

netsh advfirewall firewall add rule dir=in action=allow profile=any protocol=TCP localport=2222 name="sshd"

mkdir "%Public%\Desktop.dennyhalim"
move "%Public%\Desktop\*.*" "%Public%\Desktop.dennyhalim"

rem use powershell for w10 only features
dism.exe /online /norestart /Enable-Feature /FeatureName:TelnetClient
dism.exe /online /norestart /Disable-Feature /FeatureName:MediaPlayback
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsMediaPlayer
dism.exe /online /norestart /Disable-Feature /FeatureName:WindowsGadgetPlatform
dism.exe /online /norestart /Disable-Feature /FeatureName:Indexing-Service-Package
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-x86
dism.exe /online /norestart /Disable-Feature /FeatureName:Internet-Explorer-Optional-amd64

rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

Update SetupComplete.cmd

Update SetupComplete.cmd


SETLOCAL
SET Version=2.5.0
SET Prerelease=auto

@SET Config=%1%
@IF [%1] == [] SET Config=Debug

IF NOT DEFINED VisualStudioVersion CALL "%VS140COMNTOOLS%VsDevCmd.bat" || ECHO ERROR: Cannot find Visual Studio 2015, missing VS140COMNTOOLS variable. && GOTO Error0
@ECHO ON

REM Updating the version of all projects
PowerShell .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0

REM NuGet Automatic Package Restore requires "NuGet.exe restore" to be executed before the command-line build.
WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0
NuGet.exe restore Rhetos.sln -NonInteractive || GOTO Error0
MSBuild.exe "Rhetos.sln" /target:rebuild /p:Configuration=%Config% /verbosity:minimal /fileLogger || GOTO Error0
CALL CreateInstallationPackage.bat %Config% /NOPAUSE || GOTO Error0

REM Updating the version of all projects back to "dev" (internal development build), to avoid spamming git history.
PowerShell .\ChangeVersion.ps1 %Version% dev || GOTO Error0

@REM ================================================

@ECHO.
@ECHO %~nx0 SUCCESSFULLY COMPLETED.
@EXIT /B 0

:Error0
@ECHO.
@ECHO %~nx0 FAILED.
@IF /I [%2] NEQ [/NOPAUSE] @PAUSE
@EXIT /B 1

SETLOCAL
SET Version=2.5.0
SET Prerelease=auto

@SET Config=%1%
@IF [%1] == [] SET Config=Debug

IF NOT DEFINED VisualStudioVersion CALL "%VS140COMNTOOLS%VsDevCmd.bat" || ECHO ERROR: Cannot find Visual Studio 2015, missing VS140COMNTOOLS variable. && GOTO Error0
@ECHO ON

REM Updating the version of all projects
PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% %Prerelease% || GOTO Error0

REM NuGet Automatic Package Restore requires "NuGet.exe restore" to be executed before the command-line build.
WHERE /Q NuGet.exe || ECHO ERROR: Please download the NuGet.exe command line tool. && GOTO Error0
NuGet.exe restore Rhetos.sln -NonInteractive || GOTO Error0
MSBuild.exe "Rhetos.sln" /target:rebuild /p:Configuration=%Config% /verbosity:minimal /fileLogger || GOTO Error0
CALL CreateInstallationPackage.bat %Config% /NOPAUSE || GOTO Error0

REM Updating the version of all projects back to "dev" (internal development build), to avoid spamming git history.
PowerShell -ExecutionPolicy ByPass .\ChangeVersion.ps1 %Version% dev || GOTO Error0

@REM ================================================

@ECHO.
@ECHO %~nx0 SUCCESSFULLY COMPLETED.
@EXIT /B 0

:Error0
@ECHO.
@ECHO %~nx0 FAILED.
@IF /I [%2] NEQ [/NOPAUSE] @PAUSE
@EXIT /B 1

Set Powershell ExecutionPolicy for build.


mkdir mage
composer install
rem Actions after deploy (database creation, files copy, etc)
copy ..\src\app\etc\nmmlm mage\app\etc

mkdir mage
composer install
rem Actions after deploy (database creation, files copy, etc)
xcopy ..\src\app\etc\nmmlm mage\app\etc\nmmlm /E /Y /I

Deploy script changed from copy to xcopy


@REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.

@setlocal EnableExtensions EnableDelayedExpansion
@echo off

set current-path=%~dp0

rem // remove trailing slash
set current-path=%current-path:~0,-1%

set build-root=%current-path%\..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi

rem ----------------------------------------------------------------------------
rem -- parse script arguments
rem ----------------------------------------------------------------------------

rem // default build options
set build-config=Debug
set build-platform=Win32
set CMAKE_run_e2e_tests=OFF
set CMAKE_enable_dotnet_binding=OFF
set enable-java-binding=OFF
set enable_nodejs_binding=OFF

:args-loop
if "%1" equ "" goto args-done
if "%1" equ "--config" goto arg-build-config
if "%1" equ "--platform" goto arg-build-platform
if "%1" equ "--run-e2e-tests" goto arg-run-e2e-tests
if "%1" equ "--enable-dotnet-binding" goto arg-enable-dotnet-binding
if "%1" equ "--enable-java-binding" goto arg-enable-java-binding
if "%1" equ "--enable-nodejs-binding" goto arg-enable_nodejs_binding
call :usage && exit /b 1

:arg-build-config
shift
if "%1" equ "" call :usage && exit /b 1
set build-config=%1
goto args-continue

:arg-build-platform
shift
if "%1" equ "" call :usage && exit /b 1
set build-platform=%1
goto args-continue

:arg-run-e2e-tests
set CMAKE_run_e2e_tests=ON
goto args-continue

:arg-enable-dotnet-binding
set CMAKE_enable_dotnet_binding=ON
goto args-continue

:arg-enable-java-binding
set enable-java-binding=ON
call %current-path%\build_java.cmd
goto args-continue

:arg-enable_nodejs_binding
set enable_nodejs_binding=ON
goto args-continue

:args-continue
shift
goto args-loop

:args-done

rem -----------------------------------------------------------------------------
rem -- build with CMAKE and run tests
rem -----------------------------------------------------------------------------

rem this is setting the cmake path in a quoted way
set cmake-root="%build-root%"\build

rem get the size of cmake path
set cmake-root-no-quotes=%build-root%\build
set size=0
:loop
if defined cmake-root-no-quotes (
    rem chop down one character
    set cmake-root-no-quotes=%cmake-root-no-quotes:~1%
    rem add it to the size
    set /A size += 1
    rem go to begin
    goto loop
)

rem echo %build-root%\build (%cmake-root%)is %size% characters long!
if %size% GTR 49 (
    @echo build.cmd cannot continue because the path %build-root%\build is too long!
    @echo try placing the repo in a shorter path. the path size can be at most 49 characters
    exit /b 1
)

rmdir /s/q %cmake-root%

mkdir %cmake-root%
rem no error checking

pushd %cmake-root%
cmake -Drun_e2e_tests:BOOL=%CMAKE_run_e2e_tests% -Denable_dotnet_binding:BOOL=%CMAKE_enable_dotnet_binding% -Denable_java_binding:BOOL=%enable-java-binding% -Denable_nodejs_binding:BOOL=%enable_nodejs_binding% "%build-root%"
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!

msbuild /m /p:Configuration="%build-config%" /p:Platform="%build-platform%" azure_iot_gateway_sdk.sln
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!

ctest -C "debug" -V
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!

popd
goto :eof

rem -----------------------------------------------------------------------------
rem -- subroutines
rem -----------------------------------------------------------------------------

:usage
echo build.cmd [options]
echo options:
echo  --config ^<value^>         [Debug] build configuration (e.g. Debug, Release)
echo  --platform ^<value^>       [Win32] build platform (e.g. Win32, x64, ...)
echo  --run-e2e-tests            run end-to-end tests
echo  --enable-dotnet-binding    build dotnet binding binaries
echo  --enable-java-binding      enables building of Java binding; environment variable JAVA_HOME must be defined
echo  --enable-nodejs-binding   enables building of Node.js binding; environment variables NODE_INCLUDE and NODE_LIB must be defined
goto :eof

@REM Copyright (c) Microsoft. All rights reserved.
@REM Licensed under the MIT license. See LICENSE file in the project root for full license information.

@setlocal EnableExtensions EnableDelayedExpansion
@echo off

set current-path=%~dp0

rem // remove trailing slash
set current-path=%current-path:~0,-1%

set build-root=%current-path%\..
rem // resolve to fully qualified path
for %%i in ("%build-root%") do set build-root=%%~fi

rem ----------------------------------------------------------------------------
rem -- parse script arguments
rem ----------------------------------------------------------------------------

rem // default build options
set build-config=Debug
set build-platform=Win32
set CMAKE_run_e2e_tests=OFF
set CMAKE_enable_dotnet_binding=OFF
set enable-java-binding=OFF
set enable_nodejs_binding=OFF

:args-loop
if "%1" equ "" goto args-done
if "%1" equ "--config" goto arg-build-config
if "%1" equ "--platform" goto arg-build-platform
if "%1" equ "--run-e2e-tests" goto arg-run-e2e-tests
if "%1" equ "--enable-dotnet-binding" goto arg-enable-dotnet-binding
if "%1" equ "--enable-java-binding" goto arg-enable-java-binding
if "%1" equ "--enable-nodejs-binding" goto arg-enable_nodejs_binding
call :usage && exit /b 1

:arg-build-config
shift
if "%1" equ "" call :usage && exit /b 1
set build-config=%1
goto args-continue

:arg-build-platform
shift
if "%1" equ "" call :usage && exit /b 1
set build-platform=%1
goto args-continue

:arg-run-e2e-tests
set CMAKE_run_e2e_tests=ON
goto args-continue

:arg-enable-dotnet-binding
set CMAKE_enable_dotnet_binding=ON
goto args-continue

:arg-enable-java-binding
set enable-java-binding=ON
call %current-path%\build_java.cmd
goto args-continue

:arg-enable_nodejs_binding
set enable_nodejs_binding=ON
goto args-continue

:args-continue
shift
goto args-loop

:args-done

rem -----------------------------------------------------------------------------
rem -- build with CMAKE and run tests
rem -----------------------------------------------------------------------------

rem this is setting the cmake path in a quoted way
set cmake-root="%build-root%"\build

rem get the size of cmake path
set cmake-root-no-quotes=%build-root%\build
set size=0
:loop
if defined cmake-root-no-quotes (
    rem chop down one character
    set cmake-root-no-quotes=%cmake-root-no-quotes:~1%
    rem add it to the size
    set /A size += 1
    rem go to begin
    goto loop
)

rem echo %build-root%\build (%cmake-root%)is %size% characters long!
if %size% GTR 49 (
    @echo build.cmd cannot continue because the path %build-root%\build is too long!
    @echo try placing the repo in a shorter path. the path size can be at most 49 characters
    exit /b 1
)

rmdir /s/q %cmake-root%

mkdir %cmake-root%
rem no error checking

pushd %cmake-root%
if %build-platform% == x64 (
	echo ***Running CMAKE for Win64***
        cmake -Drun_e2e_tests:BOOL=%CMAKE_run_e2e_tests% -Denable_dotnet_binding:BOOL=%CMAKE_enable_dotnet_binding% -Denable_java_binding:BOOL=%enable-java-binding% -Denable_nodejs_binding:BOOL=%enable_nodejs_binding% "%build-root%" -G "Visual Studio 14 Win64"
        if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
) else (
	echo ***Running CMAKE for Win32***
        cmake -Drun_e2e_tests:BOOL=%CMAKE_run_e2e_tests% -Denable_dotnet_binding:BOOL=%CMAKE_enable_dotnet_binding% -Denable_java_binding:BOOL=%enable-java-binding% -Denable_nodejs_binding:BOOL=%enable_nodejs_binding% "%build-root%"
        if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!
)

msbuild /m /p:Configuration="%build-config%" /p:Platform="%build-platform%" azure_iot_gateway_sdk.sln
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!

ctest -C "debug" -V
if not !ERRORLEVEL!==0 exit /b !ERRORLEVEL!

popd
goto :eof

rem -----------------------------------------------------------------------------
rem -- subroutines
rem -----------------------------------------------------------------------------

:usage
echo build.cmd [options]
echo options:
echo  --config ^<value^>         [Debug] build configuration (e.g. Debug, Release)
echo  --platform ^<value^>       [Win32] build platform (e.g. Win32, x64, ...)
echo  --run-e2e-tests            run end-to-end tests
echo  --enable-dotnet-binding    build dotnet binding binaries
echo  --enable-java-binding      enables building of Java binding; environment variable JAVA_HOME must be defined
echo  --enable-nodejs-binding   enables building of Node.js binding; environment variables NODE_INCLUDE and NODE_LIB must be defined
goto :eof

Fix arguments for x64 build for cmake

Fix arguments for x64 build for cmake


echo on
setlocal EnableDelayedExpansion

SET POWERSHELL_PATH=
FOR /F "delims=" %%F IN ('where powershell.exe') DO (SET POWERSHELL_PATH=!POWERSHELL_PATH!%%~dpF.;)

set NEW_PATH=C:\Windows\system32;C:\Windows;%PYTHON3_PATH%;%PYTHON3_PATH%\Scripts;C:\Program Files (x86)\CMake\bin;
set PATH=%NEW_PATH%

SET CL_PATH=
SET MSBUILD_PATH=

if not "%VCVARSALL_DIR%" == "" (
  CALL "%VCVARSALL_DIR%\vcvarsall.bat" amd64
  echo on
  FOR /F "delims=" %%F IN ('where cl.exe') DO (SET CL_PATH=!CL_PATH!%%~dpF.;)
  FOR /F "delims=" %%F IN ('where msbuild.exe') DO (SET MSBUILD_PATH=!MSBUILD_PATH!%%~dpF.;)
)

set NEW_PATH=%NEW_PATH%%CL_PATH%%MSBUILD_PATH%%POWERSHELL_PATH%

if not "%MINGW_PATH%" == "" SET NEW_PATH=%NEW_PATH%%MINGW_PATH%;

set PATH=%NEW_PATH%
setx PATH "%PATH%"

mkdir C:\Fruit\build-%CONFIGURATION%
cd C:\Fruit\build-%CONFIGURATION%

cmake.exe -G "%CMAKE_GENERATOR%" .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% %ADDITIONAL_CMAKE_ARGS%

echo "Content of CMakeFiles\CMakeError.log:"
if exist "CMakeFiles\CMakeError.log" (
  type "CMakeFiles\CMakeError.log"
)

IF "%CMAKE_GENERATOR%"=="MinGW Makefiles" (
  mingw32-make -j12 || exit /b 1
) ELSE (
  type ALL_BUILD.vcxproj
  msbuild ALL_BUILD.vcxproj || exit /b 1
)

pip3 install pytest
pip3 install pytest-xdist

cd tests
py.test -r a -n 1 || exit /b 1

echo on
setlocal EnableDelayedExpansion

SET POWERSHELL_PATH=
FOR /F "delims=" %%F IN ('where powershell.exe') DO (SET POWERSHELL_PATH=!POWERSHELL_PATH!%%~dpF.;)

set NEW_PATH=C:\Windows\system32;C:\Windows;%PYTHON3_PATH%;%PYTHON3_PATH%\Scripts;C:\Program Files (x86)\CMake\bin;
set PATH=%NEW_PATH%

SET CL_PATH=
SET MSBUILD_PATH=

if not "%VCVARSALL_DIR%" == "" (
  CALL "%VCVARSALL_DIR%\vcvarsall.bat" amd64
  echo on
  FOR /F "delims=" %%F IN ('where cl.exe') DO (SET CL_PATH=!CL_PATH!%%~dpF.;)
  FOR /F "delims=" %%F IN ('where msbuild.exe') DO (SET MSBUILD_PATH=!MSBUILD_PATH!%%~dpF.;)
)

set NEW_PATH=%NEW_PATH%%CL_PATH%%MSBUILD_PATH%%POWERSHELL_PATH%

if not "%MINGW_PATH%" == "" SET NEW_PATH=%NEW_PATH%%MINGW_PATH%;

set PATH=%NEW_PATH%
setx PATH "%PATH%"

mkdir C:\Fruit\build-%CONFIGURATION%
cd C:\Fruit\build-%CONFIGURATION%

cmake.exe -G "%CMAKE_GENERATOR%" .. -DCMAKE_BUILD_TYPE=%CONFIGURATION% %ADDITIONAL_CMAKE_ARGS%

echo "Content of CMakeFiles\CMakeError.log:"
if exist "CMakeFiles\CMakeError.log" (
  type "CMakeFiles\CMakeError.log"
)

IF "%CMAKE_GENERATOR%"=="MinGW Makefiles" (
  mingw32-make -j12 || exit /b 1
) ELSE (
  type ALL_BUILD.vcxproj
  msbuild ALL_BUILD.vcxproj || exit /b 1
)

pip3 install absl-py
pip3 install pytest
pip3 install pytest-xdist

cd tests
py.test -r a -n 1 || exit /b 1

Install absl-py when running CI tests on Appveyor.


cd ./src/AspNet.Mvc.Formatters.Protobuf
dnu restore
dnu build
dnu pack
cd ..
cd ..
msbuild AspNet.Mvc.Formatters.Protobuf.sln

cd ./src/AspNet.Mvc.Formatters.Protobuf
dnu restore
cd ..
cd ..
msbuild AspNet.Mvc.Formatters.Protobuf.sln

Remove dnus

Remove dnus


cd runtime\libpgmath

mkdir build
cd build

set "CC=clang-cl.exe"
set "CXX=clang-cl.exe"

set PIP_NO_INDEX=
pip install lit

cmake ^
  -G"MSYS Makefiles" ^
  -DCMAKE_BUILD_TYPE=Release ^
  -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
  -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
  ..

make -j%CPU_COUNT%
make install
make check-libpgmath

cd runtime\libpgmath

mkdir build
cd build

set "CC=clang-cl.exe"
set "CXX=clang-cl.exe"

set PIP_NO_INDEX=
pip install lit

cmake ^
  -G"MSYS Makefiles" ^
  -DCMAKE_BUILD_TYPE=Release ^
  -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
  -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% ^
  -DCMAKE_AR=llvm-ar ^
  ..

make -j%CPU_COUNT%
make install
make check-libpgmath

Add CMAKE_AR

Add CMAKE_AR


choco install -y firefox googlechrome wget
wget -c https://cygwin.com/setup-x86_64.exe
REM cygwin installation
setup-x86_64 -R "C:\cygwin" -Pg curl,zsh,git,vim,wget

choco install -y firefox googlechrome wget
wget -c https://cygwin.com/setup-x86_64.exe
REM cygwin installation
setup-x86_64.exe -R "C:\cygwin" -s http://cygwin.netbet.org/ -q -g -P curl,zsh,git,vim,wget

fix cygwin isntaller to be noninteractive


echo off
rem
rem  Copyright (C) 2000, 2001  Internet Software Consortium.
rem
rem  Permission to use, copy, modify, and distribute this software for any
rem  purpose with or without fee is hereby granted, provided that the above
rem  copyright notice and this permission notice appear in all copies.
rem
rem  THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
rem  DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
rem  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
rem  INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
rem  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
rem  FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
rem  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
rem  WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

rem BuildSetup.bat
rem This script sets up the files necessary ready to build BIND 9.
rem This requires perl to be installed on the system.

rem Set up the configuration file
cd ..
copy config.h.win32 config.h
cd win32utils

rem Generate the version information
perl makeversion.pl

rem Generate header files for lib/dns

call dnsheadergen.bat

echo Ensure that the OpenSSL sources are at the same level in
echo the directory tree and is named openssl-0.9.6b or libdns
echo will not build.

rem Make sure that the Build directories are there.

if NOT Exist ..\Build mkdir ..\Build
if NOT Exist ..\Build\Release mkdir ..\Build\Release

echo Copying the ARM and the Installation Notes.

copy readme1st.txt ..\Build\Release
copy ..\doc\arm\*.html ..\Build\Release
copy ..\CHANGES ..\Build\Release
copy ..\FAQ ..\Build\Release

echo Copying the OpenSSL DLL.

copy ..\..\openssl-0.9.6b\out32dll\libeay32.dll ..\Build\Release\

rem Done

echo off
rem
rem  Copyright (C) 2000, 2001  Internet Software Consortium.
rem
rem  Permission to use, copy, modify, and distribute this software for any
rem  purpose with or without fee is hereby granted, provided that the above
rem  copyright notice and this permission notice appear in all copies.
rem
rem  THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
rem  DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
rem  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
rem  INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
rem  INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
rem  FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
rem  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
rem  WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

rem BuildSetup.bat
rem This script sets up the files necessary ready to build BIND 9.
rem This requires perl to be installed on the system.

rem Set up the configuration file
cd ..
copy config.h.win32 config.h
cd win32utils

rem Generate the version information
perl makeversion.pl

rem Generate header files for lib/dns

call dnsheadergen.bat

echo Ensure that the OpenSSL sources are at the same level in
echo the directory tree and is named openssl-0.9.6b or libdns
echo will not build.

rem Make sure that the Build directories are there.

if NOT Exist ..\Build mkdir ..\Build
if NOT Exist ..\Build\Release mkdir ..\Build\Release

echo Copying the ARM and the Installation Notes.

copy ..\COPYRIGHT ..\Build\Release
copy readme1st.txt ..\Build\Release
copy ..\doc\arm\*.html ..\Build\Release
copy ..\CHANGES ..\Build\Release
copy ..\FAQ ..\Build\Release

echo Copying the OpenSSL DLL.

copy ..\..\openssl-0.9.6b\out32dll\libeay32.dll ..\Build\Release\

rem Done

copy COPYRIGHT

copy COPYRIGHT


REM ---
REM Emit the version info for dotnet, for debugging purposes
REM ---
dotnet --version

dotnet-sonarscanner begin ^
    /k:"ZptSharp" ^
    /v:AppVeyor_build_%APPVEYOR_BUILD_NUMBER% ^
    /o:craigfowler-github ^
    /s:%APPVEYOR_BUILD_FOLDER%\.SonarQube.Analysis.xml ^
    /d:sonar.host.url="https://sonarcloud.io" ^
    /d:sonar.login=%SONARCLOUD_SECRET_KEY% ^
    /d:sonar.cs.nunit.reportsPaths=%APPVEYOR_BUILD_FOLDER%\.TestResults\TestResults.*.xml ^
    /d:sonar.cs.opencover.reportsPaths=%APPVEYOR_BUILD_FOLDER%\.TestResults\coverage.opencover.*.xml ^
    /d:sonar.branch.name=%APPVEYOR_REPO_BRANCH%

REM ---
REM The tests have to be run separately, otherwise the NUnit test results file
REM and the Coverlet results files will end up overwriting one another, which is
REM rather frustrating.
REM This workaround runs them separately and moves the results files to 'safe' filenames after
REM they have been executed.
REM ---

dotnet test ZptSharp.Tests ^
    /p:CollectCoverage=true ^
    /p:CoverletOutputFormat=\"json,opencover\" ^
    /p:CoverletOutput=\"../.TestResults/\" ^
    --test-adapter-path:. ^
    --logger:\"nunit;LogFilePath=../.TestResults\TestResults.xml\"

REM ---
REM 'Capture' the exit code from dotnet test for later use
REM ---
set generalexitcode=%errorlevel%

move .TestResults\TestResults.xml .TestResults\TestResults.ZptSharp.Tests.xml
move .TestResults\coverage.opencover.xml .TestResults\coverage.opencover.ZptSharp.Tests.xml

dotnet test ZptSharp.Mvc5.Tests ^
    /p:CollectCoverage=true ^
    /p:CoverletOutputFormat=\"json,opencover\" ^
    /p:CoverletOutput=\"../.TestResults/\" ^
    --test-adapter-path:. ^
    --logger:\"nunit;LogFilePath=../.TestResults\TestResults.xml\"

move .TestResults\TestResults.xml .TestResults\TestResults.ZptSharp.Mvc5.Tests.xml
move .TestResults\coverage.opencover.xml .TestResults\coverage.opencover.ZptSharp.Mvc5.Tests.xml

REM ---
REM 'Capture' the exit code from dotnet test for later use
REM ---
set mvcexitcode=%errorlevel%

dotnet-sonarscanner end ^
    /d:"sonar.login=%SONARCLOUD_SECRET_KEY%"

REM ---
REM Upload all files in the test results directory to AppVeyor as artifacts
REM ---
FOR %%F IN (.TestResults\*.*) DO appveyor PushArtifact %%F

REM If both exit codes are zero then this is exit 0, otherwise it will raise an error.
set /A "exitcode=generalexitcode+mvcexitcode"
exit /B %exitcode%

REM ---
REM Emit the version info for dotnet, for debugging purposes
REM ---
dotnet --version

dotnet-sonarscanner begin ^
    /k:"ZptSharp" ^
    /v:AppVeyor_build_%APPVEYOR_BUILD_NUMBER% ^
    /o:craigfowler-github ^
    /s:%APPVEYOR_BUILD_FOLDER%\.SonarQube.Analysis.xml ^
    /d:sonar.host.url="https://sonarcloud.io" ^
    /d:sonar.login=%SONARCLOUD_SECRET_KEY% ^
    /d:sonar.cs.nunit.reportsPaths=%APPVEYOR_BUILD_FOLDER%\.TestResults\TestResults.*.xml ^
    /d:sonar.cs.opencover.reportsPaths=%APPVEYOR_BUILD_FOLDER%\.TestResults\coverage.opencover.*.xml ^
    /d:sonar.branch.name=%APPVEYOR_REPO_BRANCH%

REM ---
REM The tests have to be run separately, otherwise the NUnit test results file
REM and the Coverlet results files will end up overwriting one another, which is
REM rather frustrating.
REM This workaround runs them separately and moves the results files to 'safe' filenames after
REM they have been executed.
REM ---

dotnet test ZptSharp.Tests ^
    /p:CollectCoverage=true ^
    /p:CoverletOutputFormat=\"json,opencover\" ^
    /p:CoverletOutput=\"../.TestResults/\" ^
    --test-adapter-path:. ^
    --logger:\"nunit;LogFilePath=../.TestResults\TestResults.xml\"

REM ---
REM 'Capture' the exit code from dotnet test for later use
REM ---
set generalexitcode=%errorlevel%

move .TestResults\TestResults.xml .TestResults\TestResults.ZptSharp.Tests.xml
move .TestResults\coverage.opencover.xml .TestResults\coverage.opencover.ZptSharp.Tests.xml

dotnet test MvcViewEngines\ZptSharp.Mvc5.Tests ^
    /p:CollectCoverage=true ^
    /p:CoverletOutputFormat=\"json,opencover\" ^
    /p:CoverletOutput=\"../.TestResults/\" ^
    --test-adapter-path:. ^
    --logger:\"nunit;LogFilePath=../.TestResults\TestResults.xml\"

REM ---
REM 'Capture' the exit code from dotnet test for later use
REM ---
set mvcexitcode=%errorlevel%

move .TestResults\TestResults.xml .TestResults\TestResults.ZptSharp.Mvc5.Tests.xml
move .TestResults\coverage.opencover.xml .TestResults\coverage.opencover.ZptSharp.Mvc5.Tests.xml

dotnet-sonarscanner end ^
    /d:"sonar.login=%SONARCLOUD_SECRET_KEY%"

REM ---
REM Upload all files in the test results directory to AppVeyor as artifacts
REM ---
FOR %%F IN (.TestResults\*.*) DO appveyor PushArtifact %%F

REM If both exit codes are zero then this is exit 0, otherwise it will raise an error.
set /A "exitcode=generalexitcode+mvcexitcode"
exit /B %exitcode%

Fix AppVeyor build file

Fix AppVeyor build file


@echo off

setlocal enabledelayedexpansion

set errorlevel=1
set errorlevel=
set mode=%1

if "%mode%" == "build" (
    echo "Building UI tests..."
    pushd src\xpiks-tests\ui-tests-stubs
    qmake "CONFIG+=%configuration% appveyor" ui-tests-stubs.pro
    nmake.exe || goto :error
    popd

    pushd src\xpiks-tests\xpiks-tests-ui
    qmake "CONFIG+=%configuration% appveyor" xpiks-tests-ui.pro
    nmake.exe || goto :error
    popd
)

if "%mode%" == "run" (
    pushd src\xpiks-tests\xpiks-tests-ui
    copy ..\..\..\libs\%configuration%\*.dll .

    echo "Running UI tests..."
    %configuration%\xpiks-tests-ui.exe > uitests_in_memory.log
    if errorlevel 1 (
        set testsexitcode=!errorlevel!
        echo UI tests failed with code !testsexitcode!
        type uitests_in_memory.log
        goto :error
    )

    type uitests_in_memory.log
    appveyor PushArtifact uitests_in_memory.log
    popd
)

goto :EOF

:error
echo "Handling error..."
appveyor PushArtifact uitests_in_memory.log

for %%f in (*.dmp) do (
    echo Trying to upload dump %%~nf
    appveyor PushArtifact %%~nf
)

popd
echo Failed with error #!errorlevel!.
exit /b !errorlevel!

@echo off

setlocal enabledelayedexpansion

set errorlevel=1
set errorlevel=
set mode=%1

if "%mode%" == "build" (
    echo "Building UI tests..."
    pushd src\xpiks-tests\ui-tests-stubs
    qmake "CONFIG+=%configuration% appveyor" ui-tests-stubs.pro
    nmake.exe || goto :error
    popd

    pushd src\xpiks-tests\xpiks-tests-ui
    qmake "CONFIG+=%configuration% appveyor" xpiks-tests-ui.pro
    nmake.exe || goto :error
    popd
)

set testsexitcode=0

if "%mode%" == "run" (
    pushd src\xpiks-tests\xpiks-tests-ui
    copy ..\..\..\libs\%configuration%\*.dll .

    echo "Running UI tests..."
    %configuration%\xpiks-tests-ui.exe > uitests_in_memory.log
    if errorlevel 1 (
        set testsexitcode=!errorlevel!
        echo UI tests failed with code !testsexitcode!
        type uitests_in_memory.log
        goto :error
    )

    type uitests_in_memory.log
    appveyor PushArtifact uitests_in_memory.log
    popd
)

goto :EOF

:error
echo "Handling error..."
appveyor PushArtifact uitests_in_memory.log

for %%f in (*.dmp) do (
    echo Trying to upload dump %%~nf
    appveyor PushArtifact %%~nf
)

popd
echo Failed with error #!errorlevel!.
exit /b !errorlevel!

Fix appveyor ui tests script

Fix appveyor ui tests script


"%PYTHON%" setup.py install
if errorlevel 1 exit 1

"%PYTHON%" -m pip install -U pycld2
if errorlevel 1 exit 1

Update bld.bat

Update bld.bat


@echo off

set VELCP=.

for %%i in (..\..\bin\*.jar) do call appendVELCP %%i
for %%i in (..\..\bin\lib\*.jar) do call appendVELCP %%i

echo Using classpath:  %VELCP%

java -cp %VELCP% LoggerExample

@echo off

set VELCP=.

for %%i in (..\..\bin\*.jar) do call appendVELCP %%i
for %%i in (..\..\build\lib\*.jar) do call appendVELCP %%i

echo Using classpath:  %VELCP%

java -cp %VELCP% LoggerExample

fix path to build library

fix path to build library

git-svn-id: c034e65a970fbc4d275e9133accfdbae8a5a0ac2@312689 13f79535-47bb-0310-9956-ffa450edef68


@echo off
del RemoteControl.exe
@echo on
go build
@echo off
if %ERRORLEVEL% EQU 0 (
  echo "start"
  RemoteControl.exe
) else (
  echo "errors"
  pause
)

add build script

add build script


protoc --go_out=./server ./proto/*.proto
cd server
go build
cd ..
browserify ./client/main.js -o ./public/js/app.js

build script

build script


@echo Off
set config=%1
if "%config%" == "" (
   set config=Release
)

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild Bot.Messenger.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

mkdir Build
mkdir Build\lib
mkdir Build\lib\net45

%nuget% pack "Bot.Messenger.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"

@echo Off
set config=%1
if "%config%" == "" (
   set config=Release
)

set version=1.0.0
if not "%PackageVersion%" == "" (
   set version=%PackageVersion%
)

set nuget=
if "%nuget%" == "" (
	set nuget=nuget
)

%programfiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe Bot.Messenger.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=msbuild.log;Verbosity=diag /nr:false

mkdir Build
mkdir Build\lib
mkdir Build\lib\net461

%nuget% pack "Bot.Messenger.nuspec" -NoPackageAnalysis -verbosity detailed -o Build -Version %version% -p Configuration="%config%"

Build commant updated to target MSBuild\14.0


@ECHO OFF

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

"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal %1 %2 %3 %4 %5 %6 %7 %8 %9

@ECHO OFF

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

"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal %*

Replace individual parameters with wildcard

It's not that we ever want to pass more than ten arguments; it's about
the fact that we'd like to be able to pass arguments like this:

    .\build.cmd /p:OutDir='D:\test\'

Using individual arguments, MSBuild is called like this:

    MSBuild.exe /p:OutDir D:\test\

That's because the equal sign is considered a separator in batch files.


@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD "%REPO_FOLDER%"

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

IF NOT EXIST %NUGET_PATH% (
    IF NOT EXIST %CACHED_NUGET% (
        echo Downloading latest version of NuGet.exe...
        IF NOT EXIST %LocalAppData%\NuGet (
            md %LocalAppData%\NuGet
        )
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
    )

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

IF NOT EXIST %KOREBUILD_FOLDER% (
    SET KOREBUILD_DOWNLOAD_ARGS=
    IF NOT "%KOREBUILD_VERSION%"=="" (
        SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
    )

    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

@ECHO off
SETLOCAL

SET REPO_FOLDER=%~dp0
CD "%REPO_FOLDER%"

SET BUILD_FOLDER=.build
SET KOREBUILD_FOLDER=%BUILD_FOLDER%\KoreBuild-dotnet
SET KOREBUILD_VERSION=

SET NUGET_PATH=%BUILD_FOLDER%\NuGet.exe
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe

IF NOT EXIST %BUILD_FOLDER% (
    md %BUILD_FOLDER%
)

IF NOT EXIST %NUGET_PATH% (
    IF NOT EXIST %CACHED_NUGET% (
        echo Downloading latest version of NuGet.exe...
        IF NOT EXIST %LocalAppData%\NuGet (
            md %LocalAppData%\NuGet
        )
        @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
    )

    copy %CACHED_NUGET% %NUGET_PATH% > nul
)

SET KOREBUILD_DOWNLOAD_ARGS=
IF NOT "%KOREBUILD_VERSION%"=="" (
    SET KOREBUILD_DOWNLOAD_ARGS=-version %KOREBUILD_VERSION%
)
IF NOT EXIST %KOREBUILD_FOLDER% (
    %BUILD_FOLDER%\nuget.exe install KoreBuild-dotnet -ExcludeVersion -o %BUILD_FOLDER% -nocache -pre %KOREBUILD_DOWNLOAD_ARGS%
)

"%KOREBUILD_FOLDER%\build\KoreBuild.cmd" %*

Update `build.cmd` to match latest template - aspnet/Universe#347 - `%KOREBUILD_VERSION%` doesn't work without this fix


@ECHO OFF

if not exist bin mkdir bin

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

"%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal;LogFile=bin\msbuild.log %*

@ECHO OFF

if not exist bin mkdir bin

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

"%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" /nologo /m /v:m /nr:false /flp:verbosity=normal;LogFile=bin\msbuild.log %*

Use MSBuild 14

Use MSBuild 14

Using MSBuild 14 will allow us to use C# 6 features, for example,
exception filters and simplified properties.


@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*"

@ECHO OFF
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"

Return the correct error code from the build script


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DOTNET_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_KRE_INSTALL%"=="1" goto run
CALL packages\KoreBuild\build\kvm upgrade -runtime CLR -x86
CALL packages\KoreBuild\build\kvm install default -runtime CoreCLR -x86

:run
CALL packages\KoreBuild\build\kvm use default -runtime CLR -x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Change SKIP_DOTNET_INSTALL to SKIP_KRE_INSTALL


echo OFF

set REPOSITORY="PkgTk"
set DEFAULT_BUILD_TARGETS=python-parse python-pkgtk

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

if "%BUILD_TARGETS%" == "" (
    set BUILD_TARGETS=%DEFAULT_BUILD_TARGETS%
) else (
    echo "Targets to build: "%BUILD_TARGETS%
)

echo ON

if not exist bld.bat (
    if exist %REPOSITORY% (
        rmdir %REPOSITORY% /s /q
    )
    git clone https://github.com/%ANACONDA_CHANNEL%/%REPOSITORY%.git
    if %errorlevel% neq 0 (
        exit /b %errorlevel%
    )
    cd %REPOSITORY%/conda
)

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

for %%x in (%BUILD_TARGETS%) do (
    conda build %%x -c %ANACONDA_CHANNEL% -c conda-forge
    if %errorlevel% neq 0 (
        if exist %REPOSITORY% (
            rmdir %REPOSITORY% /s /q
        )
        exit /b %errorlevel%
    )
)

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

echo OFF

set REPOSITORY="PkgTk"
set DEFAULT_BUILD_TARGETS=python-parse python-pkgtk

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

if "%BUILD_TARGETS%" == "" (
    set BUILD_TARGETS=%DEFAULT_BUILD_TARGETS%
) else (
    echo "Targets to build: "%BUILD_TARGETS%
)

echo ON

if not exist bld.bat (
    if exist %REPOSITORY% (
        rmdir %REPOSITORY% /s /q
    )
    git clone https://github.com/%ANACONDA_CHANNEL%/%REPOSITORY%.git
    if %errorlevel% neq 0 (
        exit /b %errorlevel%
    )
    cd %REPOSITORY%/conda
)

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

for %%x in (%BUILD_TARGETS%) do (
    conda build %%x -c %ANACONDA_CHANNEL% -c conda-forge
    if %errorlevel% neq 0 (
        if exist %REPOSITORY% (
            rmdir %REPOSITORY% /s /q
        )
        exit /b %errorlevel%
    )
)

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

Update Appveyor CI

Update Appveyor CI


set PKGNAME=github.com/oneumyvakin/jirardeau
set LOCALPATH=%~dp0

goimports.exe -w .
go fmt %PKGNAME%
staticcheck.exe %PKGNAME%
go vet %PKGNAME%

set GOOS=linux
set GOARCH=amd64
go build -o jirardeau.%GOARCH% %PKGNAME%

set GOOS=windows
set GOARCH=amd64
go build -o jirardeau.exe %PKGNAME%

set PKGNAME=github.com/oneumyvakin/jirardeau
set LOCALPATH=%~dp0

goimports.exe -w .
go fmt %PKGNAME%
rem install staticcheck from go get -u honnef.co/go/staticcheck/cmd/staticcheck
staticcheck.exe %PKGNAME%
go vet %PKGNAME%

set GOOS=linux
set GOARCH=amd64
go build -o jirardeau.%GOARCH% %PKGNAME%

set GOOS=windows
set GOARCH=amd64
go build -o jirardeau.exe %PKGNAME%

Add comment for staticcheck

Add comment for staticcheck


echo on
setlocal

set VERSION=%1
set VERSION=%1
if [%VERSION%] == [] set VERSION=0.0.0.*
echo building version %VERSION%

set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
set HERE=%~dp0

call :dobuild || goto :ko
goto :ok

:dobuild
bootstrap\fullbuild install || goto :ko
bootstrap\fullbuild view fullbuild * || goto :ko
bootstrap\fullbuild rebuild --version %VERSION% fullbuild || goto :ko
goto :eof

:ok
exit /b 0

:ko
exit /b 5

echo on
setlocal

set VERSION=%1
set VERSION=%1
if [%VERSION%] == [] set VERSION=0.0.0.*
echo building version %VERSION%

set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
set HERE=%~dp0

call :dobuild || goto :ko
goto :ok

:dobuild
bootstrap\fullbuild install || goto :ko
bootstrap\fullbuild view all * || goto :ko
bootstrap\fullbuild rebuild --version %VERSION% all || goto :ko
goto :eof

:ok
exit /b 0

:ko
exit /b 5

rename view name

rename view name


@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET BUILDCMD_KOREBUILD_VERSION=""
SET BUILDCMD_DNX_VERSION=""

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
	.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
) ELSE (
	.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
)
.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF %BUILDCMD_DNX_VERSION%=="" (
	CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
) ELSE (
	CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe
SET BUILDCMD_KOREBUILD_VERSION=""
SET BUILDCMD_DNX_VERSION=""

IF EXIST %CACHED_NUGET% goto copynuget
echo Downloading latest version of NuGet.exe...
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'"

:copynuget
IF EXIST .nuget\nuget.exe goto restore
md .nuget
copy %CACHED_NUGET% .nuget\nuget.exe > nul

:restore
IF EXIST packages\KoreBuild goto run
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
	.nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
) ELSE (
	.nuget\NuGet.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
)
.nuget\NuGet.exe install Sake -ExcludeVersion -Source https://www.nuget.org/api/v2/ -Out packages

IF "%SKIP_DNX_INSTALL%"=="1" goto run
IF %BUILDCMD_DNX_VERSION%=="" (
	CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
) ELSE (
	CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -a default
)
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86

:run
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

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


@echo off

set "NO_PROMPT=%1"
setx NO_PROMPT %NO_PROMPT% >nul

:: BatchGotAdmin
:-------------------------------------
REM Check for permissions
  if "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  ) else (
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  )

REM If error flag set, we do not have admin.
if %ERRORLEVEL% NEQ 0 (
  echo Requesting administrative privileges...
  goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
  echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  set params = %*:"=""
  echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

  "%temp%\getadmin.vbs"
  del "%temp%\getadmin.vbs"
  exit /b

:gotAdmin
  pushd "%CD%"
  CD /D "%~dp0"
:--------------------------------------

Set required_dependencies=node npm mvn java javac

echo.
call :showLine
echo Checking if dependencies are satisfied..
call :showLine

for %%I in (%required_dependencies%) do (
  echo | set /p="%%I"
  call :isInstalled %%I
)

echo.
call :showLine
echo Installing..
call :showLine

echo | set /p="Angular CLI"
call :ifExists ng && ng --version | find "@angular/cli">nul
if %ERRORLEVEL% NEQ 0 (
  echo  -- INSTALLING
  call npm install -g @angular/cli
  call :showErrorMsg
) else ( echo  -- INSTALLED )

echo | set /p="Gulp"
call :ifExists gulp
if %ERRORLEVEL% NEQ 0 (
  echo  -- INSTALLING
  call npm install -g gulp
  call :showErrorMsg
) else ( echo  -- INSTALLED )

cd plug-n-code

echo.
call :showLine
echo Running `npm install`..
call :showLine
call npm install
call :showErrorMsg

echo.
call :showLine
echo Building semantic dist files..
call :showLine
call gulp build --gulpfile src/semantic/gulpfile.js --cwd src/semantic
call :showErrorMsg

cd ..

REM TODO: install server dependencies
REM mvn install:install-file -Dfile=lib/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

if defined NO_PROMPT (
  setx NO_PROMPT "" >nul
  goto :eof
)
echo.
call :showLine
echo All done!
call :showLine
echo. & echo Press enter to continue..
pause>nul
goto :eof

:showErrorMsg
  if ERRORLEVEL 0 ( exit /b 0 )
  echo Seems like an error occurred while installing the dependencies
  echo Please try re-running this script
  echo If the issue still persists, please report the issue with all your system details at
  echo https://github.com/yashdsaraf/reimagined-eureka/issues/new
  pause>nul
  (goto) 2>nul & endlocal & exit /b %ERRORLEVEL%

:isInstalled
  call :ifExists %1 && (
    echo  -- INSTALLED
    exit /b 0
  )
  echo Could not find %1
  echo Please install all the required dependencies listed in
  echo https://github.com/yashdsaraf/reimagined-eureka/tree/master/INSTALL.md
  pause>nul
  (goto) 2>nul & endlocal & exit /b %ERRORLEVEL%

:ifExists
  where %1>nul 2>&1
  exit /b %ERRORLEVEL%

:showLine
  echo ========================================
  exit /b

@echo off

set "NO_PROMPT=%1"
setx NO_PROMPT "%NO_PROMPT%" >nul

:: BatchGotAdmin
:-------------------------------------
REM Check for permissions
  if "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  ) else (
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  )

REM If error flag set, we do not have admin.
if %ERRORLEVEL% NEQ 0 (
  echo Requesting administrative privileges...
  goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
  echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  set params = %*:"=""
  echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

  "%temp%\getadmin.vbs"
  del "%temp%\getadmin.vbs"
  exit /b

:gotAdmin
  pushd "%CD%"
  CD /D "%~dp0"
:--------------------------------------

Set required_dependencies=node npm mvn java javac

echo.
call :showLine
echo Checking if dependencies are satisfied..
call :showLine

for %%I in (%required_dependencies%) do (
  echo | set /p="%%I"
  call :isInstalled %%I
)

echo.
call :showLine
echo Installing..
call :showLine

echo | set /p="Angular CLI"
call :ifExists ng && ng --version | find "@angular/cli">nul
if %ERRORLEVEL% NEQ 0 (
  echo  -- INSTALLING
  call npm install -g @angular/cli
  call :showErrorMsg
) else ( echo  -- INSTALLED )

echo | set /p="Gulp"
call :ifExists gulp
if %ERRORLEVEL% NEQ 0 (
  echo  -- INSTALLING
  call npm install -g gulp
  call :showErrorMsg
) else ( echo  -- INSTALLED )

cd plug-n-code

echo.
call :showLine
echo Running `npm install`..
call :showLine
call npm install
call :showErrorMsg

echo.
call :showLine
echo Building semantic dist files..
call :showLine
call gulp build --gulpfile src/semantic/gulpfile.js --cwd src/semantic
call :showErrorMsg

cd ..

REM TODO: install server dependencies
REM mvn install:install-file -Dfile=lib/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

if defined NO_PROMPT (
  setx NO_PROMPT "" >nul
  goto :eof
)
echo.
call :showLine
echo All done!
call :showLine
echo. & echo Press enter to continue..
pause>nul
goto :eof

:showErrorMsg
  if ERRORLEVEL 0 ( exit /b 0 )
  echo Seems like an error occurred while installing the dependencies
  echo Please try re-running this script
  echo If the issue still persists, please report the issue with all your system details at
  echo https://github.com/yashdsaraf/reimagined-eureka/issues/new
  pause>nul
  (goto) 2>nul & endlocal & exit /b %ERRORLEVEL%

:isInstalled
  call :ifExists %1 && (
    echo  -- INSTALLED
    exit /b 0
  )
  echo Could not find %1
  echo Please install all the required dependencies listed in
  echo https://github.com/yashdsaraf/reimagined-eureka/tree/master/INSTALL.md
  pause>nul
  (goto) 2>nul & endlocal & exit /b %ERRORLEVEL%

:ifExists
  where %1>nul 2>&1
  exit /b %ERRORLEVEL%

:showLine
  echo ========================================
  exit /b

Fix "invalid syntax" error in configure.bat


..\bin\Release\bakaprince convert %1% -f

Add compile helper.

Add compile helper.


@echo off

:: BatchGotAdmin
:-------------------------------------
REM Check for permissions
  if "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  ) else (
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  )

REM If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
  echo Requesting administrative privileges...
  goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
  echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  set params = %*:"=""
  echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

  "%temp%\getadmin.vbs"
  del "%temp%\getadmin.vbs"
  exit /b

:gotAdmin
  pushd "%CD%"
  CD /D "%~dp0"
:--------------------------------------

echo. & echo Checking for required binaries..
call :showLine

for %%I in (node npm mvn java javac) do (
  echo | set /p="%%I"
  call :isInstalled %%I
)

echo. & echo Installing the required dependencies..
call :showLine

echo | set /p="Angular CLI"
call :ifExists ng && ng --version | find "@angular/cli">nul
if %errorlevel% NEQ 0 (
  echo Installing angular-cli
  call npm install -g @angular/cli
  call :showErrorMsg
) else ( echo  -- INSTALLED )

echo | set /p="Gulp"
call :ifExists gulp
if %errorlevel% NEQ 0 (
  echo Installing gulp
  call npm install -g gulp
  call :showErrorMsg
) else ( echo  -- INSTALLED )

cd plug-n-code

echo. & echo Running `npm install`..
call :showLine
call npm install
call :showErrorMsg

echo. & echo Building semantic dist files..
call :showLine
call gulp build --gulpfile src/semantic/gulpfile.js --cwd src/semantic
call :showErrorMsg

cd ..

REM TODO: install server dependencies
REM mvn install:install-file -Dfile=lib/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

echo. & echo All done!
pause>nul
goto :eof

:showErrorMsg
  if %errorlevel% EQU 0 ( exit /b 0 )
  echo Seems like an error occurred while installing the dependencies
  echo Please try re-running this script
  echo If the issue still persists, please report the issue with all your system details at
  echo https://github.com/yashdsaraf/reimagined-eureka/issues/new
  pause>nul
  (goto) 2>nul & endlocal & exit /b %errorlevel%

:isInstalled
  call :ifExists %1 && (
    echo  -- INSTALLED
    exit /b 0
  )
  echo Could not find %1
  echo Please install all the required dependencies listed in
  echo https://github.com/yashdsaraf/reimagined-eureka/tree/master/INSTALL.md
  pause>nul
  (goto) 2>nul & endlocal & exit /b %errorlevel%

:ifExists
  where %1>nul 2>&1
  exit /b %errorlevel%

:showLine
  echo ====================================
  exit /b

@echo off

:: BatchGotAdmin
:-------------------------------------
REM Check for permissions
  if "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
    >nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
  ) else (
    >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  )

REM If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
  echo Requesting administrative privileges...
  goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
  echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  set params = %*:"=""
  echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

  "%temp%\getadmin.vbs"
  del "%temp%\getadmin.vbs"
  exit /b

:gotAdmin
  pushd "%CD%"
  CD /D "%~dp0"
:--------------------------------------

Set required_dependencies=node npm mvn java javac

echo.
call :showLine
echo Checking if dependencies are satisfied..
call :showLine

for %%I in (%required_dependencies%) do (
  echo | set /p="%%I"
  call :isInstalled %%I
)

echo.
call :showLine
echo Installing..
call :showLine

echo | set /p="Angular CLI"
call :ifExists ng && ng --version | find "@angular/cli">nul
if %errorlevel% NEQ 0 (
  echo Installing angular-cli
  call npm install -g @angular/cli
  call :showErrorMsg
) else ( echo  -- INSTALLED )

echo | set /p="Gulp"
call :ifExists gulp
if %errorlevel% NEQ 0 (
  echo Installing gulp
  call npm install -g gulp
  call :showErrorMsg
) else ( echo  -- INSTALLED )

cd plug-n-code

echo.
call :showLine
echo Running `npm install`..
call :showLine
call npm install
call :showErrorMsg

echo.
call :showLine
echo Building semantic dist files..
call :showLine
call gulp build --gulpfile src/semantic/gulpfile.js --cwd src/semantic
call :showErrorMsg

cd ..

REM TODO: install server dependencies
REM mvn install:install-file -Dfile=lib/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

echo.
call :showLine
echo All done!
call :showLine
echo. & echo Press enter to continue..
pause>nul
goto :eof

:showErrorMsg
  if %errorlevel% EQU 0 ( exit /b 0 )
  echo Seems like an error occurred while installing the dependencies
  echo Please try re-running this script
  echo If the issue still persists, please report the issue with all your system details at
  echo https://github.com/yashdsaraf/reimagined-eureka/issues/new
  pause>nul
  (goto) 2>nul & endlocal & exit /b %errorlevel%

:isInstalled
  call :ifExists %1 && (
    echo  -- INSTALLED
    exit /b 0
  )
  echo Could not find %1
  echo Please install all the required dependencies listed in
  echo https://github.com/yashdsaraf/reimagined-eureka/tree/master/INSTALL.md
  pause>nul
  (goto) 2>nul & endlocal & exit /b %errorlevel%

:ifExists
  where %1>nul 2>&1
  exit /b %errorlevel%

:showLine
  echo ========================================
  exit /b

Store dependencies in a separate variable #1


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

@echo off
title Development manager - Computing Project
cd ../
set bar=-------------------------------------------------------------------------------
:loop
cls
echo %bar%
echo Main Menu
echo %bar%
echo   (0) exit
echo   (1) pub get              - Collects the current dart dependencies
echo   (2) jekyll build         - Builds the liquid html
echo   (3) copy dart            - Copys the dart code to the output of (2).
echo   (4) serve                - Starts a python server
echo   (5) dartium              - Opens dartium browser
echo %bar%
set option=-1
set /P option="To select an option enter the corresponding number: "
if %option% == 0 (
	exit
) else (
	if %option% == 1 (
		start cmd /C pub get --packages-dir
	)
	if %option% == 2 (
		start cmd /C jekyll build --config _config.yml,_config-dev.yml | cp dart _site/assets/script/
	)
	if %option% == 3 (
		start cmd /C cp dart _site/assets/script/
	)
	if %option% == 4 (
		start cmd /k "cd _site/static && python -m SimpleHTTPServer 3694"
	)
	if %option% == 5 (
		start "" "C:/Program Files/Dart/chromium/chrome.exe" --use-spdy=off --allow-file-access-from-files --app=http://127.0.0.1:3694/
	)
)
goto loop

Update local.menu.bat

Update local.menu.bat


@ECHO OFF

"%JAVA_HOME%"\bin\java -cp .;"%~dp0dist\boa-compiler.jar";"%~dp0lib\*";"%~dp0dist\lib\evaluator\*";"%~dp0dist\lib\datagen\*";"%~dp0dist\compile" boa.BoaMain %*
pause

@ECHO OFF

"%JAVA_HOME%"\bin\java -cp .;"%~dp0dist\boa-compiler.jar";"%~dp0lib\*";"%~dp0lib\evaluator\*";"%~dp0lib\datagen\*";"%~dp0compile" boa.BoaMain %*
pause

fix classpath issues in boa.bat

fix classpath issues in boa.bat


@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

ECHO.
IF "%1"=="" (
	ECHO SUMMARY
	ECHO 	Deletes the specified IP from the ARP table, then pings the IP to
	ECHO 	extablish the correct Physical Address.
	ECHO 	The script will then continually monitor the specified IP's entry in
	ECHO 	the ARP table. If the IP's ARP table ever changes or is removed, the
	ECHO 	script will BEEP and set the Physical Address back to the correct value.
	ECHO AUTHOR
	ECHO 	Alan Reed
	ECHO 	Please contact the author with any questions, comments, or concers
	ECHO 	at al.reed13@gmail.com
	ECHO LICENSE
	ECHO 	Copyright 2012. This script is free to use, modify, and redistribute
	ECHO 	so long as you give credit to the original author.
	ECHO SYNTAX
	ECHO 	"defendARP.bat <IPAddr to monitor>"
	ECHO.
	GOTO ERROR
)

 :: Check if $1 is Local hosts IP
FOR /F "tokens=14" %%i in ('IPCONFIG ^| FINDSTR IPv4') do (
	SET ipaddr=%%i
)
IF "%1"=="%ipaddr%" (
	ECHO Cannot protect your own IP Address -- Try using the Default Gateway or router's IP Address.
	GOTO ERROR
)

ECHO INITIALIZING...
ECHO.
ECHO Removing %1 from ARP table.
 :: Remove %1 from arp table
ARP -d %1
ECHO OK.

 :: Ping the IP to establish it's correct MAC address.
 :: Note that ARP could still be poisoned if attcker sends poison packet while we are pinging.
ECHO Obtaining MAC address.
PING -n 1 %1 >nul
IF ERRORLEVEL 1 (
	ECHO Bad IP Address.
	GOTO ERROR
)

 :: Find the specified IP in the ARP Table
SET PhysAddr=""
SET tmp=""
FOR /F "tokens=*" %%a in ('ARP -a ^| findstr "%1"') do (
	SET tmp=%%a
 	:: We do this little trick with the question marks to avoid return the wrong line from the ARP table.
	SET tmp=!tmp: =?!
	FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
		SET PhysAddr=%%b
	)
)
 :: Check that the specified IP was found in the ARP table
IF %PhysAddr%=="" (
	ECHO Host Not Found.
	GOTO ERROR
)
 :: Extract the actualy Physical Address
SET PhysAddr=%PhysAddr:~15,-11%
SET PhysAddr=%PhysAddr:?=%
ECHO OK.

:QUESTION
SET /p  a=Is %PhysAddr% the correct MAC for %1 (y/n)?
IF "%a%"=="n" (
	ECHO.
	ECHO If this is not the correct MAC then you have already been poinsoned.
	ECHO You must start this script in a 'safe' state.
	arp -d %1
	GOTO DONE
) else IF "%a%"=="y" (
	ECHO OK.
	ECHO.
	ECHO Monitoring your ARP table...
	ECHO.
	SET GoodMAC=%PhysAddr%
	GOTO LOOP
) else ( GOTO QUESTION )

:LOOP
	 :: Find the specified IP in the ARP Table
	SET PhysAddr=""
	SET tmp=""
	FOR /F "tokens=*" %%a in ('ARP -a ^| FINDSTR "%1"') do (
		SET tmp=%%a
		SET tmp=!tmp: =?!
		FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
			SET PhysAddr=%%b
		)
	)
	IF %PhysAddr%=="" (
		ECHO %1 not found. Reestablishing connection...
		ping -n 1 %1 | findstr TTL >nul
		IF ERRORLEVEL 1 (
			ECHO Lost Connection to %1
			GOTO ERROR
		)
		ECHO OK.
		GOTO LOOP
	)
	 :: Extract the Physical Address
	SET PhysAddr=%PhysAddr:~15,-11%
	SET PhysAddr=%PhysAddr:?=%

	 :: check that the MAC did not change
	IF NOT "%GoodMAC%"=="%PhysAddr%" (
		ECHO.
		 :: BEEP - echo <ctrl+g> to a .txt, then copy the result onto the line below
		ECHO
		ECHO ARP POISONED!
		ECHO Spoofed IP: %1
		ECHO %1's actual Physical Address: %GoodMAC%
		ECHO Attcker's Physical Address: %PhysAddr%
		ECHO Attempting to reset the correct Physical Address...
		 :: Attempt to reset ARP table. This will not work if we are continually being poisoned.
		ARP -d %1
		PING -n 1 %1 >nul
		ECHO ARP Table reset.
		ECHO.
		ECHO Monitoring your ARP table...
	)
	 :: wait for 5 seconds
	ping -n 5 127.0.0.1 >nul
GOTO LOOP

GOTO DONE
:ERROR
ECHO.
:DONE

@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

ECHO.
IF "%1"=="" (
	ECHO SUMMARY
	ECHO 	Deletes the specified IP from the ARP table, then pings the IP to
	ECHO 	extablish the correct Physical Address.
	ECHO 	The script will then continually monitor the specified IP's entry in
	ECHO 	the ARP table. If the IP's ARP table ever changes or is removed, the
	ECHO 	script will BEEP and set the Physical Address back to the correct value.
	ECHO AUTHOR
	ECHO 	Alan Reed
	ECHO 	Please contact the author with any questions, comments, or concers
	ECHO 	at al.reed13@gmail.com
	ECHO LICENSE
	ECHO 	Copyright 2012. This script is free to use, modify, and redistribute
	ECHO 	so long as you give credit to the original author.
	ECHO SYNTAX
	ECHO 	"defendARP.bat <IPAddr to monitor>"
	ECHO DESCRIPTION
	ECHO 	^<IPAddr to monitor^> should NOT be your own IPAddr. Use the IPAddr
	ECHO 	of a different device on you LAN that you are communicating with. Try
	ECHO 	the IPAddr of your network gateway.
	ECHO.
	GOTO ERROR
)

 :: Check if $1 is Local hosts IP
FOR /F "tokens=2" %%i in ('ARP -A ^| FINDSTR \-\-\-') do (
	SET ipaddr=%%i

)
IF "%1"=="%%i" (
	ECHO Cannot protect your own IP Address -- Try using the Default Gateway or router's IP Address.
	GOTO ERROR
)

ECHO INITIALIZING...
ECHO.
ECHO Removing %1 from ARP table.
 :: Remove %1 from arp table
ARP -d %1
ECHO OK.

 :: Ping the IP to establish it's correct MAC address.
 :: Note that ARP could still be poisoned if attcker sends poison packet while we are pinging.
ECHO Obtaining MAC address.
PING -n 1 %1 >nul
IF ERRORLEVEL 1 (
	ECHO Bad IP Address.
	GOTO ERROR
)

 :: Find the specified IP in the ARP Table
SET PhysAddr=""
SET tmp=""
FOR /F "tokens=*" %%a in ('ARP -a ^| findstr "%1"') do (
	SET tmp=%%a
 	:: We do this little trick with the question marks to avoid return the wrong line from the ARP table.
	SET tmp=!tmp: =?!
	FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
		SET PhysAddr=%%b
	)
)
 :: Check that the specified IP was found in the ARP table
IF %PhysAddr%=="" (
	ECHO Host Not Found.
	GOTO ERROR
)
 :: Extract the actualy Physical Address
SET PhysAddr=%PhysAddr:~15,-11%
SET PhysAddr=%PhysAddr:?=%
ECHO OK.

:QUESTION
SET /p  a=Is %PhysAddr% the correct MAC for %1 (y/n)?
IF "%a%"=="n" (
	ECHO.
	ECHO If this is not the correct MAC then you have already been poinsoned.
	ECHO You must start this script in a 'safe' state.
	arp -d %1
	GOTO DONE
) else IF "%a%"=="y" (
	ECHO OK.
	ECHO.
	ECHO Monitoring your ARP table...
	ECHO.
	SET GoodMAC=%PhysAddr%
	GOTO LOOP
) else ( GOTO QUESTION )

:LOOP
	 :: Find the specified IP in the ARP Table
	SET PhysAddr=""
	SET tmp=""
	FOR /F "tokens=*" %%a in ('ARP -a ^| FINDSTR "%1"') do (
		SET tmp=%%a
		SET tmp=!tmp: =?!
		FOR /F "tokens=*" %%b in ('ECHO !tmp! ^| findstr %1?') do (
			SET PhysAddr=%%b
		)
	)
	IF %PhysAddr%=="" (
		ECHO %1 not found. Reestablishing connection...
		ping -n 1 %1 | findstr TTL >nul
		IF ERRORLEVEL 1 (
			ECHO Lost Connection to %1
			GOTO ERROR
		)
		ECHO OK.
		GOTO LOOP
	)
	 :: Extract the Physical Address
	SET PhysAddr=%PhysAddr:~15,-11%
	SET PhysAddr=%PhysAddr:?=%

	 :: check that the MAC did not change
	IF NOT "%GoodMAC%"=="%PhysAddr%" (
		ECHO.
		 :: BEEP - echo <ctrl+g> to a .txt, then copy the result onto the line below
		ECHO
		ECHO ARP POISONED!
		ECHO Spoofed IP: %1
		ECHO %1's actual Physical Address: %GoodMAC%
		ECHO Attcker's Physical Address: %PhysAddr%
		ECHO Attempting to reset the correct Physical Address...
		 :: Attempt to reset ARP table. This will not work if we are continually being poisoned.
		ARP -d %1
		PING -n 1 %1 >nul
		ECHO ARP Table reset.
		ECHO.
		ECHO Monitoring your ARP table...
	)
	 :: wait for 5 seconds
	ping -n 5 127.0.0.1 >nul
GOTO LOOP

GOTO DONE
:ERROR
ECHO.
:DONE

make description more clear

make description more clear