@echo off

SET MAJOR_NUM=0
SET MINOR_NUM=4
SET REVISION_NUM=3
SET IS_RC=yes

IF "%IS_RC%"=="yes" (
SET RELEASE_VERSION=%MAJOR_NUM%.%MINOR_NUM%rc%REVISION_NUM%
) ELSE (
SET RELEASE_VERSION=%MAJOR_NUM%.%MINOR_NUM%
)
SET WORKDIR=libfreespace
SET ZIPNAME=libfreespace-%RELEASE_VERSION%-win32

REM Create the .rc file

echo // Microsoft Visual C++ generated resource script. > win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo #include "resource.h" >> win32\libfreespace.rc
echo #define APSTUDIO_READONLY_SYMBOLS >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // Generated from the TEXTINCLUDE 2 resource. >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo #include "winres.h" >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo #undef APSTUDIO_READONLY_SYMBOLS >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // English (U.S.) resources >> win32\libfreespace.rc
echo #if !defined(AFX_RESOURCE_DLL) ^|^| defined(AFX_TARG_ENU) >> win32\libfreespace.rc
echo #ifdef _WIN32 >> win32\libfreespace.rc
echo LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US >> win32\libfreespace.rc
echo #pragma code_page(1252) >> win32\libfreespace.rc
echo #endif //_WIN32 >> win32\libfreespace.rc
echo #ifdef APSTUDIO_INVOKED >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // TEXTINCLUDE >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo 1 TEXTINCLUDE  >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     "resource.h\0" >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo 2 TEXTINCLUDE  >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     "#include ""winres.h""\r\n" >> win32\libfreespace.rc
echo     "\0" >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo 3 TEXTINCLUDE >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     "\r\n" >> win32\libfreespace.rc
echo     "\0" >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo #endif    // APSTUDIO_INVOKED >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // Version >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo VS_VERSION_INFO VERSIONINFO >> win32\libfreespace.rc
echo  FILEVERSION %MAJOR_NUM%,%MINOR_NUM%,%REVISION_NUM%,0 >> win32\libfreespace.rc
echo  PRODUCTVERSION %MAJOR_NUM%,%MINOR_NUM%,%REVISION_NUM%,0 >> win32\libfreespace.rc
echo  FILEFLAGSMASK 0x17L >> win32\libfreespace.rc
echo #ifdef _DEBUG >> win32\libfreespace.rc
echo  FILEFLAGS 0x1L >> win32\libfreespace.rc
echo #else >> win32\libfreespace.rc
echo  FILEFLAGS 0x0L >> win32\libfreespace.rc
echo #endif >> win32\libfreespace.rc
echo  FILEOS 0x4L >> win32\libfreespace.rc
echo  FILETYPE 0x2L >> win32\libfreespace.rc
echo  FILESUBTYPE 0x0L >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     BLOCK "StringFileInfo" >> win32\libfreespace.rc
echo     BEGIN >> win32\libfreespace.rc
echo         BLOCK "040904b0" >> win32\libfreespace.rc
echo         BEGIN >> win32\libfreespace.rc
echo             VALUE "CompanyName", "Hillcrest Labs, Inc." >> win32\libfreespace.rc
echo             VALUE "FileDescription", "libfreespace DLL" >> win32\libfreespace.rc
echo             VALUE "FileVersion", "%MAJOR_NUM%, %MINOR_NUM%, %REVISION_NUM%, 0" >> win32\libfreespace.rc
echo             VALUE "InternalName", "libfreespace" >> win32\libfreespace.rc
echo             VALUE "LegalCopyright", "Copyright (C) Hillcrest Labs 2009" >> win32\libfreespace.rc
echo             VALUE "OriginalFilename", "libfreespace.dll" >> win32\libfreespace.rc
echo             VALUE "ProductName", "libfreespace" >> win32\libfreespace.rc
echo             VALUE "ProductVersion", "%MAJOR_NUM%, %MINOR_NUM%, %REVISION_NUM%, 0" >> win32\libfreespace.rc
echo         END >> win32\libfreespace.rc
echo     END >> win32\libfreespace.rc
echo     BLOCK "VarFileInfo" >> win32\libfreespace.rc
echo     BEGIN >> win32\libfreespace.rc
echo         VALUE "Translation", 0x409, 1200 >> win32\libfreespace.rc
echo     END >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo #endif    // English (U.S.) resources >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo #ifndef APSTUDIO_INVOKED >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // Generated from the TEXTINCLUDE 3 resource. >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo #endif    // not APSTUDIO_INVOKED >> win32\libfreespace.rc

REM Generate config-win32.h and the line below when the version changes.
echo #define VERSION "%RELEASE_VERSION%"> config-win32.h

SET WORKDIR=libfreespace
SET ZIPNAME=libfreespace-%RELEASE_VERSION%-win32

REM This must be run from the Visual Studio 2005 Command Prompt
devenv win32\vs2005\libfreespace.sln /clean release
devenv win32\vs2005\libfreespace.sln /clean debug
devenv win32\vs2005\libfreespace.sln /build release
devenv win32\vs2005\libfreespace.sln /build debug

echo Cleaning up work directory if any
rd /S /Q %WORKDIR%
echo Creating working directory
mkdir %WORKDIR%
mkdir %WORKDIR%\lib
mkdir %WORKDIR%\include
mkdir %WORKDIR%\include\freespace
mkdir %WORKDIR%\lib\Debug
mkdir %WORKDIR%\lib\Release
echo Copying DLLs and LIBs
copy win32\vs2005\Debug\libfreespaced.lib %WORKDIR%\lib\Debug
copy win32\vs2005\Debug\libfreespaced.dll %WORKDIR%\lib\Debug
copy win32\vs2005\Release\libfreespace.lib %WORKDIR%\lib\Release
copy win32\vs2005\Release\libfreespace.dll %WORKDIR%\lib\Release
echo Copying header files
copy include\freespace\*.h %WORKDIR%\include\freespace

REM Create ZIP file using Info-ZIP
REM http://www.info-zip.org/Zip.html
echo Zipping - be sure to have zip.exe in your path or you will get an error below
zip -r %ZIPNAME%.zip %WORKDIR%
echo Cleaning up work directory
rd /S /Q %WORKDIR%
echo Done.

@echo off

SET MAJOR_NUM=0
SET MINOR_NUM=4
SET REVISION_NUM=3
SET IS_RC=yes

IF "%IS_RC%"=="yes" (
SET RELEASE_VERSION=%MAJOR_NUM%.%MINOR_NUM%rc%REVISION_NUM%
) ELSE (
SET RELEASE_VERSION=%MAJOR_NUM%.%MINOR_NUM%
)
SET WORKDIR=libfreespace
SET ZIPNAME=libfreespace-%RELEASE_VERSION%-win32

REM Create the .rc file

echo // Microsoft Visual C++ generated resource script. > win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo #include "resource.h" >> win32\libfreespace.rc
echo #define APSTUDIO_READONLY_SYMBOLS >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // Generated from the TEXTINCLUDE 2 resource. >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo #include "winres.h" >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo #undef APSTUDIO_READONLY_SYMBOLS >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // English (U.S.) resources >> win32\libfreespace.rc
echo #if !defined(AFX_RESOURCE_DLL) ^|^| defined(AFX_TARG_ENU) >> win32\libfreespace.rc
echo #ifdef _WIN32 >> win32\libfreespace.rc
echo LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US >> win32\libfreespace.rc
echo #pragma code_page(1252) >> win32\libfreespace.rc
echo #endif //_WIN32 >> win32\libfreespace.rc
echo #ifdef APSTUDIO_INVOKED >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // TEXTINCLUDE >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo 1 TEXTINCLUDE  >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     "resource.h\0" >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo 2 TEXTINCLUDE  >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     "#include ""winres.h""\r\n" >> win32\libfreespace.rc
echo     "\0" >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo 3 TEXTINCLUDE >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     "\r\n" >> win32\libfreespace.rc
echo     "\0" >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo #endif    // APSTUDIO_INVOKED >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // Version >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo VS_VERSION_INFO VERSIONINFO >> win32\libfreespace.rc
echo  FILEVERSION %MAJOR_NUM%,%MINOR_NUM%,%REVISION_NUM%,0 >> win32\libfreespace.rc
echo  PRODUCTVERSION %MAJOR_NUM%,%MINOR_NUM%,%REVISION_NUM%,0 >> win32\libfreespace.rc
echo  FILEFLAGSMASK 0x17L >> win32\libfreespace.rc
echo #ifdef _DEBUG >> win32\libfreespace.rc
echo  FILEFLAGS 0x1L >> win32\libfreespace.rc
echo #else >> win32\libfreespace.rc
echo  FILEFLAGS 0x0L >> win32\libfreespace.rc
echo #endif >> win32\libfreespace.rc
echo  FILEOS 0x4L >> win32\libfreespace.rc
echo  FILETYPE 0x2L >> win32\libfreespace.rc
echo  FILESUBTYPE 0x0L >> win32\libfreespace.rc
echo BEGIN >> win32\libfreespace.rc
echo     BLOCK "StringFileInfo" >> win32\libfreespace.rc
echo     BEGIN >> win32\libfreespace.rc
echo         BLOCK "040904b0" >> win32\libfreespace.rc
echo         BEGIN >> win32\libfreespace.rc
echo             VALUE "CompanyName", "Hillcrest Labs, Inc." >> win32\libfreespace.rc
echo             VALUE "FileDescription", "libfreespace DLL" >> win32\libfreespace.rc
echo             VALUE "FileVersion", "%MAJOR_NUM%, %MINOR_NUM%, %REVISION_NUM%, 0" >> win32\libfreespace.rc
echo             VALUE "InternalName", "libfreespace" >> win32\libfreespace.rc
echo             VALUE "LegalCopyright", "Copyright (C) Hillcrest Labs 2009" >> win32\libfreespace.rc
echo             VALUE "OriginalFilename", "libfreespace.dll" >> win32\libfreespace.rc
echo             VALUE "ProductName", "libfreespace" >> win32\libfreespace.rc
echo             VALUE "ProductVersion", "%MAJOR_NUM%, %MINOR_NUM%, %REVISION_NUM%, 0" >> win32\libfreespace.rc
echo         END >> win32\libfreespace.rc
echo     END >> win32\libfreespace.rc
echo     BLOCK "VarFileInfo" >> win32\libfreespace.rc
echo     BEGIN >> win32\libfreespace.rc
echo         VALUE "Translation", 0x409, 1200 >> win32\libfreespace.rc
echo     END >> win32\libfreespace.rc
echo END >> win32\libfreespace.rc
echo #endif    // English (U.S.) resources >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo #ifndef APSTUDIO_INVOKED >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo // Generated from the TEXTINCLUDE 3 resource. >> win32\libfreespace.rc
echo // >> win32\libfreespace.rc
echo ///////////////////////////////////////////////////////////////////////////// >> win32\libfreespace.rc
echo #endif    // not APSTUDIO_INVOKED >> win32\libfreespace.rc

REM Generate config-win32.h and the line below when the version changes.
echo #define VERSION "%RELEASE_VERSION%"> config-win32.h

SET WORKDIR=libfreespace
SET ZIPNAME=libfreespace-%RELEASE_VERSION%-win32

REM This must be run from the Visual Studio 2005 Command Prompt
devenv win32\vs2005\libfreespace.sln /clean release
devenv win32\vs2005\libfreespace.sln /clean debug
devenv win32\vs2005\libfreespace.sln /build release
devenv win32\vs2005\libfreespace.sln /build debug

echo Cleaning up work directory if any
rd /S /Q %WORKDIR%
echo Creating working directory
mkdir %WORKDIR%
mkdir %WORKDIR%\lib
mkdir %WORKDIR%\include
mkdir %WORKDIR%\include\freespace
rem Build, but don't distribute debug versions. This avoids people doing
rem reasonable things that won't work like not installing the DDK or
rem debugging under different compilers.
rem mkdir %WORKDIR%\lib\Debug
mkdir %WORKDIR%\lib\Release
echo Copying DLLs and LIBs
rem copy win32\vs2005\Debug\libfreespaced.lib %WORKDIR%\lib\Debug
rem copy win32\vs2005\Debug\libfreespaced.dll %WORKDIR%\lib\Debug
copy win32\vs2005\Release\libfreespace.lib %WORKDIR%\lib\Release
copy win32\vs2005\Release\libfreespace.dll %WORKDIR%\lib\Release
echo Copying header files
copy include\freespace\*.h %WORKDIR%\include\freespace

REM Create ZIP file using Info-ZIP
REM http://www.info-zip.org/Zip.html
echo Zipping - be sure to have zip.exe in your path or you will get an error below
zip -r %ZIPNAME%.zip %WORKDIR%
echo Cleaning up work directory
rd /S /Q %WORKDIR%
echo Done.

Remove debug build from the Windows distributable


REM Downloads from https://www.microsoft.com/en-us/download/details.aspx?id=26368

