echo off
SETLOCAL ENABLEEXTENSIONS
setlocal enabledelayedexpansion

REM For this script to work, the following locations have to be in windows PATH environment variable
REM variable (hopefully the installers will do  that for you?): imagemagick, exiftool, pngout

REM ----------- BEGIN LINES THAT YOU NORMALY CUSTOMIZE FOR EACH COLLECTION -------------------------
REM Important! Do not follow the equal sign with a space.
set COPYRIGHT=Copyright My Organization 2017
set LICENSE=http://creativecommons.org/licenses/by-sa/4.0/
set ATTRIBUTIONURL=http://myOrganization.org
set COLLECTIONURI=http://myOrganization.org/aboutShapesImages
set COLLECTIONNAME=Shapes Images
REM This is optional; you might like to prefix all images wit something indicating the collection it came from.
REM If you use it, make sure that your index.txt uses the same names as what this produces, including the prefix
REM and file extension (e.g. .png and .jpg).
REM If you don't want to add  prefix to the files, set this to just "set PREFIX="  (i.e. nothing after the equals sign).
set PREFIX=shape_
REM This is optional, if you want to watermark each image. Otherwise, set to ""
REM Note that the approach used below is pretty ugly, and we don't use it for Art Of Reading.
REM It would not be hard to instead have a the watermark done as a semi-transparent image instead of this black text.
REM But either way, it's going to expand/shrink with the image, so not so practicle.
set WATERMARK="Shapes.CC-BY-SA"
REM ----------- END OF LINES THAT YOU NORMALY CUSTOMIZE FOR EACH COLLECTION -------------------------

REM Window batch file information that is key to understanding some of this:
REM 	the loop parameter has to start with a %, so whenever it is referenced, that has to be doubled, so we get %%1
REM 	%~n1 equals the file name of %1 without the file extension
REM		to use constants surround them with "%",
REM 	to use looped indices with special macros, do like this (this one is for the index "1") %~n1,
REM 	to use local variables that change, surround with "!" (and have "setlocal enabledelayedexpansion" at the start of the bat the file).

set source="images"
set dest="output/processed-images"

REM Clear out existing /processed-images
rmdir /S /Q %dest%

REM copy the source images to /processed-images
%SystemRoot%\system32\xcopy.exe %source% %dest% /S /Q /I

