rem
rem  This script runs the nightly build.
rem

@echo off

set BUILD_ROOT=C:\builds
set BRANCH=master
set GIT_REPO_ROOT="/git/xtuml"
echo set BUILD_ROOT=%BUILD_ROOT%
echo set BRANCH=%BRANCH%
echo set GIT_REPO_ROOT=%GIT_REPO_ROOT%

C:
chdir %BUILD_ROOT%

path c:\cygwin\bin;%Path%

unix2dos init_git_repositories.sh
bash init_git_repositories.sh "%BRANCH%" "%GIT_REPO_ROOT%" "yes"

cp -fv %GIT_REPO_ROOT%/internal/utilities/build/configure_build_process.sh .
unix2dos configure_build_process.sh
bash configure_build_process.sh %BRANCH% %GIT_REPO_ROOT% nonrelease 1>2> cfg_output.log

bash create_bp_release.sh %BRANCH% %GIT_REPO_ROOT% 1>2> nb_output.log
rem change to post_process_build bash create_nightly_build.sh %BRANCH% nonrelease 1>2> nb_output.log

echo end of run_nightly_build_git.bat

rem
rem  This script runs the nightly build.
rem
rem  Since it is the starting point for the build chain, it must be manually put into
rem  place for the build server to run.
rem

@echo off

set BUILD_ROOT=C:\builds
set BRANCH=master
set SVN_BRANCH=trunk
set GIT_REPO_ROOT="/git/xtuml"
echo set BUILD_ROOT=%BUILD_ROOT%
echo set BRANCH=%BRANCH%
echo set SVN_BRANCH=%SVN_BRANCH%
echo set GIT_REPO_ROOT=%GIT_REPO_ROOT%

C:
chdir %BUILD_ROOT%

path c:\cygwin\bin;%Path%

unix2dos init_git_repositories.sh
bash init_git_repositories.sh "%BRANCH%" "%GIT_REPO_ROOT%" "yes"

unix2dos configure_eclipse_base.sh
bash configure_eclipse_base.sh "%BRANCH%"

cp -fv %GIT_REPO_ROOT%/internal/utilities/build/configure_build_process.sh .
unix2dos configure_build_process.sh
bash configure_build_process.sh %BRANCH% %GIT_REPO_ROOT% nonrelease 1>2> cfg_output.log

bash create_bp_release.sh %BRANCH% %GIT_REPO_ROOT% 1>2> nb_output.log
rem change to post_process_build bash create_nightly_build.sh %BRANCH% nonrelease 1>2> nb_output.log

echo end of run_nightly_build_git.bat

Update run_nightly_build_git.bat

Update run_nightly_build_git.bat

Job: #1
Adding note about manual placement and hooking in SVN export script.


@call set_vars.bat

@set QTPATHF=%QTPATH:/=\%
@set MINGWQTPATHF=%MINGWQTPATH:/=\%

@echo namecoind DLLs
copy %MINGWQTPATHF%\libgcc_s_dw2-1.dll %ROOTPATH%\src\
copy "%MINGWQTPATHF%\libstdc++-6.dll" %ROOTPATH%\src\

copy %QTPATHF%\libwinpthread-1.dll %ROOTPATH%\src\

@echo namecoin-qt DLLs
copy %MINGWQTPATHF%\libgcc_s_dw2-1.dll %ROOTPATH%\release\
copy "%MINGWQTPATHF%\libstdc++-6.dll" %ROOTPATH%\release\

copy %QTPATHF%\Qt5Core.dll %ROOTPATH%\release\
copy %QTPATHF%\Qt5Gui.dll %ROOTPATH%\release\
copy %QTPATHF%\Qt5Widgets.dll %ROOTPATH%\release\
copy %QTPATHF%\Qt5Network.dll %ROOTPATH%\release\
copy %QTPATHF%\libwinpthread-1.dll %ROOTPATH%\release\
copy %QTPATHF%\icuin52.dll %ROOTPATH%\release\
copy %QTPATHF%\icuuc52.dll %ROOTPATH%\release\
copy %QTPATHF%\icudt52.dll %ROOTPATH%\release\

mkdir %ROOTPATH%\release\platforms
copy %QTPATHF%\..\plugins\platforms\qwindows.dll %ROOTPATH%\release\platforms

@if not "%RUNALL%"=="1" pause

@call set_vars.bat

@set QTPATHF=%QTPATH:/=\%
@set MINGWQTPATHF=%MINGWQTPATH:/=\%

@echo denemecoind DLLs
copy %MINGWQTPATHF%\libgcc_s_dw2-1.dll %ROOTPATH%\src\
copy "%MINGWQTPATHF%\libstdc++-6.dll" %ROOTPATH%\src\

copy %QTPATHF%\libwinpthread-1.dll %ROOTPATH%\src\

@echo denemecoin-qt DLLs
copy %MINGWQTPATHF%\libgcc_s_dw2-1.dll %ROOTPATH%\release\
copy "%MINGWQTPATHF%\libstdc++-6.dll" %ROOTPATH%\release\

copy %QTPATHF%\Qt5Core.dll %ROOTPATH%\release\
copy %QTPATHF%\Qt5Gui.dll %ROOTPATH%\release\
copy %QTPATHF%\Qt5Widgets.dll %ROOTPATH%\release\
copy %QTPATHF%\Qt5Network.dll %ROOTPATH%\release\
copy %QTPATHF%\libwinpthread-1.dll %ROOTPATH%\release\
copy %QTPATHF%\icuin52.dll %ROOTPATH%\release\
copy %QTPATHF%\icuuc52.dll %ROOTPATH%\release\
copy %QTPATHF%\icudt52.dll %ROOTPATH%\release\

mkdir %ROOTPATH%\release\platforms
copy %QTPATHF%\..\plugins\platforms\qwindows.dll %ROOTPATH%\release\platforms

@if not "%RUNALL%"=="1" pause

Update 6_gather_dlls.bat

Update 6_gather_dlls.bat


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

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

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

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

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

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

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

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

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

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

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

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

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

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

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

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

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

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

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

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

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

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

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

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

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

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

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

powercfg -hibernate on
REAGENTC.EXE /enable
rem "%WINDIR%\Setup-githubbox.exe"
rem shutdown /r /f /t 0

Update SetupComplete.cmd

Update SetupComplete.cmd


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

if exist generated (
  rmdir /s /q generated
)
mkdir generated\include generated\common

python ../vk-generate.py Android dispatch-table-ops layer > generated/include/vk_dispatch_table_helper.h

python ../vk_helper.py --gen_enum_string_helper ../include/vulkan/vulkan.h --abs_out_dir generated/include
python ../vk_helper.py --gen_struct_wrappers ../include/vulkan/vulkan.h --abs_out_dir generated/include

cd generated/include
python ../../../genvk.py threading -registry ../../../vk.xml thread_check.h
python ../../../genvk.py paramchecker -registry ../../../vk.xml parameter_validation.h
python ../../../genvk.py unique_objects -registry ../../../vk.xml unique_objects_wrappers.h
cd ../..

copy /Y ..\layers\vk_layer_config.cpp   generated\common\
copy /Y ..\layers\vk_layer_extension_utils.cpp  generated\common\
copy /Y ..\layers\vk_layer_utils.cpp    generated\common\
copy /Y ..\layers\vk_layer_table.cpp    generated\common\
copy /Y ..\layers\descriptor_sets.cpp   generated\common\

