@REM -------------------------------------------------------------------------
@REM
@REM  This script provides x86 Ryujit test environment settings
@REM
@REM -------------------------------------------------------------------------

set COMPLUS_AltJit=*
set COMPLUS_AltJitName=protojit.dll
set COMPLUS_NoGuiOnAssert=1

@REM By default, do not set COMPLUS_AltJitAssertOnNYI=1. This allows us to compile
@REM as much as possible with RyuJIT, and not just stop at the first NYI. It means
@REM we will fall back to x86 legacy JIT for many functions.
@REM set COMPLUS_AltJitAssertOnNYI=1

@REM -------------------------------------------------------------------------
@REM A JitFuncInfoLogFile is a per-function record of which functions were
@REM compiled, and what asserts and NYI were hit.
@REM
@REM If you wish to collect FuncInfo, choose one of the following collection
@REM methods to use, by uncommenting the appropriate option.

@REM Option 1: collect a single FuncInfoLogFile for all tests.
@REM TO DO: set a single, fully-qualified pathname here.
@REM ==== Uncomment below
@REM set COMPLUS_JitFuncInfoLogFile=%TEMP%\JitFuncInfoLogFile.txt
@REM ==== Uncomment above

@REM Option #2: collect one FuncInfoLogFile per test, and put it in
@REM the same directory as the test. Note that each tests lives in
@REM its own directory, and the current directory is set to the unique
@REM test directory before this script is invoked.
@REM ==== Uncomment below
@REM set __TestDir=%CD%
@REM if %__TestDir:~-1%==\ set __TestDir=%__TestDir:~0,-1%
@REM set COMPLUS_JitFuncInfoLogFile=%__TestDir%\FuncInfo.txt
@REM ==== Uncomment above

@REM Option #3: collect one FuncInfoLogFile per test, and put all of
@REM them in a separate directory tree rooted at %__FuncInfoRootDir%.
@REM If that is set globally already, then use it. Otherwise, use a
@REM default set here. The directory tree will mirror the test binary tree.
@REM Note that the current directory is set to the unique test directory
@REM before this script is invoked.
@REM ==== Uncomment below
@REM if not defined __FuncInfoRootDir set __FuncInfoRootDir=c:\FuncInfos
@REM set __TestDir=%CD%
@REM if %__TestDir:~-1%==\ set __TestDir=%__TestDir:~0,-1%
@REM if %__TestDir:~1,1%==: set __TestDir=%__TestDir:~3%
@REM set __FuncInfoDir=%__FuncInfoRootDir%\%__TestDir%
@REM if not exist %__FuncInfoDir% mkdir %__FuncInfoDir%
@REM set COMPLUS_JitFuncInfoLogFile=%__FuncInfoDir%\FuncInfo.txt
@REM ==== Uncomment above

@REM -------------------------------------------------------------------------

Add support for easily collecting JitFuncInfoLogFile for the tests

Simply uncomment one of the three methods for doing the collection in
the ryujit_x86_testenv.cmd file.


MKDIR build\windows
CD build\windows

cmake ..\.. ^
        -G "%CMAKE_GENERATOR%" ^
        -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
        -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
        -DBUILD_STATIC_LIBS=1 ^
        -DBUILD_SHARED_LIBS=1

ECHO VS files have been generated in build\windows

cmake --build . --config Release

MKDIR build\windows
CD build\windows

cmake ..\.. ^
        -G "%CMAKE_GENERATOR%" ^
        -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
        -DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
        -DBUILD_STATIC_LIBS=1 ^
        -DBUILD_SHARED_LIBS=1

ECHO VS files have been generated in build\windows

dir

cmake --build . --config Release --target ALL_BUILD
cmake --build . --config Release --target ZERO_CHECK

add ALL_BUILD and ZERO_CHECK

add ALL_BUILD and ZERO_CHECK


erl -pa ebin -noshell -run db_hash_reader_sup start_standalone localhost 27017 10

erl -pa ebin -noshell -run hash_reader_sup start_standalone localhost 27017 10

change hash_reader shell startup script

change hash_reader shell startup script


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

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

Update extract_includes.bat to include new public headers in rev 120.


@echo off
REM
REM Popcorn Micro-Framework Windows CLI script
REM

SET TAR=
SET ZIP=
SET EXT=
SET CMD=
FOR /f "delims=" %%i IN ('where tar') DO SET TAR=%%i
FOR /f "delims=" %%i IN ('where zip') DO SET ZIP=%%i

IF "%TAR" == "" (
    SET EXT=.tar.gz
    SET CMD=tar -C ../vendor/Popcorn/src/Pop -xpf
) ELSE IF NOT "%ZIP" == "" (
    SET EXT=.zip
    SET CMD=unzip -q -d ../vendor/Popcorn/src/Pop
) ELSE (
    echo You need at least the TAR or ZIP program to install the components.
    exit /b
)

SET SCRIPT_DIR=%~dp0
php %SCRIPT_DIR%pop.php %EXT% %*

IF "%1" == "install" (
    IF NOT "%2" == "" (
        IF "%2" == "all" (
            SET TESTFILE=..\vendor\Popcorn\src\Pop\Archive%EXT%
        ) ELSE (
            SET TEMPFILE=%2%
            SET TESTFILE=..\vendor\Popcorn\src\Pop\%TEMPFILE%%EXT%
        )
        IF EXIST %TESTFILE% (
            FOR /f "delims=" %%i IN ('dir /B ..\vendor\Popcorn\src\Pop\*%EXT%') DO (
                echo Unpacking %%i...
                %CMD% ../vendor/Popcorn/src/Pop/%%i
                del ..\vendor\Popcorn\src\Pop\%%i
            )
            echo Complete!
        )
    )
)

@echo off
REM
REM Popcorn Micro-Framework Windows CLI script
REM

SET TAR=
SET ZIP=
SET EXT=
SET CMD=
FOR /f "delims=" %%i IN ('where tar') DO SET TAR=%%i
FOR /f "delims=" %%i IN ('where zip') DO SET ZIP=%%i

IF "%TAR" == "" (
    SET EXT=.tar.gz
    SET CMD=tar -C ../vendor/Popcorn/src/Pop -xpf
) ELSE IF NOT "%ZIP" == "" (
    SET EXT=.zip
    SET CMD=unzip -q -d ../vendor/Popcorn/src/Pop
) ELSE (
    echo You need at least the TAR or ZIP program to install the components.
    exit /b
)

SET SCRIPT_DIR=%~dp0
php %SCRIPT_DIR%pop.php %EXT% %*

IF "%1" == "install" (
    IF NOT "%2" == "" (
        IF "%2" == "all" (
            SET TESTFILE=..\vendor\Popcorn\src\Pop\Archive%EXT%
        ) ELSE (
            SET TEMPFILE=%2%
            SET TESTFILE=..\vendor\Popcorn\src\Pop\%TEMPFILE%%EXT%
        )
        IF EXIST "%TESTFILE%" (
            FOR /f "delims=" %%i IN ('dir /B ..\vendor\Popcorn\src\Pop\*%EXT%') DO (
                echo Unpacking %%i...
                %CMD% ../vendor/Popcorn/src/Pop/%%i
                del ..\vendor\Popcorn\src\Pop\%%i
            )
            echo Complete!
        )
    )
)

Fix bug in pop.bat CLI script

Fix bug in pop.bat CLI script


Add npm install for clean builds

Add npm install for clean builds


nunit3-console %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest/bin/Debug/MsgPack.UnitTest.dll --framework:net-4.5 --result=test-result-net45.xml;format=AppVeyor
nunit3-console %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.BclExtensions/bin/Debug/MsgPack.UnitTest.BclExtensions.dll --framework:net-4.5 --result=test-result-net45-bclext.xml;format=AppVeyor
nunit3-console %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.CodeDom/bin/Debug/MsgPack.UnitTest.CodeDom.dll --framework:net-4.5 --result=test-result-net45-codedom.xml;format=AppVeyor
nunit3-console %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.Net35/bin/Debug/MsgPack.UnitTest.Net35.dll --framework:net-3.5 --result=test-result-net35.xml;format=AppVeyor
nunit3-console %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.CodeDom.Net35/bin/Debug/MsgPack.UnitTest.CodeDom.Net35.dll --framework:net-3.5 --result=test-result-net35-codedom.xml;format=AppVeyor
nunit3-console %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.Unity.Il2Cpp.Full.Desktop/bin/Debug/MsgPack.UnitTest.dll --framework:net-3.5 --result=test-result-unity-il2cpp-desktop.xml;format=AppVeyor
vstest.console /logger:Appveyor %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.WinRT/bin/Debug/MsgPack.UnitTest.dll
vstest.console /logger:Appveyor %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.BclExtensions.WinRT/bin/Debug/MsgPack.UnitTest.BclExtensions.dll
vstest.console /logger:Appveyor %APPVEYOR_BUILD_FOLDER%/test/MsgPack.UnitTest.WinRT.WindowsPhone/bin/x86/Debug/MsgPack.UnitTest.dll
:: UWP test with NUnit3 is not available in cli
:: Xamarin tests are not available in cli

Add test runner script.

Add test runner script.


echo stop any instances that might already be running.
pskill javaw.exe
pskill java.exe

cd /d %~dp0\..
echo working directory is
cd

IF NOT "%1"=="FULL" GOTO UPDATEMMTREE

pushd ..\3rdparty
svn cleanup --non-interactive
svn update --accept postpone --force --ignore-externals --non-interactive
popd
pushd ..\3rdpartypublic
echo update 3rdpartypublic tree from the repository
svn cleanup --non-interactive
rem - been having trouble updating from boost.org, but don't need to do that anyhow for now.
svn update --accept postpone --force --ignore-externals --non-interactive
popd

svn cleanup --non-interactive

:UPDATEMMTREE
echo update micromanager tree from the repository
svn update --accept postpone --non-interactive
pushd SecretDeviceAdapters
svn cleanup --non-interactive
svn update --accept postpone --non-interactive
popd

echo Building native C++ libraries....

echo setup include path for Visual Studio....
set include=
if exist "\Program Files (x86)\Microsoft Visual Studio 9.0\VC\" goto probably_x64
pushd "\Program Files\Microsoft Visual Studio 9.0\VC\"
goto setvcvars
:probably_x64
pushd "\Program Files (x86)\Microsoft Visual Studio 9.0\VC\
:setvcvars
call vcvarsall.bat
popd

set include=d:\projects\3rdpartypublic\boost;%include%

echo include path is:
set include

echo continue working in:
cd
set buildswitch=BUILD
IF "%1%"=="FULL" SET buildswitch=REBUILD

echo building core with command:
echo devenv /%buildswitch% "Release|Win32" .\MMCore\MMCore.vcproj
devenv /%buildswitch% "Release|Win32" .\MMCore\MMCore.vcproj

echo building python wrapper with command:
echo devenv /%buildswitch% Release .\MMCorePy_wrap\MMCorePy_wrap.sln
devenv /%buildswitch% Release .\MMCorePy_wrap\MMCorePy_wrap.sln
copy .\bin_Win32\MMCorePy.py .\Install_Win32\micro-manager
copy .\bin_Win32\_MMCorePy.pyd .\Install_Win32\micro-manager
copy .\MMCorePy_wrap\MMCoreWrapDemo.py .\Install_Win32\micro-manager

echo building Java wrapper with command:
echo devenv /%buildswitch% "Release|Win32" .\MMCoreJ_wrap\MMCoreJ_wrap.sln
devenv /%buildswitch% "Release|Win32" .\MMCoreJ_wrap\MMCoreJ_wrap.sln