if "%ARCH%" == "32" (
    powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x86.exe', 'vcredist_x86.exe')"
    if errorlevel 1 exit 1
    vcredist_x86.exe /qb!
    if errorlevel 1 exit 1
    set "ARCH_DIR=x86"
)

if "%ARCH%" == "64" (
    powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/5/D/8/5D8C65CB-C849-4025-8E95-C3966CAFD8AE/vcredist_x64.exe', 'vcredist_x64.exe')"
    if errorlevel 1 exit 1
    vcredist_x64.exe /qb!
    if errorlevel 1 exit 1
    set "ARCH_DIR=amd64"
)

cd C:\Windows\WinSxS\%ARCH_DIR%_microsoft.vc90.openmp_*_%PKG_VERSION%_*
xcopy *.dll %LIBRARY_BIN%
xcopy *.dll %PREFIX%

cd C:\Windows\WinSxS\%ARCH_DIR%_microsoft.vc90.crt_*_%PKG_VERSION%_*
xcopy *.dll %LIBRARY_BIN%
xcopy *.dll %PREFIX%

cd %SRC_DIR%

Add link to download url

Add link to download url


%FC% leparagliding.f
mkdir -p %LIBRARY_PREFIX%\bin
COPY a.exe %LIBRARY_PREFIX%\bin\leparagliding.exe

gfortran leparagliding.f
mkdir -p %LIBRARY_PREFIX%\bin
COPY a.exe %LIBRARY_PREFIX%\bin\leparagliding.exe

Update bld.bat

Update bld.bat


@CALL ..\setenv.bat

@SET logs_dir=.\logs
@MKDIR %logs_dir%
@FOR /f "skip=1" %%x in ('wmic os get localdatetime') do if not defined ts set ts=%%x
@SET "gclog_options=-Xloggc:%logs_dir%\gc-%ts%.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
@SET "heap_options=-Xms1g -Xmx2g"

java -classpath target/classes %gclog_options% %heap_options% jpt.app01.Main -p7666 -q0

@CALL ..\setenv.bat

@SET logs_dir=.\logs
@MKDIR %logs_dir%
@FOR /f "tokens=2 delims==" %%x IN ('WMIC OS Get localdatetime /value') DO @SET ts=%%x
@SET ts=%ts:~0,8%-%ts:~8,6%
@SET "gclog_options=-Xloggc:%logs_dir%\gc-%ts%.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps"
@SET "heap_options=-Xms1g -Xmx2g"

java -classpath target/classes %gclog_options% %heap_options% jpt.app01.Main -p7666 -q0

fix(apps/app01): fix generation of timestamp in script on Windows


@echo off
pushd .

ECHO ********** Restore projects
dotnet restore Avalara.AvaTax.Net20.sln
dotnet restore Avalara.AvaTax.net45.sln
dotnet restore Avalara.AvaTax.netstandard11.sln

ECHO ********** Build projects in release mode
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.Net20.sln /t:Build /p:Configuration="Release"
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.net45.sln /t:Build /p:Configuration="Release"
dotnet build Avalara.AvaTax.netstandard11.sln -c Release

ECHO ********** Packaging NUGET
..\..\nuget.exe pack src\Avalara.AvaTax.nuspec
pause

@echo off
pushd .

ECHO ********** Restore projects
dotnet restore Avalara.AvaTax.Net20.sln
dotnet restore Avalara.AvaTax.net45.sln
dotnet restore Avalara.AvaTax.netstandard11.sln

ECHO ********** Build projects in release mode
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.Net20.sln /p:platform="Any CPU" /t:Build /p:Configuration="Release"
"C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild.exe" Avalara.AvaTax.net45.sln /p:platform="Any CPU" /t:Build /p:Configuration="Release"
dotnet build Avalara.AvaTax.netstandard11.sln -c Release

ECHO ********** Packaging NUGET
..\..\nuget.exe pack src\Avalara.AvaTax.nuspec
pause

Fix the build script.

Fix the build script.


@if not defined _echo @echo off
setlocal

set INIT_TOOLS_LOG=%~dp0init-tools.log
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild
set BUILD_TOOLS_SEMAPHORE=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%\init-tools.completed

:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
if [%1]==[force] (
  if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
  if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
)

:: If semaphore exists do nothing
if exist "%BUILD_TOOLS_SEMAPHORE%" (
  echo Tools are already initialized.
  goto :EOF
)

if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"

if exist "%DotNetBuildToolsDir%" (
  echo Using tools from '%DotNetBuildToolsDir%'.
  mklink /j "%TOOLRUNTIME_DIR%" "%DotNetBuildToolsDir%"

  if not exist "%DOTNET_CMD%" (
    echo ERROR: Ensure that '%DotNetBuildToolsDir%' contains the .NET Core SDK at '%DOTNET_PATH%'
    exit /b 1
  )

  echo Done initializing tools.
  echo Using tools from '%DotNetBuildToolsDir%'. > "%BUILD_TOOLS_SEMAPHORE%"
  exit /b 0
)

echo Running %0 > "%INIT_TOOLS_LOG%"

set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
if exist "%DOTNET_CMD%" goto :afterdotnetrestore

echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-x64.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
if NOT exist "%DOTNET_LOCAL_PATH%" (
  echo ERROR: Could not install dotnet cli correctly. 1>&2
  goto :error
)

:afterdotnetrestore

if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
  echo ERROR: Could not restore build tools correctly. 1>&2
  goto :error
)

:afterbuildtoolsrestore

:: Ask init-tools to also restore ILAsm
set /p ILASMCOMPILER_VERSION=< "%~dp0tools-local\ILAsmVersion.txt"

echo Initializing BuildTools...
echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL%
if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
  echo ERROR: An error occured when trying to initialize the tools. 1>&2
  goto :error
)

:: Create semaphore file
echo Done initializing tools.
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
exit /b 0

:error
echo Please check the detailed log that follows. 1>&2
type "%INIT_TOOLS_LOG%" 1>&2
exit /b 1

@if not defined _echo @echo off
setlocal

set INIT_TOOLS_LOG=%~dp0init-tools.log
if [%PACKAGES_DIR%]==[] set PACKAGES_DIR=%~dp0packages\
if [%TOOLRUNTIME_DIR%]==[] set TOOLRUNTIME_DIR=%~dp0Tools
set DOTNET_PATH=%TOOLRUNTIME_DIR%\dotnetcli\
if [%DOTNET_CMD%]==[] set DOTNET_CMD=%DOTNET_PATH%dotnet.exe
if [%BUILDTOOLS_SOURCE%]==[] set BUILDTOOLS_SOURCE=https://dotnet.myget.org/F/dotnet-buildtools/api/v3/index.json
set /P BUILDTOOLS_VERSION=< "%~dp0BuildToolsVersion.txt"
set BUILD_TOOLS_PATH=%PACKAGES_DIR%Microsoft.DotNet.BuildTools\%BUILDTOOLS_VERSION%\lib\
set INIT_TOOLS_RESTORE_PROJECT=%~dp0init-tools.msbuild
set BUILD_TOOLS_SEMAPHORE_DIR=%TOOLRUNTIME_DIR%\%BUILDTOOLS_VERSION%
set BUILD_TOOLS_SEMAPHORE=%BUILD_TOOLS_SEMAPHORE_DIR%\init-tools.completed

:: if force option is specified then clean the tool runtime and build tools package directory to force it to get recreated
if [%1]==[force] (
  if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"
  if exist "%PACKAGES_DIR%Microsoft.DotNet.BuildTools" rmdir /S /Q "%PACKAGES_DIR%Microsoft.DotNet.BuildTools"
)

:: If semaphore exists do nothing
if exist "%BUILD_TOOLS_SEMAPHORE%" (
  echo Tools are already initialized.
  goto :EOF
)

if exist "%TOOLRUNTIME_DIR%" rmdir /S /Q "%TOOLRUNTIME_DIR%"

if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%"

if exist "%DotNetBuildToolsDir%" (
  echo Using tools from '%DotNetBuildToolsDir%'.
  mklink /j "%TOOLRUNTIME_DIR%" "%DotNetBuildToolsDir%"

  if not exist "%DOTNET_CMD%" (
    echo ERROR: Ensure that '%DotNetBuildToolsDir%' contains the .NET Core SDK at '%DOTNET_PATH%'
    exit /b 1
  )

  echo Done initializing tools.
  echo Using tools from '%DotNetBuildToolsDir%'. > "%BUILD_TOOLS_SEMAPHORE%"
  exit /b 0
)

echo Running %0 > "%INIT_TOOLS_LOG%"

set /p DOTNET_VERSION=< "%~dp0DotnetCLIVersion.txt"
if exist "%DOTNET_CMD%" goto :afterdotnetrestore

echo Installing dotnet cli...
if NOT exist "%DOTNET_PATH%" mkdir "%DOTNET_PATH%"
set DOTNET_ZIP_NAME=dotnet-sdk-%DOTNET_VERSION%-win-x64.zip
set DOTNET_REMOTE_PATH=https://dotnetcli.azureedge.net/dotnet/Sdk/%DOTNET_VERSION%/%DOTNET_ZIP_NAME%
set DOTNET_LOCAL_PATH=%DOTNET_PATH%%DOTNET_ZIP_NAME%
echo Installing '%DOTNET_REMOTE_PATH%' to '%DOTNET_LOCAL_PATH%' >> "%INIT_TOOLS_LOG%"
powershell -NoProfile -ExecutionPolicy unrestricted -Command "$retryCount = 0; $success = $false; $proxyCredentialsRequired = $false; do { try { $wc = New-Object Net.WebClient; if ($proxyCredentialsRequired) { [Net.WebRequest]::DefaultWebProxy.Credentials = [Net.CredentialCache]::DefaultNetworkCredentials; } $wc.DownloadFile('%DOTNET_REMOTE_PATH%', '%DOTNET_LOCAL_PATH%'); $success = $true; } catch { if ($retryCount -ge 6) { throw; } else { $we = $_.Exception.InnerException -as [Net.WebException]; $proxyCredentialsRequired = ($we -ne $null -and ([Net.HttpWebResponse]$we.Response).StatusCode -eq [Net.HttpStatusCode]::ProxyAuthenticationRequired); Start-Sleep -Seconds (5 * $retryCount); $retryCount++; } } } while ($success -eq $false); Add-Type -Assembly 'System.IO.Compression.FileSystem' -ErrorVariable AddTypeErrors; if ($AddTypeErrors.Count -eq 0) { [System.IO.Compression.ZipFile]::ExtractToDirectory('%DOTNET_LOCAL_PATH%', '%DOTNET_PATH%') } else { (New-Object -com shell.application).namespace('%DOTNET_PATH%').CopyHere((new-object -com shell.application).namespace('%DOTNET_LOCAL_PATH%').Items(),16) }" >> "%INIT_TOOLS_LOG%"
if NOT exist "%DOTNET_LOCAL_PATH%" (
  echo ERROR: Could not install dotnet cli correctly. 1>&2
  goto :error
)

:afterdotnetrestore

if exist "%BUILD_TOOLS_PATH%" goto :afterbuildtoolsrestore
echo Restoring BuildTools version %BUILDTOOLS_VERSION%...
echo Running: "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
call "%DOTNET_CMD%" restore "%INIT_TOOLS_RESTORE_PROJECT%" --no-cache --packages %PACKAGES_DIR% --source "%BUILDTOOLS_SOURCE%" /p:BuildToolsPackageVersion=%BUILDTOOLS_VERSION% >> "%INIT_TOOLS_LOG%"
if NOT exist "%BUILD_TOOLS_PATH%init-tools.cmd" (
  echo ERROR: Could not restore build tools correctly. 1>&2
  goto :error
)

:afterbuildtoolsrestore

:: Ask init-tools to also restore ILAsm
set /p ILASMCOMPILER_VERSION=< "%~dp0tools-local\ILAsmVersion.txt"

echo Initializing BuildTools...
echo Running: "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
call "%BUILD_TOOLS_PATH%init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%"
set INIT_TOOLS_ERRORLEVEL=%ERRORLEVEL%
if not [%INIT_TOOLS_ERRORLEVEL%]==[0] (
  echo ERROR: An error occured when trying to initialize the tools. 1>&2
  goto :error
)

:: Create semaphore file
echo Done initializing tools.
echo Init-Tools.cmd completed for BuildTools Version: %BUILDTOOLS_VERSION% > "%BUILD_TOOLS_SEMAPHORE%"
exit /b 0

:error
echo Please check the detailed log that follows. 1>&2
type "%INIT_TOOLS_LOG%" 1>&2
exit /b 1

Fix tool initialization detection

Fix tool initialization detection


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

echo on

title Installing wget. Please wait...

if not defined WGET_URL set WGET_URL=https://eternallybored.org/misc/wget/current/wget.exe

for %%i in ("%WGET_URL%") do set filename=%SystemRoot%\%%~nxi

if not exist "%~dp0\_download.cmd" goto _download_cmd_not_found

copy /y "%~dp0\_download.cmd" "%SystemRoot%\"

call "%~dp0\_download.cmd" "%WGET_URL%" "%filename%"