REM create build-script root directory
mkdir generated\gradle-build
cd generated\gradle-build
mkdir  core_validation image object_tracker parameter_validation swapchain threading unique_objects
cd ..\..
mkdir generated\layer-src
cd generated\layer-src
mkdir  core_validation image object_tracker parameter_validation swapchain threading unique_objects
cd ..\..
xcopy /s gradle-templates\*   generated\gradle-build\
for %%G in (core_validation image object_tracker parameter_validation swapchain threading) Do (
    copy ..\layers\%%G.cpp   generated\layer-src\%%G
    echo apply from: "../common.gradle"  > generated\gradle-build\%%G\build.gradle
)
copy generated\common\descriptor_sets.cpp generated\layer-src\core_validation\descriptor_sets.cpp
copy generated\include\vk_safe_struct.cpp generated\layer-src\core_validation\vk_safe_struct.cpp
move generated\include\vk_safe_struct.cpp generated\layer-src\unique_objects\vk_safe_struct.cpp
echo apply from: "../common.gradle"  > generated\gradle-build\unique_objects\build.gradle

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

if exist generated (
  rmdir /s /q generated
)
mkdir generated\include generated\common

python ../vk-generate.py Android dispatch-table-ops layer > generated/include/vk_dispatch_table_helper.h

python ../vk_helper.py --gen_enum_string_helper ../include/vulkan/vulkan.h --abs_out_dir generated/include
python ../vk_helper.py --gen_struct_wrappers ../include/vulkan/vulkan.h --abs_out_dir generated/include

cd generated/include
python ../../../genvk.py threading -registry ../../../vk.xml thread_check.h
python ../../../genvk.py paramchecker -registry ../../../vk.xml parameter_validation.h
python ../../../genvk.py unique_objects -registry ../../../vk.xml unique_objects_wrappers.h
cd ../..

copy /Y ..\layers\vk_layer_config.cpp   generated\common\
copy /Y ..\layers\vk_layer_extension_utils.cpp  generated\common\
copy /Y ..\layers\vk_layer_utils.cpp    generated\common\
copy /Y ..\layers\vk_layer_table.cpp    generated\common\
copy /Y ..\layers\descriptor_sets.cpp   generated\common\

REM create build-script root directory
mkdir generated\gradle-build
cd generated\gradle-build
mkdir  core_validation image object_tracker parameter_validation swapchain threading unique_objects
cd ..\..
mkdir generated\layer-src
cd generated\layer-src
mkdir  core_validation image object_tracker parameter_validation swapchain threading unique_objects
cd ..\..
xcopy /s gradle-templates\*   generated\gradle-build\
for %%G in (core_validation image object_tracker parameter_validation swapchain threading unique_objects) Do (
    copy ..\layers\%%G.cpp   generated\layer-src\%%G
    echo apply from: "../common.gradle"  > generated\gradle-build\%%G\build.gradle
)
copy generated\common\descriptor_sets.cpp generated\layer-src\core_validation\descriptor_sets.cpp
copy generated\include\vk_safe_struct.cpp generated\layer-src\core_validation\vk_safe_struct.cpp
move generated\include\vk_safe_struct.cpp generated\layer-src\unique_objects\vk_safe_struct.cpp
echo apply from: "../common.gradle"  > generated\gradle-build\unique_objects\build.gradle

Fix Android Windows build script

Fix Android Windows build script


@echo off
@setlocal

set BASEDIR=%~dp0
set APPNAME=blogapp
set APPDIR=%BASEDIR%%APPNAME%
set DBFILE=%APPDIR%\db\dbfile
set PORT=8800
set MAKE=nmake VERBOSE=1

for %%I in (sqlite3.exe) do if exist %%~$path:I set SQLITE=%%~$path:I
if "%SQLITE%" == "" for %%I in (sqlite3-bin.exe) do if exist %%~$path:I set SQLITE=%%~$path:I

cd /D %BASEDIR%
call :Which tfenv.bat
if not "%TFENV%" == "" (
  call "%TFENV%"
) else (
  call "..\..\..\tfenv.bat"
)

cd /D %BASEDIR%
rd /Q /S %APPNAME%
tspawn new %APPNAME%
if "%SQLITE%" == "" (
  echo;
  echo sqlite.exe command not found.
  call :CleanUp
  pause
  exit /B 1
)
"%SQLITE%" %DBFILE% < create_blog_table.sql

cd %APPNAME%
tspawn s blog
tspawn w foo

:: Test in debug mode
call :CMakeBuild Debug
call :CheckWebApp treefrogd

call :QMakeBuild debug
call :CheckWebApp treefrogd
%MAKE% distclean >nul 2>nul

:: Test in release mode
call :CMakeBuild Release
call :CheckWebApp treefrog
%MAKE% clean  >nul 2>nul

call :QMakeBuild release
call :CheckWebApp treefrog
%MAKE% distclean >nul 2>nul

echo;
echo Test OK
call :CleanUp
exit /B 0

::
:: Build by cmake
::
:CMakeBuild
cd /D %APPDIR%
if exist build rd /Q /S build
mkdir build >nul 2>nul
cd build
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=%1 ..
%MAKE%
if ERRORLEVEL 1 (
  echo;
  echo Build Error!
  call :CleanUp
  exit /B 1
)
exit /B 0

::
:: Build by qmake
::
:QMakeBuild
cd /D %APPDIR%
qmake -r CONFIG+=%1
%MAKE%
if ERRORLEVEL 1 (
  echo;
  echo Build Error!
  call :CleanUp
  exit /B 1
)
exit /B 0

::
:: Check WebApp
::
:CheckWebApp
echo on
cd /D %APPDIR%
echo;
echo Starting webapp..
set RES=1
"%1" -e dev -d -p %PORT% %APPDIR%
if ERRORLEVEL 1 (
  echo App Start Error!
)

timeout 1 /nobreak >nul
set URL=http://localhost:%PORT%/blog
set CMD=curl -s "%URL%" -w "%%{http_code}" -o nul
set RESCODE=0
for /f "usebackq delims=" %%a in (`%CMD%`) do set RESCODE=%%a
"%1" -k stop %APPDIR%
if ERRORLEVEL 1 (
  "%1" -k abort %APPDIR%
)
timeout 1 /nobreak >nul
if not "%RESCODE%"=="200" (
  echo HTTP request failed
  echo;
  echo App Test Error!
  call :CleanUp
  exit /B 1
)
echo HTTP request success "%URL%"
exit /B 0

::
:: CleanUp Subroutine
::
:CleanUp
cd /D %BASEDIR%
rd /Q /S %APPNAME%
exit /B 0

:: which cmd
:Which
for %%I in (%1 %1.com %1.exe %1.bat %1.cmd %1.vbs %1.js %1.wsf) do if exist %%~$path:I SET TFENV=%%~$path:I
exit /B

@echo off
@setlocal

set BASEDIR=%~dp0
set APPNAME=blogapp
set APPDIR=%BASEDIR%%APPNAME%
set DBFILE=%APPDIR%\db\dbfile
set PORT=8800
set MAKE=nmake VERBOSE=1

for %%I in (sqlite3.exe) do if exist %%~$path:I set SQLITE=%%~$path:I
if "%SQLITE%" == "" for %%I in (sqlite3-bin.exe) do if exist %%~$path:I set SQLITE=%%~$path:I

cd /D %BASEDIR%
call :Which tfenv.bat
if not "%TFENV%" == "" (
  call "%TFENV%"
) else (
  call "..\..\..\tfenv.bat"
)

cd /D %BASEDIR%
rd /Q /S %APPNAME%
tspawn new %APPNAME%
if "%SQLITE%" == "" (
  echo;
  echo sqlite.exe command not found.
  call :CleanUp
  pause
  exit /B 1
)
"%SQLITE%" %DBFILE% < create_blog_table.sql

cd %APPNAME%
tspawn s blog
tspawn w foo

:: Test in debug mode
call :CMakeBuild Debug
call :CheckWebApp treefrogd

call :QMakeBuild debug
call :CheckWebApp treefrogd
%MAKE% distclean >nul 2>nul

:: Test in release mode
call :CMakeBuild Release
call :CheckWebApp treefrog
%MAKE% clean  >nul 2>nul

call :QMakeBuild release
call :CheckWebApp treefrog
%MAKE% distclean >nul 2>nul