echo Update the version number in MMStudioMainFrame
set mmversion=""
set YYYYMMDD=""
set TARGETNAME=""
call buildscripts\setmmversionvariable
call buildscripts\setyyyymmddvariable
pushd .\mmstudio\src\org\micromanager
rem for nightly builds we put the version + the date-stamp
rem arg2 is either RELEASE OR NIGHTLY
if "%2%" == "RELEASE" goto releaseversion
set TARGETNAME=MMSetup32BIT_%mmversion%_%YYYYMMDD%.exe
sed -i "s/\"1\.4.*/\"%mmversion%  %YYYYMMDD%\";/"  MMStudioMainFrame.java
goto continuebuild
:releaseversion
sed -i "s/\"1\.4.*/\"%mmversion%\";/"  MMStudioMainFrame.java
set TARGETNAME=MMSetup32BIT_%mmversion%.exe
:continuebuild
popd

rem remove any installer package with exactly the same name as the current output
echo trying to delete \Projects\micromanager\Install_Win32\Output\MMSetup_.exe
del \Projects\micromanager\Install_Win32\Output\MMSetup_.exe
echo trying to delete \Projects\micromanager\Install_Win32\Output\%TARGETNAME%
del \Projects\micromanager\Install_Win32\Output\%TARGETNAME%

ECHO incremental build of Java components...

set cleantarget=
IF "%1%"=="FULL" SET cleantarget=clean

PUSHD \projects\micromanager\mmStudio\src
echo building mmStudio with command:
echo call ant -buildfile ../build32.xml %cleantarget% compile build buildMMReader
call ant -buildfile ../build32.xml %cleantarget% compile build buildMMReader
POPD

rem haven't got to the bottom of this yet, but Pixel Calibrator and Slide Explorer need this jar file there....
copy \projects\micromanager\bin_Win32\plugins\Micro-Manager\MMJ_.jar \projects\micromanager\bin_Win32\

pushd buildscripts
call buildJars %1
popd

set DEVICELISTBUILDER=1
cd mmStudio\src
call ant -buildfile ../build32.xml install makeDeviceList packInstaller
popd
set DEVICELISTBUILDER=""

pushd \Projects\micromanager\Install_Win32\Output
rename MMSetup_.exe  %TARGETNAME%
popd

\Projects\micromanager\Install_Win32\Output\%TARGETNAME%  /silent

ECHO "Done installing"
IF NOT "%3%" == "UPLOAD" GOTO FINISH
pscp -i c:\projects\MM.ppk -batch /projects/micromanager/Install_Win32/Output/%TARGETNAME% MM@valelab.ucsf.edu:./public_html/nightlyBuilds/1.4/Windows/%TARGETNAME%
:FINISH

echo stop any instances that might already be running.
pskill javaw.exe
pskill java.exe

cd /d %~dp0\..
echo working directory is
cd

IF NOT "%1"=="FULL" GOTO UPDATEMMTREE

pushd ..\3rdparty
svn cleanup --non-interactive
svn update --accept postpone --force --ignore-externals --non-interactive
popd
pushd ..\3rdpartypublic
echo update 3rdpartypublic tree from the repository
svn cleanup --non-interactive
rem - been having trouble updating from boost.org, but don't need to do that anyhow for now.
svn update --accept postpone --force --ignore-externals --non-interactive
popd

svn cleanup --non-interactive

:UPDATEMMTREE
echo update micromanager tree from the repository
svn update --accept postpone --non-interactive
pushd SecretDeviceAdapters
svn cleanup --non-interactive
svn update --accept postpone --non-interactive
popd

echo Building native C++ libraries....

echo setup include path for Visual Studio....
set include=
if exist "\Program Files (x86)\Microsoft Visual Studio 9.0\VC\" goto probably_x64
pushd "\Program Files\Microsoft Visual Studio 9.0\VC\"
goto setvcvars
:probably_x64
pushd "\Program Files (x86)\Microsoft Visual Studio 9.0\VC\
:setvcvars
call vcvarsall.bat
popd

set include=d:\projects\3rdpartypublic\boost;%include%

echo include path is:
set include

echo continue working in:
cd
set buildswitch=
IF "%1%"=="FULL" SET buildswitch=/rebuild

echo building core with command:
echo vcbuild /M8 %buildswitch% .\MMCore\MMCore.vcproj "Release|Win32"
vcbuild /M8 %buildswitch% .\MMCore\MMCore.vcproj "Release|Win32"

echo building python wrapper with command:
echo vcbuild /M8 %buildswitch% .\MMCorePy_wrap\MMCorePy_wrap.sln "Release|Win32"
vcbuild /M8 %buildswitch% .\MMCorePy_wrap\MMCorePy_wrap.sln "Release|Win32"
copy .\bin_Win32\MMCorePy.py .\Install_Win32\micro-manager
copy .\bin_Win32\_MMCorePy.pyd .\Install_Win32\micro-manager
copy .\MMCorePy_wrap\MMCoreWrapDemo.py .\Install_Win32\micro-manager

echo building Java wrapper with command:
echo vcbuild /M8 %buildswitch% .\MMCoreJ_wrap\MMCoreJ_wrap.sln "Release|Win32"
vcbuild /M8 %buildswitch% .\MMCoreJ_wrap\MMCoreJ_wrap.sln "Release|Win32"

echo Update the version number in MMStudioMainFrame
set mmversion=""
set YYYYMMDD=""
set TARGETNAME=""
call buildscripts\setmmversionvariable
call buildscripts\setyyyymmddvariable
pushd .\mmstudio\src\org\micromanager
rem for nightly builds we put the version + the date-stamp
rem arg2 is either RELEASE OR NIGHTLY
if "%2%" == "RELEASE" goto releaseversion
set TARGETNAME=MMSetup32BIT_%mmversion%_%YYYYMMDD%.exe
sed -i "s/\"1\.4.*/\"%mmversion%  %YYYYMMDD%\";/"  MMStudioMainFrame.java
goto continuebuild
:releaseversion
sed -i "s/\"1\.4.*/\"%mmversion%\";/"  MMStudioMainFrame.java
set TARGETNAME=MMSetup32BIT_%mmversion%.exe
:continuebuild
popd

rem remove any installer package with exactly the same name as the current output
echo trying to delete \Projects\micromanager\Install_Win32\Output\MMSetup_.exe
del \Projects\micromanager\Install_Win32\Output\MMSetup_.exe
echo trying to delete \Projects\micromanager\Install_Win32\Output\%TARGETNAME%
del \Projects\micromanager\Install_Win32\Output\%TARGETNAME%

ECHO incremental build of Java components...

set cleantarget=
IF "%1%"=="FULL" SET cleantarget=clean

PUSHD \projects\micromanager\mmStudio\src
echo building mmStudio with command:
echo call ant -buildfile ../build32.xml %cleantarget% compile build buildMMReader
call ant -buildfile ../build32.xml %cleantarget% compile build buildMMReader
POPD

rem haven't got to the bottom of this yet, but Pixel Calibrator and Slide Explorer need this jar file there....
copy \projects\micromanager\bin_Win32\plugins\Micro-Manager\MMJ_.jar \projects\micromanager\bin_Win32\

pushd buildscripts
call buildJars %1
popd

set DEVICELISTBUILDER=1
cd mmStudio\src
call ant -buildfile ../build32.xml install makeDeviceList packInstaller
popd
set DEVICELISTBUILDER=""

pushd \Projects\micromanager\Install_Win32\Output
rename MMSetup_.exe  %TARGETNAME%
popd

\Projects\micromanager\Install_Win32\Output\%TARGETNAME%  /silent

ECHO "Done installing"
IF NOT "%3%" == "UPLOAD" GOTO FINISH
pscp -i c:\projects\MM.ppk -batch /projects/micromanager/Install_Win32/Output/%TARGETNAME% arthur@valelab.ucsf.edu:../MM/public_html/nightlyBuilds/1.4/Windows/%TARGETNAME%
:FINISH

Make MM buildable using Visual Studio 2008 Express

git-svn-id: 03a8048b5ee8463be5048a3801110fb50f378627@8270 d0ab736e-dc22-4aeb-8dc9-08def0aa14fd


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

Create bld.bat

Create bld.bat

Add Windows Build


REM Add other things if could be automated, RUN THIS AS ADMIN
@echo off
REM Windows Defender scan
cd C:\Program Files\Windows Defender\MpCmdRun.exe -Scan 2
REM Listing possible penetrations
wmic process list brief
PAUSE
wmic process list full
PAUSE
wmic startup list full
PAUSE

REM Add other things if could be automated, RUN THIS AS ADMIN
@echo off
REM Windows Defender scan
C:\Program Files\Windows Defender\MpCmdRun.exe -Scan 2
REM Listing possible penetrations
wmic process list brief
PAUSE
wmic process list full
PAUSE
wmic startup list full
PAUSE

Update windows.bat

Update windows.bat


@echo "* "
@echo "* "
@echo "* Nu starter vi MineCraft serveren Kys min mås"
@echo "* "
@echo "* "

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
#java -Xmx1024M -Xms1024M -jar minecraft_server.jar

@pause

Create start.bat

Create start.bat


### application.bat - 2015 - Thibault ROGER ###
echo "Copyright company - 2015"
echo "Build : 10:00"
echo "version 1.1"

### application.bat - 201x - votre nom ###
version = "2"
build_hour = "11H00"

echo "Build ${build_hour}"
echo "version ${version}"

add var to script

add var to script


 ### application.bat - 201x - Laurent THOMAS ###
echo "Build:10:00"
echo "version 1"

Add file header

Add file header


@echo off
setlocal

if /i "%1" == "debug" goto :ok
if /i "%1" == "release" goto :ok

echo GACs built binaries, adds required strong name verification skipping, and optionally NGens built binaries
echo Usage:
echo    update.cmd debug [-ngen]
echo    update.cmd release [-ngen]
exit /b 1

:ok

set BINDIR=%~dp0..\%1\net40\bin

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" set X86_PROGRAMFILES=%ProgramFiles%
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%

set GACUTIL="%X86_PROGRAMFILES%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe"
set SN32="%X86_PROGRAMFILES%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe"
set SN64="%X86_PROGRAMFILES%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64\sn.exe"
set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe

rem Disable strong-name validation for F# binaries built from open source
%SN32% -Vr FSharp.Core,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Build,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler.Interactive.Settings,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler.Server.Shared,f536804aa0eb945b

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    %SN64% -Vr FSharp.Core,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Build,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler.Interactive.Settings,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler.Server.Shared,f536804aa0eb945b
)

rem Only GACing FSharp.Core for now
%GACUTIL% /if %BINDIR%\FSharp.Core.dll

rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
if /i not "%2"=="-ngen" goto :donengen

"%NGEN32%" install "%BINDIR%\fsc.exe" /queue:1
"%NGEN32%" install "%BINDIR%\fsi.exe" /queue:1
"%NGEN32%" install "%BINDIR%\FSharp.Build.dll" /queue:1
"%NGEN32%" executeQueuedItems 1

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    "%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" /queue:1
    "%NGEN64%" install "%BINDIR%\FSharp.Build.dll" /queue:1
    "%NGEN64%" executeQueuedItems 1
)

:donengen

@echo off
setlocal

if /i "%1" == "debug" goto :ok
if /i "%1" == "release" goto :ok

echo GACs built binaries, adds required strong name verification skipping, and optionally NGens built binaries
echo Usage:
echo    update.cmd debug [-ngen]
echo    update.cmd release [-ngen]
exit /b 1

:ok

set BINDIR=%~dp0..\%1\net40\bin

if /i "%PROCESSOR_ARCHITECTURE%"=="x86" set X86_PROGRAMFILES=%ProgramFiles%
if /I "%PROCESSOR_ARCHITECTURE%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%