if exist "%filename%" goto exit0

:_download_cmd_not_found

echo ==^> Downloading "%WGET_URL%" to "%filename%"

:powershell

powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%WGET_URL%', '%filename%')" <NUL

if exist "%filename%" goto exit0

set bitsadmin=

for %%i in (bitsadmin.exe) do set bitsadmin=%%~$PATH:i

if not defined bitsadmin set bitsadmin=%SystemRoot%\System32\bitsadmin.exe

if not exist "%bitsadmin%" goto exit1

for %%i in ("%filename%") do set jobname=%%~nxi

"%bitsadmin%" /transfer "%jobname%" "%WGET_URL%" "%filename%"

if exist "%filename%" goto exit0

goto exit1

:exit0

ver>nul

goto :exit

:exit1

verify other 2>nul

:exit

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

echo on

title Installing wget. Please wait...

echo temp sanity check
ipconfig /all

if not defined WGET_URL set WGET_URL=https://eternallybored.org/misc/wget/current/wget.exe

for %%i in ("%WGET_URL%") do set filename=%SystemRoot%\%%~nxi

if not exist "%~dp0\_download.cmd" goto _download_cmd_not_found

copy /y "%~dp0\_download.cmd" "%SystemRoot%\"

call "%~dp0\_download.cmd" "%WGET_URL%" "%filename%"

if exist "%filename%" goto exit0

:_download_cmd_not_found

echo ==^> Downloading "%WGET_URL%" to "%filename%"

:powershell

powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%WGET_URL%', '%filename%')" <NUL

if exist "%filename%" goto exit0

set bitsadmin=

for %%i in (bitsadmin.exe) do set bitsadmin=%%~$PATH:i

if not defined bitsadmin set bitsadmin=%SystemRoot%\System32\bitsadmin.exe

if not exist "%bitsadmin%" goto exit1

for %%i in ("%filename%") do set jobname=%%~nxi

"%bitsadmin%" /transfer "%jobname%" "%WGET_URL%" "%filename%"

if exist "%filename%" goto exit0

goto exit1

:exit0

ver>nul

goto :exit

:exit1

verify other 2>nul

:exit

Debug: Add temp code: are there no network adapters available


set PATH=%USERPROFILE%\go\bin;%PATH

set GOPATH=%CD%\concourse
set PATH=%CD%\concourse\bin;%PATH%

go install github.com/onsi/ginkgo/ginkgo

cd .\concourse\src\github.com\concourse\fly

ginkgo -r -p

set PATH=C:\Go\bin;%PATH

set GOPATH=%CD%\concourse
set PATH=%CD%\concourse\bin;%PATH%

go install github.com/onsi/ginkgo/ginkgo

cd .\concourse\src\github.com\concourse\fly

ginkgo -r -p

fix go install dir

fix go install dir


@echo off
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/WheatonCS/Lexos/master/install/windows/update.ps1'))"

create cmd file to increase speed

create cmd file to increase speed


mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_TESTING:BOOL=ON ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DIDYNTREE_USES_IPOPT:BOOL=ON ^
    -DIDYNTREE_USES_OSQPEIGEN:BOOL=ON ^
    -DIDYNTREE_USES_IRRLICHT:BOOL=ON ^
    -DIDYNTREE_USES_MATLAB:BOOL=OFF ^
    -DIDYNTREE_USES_PYTHON:BOOL=ON ^
    -DIDYNTREE_USES_OCTAVE:BOOL=OFF ^
    -DIDYNTREE_USES_LUA:BOOL=OFF ^
    -DIDYNTREE_COMPILES_YARP_TOOLS:BOOL=OFF ^
    -DIDYNTREE_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON ^
    %SRC_DIR%
if errorlevel 1 exit 1

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

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

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

mkdir build
cd build

cmake ^
    -G "Ninja" ^
    -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^
    -DCMAKE_BUILD_TYPE=Release ^
    -DBUILD_TESTING:BOOL=ON ^
    -DBUILD_SHARED_LIBS:BOOL=ON ^
    -DIDYNTREE_USES_IPOPT:BOOL=ON ^
    -DIDYNTREE_USES_OSQPEIGEN:BOOL=ON ^
    -DIDYNTREE_USES_IRRLICHT:BOOL=ON ^
    -DIDYNTREE_USES_MATLAB:BOOL=OFF ^
    -DIDYNTREE_USES_PYTHON:BOOL=ON ^
    -DIDYNTREE_USES_OCTAVE:BOOL=OFF ^
    -DIDYNTREE_USES_LUA:BOOL=OFF ^
    -DIDYNTREE_COMPILES_YARP_TOOLS:BOOL=OFF ^
    -DIDYNTREE_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON ^
    -DPython3_EXECUTABLE:PATH=%PYTHON% ^
    %SRC_DIR%
if errorlevel 1 exit 1

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

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

:: Test.
ctest --output-on-failure -C Release
if errorlevel 1 exit 1

Update bld.bat

Update bld.bat


set MSYS2_PATH_TYPE=inherit
bash -lc "autoreconf --install --symlink -I m4"
bash -lc "configure --prefix=$PREFIX"

bash -lc "make"
bash -lc "make install"

set MSYS2_PATH_TYPE=inherit

set MSYS2_PATH_TYPE=inherit


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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

call npm install -g npm@5 || goto :error

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

goto :EOF

:error
exit /b 1

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

@echo "Starting Windows build"

cd /d %~dp0
cd ..

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

goto :EOF

:error
exit /b 1