echo;
echo Test OK
call :CleanUp
exit /B 0

::
:: Build by cmake
::
:CMakeBuild
cd /D %APPDIR%
if exist build rd /Q /S build
mkdir build >nul 2>nul
cd build
cmake -G"NMake Makefiles" -DCMAKE_BUILD_TYPE=%1 ..
%MAKE%
if ERRORLEVEL 1 (
  echo;
  echo Build Error!
  call :CleanUp
  exit /B 1
)
exit /B 0

::
:: Build by qmake
::
:QMakeBuild
cd /D %APPDIR%
qmake -r CONFIG+=%1
%MAKE%
if ERRORLEVEL 1 (
  echo;
  echo Build Error!
  call :CleanUp
  exit /B 1
)
exit /B 0

::
:: Check WebApp
::
:CheckWebApp
cd /D %APPDIR%
echo;
echo Starting webapp..
set RES=1
"%1" -e dev -d -p %PORT% %APPDIR%
if ERRORLEVEL 1 (
  echo App Start Error!
)

timeout 1 /nobreak >nul
set URL=http://localhost:%PORT%/blog
set CMD=curl -s "%URL%" -w "%%{http_code}" -o nul
set RESCODE=0
for /f "usebackq delims=" %%a in (`%CMD%`) do set RESCODE=%%a
"%1" -k stop %APPDIR%
if ERRORLEVEL 1 (
  "%1" -k abort %APPDIR%
)
timeout 1 /nobreak >nul
if not "%RESCODE%"=="200" (
  echo HTTP request failed
  echo;
  echo App Test Error!
  call :CleanUp
  exit /B 1
)
echo HTTP request success "%URL%"
exit /B 0

::
:: CleanUp Subroutine
::
:CleanUp
cd /D %BASEDIR%
rd /Q /S %APPNAME%
exit /B 0

:: which cmd
:Which
for %%I in (%1 %1.com %1.exe %1.bat %1.cmd %1.vbs %1.js %1.wsf) do if exist %%~$path:I SET TFENV=%%~$path:I
exit /B

update releasetest.bat

update releasetest.bat


rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN
rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN
rem slink /psx /c /p /rmips=SPEC_PSX/TITSEQ.REL @SPEC_PSX/TITSEQ.LNK,SPEC_PSX/TITSEQ.BIN
psylink /c /p /q /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
psylink /c /p /q /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN
psylink /c /p /q /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN
psylink /c /p /q /rmips=SPEC_PSX/TITSEQ.REL @SPEC_PSX/TITSEQ.LNK,SPEC_PSX/TITSEQ.BIN
DEL2FAB /c+ GAME/SETUP

rem slink /psx /c /p /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
rem slink /psx /c /p /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN
rem slink /psx /c /p /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN
rem slink /psx /c /p /rmips=SPEC_PSX/TITSEQ.REL @SPEC_PSX/TITSEQ.LNK,SPEC_PSX/TITSEQ.BIN
psylink /c /p /q /rmips=GAME/SETUP.REL @GAME/SETUP.LNK,GAME/SETUP.BIN
psylink /c /p /q /rmips=GAME/ANDY3.REL @GAME/ANDY3.LNK,GAME/ANDY3.BIN
psylink /c /p /q /rmips=GAME/JOBY5.REL @GAME/JOBY5.LNK,GAME/JOBY5.BIN
psylink /c /p /q /rmips=SPEC_PSX/TITSEQ.REL @SPEC_PSX/TITSEQ.LNK,SPEC_PSX/TITSEQ.BIN
psylink /c /p /q /rmips=SPEC_PSX/LARA1.REL @SPEC_PSX/LARA1.LNK,SPEC_PSX/LARA1.BIN
DEL2FAB /c+ GAME/SETUP

Update overlay export list.

[Specific-PSX] Update overlay export list.


REM @echo off
REM Deploy the given app using the given deployment profile.
REM   %1, the path to the project.
REM   %2, where to publish the app.
REM   %3, the path to the publish settings.

setlocal

echo "Building and deploying the app from %1, using profile %2."
msbuild "%~1" ^
  /p:Configuration=Release ^
  /p:Platform=AnyCPU ^
  /t:WebPublish ^
  /p:WebPublishMethod=FileSystem ^
  /p:DeleteExistingFiles=True ^
  /p:publishUrl="%~2"

set default_site="Default Web Site"
set msdeploy_path="%ProgramFiles%\IIS\Microsoft Web Deploy V3\msdeploy.exe"

echo "Deploying using the profile %3."
%msdeploy_path% ^
  -verb:sync ^
  -source:contentPath="%~2" ^
  -dest:contentPath=%default_site%,publishSettings="%~3" ^
  -allowUntrusted

echo "Done."

@echo off
REM Deploy the given app using the given deployment profile.
REM   %1, the path to the project.
REM   %2, where to publish the app.
REM   %3, the path to the publish settings.

setlocal

echo "Ensuring output directory exists %~2"
mkdir "%~2"

echo "Building and deploying project %1."
msbuild "%~1" ^
  /p:Configuration=Release ^
  /p:Platform=AnyCPU ^
  /t:WebPublish ^
  /p:WebPublishMethod=FileSystem ^
  /p:DeleteExistingFiles=True ^
  /p:publishUrl="%~2"

REM Should the website be specified?
set default_site="Default Web Site"
set msdeploy_path="%ProgramFiles%\IIS\Microsoft Web Deploy V3\msdeploy.exe"

echo "Deploying using the profile %3."
%msdeploy_path% ^
  -verb:sync ^
  -source:contentPath="%~2" ^
  -dest:contentPath=%default_site%,publishSettings="%~3" ^
  -allowUntrusted

echo "Done."

Hide statements, better output.

Hide statements, better output.


@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

mkdir qtcreator-latest
mklink /D %QT_DIR% qtcreator-latest\Qt
if "%VERSION%"=="" set VERSION=debug
echo %VERSION%>qtcreator-latest\version

if exist qtcreator-latest/src goto build

mkdir download
if not exist download/src.zip  curl -fsSLk -o download\src.zip http://download.qt.io/official_releases/qtcreator/4.3/4.3.1/qt-creator-opensource-src-4.3.1.zip
unzip -qq download\src.zip -d qtcreator-latest
move qtcreator-latest\qt-creator* qtcreator-latest\src

:build

if exist qtcreator-latest\compiled\bin\qtcreator.exe goto end

mkdir qtcreator-latest\compiled
cd qtcreator-latest\compiled
qmake QMAKE_CXXFLAGS+=/MP ..\src
nmake /S
cd ..\..

:end

@echo off

set SELF_PATH=%~dp0
call %SELF_PATH%\env.bat

mkdir qtcreator-latest
mklink /D %QT_DIR% qtcreator-latest\Qt
if "%VERSION%"=="" set VERSION=debug
echo %VERSION%>qtcreator-latest\version

if exist qtcreator-latest/src goto build

mkdir download
if not exist download/src.zip  curl -fsSLk -o download\src.zip http://download.qt.io/official_releases/qtcreator/4.3/4.3.1/qt-creator-opensource-src-4.3.1.zip
unzip -qq download\src.zip -d qtcreator-latest
move qtcreator-latest\qt-creator* qtcreator-latest\src

:build

if exist qtcreator-latest\compiled\bin\qtcreator.exe goto end

mkdir qtcreator-latest\compiled
cd qtcreator-latest\compiled
qmake QMAKE_CXXFLAGS+=/MP ..\src
nmake /S
rd /Q /S src
cd ..\..

:end

Remove unnecessary data from cache.

Remove unnecessary data from cache.


@echo off
CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 /t:RunBenchmarks %1 %2 %3 %4 "/p:BuildConfiguration=Debug;TargetVersion=2"