set GACUTIL="%X86_PROGRAMFILES%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe"
set SN32="%X86_PROGRAMFILES%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe"
set SN64="%X86_PROGRAMFILES%\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64\sn.exe"
set NGEN32=%windir%\Microsoft.NET\Framework\v4.0.30319\ngen.exe
set NGEN64=%windir%\Microsoft.NET\Framework64\v4.0.30319\ngen.exe

rem Disable strong-name validation for F# binaries built from open source
%SN32% -Vr FSharp.Core,b03f5f7f11d50a3a
%SN32% -Vr FSharp.Build,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler.Interactive.Settings,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler.Server.Shared,f536804aa0eb945b
%SN32% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    %SN64% -Vr FSharp.Core,b03f5f7f11d50a3a
    %SN64% -Vr FSharp.Build,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler.Interactive.Settings,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler.Server.Shared,f536804aa0eb945b
    %SN64% -Vr FSharp.Compiler.Hosted,b03f5f7f11d50a3a
)

rem Only GACing FSharp.Core for now
%GACUTIL% /if %BINDIR%\FSharp.Core.dll

rem NGen fsc, fsi, fsiAnyCpu, and FSharp.Build.dll
if /i not "%2"=="-ngen" goto :donengen

"%NGEN32%" install "%BINDIR%\fsc.exe" /queue:1
"%NGEN32%" install "%BINDIR%\fsi.exe" /queue:1
"%NGEN32%" install "%BINDIR%\FSharp.Build.dll" /queue:1
"%NGEN32%" executeQueuedItems 1

if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
    "%NGEN64%" install "%BINDIR%\fsiAnyCpu.exe" /queue:1
    "%NGEN64%" install "%BINDIR%\FSharp.Build.dll" /queue:1
    "%NGEN64%" executeQueuedItems 1
)

:donengen

Add strong name validation skip for test library FSharp.Compiler.Hosted (changeset 1227695)


IF  "%1"=="" (
	GOTO HELL
) ELSE (
	SET _TAG_=v%1
)

IF  NOT "%2"=="" (
	SET _TAG_=%_TAG_%.%2
)

git remote set-url origin https://%3:%4@github.com/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%

GOTO END

:HELL
ECHO VERSION NOT FOUND
EXIT -1

:END
ECHO PROCESS FINISHED
EXIT 0

IF  "%1"=="" (
	GOTO HELL
) ELSE (
	SET _TAG_=v%1
)

IF  NOT "%2"=="" (
	SET _TAG_=%_TAG_%.%2
)

git config --global user.email "%3@outlook.com"
git config --global user.name "%3"
git remote set-url origin https://%3:%4@github.com/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%

GOTO END

:HELL
ECHO VERSION NOT FOUND
EXIT -1

:END
ECHO PROCESS FINISHED
EXIT 0

Set git user.name and user.email

Set git user.name and user.email


echo Web-OS compiler + installer v1.0
echo Copyright Gum-Joe
echo This is for app veyor

echo ""

echo Installing bower and mocha
npm install -g bower mocha

echo Installing npm packages...
npm install

echo ""

echo Compiling apps...
cd app/console-app
compile.bat

Create appveyor.bat

Create appveyor.bat


echo "Start build"
git clone https://github.com/SFML/SFML.git
cd SFML

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE

msbuild INSTALL.vcxproj
echo "After SFML build"

cd ../../
echo "Process TIMLE project"
cd TIMLE

mkdir build
mkdir build/TIMLE

cmake . -G "Visual Studio 15 Win64" -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM -DCMAKE_INSTALL_PREFIX=./build/TIMLE -DCMAKE_PREFIX_PATH=./SFML/install

echo "Start build"
git clone https://github.com/SFML/SFML.git
cd SFML

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE

msbuild INSTALL.vcxproj
echo "After SFML build"

cd ../../
echo "Process TIMLE project"
cd TIMLE
echo "cd into TIMLE project"

mkdir build
echo "mkdir build"

mkdir build/TIMLE
echo "mkdir build/TIMLE"

cmake . -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=./build/TIMLE -DCMAKE_PREFIX_PATH=./SFML/install
echo "Process TIMLE by CMake"

Add logging message in install script

Add logging message in install script


REM Generate `setup.py` from `pavement.py` definition.
"%PYTHON%" -m paver generate_setup

REM **Workaround** `conda build` runs a copy of `setup.py` named
REM `conda-build-script.py` with the recipe directory as the only argument.
REM This causes paver to fail, since the recipe directory is not a valid paver
REM task name.
REM
REM We can work around this by wrapping the original contents of `setup.py` in
REM an `if` block to only execute during package installation.
"%PYTHON%" -c "input_ = open('setup.py', 'r'); data = input_.read(); input_.close(); output_ = open('setup.py', 'w'); output_.write('\n'.join(['import sys', 'import path_helpers as ph', '''if ph.path(sys.argv[0]).name == 'conda-build-script.py':''', '    sys.argv.pop()', 'else:', '\n'.join([('    ' + d) for d in data.splitlines()])])); output_.close(); print open('setup.py', 'r').read()"

REM Install source directory as Python package.
"%PYTHON%" -m pip install --no-cache --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 .
REM TODO: Find way to get source directory path from within appveyor
nosetests "%SRC_DIR%" -vv --with-xunit
if errorlevel 1 (
  IF DEFINED PROJECT_DIRECTORY (
    cp .\\nosetests.xml "%PROJECT_DIRECTORY%"\\nosetests.xml
    dir "%PROJECT_DIRECTORY%"
  )
  exit 1
)

REM If a project directory specified, then copy results into the directory
IF DEFINED PROJECT_DIRECTORY (
  cp .\\nosetests.xml "%PROJECT_DIRECTORY%"\\nosetests.xml
  dir "%PROJECT_DIRECTORY%"
)
if errorlevel 1 exit 1

REM Generate `setup.py` from `pavement.py` definition.
"%PYTHON%" -m paver generate_setup

REM **Workaround** `conda build` runs a copy of `setup.py` named
REM `conda-build-script.py` with the recipe directory as the only argument.
REM This causes paver to fail, since the recipe directory is not a valid paver
REM task name.
REM
REM We can work around this by wrapping the original contents of `setup.py` in
REM an `if` block to only execute during package installation.
"%PYTHON%" -c "input_ = open('setup.py', 'r'); data = input_.read(); input_.close(); output_ = open('setup.py', 'w'); output_.write('\n'.join(['import sys', 'import path_helpers as ph', '''if ph.path(sys.argv[0]).name == 'conda-build-script.py':''', '    sys.argv.pop()', 'else:', '\n'.join([('    ' + d) for d in data.splitlines()])])); output_.close(); print open('setup.py', 'r').read()"

REM Install source directory as Python package.
"%PYTHON%" -m pip install --no-cache --find-links http://192.99.4.95/wheels --trusted-host 192.99.4.95 .
REM TODO: Find way to get source directory path from within appveyor
REM nosetests "%SRC_DIR%" -vv --with-xunit
REM if errorlevel 1 (
REM   IF DEFINED PROJECT_DIRECTORY (
REM     cp .\\nosetests.xml "%PROJECT_DIRECTORY%"\\nosetests.xml
REM     dir "%PROJECT_DIRECTORY%"
REM   )
REM   exit 1
REM )
REM
REM REM If a project directory specified, then copy results into the directory
REM IF DEFINED PROJECT_DIRECTORY (
REM   cp .\\nosetests.xml "%PROJECT_DIRECTORY%"\\nosetests.xml
REM   dir "%PROJECT_DIRECTORY%"
REM )
if errorlevel 1 exit 1

comment nosetests for debugging

comment nosetests for debugging


git clone https://github.com/SFML/SFML.git
cd SFML

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_INSTALL_PREFIX=../install -DSFML_DEPENDENCIES_INSTALL_PREFIX=../install -DSFML_BUILD_FRAMEWORKS=FALSE -DBUILD_SHARED_LIBS=TRUE

msbuild INSTALL.vcxproj

cd ../../

mkdir install
mkdir build
cd build

cmake .. -G "Visual Studio 15 Win64" -DCMAKE_BUILD_TYPE=$CONFIGURATION -DTARGET_CPU=$PLATFORM -DCMAKE_INSTALL_PREFIX=../install -DCMAKE_PREFIX_PATH=C:/projects/timle/SFML/install

cd ../

Fix position to current directory

Fix position to current directory


@rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd
@rem The cmd /C hack circumvents a regression where conda installs a conda.bat
@rem script in non-root environments.
set CONDA_INSTALL=cmd /C conda install -q -y
set PIP_INSTALL=pip install -q

@echo on

@rem Use clcache for faster builds
pip install -q git+https://github.com/frerich/clcache.git
clcache -s
set CLCACHE_SERVER=1
set CLCACHE_HARDLINK=1
powershell.exe -Command "Start-Process clcache-server"

if %errorlevel% neq 0 exit /b %errorlevel%

@rem https://github.com/numba/numba/blob/master/buildscripts/incremental/setup_conda_environment.cmd
@rem The cmd /C hack circumvents a regression where conda installs a conda.bat
@rem script in non-root environments.
set CONDA_INSTALL=cmd /C conda install -q -y
set PIP_INSTALL=pip install -q

@echo on

@rem Use clcache for faster builds
pip install -q git+https://github.com/frerich/clcache.git
clcache -M 3221225472
clcache -s
set CLCACHE_SERVER=1
set CLCACHE_HARDLINK=1
set CLCACHE_NODIRECT=1
powershell.exe -Command "Start-Process clcache-server"

if %errorlevel% neq 0 exit /b %errorlevel%

Change clcache size and set CLCACHE_NODIRECT


IF  "%1"=="" (
	GOTO HELL
) ELSE (
	SET _TAG_=%1
)

IF  NOT "%2"=="" (
	SET _TAG_=%1.%2
)

git remote set-url origin https://%3:%4@github.com/wasteam/waslibs.git
git tag v%_TAG_%
git push --tag

GOTO END

:HELL
ECHO VERSION NOT FOUND
EXIT -1

:END
ECHO PROCESS FINISHED

IF  "%1"=="" (
	GOTO HELL
) ELSE (
	SET _TAG_=v%1
)

IF  NOT "%2"=="" (
	SET _TAG_=%_TAG_%.%2
)

git remote set-url origin https://%3:%4@github.com/wasteam/waslibs.git
git tag -a %_TAG_% -m "Version built: %_TAG_%"
git push origin %_TAG_%

GOTO END

:HELL
ECHO VERSION NOT FOUND
EXIT -1

:END
ECHO PROCESS FINISHED
EXIT 0

fix versiontag.bat return error

fix versiontag.bat return error


@rem Script to build LuaJIT with MSVC.
@rem Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
@rem
@rem Either open a "Visual Studio .NET Command Prompt"
@rem (Note that the Express Edition does not contain an x64 compiler)
@rem -or-
@rem Open a "Windows SDK Command Shell" and set the compiler environment:
@rem     setenv /release /x86
@rem   -or-
@rem     setenv /release /x64
@rem
@rem Then cd to this directory and run this script.

@if not defined INCLUDE goto :FAIL

@setlocal
@set LJCOMPILE=cl /nologo /c /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE
@set LJLINK=link /nologo
@set LJMT=mt /nologo
@set LJLIB=lib /nologo
@set DASMDIR=..\dynasm
@set DASM=lua %DASMDIR%\dynasm.lua
@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c

if not exist buildvm_x86.h^
  %DASM% -LN -o buildvm_x86.h buildvm_x86.dasc
@if errorlevel 1 goto :BAD
if not exist buildvm_x64win.h^
  %DASM% -LN -D X64 -D X64WIN -o buildvm_x64win.h buildvm_x86.dasc