use latest npm on Windows (#45)

chore: use latest npm on Windows (#45)


use latest npm on Windows (#127)

chore: use latest npm on Windows (#127)


@echo off
echo New Programming Language
echo Made By Harshit and Pranjal Srivastava
java -cp antlr-3.2.jar org.antlr.Tool Npl.g
echo New Programming Language
echo Made By Harshit and Pranjal Srivastava

Create np1.bat

Create np1.bat


@echo off
setlocal
pushd %~dp0
cd ..
goto :start

:help
echo Usage: build [debug|release] [x64|x86] [nosync] [clean]
echo nosync - do not update the git submodules.
echo clean - only clean the build

goto :exit

:start
echo ============= Building P SDK on %COMPUTERNAME% ===============

set MSBuildPath=
for /F "usebackq tokens=1,2* delims= " %%i in (`reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 -v MSBuildToolsPath`) do (
   if "%%i" == "MSBuildToolsPath" set MSBuildPath=%%k
)

if not "%MSBuildPath%"=="" goto :step2

echo MSBUILD 14.0 does not appear to be installed.
echo No info found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
goto :eof

:step2
set TAIL=%MSBuildPath:~-6%
if "[%TAIL%]" == "[amd64\]" set MSBuildPath=%MSBuildPath:~0,-6%"
set PATH=%PATH%;%MSBuildPath%
set Configuration=Debug
set Platform=x86
set NoSync=
set CleanOnly=

:parseargs
if "%1"=="Debug" set Configuration=Debug
if "%1"=="Release" set Configuration=Release
if "%1"=="x86" set Platform=x86
if "%1"=="x64" set Platform=x64
if "%1"=="nosync" set NoSync=true
if "%1"=="clean" set CleanOnly=true
if "%1"=="" goto :step2
if "%1"=="/?" goto :help
if "%1"=="/h" goto :help
if "%1"=="/help" goto :help
if "%1"=="help" goto :help
shift
goto :parseargs

:step2

if "%NoSync%"=="true" goto :nosync

git submodule init
git submodule update

:nosync
cd ext\zing

echo msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
if ERRORLEVEL 1 goto :exit

set BinaryDrop=..\..\Bld\Drops\%Configuration%\%Platform%\Binaries
if NOT exist %BinaryDrop% mkdir %BinaryDrop%

for %%i in (zc\bin\%Platform%\Release\zc.exe
             ZingExplorer\bin\%Platform%\Release\ZingExplorer.dll
             Zinger\bin\%Platform%\Release\Zinger.exe
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Zing.dll
             Microsoft.Zing.Runtime\bin\%Platform%\Release\Microsoft.Zing.Runtime.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.Runtime.dll
             Resources\external\CCI\System.Compiler.dll
             Resources\external\CCI\System.Compiler.Framework.dll
             Resources\external\CCI\System.Compiler.Runtime.dll
             DelayingSchedulers\CustomDelayingScheduler\bin\%Platform%\Release\CustomDelayingScheduler.dll
             DelayingSchedulers\RandomDelayingScheduler\bin\%Platform%\Release\RandomDelayingScheduler.dll
             DelayingSchedulers\RoundRobinDelayingScheduler\bin\%Platform%\Release\RoundRobinDelayingScheduler.dll
             DelayingSchedulers\RunToCompletionDelayingScheduler\bin\%Platform%\Release\RunToCompletionDelayingScheduler.dll
	     DelayingSchedulers\SealingScheduler\bin\%Platform%\Release\SealingScheduler.dll) do (

    copy %%i %BinaryDrop%
)

cd ..\..
REM this code fixes a problem in MIDL compile by forcing recompile of these files for each configuration.
del Src\PrtDist\Core\NodeManager_c.c
del Src\PrtDist\Core\NodeManager_s.c

echo msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration%
msbuild  P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean

if "%CleanOnly%"=="true" goto :exit
msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /p:SOLVER=NOSOLVER

:exit
popd

@echo off
setlocal
pushd %~dp0
cd ..
goto :start

:help
echo Usage: build [debug|release] [x64|x86] [nosync] [clean|noclean]
echo nosync - do not update the git submodules.
echo clean - only clean the build
echo noclean - do not clean the build, so do incemental build

goto :exit

:start
echo ============= Building P SDK on %COMPUTERNAME% ===============

set MSBuildPath=
for /F "usebackq tokens=1,2* delims= " %%i in (`reg query HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0 -v MSBuildToolsPath`) do (
   if "%%i" == "MSBuildToolsPath" set MSBuildPath=%%k
)

if not "%MSBuildPath%"=="" goto :step2

echo MSBUILD 14.0 does not appear to be installed.
echo No info found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0
goto :eof

:step2
set TAIL=%MSBuildPath:~-6%
if "[%TAIL%]" == "[amd64\]" set MSBuildPath=%MSBuildPath:~0,-6%"
set PATH=%PATH%;%MSBuildPath%
set Configuration=Debug
set Platform=x86
set NoSync=
set CleanOnly=
set NoClean=

:parseargs
if /I "%1"=="debug" set Configuration=Debug
if /I "%1"=="release" set Configuration=Release
if /I "%1"=="x86" set Platform=x86
if /I "%1"=="x64" set Platform=x64
if /I "%1"=="nosync" set NoSync=true
if /I "%1"=="clean" set CleanOnly=true
if /I "%1"=="noclean" set NoClean=true
if /I "%1"=="" goto :step2
if /I "%1"=="/?" goto :help
if /I "%1"=="/h" goto :help
if /I "%1"=="/help" goto :help
if /I "%1"=="help" goto :help
shift
goto :parseargs

:step2

if "%NoSync%"=="true" goto :nosync

git submodule init
git submodule update

:nosync
cd ext\zing

echo msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
msbuild  Zing.sln /p:Platform=%Platform% /p:Configuration=Release
if ERRORLEVEL 1 goto :exit

set BinaryDrop=..\..\Bld\Drops\%Configuration%\%Platform%\Binaries
if NOT exist %BinaryDrop% mkdir %BinaryDrop%

for %%i in (zc\bin\%Platform%\Release\zc.exe
             ZingExplorer\bin\%Platform%\Release\ZingExplorer.dll
             Zinger\bin\%Platform%\Release\Zinger.exe
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Zing.dll
             Microsoft.Zing.Runtime\bin\%Platform%\Release\Microsoft.Zing.Runtime.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.dll
             Microsoft.Zing\bin\%Platform%\Release\Microsoft.Comega.Runtime.dll
             Resources\external\CCI\System.Compiler.dll
             Resources\external\CCI\System.Compiler.Framework.dll
             Resources\external\CCI\System.Compiler.Runtime.dll
             DelayingSchedulers\CustomDelayingScheduler\bin\%Platform%\Release\CustomDelayingScheduler.dll
             DelayingSchedulers\RandomDelayingScheduler\bin\%Platform%\Release\RandomDelayingScheduler.dll
             DelayingSchedulers\RoundRobinDelayingScheduler\bin\%Platform%\Release\RoundRobinDelayingScheduler.dll
             DelayingSchedulers\RunToCompletionDelayingScheduler\bin\%Platform%\Release\RunToCompletionDelayingScheduler.dll
	     DelayingSchedulers\SealingScheduler\bin\%Platform%\Release\SealingScheduler.dll) do (

    copy %%i %BinaryDrop%
)

cd ..\..
REM this code fixes a problem in MIDL compile by forcing recompile of these files for each configuration.
del Src\PrtDist\Core\NodeManager_c.c
del Src\PrtDist\Core\NodeManager_s.c

if "%NoClean%"=="true" goto :build
echo msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration%
msbuild  P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /t:Clean

:build
if "%CleanOnly%"=="true" goto :exit
msbuild P.sln /p:Platform=%Platform% /p:Configuration=%Configuration% /p:SOLVER=NOSOLVER

:exit
popd

Add new build options "clean", "noclean", "nosync" and "help".


@echo off
PING www.google.com -t
REM You can also use other IP Address/Domain Name in the above line, instead of www.google.com
REM Run it with Administrative Privileges
pause

Create InfinitePing.bat

Create InfinitePing.bat


call "c:\Program Files (x86)\nodejs\nodevars.bat"
call npm.cmd install grunt-contrib-compress
call npm.cmd install grunt-contrib-clean
call npm.cmd install -g grunt-cli
call grunt.cmd

call "c:\Program Files (x86)\nodejs\nodevars.bat"
call npm.cmd install grunt
call npm.cmd install grunt-contrib-compress
call npm.cmd install grunt-contrib-clean
call npm.cmd install -g grunt-cli
call grunt.cmd

Fix build by installing grunt

Fix build by installing grunt

grunt should be installed locally in order to be able to build the package successfully.


REM nuget restore

ren fake.snk SimpleInjector.snk

msbuild "SimpleInjector.NET\SimpleInjector.NET.csproj" /nologo
msbuild "SimpleInjector.Packaging\SimpleInjector.Packaging.csproj" /nologo
msbuild "SimpleInjector.Extensions.LifetimeScoping\SimpleInjector.Extensions.LifetimeScoping.csproj" /nologo
msbuild "SimpleInjector.Integration.Web\SimpleInjector.Integration.Web.csproj" /nologo
msbuild "SimpleInjector.Integration.Web.Mvc\SimpleInjector.Integration.Web.Mvc.csproj" /nologo
msbuild "SimpleInjector.Integration.Wcf\SimpleInjector.Integration.Wcf.csproj" /nologo

msbuild "SimpleInjector.NET.Tests.Unit\SimpleInjector.NET.Tests.Unit.csproj" /nologo
msbuild "SimpleInjector.Extensions.LifetimeScoping.Tests.Unit\SimpleInjector.Extensions.LifetimeScoping.Tests.Unit.csproj" /nologo
msbuild "SimpleInjector.Integration.Web.Tests.Unit\SimpleInjector.Integration.Web.Tests.Unit.csproj" /nologo

ren SimpleInjector.snk fake.snk

REM nuget restore

ren fake.snk SimpleInjector.snk

msbuild "SimpleInjector.NET\SimpleInjector.NET.csproj" /nologo
msbuild "SimpleInjector.Packaging\SimpleInjector.Packaging.csproj" /nologo
msbuild "SimpleInjector.Extensions.LifetimeScoping\SimpleInjector.Extensions.LifetimeScoping.csproj" /nologo
msbuild "SimpleInjector.Integration.Web\SimpleInjector.Integration.Web.csproj" /nologo
rem msbuild "SimpleInjector.Integration.Web.Mvc\SimpleInjector.Integration.Web.Mvc.csproj" /nologo
msbuild "SimpleInjector.Integration.Wcf\SimpleInjector.Integration.Wcf.csproj" /nologo

msbuild "SimpleInjector.NET.Tests.Unit\SimpleInjector.NET.Tests.Unit.csproj" /nologo
msbuild "SimpleInjector.Extensions.LifetimeScoping.Tests.Unit\SimpleInjector.Extensions.LifetimeScoping.Tests.Unit.csproj" /nologo
msbuild "SimpleInjector.Integration.Web.Tests.Unit\SimpleInjector.Integration.Web.Tests.Unit.csproj" /nologo

ren SimpleInjector.snk fake.snk

Update appveyor.bat

Update appveyor.bat

comment mvc out for now, appveyor server has System.Web.Mvc 3.0.0.0, project requires 3.0.0.1


@echo off

:: *****************************************
:: Optional values - Please modify as needed
:: *****************************************

:: Total amount of memory in MB available to MZmine 2.
:: AUTO = automatically determined
:: Default: AUTO
set HEAP_SIZE=AUTO

:: Location where temporary files will be stored.
:: Default: %TEMP%
set TMP_FILE_DIRECTORY=%TEMP%

:: It is usually not necessary to modify the JAVA_COMMAND parameter, but if you like to run
:: a specific Java Virtual Machine, you may set the path to the java.exe command of that JVM
set JAVA_COMMAND=java.exe

:: ********************************************
:: You don't need to modify anything below here
:: ********************************************

:: ***********************************
:: Auto detection of accessible memory
:: ***********************************

:: This is necessary to access the TOTAL_MEMORY and ADDRESS_WIDTH variables inside the IF block
setlocal enabledelayedexpansion

:: Obtain the physical memory size and check if we are running on a 32-bit system.
if exist C:\Windows\System32\wbem\wmic.exe (
  echo Checking physical memory size...
  :: Get physical memory size from OS
  for /f "skip=1" %%p in ('C:\Windows\System32\wbem\wmic.exe os get totalvisiblememorysize') do if not defined TOTAL_MEMORY set /a TOTAL_MEMORY=%%p / 1024
  for /f "skip=1" %%x in ('C:\Windows\System32\wbem\wmic.exe cpu get addresswidth') do if not defined ADDRESS_WIDTH set ADDRESS_WIDTH=%%x
  echo Found !TOTAL_MEMORY! MB memory, !ADDRESS_WIDTH!-bit system
) else (
  echo Skipping memory size check, because wmic.exe could not be found
  set ADDRESS_WIDTH=32
)

:: Find Java version
Set JAVA_BIT_VERSION=32
for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do ( @set JAVA_VERSION=%%~g )
for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "64-Bit"') do (@set JAVA_BIT_VERSION=64)
echo Java version is %JAVA_VERSION%(%JAVA_BIT_VERSION%-Bit)

:: Prompt user with error if 32-Bit Java is found on 64-Bit Windows
if %ADDRESS_WIDTH%==64 if %JAVA_BIT_VERSION%==32 (
	echo.
	echo *******************************************************************************
	echo *******************************************************************************
	echo.
	echo Warning: You have installed a 32-Bit version of Java on a 64-Bit Windows.
	echo We suggest that you uninstall all Java versions and install the latest 64-Bit
	echo version instead. If you want to continue running MZmine, the software will only
	echo be able to access 1GB of memory.
	echo.
	echo Please press any button to continue.
	echo.
	echo *******************************************************************************
	echo *******************************************************************************
	echo.
	pause > tempFile
	del tempFile
	set HEAP_SIZE=1024
)

:: By default we set the maximum HEAP_SIZE to 1024 MB on 32-bit systems. On 64-bit systems we
:: either set it to half of the total memory or 2048 MB less than the total memory.
if %HEAP_SIZE%==AUTO (
  if %ADDRESS_WIDTH%==32 (
    set HEAP_SIZE=1024
  ) else (
    if %TOTAL_MEMORY% gtr 4096 (
	  set /a HEAP_SIZE=%TOTAL_MEMORY%-2048
    ) else (
	  set /a HEAP_SIZE=%TOTAL_MEMORY% / 2
    )
  )
)
echo Java maximum heap size set to %HEAP_SIZE% MB
echo.

:: **********************
:: Java specific commands
:: **********************

:: --add-modules=java.se.ee is required to use JAXB (e.g., Chemspider search) under Java 9
:: -XX:+IgnoreUnrecognizedVMOptions is required so Java 8 does not complain about --add-modules
set JAVA_PARAMETERS=-showversion -classpath lib\* -Djava.ext.dirs= -XX:+UseG1GC -Djava.io.tmpdir=%TMP_FILE_DIRECTORY% -Xms256m -Xmx%HEAP_SIZE%m -XX:+IgnoreUnrecognizedVMOptions --add-modules=java.se.ee
set MAIN_CLASS=net.sf.mzmine.main.MZmineCore

:: Make sure we are in the correct directory
set SCRIPTDIR=%~dp0
cd %SCRIPTDIR%

:: Starts the Java Virtual Machine
%JAVA_COMMAND% %JAVA_PARAMETERS% %MAIN_CLASS% %*

:: If there was an error, give the user a chance to see it
IF ERRORLEVEL 1 pause

:: *****************
:: Clean-up commands
:: *****************

setlocal disableDelayedExpansion

:: Kill/clean-up remaining Rserve instances
:: Load the file path "array"
for /f "tokens=1* delims=:" %%A in ('dir /b %TMP_FILE_DIRECTORY%\rs_pid_*.pid 2^>nul ^|findstr /n "^"') do (
  set "file.%%A=%TMP_FILE_DIRECTORY%\%%B"
  set "file.count=%%A"
)
:: Access the values
setlocal enableDelayedExpansion
for /l %%N in (1 1 %file.count%) do (
  echo Found pidfile: !file.%%N!
  set /P pid=<!file.%%N!
  echo Killing Rserve tree from main instance / pid: !pid!.
  del !file.%%N!
  taskkill /PID !pid! /F 2>nul
)

:: Delete temporary folder
RD /S /Q %TMP_FILE_DIRECTORY%

@echo off

:: *****************************************
:: Optional values - Please modify as needed
:: *****************************************

:: Total amount of memory in MB available to MZmine 2.
:: AUTO = automatically determined
:: Default: AUTO
set HEAP_SIZE=AUTO

:: Location where temporary files will be stored.
:: Default: %TEMP%
set TMP_FILE_DIRECTORY=%TEMP%

:: It is usually not necessary to modify the JAVA_COMMAND parameter, but if you like to run
:: a specific Java Virtual Machine, you may set the path to the java.exe command of that JVM
set JAVA_COMMAND=java.exe

:: ********************************************
:: You don't need to modify anything below here
:: ********************************************

:: ***********************************
:: Auto detection of accessible memory
:: ***********************************

:: This is necessary to access the TOTAL_MEMORY and ADDRESS_WIDTH variables inside the IF block
setlocal enabledelayedexpansion

:: Obtain the physical memory size and check if we are running on a 32-bit system.
if exist C:\Windows\System32\wbem\wmic.exe (
  echo Checking physical memory size...
  :: Get physical memory size from OS
  for /f "skip=1" %%p in ('C:\Windows\System32\wbem\wmic.exe os get totalvisiblememorysize') do if not defined TOTAL_MEMORY set /a TOTAL_MEMORY=%%p / 1024
  for /f "skip=1" %%x in ('C:\Windows\System32\wbem\wmic.exe cpu get addresswidth') do if not defined ADDRESS_WIDTH set ADDRESS_WIDTH=%%x
  echo Found !TOTAL_MEMORY! MB memory, !ADDRESS_WIDTH!-bit system
) else (
  echo Skipping memory size check, because wmic.exe could not be found
  set ADDRESS_WIDTH=32
)

:: Find Java version
Set JAVA_BIT_VERSION=32
for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "version"') do ( @set JAVA_VERSION=%%~g )
for /f "tokens=3" %%g in ('java -version 2^>^&1 ^| findstr /i "64-Bit"') do (@set JAVA_BIT_VERSION=64)
echo Java version is %JAVA_VERSION%(%JAVA_BIT_VERSION%-Bit)

:: Prompt user with error if 32-Bit Java is found on 64-Bit Windows
if %ADDRESS_WIDTH%==64 if %JAVA_BIT_VERSION%==32 (
	echo.
	echo *******************************************************************************
	echo *******************************************************************************
	echo.
	echo Warning: You have installed a 32-Bit version of Java on a 64-Bit Windows.
	echo We suggest that you uninstall all Java versions and install the latest 64-Bit
	echo version instead. If you want to continue running MZmine, the software will only
	echo be able to access 1GB of memory.
	echo.
	echo Please press any button to continue.
	echo.
	echo *******************************************************************************
	echo *******************************************************************************
	echo.
	pause > tempFile
	del tempFile
	set HEAP_SIZE=1024
)

:: By default we set the maximum HEAP_SIZE to 1024 MB on 32-bit systems. On 64-bit systems we
:: either set it to half of the total memory or 2048 MB less than the total memory.
if %HEAP_SIZE%==AUTO (
  if %ADDRESS_WIDTH%==32 (
    set HEAP_SIZE=1024
  ) else (
    if %TOTAL_MEMORY% gtr 4096 (
	  set /a HEAP_SIZE=%TOTAL_MEMORY%-2048
    ) else (
	  set /a HEAP_SIZE=%TOTAL_MEMORY% / 2
    )
  )
)
echo Java maximum heap size set to %HEAP_SIZE% MB
echo.

:: **********************
:: Java specific commands
:: **********************

:: --add-modules=java.se.ee is required to use JAXB (e.g., Chemspider search) under Java 9
:: -XX:+IgnoreUnrecognizedVMOptions is required so Java 8 does not complain about --add-modules
set JAVA_PARAMETERS=-showversion -classpath lib\* -Djava.ext.dirs= -XX:+UseG1GC -Djava.io.tmpdir="%TMP_FILE_DIRECTORY%" -Xms256m -Xmx%HEAP_SIZE%m -XX:+IgnoreUnrecognizedVMOptions --add-modules=java.se.ee
set MAIN_CLASS=net.sf.mzmine.main.MZmineCore

:: Make sure we are in the correct directory
set SCRIPTDIR=%~dp0
cd %SCRIPTDIR%

:: Starts the Java Virtual Machine
%JAVA_COMMAND% %JAVA_PARAMETERS% %MAIN_CLASS% %*

:: If there was an error, give the user a chance to see it
IF ERRORLEVEL 1 pause

:: *****************
:: Clean-up commands
:: *****************

setlocal disableDelayedExpansion

:: Kill/clean-up remaining Rserve instances
:: Load the file path "array"
for /f "tokens=1* delims=:" %%A in ('dir /b %TMP_FILE_DIRECTORY%\rs_pid_*.pid 2^>nul ^|findstr /n "^"') do (
  set "file.%%A=%TMP_FILE_DIRECTORY%\%%B"
  set "file.count=%%A"
)
:: Access the values
setlocal enableDelayedExpansion
for /l %%N in (1 1 %file.count%) do (
  echo Found pidfile: !file.%%N!
  set /P pid=<!file.%%N!
  echo Killing Rserve tree from main instance / pid: !pid!.
  del !file.%%N!
  taskkill /PID !pid! /F 2>nul
)

:: Delete temporary folder
RD /S /Q %TMP_FILE_DIRECTORY%

Fix for issue #399

Fix for issue #399


call make.bat skia_lib BUILDTYPE=Debug SKIA_OUT=x86 "GYP_DEFINES=skia_arch_type=x86 skia_shared_lib=0 skia_skip_gui=1 skia_angle=0 skia_codec_decodes_raw=1 skia_mesa=0 skia_vulkan=0 skia_android_framework=0 skia_static_initializers=1 skia_chrome_utils=0 skia_directwrite=1 skia_opencl=1 skia_use_sdl=0 skia_dump_stats=0"
"%VS120COMNTOOLS%..\..\VC\bin\lib.exe" /OUT:skia_x86d.lib x86/Debug/skia_core.lib x86/Debug/skia_codec.lib x86/Debug/skia_effects.lib x86/Debug/skia_images.lib x86/Debug/skia_opts.lib x86/Debug/skia_opts_ssse3.lib x86/Debug/skia_opts_sse41.lib x86/Debug/skia_ports.lib x86/Debug/skia_sfnt.lib x86/Debug/skia_skgpu.lib x86/Debug/skia_utils.lib

call make.bat skia_lib BUILDTYPE=Release SKIA_OUT=x86 "GYP_DEFINES=skia_arch_type=x86 skia_shared_lib=0 skia_skip_gui=1 skia_angle=0 skia_codec_decodes_raw=1 skia_mesa=0 skia_vulkan=0 skia_android_framework=0 skia_static_initializers=1 skia_chrome_utils=0 skia_directwrite=1 skia_opencl=1 skia_use_sdl=0 skia_dump_stats=0"
"%VS120COMNTOOLS%..\..\VC\bin\lib.exe" /OUT:skia_x86.lib x86/Release/skia_core.lib x86/Release/skia_codec.lib x86/Release/skia_effects.lib x86/Release/skia_images.lib x86/Release/skia_opts.lib x86/Release/skia_opts_ssse3.lib x86/Release/skia_opts_sse41.lib x86/Release/skia_ports.lib x86/Release/skia_sfnt.lib x86/Release/skia_skgpu.lib x86/Release/skia_utils.lib

call make.bat skia_lib BUILDTYPE=Debug SKIA_OUT=x64 "GYP_DEFINES=skia_arch_type=x86_64 skia_shared_lib=0 skia_skip_gui=1 skia_angle=0 skia_codec_decodes_raw=1 skia_mesa=0 skia_vulkan=0 skia_android_framework=0 skia_static_initializers=1 skia_chrome_utils=0 skia_directwrite=1 skia_opencl=1 skia_use_sdl=0 skia_dump_stats=0"
"%VS120COMNTOOLS%..\..\VC\bin\lib.exe" /OUT:skia_x64d.lib x64/Debug/skia_core.lib x64/Debug/skia_codec.lib x64/Debug/skia_effects.lib x64/Debug/skia_images.lib x64/Debug/skia_opts.lib x64/Debug/skia_opts_ssse3.lib x64/Debug/skia_opts_sse41.lib x64/Debug/skia_ports.lib x64/Debug/skia_sfnt.lib x64/Debug/skia_skgpu.lib x64/Debug/skia_utils.lib

call make.bat skia_lib BUILDTYPE=Release SKIA_OUT=x64 "GYP_DEFINES=skia_arch_type=x86_64 skia_shared_lib=0 skia_skip_gui=1 skia_angle=0 skia_codec_decodes_raw=1 skia_mesa=0 skia_vulkan=0 skia_android_framework=0 skia_static_initializers=1 skia_chrome_utils=0 skia_directwrite=1 skia_opencl=1 skia_use_sdl=0 skia_dump_stats=0"
"%VS120COMNTOOLS%..\..\VC\bin\lib.exe" /OUT:skia_x64.lib x64/Release/skia_core.lib x64/Release/skia_codec.lib x64/Release/skia_effects.lib x64/Release/skia_images.lib x64/Release/skia_opts.lib x64/Release/skia_opts_ssse3.lib x64/Release/skia_opts_sse41.lib x64/Release/skia_ports.lib x64/Release/skia_sfnt.lib x64/Release/skia_skgpu.lib x64/Release/skia_utils.lib

add simple script to build all configuration for MSVC 2013


add launcher script

feat(*): add launcher script


REM Add other things if could be automated, RUN THIS AS ADMIN

REM Everything is added, including PowerShell command execution and "wget" lol

REM Admin checking...

@echo off
echo Checking if script contains Administrative rights...
net sessions
if %errorlevel%==0 (
echo Success!
) else (
echo No admin, please run with Administrative rights...
pause
exit
)

:MENU

echo Choose An option:
echo 1. Windows Defender Scan
echo 2. List Processes
echo 3. Changing Password Policies
echo 4. Enable UAC
echo 5. Disable Remote Desktop
echo 6. Enable Auto-Update
echo 7. Disable Weak services
echo 8. System Integrity Scan
echo 9. Powershell rootkit detection

SET /p choice=Enter your choice:
IF %choice%==1
GOTO ONE

:ONE
REM Windows Defender scan
echo "SCANNING WITH DEFAULT WINDOWS DEFENDER!"
cd C:\Program Files\Windows Defender\
MpCmdRun.exe -Scan 2
cd C:\
GOTO MENU

REM Listing possible penetrations
cd C:\
echo "STARTING TO OUTPUT PROCESS FILES DIRECTLY TO THE C:\ DRIVE!"
wmic process list brief > BriefProcesses.txt
if %errorlevel%==1 echo Brief Processes failed to write
wmic process list full >FullProcesses.txt
if %errorlevel%==1 echo Full Processes failed to write
wmic startup list full > StartupLists.txt
if %errorlevel%==1 echo Startup Processes failed to write
net start > StartedProcesses.txt
if %errorlevel%==1 echo Started processes failed to write
reg export HKLM\Software\Microsoft\Windows\CurrentVersion\Run  Run.reg
if %errorlevel%==1 echo Run processes failed to write

echo "OUTPUT DONE, CHANGING PASSWORD POLICIES!"
REM Passwords must be 10 digits
net accounts /minpwlen:10
REM Passwords must be changed every 30 days
net accounts /maxpwage:30
REM Passwords can only be changed after 1 day has passed
net accounts /minpwage:1
REM Display current password policy
net accounts

REM Turn on UAC
echo "TURNING ON UAC"
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

REM No Remote Desktop
echo "DISABLING REMOTE DESKTOP"
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f

REM Windows auomatic updates
echo "ENABLING AUTO-UPDATES"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f

REM Removing good ol' insecure stuff
echo "DISABLING WEAK SERVICES"
dism /online /disable-feature /featurename:IIS-WebServerRole >NUL
dism /online /disable-feature /featurename:IIS-WebServer >NUL
dism /online /disable-feature /featurename:IIS-CommonHttpFeatures >NUL
dism /online /disable-feature /featurename:IIS-HttpErrors >NUL
dism /online /disable-feature /featurename:IIS-HttpRedirect >NUL
dism /online /disable-feature /featurename:IIS-ApplicationDevelopment >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility45 >NUL
dism /online /disable-feature /featurename:IIS-HealthAndDiagnostics >NUL
dism /online /disable-feature /featurename:IIS-HttpLogging >NUL
dism /online /disable-feature /featurename:IIS-LoggingLibraries >NUL
dism /online /disable-feature /featurename:IIS-RequestMonitor >NUL
dism /online /disable-feature /featurename:IIS-HttpTracing >NUL
dism /online /disable-feature /featurename:IIS-Security >NUL
dism /online /disable-feature /featurename:IIS-URLAuthorization >NUL
dism /online /disable-feature /featurename:IIS-RequestFiltering >NUL
dism /online /disable-feature /featurename:IIS-IPSecurity >NUL
dism /online /disable-feature /featurename:IIS-Performance >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionDynamic >NUL
dism /online /disable-feature /featurename:IIS-WebServerManagementTools >NUL
dism /online /disable-feature /featurename:IIS-ManagementScriptingTools >NUL
dism /online /disable-feature /featurename:IIS-IIS6ManagementCompatibility >NUL
dism /online /disable-feature /featurename:IIS-Metabase >NUL
dism /online /disable-feature /featurename:IIS-HostableWebCore >NUL
dism /online /disable-feature /featurename:IIS-StaticContent >NUL
dism /online /disable-feature /featurename:IIS-DefaultDocument >NUL
dism /online /disable-feature /featurename:IIS-DirectoryBrowsing >NUL
dism /online /disable-feature /featurename:IIS-WebDAV >NUL
dism /online /disable-feature /featurename:IIS-WebSockets >NUL
dism /online /disable-feature /featurename:IIS-ApplicationInit >NUL
dism /online /disable-feature /featurename:IIS-ASPNET >NUL
dism /online /disable-feature /featurename:IIS-ASPNET45 >NUL
dism /online /disable-feature /featurename:IIS-ASP >NUL
dism /online /disable-feature /featurename:IIS-CGI >NUL
dism /online /disable-feature /featurename:IIS-ISAPIExtensions >NUL
dism /online /disable-feature /featurename:IIS-ISAPIFilter >NUL
dism /online /disable-feature /featurename:IIS-ServerSideIncludes >NUL
dism /online /disable-feature /featurename:IIS-CustomLogging >NUL
dism /online /disable-feature /featurename:IIS-BasicAuthentication >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionStatic >NUL
dism /online /disable-feature /featurename:IIS-ManagementConsole >NUL
dism /online /disable-feature /featurename:IIS-ManagementService >NUL
dism /online /disable-feature /featurename:IIS-WMICompatibility >NUL
dism /online /disable-feature /featurename:IIS-LegacyScripts >NUL
dism /online /disable-feature /featurename:IIS-LegacySnapIn >NUL
dism /online /disable-feature /featurename:IIS-FTPServer >NUL
dism /online /disable-feature /featurename:IIS-FTPSvc >NUL
dism /online /disable-feature /featurename:IIS-FTPExtensibility >NUL
dism /online /disable-feature /featurename:TFTP >NUL
dism /online /disable-feature /featurename:TelnetClient >NUL
dism /online /disable-feature /featurename:TelnetServer >NUL

REM START SYS INTEG SCAN!
echo "STARTING SYSTEM INTERGRITY SCAN"
Sfc.exe /scannow

REM PowerShell RootKit detection start
echo "POWERSHELL ROOTKIT DETECTION WITH MALWAREBYTES ROOTKIT BETA"
powershell Invoke-WebRequest -OutFile MBRTKit.exe https://data-cdn.mbamupdates.com/web/mbar-1.09.3.1001.exe
MBRTKit.exe

PAUSE

REM Add other things if could be automated, RUN THIS AS ADMIN

REM Everything is added, including PowerShell command execution and "wget" lol

REM Admin checking...

@echo off
echo Checking if script contains Administrative rights...
net sessions
if %errorlevel%==0 (
echo Success!
) else (
echo No admin, please run with Administrative rights...
pause
exit
)

:MENU

echo Choose An option:
echo 1. Windows Defender Scan
echo 2. List Processes
echo 3. Changing Password Policies
echo 4. Enable UAC
echo 5. Disable Remote Desktop
echo 6. Enable Auto-Update
echo 7. Disable Weak services
echo 8. System Integrity Scan
echo 9. Powershell rootkit detection

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

SET /p choice=Enter your choice:
IF choice 1 goto one

:One
REM Windows Defender scan
echo "SCANNING WITH DEFAULT WINDOWS DEFENDER!"
cd C:\Program Files\Windows Defender\
MpCmdRun.exe -Scan 2
cd C:\
GOTO MENU

REM Listing possible penetrations
cd C:\
echo "STARTING TO OUTPUT PROCESS FILES DIRECTLY TO THE C:\ DRIVE!"
wmic process list brief > BriefProcesses.txt
if %errorlevel%==1 echo Brief Processes failed to write
wmic process list full >FullProcesses.txt
if %errorlevel%==1 echo Full Processes failed to write
wmic startup list full > StartupLists.txt
if %errorlevel%==1 echo Startup Processes failed to write
net start > StartedProcesses.txt
if %errorlevel%==1 echo Started processes failed to write
reg export HKLM\Software\Microsoft\Windows\CurrentVersion\Run  Run.reg
if %errorlevel%==1 echo Run processes failed to write

echo "OUTPUT DONE, CHANGING PASSWORD POLICIES!"
REM Passwords must be 10 digits
net accounts /minpwlen:10
REM Passwords must be changed every 30 days
net accounts /maxpwage:30
REM Passwords can only be changed after 1 day has passed
net accounts /minpwage:1
REM Display current password policy
net accounts

REM Turn on UAC
echo "TURNING ON UAC"
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f

REM No Remote Desktop
echo "DISABLING REMOTE DESKTOP"
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 1 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f

REM Windows auomatic updates
echo "ENABLING AUTO-UPDATES"
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f

REM Removing good ol' insecure stuff
echo "DISABLING WEAK SERVICES"
dism /online /disable-feature /featurename:IIS-WebServerRole >NUL
dism /online /disable-feature /featurename:IIS-WebServer >NUL
dism /online /disable-feature /featurename:IIS-CommonHttpFeatures >NUL
dism /online /disable-feature /featurename:IIS-HttpErrors >NUL
dism /online /disable-feature /featurename:IIS-HttpRedirect >NUL
dism /online /disable-feature /featurename:IIS-ApplicationDevelopment >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility >NUL
dism /online /disable-feature /featurename:IIS-NetFxExtensibility45 >NUL
dism /online /disable-feature /featurename:IIS-HealthAndDiagnostics >NUL
dism /online /disable-feature /featurename:IIS-HttpLogging >NUL
dism /online /disable-feature /featurename:IIS-LoggingLibraries >NUL
dism /online /disable-feature /featurename:IIS-RequestMonitor >NUL
dism /online /disable-feature /featurename:IIS-HttpTracing >NUL
dism /online /disable-feature /featurename:IIS-Security >NUL
dism /online /disable-feature /featurename:IIS-URLAuthorization >NUL
dism /online /disable-feature /featurename:IIS-RequestFiltering >NUL
dism /online /disable-feature /featurename:IIS-IPSecurity >NUL
dism /online /disable-feature /featurename:IIS-Performance >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionDynamic >NUL
dism /online /disable-feature /featurename:IIS-WebServerManagementTools >NUL
dism /online /disable-feature /featurename:IIS-ManagementScriptingTools >NUL
dism /online /disable-feature /featurename:IIS-IIS6ManagementCompatibility >NUL
dism /online /disable-feature /featurename:IIS-Metabase >NUL
dism /online /disable-feature /featurename:IIS-HostableWebCore >NUL
dism /online /disable-feature /featurename:IIS-StaticContent >NUL
dism /online /disable-feature /featurename:IIS-DefaultDocument >NUL
dism /online /disable-feature /featurename:IIS-DirectoryBrowsing >NUL
dism /online /disable-feature /featurename:IIS-WebDAV >NUL
dism /online /disable-feature /featurename:IIS-WebSockets >NUL
dism /online /disable-feature /featurename:IIS-ApplicationInit >NUL
dism /online /disable-feature /featurename:IIS-ASPNET >NUL
dism /online /disable-feature /featurename:IIS-ASPNET45 >NUL
dism /online /disable-feature /featurename:IIS-ASP >NUL
dism /online /disable-feature /featurename:IIS-CGI >NUL
dism /online /disable-feature /featurename:IIS-ISAPIExtensions >NUL
dism /online /disable-feature /featurename:IIS-ISAPIFilter >NUL
dism /online /disable-feature /featurename:IIS-ServerSideIncludes >NUL
dism /online /disable-feature /featurename:IIS-CustomLogging >NUL
dism /online /disable-feature /featurename:IIS-BasicAuthentication >NUL
dism /online /disable-feature /featurename:IIS-HttpCompressionStatic >NUL
dism /online /disable-feature /featurename:IIS-ManagementConsole >NUL
dism /online /disable-feature /featurename:IIS-ManagementService >NUL
dism /online /disable-feature /featurename:IIS-WMICompatibility >NUL
dism /online /disable-feature /featurename:IIS-LegacyScripts >NUL
dism /online /disable-feature /featurename:IIS-LegacySnapIn >NUL
dism /online /disable-feature /featurename:IIS-FTPServer >NUL
dism /online /disable-feature /featurename:IIS-FTPSvc >NUL
dism /online /disable-feature /featurename:IIS-FTPExtensibility >NUL
dism /online /disable-feature /featurename:TFTP >NUL
dism /online /disable-feature /featurename:TelnetClient >NUL
dism /online /disable-feature /featurename:TelnetServer >NUL

REM START SYS INTEG SCAN!
echo "STARTING SYSTEM INTERGRITY SCAN"
Sfc.exe /scannow

REM PowerShell RootKit detection start
echo "POWERSHELL ROOTKIT DETECTION WITH MALWAREBYTES ROOTKIT BETA"
powershell Invoke-WebRequest -OutFile MBRTKit.exe https://data-cdn.mbamupdates.com/web/mbar-1.09.3.1001.exe
MBRTKit.exe

PAUSE

Update Main.bat

Update Main.bat


set CATALINA_HOME=C:\Java\apache-tomcat-7.0.47
set BREEZEJS_TEST=C:\git\Breeze\breeze.js\test\

Set environment variables to Jay's values


Add Windows wrapper for cli command

Add Windows wrapper for cli command

Former-commit-id: 31161b3ef32e74199bf055767668f9ffc4a01a6f
Former-commit-id: 73fcdee88f09f72314a8b897cd629ce484868ad4


cd src\tools\msvc

echo $config-^>{openssl} = '%LIBRARY_PREFIX%'; >> config.pl
echo $config-^>{zlib} = '%LIBRARY_PREFIX%';    >> config.pl
echo $config-^>{python} = '%PREFIX%';          >> config.pl

:: Need to move a more current msbuild into PATH.  32-bit one in particular on AppVeyor barfs on the solution that
::    Postgres writes here.  This one comes from the Win7 SDK (.net 4.0), and is known to work.
if "%ARCH%" == "32" (
   COPY C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\
   set "PATH=%CD%;%PATH%"
)

call build.bat
call install.bat "%LIBRARY_PREFIX%"
call vcregress check
call vcregress installcheck
call vcregress plcheck
call vcregress contribcheck

cd src\tools\msvc

echo $config-^>{openssl} = '%LIBRARY_PREFIX%'; >> config.pl
echo $config-^>{zlib} = '%LIBRARY_PREFIX%';    >> config.pl
echo $config-^>{python} = '%PREFIX%';          >> config.pl

:: Need to move a more current msbuild into PATH.  32-bit one in particular on AppVeyor barfs on the solution that
::    Postgres writes here.  This one comes from the Win7 SDK (.net 4.0), and is known to work.
if "%ARCH%" == "32" (
   COPY C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe .\
   set "PATH=%CD%;%PATH%"
   set ARCH=Win32
) else (
   set ARCH=x64
)

call perl mkvcbuild.pl
call msbuild pgsql.sln /p:Configuration=Release /p:Platform="%ARCH%"
if errorlevel 1 exit 1
call install.bat "%LIBRARY_PREFIX%"
if errorlevel 1 exit 1
call vcregress check
if errorlevel 1 exit 1
call vcregress installcheck
if errorlevel 1 exit 1
call vcregress plcheck
if errorlevel 1 exit 1
call vcregress contribcheck

postgres: create solution file and call more manually


@REM ----------------------------------------------------------------------------
@REM ${project.baseName} ${project.version}
@REM install Windows service for ${project.baseName}
@REM Copyright (C) 2009-2019 OpenEstate.org
@REM ----------------------------------------------------------------------------
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.
@REM
@echo off
setlocal

::
:: Start execution...
::

:: The name of the account under which the service should run.
:: Prepend .\ to the user name for local system users.
set "SERVICE_USER_NAME="

:: The password of the account under which the service should run.
set "SERVICE_USER_PASSWORD="

:: Path to the folder, where the server configuration files are stored.
set "SERVER_ETC_DIR="

:: Path to the folder, where the server log files are stored.
set "SERVER_LOG_DIR="

:: Path to the folder, where the server data files are stored.
set "SERVER_VAR_DIR="

:: Memory settings of the Java Runtime Environment
set "JAVA_HEAP_MINIMUM=32"
set "JAVA_HEAP_MAXIMUM=512"

::
:: Start execution...
::

set "SCRIPT=%~nx0"
set "SCRIPT_DIR=%~dp0"
set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
set "BASE_DIR=%SCRIPT_DIR%\.."

pushd "%BASE_DIR%"
set "BASE_DIR=%CD%"
popd

IF "%1"=="/q" (
    set "QUIET=1"
) else (
    set "QUIET=0"
)

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\${project.baseName}" >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
    if "%QUIET%"=="0" (
        echo The service is already installed!
        pause
    )
    exit /b 1
)

if exist "%BASE_DIR%\jre\" (
    set "JVM_DLL=%BASE_DIR%\jre\bin\server\jvm.dll"
) else (
    set "JVM_DLL=auto"
)

:: Set default service user name.
if "%SERVICE_USER_NAME%"=="" (
    set "SERVICE_USER_NAME=.\%USERNAME%"
)

:: Set default path to the etc folder.
if "%SERVER_ETC_DIR%"=="" (
    set "SERVER_ETC_DIR=%BASE_DIR%\etc"
)

:: Set default path to the log folder.
if "%SERVER_LOG_DIR%"=="" (
    set "SERVER_LOG_DIR=%USERPROFILE%\${project.baseName}\log"
)

:: Set default path to the var folder.
if "%SERVER_VAR_DIR%"=="" (
    set "SERVER_VAR_DIR=%USERPROFILE%\${project.baseName}"
)

:: Create log directory.
mkdir "%SERVER_LOG_DIR%"

:: Install the service.
set "SERVICE_COMMAND=%SCRIPT_DIR%\service\Service.exe"
"%SERVICE_COMMAND%" //IS//${project.baseName} ^
    --DisplayName="${project.baseName}" ^
    --Description="Server for OpenEstate-ImmoTool" ^
    --Install="%SERVICE_COMMAND%" ^
    --Startup=auto ^
    --ServiceUser="%SERVICE_USER_NAME%" ^
    --ServicePassword="%SERVICE_USER_PASSWORD%" ^
    --Jvm="%JVM_DLL%" ^
    --JvmMs="%JAVA_HEAP_MINIMUM%" ^
    --JvmMx="%JAVA_HEAP_MAXIMUM%" ^
    ++JvmOptions=-Dfile.encoding=UTF-8 ^
    ++JvmOptions=-Dopenestate.server.app=server ^
    ++JvmOptions=-Dopenestate.server.etcDir="%SERVER_ETC_DIR%" ^
    ++JvmOptions=-Dopenestate.server.logDir="%SERVER_LOG_DIR%" ^
    ++JvmOptions=-Dopenestate.server.varDir="%SERVER_VAR_DIR%" ^
    --Classpath="%BASE_DIR%\etc;%BASE_DIR%\lib\*" ^
    --StartMode=jvm ^
    --StartPath="%BASE_DIR%" ^
    --StartClass=org.openestate.tool.server.WindowsService ^
    --StartParams="" ^
    --StartMethod=start ^
    --StopMode=jvm ^
    --StopPath="%BASE_DIR%" ^
    --StopClass=org.openestate.tool.server.WindowsService ^
    --StopMethod=stop ^
    --StopTimeout=30 ^
    --LogPath="%SERVER_LOG_DIR%" ^
    --LogPrefix="service"

IF %ERRORLEVEL% NEQ 0 (
    if "%QUIET%"=="0" (
        echo The service was NOT installed! ^(error %ERRORLEVEL%^)
        echo Please make sure, that the service is not already installed.
        pause
    )
    exit /b 1
)

if "%QUIET%"=="0" (
    echo The service was installed successfully.
    echo Opening the service dialog for further configuration...
    "%SCRIPT_DIR%\service\${project.baseName}.exe"
)

IF %ERRORLEVEL% NEQ 0 (
    if "%QUIET%"=="0" (
        echo Can't open the service dialog. ^(error %ERRORLEVEL%^)
        pause
    )
    exit /b 1
)

@REM ----------------------------------------------------------------------------
@REM ${project.baseName} ${project.version}
@REM install Windows service for ${project.baseName}
@REM Copyright (C) 2009-2019 OpenEstate.org
@REM ----------------------------------------------------------------------------
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.
@REM
@echo off
setlocal

::
:: Start execution...
::

:: Path to the folder, where the server configuration files are stored.
set "SERVER_ETC_DIR="

:: Path to the folder, where the server log files are stored.
set "SERVER_LOG_DIR="

:: Path to the folder, where the server data files are stored.
set "SERVER_VAR_DIR="

:: Memory settings of the Java Runtime Environment
set "JAVA_HEAP_MINIMUM=32"
set "JAVA_HEAP_MAXIMUM=512"

::
:: Start execution...
::

set "SCRIPT=%~nx0"
set "SCRIPT_DIR=%~dp0"
set "SCRIPT_DIR=%SCRIPT_DIR:~0,-1%"
set "BASE_DIR=%SCRIPT_DIR%\.."

pushd "%BASE_DIR%"
set "BASE_DIR=%CD%"
popd

IF "%1"=="/q" (
    set "QUIET=1"
) else (
    set "QUIET=0"
)

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\${project.baseName}" >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
    if "%QUIET%"=="0" (
        echo The service is already installed!
        pause
    )
    exit /b 1
)

if exist "%BASE_DIR%\jre\" (
    set "JVM_DLL=%BASE_DIR%\jre\bin\server\jvm.dll"
) else (
    set "JVM_DLL=auto"
)