@echo off
CMD.exe /Q /C "CD %~dp0 && %WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe build.csproj /toolsversion:4.0 /t:Rebuild %1 %2 %3 %4 "/p:BuildConfiguration=Debug_Silverlight;TargetVersion=2"

Fix for incorrect Target/Configuration

Fix for incorrect Target/Configuration


bii cpp:configure -D"CMAKE_MAKE_PROGRAM:FILEPATH=D:/MinGW/bin/make.exe" -D"CMAKE_CXX_FLAGS:STRING=-std=c++1y"

bii cpp:configure -G "MinGW Makefiles" -D"CMAKE_MAKE_PROGRAM:FILEPATH=C:/MinGW/bin/make.exe" -D"CMAKE_CXX_FLAGS:STRING=-std=c++11"

fix my mingw path

[minor] fix my mingw path


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

SETLOCAL EnableDelayedExpansion

SET METAFACTURE_HOME=%~dp0

REM Use the java command available on the path by default.
REM Define FLUX_JAVA_BIN in your environment to use a
REM different executable.
IF "x%FLUX_JAVA_BIN%" == "x" (
    SET FLUX_JAVA_BIN=java
)

SET JAVA_OPTS_FILE="%METAFACTURE_HOME%\config\java-options.conf"
SET JAR_FILE="%METAFACTURE_HOME%@jarfile@"

REM Read JVM options from configuration file. Lines starting
REM with # are treated as comments. Empty lines are ignored.
REM
REM The space character at the end of the following
REM line is important and must not be removed:
SET JAVA_OPTS=
<%JAVA_OPTS_FILE% (
    FOR /F %%I IN ('FINDSTR /N "^" %JAVA_OPTS_FILE%') DO (
        SET  /P LINE=
        IF NOT "x!LINE!" == "x" (
            SET FIRST=!LINE:~0,1!
            IF NOT "!FIRST!" == "#" (
                SET JAVA_OPTS=!JAVA_OPTS! !LINE!
            )
        )
        SET LINE=
    )
)

REM Substitute environment variables in the configuration.
REM Undefined variables remain in the configuration. Since
REM FLUX_JAVA_OPTIONS is included in the configuration by
REM default we make sure that it can always be substituted.
IF "x%FLUX_JAVA_OPTIONS%" == "x" (
    REM The space character at the end of the following
    REM line is important and must not be removed:
    SET FLUX_JAVA_OPTIONS=
)
FOR /F "tokens=1,* delims==" %%I IN ('SET') DO (
    SET JAVA_OPTS=!JAVA_OPTS:$%%I=%%J!
)

REM Start flux:
%FLUX_JAVA_BIN% !JAVA_OPTS! -jar %JAR_FILE% %*

ENDLOCAL

Fix flux.bat for running on Windows

Fix flux.bat for running on Windows

Running flux.bat on Windows failed with a
java.lang.ClassNotFoundException: $FLUX_JAVA_OPTIONS

As the comment above the changed line mentions, the space is
important. Seems it was accidentally removed when reformatting
the file in 3e7f486f5f826a349b0773395dc1be7a8af26ccd


cd assimp_unzipped
cd assimp-4.1.0
cmake -Bbuild -H. -G "%GENERATOR%" -DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_NO_EXPORT=ON -DCMAKE_BUILD_TYPE=Release
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)

cd build
echo ">>> start build"
nmake
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)
nmake install
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)
cd ..
REM in assimp-4.1.0
cd ..
REM in assimp_unzipped
cd ..
REM in project's root

%PYTHON% appveyor_scripts\\rename_lib.py
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)

cd assimp_unzipped
cd assimp-4.1.0
cmake -Bbuild -H. -G "%GENERATOR%" -DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_ASSIMP_TOOLS=OFF -DASSIMP_NO_EXPORT=ON -DCMAKE_BUILD_TYPE=Release
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)

cd build
echo ">>> start build"
nmake
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)
nmake install
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)
cd ..
REM in assimp-4.1.0
cd ..
REM in assimp_unzipped
cd ..
REM in project's root

%PYTHON% ci_scripts\\rename_lib.py
IF %ERRORLEVEL% NEQ 0 (EXIT /B %ERRORLEVEL%)

Fix AppVeyor build.

Fix AppVeyor build.


:: build
cargo install --locked --features all --root "%PREFIX%" --path . || goto :error

:: remove extra build file
del /F /Q "%PREFIX%\.crates.toml"

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1

Create bld.bat

Create bld.bat


setlocal EnableDelayedExpansion

mkdir build
cd build

cmake -G "NMake Makefiles" ^
      -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
      -DDEBUG=OFF ^
      -DOPENMP=set ^
      -DBUILD_SHARED_LIBS=ON ^
      ..
if errorlevel 1 exit 1

:: Build!
nmake
if errorlevel 1 exit 1

:: Install!
nmake install
if errorlevel 1 exit 1

setlocal EnableDelayedExpansion

mkdir build
cd build

cmake -G "NMake Makefiles" ^
      -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^
      -DCMAKE_BUILD_TYPE=Release ^
      -DDEBUG=OFF ^
      -DOPENMP=set ^
      -DBUILD_SHARED_LIBS=ON ^
      ..
if errorlevel 1 exit 1

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

cmake --install .
if errorlevel 1 exit 1

tweak windows build

tweak windows build


@echo off

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

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

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

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

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

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

@echo off

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

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

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

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

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

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

Stop doing "Test" builds for now

Stop doing "Test" builds for now


@echo off

SET dotnet="C:/Program Files/dotnet/dotnet.exe"
SET opencover=C:\Users\andersonritter\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe
SET reportgenerator=C:\Users\andersonritter\.nuget\packages\ReportGenerator\2.5.5\tools\ReportGenerator.exe

SET targetargs="test"
SET filter="+[*]* -[*]*.Tests"
SET coveragefile=Coverage.xml
SET coveragedir=Coverage

REM Run code coverage analysis
%opencover% -oldStyle -register:user -target:%dotnet% -output:%coveragefile% -targetargs:%targetargs% -filter:%filter% -skipautoprops -hideskipped:All

REM Generate the report
%reportgenerator% -targetdir:%coveragedir% -reporttypes:Html;Badges -reports:%coveragefile% -verbosity:Error

REM Open the report
start "report" "%coveragedir%\index.htm"

@echo off

SET dotnet="C:/Program Files/dotnet/dotnet.exe"
SET opencover=C:\Users\andersonritter\.nuget\packages\OpenCover\4.6.519\tools\OpenCover.Console.exe
SET reportgenerator=C:\Users\andersonritter\.nuget\packages\ReportGenerator\2.5.5\tools\ReportGenerator.exe

SET targetargs="test"
SET filter="+[Aritter*]* -[*Tests]*"
SET coveragefile=Coverage.xml
SET coveragedir=Coverage

@echo on

REM Run code coverage analysis
%opencover% -oldStyle -register:user -target:%dotnet% -output:%coveragefile% -targetargs:%targetargs% -filter:%filter% -skipautoprops -hideskipped:All -log:All

REM Generate the report
%reportgenerator% -targetdir:%coveragedir% -reporttypes:Html;Badges -reports:%coveragefile% -verbosity:Error

REM Open the report
start "report" "%coveragedir%\index.htm"

@echo off
PAUSE

update coverage script

update coverage script


@echo off

set "WD=%__CD__%"
if NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\"

rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict

rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^<process-id^>

rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
rem or uncomment next line
rem set MSYS2_PATH_TYPE=inherit

:checkparams
rem Shell types
if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams
if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams
if "x%~1" == "x-mingw" shift& (
  if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32)
)& goto :checkparams
rem Console types
if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams
if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams
if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams
if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams
rem Other parameters
if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams

rem Autodetect shell type if not specified
if not defined MSYSTEM (
   if exist "%WD%..\..\mingw64" (
     set MSYSTEM=MINGW64
   ) else if exist "%WD%..\..\mingw32" (
     set MSYSTEM=MINGW32
   ) else (set MSYSTEM=MSYS)
)