@if errorlevel 1 goto :BAD

%LJCOMPILE% /I "." /I %DASMDIR% buildvm*.c
@if errorlevel 1 goto :BAD
%LJLINK% /out:buildvm.exe buildvm*.obj
@if errorlevel 1 goto :BAD
if exist buildvm.exe.manifest^
  %LJMT% -manifest buildvm.exe.manifest -outputresource:buildvm.exe

buildvm -m peobj -o lj_vm.obj
@if errorlevel 1 goto :BAD
buildvm -m bcdef -o lj_bcdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m ffdef -o lj_ffdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m libdef -o lj_libdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m recdef -o lj_recdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m vmdef -o ..\lib\vmdef.lua %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
@if errorlevel 1 goto :BAD

@if "%1" neq "debug" goto :NODEBUG
@shift
@set LJCOMPILE=%LJCOMPILE% /Zi /Fdluajit.pdb
@set LJLINK=%LJLINK% /debug /PDB:luajit.pdb
:NODEBUG
@if "%1"=="amalg" goto :AMALGDLL
@if "%1"=="static" goto :STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:lua51.dll lj_*.obj lib_*.obj
@if errorlevel 1 goto :BAD
@goto :MTDLL
:STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLIB% /OUT:lua51.lib lj_*.obj lib_*.obj
@if errorlevel 1 goto :BAD
@goto :MTDLL
:AMALGDLL
%LJCOMPILE% /DLUA_BUILD_AS_DLL ljamalg.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:lua51.dll ljamalg.obj lj_vm.obj
@if errorlevel 1 goto :BAD
:MTDLL
if exist lua51.dll.manifest^
  %LJMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2

%LJCOMPILE% luajit.c
@if errorlevel 1 goto :BAD
%LJLINK% /out:luajit.exe luajit.obj lua51.lib
@if errorlevel 1 goto :BAD
if exist luajit.exe.manifest^
  %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe

@del *.obj *.manifest buildvm.exe
@echo.
@echo === Successfully built LuaJIT ===

@goto :END
:BAD
@echo.
@echo *******************************************************
@echo *** Build FAILED -- Please check the error messages ***
@echo *******************************************************
@goto :END
:FAIL
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
:END

@rem Script to build LuaJIT with MSVC.
@rem Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
@rem
@rem Either open a "Visual Studio .NET Command Prompt"
@rem (Note that the Express Edition does not contain an x64 compiler)
@rem -or-
@rem Open a "Windows SDK Command Shell" and set the compiler environment:
@rem     setenv /release /x86
@rem   -or-
@rem     setenv /release /x64
@rem
@rem Then cd to this directory and run this script.

@if not defined INCLUDE goto :FAIL

@setlocal
@set LJCOMPILE=cl /nologo /c /MD /O2 /W3 /D_CRT_SECURE_NO_DEPRECATE
@set LJLINK=link /nologo
@set LJMT=mt /nologo
@set LJLIB=lib /nologo
@set DASMDIR=..\dynasm
@set DASM=lua %DASMDIR%\dynasm.lua
@set ALL_LIB=lib_base.c lib_math.c lib_bit.c lib_string.c lib_table.c lib_io.c lib_os.c lib_package.c lib_debug.c lib_jit.c lib_ffi.c

if not exist buildvm_x86.h^
  %DASM% -LN -o buildvm_x86.h buildvm_x86.dasc
@if errorlevel 1 goto :BAD
if not exist buildvm_x64win.h^
  %DASM% -LN -D X64 -D X64WIN -o buildvm_x64win.h buildvm_x86.dasc
@if errorlevel 1 goto :BAD

%LJCOMPILE% /I "." /I %DASMDIR% buildvm*.c
@if errorlevel 1 goto :BAD
%LJLINK% /out:buildvm.exe buildvm*.obj
@if errorlevel 1 goto :BAD
if exist buildvm.exe.manifest^
  %LJMT% -manifest buildvm.exe.manifest -outputresource:buildvm.exe

buildvm -m peobj -o lj_vm.obj
@if errorlevel 1 goto :BAD
buildvm -m bcdef -o lj_bcdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m ffdef -o lj_ffdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m libdef -o lj_libdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m recdef -o lj_recdef.h %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m vmdef -o ..\lib\vmdef.lua %ALL_LIB%
@if errorlevel 1 goto :BAD
buildvm -m folddef -o lj_folddef.h lj_opt_fold.c
@if errorlevel 1 goto :BAD

@if "%1" neq "debug" goto :NODEBUG
@shift
@set LJCOMPILE=%LJCOMPILE% /Zi
@set LJLINK=%LJLINK% /debug
:NODEBUG
@if "%1"=="amalg" goto :AMALGDLL
@if "%1"=="static" goto :STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:lua51.dll lj_*.obj lib_*.obj
@if errorlevel 1 goto :BAD
@goto :MTDLL
:STATIC
%LJCOMPILE% /DLUA_BUILD_AS_DLL lj_*.c lib_*.c
@if errorlevel 1 goto :BAD
%LJLIB% /OUT:lua51.lib lj_*.obj lib_*.obj
@if errorlevel 1 goto :BAD
@goto :MTDLL
:AMALGDLL
%LJCOMPILE% /DLUA_BUILD_AS_DLL ljamalg.c
@if errorlevel 1 goto :BAD
%LJLINK% /DLL /out:lua51.dll ljamalg.obj lj_vm.obj
@if errorlevel 1 goto :BAD
:MTDLL
if exist lua51.dll.manifest^
  %LJMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2

%LJCOMPILE% luajit.c
@if errorlevel 1 goto :BAD
%LJLINK% /out:luajit.exe luajit.obj lua51.lib
@if errorlevel 1 goto :BAD
if exist luajit.exe.manifest^
  %LJMT% -manifest luajit.exe.manifest -outputresource:luajit.exe

@del *.obj *.manifest buildvm.exe
@echo.
@echo === Successfully built LuaJIT ===

@goto :END
:BAD
@echo.
@echo *******************************************************
@echo *** Build FAILED -- Please check the error messages ***
@echo *******************************************************
@goto :END
:FAIL
@echo You must open a "Visual Studio .NET Command Prompt" to run this script
:END

Fix debug option for msvcbuild.bat.

Fix debug option for msvcbuild.bat.


"%sdkver%" -q -version:v7.0
call setenv /x64

rem install python packages
pip install --cache-dir c:/temp pyside
pip install --cache-dir c:/temp pygments
pip install --cache-dir c:/temp traits
pip install --cache-dir c:/temp traitsui
pip install --cache-dir c:/temp traits_enaml
pip install --cache-dir c:/temp enaml
pip install --cache-dir c:/temp coverage

rem install pyface
python setup.py develop

"%sdkver%" -q -version:v7.0
call setenv /x64

rem install python packages
pip install --cache-dir c:/temp nose
pip install --cache-dir c:/temp nose-exclude
pip install --cache-dir c:/temp pyside
pip install --cache-dir c:/temp pygments
pip install --cache-dir c:/temp traits
pip install --cache-dir c:/temp traitsui
pip install --cache-dir c:/temp traits_enaml
pip install --cache-dir c:/temp enaml
pip install --cache-dir c:/temp coverage

rem install pyface
python setup.py develop

add missing depedencies

add missing depedencies


:: USAGE
::     cmdize name [...]
::
:: This tool converts a supported code into a batch file that can be
:: executed without explicit invoking the executable engine. The script
:: creates new file and places it under the same directory as the original
:: one with the same name, replacing the original extension with ".bat".
:: The content of the new file consists of the original file and the
:: special header that being the "polyglot" and having some tricks to be a
:: valid code in batch file and the wrapped code at the same time.
::
:: FEATURES
:: It does comment on "Option Explicit" in VBScript.
:: "<?xml?>" declaration for wsf-files is expected.
:: "Option Explicit" and "<?xml?>" in a single line only are supported.
:: BOM is not supported at all.
::
:: It is possible to select an engine for JavaScript, VBScript and WSF via
:: the command line options /E. If it is not pointed especially, CSCRIPT
:: is used as the default engine for all JavaScript, VBScript and WSF
:: files. Another valid engine is WSCRIPT. Additionally for JavaScript
:: files it is possible to set another engine such as NodeJS, Rhino etc.
:: The predefined option /E DEFAULT resets any previously set engines to
:: the default value.
::
:: SEE ALSO
:: Proceed the following links to learn more the origins
::
:: .js
:: http://forum.script-coding.com/viewtopic.php?pid=79210#p79210
:: http://www.dostips.com/forum/viewtopic.php?p=33879#p33879
:: https://gist.github.com/ildar-shaimordanov/88d7a5544c0eeacaa3bc
::
:: .vbs
:: http://www.dostips.com/forum/viewtopic.php?p=33882#p33882
:: http://www.dostips.com/forum/viewtopic.php?p=32485#p32485
::
:: .pl
:: For details and better support see "pl2bat.bat" from Perl distribution
::
:: .ps1
:: http://blogs.msdn.com/b/jaybaz_ms/archive/2007/04/26/powershell-polyglot.aspx
:: http://stackoverflow.com/a/2611487/3627676
::
:: .hta and .html?
:: http://forum.script-coding.com/viewtopic.php?pid=79322#p79322
::
:: .wsf
:: http://www.dostips.com/forum/viewtopic.php?p=33963#p33963
::
:: COPYRIGHTS
:: Copyright (c) 2014, 2015 Ildar Shaimordanov

@echo off

if "%~1" == "" (
	for %%p in ( powershell.exe ) do if not "%%~$PATH:p" == "" (
		"%%~$PATH:p" -NoProfile -NoLogo -Command "cat '%~f0' | where { $_ -match '^::' } | %% { $_ -replace '::', '' }"
		goto :EOF
	)
	for /f "usebackq tokens=* delims=:" %%s in ( "%~f0" ) do (
		if /i "%%s" == "@echo off" goto :EOF
		echo:%%s
	)
	goto :EOF
)

:cmdize.loop.begin
if "%~1" == "" goto :cmdize.loop.end

if /i "%~1" == "/e" (
	set "CMDIZE_ENGINE="
	if /i not "%~2" == "default" set "CMDIZE_ENGINE=%~2"
	shift
	goto :cmdize.loop.continue
)

if not exist "%~f1" (
	echo:%~n0: File not found: "%~1">&2
	goto :cmdize.loop.continue
)

for %%x in ( .js .vbs .pl .ps1 .hta .htm .html .wsf ) do (
	if /i "%~x1" == "%%~x" (
		call :cmdize%%~x "%~1" >"%~dpn1.bat"
		goto :cmdize.loop.continue
	)
)

echo:%~n0: Unsupported extension: "%~1">&2

:cmdize.loop.continue

shift

goto :cmdize.loop.begin
:cmdize.loop.end

goto :EOF

:cmdize.js
if not defined CMDIZE_ENGINE set "CMDIZE_ENGINE=cscript"
set "CMDIZE_ENGINE_OPTS="
for %%e in ( "%CMDIZE_ENGINE%" ) do (
	if /i "%%~ne" == "cscript" set "CMDIZE_ENGINE_OPTS=//nologo //e:javascript"
	if /i "%%~ne" == "wscript" set "CMDIZE_ENGINE_OPTS=//nologo //e:javascript"
)

echo:0^</*! ::
echo:@echo off
echo:%CMDIZE_ENGINE% %CMDIZE_ENGINE_OPTS% "%%~f0" %%*
echo:goto :EOF */0;
type "%~f1"
goto :EOF

:cmdize.vbs.h
set /p "=::'" <nul
type "%TEMP%\%~n0.$$"
echo:%*
goto :EOF