:: Set default path to the etc folder.
if "%SERVER_ETC_DIR%"=="" (
    set "SERVER_ETC_DIR=%BASE_DIR%\etc"
)

:: Set default path to the log folder.
if "%SERVER_LOG_DIR%"=="" (
    set "SERVER_LOG_DIR=%USERPROFILE%\${project.baseName}\log"
)

:: Set default path to the var folder.
if "%SERVER_VAR_DIR%"=="" (
    set "SERVER_VAR_DIR=%USERPROFILE%\${project.baseName}"
)

:: Create log directory.
mkdir "%SERVER_LOG_DIR%"

:: Install the service.
set "SERVICE_COMMAND=%SCRIPT_DIR%\service\Service.exe"
"%SERVICE_COMMAND%" //IS//${project.baseName} ^
    --DisplayName="${project.baseName}" ^
    --Description="Server for OpenEstate-ImmoTool" ^
    --Install="%SERVICE_COMMAND%" ^
    --Startup=auto ^
    --Jvm="%JVM_DLL%" ^
    --JvmMs="%JAVA_HEAP_MINIMUM%" ^
    --JvmMx="%JAVA_HEAP_MAXIMUM%" ^
    ++JvmOptions=-Dfile.encoding=UTF-8 ^
    ++JvmOptions=-Dopenestate.server.app=server ^
    ++JvmOptions=-Dopenestate.server.etcDir="%SERVER_ETC_DIR%" ^
    ++JvmOptions=-Dopenestate.server.logDir="%SERVER_LOG_DIR%" ^
    ++JvmOptions=-Dopenestate.server.varDir="%SERVER_VAR_DIR%" ^
    --Classpath="%BASE_DIR%\lib\*" ^
    --StartMode=jvm ^
    --StartPath="%BASE_DIR%" ^
    --StartClass=org.openestate.tool.server.WindowsService ^
    --StartParams="" ^
    --StartMethod=start ^
    --StopMode=jvm ^
    --StopPath="%BASE_DIR%" ^
    --StopClass=org.openestate.tool.server.WindowsService ^
    --StopMethod=stop ^
    --StopTimeout=30 ^
    --LogPath="%SERVER_LOG_DIR%" ^
    --LogPrefix="service"