rem Setup proper title
if "%MSYSTEM%" == "MSYS" (
  set CONTITLE=MSys2
) else if "%MSYSTEM%" == "MINGW32" (
  set "CONTITLE=MinGW x32"
) else if "%MSYSTEM%" == "MINGW64" (
  set "CONTITLE=MinGW x64"
)

if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
if "x%MSYSCON%" == "xconemu" goto startconemu
if "x%MSYSCON%" == "xdefterm" goto startsh

if NOT EXIST "%WD%mintty.exe" goto startsh
set MSYSCON=mintty.exe
:startmintty
start "%CONTITLE%" "%WD%mintty" -i /msys2.ico /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startconsolez
cd %WD%..\lib\ConsoleZ
start console -t "%CONTITLE%" -r %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startconemu
call :conemudetect || (
  echo ConEmu not found. Exiting. 1>&2
  exit /b 1
)
start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd %WD%bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startsh
set MSYSCON=
start "%CONTITLE%" "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:EOF
exit /b 0

:conemudetect
set ComEmuCommand=
if defined ConEmuDir (
  if exist "%ConEmuDir%\ConEmu64.exe" (
    set "ComEmuCommand=%ConEmuDir%\ConEmu64.exe"
    set MSYSCON=conemu64.exe
  ) else if exist "%ConEmuDir%\ConEmu.exe" (
    set "ComEmuCommand=%ConEmuDir%\ConEmu.exe"
    set MSYSCON=conemu.exe
  )
)
if not defined ComEmuCommand (
  ConEmu64.exe /Exit 2>nul && (
    set ComEmuCommand=ConEmu64.exe
    set MSYSCON=conemu64.exe
  ) || (
    ConEmu.exe /Exit 2>nul && (
      set ComEmuCommand=ConEmu.exe
      set MSYSCON=conemu.exe
    )
  )
)
if not defined ComEmuCommand (
  FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu64.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
    set "ComEmuCommand=%%A"
  )
  if defined ComEmuCommand (
    call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ    =%%"
    set MSYSCON=conemu64.exe
  ) else (
    FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
      set "ComEmuCommand=%%A"
    )
    if defined ComEmuCommand (
      call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ    =%%"
      set MSYSCON=conemu.exe
    )
  )
)
if not defined ComEmuCommand exit /b 2
exit /b 0

@echo off
setlocal

set "WD=%__CD__%"
if NOT EXIST "%WD%msys-2.0.dll" set "WD=%~dp0usr\bin\"

rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict

rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe^|-debug^|^<process-id^>

rem To export full current PATH from environment into MSYS2 use '-use-full-path' parameter
rem or uncomment next line
rem set MSYS2_PATH_TYPE=inherit

:checkparams
rem Shell types
if "x%~1" == "x-msys" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-msys2" shift& set MSYSTEM=MSYS& goto :checkparams
if "x%~1" == "x-mingw32" shift& set MSYSTEM=MINGW32& goto :checkparams
if "x%~1" == "x-mingw64" shift& set MSYSTEM=MINGW64& goto :checkparams
if "x%~1" == "x-mingw" shift& (
  if exist "%WD%..\..\mingw64" (set MSYSTEM=MINGW64) else (set MSYSTEM=MINGW32)
)& goto :checkparams
rem Console types
if "x%~1" == "x-consolez" shift& set MSYSCON=console.exe& goto :checkparams
if "x%~1" == "x-mintty" shift& set MSYSCON=mintty.exe& goto :checkparams
if "x%~1" == "x-conemu" shift& set MSYSCON=conemu& goto :checkparams
if "x%~1" == "x-defterm" shift& set MSYSCON=defterm& goto :checkparams
rem Other parameters
if "x%~1" == "x-use-full-path" shift& set MSYS2_PATH_TYPE=inherit& goto :checkparams
if "x%~1" == "x-where" shift& (
  set CHERE_INVOKING=1
  rem Check if next argument is an existing directory
  if not "%~2" == "" if exist "%~2\" shift& cd /d "%~2\"& goto :checkparams

  rem If not, print error and exit
  echo Invalid directory specified for -where. Exiting. 1>&2
  exit /b 1
)

rem Autodetect shell type if not specified
if not defined MSYSTEM (
   if exist "%WD%..\..\mingw64" (
     set MSYSTEM=MINGW64
   ) else if exist "%WD%..\..\mingw32" (
     set MSYSTEM=MINGW32
   ) else (set MSYSTEM=MSYS)
)

rem Setup proper title
if "%MSYSTEM%" == "MSYS" (
  set CONTITLE=MSys2
) else if "%MSYSTEM%" == "MINGW32" (
  set "CONTITLE=MinGW x32"
) else if "%MSYSTEM%" == "MINGW64" (
  set "CONTITLE=MinGW x64"
)

if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
if "x%MSYSCON%" == "xconemu" goto startconemu
if "x%MSYSCON%" == "xdefterm" goto startsh

if NOT EXIST "%WD%mintty.exe" goto startsh
set MSYSCON=mintty.exe
:startmintty
start "%CONTITLE%" "%WD%mintty" -i /msys2.ico /usr/bin/bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startconsolez
cd %WD%..\lib\ConsoleZ
start console -t "%CONTITLE%" -r %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startconemu
call :conemudetect || (
  echo ConEmu not found. Exiting. 1>&2
  exit /b 1
)
start "%CONTITLE%" "%ComEmuCommand%" /Here /Icon "%WD%..\..\msys2.ico" /cmd %WD%bash --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:startsh
set MSYSCON=
start "%CONTITLE%" "%WD%bash" --login %1 %2 %3 %4 %5 %6 %7 %8 %9
exit /b %ERRORLEVEL%

:EOF
exit /b 0

:conemudetect
set ComEmuCommand=
if defined ConEmuDir (
  if exist "%ConEmuDir%\ConEmu64.exe" (
    set "ComEmuCommand=%ConEmuDir%\ConEmu64.exe"
    set MSYSCON=conemu64.exe
  ) else if exist "%ConEmuDir%\ConEmu.exe" (
    set "ComEmuCommand=%ConEmuDir%\ConEmu.exe"
    set MSYSCON=conemu.exe
  )
)
if not defined ComEmuCommand (
  ConEmu64.exe /Exit 2>nul && (
    set ComEmuCommand=ConEmu64.exe
    set MSYSCON=conemu64.exe
  ) || (
    ConEmu.exe /Exit 2>nul && (
      set ComEmuCommand=ConEmu.exe
      set MSYSCON=conemu.exe
    )
  )
)
if not defined ComEmuCommand (
  FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu64.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
    set "ComEmuCommand=%%A"
  )
  if defined ComEmuCommand (
    call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ    =%%"
    set MSYSCON=conemu64.exe
  ) else (
    FOR /F "tokens=*" %%A IN ('reg.exe QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ConEmu.exe" /ve 2^>nul ^| find "REG_SZ"') DO (
      set "ComEmuCommand=%%A"
    )
    if defined ComEmuCommand (
      call set "ComEmuCommand=%%ComEmuCommand:*REG_SZ    =%%"
      set MSYSCON=conemu.exe
    )
  )
)
if not defined ComEmuCommand exit /b 2
exit /b 0

Add -where parameter to start_shell.cmd

filesystem: Add -where parameter to start_shell.cmd

* Introduce parameter '-where' which must be followed by an existing
  directory which will be used to start the shell in (use . for the
  current working directory)
* Use setlocal to return to the original directory after this script
  finished (any calls to cd will be local to this script)


SET Version=0.1.1

nuget\nuget.exe pack src\Tp.Core.Functional\Tp.Core.Functional.csproj -Build -Symbols -Properties Configuration=Release -Version %VERSION%
nuget\nuget.exe push Tp.Core.Functional.%VERSION%.nupkg