:cmdize.vbs
if not defined CMDIZE_ENGINE set "CMDIZE_ENGINE=cscript"

copy /y nul + nul /a "%TEMP%\%~n0.$$" /a 1>nul

call :cmdize.vbs.h @echo off
call :cmdize.vbs.h %CMDIZE_ENGINE% //nologo //e:vbscript "%%%%~f0" %%%%*
call :cmdize.vbs.h goto :EOF

del /q "%TEMP%\%~n0.$$"
rem type "%~f1"
for /f "tokens=1,* delims=]" %%r in ( ' call "%windir%\System32\find.exe" /n /v "" ^<"%~f1" ' ) do (
	rem Filtering and commenting "Option Explicit".
	rem This ugly code tries as much as possible to recognize and
	rem comment this directive. It fails if "Option" and "Explicit"
	rem are located on two neighbor lines, consecutively, one by one.
	rem But it is too hard to imagine that there is someone who
	rem practices such a strange coding style.
	for /f "usebackq tokens=1,2" %%a in ( '%%s' ) do if /i "%%~a" == "Option" for /f "usebackq tokens=1,* delims=:'" %%i in ( 'x%%b' ) do if /i "%%~i" == "xExplicit" (
		echo:%~n0: Commenting Option Explicit in "%~1">&2
		echo:rem To prevent compilation error due to embedding into a batch file,
		echo:rem the following line was commented automatically.
		set /p "=rem " <nul
	)
	echo:%%s
)
goto :EOF

:cmdize.pl
echo:@rem = '--*-Perl-*--
echo:@echo off
echo:perl -x -S "%%~f0" %%*
echo:goto :EOF
echo:@rem ';
echo:#!perl
type "%~f1"
goto :EOF

:cmdize.ps1
echo:^<# :
echo:@echo off
echo:setlocal
echo:set "POWERSHELL_BAT_ARGS=%%*"
echo:if defined POWERSHELL_BAT_ARGS set "POWERSHELL_BAT_ARGS=%%POWERSHELL_BAT_ARGS:"=\"%%"
echo:endlocal ^& powershell -NoLogo -NoProfile -Command "$_ = $input; Invoke-Expression $( '$input = $_; $_ = \"\"; $args = @( &{ $args } %%POWERSHELL_BAT_ARGS%% );' + [String]::Join( [char]10, $( Get-Content \"%%~f0\" ) ) )"
echo:rem endlocal ^& powershell -NoLogo -NoProfile -Command "$input | &{ [ScriptBlock]::Create( ( Get-Content \"%%~f0\" ) -join [char]10 ).Invoke( @( &{ $args } %%POWERSHELL_BAT_ARGS%% ) ) }"
echo:goto :EOF
echo:#^>
type "%~f1"
goto :EOF

:cmdize.hta
:cmdize.htm
:cmdize.html
echo:^<!-- :
echo:@echo off
echo:start "" mshta "%%~f0" %%*
echo:goto :EOF
echo:--^>
type "%~f1"
goto :EOF

:cmdize.wsf
if not defined CMDIZE_ENGINE set "CMDIZE_ENGINE=cscript"

for /f "usebackq tokens=1,2,* delims=?" %%a in ( "%~f1" ) do for /f "tokens=1,*" %%d in ( "%%b" ) do (
	rem We use this code to transform the "<?xml?>" declaration
	rem located at the very beginning of the file to the "polyglot"
	rem form to do it acceptable by the batch file.
	echo:%%a?%%d :
	echo:: %%e ?^>^<!--
	echo:@echo off
	echo:%CMDIZE_ENGINE% //nologo "%%~f0?.wsf" %%*
	echo:goto :EOF
	echo:: --%%c
	more +1 <"%~f1"
	goto :EOF
)
goto :EOF

rem EOF

:: USAGE
::     cmdize name [...]
::
:: This tool converts a supported code into a batch file that can be
:: executed without explicit invoking the executable engine. The script
:: creates new file and places it under the same directory as the original
:: one with the same name, replacing the original extension with ".bat".
:: The content of the new file consists of the original file and the
:: special header that being the "polyglot" and having some tricks to be a
:: valid code in batch file and the wrapped code at the same time.
::
:: FEATURES
:: It does comment on "Option Explicit" in VBScript.
:: "<?xml?>" declaration for wsf-files is expected.
:: "Option Explicit" and "<?xml?>" in a single line only are supported.
:: BOM is not supported at all.
::
:: It is possible to select an engine for JavaScript, VBScript and WSF via
:: the command line options /E. If it is not pointed especially, CSCRIPT
:: is used as the default engine for all JavaScript, VBScript and WSF
:: files. Another valid engine is WSCRIPT. Additionally for JavaScript
:: files it is possible to set another engine such as NodeJS, Rhino etc.
:: The predefined option /E DEFAULT resets any previously set engines to
:: the default value.
::
:: SEE ALSO
:: Proceed the following links to learn more the origins
::
:: .js
:: http://forum.script-coding.com/viewtopic.php?pid=79210#p79210
:: http://www.dostips.com/forum/viewtopic.php?p=33879#p33879
:: https://gist.github.com/ildar-shaimordanov/88d7a5544c0eeacaa3bc
::
:: .vbs
:: http://www.dostips.com/forum/viewtopic.php?p=33882#p33882
:: http://www.dostips.com/forum/viewtopic.php?p=32485#p32485
::
:: .pl
:: For details and better support see "pl2bat.bat" from Perl distribution
::
:: .ps1
:: http://blogs.msdn.com/b/jaybaz_ms/archive/2007/04/26/powershell-polyglot.aspx
:: http://stackoverflow.com/a/2611487/3627676
::
:: .hta and .html?
:: http://forum.script-coding.com/viewtopic.php?pid=79322#p79322
::
:: .wsf
:: http://www.dostips.com/forum/viewtopic.php?p=33963#p33963
::
:: COPYRIGHTS
:: Copyright (c) 2014, 2015 Ildar Shaimordanov

@echo off

if "%~1" == "" (
	for %%p in ( powershell.exe ) do if not "%%~$PATH:p" == "" (
		"%%~$PATH:p" -NoProfile -NoLogo -Command "cat '%~f0' | where { $_ -match '^::' } | %% { $_ -replace '::', '' }"
		goto :EOF
	)
	for /f "usebackq tokens=* delims=:" %%s in ( "%~f0" ) do (
		if /i "%%s" == "@echo off" goto :EOF
		echo:%%s
	)
	goto :EOF
)

:cmdize.loop.begin
if "%~1" == "" goto :cmdize.loop.end

if /i "%~1" == "/e" (
	set "CMDIZE_ENGINE="
	if /i not "%~2" == "default" set "CMDIZE_ENGINE=%~2"
	shift
	goto :cmdize.loop.continue
)

if not exist "%~f1" (
	echo:%~n0: File not found: "%~1">&2
	goto :cmdize.loop.continue
)

for %%x in ( .js .vbs .pl .ps1 .hta .htm .html .wsf ) do (
	if /i "%~x1" == "%%~x" (
		call :cmdize%%~x "%~1" >"%~dpn1.bat"
		goto :cmdize.loop.continue
	)
)

echo:%~n0: Unsupported extension: "%~1">&2

:cmdize.loop.continue

shift

goto :cmdize.loop.begin
:cmdize.loop.end

goto :EOF

:cmdize.js
if not defined CMDIZE_ENGINE set "CMDIZE_ENGINE=cscript"
set "CMDIZE_ENGINE_OPTS="
for %%e in ( "%CMDIZE_ENGINE%" ) do (
	if /i "%%~ne" == "cscript" set "CMDIZE_ENGINE_OPTS=//nologo //e:javascript"
	if /i "%%~ne" == "wscript" set "CMDIZE_ENGINE_OPTS=//nologo //e:javascript"
)

echo:0^</*! ::
echo:@echo off
echo:%CMDIZE_ENGINE% %CMDIZE_ENGINE_OPTS% "%%~f0" %%*
echo:goto :EOF */0;
type "%~f1"
goto :EOF

:cmdize.vbs.h
set /p "=::'" <nul
type "%TEMP%\%~n0.$$"
echo:%*
goto :EOF

:cmdize.vbs
if not defined CMDIZE_ENGINE set "CMDIZE_ENGINE=cscript"

copy /y nul + nul /a "%TEMP%\%~n0.$$" /a 1>nul

call :cmdize.vbs.h @echo off
call :cmdize.vbs.h %CMDIZE_ENGINE% //nologo //e:vbscript "%%%%~f0" %%%%*
call :cmdize.vbs.h goto :EOF

del /q "%TEMP%\%~n0.$$"
rem type "%~f1"
for /f "tokens=1,* delims=]" %%r in ( ' call "%windir%\System32\find.exe" /n /v "" ^<"%~f1" ' ) do (
	rem Filtering and commenting "Option Explicit".
	rem This ugly code tries as much as possible to recognize and
	rem comment this directive. It fails if "Option" and "Explicit"
	rem are located on two neighbor lines, consecutively, one by one.
	rem But it is too hard to imagine that there is someone who
	rem practices such a strange coding style.
	for /f "usebackq tokens=1,2" %%a in ( '%%s' ) do if /i "%%~a" == "Option" for /f "usebackq tokens=1,* delims=:'" %%i in ( 'x%%b' ) do if /i "%%~i" == "xExplicit" (
		echo:%~n0: Commenting Option Explicit in "%~1">&2
		echo:rem To prevent compilation error due to embedding into a batch file,
		echo:rem the following line was commented automatically.
		set /p "=rem " <nul
	)
	echo:%%s
)
goto :EOF

:cmdize.pl
echo:@rem = '--*-Perl-*--
echo:@echo off
echo:perl -x -S "%%~f0" %%*
echo:goto :EOF
echo:@rem ';
echo:#!perl
type "%~f1"
goto :EOF

:cmdize.ps1
echo:^<# :
echo:@echo off
echo:setlocal
echo:set "POWERSHELL_BAT_ARGS=%%*"
echo:if defined POWERSHELL_BAT_ARGS set "POWERSHELL_BAT_ARGS=%%POWERSHELL_BAT_ARGS:"=\"%%"
echo:endlocal ^& powershell -NoLogo -NoProfile -Command "$_ = $input; Invoke-Expression $( '$input = $_; $_ = \"\"; $args = @( &{ $args } %%POWERSHELL_BAT_ARGS%% );' + [String]::Join( [char]10, $( Get-Content \"%%~f0\" ) ) )"
echo:rem endlocal ^& powershell -NoLogo -NoProfile -Command "$input | &{ [ScriptBlock]::Create( ( Get-Content \"%%~f0\" ) -join [char]10 ).Invoke( @( &{ $args } %%POWERSHELL_BAT_ARGS%% ) ) }"
echo:goto :EOF
echo:#^>
type "%~f1"
goto :EOF

:: I don't know the root cause of the issue but for some reasons cmd.exe
:: is not able to see the first label from below. Others are fine. That's
:: why these comments are included into this script -- they do allow to
:: launch the script with no issues similar to this.
:cmdize.hta
:cmdize.htm
:cmdize.html
echo:^<!-- :
echo:@echo off
echo:start "" mshta "%%~f0" %%*
echo:goto :EOF
echo:--^>
type "%~f1"
goto :EOF

:cmdize.wsf
if not defined CMDIZE_ENGINE set "CMDIZE_ENGINE=cscript"