REM process each file that looks like an image (skipping jpg, becuase you probably don't want to be converting those to PNG)
REM /R here means "recursive"
FOR /R %dest% %%1 in (*.png, *.tif, *.bmp) DO (
	pushd "%%~dp1"

	REM don't let our variables leak outside of this script (SETLOCAL)
	SETLOCAL
	set SRC="%%1"

	REM whatever the filename was, the new file name is that with the prefix (if any) plus the .png extension
	set NEWNAME=%PREFIX%%%~n1.png
	set RESULT="%%~dp1!NEWNAME!"

	REM use imagemagick-covert to convert images to png if needed
	call "magick" "convert" !SRC! !RESULT!

	REM if we've made a copy with a different name, remove the original from /process-images
	IF NOT !SRC!==!RESULT! (
		del !SRC!
	)

	REM use imagemagick-convert to add a watermark
	IF "%WATERMARK%" NEQ "" (
		call "magick" "convert" -pointsize 20 -gravity SouthWest -annotate +10+10 "%WATERMARK%" !RESULT! !RESULT!
	)

	REM /ktEXt,zTXt makes it preserve the metadata, but seems to prevent most of the compression
	REM for some reason without /v, it tells me it's not found
	REM ECHO Compressing %RESULT%
	call "pngout" /y /v /s1 /ktEXt,zTXt !RESULT!

	ECHO Embedding metadata in %RESULT%
	call "exiftool" -E -overwrite_original_in_place -copyright="%COPYRIGHT%" -XMP-cc:License="%LICENSE%" -XMP:Marked="True" -XMP:ReuseAllowed="true" -XMP:AttributionUrl="%ATTRIBUTIONURL%" -XMP:CollectionURI="%COLLECTIONURI%" -XMP:CollectionName="%COLLECTIONNAME%"  !RESULT!
	ENDLOCAL
	popd

)

echo off
SETLOCAL ENABLEEXTENSIONS
setlocal enabledelayedexpansion

REM For this script to work, the following locations have to be in windows PATH environment variable
REM variable (hopefully the installers will do  that for you?): imagemagick, exiftool, pngout

REM ----------- BEGIN LINES THAT YOU NORMALY CUSTOMIZE FOR EACH COLLECTION -------------------------
REM Important! Do not follow the equal sign with a space.
set COPYRIGHT=Copyright My Organization 2017
set LICENSE=http://creativecommons.org/licenses/by-sa/4.0/
set ATTRIBUTIONURL=http://myOrganization.org
set COLLECTIONURI=http://myOrganization.org/aboutShapesImages
set COLLECTIONNAME=Shapes Images
REM This is optional; you might like to prefix all images wit something indicating the collection it came from.
REM If you use it, make sure that your index.txt uses the same names as what this produces, including the prefix
REM and file extension (e.g. .png and .jpg).
REM If you don't want to add  prefix to the files, set this to just "set PREFIX="  (i.e. nothing after the equals sign).
set PREFIX=shape_
REM This is optional, if you want to watermark each image. Otherwise, set to ""
REM Note that the approach used below is pretty ugly, and we don't use it for Art Of Reading.
REM It would not be hard to instead have a the watermark done as a semi-transparent image instead of this black text.
REM But either way, it's going to expand/shrink with the image, so not so practicle.
set WATERMARK="Shapes.CC-BY-SA"
REM ----------- END OF LINES THAT YOU NORMALY CUSTOMIZE FOR EACH COLLECTION -------------------------

REM Window batch file information that is key to understanding some of this:
REM 	the loop parameter has to start with a %, so whenever it is referenced, that has to be doubled, so we get %%1
REM 	%~n1 equals the file name of %1 without the file extension
REM		to use constants surround them with "%",
REM 	to use looped indices with special macros, do like this (this one is for the index "1") %~n1,
REM 	to use local variables that change, surround with "!" (and have "setlocal enabledelayedexpansion" at the start of the bat the file).

set source="images"
set dest="output/processed-images"

REM Clear out existing /processed-images
rmdir /S /Q %dest%

REM copy the source images to /processed-images
%SystemRoot%\system32\xcopy.exe %source% %dest% /S /Q /I

REM process each file that looks like an image (skipping jpg, becuase you probably don't want to be converting those to PNG)
REM /R here means "recursive"
FOR /R %dest% %%1 in (*.png, *.tif, *.bmp) DO (
	pushd "%%~dp1"

	REM don't let our variables leak outside of this script (SETLOCAL)
	SETLOCAL
	set SRC="%%1"

	REM whatever the filename was, the new file name is that with the prefix (if any) plus the .png extension
	set NEWNAME=%PREFIX%%%~n1.png
	set RESULT="%%~dp1!NEWNAME!"

	REM use imagemagick-covert to convert images to png if needed
	call "magick" "convert" !SRC! !RESULT!

	REM if we've made a copy with a different name, remove the original from /process-images
	IF NOT !SRC!==!RESULT! (
		del !SRC!
	)

	REM use imagemagick-convert to add a watermark
	IF %WATERMARK% NEQ "" (
		call "magick" "convert" -pointsize 20 -gravity SouthWest -annotate +10+10 "%WATERMARK%" !RESULT! !RESULT!
	)

	REM /ktEXt,zTXt makes it preserve the metadata, but seems to prevent most of the compression
	REM for some reason without /v, it tells me it's not found
	REM ECHO Compressing %RESULT%
	call "pngout" /y /v /s1 /ktEXt,zTXt !RESULT!

	ECHO Embedding metadata in %RESULT%
	call "exiftool" -E -overwrite_original_in_place -copyright="%COPYRIGHT%" -XMP-cc:License="%LICENSE%" -XMP:Marked="True" -XMP:ReuseAllowed="true" -XMP:AttributionUrl="%ATTRIBUTIONURL%" -XMP:CollectionURI="%COLLECTIONURI%" -XMP:CollectionName="%COLLECTIONNAME%"  !RESULT!
	ENDLOCAL
	popd

)

Fix empty watermark problem

Fix empty watermark problem


nuget restore -SolutionDirectory ../  ../Rock.Core\DataProtection/RockLib.DataProtection.csproj

msbuild /p:Configuration=Release /t:Clean ..\Rock.Core\DataProtection\RockLib.DataProtection.csproj

msbuild /p:Configuration=Release /t:Rebuild ..\Rock.Core\DataProtection\RockLib.DataProtection.csproj

msbuild /t:pack /p:PackageOutputPath=..\..\builtPackages  /p:Configuration=Release ..\Rock.Core\DataProtection\RockLib.DataProtection.csproj

Add build script

Add build script


REM Change back to current directory
pushd %~dp0

SET PRO_DIR=C:\Program Files\ArcGIS\Pro
IF NOT EXIST "%PRO_DIR%" SET PRO_DIR=%LOCALAPPDATA%\Programs\ArcGIS\Pro

IF EXIST "%PRO_DIR%" goto pro_exists_ok

echo Can't find Pro install at: %PRO_DIR% - can't continue
pause
goto :EOF

:pro_exists_ok

SET DictionaryRenderer=mil2525c_b2
IF NOT EXIST %DictionaryRenderer% goto folder_error
xcopy /v /y /s %DictionaryRenderer% "%PRO_DIR%\Resources\Dictionaries"

echo off
echo ********************************
echo * ArcGIS Pro Dictionary Added: %DictionaryRenderer%
echo ********************************
pause
goto :EOF

:folder_error

echo off
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo ! FAILED:
echo ! Could not find Folder: %DictionaryRenderer%
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pause

REM Change back to current directory
pushd %~dp0

SET PRO_DIR=C:\Program Files\ArcGIS\Pro
IF NOT EXIST "%PRO_DIR%" SET PRO_DIR=%LOCALAPPDATA%\Programs\ArcGIS\Pro

IF EXIST "%PRO_DIR%" goto pro_exists_ok

echo Can't find Pro install at: %PRO_DIR% - can't continue
pause
goto :EOF

:pro_exists_ok

SET DictionaryRenderer=mil2525c_b2
IF NOT EXIST %DictionaryRenderer% goto folder_error

REM Copy to Pro Install
mkdir "%PRO_DIR%\Resources\Dictionaries\%DictionaryRenderer%"
xcopy /v /y /s %DictionaryRenderer% "%PRO_DIR%\Resources\Dictionaries\%DictionaryRenderer%"

echo off
echo ********************************
echo * ArcGIS Pro Dictionary Added: %DictionaryRenderer%
echo ********************************
pause
goto :EOF

:folder_error

echo off
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo ! FAILED:
echo ! Could not find Folder: %DictionaryRenderer%
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pause

Update InstallDictionaryRenderer-ArcGISPro.bat


:: Backup EiM biosignal files

@echo off

:: Folder with data files
set dataFolder="C:\eim\EiMpatch\data"

:: Destination folder
set backupFolder="C:\Google Drive\T1"

:: Set deleteFlag to 1 to delete files after copying
set deleteFlag=1

:: Get Today's date (date result will depend on region of computer (eg. US 01-22-2014, UK 22-01-2014)
set yyyy=%DATE:~6,4%
set mm=%DATE:~3,2%
set dd=%DATE:~0,2%

echo Month:[%mm%]  Day:[%dd%]  Year:[%yyyy%]
mkdir %backupFolder%\EiM_%yyyy%-%mm%-%dd%
echo Copying EiM files...
xcopy /C /Y /S %dataFolder% %backupFolder%\EiM_%yyyy%-%mm%-%dd%

IF %deleteFlag% EQU 1 (
echo Deleting source files...
del /Q %dataFolder%
)
::pause

backup script T1

backup script T1


if not exist tmp\ mkdir tmp

cl -c -Zm200 -O2 -DNDEBUG -MT -EHsc -GR -W0 -wd4710 -I"." -I"..\..\include" -Fotmp\ main.cpp

link /NOLOGO /SUBSYSTEM:CONSOLE /incremental:no /OUT:"main-msvc.exe" ..\..\lib\loki.lib tmp\main.obj

if not exist tmp\ mkdir tmp

cl -c -Zm200 -O2 -DNDEBUG -MT -EHsc -GR -W0 -wd4996 -wd4710 -I"." -I"..\..\include" -Fotmp\ main.cpp

link /NOLOGO /SUBSYSTEM:CONSOLE /incremental:no /OUT:"main-msvc.exe"  tmp\main.obj

update msvc makefile

update msvc makefile

git-svn-id: e2e1a767b54e5f731ad8ac18fa5089ee37d5625a@420 7ec92016-0320-0410-acc4-a06ded1c099a


@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem                                                                         ##
@rem  Groovy JVM Bootstrap for Windowz                                       ##
@rem                                                                         ##
@rem ##########################################################################

@rem
@rem $Revision: 4170 $ $Date: 2006-10-26 12:11:12 +0000 (Thu, 26 Oct 2006) $
@rem

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

set DIRNAME=%~1
shift

set CLASS=%~1
shift

if exist "%USERPROFILE%/.groovy/preinit.bat" call "%USERPROFILE%/.groovy/preinit.bat"

@rem Determine the command interpreter to execute the "CD" later
set COMMAND_COM="cmd.exe"
if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"

@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
set FIND_EXE="find.exe"
if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"

:check_JAVA_HOME
@rem Make sure we have a valid JAVA_HOME
if not "%JAVA_HOME%" == "" goto have_JAVA_HOME

echo.
echo ERROR: Environment variable JAVA_HOME has not been set.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end

:have_JAVA_HOME
@rem Validate JAVA_HOME
%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
if not errorlevel 1 goto check_GROOVY_HOME

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

:check_GROOVY_HOME
@rem Define GROOVY_HOME if not set
if "%GROOVY_HOME%" == "" set GROOVY_HOME=%DIRNAME%..

@rem classpath handling
set CP=
if "x%~1" == "x-cp" set CP=%~2
if "x%~1" == "x-classpath" set CP=%~2
if "x" == "x%CP%" goto init
shift
shift

:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args

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

:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
shift
goto win9xME_args_slurp

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

:execute
@rem Setup the command line
set STARTER_CLASSPATH=%GROOVY_HOME%\lib\groovy-starter.jar

if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"

@rem Setting a classpath using the -cp or -classpath option means not to use
@rem the global classpath. Groovy behaves then the same as the java
@rem interpreter
if "x" == "x%CP%" goto empty_cp
:non_empty_cp
set CP=%STARTER_CLASSPATH%;%CP%;.
goto after_cp
:empty_cp
set CP=%STARTER_CLASSPATH%;.
if "x" == "x%CLASSPATH%" goto after_cp
set STARTER_CLASSPATH=%STARTER_CLASSPATH%;%CLASSPATH%
:after_cp

set STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter
set STARTER_CONF=%GRAILS_HOME%\conf\groovy-starter.conf

set JAVA_EXE=%JAVA_HOME%\bin\java.exe
set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar

if "%JAVA_OPTS%" == "" set JAVA_OPTS="-Xmx128m"
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home=%GRAILS_HOME%
set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"

if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat"

@rem Execute Groovy
"%JAVA_EXE%" %JAVA_OPTS% -classpath "%STARTER_CLASSPATH%" %STARTER_MAIN_CLASS% --main %CLASS% --conf "%STARTER_CONF%" --classpath "%CP%" "%CMD_LINE_ARGS%"

:end
@rem End local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" endlocal

@rem Optional pause the batch file
if "%GROOVY_BATCH_PAUSE%" == "on" pause

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem                                                                         ##
@rem  Groovy JVM Bootstrap for Windowz                                       ##
@rem                                                                         ##
@rem ##########################################################################

@rem
@rem $Revision: 4170 $ $Date: 2006-10-26 12:11:12 +0000 (Thu, 26 Oct 2006) $
@rem

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

set DIRNAME=%~1
shift

set CLASS=%~1
shift

if exist "%USERPROFILE%/.groovy/preinit.bat" call "%USERPROFILE%/.groovy/preinit.bat"

@rem Determine the command interpreter to execute the "CD" later
set COMMAND_COM="cmd.exe"
if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe"
if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com"

@rem Use explicit find.exe to prevent cygwin and others find.exe from being used
set FIND_EXE="find.exe"
if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe"
if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe"

:check_JAVA_HOME
@rem Make sure we have a valid JAVA_HOME
if not "%JAVA_HOME%" == "" goto have_JAVA_HOME

echo.
echo ERROR: Environment variable JAVA_HOME has not been set.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo.
goto end

:have_JAVA_HOME
@rem Validate JAVA_HOME
%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul
if not errorlevel 1 goto check_GROOVY_HOME

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

:check_GROOVY_HOME
@rem Define GROOVY_HOME if not set
if "%GROOVY_HOME%" == "" set GROOVY_HOME=%DIRNAME%..

:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%eval[2+2]" == "4" goto 4NT_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set SERVER_PORT=
set CP=

:win9xME_args_slurp
if "x%~1" == "x" goto execute
if "%~1" == "-Dserver.port" (
	set SERVER_PORT=%~1=%~2
	shift
	shift
	goto win9xME_args_slurp
) else (
	if "x%~1" == "x-cp" (
		set CP=%~2
		shift
		shift
		goto win9xME_args_slurp
	) else (
		if "x%~1" == "x-classpath" (
			set CP=%~2
			shift
			shift
			goto win9xME_args_slurp
		) else (
			set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
			shift
			goto win9xME_args_slurp
		)
	)
)

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

:execute
@rem Setup the command line
set STARTER_CLASSPATH=%GROOVY_HOME%\lib\groovy-starter.jar

if exist "%USERPROFILE%/.groovy/init.bat" call "%USERPROFILE%/.groovy/init.bat"

@rem Setting a classpath using the -cp or -classpath option means not to use
@rem the global classpath. Groovy behaves then the same as the java
@rem interpreter
if "x" == "x%CP%" goto empty_cp
:non_empty_cp
set CP=%STARTER_CLASSPATH%;%CP%;.
goto after_cp
:empty_cp
set CP=%STARTER_CLASSPATH%;.
if "x" == "x%CLASSPATH%" goto after_cp
set STARTER_CLASSPATH=%STARTER_CLASSPATH%;%CLASSPATH%
:after_cp

set STARTER_MAIN_CLASS=org.codehaus.groovy.tools.GroovyStarter
set STARTER_CONF=%GRAILS_HOME%\conf\groovy-starter.conf

set JAVA_EXE=%JAVA_HOME%\bin\java.exe
set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar

if "%JAVA_OPTS%" == "" set JAVA_OPTS="-Xmx128m"
set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name="%PROGNAME%"
set JAVA_OPTS=%JAVA_OPTS% -Dgrails.home=%GRAILS_HOME%
set JAVA_OPTS=%JAVA_OPTS% -Dtools.jar="%TOOLS_JAR%"
set JAVA_OPTS=%JAVA_OPTS% -Dgroovy.starter.conf="%STARTER_CONF%"

if exist "%USERPROFILE%/.groovy/postinit.bat" call "%USERPROFILE%/.groovy/postinit.bat"

@rem Execute Groovy
"%JAVA_EXE%" %JAVA_OPTS% %SERVER_PORT% -classpath "%STARTER_CLASSPATH%" %STARTER_MAIN_CLASS% --main %CLASS% --conf "%STARTER_CONF%" --classpath "%CP%" "%CMD_LINE_ARGS%"

:end
@rem End local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" endlocal

@rem Optional pause the batch file
if "%GROOVY_BATCH_PAUSE%" == "on" pause

fix for GRAILS-649

fix for GRAILS-649

git-svn-id: 29aad96320b2a07b98332cd568fc1316025c072f@2756 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d


@echo off

pushd %~dp0

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

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

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

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

popd

@echo off

pushd %~dp0

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

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

IF NOT EXIST %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.6 (
  RD /S/Q %PACKAGEPATH%FAKE.BuildLib
  %NUGET% install FAKE.BuildLib -Version 0.1.6 %NUGETOPTIONS%
  COPY NUL %PACKAGEPATH%FAKE.BuildLib\Ver_0.1.6
)

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

popd

Make sure that build.cmd get correct packages


nuget restore -SolutionDirectory ../  ../Rock.Encryption\RockLib.Encryption.csproj

msbuild /p:Configuration=Release /t:Clean ..\Rock.Encryption\RockLib.Encryption.csproj

msbuild /p:Configuration=Release /t:Rebuild ..\Rock.Encryption\RockLib.Encryption.csproj

msbuild /t:pack /p:PackageOutputPath=..\builtPackages  /p:Configuration=Release ..\Rock.Encryption\RockLib.Encryption.csproj

nuget restore -SolutionDirectory ../  ../Rock.Encryption\RockLib.Encryption.csproj

msbuild /p:Configuration=Release /t:Clean ..\Rock.Encryption\RockLib.Encryption.csproj

msbuild /p:Configuration=Release /t:Rebuild ..\Rock.Encryption\RockLib.Encryption.csproj

msbuild /t:pack /p:PackageOutputPath=..\..\..\builtPackages  /p:Configuration=Release ..\Rock.Encryption\RockLib.Encryption.csproj

Fix build script output

Fix build script output


@echo off

rem =======================================================
rem Settings
rem =======================================================

set Platform=Win64
set BuildMode=Test
set SessioName=Release
set SessionOwner=AutoBuild

rem =======================================================
rem Release variables
rem =======================================================

set VersionName=%1
set InputProject=%2
set OutputDir=%3
set UAT=%4

rem =======================================================
rem Run UAT
rem =======================================================

%UAT% -ScriptsForProject=%InputProject% BuildCookRun -project=%InputProject% -noP4 -clientconfig=%BuildMode% -serverconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=%Platform% -targetplatform=%Platform% -build -cook -allmaps -unversionedcookedcontent -pak -prereqs -createreleaseversion=%VersionName% -distribution -nodebuginfo -compressed -stage -package -stagingdirectory=%OutputDir% -cmdline=" -Messaging" -addcmdline="-SessionOwner='%SessionOwner%' -SessionName='%SessioName%'"

@echo off

rem =======================================================
rem Settings
rem =======================================================

set Platform=Win64
set BuildMode=Development
set SessioName=Release
set SessionOwner=AutoBuild

rem =======================================================
rem Release variables
rem =======================================================

set VersionName=%1
set InputProject=%2
set OutputDir=%3
set UAT=%4

rem =======================================================
rem Run UAT
rem =======================================================

%UAT% -ScriptsForProject=%InputProject% BuildCookRun -project=%InputProject% -noP4 -clientconfig=%BuildMode% -serverconfig=%BuildMode% -ue4exe=UE4Editor-Cmd.exe -utf8output -platform=%Platform% -targetplatform=%Platform% -build -cook -allmaps -unversionedcookedcontent -pak -prereqs -createreleaseversion=%VersionName% -distribution -nodebuginfo -compressed -stage -package -stagingdirectory=%OutputDir% -cmdline=" -Messaging" -addcmdline="-SessionOwner='%SessionOwner%' -SessionName='%SessioName%'"

Stop doing "Test" builds for now

Stop doing "Test" builds for now


@echo off

REM Script to delete intermediate temporary files from generating Z3 OCaml API

REM files produced by generate_mlapi.cmd
del /q 2>NUL z3_api.idl

REM files produced by compile_mlapi.cmd
del /q 2>NUL *.cmi *.cmo *.cmx *.cma *.cmxa *.obj *.lib *.pdb ocamlz3.exe

REM files produced by test_mlapi.cmd
del /q 2>NUL test*.exe queen*.exe test_*api.out test_*apiV3.out test_*api.err test_*apiV3.err queen.out queen.err z3.log ml.log test_mlapi.log

REM backup files
del /q 2>NUL *~

@echo off

REM Script to delete intermediate temporary files from generating Z3 OCaml API

REM files produced by generate_mlapi.cmd
del /q 2>NUL z3_api.idl

REM files produced by compile_mlapi.cmd
del /q 2>NUL *.cmi *.cmo *.cmx *.cma *.cmxa *.obj *.lib *.pdb ocamlz3.exe

REM files produced by test_mlapi.cmd
del /q 2>NUL test*.exe queen*.exe test_*api.out test_*apiV3.out test_*api.err test_*apiV3.err queen.out queen.err z3.log ml.log test_mlapi.log .z3-trace

REM backup files
del /q 2>NUL *~

clean .z3-trace

clean .z3-trace


cd ..
python .\manage.py syncdb
python .\manage.py shell

cd ..
python .\manage.py migrate
python .\manage.py shell

Update init.bat

Update init.bat


@echo off

echo Checking for the existence of variables.bat
if NOT EXIST "variables.bat" (
    rem No variable file defined
    shutdown -s -t 0
    exit
)

echo Loading variables.bat
rem Source variables
call %~dp0\variables.bat
if "%reportURLFile%"=="" (
    rem No report URL file defined
    shutdown -s -t 0
    exit
)
if "%srcDir%"=="" (
    rem No source dir defined
    shutdown -s -t 0
    exit
)

SET /P reportURL=<%reportURLFile%
SET userAgent="CCX/CI_BOT"
SET logFile="%reportFolder%/log.html"

echo Copy files over to local disk
call :postStatus "preparation" "Copy testsuite to local folder"
rem robocopy returns a non-zero exit code even on success (https://ss64.com/nt/robocopy-exit.html), so we cannot use executeCommand
call robocopy %suiteSrcDir% %suiteDstDir% /e >> "%logFile%"

call :postStatus "preparation" "Copy code to local folder"
call robocopy %srcDir% %dstDir% /e >> "%logFile%"
call :executeCommand cd %dstDir%

echo Compile CCX
call :postStatus "building" "Compiling CCExtractor"
rem Go to Windows build folder
call :executeCommand cd windows
rem Build CCExtractor using the sln script
call :executeCommand "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild" ccextractor.sln
rem check whether installation successful
if EXIST Debug\ccextractorwin.exe (
    cd Debug
    rem Run testsuite
    echo Run tests
    call :postStatus "testing" "Running tests"
    call :executeCommand cd %suiteDstDir%
    call :executeCommand "%tester%" --entries "%testFile%" --executable "%dstDir%\windows\Debug\ccextractorwin.exe" --tempfolder "%tempFolder%" --timeout 3000 --reportfolder "%reportFolder%" --resultfolder "%resultFolder%" --samplefolder "%sampleFolder%" --method Server --url "%reportURL%"
    call :postStatus "completed" "Ran all tests"
    echo Done running tests
    rem Shut down
    timeout 5
    shutdown -s -t 0
)
else
(
    call :haltAndCatchFire "build"
)
echo End
EXIT %ERRORLEVEL%
rem Functions to shorten the script

rem Fail when the exit status is not equal to 0
:executeCommand
echo %* >> "%logFile%"
%* >> "%logFile%"
SET /A status=%ERRORLEVEL%
IF %status% NEQ 0 (
    echo Command exited with %status% >> "%logFile%"
    rem No message needed as we post before anyway
    call :haltAndCatchFire ""
)
EXIT /B 0

rem Post status to the server
:postStatus
echo "Posting status %~1 (message: %~2) to the server"
curl -s -A "%userAgent%" --data "type=progress&status=%~1&message=%~2" -w "\n" "%reportURL%" >> "%logFile%"
EXIT /B 0

rem Exit script and post abort status
:haltAndCatchFire
echo "Halt and catch fire (reason: %~1)"
call :postStatus "canceled" "%~1"
timeout 5
echo Post log
curl -s -A "%userAgent%" --form "type=logupload" --form "file=@%logFile%" -w "\n" "%reportURL%"
rem Shut down, but only in 10 seconds, to give the time to finish the post status
timeout 10
shutdown -s -t 0
EXIT 0

@echo off

echo Checking for the existence of variables.bat
if NOT EXIST "variables.bat" (
    rem No variable file defined
    shutdown -s -t 0
    exit
)

echo Loading variables.bat
rem Source variables
call %~dp0\variables.bat
if "%reportURLFile%"=="" (
    rem No report URL file defined
    shutdown -s -t 0
    exit
)
if "%srcDir%"=="" (
    rem No source dir defined
    shutdown -s -t 0
    exit
)

SET /P reportURL=<%reportURLFile%
SET userAgent="CCX/CI_BOT"
SET logFile="%reportFolder%/log.html"

echo Copy files over to local disk
call :postStatus "preparation" "Copy testsuite to local folder"
rem robocopy returns a non-zero exit code even on success (https://ss64.com/nt/robocopy-exit.html), so we cannot use executeCommand
call robocopy %suiteSrcDir% %suiteDstDir% /e >> "%logFile%"

call :postStatus "preparation" "Copy code to local folder"
call robocopy %srcDir% %dstDir% /e >> "%logFile%"
call :executeCommand cd %dstDir%

echo Compile CCX
call :postStatus "building" "Compiling CCExtractor"
rem Go to Windows build folder
call :executeCommand cd windows
rem Build CCExtractor using the sln script
call :executeCommand "C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild" ccextractor.sln
rem check whether installation successful
if EXIST Debug\ccextractorwin.exe (
    cd Debug
    rem Run testsuite
    echo Run tests
    call :postStatus "testing" "Running tests"
    call :executeCommand cd %suiteDstDir%
    call :executeCommand "%tester%" --entries "%testFile%" --executable "%dstDir%\windows\Debug\ccextractorwin.exe" --tempfolder "%tempFolder%" --timeout 3000 --reportfolder "%reportFolder%" --resultfolder "%resultFolder%" --samplefolder "%sampleFolder%" --method Server --url "%reportURL%"
    call :postStatus "completed" "Ran all tests"
    echo Done running tests
    rem Shut down
    timeout 5
    shutdown -s -t 0
    exit
)
else
(
    call :haltAndCatchFire "build"
)
echo End
EXIT %ERRORLEVEL%
rem Functions to shorten the script

rem Fail when the exit status is not equal to 0
:executeCommand
echo %* >> "%logFile%"
%* >> "%logFile%"
SET /A status=%ERRORLEVEL%
IF %status% NEQ 0 (
    echo Command exited with %status% >> "%logFile%"
    rem No message needed as we post before anyway
    call :haltAndCatchFire ""
)
EXIT /B 0

rem Post status to the server
:postStatus
echo "Posting status %~1 (message: %~2) to the server"
curl -s -A "%userAgent%" --data "type=progress&status=%~1&message=%~2" -w "\n" "%reportURL%" >> "%logFile%"
EXIT /B 0

rem Exit script and post abort status
:haltAndCatchFire
echo "Halt and catch fire (reason: %~1)"
call :postStatus "canceled" "%~1"
timeout 5
echo Post log
curl -s -A "%userAgent%" --form "type=logupload" --form "file=@%logFile%" -w "\n" "%reportURL%"
rem Shut down, but only in 10 seconds, to give the time to finish the post status
timeout 10
shutdown -s -t 0
EXIT 0

Fix adding 'build failed' after a successfull run


@echo off

echo.
echo == Extract
echo.

set ZIP="..\build-tools\7zip\x64\7z.exe"
set TARGET_DIR="..\extracted"

pushd downloads

if not exist %TARGET_DIR% (mkdir %TARGET_DIR%)

echo.
echo === Extracting Build Tools into the folder %TARGET_DIR%
echo.

echo.
echo CMake
%ZIP% x cmake.zip -o%TARGET_DIR% > nul
move "%TARGET_DIR%\cmake-*" "%TARGET_DIR%\cmake"

echo.
echo Swig
%ZIP% x swig.zip -o%TARGET_DIR% > nul
move "%TARGET_DIR%\swig*" "%TARGET_DIR%\swig"

rem echo.
rem echo TDM-GCC-MINGW
rem %ZIP% x tdm-gcc.7z -o%TARGET_DIR% > nul
rem move "%TARGET_DIR%\tdm-gcc-*" "%TARGET_DIR%\mingw"

echo.
echo === Extracting Fifengine Dependencies into the folder %TARGET_DIR%
echo.

echo.
echo Fifengine Dependencies
%ZIP% x libfife-dependencies.zip -o..\extracted\fifengine-includes > nul

echo.
echo Fifengine Python27 Installer
copy libfife.win32-py2.7.msi "%TARGET_DIR%\libfife.win32-py2.7.msi"

echo.
echo Fifengine Python36 Installer
copy libfife.win32-py3.6.msi "%TARGET_DIR%\libfife.win32-py3.6.msi"

echo.
echo Fifengine Mapeditor
rem extracts folder "fifengine-editor-master"
%ZIP% x fifengine-editor.zip -o..\extracted > nul

echo.
echo Fifengine Python Demos
rem extracts folder "fifengine-demos-master"
%ZIP% x fifengine-demos.zip -o..\extracted > nul

echo.
echo Fifengine Python Tutorials
rem extracts folder "python-tutorials-master"
%ZIP% x python-tutorials.zip -o..\extracted > nul

rem echo.
rem echo Fifengine C++ Tutorials
rem %ZIP% x cpp-tutorials.zip -o..\extracted > nul

rem echo.
rem echo Fifengine Atlas Creator
rem %ZIP% x ?.zip -o..\extracted\fifengine-atlas-creator > nul

rem echo.
rem echo Fifengine Documentations
rem %ZIP% x ?.zip -o..\extracted\.pdf > nul

popd

@echo off

echo.
echo == Extract
echo.

set ZIP="..\build-tools\7zip\7z.exe"
set TARGET_DIR="..\extracted"

pushd downloads

if not exist %TARGET_DIR% (mkdir %TARGET_DIR%)

echo.
echo === Extracting Build Tools into the folder %TARGET_DIR%
echo.

echo.
echo CMake
%ZIP% x cmake.zip -o%TARGET_DIR% > nul
move "%TARGET_DIR%\cmake-*" "%TARGET_DIR%\cmake"

echo.
echo Swig
%ZIP% x swig.zip -o%TARGET_DIR% > nul
move "%TARGET_DIR%\swig*" "%TARGET_DIR%\swig"

rem echo.
rem echo TDM-GCC-MINGW
rem %ZIP% x tdm-gcc.7z -o%TARGET_DIR% > nul
rem move "%TARGET_DIR%\tdm-gcc-*" "%TARGET_DIR%\mingw"

echo.
echo === Extracting Fifengine Dependencies into the folder %TARGET_DIR%
echo.

echo.
echo Fifengine Dependencies
%ZIP% x libfife-dependencies.zip -o..\extracted\fifengine-includes > nul

echo.
echo Fifengine Python27 Installer
copy libfife.win32-py2.7.msi "%TARGET_DIR%\libfife.win32-py2.7.msi"

echo.
echo Fifengine Python36 Installer
copy libfife.win32-py3.6.msi "%TARGET_DIR%\libfife.win32-py3.6.msi"

echo.
echo Fifengine Mapeditor
rem extracts folder "fifengine-editor-master"
%ZIP% x fifengine-editor.zip -o..\extracted > nul

echo.
echo Fifengine Python Demos
rem extracts folder "fifengine-demos-master"
%ZIP% x fifengine-demos.zip -o..\extracted > nul

echo.
echo Fifengine Python Tutorials
rem extracts folder "python-tutorials-master"
%ZIP% x python-tutorials.zip -o..\extracted > nul

rem echo.
rem echo Fifengine C++ Tutorials
rem %ZIP% x cpp-tutorials.zip -o..\extracted > nul

rem echo.
rem echo Fifengine Atlas Creator
rem %ZIP% x ?.zip -o..\extracted\fifengine-atlas-creator > nul

rem echo.
rem echo Fifengine Documentations
rem %ZIP% x ?.zip -o..\extracted\.pdf > nul

popd

fix path to 7zip

fix path to 7zip


"%R%" CMD INSTALL --build . %R_ARGS%
IF %ERRORLEVEL% NEQ 0 exit /B 1

Update bld.bat

Update bld.bat


@echo off

setlocal

set force=no

if "%~2" neq "" goto :badArgs
if "%~1" equ "" goto :doneArgs

if /i "%~1" equ "--force" (
	set force=yes
	goto :doneArgs
)

goto :badArgs

:doneArgs

set Shells=%~d0\Shell
set wdir=%~d0
if not exist "%Shells%" mkdir "%Shells%"

rem VS
for /F "tokens=1,* delims==" %%I in ( 'set VS ^| findstr COMNTOOLS' ) do call :addVS "%%I" "%%J"

rem cmd
call :createShortcut cmd64 "%comspec%"
call :createShortcut cmd32 "%WINDIR%\SysWOW64\cmd.exe"

rem PS
set ps="%windir%\system32\WindowsPowerShell\v1.0\powershell.exe"
call :createShortcut PS "%ps%"

rem Git
call :createShortcut "Git Bash" "%ProgramFiles%\Git\git-bash.exe" --cd-to-home

rem Azure
set azureps=%ProgramFiles(x86)%\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\ShortcutStartup.ps1
if exist "%azureps%" call :createShortcut AzurePS "%ps%" "-NoExit -ExecutionPolicy Bypass -File '%azureps%' "

rem Exchange
call :copyExchange

rem ConEmu
call :createShortcut "ConEmu" "%ProgramFiles%\ConEmu\ConEmu64.exe"

goto :eof

:addVS
	set VS=%~1
	set VS=%VS:~2,2%
	set vsScript=%~2\vsvars32.bat
	if not exist "%vsScript%" (
		echo VS%VS% script not found
		goto :eof
	)

	call :createShortcut "VS%VS%" "%comspec%" "/k '%~2\vsvars32.bat' "
	goto :eof

:createShortcut
	set Shell=%Shells%\%~1.lnk
	if "%force%" equ "yes" del /f /q "%Shell%" > nul 2>&1
	if exist "%Shell%" goto :eof
	if not exist "%~2" goto :eof

	cscript /nologo "%~dp0CreateShortcut.vbs" "%Shells%" "%wdir%" %*
	goto :eof

:copyExchange
	set exch_src=%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\programs\Microsoft Exchange Server 2016\Exchange Management Shell.lnk
	if not exist "%exch_src%" goto :eof
	set exch_dst=%Shells%\Exchange.lnk
	echo Creating %exch_dst%
	copy /y "%exch_src%" "%exch_dst%" > nul
	echo.	DONE
	goto :eof

:badArgs
	echo usage: %~n0 [--force]
	exit /b 1

@echo off

setlocal

set force=no

if "%~2" neq "" goto :badArgs
if "%~1" equ "" goto :doneArgs

if /i "%~1" equ "--force" (
	set force=yes
	goto :doneArgs
)

goto :badArgs

:doneArgs

set Shells=%~d0\Shell
set wdir=%~d0
if not exist "%Shells%" mkdir "%Shells%"

rem VS
for /F "tokens=1,* delims==" %%I in ( 'set VS ^| findstr COMNTOOLS' ) do call :addVS "%%I" "%%J"

rem cmd
call :createShortcut cmd64 "%comspec%"
call :createShortcut cmd32 "%WINDIR%\SysWOW64\cmd.exe"

rem PS
set ps="%windir%\system32\WindowsPowerShell\v1.0\powershell.exe"
call :createShortcut PS "%ps%"

rem Git
call :createShortcut "Git Bash" "%ProgramFiles%\Git\git-bash.exe" --cd-to-home

rem Azure
call :createPSShortcut "%ProgramFiles(x86)%\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Services\ShortcutStartup.ps1" "Azure PS"
call :createPSShortcut "%~d0\apps\Ev2PSClient\AzureServiceDeployClient.ps1" "Azure SD"

rem Exchange
call :copyShortcut "%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\programs\Microsoft Exchange Server 2016\Exchange Management Shell.lnk" Exchange

rem ConEmu
call :createShortcut "ConEmu" "%ProgramFiles%\ConEmu\ConEmu64.exe"

rem Moba
call :createShortcut "Moba" "%ProgramFiles(x86)%\Mobatek\MobaXterm Personal Edition\MobaXterm.exe"

goto :eof

:addVS
	set VS=%~1
	set VS=%VS:~2,2%
	set vsScript=%~2\vsvars32.bat
	if not exist "%vsScript%" (
		echo VS%VS% script not found
		goto :eof
	)

	call :createShortcut "VS%VS%" "%comspec%" "/k '%~2\vsvars32.bat' "
	goto :eof

:createShortcut
	set Shell=%Shells%\%~1.lnk
	if "%force%" equ "yes" del /f /q "%Shell%" > nul 2>&1
	if exist "%Shell%" goto :eof
	if not exist "%~2" goto :eof

	cscript /nologo "%~dp0CreateShortcut.vbs" "%Shells%" "%wdir%" %*
	goto :eof

:createPSShortcut
	set ps1=%~1
	if exist "%ps1%" call :createShortcut "%~2" "%ps%" "-NoExit -ExecutionPolicy Bypass -File '%ps1%' "
	goto :eof

:copyShortcut
	set src=%~1
	set dst=%~2
	if not exist "%src%" goto :eof
	set Shell=%Shells%\%dst%.lnk
	if "%force%" equ "yes" del /f /q "%Shell%" > nul 2>&1
	if exist "%Shell%" goto :eof
	echo Creating %Shell%
	copy /y "%src%" "%Shell%" > nul
	echo.	DONE
	goto :eof

:badArgs
	echo usage: %~n0 [--force]
	exit /b 1

Add azure service deploy

Add azure service deploy


setlocal
call settings.bat

git clone https://github.com/berkus/dir_monitor.git
cd dir_monitor

%CMAKE% -DBUILD_TESTING=ON -DBOOST_TEST_STATIC_LINK=ON -DBoost_USE_STATIC_LIBS=ON -DBoost_ADDITIONAL_VERSIONS=1.58;1.59;1.60
%ER%
nmake
%ER%

ctest
cd ..

add dir_monitor

add dir_monitor


@echo off

set BIN_NAME=sqlitebiter

pip install --upgrade pip
pip install --upgrade .[build]

echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --clean --noconfirm --specpath build
echo "----- complete build -----"

echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64

powershell compress-archive -Force %BIN_PATH%.exe %ARCHIVE_PATH%.zip
echo "----- complete compress -----"

pause

@echo off

set BIN_NAME=sqlitebiter

pip install --upgrade pip
pip install --upgrade .[build]

echo "----- start build -----"
pyinstaller cli.py --onefile --name %BIN_NAME% --clean --noconfirm --specpath build
echo "----- complete build -----"

echo "----- start compress -----"
set DIST_DIR_NAME=dist
set BIN_PATH=%DIST_DIR_NAME%/%BIN_NAME%.exe
set ARCHIVE_PATH=%DIST_DIR_NAME%/%BIN_NAME%_win_x64.zip

echo %ARCHIVE_PATH%
powershell compress-archive -Force %BIN_PATH% %ARCHIVE_PATH%
echo "----- complete compress -----"

Update a build script for Windows

Update a build script for Windows


REM To use this script:
REM  - Make sure you have `fsi` in the PATH
REM  - Make sure you do not have any pending changes in `git status`
REM  - Go to the 'tools' directory and run `./update-docs.sh`

fsi build.fsx
cd ..
git checkout gh-pages && copy /y docs\*.html . && git add *.html && git commit -m "Update generated documentation" && git push origin gh-pages && git checkout master

REM To use this script:
REM  - Make sure you have `fsi` in the PATH
REM  - Make sure you do not have any pending changes in `git status`
REM  - Go to the 'tools' directory and run `./update-docs.sh`

fsi build.fsx
pushd ..
git checkout gh-pages && copy /y docs\*.html . && git add *.html && git commit -m "Update generated documentation" && git push origin gh-pages && git checkout master
popd

update script

update script


setlocal

IF "%1"=="" (
	set BUILD_CONFIG="Debug"
) ELSE (
	set BUILD_CONFIG=%1
)

IF "%2"=="" (
	if not "%VS120COMNTOOLS%" == "" (
		echo Setting up Visual Studio Pro 2013 Tools...
		@call "%VS120COMNTOOLS%vsvars32.bat"
		goto build
	)

	if not "%VS100COMNTOOLS%" == "" (
		echo Setting up Visual Studio Pro 2010 Tools...
		@call "%VS100COMNTOOLS%vsvars32.bat"
		goto build
	)

	if not "%VS110COMNTOOLS%" == "" (
		echo Setting up Visual Studio Express 2010 Tools...
		@call "%VS110COMNTOOLS%vsvars32.bat"
		goto build
	)
)

:build
git pull --rebase
msbuild "Palaso.sln" /verbosity:quiet /maxcpucount /p:Configuration=%BUILD_CONFIG%

setlocal

IF "%1"=="" (
	set BUILD_CONFIG="Debug"
) ELSE (
	set BUILD_CONFIG=%1
)

REM Presence of a second argument indicates that the caller has already run vsvars32.bat
IF "%2"=="" (
	if not "%VS120COMNTOOLS%" == "" (
		echo Setting up Visual Studio Pro 2013 Tools...
		@call "%VS120COMNTOOLS%vsvars32.bat"
		goto build
	)

	if not "%VS100COMNTOOLS%" == "" (
		echo Setting up Visual Studio Pro 2010 Tools...
		@call "%VS100COMNTOOLS%vsvars32.bat"
		goto build
	)

	if not "%VS110COMNTOOLS%" == "" (
		echo Setting up Visual Studio Express 2010 Tools...
		@call "%VS110COMNTOOLS%vsvars32.bat"
		goto build
	)
)

:build
git pull --rebase
msbuild "Palaso.sln" /verbosity:quiet /maxcpucount /p:Configuration=%BUILD_CONFIG%

Add comment on second arg to GetAndBuildThis.bat


@ECHO OFF
SETLOCAL
CD /D %~dp0

rem Set the WDK and SDK directories
SET "WDKBASEDIR=C:\WinDDK\7600.16385.1"
SET "SDKDIR=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1"

rem Check the building environment
IF NOT EXIST "%WDKBASEDIR%" CALL :SUBMSG "ERROR" "Specify your WDK directory!"
IF NOT EXIST "%SDKDIR%" CALL :SUBMSG "ERROR" "Specify your SDK directory!"

rem check for the help switches
IF /I "%1"=="help" GOTO :SHOWHELP
IF /I "%1"=="/help" GOTO :SHOWHELP
IF /I "%1"=="-help" GOTO :SHOWHELP
IF /I "%1"=="--help" GOTO :SHOWHELP
IF /I "%1"=="/?" GOTO :SHOWHELP
GOTO :CHECK

:SHOWHELP
TITLE "build.cmd %1"
ECHO.
ECHO:Usage:  build.cmd [Clean^|Build^|Rebuild] [x86^|x64^|all]
ECHO.
ECHO:Edit "build.cmd" and set your WDK and SDK directories.
ECHO:You shouldn't need to make any changes other than that.
ECHO.
ECHO:Executing "build.cmd" will use the defaults: "build.bat build all"
ECHO.
ENDLOCAL
EXIT /B

:CHECK
REM Check for the switches
IF "%1" == "" (
SET BUILDTYPE=Build
SET ARCH=all
) ELSE (
IF /I "%1" == "Build" SET BUILDTYPE=Build
IF /I "%1" == "/Build" SET BUILDTYPE=Build
IF /I "%1" == "-Build" SET BUILDTYPE=Build
IF /I "%1" == "--Build" SET BUILDTYPE=Build
IF /I "%1" == "Clean" SET BUILDTYPE=Clean
IF /I "%1" == "/Clean" SET BUILDTYPE=Clean
IF /I "%1" == "-Clean" SET BUILDTYPE=Clean
IF /I "%1" == "--Clean" SET BUILDTYPE=Clean
IF /I "%1" == "Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "/Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "-Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "--Rebuild" SET BUILDTYPE=Rebuild
IF /I "%2" == "x86" SET ARCH=x86
IF /I "%2" == "/x86" SET ARCH=x86
IF /I "%2" == "-x86" SET ARCH=x86
IF /I "%2" == "--x86" SET ARCH=x86
IF /I "%2" == "x64" SET ARCH=x64
IF /I "%2" == "/x64" SET ARCH=x64
IF /I "%2" == "-x64" SET ARCH=x64
IF /I "%2" == "--x64" SET ARCH=x64
IF /I "%2" == "all" SET ARCH=all
IF /I "%2" == "/all" SET ARCH=all
IF /I "%2" == "-all" SET ARCH=all
IF /I "%2" == "--all" SET ARCH=all
GOTO :START
)

:START
IF /I "%BUILDTYPE%" == "Clean" GOTO :x86
PUSHD ..
CALL "update_version.bat"
POPD

:x86
SET "INCLUDE=%WDKBASEDIR%\inc\crt;%WDKBASEDIR%\inc\api;%WDKBASEDIR%\inc\api\crt\stl60;%WDKBASEDIR%\inc\ddk"
SET "LIB=%WDKBASEDIR%\lib\crt\i386;%WDKBASEDIR%\lib\win7\i386"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\x86;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x64" GOTO :x64

TITLE Building Notepad2 x86...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE clean
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE clean
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64

:x64
SET "LIB=%WDKBASEDIR%\lib\crt\amd64;%WDKBASEDIR%\lib\win7\amd64"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\amd64;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x86" GOTO :END

TITLE Building Notepad2 x64...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE "x64=1" clean
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE "x64=1" clean

:END
TITLE Building Notepad2 - Finished!
ENDLOCAL
EXIT /B

:SUBNMAKE
nmake /NOLOGO /f "makefile.mak" %~1 %2
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
EXIT /B

:SUBMSG
ECHO.&&ECHO:______________________________
ECHO:[%~1] %~2
ECHO:______________________________&&ECHO.
IF /I "%~1"=="ERROR" (
  PAUSE
  EXIT
) ELSE (
  EXIT /B
)

@ECHO OFF
SETLOCAL
CD /D %~dp0

rem Set the WDK and SDK directories
SET "WDKBASEDIR=C:\WinDDK\7600.16385.1"
SET "SDKDIR=%PROGRAMFILES%\Microsoft SDKs\Windows\v7.1"

rem Check the building environment
IF NOT EXIST "%WDKBASEDIR%" CALL :SUBMSG "ERROR" "Specify your WDK directory!"
IF NOT EXIST "%SDKDIR%" CALL :SUBMSG "ERROR" "Specify your SDK directory!"

rem check for the help switches
IF /I "%1"=="help" GOTO :SHOWHELP
IF /I "%1"=="/help" GOTO :SHOWHELP
IF /I "%1"=="-help" GOTO :SHOWHELP
IF /I "%1"=="--help" GOTO :SHOWHELP
IF /I "%1"=="/?" GOTO :SHOWHELP
GOTO :CHECK

:SHOWHELP
TITLE "build.cmd %1"
ECHO.
ECHO:Usage:  build.cmd [Clean^|Build^|Rebuild] [x86^|x64^|all]
ECHO.
ECHO:Edit "build.cmd" and set your WDK and SDK directories.
ECHO:You shouldn't need to make any changes other than that.
ECHO.
ECHO:Executing "build.cmd" will use the defaults: "build.cmd build all"
ECHO:If you skip an argument the default one will be used. Example:
ECHO:"build.cmd rebuild" is equivalent to "build.cmd rebuild all"
ECHO.
ENDLOCAL
EXIT /B

:CHECK
REM Check for the switches
IF "%1" == "" (
SET BUILDTYPE=Build
SET ARCH=all
) ELSE (
IF /I "%1" == "Build" SET BUILDTYPE=Build
IF /I "%1" == "/Build" SET BUILDTYPE=Build
IF /I "%1" == "-Build" SET BUILDTYPE=Build
IF /I "%1" == "--Build" SET BUILDTYPE=Build
IF /I "%1" == "Clean" SET BUILDTYPE=Clean
IF /I "%1" == "/Clean" SET BUILDTYPE=Clean
IF /I "%1" == "-Clean" SET BUILDTYPE=Clean
IF /I "%1" == "--Clean" SET BUILDTYPE=Clean
IF /I "%1" == "Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "/Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "-Rebuild" SET BUILDTYPE=Rebuild
IF /I "%1" == "--Rebuild" SET BUILDTYPE=Rebuild
IF /I "%2" == "x86" SET ARCH=x86
IF /I "%2" == "/x86" SET ARCH=x86
IF /I "%2" == "-x86" SET ARCH=x86
IF /I "%2" == "--x86" SET ARCH=x86
IF /I "%2" == "x64" SET ARCH=x64
IF /I "%2" == "/x64" SET ARCH=x64
IF /I "%2" == "-x64" SET ARCH=x64
IF /I "%2" == "--x64" SET ARCH=x64
IF /I "%2" == "all" SET ARCH=all
IF /I "%2" == "/all" SET ARCH=all
IF /I "%2" == "-all" SET ARCH=all
IF /I "%2" == "--all" SET ARCH=all
GOTO :START
)

:START
IF /I "%BUILDTYPE%" == "Clean" GOTO :x86
PUSHD ..
CALL "update_version.bat"
POPD

:x86
SET "INCLUDE=%WDKBASEDIR%\inc\crt;%WDKBASEDIR%\inc\api;%WDKBASEDIR%\inc\api\crt\stl60;%WDKBASEDIR%\inc\ddk"
SET "LIB=%WDKBASEDIR%\lib\crt\i386;%WDKBASEDIR%\lib\win7\i386"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\x86;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x64" GOTO :x64

TITLE Building Notepad2 x86...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE clean
CALL :SUBNMAKE
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE clean
IF /I "%ARCH%" == "x86" GOTO :END
IF /I "%ARCH%" == "x64" GOTO :x64
IF /I "%ARCH%" == "all" GOTO :x64

:x64
SET "LIB=%WDKBASEDIR%\lib\crt\amd64;%WDKBASEDIR%\lib\win7\amd64"
SET "FPATH=%WDKBASEDIR%\bin\x86;%WDKBASEDIR%\bin\x86\amd64;%SDKDIR%\Bin"
SET "PATH=%FPATH%"

IF /I "%ARCH%" == "x86" GOTO :END

TITLE Building Notepad2 x64...
ECHO. && ECHO.

IF /I "%BUILDTYPE%" == "Build" (
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Rebuild" (
CALL :SUBNMAKE "x64=1" clean
CALL :SUBNMAKE "x64=1"
GOTO :END
)

IF /I "%BUILDTYPE%" == "Clean" CALL :SUBNMAKE "x64=1" clean

:END
TITLE Building Notepad2 - Finished!
ENDLOCAL
EXIT /B

:SUBNMAKE
nmake /NOLOGO /f "makefile.mak" %~1 %2
IF %ERRORLEVEL% NEQ 0 CALL :SUBMSG "ERROR" "Compilation failed!"
EXIT /B

:SUBMSG
ECHO.&&ECHO:______________________________
ECHO:[%~1] %~2
ECHO:______________________________&&ECHO.
IF /I "%~1"=="ERROR" (
  PAUSE
  EXIT
) ELSE (
  EXIT /B
)

update build.cmd

update build.cmd

git-svn-id: 756506b3b0ea8c31733a8f0a5bb416c7e269da3d@317 28bd50df-7adb-d945-0439-6e466c6a13cc


:;# This is a cross-platform script
:;# Save this file with unix eol style
:;# See each operating system's "section"

:;# Call this script with one argument which will be the type
:;# static or dynamic

:<<BATCH
    @echo off
    :; # ########## WINDOWS SECTION #########################

    SET SCRIPT_PATH=%~dp0
    SET BASE_PATH=%SCRIPT_PATH%..\..
    SET LINK_OPTION=%1
    IF "%LINK_OPTION%"=="" (
        ECHO Linkage option not defined.
        ECHO Use: static or dynamic.
    ) ELSE (
        Rem Creating archive of all win deployed applications
        echo "7z a %BASE_PATH%\mne-cpp-windows-%LINK_OPTION%-x86_64.zip %BASE_PATH%\bin"
    )
    :; # ########## WINDOWS SECTION ENDS ####################
    :; # ####################################################
    exit /b
BATCH

if [ "$(uname)" == "Darwin" ]; then

    # ############## MAC SECTION ###########################

    LINK_OPTION=$1
    SCRIPT_PATH="$(
        cd "$(dirname "$0")" >/dev/null 2>&1
        pwd -P
    )"
    BASE_PATH=${SCRIPT_PATH}/../..
    if [ -z ${LINK_OPTION} ]; then
        echo "Variable ${LINK_OPTION} is not set."
        echo "Use: static or dynamic"
    else
        # Creating archive of everything in current directory
        tar cfvz ${BASE_PATH}/mne-cpp-linux-${LINK_OPTION}-x86_64.tar.gz ${BASE_PATH}/bin/.
        tar cfvz mne-cpp-macos-${1}-x86_64.tar.gz bin/.
    fi
    # Creating archive of all macos deployed applications
    echo

    # ############## MAC SECTION ENDS ######################
    # ######################################################

elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then

    # ############## LINUX SECTION #########################

    LINK_OPTION=$1
    SCRIPT_PATH="$(
        cd "$(dirname "$0")" >/dev/null 2>&1
        pwd -P
    )"
    BASE_PATH=${SCRIPT_PATH}/../..
    if [ -z ${LINK_OPTION} ]; then
        echo "Variable ${LINK_OPTION} is not set."
        echo "Use: static or dynamic"
    else
        # Delete folders which we do not want to ship
        rm -r bin/mne-cpp-test-data

        # Creating archive of everything in current directory
        tar cfvz ${BASE_PATH}/mne-cpp-linux-${LINK_OPTION}-x86_64.tar.gz ${BASE_PATH}/bin/*
    fi

    # ############## LINUX SECTION ENDS ####################
    # ######################################################

fi

exit 0

:;# This is a cross-platform script
:;# Save this file with unix eol style
:;# See each operating system's "section"

:;# Call this script with one argument which will be the type
:;# static or dynamic

:<<BATCH
    @echo off
    :; # ########## WINDOWS SECTION #########################

    SET SCRIPT_PATH=%~dp0
    SET BASE_PATH=%SCRIPT_PATH%..\..
    SET LINK_OPTION=%1
    IF "%LINK_OPTION%"=="" (
        ECHO Linkage option not defined.
        ECHO Use: static or dynamic.
    ) ELSE (
        Rem Delete folders which we do not want to ship
        Remove-Item '%BASE_PATH%\bin\mne-cpp-test-data' -Recurse
        Remove-Item '%BASE_PATH%\bin\mne_scan_plugins' -Recurse
        Remove-Item '%BASE_PATH%\bin\mne_analyze_plugins' -Recurse
        Remove-Item '%BASE_PATH%\bin\mne_rt_server_plugins' -Recurse
        Remove-Item '%BASE_PATH%\bin\resources' -Recurse

        Rem Creating archive of all win deployed applications
        7z a %BASE_PATH%\mne-cpp-windows-%LINK_OPTION%-x86_64.zip %BASE_PATH%\bin
    )
    :; # ########## WINDOWS SECTION ENDS ####################
    :; # ####################################################
    exit /b
BATCH

if [ "$(uname)" == "Darwin" ]; then

    # ############## MAC SECTION ###########################

    LINK_OPTION=$1
    SCRIPT_PATH="$(
        cd "$(dirname "$0")" >/dev/null 2>&1
        pwd -P
    )"
    BASE_PATH=${SCRIPT_PATH}/../..
    if [ -z ${LINK_OPTION} ]; then
        echo "Variable ${LINK_OPTION} is not set."
        echo "Use: static or dynamic"
    else
        # Delete folders which we do not want to ship
        rm -r ${BASE_PATH}/bin/mne-cpp-test-data
        rm -r ${BASE_PATH}/bin/mne_scan_plugins
        rm -r ${BASE_PATH}/bin/mne_analyze_plugins
        rm -r ${BASE_PATH}/bin/mne_rt_server_plugins
        rm -r ${BASE_PATH}/bin/resources

        # Creating archive of everything in current directory
        tar cfvz ${BASE_PATH}/mne-cpp-macos-${LINK_OPTION}-x86_64.tar.gz ${BASE_PATH}/bin/.
    fi

    # ############## MAC SECTION ENDS ######################
    # ######################################################

elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then

    # ############## LINUX SECTION #########################

    LINK_OPTION=$1
    SCRIPT_PATH="$(
        cd "$(dirname "$0")" >/dev/null 2>&1
        pwd -P
    )"
    BASE_PATH=${SCRIPT_PATH}/../..
    if [ -z ${LINK_OPTION} ]; then
        echo "Variable ${LINK_OPTION} is not set."
        echo "Use: static or dynamic"
    else
        # Delete folders which we do not want to ship
        rm -r ${BASE_PATH}/bin/mne-cpp-test-data
        rm -r ${BASE_PATH}/bin/mne_scan_plugins
        rm -r ${BASE_PATH}/bin/mne_analyze_plugins
        rm -r ${BASE_PATH}/bin/mne_rt_server_plugins
        rm -r ${BASE_PATH}/bin/resources

        # Creating archive of everything in current directory
        tar cfvz ${BASE_PATH}/mne-cpp-linux-${LINK_OPTION}-x86_64.tar.gz ${BASE_PATH}/bin/. ${BASE_PATH}/lib/.
    fi

    # ############## LINUX SECTION ENDS ####################
    # ######################################################

fi

exit 0

update packing script

update packing script


@echo off
set release_name=OpenEMap-1.2.0-rc.1
echo ..\release\%release_name%
cd ..\release
rd /s /q %release_name%
del %release_name%.zip
md %release_name%
cd %release_name%
md config
md resources
cd..
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat --closure ..\%release_name%-all.js
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat ..\%release_name%-all-debug.js
copy ..\*.html ..\release\%release_name%
copy ..\*-all.js ..\release\%release_name%
xcopy ..\config ..\release\%release_name%\config /E
xcopy ..\resources ..\release\%release_name%\resources /E
zip -r %release_name%.zip %release_name%/*
more

@echo off
set release_name=OpenEMap-1.2.0-rc.1
echo ..\release\%release_name%
cd ..\release
rd /s /q %release_name%
del %release_name%.zip
del ..\%release_name%-all.js
del ..\%release_name%-all-debug.js
md %release_name%
cd %release_name%
md config
md resources
cd..
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat --closure ..\%release_name%-all.js
sencha.exe compile --classpath=..\src\main\javascript,\libs\ext-4.2.1\src,\libs\geoext-2.0.1\src exclude -all and include -namespace OpenEMap and include -file ..\src\main\javascript\OpenEMap.js and concat ..\%release_name%-all-debug.js
copy ..\*.html ..\release\%release_name%
copy ..\*-all.js ..\release\%release_name%
xcopy ..\config ..\release\%release_name%\config /E
xcopy ..\resources ..\release\%release_name%\resources /E
zip -r %release_name%.zip %release_name%/*
more

Build script (windows) bug fixed

Build script (windows) bug fixed


@echo off
setlocal enabledelayedexpansion

if not defined MSBUILDLOGPATH (
    set MSBUILDLOGPATH="D:\MSBuildLogs"
)

if not defined MSBUILD_CUSTOM_PATH (
    set MSBUILD_CUSTOM_PATH="C:\MSBuild\14.0\Bin\MSBuild.exe"
)

if not defined MSBUILD_ARGS (
    set MSBUILD_ARGS="WebApplication3.xproj" /m /verbosity:minimal %*
)

if not defined BASEOUTPUT_PATH (
	set BASEOUTPUT_PATH="%~dp0BuildOutPut"
	call DEL BASEOUTPUT_PATH
	call MKDIR %BASEOUTPUT_PATH%
)

echo %MSBUILD_ARGS%

:: Add a the file logger with diagnostic verbosity to the msbuild args
set MSBUILD_ARGS=%MSBUILD_ARGS% /fileloggerparameters:Verbosity=diag;LogFile="%MSBUILDLOGPATH%/build.log;"

set BUILD_COMMAND="%MSBUILD_CUSTOM_PATH%" /nodeReuse:false %MSBUILD_ARGS% /p:OutputPath=%BASEOUTPUT_PATH%

echo.
echo ** Using the MSBuild in path: %MSBUILD_CUSTOM_PATH%
echo ** Using runtime host in path: %RUNTIME_HOST%

:: Call MSBuild
echo ** %BUILD_COMMAND%
call %BUILD_COMMAND%
set BUILDERRORLEVEL=%ERRORLEVEL%
echo.

:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%MSBUILDLOGPATH%"
echo.
echo ** Build completed. Exit code: %BUILDERRORLEVEL%

echo ** FxCop Analysis Started

if not defined FXCOPFILEPATH (
	set FXCOPFILEPATH = "%BASEOUTPUT_PATH%\src\WebApplication3\bin\Debug\netcoreapp1.0\WebApplication3.dll"
}

if not defined FXCOPPATH (
    set FXCOPPATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe"
)

if not defined FXCOP_RULES_PATH (
	set FXCOP_RULES_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\FxCop\Rules"
)

set FXCOP_RUN_COMMAND ="%FXCOPPATH%" /f:"%FXCOPFILEPATH%" /r:"%FXCOP_RULES_PATH%\DesignRules.dll" /o:OutputFile.xml

echo FXCOP_RUN_COMMAND

call %FXCOP_RUN_COMMAND%

exit /b %BUILDERRORLEVEL%

@echo off
setlocal enabledelayedexpansion

if not defined MSBUILDLOGPATH (
    set MSBUILDLOGPATH="%~dp0BuildLogOutput"
)

if not defined MSBUILD_CUSTOM_PATH (
    set MSBUILD_CUSTOM_PATH="C:\MSBuild\14.0\Bin\MSBuild.exe"
)

if not defined MSBUILD_ARGS (
    set MSBUILD_ARGS="WebApplication3.xproj" /m /verbosity:minimal %*
)

if not defined BASEOUTPUT_PATH (
	set BASEOUTPUT_PATH="%~dp0BuildOutPut"
	call DEL BASEOUTPUT_PATH
	call MKDIR %BASEOUTPUT_PATH%
)

echo %MSBUILD_ARGS%

:: Add a the file logger with diagnostic verbosity to the msbuild args
set MSBUILD_ARGS=%MSBUILD_ARGS% /fileloggerparameters:Verbosity=diag;LogFile="%MSBUILDLOGPATH%/build.log;"

set BUILD_COMMAND="%MSBUILD_CUSTOM_PATH%" /nodeReuse:false %MSBUILD_ARGS% /p:OutputPath=%BASEOUTPUT_PATH%

echo.
echo ** Using the MSBuild in path: %MSBUILD_CUSTOM_PATH%
echo ** Using runtime host in path: %RUNTIME_HOST%

:: Call MSBuild
echo ** %BUILD_COMMAND%
call %BUILD_COMMAND%
set BUILDERRORLEVEL=%ERRORLEVEL%
echo.

:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%MSBUILDLOGPATH%"
echo.
echo ** Build completed. Exit code: %BUILDERRORLEVEL%

echo ** FxCop Analysis Started

if not defined FXCOPFILEPATH (
	set FXCOPFILEPATH = "%BASEOUTPUT_PATH%\src\WebApplication3\bin\Debug\netcoreapp1.0\WebApplication3.dll"
}

if not defined FXCOPPATH (
    set FXCOPPATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\FxCop\FxCopCmd.exe"
)

if not defined FXCOP_RULES_PATH (
	set FXCOP_RULES_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team Tools\Static Analysis Tools\FxCop\Rules"
)

set FXCOP_RUN_COMMAND ="%FXCOPPATH%" /f:"%FXCOPFILEPATH%" /r:"%FXCOP_RULES_PATH%\DesignRules.dll" /o:OutputFile.xml

echo FXCOP_RUN_COMMAND

call %FXCOP_RUN_COMMAND%

exit /b %BUILDERRORLEVEL%

Update msbuild.cmd

Update msbuild.cmd


setlocal
call settings.bat

set PYDIR=C:\Python27

git clone -b tags/2.0.0 https://github.com/OSGeo/gdal.git gdal2
cd gdal2\gdal

if "%1"=="clean" (git clean -f -x)

SET "PREFIX1=%PREFIX:\=/%"
set GDAL_HOME=%PREFIX%

if "%COMPILER%" == "MINGW" (
  SET PKG_CONFIG_PATH=/%PREFIX1::=%/lib/pkgconfig
  SET "PATH=%MSYSDIR%;%PREFIX%\bin;%PATH%"
rem set "LIBS=-lspatialite -lsqlite3 -lgeos_c -lfreexl -lexpat -lproj -lxml2 -liconv -lz"
  if NOT EXIST GDALmake.opt (bash -c "./configure %CONFARGS% --without-libtool --disable-static --enable-shared --without-python --with-spatialite=%PREFIX:\=/% --with-expat=%PREFIX:\=/% --with-sqlite3=%PREFIX:\=/% --with-freexl=%PREFIX:\=/" )
  %ER%
rem Build EXEs against DLL, not static .a
  bash -c "sed -i GDALmake.opt -e 's@endif # HAVE_LIBTOOL@endif # HAVE_LIBTOOL\nEXE_DEP_LIBS=$(GDAL_SLIB)@g'"
rem Omit GDAL_ROOT to shorten command line
  bash -c "sed -i GNUmakefile -e 's@\$(GDAL_ROOT)\/@@g'"
  bash -c "make install"
  %ER%
  copy /y %PREFIX%\lib\libgdal.dll %PREFIX%\bin
) else (

if "%COMPILER:32=%"=="%COMPILER%" (
  "%SEDC%" -i nmake.opt -e "s@#WIN64@WIN64@"
)

echo "Using latest cpl_config.h.vc file to support newer compilers"
git checkout origin/HEAD port/cpl_config.h.vc

rem "%SEDC%" -i nmake.opt -e "s@DLLBUILD=1@DLLBUILD=0@"

"%SEDC%" -i nmake.opt -e "s@#SQLITE_INC=.*@SQLITE_INC=-I$(PREFIX)\\\\include -DHAVE_SPATIALITE@"
"%SEDC%" -i nmake.opt -e "s@#SQLITE_LIB=.*@SQLITE_LIB=$(PREFIX)\\\\lib\\\\spatialite.lib $(PREFIX)\\\\lib\\\\geos_c.lib $(PREFIX)\\\\lib\\\\sqlite3.lib@"
"%SEDC%" -i nmake.opt -e "s@#SPATIALITE_412_OR_LATER@SPATIALITE_412_OR_LATER@"

"%SEDC%" -i nmake.opt -e "s@#LIBXML2_INC =.*@LIBXML2_INC = -I$(PREFIX)\\\\include@"
"%SEDC%" -i nmake.opt -e "s@#LIBXML2_LIB =.*@LIBXML2_LIB = $(PREFIX)\\\\lib\\\\libxml2_a.lib@"

"%SEDC%" -i nmake.opt -e "s@#FREEXL_CFLAGS =.*@FREEXL_CFLAGS = -I$(PREFIX)\\\\include@"
"%SEDC%" -i nmake.opt -e "s@#FREEXL_LIBS =.*@FREEXL_LIBS = $(PREFIX)\\\\lib\\\\freexl.lib@"

"%SEDC%" -i nmake.opt -e "s@#LIBICONV_INCLUDE =.*@LIBICONV_INCLUDE = -I$(PREFIX)\\\\include@"
"%SEDC%" -i nmake.opt -e "s@#LIBICONV_LIBRARY =.*@LIBICONV_LIBRARY = $(PREFIX)\\\\lib\\\\iconv.lib@"
"%SEDC%" -i nmake.opt -e "s@#LIBICONV_CFLAGS =.*@LIBICONV_CFLAGS = -DICONV_CONST=const@"

"%SEDC%" -i nmake.opt -e "s@#PROJ_FLAGS =.*@PROJ_FLAGS = -DPROJ_STATIC@"
"%SEDC%" -i nmake.opt -e "s@#PROJ_INCLUDE =.*@PROJ_INCLUDE = -I$(PREFIX)\\\\include@"
"%SEDC%" -i nmake.opt -e "s@#PROJ_LIBRARY =.*@PROJ_LIBRARY = $(PREFIX)\\\\lib\\\\proj.lib@"

"%SEDC%" -i nmake.opt -e "s@ODBC_SUPPORTED = 1@#ODBC_SUPPORTED = 1@"

rem "%SEDC%" -i nmake.opt -e s@#SQLITE_LIB=.*@SQLITE_LIB=\$\(PREFIX\)\\\\lib\\\\sqlite3.lib@"
rem "%SEDC%" -i nmake.opt -e "s@#SQLITE_INC=.*@SQLITE_INC=-I\$\(PREFIX\)\\\\include@"

if "%Variant%" == "Debug" (
   set "DBG=DEBUG=1"
   "%SEDC%" -i nmake.opt -e "s@\/MD @\/MDd @"
) else (
   set DBG
)

nmake -f makefile.vc %DBG%
%ER%
nmake -f makefile.vc %DBG% devinstall
%ER%
ECHO -------------  Installed to %PREFIX%  --------------

cd ..\..

)

add gdal 2.0

add gdal 2.0


@echo off
REM This is really hacky. We should look into using psake...
if not exist "NodaTime Release.snk" (
    echo Cannot build NuGet package without NodaTime Release.snk
    goto :end
)

REM Make sure we can build all the variants
msbuild "src\NodaTime-Tools.sln" /property:Configuration=Release
src\NodaTime.Tools.ProjectBuilder\bin\Release\NodaTime.Tools.ProjectBuilder src
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-pcl.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-net4.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

REM This will also build the unsigned release build. A bit wasteful,
REM but that's okay...
call buildapidocs.bat
IF ERRORLEVEL 1 EXIT /B 1

copy /y docs\PublicApi\NodaTime.xml src\NodaTime\bin\Release
copy /y docs\PublicApi\NodaTime.Testing.xml src\NodaTime.Testing\bin\Release
copy /y docs\PublicApi\NodaTime.Serialization.JsonNet.xml src\NodaTime.Testing\bin\Release

rmdir /s /q nuget
mkdir nuget
pushd nuget
nuget pack ..\src\NodaTime\NodaTime.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Testing\NodaTime.Testing.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Serialization.JsonNet\NodaTime.Serialization.JsonNet.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

popd

:end

@echo off
REM This is really hacky. We should look into using psake...
if not exist "NodaTime Release.snk" (
    echo Cannot build NuGet package without NodaTime Release.snk
    goto :end
)

REM Make sure we can build all the variants
msbuild "src\NodaTime-Tools.sln" /property:Configuration=Release
src\NodaTime.Tools.ProjectBuilder\bin\Release\NodaTime.Tools.ProjectBuilder src
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-pcl.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

msbuild "src\NodaTime-Core-signed-net4.sln" /property:Configuration=Release
IF ERRORLEVEL 1 EXIT /B 1

REM This will also build the unsigned release build. A bit wasteful,
REM but that's okay...
call buildapidocs.bat
IF ERRORLEVEL 1 EXIT /B 1

copy /y docs\PublicApi\NodaTime.xml "src\NodaTime\bin\Signed Release"
copy /y docs\PublicApi\NodaTime.Testing.xml "src\NodaTime.Testing\bin\Signed Release"
copy /y docs\PublicApi\NodaTime.Serialization.JsonNet.xml "src\NodaTime.Testing\bin\Signed Release"

copy /y docs\PublicApi\NodaTime.xml "src\NodaTime\bin\Signed Release Net4"
copy /y docs\PublicApi\NodaTime.Testing.xml "src\NodaTime.Testing\bin\Signed Release Net4"
copy /y docs\PublicApi\NodaTime.Serialization.JsonNet.xml "src\NodaTime.Testing\bin\Signed Release Net4"

rmdir /s /q nuget
mkdir nuget
pushd nuget
nuget pack ..\src\NodaTime\NodaTime.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Testing\NodaTime.Testing.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

nuget pack ..\src\NodaTime.Serialization.JsonNet\NodaTime.Serialization.JsonNet.nuspec -Symbols
IF ERRORLEVEL 1 EXIT /B 1

popd

:end

Use the trimmed XML when building Nuget packages.

Partial fix for issue 263.


REM need separate installation of git, nasm, active perl & visual studio
REM make sure that active perl is before any other perl - git's for example in PATH

set VISUALSTUDIO_VERSION=12.0
set VISUALSTUDIO_VERSION_MAJOR=12
set BOOST_VERSION=1_59_0
set BOOST_VERSION_DOTTED=1.59.0
set OPEN_SSL_VERSION=openssl-1.0.1j

REM set C_ARES_VERSION=1.10.0
REM set CARES_DIR=c-ares-%C_ARES_VERSION%
set CARES_DIR=c-ares

set CURL_VERSION=7.42.1
set ZLIB_VERSION=1.2.8

REM set AVRO_VERSION=1.7.7
REM set AVRO_DIR=avro-cpp-%AVRO_VERSION%
set AVRO_DIR=avro\lang\c++

set LIBEVENT_VERSION=2.0.21
set PTHREAD_VERSION=2-9-1
set JOYENT_HTTP_VERSION=2.3

call "C:\Program Files (x86)\Microsoft Visual Studio %VISUALSTUDIO_VERSION%\VC\vcvarsall.bat" amd64

REM wget ftp://ftp.sunet.se/pub/www/servers/apache/dist/avro/avro-%AVRO_VERSION%/cpp/avro-cpp-%AVRO_VERSION%.tar.gz
REM tar xvf avro-cpp-%AVRO_VERSION%.tar.gz
REM  del avro-cpp-%AVRO_VERSION%.tar.gz
REM until avro changes gets merged

wget http://sourceforge.net/projects/boost/files/boost/%BOOST_VERSION_DOTTED%/boost_%BOOST_VERSION%.tar.gz/download -Oboost_%BOOST_VERSION%.tar.gz
gunzip boost_%BOOST_VERSION%.tar.gz
tar xf boost_%BOOST_VERSION%.tar
del boost_%BOOST_VERSION%.tar

REM wget http://c-ares.haxx.se/download/c-ares-%C_ARES_VERSION%.tar.gz
REM tar xvf c-ares-%C_ARES_VERSION%.tar.gz
REM del c-ares-%C_ARES_VERSION%.tar.gz
REM until badger merges vs2013 support

git clone https://github.com/badger/c-ares.git

git clone https://github.com/google/snappy.git

wget http://curl.haxx.se/download/curl-%CURL_VERSION%.tar.gz
gunzip curl-%CURL_VERSION%.tar.gz
tar xf curl-%CURL_VERSION%.tar
del curl-%CURL_VERSION%.tar

wget --no-check-certificate https://github.com/joyent/http-parser/archive/v%JOYENT_HTTP_VERSION%.tar.gz -Ohttp_parser-v%JOYENT_HTTP_VERSION%.tar.gz
gunzip http_parser-v%JOYENT_HTTP_VERSION%.tar.gz
tar xf http_parser-v%JOYENT_HTTP_VERSION%.tar
del http_parser-v%JOYENT_HTTP_VERSION%.tar

wget --no-check-certificate https://github.com/libevent/libevent/archive/release-%LIBEVENT_VERSION%-stable.tar.gz -Olibevent-%LIBEVENT_VERSION%-stable.tar.gz
gunzip libevent-%LIBEVENT_VERSION%-stable.tar.gz
tar xf libevent-%LIBEVENT_VERSION%-stable.tar
del libevent-%LIBEVENT_VERSION%-stable.tar

wget  http://www.openssl.org/source/%OPEN_SSL_VERSION%.tar.gz
gunzip %OPEN_SSL_VERSION%.tar.gz
tar xf %OPEN_SSL_VERSION%.tar
del %OPEN_SSL_VERSION%.tar

wget ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-%PTHREAD_VERSION%-release.tar.gz
gunzip pthreads-w32-%PTHREAD_VERSION%-release.tar.gz
tar xf pthreads-w32-%PTHREAD_VERSION%-release.tar
del pthreads-w32-%PTHREAD_VERSION%-release.tar

wget http://zlib.net/zlib-%ZLIB_VERSION%.tar.gz
gunzip zlib-%ZLIB_VERSION%.tar.gz
tar xf zlib-%ZLIB_VERSION%.tar
del zlib-%ZLIB_VERSION%.tar

@ECHO BUILDING OPEN_SSL
cd %OPEN_SSL_VERSION%
start /WAIT perl Configure VC-WIN64A --prefix=/OpenSSL-Win64
call ms\do_win64a
nmake -f ms\nt.mak
cd ..

@ECHO BUILDING C-ARES
cd %CARES_DIR%
rmdir /s /q mscv120
rmdir /s /q libs

mkdir libs
mkdir libs\x64
mkdir libs\x64\Debug
mkdir libs\x64\Release

REM needed for git master
call buildconf.bat
nmake -f Makefile.msvc

REM copy static libs to more convenient location for CMake
copy msvc120\cares\lib-debug\libcaresd.lib libs\x64\Debug\libcares.lib
copy msvc120\cares\lib-release\libcares.lib libs\x64\Release\libcares.lib

cd ..
@ECHO DONE WITH C-ARES

@ECHO BUILDING LIBCURL
cd curl-%CURL_VERSION%

rmdir /s /q builds
rmdir /s /q libs

mkdir libs
mkdir libs\x64
mkdir libs\x64\Debug
mkdir libs\x64\Release
mkdir libs\win32
mkdir libs\win32\Debug
mkdir libs\win32\Release

cd winbuild
SET INCLUDE=%INCLUDE%;..\..\%OPEN_SSL_VERSION%\include;..\include;..\..\%CARES_DIR%;..\..\%OPEN_SSL_VERSION%\include\openssl
SET LIB=%LIB%;..\..\%OPEN_SSL_VERSION%\out32;..\..\%CARES_DIR%\msvc120\cares\lib-debug;..\..\%CARES_DIR%\msvc120\cares\lib-release
nmake /f makefile.vc mode=static VC=%VISUALSTUDIO_VERSION_MAJOR% WITH_CARES=static WITH_SSL=static ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no DEBUG=yes MACHINE=x64
nmake /f makefile.vc mode=static VC=%VISUALSTUDIO_VERSION_MAJOR% WITH_CARES=static WITH_SSL=static ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no DEBUG=no MACHINE=x64
cd ..

#non ssl builds
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-debug-static-ipv6\lib\libcurl_a_debug.lib libs\x64\Debug\libcurl.lib
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-release-static-ipv6\lib\libcurl_a.lib libs\x64\Release\libcurl.lib

#ssl static libs
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-debug-static-ssl-static-ipv6\lib\libcurl_a_debug.lib libs\x64\Debug\libcurl.lib
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-release-static-ssl-static-ipv6\lib\libcurl_a.lib libs\x64\Release\libcurl.lib

#ssl /cares static libs
copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-debug-static-ssl-static-cares-static-ipv6\lib\libcurl_a_debug.lib libs\x64\Debug\libcurl.lib
copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-release-static-ssl-static-cares-static-ipv6\lib\libcurl_a.lib libs\x64\Release\libcurl.lib
cd ..

cd ..
@ECHO DONE WITH CURL

@ECHO BUILDING ZLIB
cd zlib-%ZLIB_VERSION%
nmake -f win32/Makefile.msc
cd ..

@ECHO BUILDING LIBEVENT
cd libevent-%LIBEVENT_VERSION%-stable
#./configure --disable-shared
#./configure
#make
#cd ..

@ECHO BUILDING PTHREADS
cd pthreads-w32-%PTHREAD_VERSION%-release
#nmake clean VC-static-debug
#nmake clean VC-static
#test
nmake clean VC
nmake clean VC-debug
cd ..

@ECHO BUILDING BOOST
cd boost_%BOOST_VERSION%
rmdir /s /q bin.v2
REM call "C:\Program Files (x86)\Microsoft Visual Studio %VISUALSTUDIO_VERSION%\VC\vcvarsall.bat" amd64
call bootstrap.bat
#b2 -j 4 -toolset=msvc-%VISUALSTUDIO_VERSION% address-model=64 --build-type=complete --stagedir=lib\x64 stage -s ZLIB_INCLUDE=%CD%\..\zlib-%ZLIB_VERSION% -s ZLIB_LIBPATH=%CD%\..\zlib-%ZLIB_VERSION%
b2 -j 8 -toolset=msvc-%VISUALSTUDIO_VERSION% address-model=64 --build-type=complete --stagedir=lib\x64 stage -s ZLIB_SOURCE=%CD%\..\zlib-%ZLIB_VERSION%
rmdir /s /q bin.v2
cd ..

REM need separate installation of git, nasm, active perl & visual studio
REM make sure that active perl is before any other perl - git's for example in PATH

set VISUALSTUDIO_VERSION=12.0
set VISUALSTUDIO_VERSION_MAJOR=12
set BOOST_VERSION=1_59_0
set BOOST_VERSION_DOTTED=1.59.0
set OPEN_SSL_VERSION=openssl-1.0.1j

REM set C_ARES_VERSION=1.10.0
REM set CARES_DIR=c-ares-%C_ARES_VERSION%
set CARES_DIR=c-ares-master

set CURL_VERSION=7.42.1
set ZLIB_VERSION=1.2.8

REM set AVRO_VERSION=1.7.7
REM set AVRO_DIR=avro-cpp-%AVRO_VERSION%
set AVRO_DIR=avro\lang\c++

set LIBEVENT_VERSION=2.0.21
set PTHREAD_VERSION=2-9-1
set JOYENT_HTTP_VERSION=2.3

call "C:\Program Files (x86)\Microsoft Visual Studio %VISUALSTUDIO_VERSION%\VC\vcvarsall.bat" amd64

REM wget ftp://ftp.sunet.se/pub/www/servers/apache/dist/avro/avro-%AVRO_VERSION%/cpp/avro-cpp-%AVRO_VERSION%.tar.gz
REM tar xvf avro-cpp-%AVRO_VERSION%.tar.gz
REM  del avro-cpp-%AVRO_VERSION%.tar.gz
REM until avro changes gets merged

wget http://sourceforge.net/projects/boost/files/boost/%BOOST_VERSION_DOTTED%/boost_%BOOST_VERSION%.tar.gz/download -Oboost_%BOOST_VERSION%.tar.gz
gunzip boost_%BOOST_VERSION%.tar.gz
tar xf boost_%BOOST_VERSION%.tar
del boost_%BOOST_VERSION%.tar

REM wget http://c-ares.haxx.se/download/c-ares-%C_ARES_VERSION%.tar.gz
REM tar xvf c-ares-%C_ARES_VERSION%.tar.gz
REM del c-ares-%C_ARES_VERSION%.tar.gz
REM until badger merges vs2013 support

wget --no-check-certificate https://github.com/bagder/c-ares/archive/master.zip  -Oc-ares.zip
unzip c-ares.zip
del c-ares.zip

git clone https://github.com/google/snappy.git

wget http://curl.haxx.se/download/curl-%CURL_VERSION%.tar.gz
gunzip curl-%CURL_VERSION%.tar.gz
tar xf curl-%CURL_VERSION%.tar
del curl-%CURL_VERSION%.tar

wget --no-check-certificate https://github.com/joyent/http-parser/archive/v%JOYENT_HTTP_VERSION%.tar.gz -Ohttp_parser-v%JOYENT_HTTP_VERSION%.tar.gz
gunzip http_parser-v%JOYENT_HTTP_VERSION%.tar.gz
tar xf http_parser-v%JOYENT_HTTP_VERSION%.tar
del http_parser-v%JOYENT_HTTP_VERSION%.tar

wget --no-check-certificate https://github.com/libevent/libevent/archive/release-%LIBEVENT_VERSION%-stable.tar.gz -Olibevent-%LIBEVENT_VERSION%-stable.tar.gz
gunzip libevent-%LIBEVENT_VERSION%-stable.tar.gz
tar xf libevent-%LIBEVENT_VERSION%-stable.tar
del libevent-%LIBEVENT_VERSION%-stable.tar

wget  http://www.openssl.org/source/%OPEN_SSL_VERSION%.tar.gz
gunzip %OPEN_SSL_VERSION%.tar.gz
tar xf %OPEN_SSL_VERSION%.tar
del %OPEN_SSL_VERSION%.tar

wget ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-%PTHREAD_VERSION%-release.tar.gz
gunzip pthreads-w32-%PTHREAD_VERSION%-release.tar.gz
tar xf pthreads-w32-%PTHREAD_VERSION%-release.tar
del pthreads-w32-%PTHREAD_VERSION%-release.tar

wget http://zlib.net/zlib-%ZLIB_VERSION%.tar.gz
gunzip zlib-%ZLIB_VERSION%.tar.gz
tar xf zlib-%ZLIB_VERSION%.tar
del zlib-%ZLIB_VERSION%.tar

@ECHO BUILDING OPEN_SSL
cd %OPEN_SSL_VERSION%
start /WAIT perl Configure VC-WIN64A --prefix=/OpenSSL-Win64
call ms\do_win64a
nmake -f ms\nt.mak
cd ..

@ECHO BUILDING C-ARES
cd %CARES_DIR%
rmdir /s /q mscv120
rmdir /s /q libs

mkdir libs
mkdir libs\x64
mkdir libs\x64\Debug
mkdir libs\x64\Release

REM needed for git master
call buildconf.bat
nmake -f Makefile.msvc

REM copy static libs to more convenient location for CMake
copy msvc120\cares\lib-debug\libcaresd.lib libs\x64\Debug\libcares.lib
copy msvc120\cares\lib-release\libcares.lib libs\x64\Release\libcares.lib

cd ..
@ECHO DONE WITH C-ARES

@ECHO BUILDING LIBCURL
cd curl-%CURL_VERSION%

rmdir /s /q builds
rmdir /s /q libs

mkdir libs
mkdir libs\x64
mkdir libs\x64\Debug
mkdir libs\x64\Release
mkdir libs\win32
mkdir libs\win32\Debug
mkdir libs\win32\Release

cd winbuild
SET INCLUDE=%INCLUDE%;..\..\%OPEN_SSL_VERSION%\include;..\include;..\..\%CARES_DIR%;..\..\%OPEN_SSL_VERSION%\include\openssl
SET LIB=%LIB%;..\..\%OPEN_SSL_VERSION%\out32;..\..\%CARES_DIR%\msvc120\cares\lib-debug;..\..\%CARES_DIR%\msvc120\cares\lib-release
nmake /f makefile.vc mode=static VC=%VISUALSTUDIO_VERSION_MAJOR% WITH_CARES=static WITH_SSL=static ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no DEBUG=yes MACHINE=x64
nmake /f makefile.vc mode=static VC=%VISUALSTUDIO_VERSION_MAJOR% WITH_CARES=static WITH_SSL=static ENABLE_SSPI=no ENABLE_WINSSL=no ENABLE_IDN=no DEBUG=no MACHINE=x64
cd ..

#non ssl builds
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-debug-static-ipv6\lib\libcurl_a_debug.lib libs\x64\Debug\libcurl.lib
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-release-static-ipv6\lib\libcurl_a.lib libs\x64\Release\libcurl.lib

#ssl static libs
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-debug-static-ssl-static-ipv6\lib\libcurl_a_debug.lib libs\x64\Debug\libcurl.lib
#copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-release-static-ssl-static-ipv6\lib\libcurl_a.lib libs\x64\Release\libcurl.lib

#ssl /cares static libs
copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-debug-static-ssl-static-cares-static-ipv6\lib\libcurl_a_debug.lib libs\x64\Debug\libcurl.lib
copy builds\libcurl-vc%VISUALSTUDIO_VERSION_MAJOR%-x64-release-static-ssl-static-cares-static-ipv6\lib\libcurl_a.lib libs\x64\Release\libcurl.lib
cd ..

cd ..
@ECHO DONE WITH CURL

@ECHO BUILDING ZLIB
cd zlib-%ZLIB_VERSION%
nmake -f win32/Makefile.msc
cd ..

@ECHO BUILDING LIBEVENT
cd libevent-%LIBEVENT_VERSION%-stable
#./configure --disable-shared
#./configure
#make
#cd ..

@ECHO BUILDING PTHREADS
cd pthreads-w32-%PTHREAD_VERSION%-release
#nmake clean VC-static-debug
#nmake clean VC-static
#test
nmake clean VC
nmake clean VC-debug
cd ..

@ECHO BUILDING BOOST
cd boost_%BOOST_VERSION%
rmdir /s /q bin.v2
REM call "C:\Program Files (x86)\Microsoft Visual Studio %VISUALSTUDIO_VERSION%\VC\vcvarsall.bat" amd64
call bootstrap.bat
#b2 -j 4 -toolset=msvc-%VISUALSTUDIO_VERSION% address-model=64 --build-type=complete --stagedir=lib\x64 stage -s ZLIB_INCLUDE=%CD%\..\zlib-%ZLIB_VERSION% -s ZLIB_LIBPATH=%CD%\..\zlib-%ZLIB_VERSION%
b2 -j 8 -toolset=msvc-%VISUALSTUDIO_VERSION% address-model=64 --build-type=complete --stagedir=lib\x64 stage -s ZLIB_SOURCE=%CD%\..\zlib-%ZLIB_VERSION%
rmdir /s /q bin.v2
cd ..

replace csi local c-ares with c-ares:master


upx --brute lfa1.exe ekko.exe ekpo.exe t024.exe t024e.exe tcurr.exe zstxl.exe mara.exe

@echo off
echo "Compressing binary using UPX"
upx -k --brute lfa1.exe ekko.exe ekpo.exe t024.exe t024e.exe tcurr.exe zstxl.exe mara.exe

add echo off

add echo off


@echo off

:: Init Script for cmd.exe
:: Created as part of cmder project

:: !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
:: !!! Use "%CMDER_ROOT%\config\user-profile.cmd" to add your own startup commands

:: Set to > 0 for verbose output to aid in debugging.
if not defined verbose-output ( set verbose-output=0 )

:: Find root dir
if not defined CMDER_ROOT (
    for /f "delims=" %%i in ("%ConEmuDir%\..\..") do set "CMDER_ROOT=%%~fi"
)

:: Remove trailing '\'
if "%CMDER_ROOT:~-1%" == "\" SET "CMDER_ROOT=%CMDER_ROOT:~0,-1%"

:: Pick right version of clink
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
    set architecture=86
) else (
    set architecture=64
)

:: Tell the user about the clink config files...
if not exist "%CMDER_ROOT%\config\settings" (
    echo Generating clink initial settings in "%CMDER_ROOT%\config\settings"
    echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup.
)

:: Run clink
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"

:: Prepare for git-for-windows

:: I do not even know, copypasted from their .bat
set PLINK_PROTOCOL=ssh
if not defined TERM set TERM=cygwin

:: The idea:
:: * if the users points as to a specific git, use that
:: * test if a git is in path and if yes, use that
:: * last, use our vendored git
:: also check that we have a recent enough version of git (e.g. test for GIT\cmd\git.exe)
if defined GIT_INSTALL_ROOT (
    if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" (goto :FOUND_GIT)
)

:: check if git is in path...
setlocal enabledelayedexpansion
for /F "delims=" %%F in ('where git.exe 2^>nul') do @(
    pushd %%~dpF
    cd ..
    set "test_dir=!CD!"
    popd
    if exist "!test_dir!\cmd\git.exe" (
        set "GIT_INSTALL_ROOT=!test_dir!"
        set test_dir=
        goto :FOUND_GIT
    ) else (
        echo Found old git version in "!test_dir!", but not using...
        set test_dir=
    )
)

:: our last hope: our own git...
:VENDORED_GIT
if exist "%CMDER_ROOT%\vendor\git-for-windows" (
    set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
    call :verbose-output Add the minimal git commands to the front of the path
    set "PATH=!GIT_INSTALL_ROOT!\cmd;%PATH%"
) else (
    goto :NO_GIT
)

:FOUND_GIT
:: Add git to the path
if defined GIT_INSTALL_ROOT (
    rem add the unix commands at the end to not shadow windows commands like more
    call :verbose-output Enhancing PATH with unix commands from git in "%GIT_INSTALL_ROOT%\usr\bin"
    set "PATH=%PATH%;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74"
    :: define SVN_SSH so we can use git svn with ssh svn repositories
    if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
)

:NO_GIT
endlocal & set "PATH=%PATH%" & set "SVN_SSH=%SVN_SSH%" & set "GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%"

:: Enhance Path
set "PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\"

:: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d"
:: to run them at startup.
if not exist "%CMDER_ROOT%\config\profile.d" (
  mkdir "%CMDER_ROOT%\config\profile.d"
)

pushd "%CMDER_ROOT%\config\profile.d"
for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do (
  call :verbose-output Calling "%CMDER_ROOT%\config\profile.d\%%x"...
  call "%CMDER_ROOT%\config\profile.d\%%x"
)
popd

:: Allows user to override default aliases store using profile.d
:: scripts run above by setting the 'aliases' env variable.
::
:: Note: If overriding default aliases store file the aliases
:: must also be self executing, see '.\user-aliases.cmd.example',
:: and be in profile.d folder.
set "user-aliases=%CMDER_ROOT%\config\user-aliases.cmd"

:: The aliases environment variable is used by alias.bat to id
:: the default file to store new aliases in.
if not defined aliases (
  set "aliases=%user-aliases%"
)

:: Make sure we have a self-extracting user-aliases.cmd file
setlocal enabledelayedexpansion
if not exist "%user-aliases%" (
    echo Creating intial user-aliases store in "%user-aliases%"...
    copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
) else (
    type "%user-aliases%" | findstr /i ";= Add aliases below here" >nul
    if "!errorlevel!" == "1" (
        echo Creating intial user-aliases store in "%user-aliases%"...
        copy "%CMDER_ROOT%\%user-aliases%" "%user-aliases%.old_format"
        copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
    )
)

:: Update old 'user-aliases' to new self executing 'user-aliases.cmd'
if exist "%CMDER_ROOT%\config\aliases" (
  echo Updating old "%CMDER_ROOT%\config\aliases" to new format...
  type "%CMDER_ROOT%\config\aliases" >> "%user-aliases%" && del "%CMDER_ROOT%\config\aliases"
) else if exist "%user-aliases%.old_format" (
  echo Updating old "%user-aliases%" to new format...
  type "%user-aliases%.old_format" >> "%user-aliases%" && del "%user-aliases%.old_format"
)
endlocal
:: Add aliases to the environment
call "%user-aliases%"

:: See vendor\git-for-windows\README.portable for why we do this
:: Basically we need to execute this post-install.bat because we are
:: manually extracting the archive rather than executing the 7z sfx
if exist "%CMDER_ROOT%\vendor\git-for-windows\post-install.bat" (
    call :verbose-output Running Git for Windows one time Post Install....
    cd /d "%CMDER_ROOT%\vendor\git-for-windows\"
    "%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe" --no-needs-console --hide --no-cd --command=post-install.bat
    cd /d %USERPROFILE%
)

:: Set home path
if not defined HOME set "HOME=%USERPROFILE%"

:: This is either a env variable set by the user or the result of
:: cmder.exe setting this variable due to a commandline argument or a "cmder here"
if defined CMDER_START (
    cd /d "%CMDER_START%"
)

if exist "%CMDER_ROOT%\config\user-profile.cmd" (
    REM Create this file and place your own command in there
    call "%CMDER_ROOT%\config\user-profile.cmd"
) else (
    echo Creating user startup file: "%CMDER_ROOT%\config\user-profile.cmd"
    (
    echo :: use this file to run your own startup commands
    echo :: use  in front of the command to prevent printing the command
    echo.
    echo :: call "%%GIT_INSTALL_ROOT%%/cmd/start-ssh-agent.cmd"
    echo :: set "PATH=%%CMDER_ROOT%%\vendor\whatever;%%PATH%%"
    echo.
    ) > "%CMDER_ROOT%\config\user-profile.cmd"
)

exit /b

::
:: sub-routines below here
::
:verbose-output
    if %verbose-output% gtr 0 echo %*
    exit /b

@echo off

:: Init Script for cmd.exe
:: Created as part of cmder project

:: !!! THIS FILE IS OVERWRITTEN WHEN CMDER IS UPDATED
:: !!! Use "%CMDER_ROOT%\config\user-profile.cmd" to add your own startup commands

:: Set to > 0 for verbose output to aid in debugging.
if not defined verbose-output ( set verbose-output=0 )

:: Find root dir
if not defined CMDER_ROOT (
    for /f "delims=" %%i in ("%ConEmuDir%\..\..") do set "CMDER_ROOT=%%~fi"
)

:: Remove trailing '\'
if "%CMDER_ROOT:~-1%" == "\" SET "CMDER_ROOT=%CMDER_ROOT:~0,-1%"

:: Pick right version of clink
if "%PROCESSOR_ARCHITECTURE%"=="x86" (
    set architecture=86
) else (
    set architecture=64
)

:: Tell the user about the clink config files...
if not exist "%CMDER_ROOT%\config\settings" (
    set clink.history_io=3
    echo Generating clink initial settings in "%CMDER_ROOT%\config\settings"
    echo Additional *.lua files in "%CMDER_ROOT%\config" are loaded on startup.
)

:: Run clink
"%CMDER_ROOT%\vendor\clink\clink_x%architecture%.exe" inject --quiet --profile "%CMDER_ROOT%\config" --scripts "%CMDER_ROOT%\vendor"

:: Prepare for git-for-windows

:: I do not even know, copypasted from their .bat
set PLINK_PROTOCOL=ssh
if not defined TERM set TERM=cygwin

:: The idea:
:: * if the users points as to a specific git, use that
:: * test if a git is in path and if yes, use that
:: * last, use our vendored git
:: also check that we have a recent enough version of git (e.g. test for GIT\cmd\git.exe)
if defined GIT_INSTALL_ROOT (
    if exist "%GIT_INSTALL_ROOT%\cmd\git.exe" (goto :FOUND_GIT)
)

:: check if git is in path...
setlocal enabledelayedexpansion
for /F "delims=" %%F in ('where git.exe 2^>nul') do @(
    pushd %%~dpF
    cd ..
    set "test_dir=!CD!"
    popd
    if exist "!test_dir!\cmd\git.exe" (
        set "GIT_INSTALL_ROOT=!test_dir!"
        set test_dir=
        goto :FOUND_GIT
    ) else (
        echo Found old git version in "!test_dir!", but not using...
        set test_dir=
    )
)

:: our last hope: our own git...
:VENDORED_GIT
if exist "%CMDER_ROOT%\vendor\git-for-windows" (
    set "GIT_INSTALL_ROOT=%CMDER_ROOT%\vendor\git-for-windows"
    call :verbose-output Add the minimal git commands to the front of the path
    set "PATH=!GIT_INSTALL_ROOT!\cmd;%PATH%"
) else (
    goto :NO_GIT
)

:FOUND_GIT
:: Add git to the path
if defined GIT_INSTALL_ROOT (
    rem add the unix commands at the end to not shadow windows commands like more
    call :verbose-output Enhancing PATH with unix commands from git in "%GIT_INSTALL_ROOT%\usr\bin"
    set "PATH=%PATH%;%GIT_INSTALL_ROOT%\usr\bin;%GIT_INSTALL_ROOT%\usr\share\vim\vim74"
    :: define SVN_SSH so we can use git svn with ssh svn repositories
    if not defined SVN_SSH set "SVN_SSH=%GIT_INSTALL_ROOT:\=\\%\\bin\\ssh.exe"
)

:NO_GIT
endlocal & set "PATH=%PATH%" & set "SVN_SSH=%SVN_SSH%" & set "GIT_INSTALL_ROOT=%GIT_INSTALL_ROOT%"

:: Enhance Path
set "PATH=%CMDER_ROOT%\bin;%PATH%;%CMDER_ROOT%\"

:: Drop *.bat and *.cmd files into "%CMDER_ROOT%\config\profile.d"
:: to run them at startup.
if not exist "%CMDER_ROOT%\config\profile.d" (
  mkdir "%CMDER_ROOT%\config\profile.d"
)

pushd "%CMDER_ROOT%\config\profile.d"
for /f "usebackq" %%x in ( `dir /b *.bat *.cmd 2^>nul` ) do (
  call :verbose-output Calling "%CMDER_ROOT%\config\profile.d\%%x"...
  call "%CMDER_ROOT%\config\profile.d\%%x"
)
popd

:: Allows user to override default aliases store using profile.d
:: scripts run above by setting the 'aliases' env variable.
::
:: Note: If overriding default aliases store file the aliases
:: must also be self executing, see '.\user-aliases.cmd.example',
:: and be in profile.d folder.
set "user-aliases=%CMDER_ROOT%\config\user-aliases.cmd"

:: The aliases environment variable is used by alias.bat to id
:: the default file to store new aliases in.
if not defined aliases (
  set "aliases=%user-aliases%"
)

:: Make sure we have a self-extracting user-aliases.cmd file
setlocal enabledelayedexpansion
if not exist "%user-aliases%" (
    echo Creating intial user-aliases store in "%user-aliases%"...
    copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
) else (
    type "%user-aliases%" | findstr /i ";= Add aliases below here" >nul
    if "!errorlevel!" == "1" (
        echo Creating intial user-aliases store in "%user-aliases%"...
        copy "%CMDER_ROOT%\%user-aliases%" "%user-aliases%.old_format"
        copy "%CMDER_ROOT%\vendor\user-aliases.cmd.example" "%user-aliases%"
    )
)

:: Update old 'user-aliases' to new self executing 'user-aliases.cmd'
if exist "%CMDER_ROOT%\config\aliases" (
  echo Updating old "%CMDER_ROOT%\config\aliases" to new format...
  type "%CMDER_ROOT%\config\aliases" >> "%user-aliases%" && del "%CMDER_ROOT%\config\aliases"
) else if exist "%user-aliases%.old_format" (
  echo Updating old "%user-aliases%" to new format...
  type "%user-aliases%.old_format" >> "%user-aliases%" && del "%user-aliases%.old_format"
)
endlocal
:: Add aliases to the environment
call "%user-aliases%"

:: See vendor\git-for-windows\README.portable for why we do this
:: Basically we need to execute this post-install.bat because we are
:: manually extracting the archive rather than executing the 7z sfx
if exist "%CMDER_ROOT%\vendor\git-for-windows\post-install.bat" (
    call :verbose-output Running Git for Windows one time Post Install....
    cd /d "%CMDER_ROOT%\vendor\git-for-windows\"
    "%CMDER_ROOT%\vendor\git-for-windows\git-bash.exe" --no-needs-console --hide --no-cd --command=post-install.bat
    cd /d %USERPROFILE%
)

:: Set home path
if not defined HOME set "HOME=%USERPROFILE%"

:: This is either a env variable set by the user or the result of
:: cmder.exe setting this variable due to a commandline argument or a "cmder here"
if defined CMDER_START (
    cd /d "%CMDER_START%"
)

if exist "%CMDER_ROOT%\config\user-profile.cmd" (
    REM Create this file and place your own command in there
    call "%CMDER_ROOT%\config\user-profile.cmd"
) else (
    echo Creating user startup file: "%CMDER_ROOT%\config\user-profile.cmd"
    (
    echo :: use this file to run your own startup commands
    echo :: use  in front of the command to prevent printing the command
    echo.
    echo :: call "%%GIT_INSTALL_ROOT%%/cmd/start-ssh-agent.cmd"
    echo :: set "PATH=%%CMDER_ROOT%%\vendor\whatever;%%PATH%%"
    echo.
    ) > "%CMDER_ROOT%\config\user-profile.cmd"
)

exit /b

::
:: sub-routines below here
::
:verbose-output
    if %verbose-output% gtr 0 echo %*
    exit /b

Set history_io=3 in default Clink settings

Currently the "history" command in Cmder prints commands without any index associated with any command, so you can copy/paste a command or use "!!" to execute a command from the history but, unlike BASH, you can't do "!<command_index>".

"cat" has a switch, "-n", which prints line numbers of the file being printed. This, in conjunction with "history_io=3" in Clink settings (to read/write history when editing a command") works just like BASH, i.e., you can use the index printed next to a command in the history to execute that command as "!<command_index>".


setlocal
pushd %~dp0
set msBuildDir=%WINDIR%\Microsoft.NET\Framework\v4.0.30319

call %msBuildDir%\msbuild.exe  ClientKit\ClientKit.csproj /p:Configuration=Release20 /p:OutputPath=..\Managed-OSVR-Unity /p:NativeOutputSuffix32=x86 /p:NativeOutputSuffix64=x86_64%*
endlocal

Add a batch file to build for Unity (release 2.0, with alternate output directories)


:: Launch the MyLittlePony website every hour in Kiosk mode (full-screen, all controls except alt-f4 disabled)
schtasks /create /sc hourly /tn MyLittlePony /tr "%ProgramFiles(x86)%\Internet Explorer\iexplore.exe -k https://mylittlepony.hasbro.com/en-us"

:: Launch the MyLittlePony website every 5 minutes in Kiosk mode (full-screen, all controls except alt-f4 disabled)
schtasks /create /sc minute /MO 5 /tn MyLittlePony /tr "%ProgramFiles(x86)%\Internet Explorer\iexplore.exe -k https://mylittlepony.hasbro.com/en-us"

:: Launch the Windows93 website every hour in Kiosk mode (full-screen, all controls except alt-f4 disabled)
schtasks /create /sc hourly /tn Windows93 /tr "%ProgramFiles(x86)%\Internet Explorer\iexplore.exe -k http://windows93.net"

Create MyLittlePony.bat

Create MyLittlePony.bat


@Echo Off
SET forgeVer=10.13.0.1199
:DLForge
IF NOT EXIST "%CD%\forge-1.7.10-%forgeVer%-src.zip" (
	wget -c --no-check-certificate --no-cookies "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-%forgeVer%/forge-1.7.10-%forgeVer%-src.zip" -O forge-1.7.10-%forgeVer%-src.zip
) ELSE (
	GOTO DLJDK
)
:DLJDK
IF NOT EXIST "%CD%\jdk-.zip" (
	wget -c --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u65-b19/jdk-7u65-windows-i586.exe" -O jdk-.zip
) ELSE (
	GOTO DLEclipse
)
:DLEclipse
IF NOT EXIST "%CD%\eclipse.zip" (wget -c --no-check-certificate --no-cookies "http://download.eclipse.org/technology/epp/downloads/release/luna/R/eclipse-jee-luna-R-win32-x86_64.zip" -O eclipse.zip
) ELSE (
	GOTO XForge
)
:XForge
IF NOT EXIST "%CD%\forge-1.7.10-src" (
	7z x forge-1.7.10-%forgeVer%-src.zip -oforge-1.7.10-src
) ELSE (
	GOTO XEclipse
)
:XEclipse
IF NOT EXIST "%CD%\eclipse" (
	7z x eclipse.zip
) ELSE (
	GOTO XJDK
)
:XJDK
IF NOT EXIST "%CD%\jdk" (
	7z x jdk-*.zip & MOVE /Y %CD%\tools.zip jdk.zip & 7z x jdk.zip -ojdk & DEL /Q %CD%\jdk.zip & GOTO UnpackJDK
) ELSE (
	GOTO ForgeSetup
)
:UnpackJDK
for /r %%x in (*.pack) do %CD%\jdk\bin\unpack200 -r "%%x" "%%~dx%%~px%%~nx.jar"
SETX JAVA_HOME "%CD%\jdk"
SETX PATH "%JAVA_HOME%\bin"
:ForgeSetup
IF EXIST "%CD%\forge-1.7.10-src" (
	PUSHD %CD%\forge-1.7.10-src & GOTO setupWorkspace
)
:setupWorkspace
IF NOT EXIST "%CD%\build" (
	%CD%\gradlew setupDecompWorkspace & %CD%\gradlew setupDevWorkspace & %CD%\gradlew eclipse & POPD & %COMSPEC% /c %CD%\..\StartEclipse.vbs
) ELSE (
	POPD & %COMSPEC% /c %CD%\..\StartEclipse.vbs
)

@Echo Off
SET forgeVer=10.13.0.1199
:DLForge
IF NOT EXIST "%CD%\forge-1.7.10-%forgeVer%-src.zip" (
	wget -c --no-check-certificate --no-cookies "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.7.10-%forgeVer%/forge-1.7.10-%forgeVer%-src.zip" -O forge-1.7.10-%forgeVer%-src.zip
) ELSE (
	GOTO DLJDK
)
:DLJDK
IF NOT EXIST "%CD%\jdk-.zip" (
	wget -c --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u65-b19/jdk-7u65-windows-i586.exe" -O jdk-.zip
) ELSE (
	GOTO DLEclipse
)
:DLEclipse
IF NOT EXIST "%CD%\eclipse.zip" (wget -c --no-check-certificate --no-cookies "http://download.eclipse.org/technology/epp/downloads/release/luna/R/eclipse-jee-luna-R-win32-x86_64.zip" -O eclipse.zip
) ELSE (
	GOTO XForge
)
:XForge
IF NOT EXIST "%CD%\forge-1.7.10-src" (
	7z x forge-1.7.10-%forgeVer%-src.zip -oforge-1.7.10-src
) ELSE (
	GOTO XEclipse
)
:XEclipse
IF NOT EXIST "%CD%\eclipse" (
	7z x eclipse.zip
) ELSE (
	GOTO XJDK
)
:XJDK
IF NOT EXIST "%CD%\jdk" (
	7z x jdk-*.zip & MOVE /Y %CD%\tools.zip jdk.zip & 7z x jdk.zip -ojdk & DEL /Q %CD%\jdk.zip & GOTO UnpackJDK
) ELSE (
	GOTO ForgeSetup
)
:UnpackJDK
for /r %%x in (*.pack) do %CD%\jdk\bin\unpack200 -r "%%x" "%%~dx%%~px%%~nx.jar"
SET JAVA_HOME=.\jdk

:ForgeSetup
IF EXIST "%CD%\forge-1.7.10-src" (
	PUSHD %CD%\forge-1.7.10-src & GOTO setupWorkspace
)
:setupWorkspace
SET JAVA_HOME=..\jdk
IF NOT EXIST "%CD%\build" (
	%CD%\gradlew setupDecompWorkspace & %CD%\gradlew setupDevWorkspace & %CD%\gradlew eclipse & POPD & %COMSPEC% /c %CD%\..\StartEclipse.vbs
) ELSE (
	POPD & %COMSPEC% /c %CD%\..\StartEclipse.vbs
)

Set Java home

Set Java home


@CALL ..\setenv.bat

@MKDIR target\classes
@javac -classpath target/classes -d target/classes src/main/java/jpt/app01/data/*.java src/main/java/jpt/app01/*.java
@XCOPY src\main\resources target\classes /S /I /Y

fix(apps/app01): add missing resource copying for Windows