SET Version=0.1.2

nuget\nuget.exe pack src\Tp.Core.Functional\Tp.Core.Functional.csproj -Build -Symbols -Properties Configuration=Release -Version %VERSION%
nuget\nuget.exe push Tp.Core.Functional.%VERSION%.nupkg

Update version

Update version


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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

:: 1. Select node version
call :SelectNodeVersion

:: 2. Install npm packages
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
  call :ExecuteCmd !NPM_CMD! install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

# 3. Install bower packages
IF EXIST "%DEPLOYMENT_SOURCE/bower.json" (
  call :ExecuteCmd !NPM_CMD! install bower
  echo "installing bower OK"
  ./node_modules/.bin/bower install
  echo "bower installed"
)

# 4. Run grunt
IF EXIST "$DEPLOYMENT_SOURCE/Gruntfile.js" (
  call :ExecuteCmd !NPM_CMD! install grunt-cli
  echo "installing grunt"
  ./node_modules/.bin/grunt build compile
  echo "grunt build executed"
)

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

:: 1. Select node version
call :SelectNodeVersion

:: 2. Install npm packages
IF EXIST "%DEPLOYMENT_SOURCE%\package.json" (
  call :ExecuteCmd !NPM_CMD! install
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 3. Install bower packages
IF EXIST "%DEPLOYMENT_SOURCE/bower.json" (
  call :ExecuteCmd !NPM_CMD! install bower
  echo "installing bower OK"
  ./node_modules/.bin/bower install
  echo "bower installed"
)

:: 4. Run grunt
IF EXIST "$DEPLOYMENT_SOURCE/Gruntfile.js" (
  call :ExecuteCmd !NPM_CMD! install grunt-cli
  echo "installing grunt"
  ./node_modules/.bin/grunt build compile
  echo "grunt build executed"
)

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

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

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

goto end

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

remove $ char

remove $ char


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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.17
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts

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

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

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

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

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
echo 2. Select node version
call :SelectNodeVersion

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

:: 4. Restore nuget packages
echo 4. Restore nuget packages
IF EXIST "%DEPLOYMENT_TARGET%\packages.config" (
  echo Running nuget restore
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd nuget restore "%DEPLOYMENT_TARGET%\packages.config" -PackagesDirectory "%DEPLOYMENT_TARGET%\packages"
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Completed nuget restore
  popd
)

:: 5. Transpile TypeScript
echo 5. Transpile TypeScript
IF EXIST "%DEPLOYMENT_TARGET%\tsconfig.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd node %DEPLOYMENT_TARGET%\node_modules\typescript\bin\tsc -p "%DEPLOYMENT_TARGET%"
::  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 6. Run npm build script
echo 6. Run npm build script
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! run build
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

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

:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.17
:: ----------------------

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

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

:: Setup
:: -----

setlocal enabledelayedexpansion

SET ARTIFACTS=%~dp0%..\artifacts
echo ARTIFACTS=%~dp0%..\artifacts
echo ARTIFACTS=%ARTIFACTS%
echo NEXT_MANIFEST_PATH=%NEXT_MANIFEST_PATH%
echo PREVIOUS_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%

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

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

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

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

echo NEXT_MANIFEST_PATH=%NEXT_MANIFEST_PATH%
echo PREVIOUS_MANIFEST_PATH=%PREVIOUS_MANIFEST_PATH%

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

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

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

:SelectNodeVersion

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

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

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

  IF NOT DEFINED NODE_EXE (
    SET NODE_EXE=node
  )

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

goto :EOF

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

:Deployment
echo Handling node.js deployment.

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

:: 2. Select node version
echo 2. Select node version
call :SelectNodeVersion

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

:: 4. Restore nuget packages
echo 4. Restore nuget packages
IF EXIST "%DEPLOYMENT_TARGET%\packages.config" (
  echo Running nuget restore
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd nuget restore "%DEPLOYMENT_TARGET%\packages.config" -PackagesDirectory "%DEPLOYMENT_TARGET%\packages"
  IF !ERRORLEVEL! NEQ 0 goto error
  echo Completed nuget restore
  popd
)

:: 5. Transpile TypeScript
echo 5. Transpile TypeScript
IF EXIST "%DEPLOYMENT_TARGET%\tsconfig.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd node %DEPLOYMENT_TARGET%\node_modules\typescript\bin\tsc -p "%DEPLOYMENT_TARGET%"
::  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

:: 6. Run npm build script
echo 6. Run npm build script
IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
  pushd "%DEPLOYMENT_TARGET%"
  call :ExecuteCmd !NPM_CMD! run build
  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)

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

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

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

:exitSetErrorLevel
exit /b 1

:exitFromFunction
()

:end
endlocal
echo Finished successfully.

Update deploy.cmd

Update deploy.cmd

add some debug output


### application.bat - 2013 - Carr Adrien ###
echo "Copyright company - 2013"
version = "2"
build_hour = "11H00"

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

### application.bat - 2013 - Carr Adrien - Auffray Antonin ###
echo "Copyright company - 2013"
version = "2"
build_hour = "11H00"

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

update header for new member

update header for new member


### application.bat - 2015 - HURTAUD ###
echo "Version 1.1";
echo "Copyright company - 2015";
echo "Build : 10:00";
pause;

### application.bat - 2015 - HURTAUD ###
version ="2"
build_hour ="11H00"
echo "version${version}";
echo "Copyright company - 2015";
echo "Buil${build_hour";
pause;

add var to script

add var to script


REM tools\nuget.exe update -self

msbuild src/Twilio.sln

rd download /s /q

if not exist download mkdir download
if not exist download\WindowsPhone mkdir download\WindowsPhone
if not exist download\Silverlight mkdir download\Silverlight
if not exist download\package mkdir download\package
if not exist download\package\twilio mkdir download\package\twilio
if not exist download\package\twiliomvc mkdir download\package\twiliomvc
if not exist download\package\twiliotwiml mkdir download\package\twiliotwiml
if not exist download\package\twiliowebmatrix mkdir download\package\twiliowebmatrix
if not exist download\package\twilioclient mkdir download\package\twilioclient

if not exist download\package\twilio\lib mkdir download\package\twilio\lib
if not exist download\package\twilio\lib\3.5 mkdir download\package\twilio\lib\3.5
REM if not exist download\package\twilio\lib\SL3-WP7 mkdir download\package\twilio\lib\SL3-WP7
if not exist download\package\twilio\lib\SL4-WINDOWSPHONE71 mkdir download\package\twilio\lib\SL4-WINDOWSPHONE71
if not exist download\package\twilio\lib\SL4 mkdir download\package\twilio\lib\SL4

if not exist download\package\twiliomvc\lib mkdir download\package\twiliomvc\lib
if not exist download\package\twiliomvc\lib\3.5 mkdir download\package\twiliomvc\lib\3.5

if not exist download\package\twiliotwiml\lib mkdir download\package\twiliotwiml\lib
if not exist download\package\twiliotwiml\lib\3.5 mkdir download\package\twiliotwiml\lib\3.5

if not exist download\package\twiliowebmatrix\lib mkdir download\package\twiliowebmatrix\lib
if not exist download\package\twiliowebmatrix\lib\3.5 mkdir download\package\twiliowebmatrix\lib\3.5

if not exist download\package\twilioclient\lib mkdir download\package\twilioclient\lib
if not exist download\package\twilioclient\lib\3.5 mkdir download\package\twilioclient\lib\3.5

tools\ilmerge.exe /lib:src\Twilio.Api\bin\Release /internalize /ndebug /v2 /out:download\Twilio.Api.dll Twilio.Api.dll RestSharp.dll
tools\ilmerge.exe /lib:src\Twilio.Api.Silverlight\bin\Release /internalize /ndebug /targetplatform:v4,"C:\Program Files (x86)\Microsoft Silverlight\4.1.10111.0" /out:download\Twilio.Api.Silverlight.dll RestSharp.Silverlight.dll