for /f "usebackq tokens=1,2,* delims=?" %%a in ( "%~f1" ) do for /f "tokens=1,*" %%d in ( "%%b" ) do (
	rem We use this code to transform the "<?xml?>" declaration
	rem located at the very beginning of the file to the "polyglot"
	rem form to do it acceptable by the batch file.
	echo:%%a?%%d :
	echo:: %%e ?^>^<!--
	echo:@echo off
	echo:%CMDIZE_ENGINE% //nologo "%%~f0?.wsf" %%*
	echo:goto :EOF
	echo:: --%%c
	more +1 <"%~f1"
	goto :EOF
)
goto :EOF

rem EOF

add comment to enable running cmdize.bat with .hta files


@echo off

:: cleanup the includes folder

pushd ..\..\fifengine-dependencies\includes
rd share /s /q
move lib\x86\*.dll bin
move lib\x86\*.lib lib
rd lib\x86 /s /q
mkdir licenses
move lib\x86\*.txt licenses
popd

pushd ..\..\fifengine-dependencies\includes\lib
rd x64 /s /q
rd libpng /s /q
popd

@echo off

:: cleanup the includes folder

pushd %~dp0..\..\fifengine-dependencies\includes
rd share /s /q
move lib\x86\*.dll bin
move lib\x86\*.lib lib
rd lib\x86 /s /q
mkdir licenses
move lib\x86\*.txt licenses
popd

pushd %~dp0..\..\fifengine-dependencies\includes\lib
rd x64 /s /q
rd libpng /s /q
popd

use %~dp0 to make calling relative

use %~dp0 to make calling relative


:: backup all files excluding the data directory to dropbox
:: also exclude the SPICE .bsp files, which are huge
:: robocopy . c:\projects\voyager\backup /mir /xd data /xf *.bsp
robocopy . c:\users\bburns\gdrive\projects\voyager\backup /mir /xd data /xf *.bsp

add backup script

add backup script


mkdir build_cpp
cd build_cpp

cmake %SRC_DIR% -G "NMake Makefiles" ^
                -DCMAKE_PREFIX_PATH="%PREFIX%" ^
                -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
                -DCMAKE_BUILD_TYPE=Release ^
                -DBUILD_SHARED_LIBS=ON ^
                -DBUILD_EXAMPLES=OFF ^
                -DGTEST_ROOT="%PREFIX"
if errorlevel 1 exit 1

nmake
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1

mkdir build_cpp
cd build_cpp

cmake %SRC_DIR% -G "NMake Makefiles" ^
                -DCMAKE_PREFIX_PATH="%PREFIX%" ^
                -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
                -DCMAKE_BUILD_TYPE=Release ^
                -DBUILD_SHARED_LIBS=ON ^
                -DBUILD_EXAMPLES=OFF ^
                -UGTEST_ROOT
if errorlevel 1 exit 1

nmake
if errorlevel 1 exit 1

nmake install
if errorlevel 1 exit 1

fix disable tests on Windows

fix disable tests on Windows


REM SET BUILD=Debug
SET BUILD=Release

COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\release\latest\
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\release\latest\ServiceStack.Text\
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack\lib
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Contrib\lib
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Redis\lib
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.OrmLite\lib
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.Examples\lib
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\..\ServiceStack.RedisWebServices\lib

COPY ..\src\ServiceStack.Text.SL5\bin\%BUILD%\*.* ..\..\ServiceStack\lib\sl5

MD ..\NuGet\lib\net35
COPY ..\src\ServiceStack.Text\bin\%BUILD%\*.* ..\NuGet\lib\net35

add copy.bat

add copy.bat


@ECHO OFF
SETLOCAL
SET EL=0

ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 12 && SET msvs_toolset=12
SET NODE_MAJOR=%nodejs_version:~0,1%
IF %NODE_MAJOR% GTR 4 ECHO detected node v5, forcing msvs_toolset 14 && SET msvs_toolset=14

SET PATH=%CD%;%PATH%
SET msvs_version=2013
IF "%msvs_toolset%"=="14" SET msvs_version=2015

ECHO APPVEYOR^: %APPVEYOR%
ECHO nodejs_version^: %nodejs_version%
ECHO platform^: %platform%
ECHO msvs_toolset^: %msvs_toolset%
ECHO msvs_version^: %msvs_version%
ECHO TOOLSET_ARGS^: %TOOLSET_ARGS%

ECHO activating VS command prompt
:: NOTE this call makes the x64 -> X64
IF /I "%platform%"=="x64" ECHO x64 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
IF /I "%platform%"=="x86" ECHO x86 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using compiler^: && CALL cl
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using MSBuild^: && CALL msbuild /version && ECHO.
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO downloading/installing node
::only use Install-Product when using VS2013
::IF /I "%APPVEYOR%"=="True" IF /I "%msvs_toolset%"=="12" powershell Install-Product node $env:nodejs_version $env:Platform
::TESTING:
::always install (get npm matching node), but delete installed programfiles node.exe afterwards for VS2015 (using custom node.exe)
IF /I "%APPVEYOR%"=="True" GOTO APPVEYOR_INSTALL
GOTO SKIP_APPVEYOR_INSTALL

:APPVEYOR_INSTALL
IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x64
IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO node major version^: %NODE_MAJOR%
IF %NODE_MAJOR% GTR 0 ECHO node version greater than zero, not updating npm && GOTO SKIP_APPVEYOR_INSTALL

powershell Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:SKIP_APPVEYOR_INSTALL
IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED
IF %NODE_MAJOR% GTR 4 GOTO NODE_INSTALLED

::custom node for VS2015
SET ARCHPATH=
IF "%platform%"=="X64" (SET ARCHPATH=x64/)
IF "%platform%"=="x64" (SET ARCHPATH=x64/)
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
ECHO downloading node^: %NODE_URL%
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO deleting node ...
SET NODE_EXE_PRG=%ProgramFiles%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF EXIST "%ProgramFiles%\nodejs" ECHO copy custom node.exe to %ProgramFiles%\nodejs\ && COPY node.exe "%ProgramFiles%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NODE_EXE_PRG=%ProgramFiles(x86)%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF EXIST "%ProgramFiles(x86)%\nodejs" ECHO copy custom node.exe to %ProgramFiles(x86)%\nodejs\ && COPY node.exe "%ProgramFiles(x86)%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO delete node.exe in current directory && DEL node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NODE_INSTALLED

ECHO available node.exe^:
call where node
ECHO available npm^:
call where npm

ECHO node^: && call node -v
call node -e "console.log('  - arch:',process.arch,'\n  - argv:',process.argv,'\n  - execPath:',process.execPath)"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm^: && CALL npm -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO ===== where npm puts stuff START ============
ECHO npm root && CALL npm root
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm root -g && CALL npm root -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm bin && CALL npm bin
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm bin -g && CALL npm bin -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NPM_BIN_DIR=
FOR /F "tokens=*" %%i in ('CALL npm bin -g') DO SET NPM_BIN_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
ECHO ===== where npm puts stuff END ============

IF "%nodejs_version:~0,1%"=="0" npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="4" npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="5" npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

FOR /F "tokens=*" %%i in ('CALL node_modules\.bin\node-pre-gyp reveal module --silent') DO SET MODULE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
FOR /F "tokens=*" %%i in ('node -e "console.log(process.execPath)"') DO SET NODE_EXE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

dumpbin /DEPENDENTS "%NODE_EXE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
dumpbin /DEPENDENTS "%MODULE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

::skipping check for errorlevel npm test result when using io.js
::@springmeyer: how to proceed?
IF NOT "%nodejs_version%"=="1.8.1" IF NOT "%nodejs_version%"=="2.0.0" GOTO CHECK_NPM_TEST_ERRORLEVEL

ECHO calling npm test
CALL npm test
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================
ECHO using iojs, not checking test result!!!!!!!!!
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================

GOTO NPM_TEST_FINISHED

:CHECK_NPM_TEST_ERRORLEVEL
ECHO calling npm test
CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NPM_TEST_FINISHED

CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
::make commit message env var shorter
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing && CALL node_modules\.bin\node-pre-gyp --msvs_version=%msvs_version% publish %TOOLSET_ARGS%) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

:ERROR
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EXIT /b %EL%

@ECHO OFF
SETLOCAL
SET EL=0

ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

IF /I "%msvs_toolset%"=="" ECHO msvs_toolset unset, defaulting to 12 && SET msvs_toolset=12
SET NODE_MAJOR=%nodejs_version:~0,1%
IF %NODE_MAJOR% GTR 4 ECHO detected node v5, forcing msvs_toolset 14 && SET msvs_toolset=14

SET PATH=%CD%;%PATH%
SET msvs_version=2013
IF "%msvs_toolset%"=="14" SET msvs_version=2015

ECHO APPVEYOR^: %APPVEYOR%
ECHO nodejs_version^: %nodejs_version%
ECHO platform^: %platform%
ECHO msvs_toolset^: %msvs_toolset%
ECHO msvs_version^: %msvs_version%
ECHO TOOLSET_ARGS^: %TOOLSET_ARGS%

ECHO activating VS command prompt
:: NOTE this call makes the x64 -> X64
IF /I "%platform%"=="x64" ECHO x64 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
IF /I "%platform%"=="x86" ECHO x86 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using compiler^: && CALL cl
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using MSBuild^: && CALL msbuild /version && ECHO.
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO downloading/installing node
::only use Install-Product when using VS2013
::IF /I "%APPVEYOR%"=="True" IF /I "%msvs_toolset%"=="12" powershell Install-Product node $env:nodejs_version $env:Platform
::TESTING:
::always install (get npm matching node), but delete installed programfiles node.exe afterwards for VS2015 (using custom node.exe)
IF /I "%APPVEYOR%"=="True" GOTO APPVEYOR_INSTALL
GOTO SKIP_APPVEYOR_INSTALL

:APPVEYOR_INSTALL
IF /I "%platform%"=="x64" powershell Install-Product node $env:nodejs_version x64
IF /I "%platform%"=="x86" powershell Install-Product node $env:nodejs_version x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO node major version^: %NODE_MAJOR%
IF %NODE_MAJOR% GTR 0 ECHO node version greater than zero, not updating npm && GOTO SKIP_APPVEYOR_INSTALL

powershell Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:SKIP_APPVEYOR_INSTALL
IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED
IF %NODE_MAJOR% GTR 4 GOTO NODE_INSTALLED

::custom node for VS2015
SET ARCHPATH=
IF "%platform%"=="X64" (SET ARCHPATH=x64/)
IF "%platform%"=="x64" (SET ARCHPATH=x64/)
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
ECHO downloading node^: %NODE_URL%
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO deleting node ...
SET NODE_EXE_PRG=%ProgramFiles%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF EXIST "%ProgramFiles%\nodejs" ECHO copy custom node.exe to %ProgramFiles%\nodejs\ && COPY node.exe "%ProgramFiles%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NODE_EXE_PRG=%ProgramFiles(x86)%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF EXIST "%ProgramFiles(x86)%\nodejs" ECHO copy custom node.exe to %ProgramFiles(x86)%\nodejs\ && COPY node.exe "%ProgramFiles(x86)%\nodejs\"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO delete node.exe in current directory && DEL node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NODE_INSTALLED

ECHO available node.exe^:
call where node
ECHO available npm^:
call where npm

ECHO node^: && call node -v
call node -e "console.log('  - arch:',process.arch,'\n  - argv:',process.argv,'\n  - execPath:',process.execPath)"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm^: && CALL npm -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO ===== where npm puts stuff START ============
ECHO npm root && CALL npm root
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm root -g && CALL npm root -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm bin && CALL npm bin
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm bin -g && CALL npm bin -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NPM_BIN_DIR=
FOR /F "tokens=*" %%i in ('CALL npm bin -g') DO SET NPM_BIN_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
ECHO ===== where npm puts stuff END ============

IF "%nodejs_version:~0,1%"=="0" CALL npm install https://github.com/springmeyer/node-gyp/tarball/v3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="4" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF "%nodejs_version:~0,1%"=="5" CALL npm install node-gyp@3.x
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