IF %ERRORLEVEL% NEQ 0 (
    if "%QUIET%"=="0" (
        echo The service was NOT installed! ^(error %ERRORLEVEL%^)
        echo Please make sure, that the service is not already installed.
        pause
    )
    exit /b 1
)

if "%QUIET%"=="0" (
    echo The service was installed successfully.
    echo Opening the service dialog for further configuration...
    "%SCRIPT_DIR%\service\${project.baseName}.exe"
)

IF %ERRORLEVEL% NEQ 0 (
    if "%QUIET%"=="0" (
        echo Can't open the service dialog. ^(error %ERRORLEVEL%^)
        pause
    )
    exit /b 1
)

use default user for Windows services

use default user for Windows services


Create update.bat

Create update.bat


cd ..
del/q scintilla.zip
zip scintilla.zip scintilla\*.* scintilla\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp
cd scintilla

cd ..
del/q scintilla.zip
zip scintilla.zip scintilla\*.* scintilla\*\*.* scintilla\*\*\*.* scintilla\*\*\*\*.* scintilla\*\*\*\*\*.* -x *.o -x *.obj -x *.dll -x *.lib -x *.res -x *.exp
cd scintilla

Store OS X files in zips.

Store OS X files in zips.


@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../
REM ######################################################################################################
echo Building protobuf...