copy src\Twilio.Api\bin\Release\*.* download
copy src\Twilio.Api.Silverlight\bin\Release\*.* download\Silverlight\
copy src\Twilio.Api.WindowsPhone\bin\Release\*.* download\WindowsPhone\
copy src\Twilio.Mvc\bin\Release\*.* download
copy src\Twilio.Twiml\bin\Release\*.* download
copy src\Twilio.WebMatrix\bin\Release\*.* download
copy src\Twilio.Client.Capability\bin\Release\*.* download
copy LICENSE.txt download

copy src\Twilio.Api\bin\Release\Twilio.Api.* download\package\twilio\lib\3.5\
copy src\Twilio.Api.Silverlight\bin\Release\Twilio.Api.Silverlight.* download\package\twilio\lib\SL4\
REM copy src\Twilio.Api.WindowsPhone\bin\Release\Twilio.Api.WindowsPhone.* download\package\twilio\lib\SL3-WP7\
copy src\Twilio.Api.WindowsPhone\bin\Release\Twilio.Api.WindowsPhone.* download\package\twilio\lib\SL4-WINDOWSPHONE71\

copy src\Twilio.Mvc\bin\Release\Twilio.Mvc.* download\package\twiliomvc\lib\3.5\
copy src\Twilio.Twiml\bin\Release\Twilio.Twiml.* download\package\twiliotwiml\lib\3.5\
copy src\Twilio.WebMatrix\bin\Release\Twilio.WebMatrix.* download\package\twiliowebmatrix\lib\3.5\
copy src\Twilio.Client.Capability\bin\Release\Twilio.Client.Capability.* download\package\twilioclient\lib\3.5\

tools\nuget.exe pack Twilio.nuspec -BasePath download\package\twilio -o download
tools\nuget.exe pack Twilio.Mvc.nuspec -BasePath download\package\twiliomvc -o download
tools\nuget.exe pack Twilio.TwiML.nuspec -BasePath download\package\twiliotwiml -o download
tools\nuget.exe pack Twilio.WebMatrix.nuspec -BasePath download\package\twiliowebmatrix -o download
tools\nuget.exe pack Twilio.Client.nuspec -BasePath download\package\twilioclient -o download

REM tools\nuget.exe update -self

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /nologo /maxcpucount /nr:true /verbosity:minimal /p:BuildInParallel=true /p:Configuration=Release /p:RestorePackages=true /t:Rebuild src/Twilio.sln

rd download /s /q

if not exist download mkdir download
if not exist download\WindowsPhone mkdir download\WindowsPhone
if not exist download\Silverlight mkdir download\Silverlight
if not exist download\package mkdir download\package
if not exist download\package\twilio mkdir download\package\twilio
if not exist download\package\twiliomvc mkdir download\package\twiliomvc
if not exist download\package\twiliotwiml mkdir download\package\twiliotwiml
if not exist download\package\twiliowebmatrix mkdir download\package\twiliowebmatrix
if not exist download\package\twilioclient mkdir download\package\twilioclient

if not exist download\package\twilio\lib mkdir download\package\twilio\lib
if not exist download\package\twilio\lib\3.5 mkdir download\package\twilio\lib\3.5
REM if not exist download\package\twilio\lib\SL3-WP7 mkdir download\package\twilio\lib\SL3-WP7
if not exist download\package\twilio\lib\SL4-WINDOWSPHONE71 mkdir download\package\twilio\lib\SL4-WINDOWSPHONE71
if not exist download\package\twilio\lib\SL4 mkdir download\package\twilio\lib\SL4

if not exist download\package\twiliomvc\lib mkdir download\package\twiliomvc\lib
if not exist download\package\twiliomvc\lib\3.5 mkdir download\package\twiliomvc\lib\3.5

if not exist download\package\twiliotwiml\lib mkdir download\package\twiliotwiml\lib
if not exist download\package\twiliotwiml\lib\3.5 mkdir download\package\twiliotwiml\lib\3.5

if not exist download\package\twiliowebmatrix\lib mkdir download\package\twiliowebmatrix\lib
if not exist download\package\twiliowebmatrix\lib\3.5 mkdir download\package\twiliowebmatrix\lib\3.5

if not exist download\package\twilioclient\lib mkdir download\package\twilioclient\lib
if not exist download\package\twilioclient\lib\3.5 mkdir download\package\twilioclient\lib\3.5

tools\ilmerge.exe /lib:src\Twilio.Api\bin\Release /internalize /ndebug /v2 /out:download\Twilio.Api.dll Twilio.Api.dll RestSharp.dll
tools\ilmerge.exe /lib:src\Twilio.Api.Silverlight\bin\Release /internalize /ndebug /targetplatform:v4,"C:\Program Files (x86)\Microsoft Silverlight\4.1.10111.0" /out:download\Twilio.Api.Silverlight.dll RestSharp.Silverlight.dll

copy src\Twilio.Api\bin\Release\*.* download
copy src\Twilio.Api.Silverlight\bin\Release\*.* download\Silverlight\
copy src\Twilio.Api.WindowsPhone\bin\Release\*.* download\WindowsPhone\
copy src\Twilio.Mvc\bin\Release\*.* download
copy src\Twilio.Twiml\bin\Release\*.* download
copy src\Twilio.WebMatrix\bin\Release\*.* download
copy src\Twilio.Client.Capability\bin\Release\*.* download
copy LICENSE.txt download

copy src\Twilio.Api\bin\Release\Twilio.Api.* download\package\twilio\lib\3.5\
copy src\Twilio.Api.Silverlight\bin\Release\Twilio.Api.Silverlight.* download\package\twilio\lib\SL4\
REM copy src\Twilio.Api.WindowsPhone\bin\Release\Twilio.Api.WindowsPhone.* download\package\twilio\lib\SL3-WP7\
copy src\Twilio.Api.WindowsPhone\bin\Release\Twilio.Api.WindowsPhone.* download\package\twilio\lib\SL4-WINDOWSPHONE71\

copy src\Twilio.Mvc\bin\Release\Twilio.Mvc.* download\package\twiliomvc\lib\3.5\
copy src\Twilio.Twiml\bin\Release\Twilio.Twiml.* download\package\twiliotwiml\lib\3.5\
copy src\Twilio.WebMatrix\bin\Release\Twilio.WebMatrix.* download\package\twiliowebmatrix\lib\3.5\
copy src\Twilio.Client.Capability\bin\Release\Twilio.Client.Capability.* download\package\twilioclient\lib\3.5\

tools\nuget.exe pack Twilio.nuspec -BasePath download\package\twilio -o download
tools\nuget.exe pack Twilio.Mvc.nuspec -BasePath download\package\twiliomvc -o download
tools\nuget.exe pack Twilio.TwiML.nuspec -BasePath download\package\twiliotwiml -o download
tools\nuget.exe pack Twilio.WebMatrix.nuspec -BasePath download\package\twiliowebmatrix -o download
tools\nuget.exe pack Twilio.Client.nuspec -BasePath download\package\twilioclient -o download

build .bat

build .bat


@echo off
SET modulelist=functions
SET release=release\mew
if not exist %modulelist% goto nodir
type nul > %release%
for /f %%a in (tib-list) do (
	if not exist %modulelist%\%%a (
		echo MODULE %%a NOT FOUND
		goto fail
	)

	echo COPYING MODULE %%a TO RELEASE FILE
	type %modulelist%\%%a >> %release%
	;Add end of line
	echo. >> %release%
)
goto success
:success
echo SUCCESS
goto end
:fail
goto end
:nodir
echo NO MODULE DIRECTORY FOUND.
goto end
:end
pause
exit