FOR /F "tokens=*" %%i in ('CALL node_modules\.bin\node-pre-gyp reveal module --silent') DO SET MODULE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
FOR /F "tokens=*" %%i in ('node -e "console.log(process.execPath)"') DO SET NODE_EXE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

dumpbin /DEPENDENTS "%NODE_EXE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
dumpbin /DEPENDENTS "%MODULE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

::skipping check for errorlevel npm test result when using io.js
::@springmeyer: how to proceed?
IF NOT "%nodejs_version%"=="1.8.1" IF NOT "%nodejs_version%"=="2.0.0" GOTO CHECK_NPM_TEST_ERRORLEVEL

ECHO calling npm test
CALL npm test
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================
ECHO using iojs, not checking test result!!!!!!!!!
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================

GOTO NPM_TEST_FINISHED

:CHECK_NPM_TEST_ERRORLEVEL
ECHO calling npm test
CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NPM_TEST_FINISHED

CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
::make commit message env var shorter
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing && CALL node_modules\.bin\node-pre-gyp --msvs_version=%msvs_version% publish %TOOLSET_ARGS%) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

:ERROR
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EXIT /b %EL%

use CALL

use CALL


@ECHO OFF
SETLOCAL
SET EL=0

ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET PATH=%CD%;%PATH%
SET msvs_version=2013
IF "%msvs_toolset"=="14" SET msvs_version=2015

ECHO APPVEYOR^: %APPVEYOR%
ECHO nodejs_version^: %nodejs_version%
ECHO platform^: %platform%
ECHO msvs_toolset^: %msvs_toolset%
ECHO msvs_version^: %msvs_version%
ECHO TOOLSET_ARGS^: %TOOLSET_ARGS%

ECHO activating VS command prompt
:: NOTE this call makes the x64 -> X64
IF /I "%platform%"=="x64" ECHO x64 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
IF /I "%platform%"=="x86" ECHO x86 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using compiler^: && cl
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using MSBuild^: && msbuild /version && ECHO.
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO downloading/installing node
::only use Install-Product when using VS2013
::IF /I "%APPVEYOR%"=="True" IF /I "%msvs_toolset%"=="12" powershell Install-Product node $env:nodejs_version $env:Platform
::TESTING:
::always install (get npm matching node), but delete installed programfiles node.exe afterwards for VS2015 (using custom node.exe)
IF /I "%APPVEYOR%"=="True" powershell Install-Product node $env:nodejs_version $env:Platform
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED

::custom node for VS2015
SET ARCHPATH=
IF "%platform%"=="X64" (SET ARCHPATH=x64/)
IF "%platform%"=="x64" (SET ARCHPATH=x64/)
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
ECHO downloading node^: %NODE_URL%
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO deleting node ...
SET NODE_EXE_PRG=%ProgramFiles%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET NODE_EXE_PRG=%ProgramFiles(x86)%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NODE_INSTALLED

ECHO available node.exe^:
call where node
ECHO available npm^:
call where npm

ECHO node^: && node -v
call node -e "console.log(process.argv,process.execPath)"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm^: && CALL npm -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO ===== where npm puts stuff START ============
ECHO npm root && CALL npm root
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm root -g && CALL npm root -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm bin && CALL npm bin
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm bin -g && CALL npm bin -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NPM_BIN_DIR=
FOR /F "tokens=*" %%i in ('CALL npm bin -g') DO SET NPM_BIN_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
ECHO ===== where npm puts stuff END ============

ECHO installing node-gyp
CALL npm install -g node-gyp
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

FOR /F "tokens=*" %%i in ('CALL node_modules\.bin\node-pre-gyp reveal module --silent') DO SET MODULE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
FOR /F "tokens=*" %%i in ('node -e "console.log(process.execPath)"') DO SET NODE_EXE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

dumpbin /DEPENDENTS "%NODE_EXE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
dumpbin /DEPENDENTS "%MODULE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

::skipping check for errorlevel npm test result when using io.js
::@springmeyer: how to proceed?
IF NOT "%nodejs_version%"=="1.8.1" IF NOT "%nodejs_version%"=="2.0.0" GOTO CHECK_NPM_TEST_ERRORLEVEL

ECHO calling npm test
CALL npm test
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================
ECHO using iojs, not checking test result!!!!!!!!!
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================

GOTO NPM_TEST_FINISHED

:CHECK_NPM_TEST_ERRORLEVEL
ECHO calling npm test
CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NPM_TEST_FINISHED

CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
::make commit message env var shorter
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing && CALL node_modules\.bin\node-pre-gyp --msvs_version=%msvs_version% publish %TOOLSET_ARGS%) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

:ERROR
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EXIT /b %EL%

@ECHO OFF
SETLOCAL
SET EL=0

ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SET PATH=%CD%;%PATH%
SET msvs_version=2013
IF "%msvs_toolset"=="14" SET msvs_version=2015

ECHO APPVEYOR^: %APPVEYOR%
ECHO nodejs_version^: %nodejs_version%
ECHO platform^: %platform%
ECHO msvs_toolset^: %msvs_toolset%
ECHO msvs_version^: %msvs_version%
ECHO TOOLSET_ARGS^: %TOOLSET_ARGS%

ECHO activating VS command prompt
:: NOTE this call makes the x64 -> X64
IF /I "%platform%"=="x64" ECHO x64 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" amd64
IF /I "%platform%"=="x86" ECHO x86 && CALL "C:\Program Files (x86)\Microsoft Visual Studio %msvs_toolset%.0\VC\vcvarsall.bat" x86
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using compiler^: && CALL cl
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO using MSBuild^: && CALL msbuild /version && ECHO.
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO downloading/installing node
::only use Install-Product when using VS2013
::IF /I "%APPVEYOR%"=="True" IF /I "%msvs_toolset%"=="12" powershell Install-Product node $env:nodejs_version $env:Platform
::TESTING:
::always install (get npm matching node), but delete installed programfiles node.exe afterwards for VS2015 (using custom node.exe)
IF /I "%APPVEYOR%"=="True" powershell Install-Product node $env:nodejs_version $env:Platform
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

IF /I "%msvs_toolset%"=="12" GOTO NODE_INSTALLED

::custom node for VS2015
SET ARCHPATH=
IF "%platform%"=="X64" (SET ARCHPATH=x64/)
IF "%platform%"=="x64" (SET ARCHPATH=x64/)
SET NODE_URL=https://mapbox.s3.amazonaws.com/node-cpp11/v%nodejs_version%/%ARCHPATH%node.exe
ECHO downloading node^: %NODE_URL%
powershell Invoke-WebRequest "${env:NODE_URL}" -OutFile node.exe
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO deleting node ...
SET NODE_EXE_PRG=%ProgramFiles%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
SET NODE_EXE_PRG=%ProgramFiles(x86)%\nodejs\node.exe
IF EXIST "%NODE_EXE_PRG%" ECHO found %NODE_EXE_PRG%, deleting... && DEL /F "%NODE_EXE_PRG%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NODE_INSTALLED

ECHO available node.exe^:
call where node
ECHO available npm^:
call where npm

ECHO node^: && call node -v
call node -e "console.log(process.argv,process.execPath)"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm^: && CALL npm -v
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO ===== where npm puts stuff START ============
ECHO npm root && CALL npm root
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm root -g && CALL npm root -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

ECHO npm bin && CALL npm bin
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
ECHO npm bin -g && CALL npm bin -g
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

SET NPM_BIN_DIR=
FOR /F "tokens=*" %%i in ('CALL npm bin -g') DO SET NPM_BIN_DIR=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
IF /I "%NPM_BIN_DIR%"=="%CD%" ECHO ERROR npm bin -g equals local directory && SET ERRORLEVEL=1 && GOTO ERROR
ECHO ===== where npm puts stuff END ============

ECHO installing node-gyp
CALL npm install -g node-gyp
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

CALL npm install --build-from-source --msvs_version=%msvs_version% %TOOLSET_ARGS% --loglevel=http
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

FOR /F "tokens=*" %%i in ('CALL node_modules\.bin\node-pre-gyp reveal module --silent') DO SET MODULE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
FOR /F "tokens=*" %%i in ('node -e "console.log(process.execPath)"') DO SET NODE_EXE=%%i
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

dumpbin /DEPENDENTS "%NODE_EXE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR
dumpbin /DEPENDENTS "%MODULE%"
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

::skipping check for errorlevel npm test result when using io.js
::@springmeyer: how to proceed?
IF NOT "%nodejs_version%"=="1.8.1" IF NOT "%nodejs_version%"=="2.0.0" GOTO CHECK_NPM_TEST_ERRORLEVEL

ECHO calling npm test
CALL npm test
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================
ECHO using iojs, not checking test result!!!!!!!!!
ECHO ==========================================
ECHO ==========================================
ECHO ==========================================

GOTO NPM_TEST_FINISHED

:CHECK_NPM_TEST_ERRORLEVEL
ECHO calling npm test
CALL npm test
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

:NPM_TEST_FINISHED

CALL node_modules\.bin\node-pre-gyp package %TOOLSET_ARGS%
::make commit message env var shorter
SET CM=%APPVEYOR_REPO_COMMIT_MESSAGE%
IF NOT "%CM%" == "%CM:[publish binary]=%" (ECHO publishing && CALL node_modules\.bin\node-pre-gyp --msvs_version=%msvs_version% publish %TOOLSET_ARGS%) ELSE (ECHO not publishing)
IF %ERRORLEVEL% NEQ 0 GOTO ERROR

GOTO DONE

:ERROR
ECHO ~~~~~~~~~~~~~~~~~~~~~~ ERROR %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ECHO ERRORLEVEL^: %ERRORLEVEL%
SET EL=%ERRORLEVEL%

:DONE
ECHO ~~~~~~~~~~~~~~~~~~~~~~ DONE %~f0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EXIT /b %EL%

add more call [publish binary]

add more call [publish binary]


:: Open the input file at the input line.
::
:: Bug: The line doesn't work
::

"\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"

:: Open the input file at the input line.
::
:: Bug: The line doesn't work
::

:: VS2012
REM "c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"
:: VS2013
REM "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"
:: VS2015
"c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv" /Edit "%1" /Command "Edit.GoTo %2"

:: TODO: Can I detect which Visual Studio is running? Above is not a great solution. Maybe something like this?
REM :check
REM :: Note: tasklist does not return a valid exit code, so we need to use findstr.
REM tasklist /M UE4Editor-Core.dll | findstr "No tasks" > nul
REM IF ERRORLEVEL 1 (
REM 	IF x%1 NEQ x-f GOTO :check
REM )

Update VS open command to work with VS2015


@ECHO OFF

:: setup my variables
set OLDDIR=%CD%
SET "dir="D:\Archive\arccasperdeploy""
SET url=git@github.com:kaveh096/ArcCASPER.git

:: clean enviroment
IF NOT EXIST %dir% ( git clone %url% %dir% )
cd %dir%

:: call build function
call:buildFunc dev nightly
call:buildFunc master stable

goto :exit

:: ------------------------------------- build and post function
:buildFunc

:: switch to branch
git checkout %1
git pull

:: get hash of head
for /f %%i in ('git describe') do set revi=%%i
set "out=ArcCASPER-%revi%-%2%.zip"

:: TODO create changle.log from 'git shortlog --no-merges %1 --not v10.1'

:: check if there is new commit to be built
for /f %%i in ('d:\cygwin64\bin\bash.exe -c "/home/kshahabi/dropbox_uploader.sh list | grep %revi% | wc -l"') do set iscommit=%%i
if %iscommit%==1 (
  echo No new code is commited to %1% branch
  goto :eof
)