if exist protobuf (rd protobuf /q /s)
git clone -b 2.7.0 https://github.com/google/protobuf.git

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 14 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Release|x64"
copy Debug\*.dll ..\..\..\lib\Debug /Y
copy Debug\*.lib ..\..\..\lib\Debug /Y
copy Release\*.dll ..\..\..\lib\Release /Y
copy Release\*.lib ..\..\..\lib\Release /Y
cd ..\..\..\
REM ######################################################################################################
echo Building libevent...

if exist libevent (rd libevent /q /s)
git clone -b master https://github.com/libevent/libevent.git

cd libevent
md build
cd build
cmake -G "Visual Studio 14 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_extra_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building glog...
if exist glog (rd glog /q /s)
git clone -b v035 https://github.com/google/glog.git

cd glog
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Release|x64"
copy Debug\*.lib ..\..\lib\Debug /Y
copy Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building evpp...

REM close vcpkg setup task
tarkkill /IM /F /T Microsoft.VisualStudio.Setup.Configuration.Console.exe
if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/Qihoo360/evpp.git

cd evpp
md build
cd build
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
call bootstrap-vcpkg.bat
vcpkg install evpp:x64-windows

copy packages\evpp_x64-windows\debug\lib\evpp*.lib ..\..\..\lib\Debug /Y
copy packages\evpp_x64-windows\lib\evpp*.lib ..\..\..\lib\Release /Y
cd ..\..\..\
REM ####################################################################################################
REM back to root dir
cd ../

@echo off

echo Building dependencies...

if exist lib (rd lib /q /s)
md lib
cd lib
md Debug
md Release
cd ../
REM ######################################################################################################
echo Building protobuf...

if exist protobuf (rd protobuf /q /s)
git clone -b 2.7.0 https://github.com/google/protobuf.git

cd protobuf/cmake
md build
cd build
cmake -G "Visual Studio 14 Win64" -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_BUILD_TESTS=OFF ..
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" protobuf.sln /build "Release|x64"
copy Debug\*.dll ..\..\..\lib\Debug /Y
copy Debug\*.lib ..\..\..\lib\Debug /Y
copy Release\*.dll ..\..\..\lib\Release /Y
copy Release\*.lib ..\..\..\lib\Release /Y
cd ..\..\..\
REM ######################################################################################################
echo Building libevent...

if exist libevent (rd libevent /q /s)
git clone -b master https://github.com/libevent/libevent.git

cd libevent
md build
cd build
cmake -G "Visual Studio 14 Win64" -DEVENT__DISABLE_OPENSSL=ON ..
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_core_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Debug|x64" /project event_extra_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevent.sln /build "Release|x64" /project event_extra_static.vcxproj
copy lib\Debug\*.lib ..\..\lib\Debug /Y
copy lib\Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building glog...
if exist glog (rd glog /q /s)
git clone -b v035 https://github.com/google/glog.git

cd glog
md build
cd build
cmake -G "Visual Studio 14 Win64" ..
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Debug|x64"
"%VS140COMNTOOLS%..\IDE\Devenv" google-glog.sln /build "Release|x64"
copy Debug\*.lib ..\..\lib\Debug /Y
copy Release\*.lib ..\..\lib\Release /Y
cd ..\..\
REM ######################################################################################################
echo Building evpp...

if exist evpp (rd evpp /q /s)
git clone -b master https://github.com/ArkGame/evpp.git

cd evpp
cd vsprojects
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Debug|x64" /project evpp_static.vcxproj
"%VS140COMNTOOLS%..\IDE\Devenv" libevpp.sln /build "Release|x64" /project evpp_static.vcxproj
cd ..\..\
REM ####################################################################################################
REM back to root dir
cd ../

modify evpp use a clone

modify evpp use a clone

Former-commit-id: f6344e39bb8fad0616625f530520a0eac0492bea
Former-commit-id: 9b4f2edb594b0a60d45ebd86510d9c6dea722395
Former-commit-id: 852375885f5e3e1cb41000748ff5f59f98224907


npm install --save @angular/common@2.4.4
npm install --save @angular/compiler@2.4.4
npm install --save @angular/compiler-cli@2.4.4
npm install --save @angular/core@2.4.4
npm install --save @angular/forms@2.4.4
npm install --save @angular/http@2.4.4
npm install --save @angular/platform-browser@2.4.4
npm install --save @angular/platform-browser-dynamic@2.4.4
npm install --save @angular/platform-server@2.4.4
npm install --save @angular/router@3.4.4
npm install --save @angular/upgrade@2.4.4
npm install --save-dev @types/angular@1.6.2
npm install --save-dev @types/node@7.0.3

npm install --save-dev jasmine@2.5.3
npm install --save-dev karma-webpack@2.0.1
npm install --save-dev typescript@2.1.5

Clean code.

Clean code.


rd /S /Q build
rd /S /Q build_nw_ia32
rd /S /Q build_electron_ia32

call cmake-js rebuild --runtime=nw --arch=ia32 --runtime-version=0.12.0
rename build build_nw_ia32

call cmake-js rebuild --runtime=electron --arch=ia32 --runtime-version=0.27.0
rename build build_electron_ia32

build helper script added

build helper script added


@rem Build janet on windows
@rem
@rem Open a "Windows SDK Command Shell" and cd to the janet directory
@rem Then run this script with no arguments to build the executable

@echo off

@rem Ensure correct command prompt
@if not defined INCLUDE goto :BADCMD

@rem Sub commands
@if "%1"=="help" goto HELP
@if "%1"=="clean" goto CLEAN
@if "%1"=="test" goto TEST
@if "%1"=="dist" goto DIST

@rem Set compile and link options here
@setlocal
@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS
@set JANET_LINK=link /nologo

mkdir build
mkdir build\core
mkdir build\mainclient

@rem Build the xxd tool for generating sources
@cl /nologo /c tools/xxd.c /Fobuild\xxd.obj
@if errorlevel 1 goto :BUILDFAIL
@link /nologo /out:build\xxd.exe build\xxd.obj
@if errorlevel 1 goto :BUILDFAIL

@rem Generate the embedded sources
@build\xxd.exe src\core\core.janet build\core\core.gen.c janet_gen_core
@if errorlevel 1 goto :BUILDFAIL
@build\xxd.exe src\mainclient\init.janet build\mainclient\init.gen.c janet_gen_init
@if errorlevel 1 goto :BUILDFAIL

@rem Build the generated sources
@%JANET_COMPILE% /Fobuild\core\core.gen.obj build\core\core.gen.c
@if errorlevel 1 goto :BUILDFAIL
@%JANET_COMPILE% /Fobuild\mainclient\init.gen.obj build\mainclient\init.gen.c
@if errorlevel 1 goto :BUILDFAIL

@rem Build the sources
for %%f in (src\core\*.c) do (
    @%JANET_COMPILE% /Fobuild\core\%%~nf.obj %%f
    @if errorlevel 1 goto :BUILDFAIL
)

@rem Build the main client
for %%f in (src\mainclient\*.c) do (
    @%JANET_COMPILE% /Fobuild\mainclient\%%~nf.obj %%f
    @if errorlevel 1 goto :BUILDFAIL
)

@rem Link everything to main client
%JANET_LINK% /out:janet.exe build\core\*.obj build\mainclient\*.obj
@if errorlevel 1 goto :BUILDFAIL

echo === Successfully built janet.exe for Windows ===
echo === Run 'build_win test' to run tests. ==
echo === Run 'build_win clean' to delete build artifacts. ===
exit /b 0

@rem Not using correct command line
:BADCMD
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
exit /b 1

@rem Show help
:HELP
@echo.
@echo Usage: build_windows [subcommand=clean,help,test,dist]
@echo.
@echo Script to build janet on windows. Must be run from the Visual Studio
@echo command prompt.
exit /b 0

@rem Clean build artifacts
:CLEAN
del janet.exe janet.exp janet.lib
rd /s /q build
exit /b 0

@rem Run tests
:TEST
for %%f in (test/suite*.janet) do (
    janet.exe test\%%f
    @if errorlevel 1 goto :TESTFAIL
)
exit /b 0

@rem Build a dist directory
:DIST
mkdir dist
janet.exe tools\gendoc.janet > dist\doc.html
copy janet.exe dist\janet.exe
copy LICENSE dist\LICENSE
copy README.md dist\README.md
copy janet.lib dist\janet.lib
copy janet.exp dist\janet.exp
copy src\include\janet\janet.h dist\janet.h
exit /b 0