@echo off
SET modulelist=functions
SET release=release\mew
:: Detect if module directory exists
if not exist %modulelist% goto nodir
type nul > %release%
for /f %%a in (tib-list) do (
	if not exist %modulelist%\%%a (
		echo MODULE %%a NOT FOUND
		goto fail
	)

	echo COPYING MODULE %%a TO RELEASE FILE
	:: Copy module file to final release
	type %modulelist%\%%a >> %release%
	:: Add end of line
	echo. >> %release%
)
goto success
:success
echo SUCCESS
goto end
:fail
goto end
:nodir
echo NO MODULE DIRECTORY FOUND.
goto end
:end
pause
exit

Rename build.bat

Rename build.bat


@echo off

::: Variables
set PROJECT=try_sb16

set SRC=%PROJECT%.c
set OBJ=%PROJECT%.obj
set BIN=%PROJECT%.exe

::: Commands
if exist %BIN% del %BIN%
if exist %OBJ% del %OBJ%

tcc -1- -A- -C- -G- -K- -N- -O -Z -a -d -f- -g0 -j0 -ms -p- -r -u -v- -w %SRC%

Create build.bat

Create build.bat


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

if "%MsBuildExe%" == "" (
   set MsBuildExe=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

if "%XUnit192Path%" == "" (
   set XUnit192Path=packages\xunit.runners.1.9.2\tools
)

if "%nuget%" == "" (
   set nuget=%USERPROFILE%\OneDrive\software\nuget.exe
)

set version=
rem if not "%PackageVersion%" == "" (
rem    set version=-Version %PackageVersion%
rem )

REM Package restore
%nuget% install .nuget\packages.config -OutputDirectory %cd%\packages -NonInteractive
%nuget% install ThinkTel.uControl.Api.Tests\packages.config -OutputDirectory %cd%\packages -NonInteractive

REM Build
mkdir build
%MsBuildExe% ThinkTel.uControl.Api.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=build\msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure

REM Unit tests
%XUnit192Path%\xunit.console.clr4.exe ThinkTel.uControl.Api.Tests\bin\%config%\ThinkTel.uControl.Api.Tests.dll
if not "%errorlevel%"=="0" goto failure

REM Package
cmd /c %nuget% pack "ThinkTel.uControl.Api\ThinkTel.uControl.Api.nuspec" -symbols -o build -p Configuration=%config% %version%
if not "%errorlevel%"=="0" goto failure

:success
exit 0

:failure
exit -1

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

if "%MsBuildExe%" == "" (
   set MsBuildExe=%WINDIR%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
)

if "%XUnit192Path%" == "" (
   set XUnit192Path=packages\xunit.runners.1.9.2\tools
)

if "%nuget%" == "" (
   set nuget=%USERPROFILE%\OneDrive\software\nuget.exe
)

set version=
rem if not "%PackageVersion%" == "" (
rem    set version=-Version %PackageVersion%
rem )

REM Package restore
%nuget% install .nuget\packages.config -OutputDirectory %cd%\packages -NonInteractive
%nuget% install ThinkTel.uControl.Api.Tests\packages.config -OutputDirectory %cd%\packages -NonInteractive

REM Build
mkdir build
"%MsBuildExe%" ThinkTel.uControl.Api.sln /p:Configuration="%config%" /m /v:M /fl /flp:LogFile=build\msbuild.log;Verbosity=Normal /nr:false
if not "%errorlevel%"=="0" goto failure

REM Unit tests
%XUnit192Path%\xunit.console.clr4.exe ThinkTel.uControl.Api.Tests\bin\%config%\ThinkTel.uControl.Api.Tests.dll
if not "%errorlevel%"=="0" goto failure

REM Package
cmd /c %nuget% pack "ThinkTel.uControl.Api\ThinkTel.uControl.Api.nuspec" -symbols -o build -p Configuration=%config% %version%
if not "%errorlevel%"=="0" goto failure

:success
exit 0

:failure
exit -1

Fix build script path to msbuild

Fix build script path to msbuild

MSBuild is in c:\program files on MyGet


@echo off
cd %~dp0

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

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

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

:restore
IF NOT EXIST packages\Sake (
	.nuget\nuget.exe install Sake -Version 0.2.2 -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)
IF NOT EXIST packages\dnx-clr-win-x64 (
	.nuget\nuget.exe install dnx-clr-win-x64 -Version 1.0.0-rc1-final -ExcludeVersion -Out packages -Source https://www.myget.org/F/aspnetmaster/api/v3/index.json
)
IF NOT EXIST packages\dnx-coreclr-win-x64 (
	.nuget\nuget.exe install dnx-coreclr-win-x64 -Version 1.0.0-rc1-final -ExcludeVersion -Out packages -Source https://www.myget.org/F/aspnetmaster/api/v3/index.json
)
IF NOT EXIST packages\OpenCover (
	.nuget\nuget.exe install OpenCover -Version 4.6.210-rc -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)
IF NOT EXIST packages\ReportGenerator (
	.nuget\nuget.exe install ReportGenerator -Version 2.3.4 -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)
IF NOT EXIST packages\coveralls.net (
	.nuget\nuget.exe install coveralls.net -Version 0.6.0 -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)

:run
packages\Sake\tools\Sake.exe -f makefile.shade %*
packages\coveralls.net\tools\csmacnz.Coveralls.exe --opencover -i ./artifacts/reports/coverage.xml --repoToken %COVERALLS_REPO_TOKEN% --commitId %APPVEYOR_REPO_COMMIT% --commitBranch %APPVEYOR_REPO_BRANCH% --commitAuthor %APPVEYOR_REPO_COMMIT_AUTHOR% --commitEmail %APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL% --commitMessage %APPVEYOR_REPO_COMMIT_MESSAGE% --jobId %APPVEYOR_JOB_ID%

@echo off
cd %~dp0

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

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

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

:restore
IF NOT EXIST packages\Sake (
	.nuget\nuget.exe install Sake -Version 0.2.2 -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)
IF NOT EXIST packages\dnx-clr-win-x64 (
	.nuget\nuget.exe install dnx-clr-win-x64 -Version 1.0.0-rc1-final -ExcludeVersion -Out packages -Source https://www.myget.org/F/aspnetmaster/api/v3/index.json
)
IF NOT EXIST packages\dnx-coreclr-win-x64 (
	.nuget\nuget.exe install dnx-coreclr-win-x64 -Version 1.0.0-rc1-final -ExcludeVersion -Out packages -Source https://www.myget.org/F/aspnetmaster/api/v3/index.json
)
IF NOT EXIST packages\OpenCover (
	.nuget\nuget.exe install OpenCover -Version 4.6.210-rc -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)
IF NOT EXIST packages\ReportGenerator (
	.nuget\nuget.exe install ReportGenerator -Version 2.3.4 -ExcludeVersion -Out packages -Source https://api.nuget.org/v3/index.json
)

:run
packages\Sake\tools\Sake.exe -f makefile.shade %*

Remove Coveralls for now, will revisit.

Remove Coveralls for now, will revisit.


@echo off
cd %~dp0

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

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

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

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

:getdnx
IF "%SKIP_DNX_INSTALL%"=="" (
    IF "%BUILDCMD_DNX_VERSION%"=="" (
        BUILDCMD_DNX_VERSION=latest
    )
    CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
    CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64
    CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64
    CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
) ELSE (
    CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
)

packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

@echo off
cd %~dp0

SETLOCAL
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
SET BUILDCMD_KOREBUILD_VERSION=
SET BUILDCMD_DNX_VERSION=

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

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

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

:getdnx
IF "%BUILDCMD_DNX_VERSION%"=="" (
    SET BUILDCMD_DNX_VERSION=latest
)
IF "%SKIP_DNX_INSTALL%"=="" (
    CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CoreCLR -arch x86 -alias default
    CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x64
    CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x64
    CALL packages\KoreBuild\build\dnvm install default -runtime CLR -arch x86 -alias default
) ELSE (
    CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
)

packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*

Fix local build break

Fix local build break