:: build clean
set NOREG=1
del /Q Package\EvcSolver32.*
del /Q Package\EvcSolver64.*
::msbuild.exe /m /target:rebuild /p:Configuration=Release /p:Platform=Win32 USC.GISResearchLab.ArcCASPER.sln
::msbuild.exe /m /target:rebuild /p:Configuration=Release /p:Platform=x64   USC.GISResearchLab.ArcCASPER.sln

:: Generate readme file
"c:\Program Files (x86)\GnuWin32\bin\sed.exe" -e "s/REV/%revi%/g" README.md > Package\README.md

:: post to dropbox
cd Package
"c:\Program Files\7-Zip\7z.exe" a %out% -i@file.list
if %errorlevel%==0 (
  echo Uploading to dropbox for public access
  d:\cygwin64\bin\bash.exe -c '/home/kshahabi/dropbox_uploader.sh upload `cygpath -u "%CD%\%out%"` %out%'
) else (
  echo Some of the files are not present
)
goto :eof
:: ------------------------------------- end of build function

:: restore current directory and then exit
:exit
chdir /d %OLDDIR%

@ECHO OFF

:: setup my variables
set OLDDIR=%CD%
SET "dir="D:\Archive\arccasperdeploy""
SET url=git@github.com:kaveh096/ArcCASPER.git

:: clean enviroment
IF NOT EXIST %dir% ( git clone %url% %dir% )
cd %dir%

:: call build function
call:buildFunc dev nightly
call:buildFunc master stable

goto :exit

:: ------------------------------------- build and post function
:buildFunc

:: switch to branch
git checkout %1
git pull

:: get hash of head
for /f %%i in ('git describe') do set revi=%%i
set "out=ArcCASPER-%revi%-%2%.zip"

:: TODO create changle.log from 'git shortlog --no-merges %1 --not v10.1'

:: check if there is new commit to be built
for /f %%i in ('d:\cygwin64\bin\bash.exe -c "/home/kshahabi/dropbox_uploader.sh list | grep %revi% | wc -l"') do set iscommit=%%i
if %iscommit%==1 (
  echo No new code is commited to %1% branch
  goto :eof
)

:: build clean
set NOREG=1
del /Q Package\EvcSolver32.*
del /Q Package\EvcSolver64.*
msbuild.exe /m /target:rebuild /p:Configuration=Release /p:Platform=Win32 USC.GISResearchLab.ArcCASPER.sln
msbuild.exe /m /target:rebuild /p:Configuration=Release /p:Platform=x64   USC.GISResearchLab.ArcCASPER.sln

:: Generate readme file
"c:\Program Files (x86)\GnuWin32\bin\sed.exe" -e "s/REV/%revi%/g" README.md > Package\README.md

:: post to dropbox
cd Package
"c:\Program Files\7-Zip\7z.exe" a %out% -i@file.list
if %errorlevel%==0 (
  echo Uploading to dropbox for public access
  d:\cygwin64\bin\bash.exe -c '/home/kshahabi/dropbox_uploader.sh upload `cygpath -u "%CD%\%out%"` %out%'
) else (
  echo Some of the files are not present
)
goto :eof
:: ------------------------------------- end of build function

:: restore current directory and then exit
:exit
chdir /d %OLDDIR%

deploy script updated to have revision number


@echo off
title [convert excel to json]
echo press any button to start.
@pause > nul
echo start converting ....
node index.js --export
@pause

@echo off
title [convert excel to json]
echo press any button to start.
@pause > nul
echo start converting ....
node index.js --export
echo convert over!
@pause

change bat echo

change bat echo


@SETLOCAL enableextensions enabledelayedexpansion
@ECHO OFF

SET CURRENT_DIR=%cd%

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

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

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

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

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

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

:NOT_FOUND

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

:CREATE_KEYSTORE

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

:OTHER_KEYSTORE_SET

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

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

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

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

@ENDLOCAL
GOTO :EOF
PAUSE >NUL

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

@SETLOCAL enableextensions enabledelayedexpansion
@ECHO OFF

SET CURRENT_DIR=%cd%

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

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

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

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

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

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

:NOT_FOUND

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

:CREATE_KEYSTORE

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

:OTHER_KEYSTORE_SET

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

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

:MAKE_APK
SET ARCH=arm
SET MODE=embedded

CHOICE /C YN -M "FPS   Ȯմϱ?"
IF %ERRORLEVEL%==1 (
SET XCL='--show-fps-counter'
) ELSE (
SET XCL='--ignore-gpu-blacklist'
)

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

CHOICE /C YN -M "  带 Ѱڽϱ?"
IF %ERRORLEVEL%==1 (
%XWALK_ARGS% --enable-remote-debugging
) ELSE (
%XWALK_ARGS%
)

@ENDLOCAL
GOTO :EOF
PAUSE >NUL

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

build file updated

build file updated


java -Dloader.path="..\lib\webapps\camunda-rest-distro-webapps-1.0-SNAPSHOT.jar, ..\lib\db\*" -jar ..\lib\camunda-rest-distro-1.0-SNAPSHOT.jar --spring.config.location=file:..\config\application.yml

@echo off

SET webappsPath=..\lib\webapps\camunda-rest-distro-webapps-1.0-SNAPSHOT.jar,
SET libPath=..\lib\db\*

IF "%1"=="--webapps" (
	SET classPath=%webappsPath%%libPath%
	ECHO starting with webapps
	) else (
	SET classPath=%libPath%
	ECHO starting without webapps
	)

start java -Dloader.path="%classPath%" -jar ..\lib\camunda-rest-distro-1.0-SNAPSHOT.jar --spring.config.location=file:..\config\application.yml

improve start script for windows

feature(script): improve start script for windows

 Related to CAM-10401


@echo off
#
#  This command prepares the www directory for the examples
#

set SCRIPT_DIR=%~dp0
set SUPPORT_DIR=%SCRIPT_DIR%..\..\support
set WWW_DIR=%SCRIPT_DIR%..\www

echo Copying www support files to: %WWW_DIR%:
echo.
xcopy %SUPPORT_DIR%\bootstrap\* %WWW_DIR% /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\jquery\* %WWW_DIR% /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\rulehunter\* %WWW_DIR% /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\html5shiv\js\* %WWW_DIR%\js /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\respond\js\* %WWW_DIR%\js /e /i /y | find /v "File(s) copied"

@echo off
rem
rem  This command prepares the www directory for the examples
rem

set SCRIPT_DIR=%~dp0
set SUPPORT_DIR=%SCRIPT_DIR%..\..\support
set WWW_DIR=%SCRIPT_DIR%..\www

echo Copying www support files to: %WWW_DIR%:
echo.
xcopy %SUPPORT_DIR%\bootstrap\* %WWW_DIR% /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\jquery\* %WWW_DIR% /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\rulehunter\* %WWW_DIR% /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\html5shiv\js\* %WWW_DIR%\js /e /i /y | find /v "File(s) copied"
xcopy %SUPPORT_DIR%\respond\js\* %WWW_DIR%\js /e /i /y | find /v "File(s) copied"

Correct comment syntax in init_www_windows.bat


ECHO CHOCO INSTALL
choco install docfx --version 2.40.11 --allow-downgrade  -y || exit /b
ECHO NUGET RESTORE
nuget restore mapsui.sln
ECHO DOCFX
docfx docfx\docfx.json || exit /b
ECHO DELETE docs
del docs /s /q || exit /b
REM the CNAME file is generated in the doc folder when added through the github
REM settings page. Apparently github uses this file to determine the custom
REM domain. The line above deletes the whole docs folder so we need to copy it
REM from the docfx folder. If we ever want to change the custom domain settings
REM we need to alter the docfx\CNAME file and not use the github settings page.
ECHO COPY CNAME
copy docfx\CNAME docs /Y || exit /b
ECHO COPY _site TO docs
xcopy docfx\_site docs /E /Y || exit /b

ECHO CHOCO INSTALL
choco install docfx --version 2.45.1 --allow-downgrade  -y || exit /b
ECHO NUGET RESTORE
nuget restore mapsui.sln
ECHO DOCFX
docfx docfx\docfx.json || exit /b
ECHO DELETE docs
del docs /s /q || exit /b
REM the CNAME file is generated in the doc folder when added through the github
REM settings page. Apparently github uses this file to determine the custom
REM domain. The line above deletes the whole docs folder so we need to copy it
REM from the docfx folder. If we ever want to change the custom domain settings
REM we need to alter the docfx\CNAME file and not use the github settings page.
ECHO COPY CNAME
copy docfx\CNAME docs /Y || exit /b
ECHO COPY _site TO docs
xcopy docfx\_site docs /E /Y || exit /b

Use docfx 2.45.1

Use docfx 2.45.1


echo off

call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"

set dir_bin_debug=bin\\debug
set dir_bin_release=bin\\release
set dir_extern_dll=extern\\_dll
set dir_assimp=extern\assimp
set dir_assimp_vs_solution=%dir_assimp%\_vs_solution

echo [copy dependencies]
echo:
RD /S /Q %dir_bin_debug% %dir_bin_release% %dir_assimp_vs_solution% %dir_assimp_vs_solution%
md %dir_bin_debug%
md %dir_bin_release%
md %dir_assimp_vs_solution%

for %%i in (.\\%dir_extern_dll%\\debug\\*) do (
	copy /Y /b %%i %dir_bin_debug%\\ >nul
)

for %%i in (.\\%dir_extern_dll%\\release\\*) do (
	copy /Y /b %%i %dir_bin_release%\\ >nul
)

echo [fetch submodules]
echo:
git submodule init
git submodule update
sleep 2

echo [init assimp: library]
echo:
pushd %dir_assimp_vs_solution%
	cmake ..
popd

pause

echo off

call "c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"

set dir_bin_debug=bin\\debug
set dir_bin_release=bin\\release
set dir_extern_dll=extern\\_dll
set dir_assimp=extern\assimp
set dir_assimp_vs_solution=%dir_assimp%\_vs_solution

echo [copy dependencies]
echo:
RD /S /Q %dir_bin_debug% %dir_bin_release% %dir_assimp_vs_solution% %dir_assimp_vs_solution%
md %dir_bin_debug%
md %dir_bin_release%

for %%i in (.\\%dir_extern_dll%\\debug\\*) do (
	copy /Y /b %%i %dir_bin_debug%\\ >nul
)

for %%i in (.\\%dir_extern_dll%\\release\\*) do (
	copy /Y /b %%i %dir_bin_release%\\ >nul
)

echo [fetch submodules]
echo:
git submodule init
git submodule update
sleep 2

echo [init assimp: library]
echo:
md %dir_assimp_vs_solution%
pushd %dir_assimp_vs_solution%
	cmake ..
popd

pause

fix init.cmd

fix init.cmd


@echo off
REM $PostgreSQL: pgsql/src/tools/msvc/install.bat,v 1.1 2007/05/01 20:11:14 mha Exp $

if NOT "%1"=="" GOTO RUN_INSTALL

echo Invalid command line options.
echo Usage: "install.bat <path>"
echo.
exit /b 1

:RUN_INSTALL

SETLOCAL
if exist buildenv.bat call buildenv.bat

perl install.pl "%1"

exit /b %ERRORLEVEL%

Add wrapper script around install.pl that calls buildenv.bat before doing
the install.

Dave Page


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

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

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

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

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

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

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

goto fail

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

if exist "%JAVA_EXE%" goto init

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

goto fail

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

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

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

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

set CMD_LINE_ARGS=%*
goto execute

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

:execute
@rem Setup the command line

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

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

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

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

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

:omega

fix gradlew.bat

fix gradlew.bat