:TESTFAIL
@echo.
@echo *******************************************************
@echo *** Tests FAILED -- Please check the error messages ***
@echo *******************************************************
exit /b 1

@rem Build failed
:BUILDFAIL
@echo.
@echo *******************************************************
@echo *** Build FAILED -- Please check the error messages ***
@echo *******************************************************
exit /b 1

@rem Build janet on windows
@rem
@rem Open a "Windows SDK Command Shell" and cd to the janet directory
@rem Then run this script with no arguments to build the executable

@echo off

@rem Ensure correct command prompt
@if not defined INCLUDE goto :BADCMD

@rem Sub commands
@if "%1"=="help" goto HELP
@if "%1"=="clean" goto CLEAN
@if "%1"=="test" goto TEST
@if "%1"=="dist" goto DIST

@rem Set compile and link options here
@setlocal
@set JANET_COMPILE=cl /nologo /Isrc\include /c /O2 /W3 /LD /D_CRT_SECURE_NO_WARNINGS
@set JANET_LINK=link /nologo

mkdir build
mkdir build\core
mkdir build\mainclient

@rem Build the xxd tool for generating sources
@cl /nologo /c tools/xxd.c /Fobuild\xxd.obj
@if errorlevel 1 goto :BUILDFAIL
@link /nologo /out:build\xxd.exe build\xxd.obj
@if errorlevel 1 goto :BUILDFAIL

@rem Generate the embedded sources
@build\xxd.exe src\core\core.janet build\core\core.gen.c janet_gen_core
@if errorlevel 1 goto :BUILDFAIL
@build\xxd.exe src\mainclient\init.janet build\mainclient\init.gen.c janet_gen_init
@if errorlevel 1 goto :BUILDFAIL

@rem Build the generated sources
@%JANET_COMPILE% /Fobuild\core\core.gen.obj build\core\core.gen.c
@if errorlevel 1 goto :BUILDFAIL
@%JANET_COMPILE% /Fobuild\mainclient\init.gen.obj build\mainclient\init.gen.c
@if errorlevel 1 goto :BUILDFAIL

@rem Build the sources
for %%f in (src\core\*.c) do (
    @%JANET_COMPILE% /Fobuild\core\%%~nf.obj %%f
    @if errorlevel 1 goto :BUILDFAIL
)

@rem Build the main client
for %%f in (src\mainclient\*.c) do (
    @%JANET_COMPILE% /Fobuild\mainclient\%%~nf.obj %%f
    @if errorlevel 1 goto :BUILDFAIL
)

@rem Link everything to main client
%JANET_LINK% /out:janet.exe build\core\*.obj build\mainclient\*.obj
@if errorlevel 1 goto :BUILDFAIL

echo === Successfully built janet.exe for Windows ===
echo === Run 'build_win test' to run tests. ==
echo === Run 'build_win clean' to delete build artifacts. ===
exit /b 0

@rem Not using correct command line
:BADCMD
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
exit /b 1

@rem Show help
:HELP
@echo.
@echo Usage: build_windows [subcommand=clean,help,test,dist]
@echo.
@echo Script to build janet on windows. Must be run from the Visual Studio
@echo command prompt.
exit /b 0

@rem Clean build artifacts
:CLEAN
del janet.exe janet.exp janet.lib
rd /s /q build
exit /b 0

@rem Run tests
:TEST
for %%f in (test/suite*.janet) do (
    janet.exe test\%%f
    @if errorlevel 1 goto :TESTFAIL
)
exit /b 0

@rem Build a dist directory
:DIST
mkdir dist
janet.exe tools\gendoc.janet > dist\doc.html
janet.exe tools\amalg.janet > dist\janet.c
copy janet.exe dist\janet.exe
copy LICENSE dist\LICENSE
copy README.md dist\README.md
copy janet.lib dist\janet.lib
copy janet.exp dist\janet.exp
copy src\include\janet\janet.h dist\janet.h
exit /b 0

:TESTFAIL
@echo.
@echo *******************************************************
@echo *** Tests FAILED -- Please check the error messages ***
@echo *******************************************************
exit /b 1

@rem Build failed
:BUILDFAIL
@echo.
@echo *******************************************************
@echo *** Build FAILED -- Please check the error messages ***
@echo *******************************************************
exit /b 1

Add amalgamation to windows distribution


reg add "HKEY_CURRENT_USER\Control Panel\Appearance\New Schemes\Current Settings SaveAll\Sizes\0" /v "Color #5" /t REG_DWORD /d 16777215 /f
reg add "HKEY_CURRENT_USER\Control Panel\Colors" /v "Window" /t REG_SZ /d "199 237 204" /f

add eye

add eye


@echo off
setlocal ENABLEEXTENSIONS

set PATH=C:\MinGW\bin;%PATH%

set TEST_PY=26,30,31
set TEST_MPI=deinompi,mpich2_win,msmpi
set TEST_CC=msvc,mingw32

for %%A in (%TEST_PY%)  do (
for %%B in (%TEST_MPI%) do (
for %%C in (%TEST_CC%)  do (
echo --------------------------------------------------------------------------
call :Main %%A %%B %%C
echo --------------------------------------------------------------------------
)))
goto :eof

:Main
set PYVERSION=%1
set MPICONF=%2
set COMPILER=%3
echo Py: %PYVERSION% - MPI: %MPICONF% - CC: %COMPILER%

set PYTHONDIR=C:\Python%PYVERSION%
set PYTHON="%PYTHONDIR%\python.exe"
set MPIDIR=
if %MPICONF%==deinompi   set MPIDIR=%ProgramFiles%\DeinoMPI
if %MPICONF%==mpich2_win set MPIDIR=%ProgramFiles%\MPICH2
if %MPICONF%==msmpi      set MPIDIR=%ProgramFiles%\Microsoft HPC Pack 2008 SDK
set MPIEXEC="%MPIDIR%\bin\mpiexec.exe"

%PYTHON% setup.py -q clean --all
%PYTHON% setup.py -q build  --mpi=%MPICONF% --compiler=%COMPILER%
%PYTHON% setup.py -q install --home=%TEMP%
%PYTHON% setup.py -q clean --all
%MPIEXEC% -n 2 %PYTHON% test\runalltest.py -q --path=%TEMP%\lib\python
del /S /Q %TEMP%\lib\python > NUL
rmdir /S /Q %TEMP%\lib\python\mpi4py
goto :eof

Add buildtest batch file for Windows

Add buildtest batch file for Windows


@ECHO OFF

IF "%1"==""       GOTO noarg
IF "%1"=="--help" GOTO help
IF "%1"=="-?"     GOTO help
IF "%1"=="/?"     GOTO help
GOTO installarg

:installarg
SET installdir=%1
GOTO check

:noarg
COPY /B /Y setcd setcd.bat
CD ..
CD >> bin\setcd.bat
CD bin
CALL setcd.bat
DEL setcd.bat
SET installdir=%CURDIR: =^ %
GOTO check

:check
IF "%generate%"=="yes" GOTO generate
GOTO checkfile

:generate
IF NOT EXIST %installdir%\bin\wx-partial.pkg GOTO notfound
COPY /Y "%installdir%\bin\wx-partial.pkg" "%installdir%\bin\wx.pkg"
ECHO import-dirs:%installdir%\lib\imports >> "%installdir%\bin\wx.pkg"
ECHO library-dirs:%installdir%\lib        >> "%installdir%\bin\wx.pkg"
COPY /Y "%installdir%\bin\wxcore-partial.pkg" "%installdir%\bin\wxcore.pkg"
ECHO import-dirs:%installdir%\lib\imports >> "%installdir%\bin\wxcore.pkg"
ECHO library-dirs:%installdir%\lib        >> "%installdir%\bin\wxcore.pkg"
GOTO checkfile

:checkfile
IF NOT EXIST "%installdir%\bin\wx.pkg" GOTO notfound

:install
ECHO - register packages
SET wxhlibdir=%installdir%\lib
${hcregister} "%installdir%\bin\wxcore.pkg"
${hcregister} "%installdir%\bin\wx.pkg"

IF ERRORLEVEL 1 GOTO regerror

ECHO.
IF "%OS%"=="Windows_NT" GOTO copyNT
ECHO - copy %wxclibname%.dll to the windows system directory (%WINDIR%\system)
COPY "%installdir%\lib\%wxclibname%.dll" %WINDIR%\system\%wxclibname%.dll
GOTO checkcopy

:copyNT
ECHO - copy %wxclibname%.dll to the windows system directory (%WINDIR%\system32)
COPY "%installdir%\lib\%wxclibname%.dll" %WINDIR%\system32\%wxclibname%.dll

:checkcopy
IF ERRORLEVEL 1 GOTO copyerror

ECHO - done!
GOTO end

:regerror
ECHO error:
ECHO   Unable to register the package using "ghc-pkg".
ECHO   Maybe you have an incompatible version of ghc installed?
ECHO.
goto end

:copyerror
ECHO error:
ECHO   Unable to copy dynamic link libraries to the system folder.
ECHO   This is not a real problem but you will have to add the wxHaskell
ECHO   library directory to your PATH environment variable.
ECHO.
ECHO   The library directory is: %installdir%\lib
ECHO.
goto end

:notfound
ECHO error:
ECHO   Unable to find the wxHaskell packages (bin\wx.pkg)
ECHO   Maybe the installation directory is not properly specified?
ECHO.
GOTO help

:help
ECHO usage:
ECHO   wxhaskell-register [installdir]
ECHO.
ECHO (or just double click on the batch file from the explorer)
ECHO.
GOTO end

:end
PAUSE

@ECHO OFF

IF "%1"==""       GOTO noarg
IF "%1"=="--help" GOTO help
IF "%1"=="-?"     GOTO help
IF "%1"=="/?"     GOTO help
GOTO installarg

:installarg
SET installdir=%1
GOTO check

:noarg
COPY /B /Y setcd setcd.bat
CD ..
CD >> bin\setcd.bat
CD bin
CALL setcd.bat
DEL setcd.bat
SET installdirhelper=%CURDIR: =^ %
SET installdir=%installdirhelper:\=\\%
GOTO check

:check
IF "%generate%"=="yes" GOTO generate
GOTO checkfile

:generate
IF NOT EXIST %installdir%\bin\wx-partial.pkg GOTO notfound
COPY /Y "%installdir%\bin\wx-partial.pkg" "%installdir%\bin\wx.pkg"
ECHO import-dirs:"%installdir%\\lib\\imports" >> "%installdir%\bin\wx.pkg"
ECHO library-dirs:"%installdir%\\lib"        >> "%installdir%\bin\wx.pkg"
COPY /Y "%installdir%\bin\wxcore-partial.pkg" "%installdir%\bin\wxcore.pkg"
ECHO import-dirs:"%installdir%\\lib\\imports" >> "%installdir%\bin\wxcore.pkg"
ECHO library-dirs:"%installdir%\\lib"        >> "%installdir%\bin\wxcore.pkg"
GOTO checkfile

:checkfile
IF NOT EXIST "%installdir%\bin\wx.pkg" GOTO notfound

:install
ECHO - register packages
SET wxhlibdir=%installdir%\lib
${hcregister} "%installdir%\bin\wxcore.pkg"
${hcregister} "%installdir%\bin\wx.pkg"

IF ERRORLEVEL 1 GOTO regerror

ECHO.
IF "%OS%"=="Windows_NT" GOTO copyNT
ECHO - copy %wxclibname%.dll to the windows system directory (%WINDIR%\system)
COPY "%installdir%\lib\%wxclibname%.dll" %WINDIR%\system\%wxclibname%.dll
GOTO checkcopy

:copyNT
ECHO - copy %wxclibname%.dll to the windows system directory (%WINDIR%\system32)
COPY "%installdir%\lib\%wxclibname%.dll" %WINDIR%\system32\%wxclibname%.dll

:checkcopy
IF ERRORLEVEL 1 GOTO copyerror

ECHO - done!
GOTO end

:regerror
ECHO error:
ECHO   Unable to register the package using "ghc-pkg".
ECHO   Maybe you have an incompatible version of ghc installed?
ECHO.
goto end

:copyerror
ECHO error:
ECHO   Unable to copy dynamic link libraries to the system folder.
ECHO   This is not a real problem but you will have to add the wxHaskell
ECHO   library directory to your PATH environment variable.
ECHO.
ECHO   The library directory is: %installdir%\lib
ECHO.
goto end

:notfound
ECHO error:
ECHO   Unable to find the wxHaskell packages (bin\wx.pkg)
ECHO   Maybe the installation directory is not properly specified?
ECHO.
GOTO help

:help
ECHO usage:
ECHO   wxhaskell-register [installdir]
ECHO.
ECHO (or just double click on the batch file from the explorer)
ECHO.
GOTO end

:end
PAUSE

Fix #1400488: Win install problem when path with spaces, e.g. "Program Files".

darcs-hash:20080624020657-c1071-e1bc0ce24bb78e46360b2ce7cef78b95fbb82688.gz