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 add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v epicsetup /t REG_SZ /D "%WINDIR%\Setup\Files\mini_installer.exe" /F
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v NoConnectedUser /t REG_DWORD /d 3 /f
rem reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Settings" /v AllowYourAccount /t REG_DWORD /d 0 /f
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
rem reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 3 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKLM\Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BackgroundModeEnabled /f /t REG_DWORD /d 0
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultCookiesSetting /f /t REG_DWORD /d 4
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultNotificationsSetting /f /t REG_DWORD /d 2
rem reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultGeolocationSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v HomepageLocation /f /t REG_SZ /d "http://dennyhalim.com"
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BlockThirdPartyCookies /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BuiltInDnsClientEnabled /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DiskCacheSize /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceGoogleSafeSearch /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceYouTubeRestrict /f /t REG_DWORD /d 1

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 add "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\RunOnce" /v epicsetup /t REG_SZ /D "%WINDIR%\Setup\Files\mini_installer.exe" /F
reg.exe delete "HKLM\DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" /v OneDriveSetup /F
reg.exe unload "HKLM\DEFAULT"

reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v NoConnectedUser /t REG_DWORD /d 3 /f
rem reg.exe add "HKLM\SOFTWARE\Microsoft\PolicyManager\default\Settings" /v AllowYourAccount /t REG_DWORD /d 0 /f
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
rem reg.exe add "HKLM\SYSTEM\CurrentControlSet\services\sppsvc" /v Start /t REG_DWORD /d 3 /f
reg.exe add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 1 /f
reg.exe add "HKLM\Software\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Wow6432Node\Google\Chrome\Extensions\cjpalhdlnbpafiamejdnhcphjbkeiagm" /v update_url /t REG_SZ /D "https://clients2.google.com/service/update2/crx" /F
reg.exe add "HKLM\Software\Policies\Google\Chrome" /v BackgroundModeEnabled /f /t REG_DWORD /d 0
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultCookiesSetting /f /t REG_DWORD /d 4
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultNotificationsSetting /f /t REG_DWORD /d 2
rem reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DefaultGeolocationSetting /f /t REG_DWORD /d 2
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v HomepageLocation /f /t REG_SZ /d "http://dennyhalim.com"
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BlockThirdPartyCookies /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v BuiltInDnsClientEnabled /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v DiskCacheSize /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceGoogleSafeSearch /f /t REG_DWORD /d 1
reg.exe add "HKLM\Software\Policies\Google\Chrome\Recommended" /v ForceYouTubeRestrict /f /t REG_DWORD /d 1

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

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

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

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

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

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

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

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

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

Update SetupComplete.cmd

Update SetupComplete.cmd


call DEL /F/Q/S build > NUL
call DEL /F/Q/S dist > NUL
call RMDIR /Q/S build
call RMDIR /Q/S dist
call conda env remove -n picasso_installer
call conda create -n picasso_installer python=3.8 -y
call conda activate picasso_installer
call pip install pyinstaller==4.2
cd %~dp0\..
call pip install -r requirements.txt
python setup.py install
cd %~dp0
pyinstaller -y --hidden-import=h5py.defs --hidden-import=h5py.utils  --hidden-import=h5py.h5ac --hidden-import=h5py._proxy --hidden-import=sklearn.neighbors.typedefs --hidden-import=sklearn.neighbors.quad_tree --hidden-import=sklearn.tree --hidden-import=sklearn.tree._utils --hidden-import=scipy._lib.messagestream -n picasso picasso-script.py
pyinstaller -y --hidden-import=h5py.defs --hidden-import=h5py.utils  --hidden-import=h5py.h5ac --hidden-import=h5py._proxy --hidden-import=sklearn.neighbors.typedefs --hidden-import=sklearn.neighbors.quad_tree --hidden-import=sklearn.tree --hidden-import=sklearn.tree._utils --hidden-import=scipy._lib.messagestream --noconsole -n picassow picasso-script.py
copy dist\picassow\picassow.exe dist\picasso\picassow.exe
copy dist\picassow\picassow.exe.manifest dist\picasso\picassow.exe.manifest
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" picasso.iss
call deactivate

call DEL /F/Q/S build > NUL
call DEL /F/Q/S dist > NUL
call RMDIR /Q/S build
call RMDIR /Q/S dist
call conda env remove -n picasso_installer
call conda create -n picasso_installer python=3.8 -y
call conda activate picasso_installer
call pip install pyinstaller==4.2
cd %~dp0\..
call pip install -r requirements.txt
call python setup.py install
cd %~dp0
pyinstaller -y --hidden-import=h5py.defs --hidden-import=h5py.utils  --hidden-import=h5py.h5ac --hidden-import=h5py._proxy --hidden-import=sklearn.neighbors.typedefs --hidden-import=sklearn.neighbors.quad_tree --hidden-import=sklearn.tree --hidden-import=sklearn.tree._utils --hidden-import=scipy._lib.messagestream -n picasso picasso-script.py
pyinstaller -y --hidden-import=h5py.defs --hidden-import=h5py.utils  --hidden-import=h5py.h5ac --hidden-import=h5py._proxy --hidden-import=sklearn.neighbors.typedefs --hidden-import=sklearn.neighbors.quad_tree --hidden-import=sklearn.tree --hidden-import=sklearn.tree._utils --hidden-import=scipy._lib.messagestream --noconsole -n picassow picasso-script.py
copy dist\picassow\picassow.exe dist\picasso\picassow.exe
copy dist\picassow\picassow.exe.manifest dist\picasso\picassow.exe.manifest
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" picasso.iss
call conda deactivate

FIX create installer

FIX create installer


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
echo Staring to output active processes!
wmic process list brief > BriefProcesses.txt
wmic process list full >FullProcesses.txt
wmic startup list full > StartupLists.txt

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
@echo on
echo Staring to output active processes!
wmic process list brief > BriefProcesses.txt
wmic process list full >FullProcesses.txt
wmic startup list full > StartupLists.txt

Update IntruderDetection.bat

Update IntruderDetection.bat


REM This Windows batch script removes empty lines from a text file.

IF "%1"=="" (
    ECHO Error: An absolute file path must be provided as the argument.
    EXIT /B 1
)

REM [%DATE%-%TIME%] Removing empty lines from file %1

COPY %1 %1.tmp
FINDSTR "." %1.tmp > %1
DEL %1.tmp

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS

REM This Windows batch script removes empty lines from a text file.
ECHO [Script executed at %DATE%-%TIME%] Removing empty lines from file %FILEPATH%

SET FILEPATH=%1

IF "%FILEPATH%"=="" (
    ECHO Error: An absolute file path must be provided as the argument.
    EXIT /B 1
)
IF NOT EXIST "%FILEPATH%" (
    ECHO Error: The given file does not exist.
    EXIT /B 1
)

COPY %FILEPATH% %FILEPATH%.tmp
FINDSTR "." %FILEPATH%.tmp > %FILEPATH%
DEL %FILEPATH%.tmp

EXIT

[Misc] Improve remove_empty_lines user experience


@echo off
echo Ensuring .NET 4.0 is installed
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.github.com/StefanScherer/arduino-ide/install/InstallNet4.ps1'))"
echo Installing Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

where cinst
if ERRORLEVEL 1 goto set_chocolatey
goto inst
:set_chocolatey
set ChocolateyInstall=%SystemDrive%\Chocolatey
set PATH=%PATH%;%ChocolateyInstall%\bin
:inst

call cinst vagrant
set PATH=%PATH%;%SystemDrive%\hashicorp\vagrant\bin
cd /D %USERPROFILE%\Documents

call cinst wget
call cinst 7zip
set PATH=%PATH%;C:\Program Files\7-Zip
call cinst vim
where gvim.exe
if ERRORLEVEL 1 call :addVimToUserPath
goto VIM_DONE
:addVimToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;C:\Program Fiels (x86)\vim\vim74" /f
set PATH=%PATH%;C:\Program Files (x86)\vim\vim74
exit /b
:VIM_DONE

call cinst msysgit
set PATH=%PATH%;C:\Program Files (x86)\Git\cmd

call cinst firefox

set WORKDRIVE=C:

rem Install packer 0.5.1
if not exist %WORKDRIVE%\Packer\cache mkdir %WORKDRIVE%\Packer\cache
setx PACKER_CACHE_DIR %WORKDRIVE%\Packer\cache
set PACKER_CACHE_DIR=%WORKDRIVE%\Packer\cache
if not exist %WORKDRIVE%\Packer\temp mkdir %WORKDRIVE%\Packer\temp
setx PACKER_TEMP_DIR %WORKDRIVE%\Packer\temp
set PACKER_TEMP_DIR=%WORKDRIVE%\Packer\temp

rem call cinst packer
if exist C:\hashicorp\packer\packer.exe goto PACKER_INSTALLED
call wget --no-check-certificate https://dl.bintray.com/mitchellh/packer/0.5.1_windows_amd64.zip -O %TEMP%\0.5.1_windows_amd64.zip
mkdir C:\hashicorp\packer
cd /D C:\hashicorp\packer
7z x %TEMP%\0.5.1_windows_amd64.zip
cd /D %USERPROFILE%
rem :PACKER_INSTALLED
where packer
if ERRORLEVEL 1 call :addPackerToUserPath
goto PACKER_DONE
:addPackerToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;C:\hashicorp\packer" /f
set PATH=%PATH%;C:\hashicorp\packer
exit /b
:PACKER_DONE

rem Install VirtualBox 4.3.6
if not exist "%USERPROFILE%\.VirtualBox\VirtualBox.xml" (
  mkdir "%USERPROFILE%\.VirtualBox"
  call wget --no-check-certificate https://github.com/StefanScherer/basebox-slave/raw/master/VirtualBox.xml -O "%USERPROFILE%\.VirtualBox\VirtualBox.xml"
)
call cinst virtualbox
if not exist %WORKDRIVE%\VirtualBox mkdir %WORKDRIVE%\VirtualBox
rem if exist "C:\program files\oracle\virtualbox\vboxmanage.exe" goto VIRTUALBOX_INSTALLED
rem wget http://download.virtualbox.org/virtualbox/4.3.6/VirtualBox-4.3.6-91406-Win.exe -O %TEMP%\VirtualBox-4.3.6-91406-Win.exe
rem %TEMP%\VirtualBox-4.3.6-91406-Win.exe -s
:VIRTUALBOX_INSTALLED
where vboxmanage
if ERRORLEVEL 1 call :addVirtualBoxToUserPath
goto VIRTUALBOX_DONE
:addVirtualBoxToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;C:\program files\oracle\virtualbox" /f
set PATH=%PATH%;C:\program files\oracle\virtualbox
exit /b
:VIRTUALBOX_DONE

rem Install Jenkins
rem wget http://mirrors.jenkins-ci.org/windows/latest -O %TEMP%\jenkins.zip
rem cd /D %TEMP%
rem unzip jenkins.zip
rem setup.exe -s

if not exist %WORKDRIVE%\GitHub mkdir %WORKDRIVE%\GitHub
cd /D %WORKDRIVE%\GitHub
if not exist basebox-packer (
  git clone https://github.com/StefanScherer/basebox-packer.git
) else (
  cd basebox-packer
  git pull
  cd ..
)

if not exist packer-windows (
  git clone -b san https://github.com/StefanScherer/packer-windows.git
) else (
  cd packer-windows
  git pull
  cd ..
)

if not exist basebox-slave (
  git clone https://github.com/StefanScherer/basebox-slave.git
) else (
  cd basebox-slave
  git pull
  cd ..
)

echo Copy ISO files...
if not exist D:\ISO\san\windows\licensed\datacenter_san mkdir D:\ISO\san\windows\licensed\datacenter_san
if not exist D:\ISO\san\windows\licensed\datacenter_san\win2008r2sp1_datacenter_en mkdir D:\ISO\san\windows\licensed\datacenter_san\win2008r2sp1_datacenter_en
if not exist D:\ISO\san\windows\licensed\datacenter_san\win2008r2sp1_datacenter_en\SW_DVD5_Windows_Svr_DC_EE_SE_Web_2008_R2_64Bit_English_w_SP1_MLF_X17-22580.ISO (
  copy \\adminlin01\iso\windows\licensed\datacenter_san\win2008r2sp1_datacenter_en\SW_DVD5_Windows_Svr_DC_EE_SE_Web_2008_R2_64Bit_English_w_SP1_MLF_X17-22580.ISO D:\ISO\san\windows\licensed\datacenter_san\win2008r2sp1_datacenter_en
)

if not exist D:\ISO\san\windows\licensed\datacenter_san\win2012_datacenter_en mkdir D:\ISO\san\windows\licensed\datacenter_san\win2012_datacenter_en
if not exist D:\ISO\san\windows\licensed\datacenter_san\win2012_datacenter_en\SW_DVD5_Win_Svr_Std_and_DataCtr_2012_64Bit_English_Core_MLF_X18-27588.ISO (
  copy \\adminlin01\iso\windows\licensed\datacenter_san\win2012_datacenter_en\SW_DVD5_Win_Svr_Std_and_DataCtr_2012_64Bit_English_Core_MLF_X18-27588.ISO D:\ISO\san\windows\licensed\datacenter_san\win2012_datacenter_en
)

if not exist D:\ISO\san\windows\licensed\datacenter_san\win2012r2_datacenter_en mkdir D:\ISO\san\windows\licensed\datacenter_san\win2012r2_datacenter_en
if not exist D:\ISO\san\windows\licensed\datacenter_san\win2012r2_datacenter_en\SW_DVD9_Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_English_-2_Core_MLF_X19-31419.ISO (
  copy \\adminlin01\iso\windows\licensed\datacenter_san\win2012r2_datacenter_en\SW_DVD9_Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_English_-2_Core_MLF_X19-31419.ISO D:\ISO\san\windows\licensed\datacenter_san\win2012r2_datacenter_en
 )

echo Install VMware PowerCLI...
if not exist "c:\Program Files (x86)\VMware\VMware VIX" (
  if not exist "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe" (
    copy "\\adminlin01\iso\vmware\powercli\VMware-PowerCLI-5.5.0-1295336.exe" %TEMP%\
  )
  if not exist "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe" (
    copy "\\roettfs1\scratch\keep\VMware\VMware-PowerCLI-5.5.0-1295336.exe" %TEMP%\
  )
  powershell -Command "Import-Module ServerManager; Add-WindowsFeature NET-Framework-Features"
  "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe" /s /v/qn
  del "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe"
)

echo Install VMware Workstation...
rem Install VMware Workstation
if not exist "c:\Program Files (x86)\VMware\VMware Workstation" (
  if not exist "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" (
    copy \\adminlin01\iso\vmware\workstation10\VMware-workstation-full-10.0.0-1295980.exe %TEMP%\
  )
  rem "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" /s /nsr /v EULAS_AGREED=1 SERIALNUMBER="xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
  "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" /s /nsr /v EULAS_AGREED=1
  del "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe"
)

rem put ovftool into path
where ovftool
if ERRORLEVEL 1 call :addOvftoolToUserPath
goto OVFTOOL_DONE
:addOvftoolToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;c:\Program Files (x86)\VMware\VMware Workstation\ovftool" /f
set PATH=%PATH%;c:\Program Files (x86)\VMware\VMware Workstation\ovftool
exit /b
:OVFTOOL_DONE

call cinst javaruntime
if not exist %WORKDRIVE%\jenkins mkdir %WORKDRIVE%\jenkins
if not exist %WORKDRIVE%\swarmclient mkdir %WORKDRIVE%\swarmclient
cd /D %WORKDRIVE%\swarmclient
call wget -O swarm-client.jar http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/1.8/swarm-client-1.8-jar-with-dependencies.jar

set jenkinshost=10.115.4.8
net user swarmclient K8934jASD,x9  /ADD
net localgroup Administrators swarmclient /add
rem Due to problems with UDP broadcast, use the -master switch at the moment
rem Schedule start of swarm client at start of the machine (after next reboot)
schtasks /CREATE /SC ONSTART /RU swarmclient /RP K8934jASD,x9 /TN JenkinsSwarmClient /TR "java.exe -jar %WORKDRIVE%\swarmclient\swarm-client.jar -master http://%jenkinshost% -labels packer -fsroot %WORKDRIVE%\jenkins"

@echo off
echo Ensuring .NET 4.0 is installed
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.github.com/StefanScherer/arduino-ide/install/InstallNet4.ps1'))"
echo Installing Chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin

where cinst
if ERRORLEVEL 1 goto set_chocolatey
goto inst
:set_chocolatey
set ChocolateyInstall=%SystemDrive%\Chocolatey
set PATH=%PATH%;%ChocolateyInstall%\bin
:inst

call cinst vagrant
set PATH=%PATH%;%SystemDrive%\hashicorp\vagrant\bin
cd /D %USERPROFILE%\Documents

call cinst wget
call cinst 7zip
set PATH=%PATH%;C:\Program Files\7-Zip
call cinst vim
where gvim.exe
if ERRORLEVEL 1 call :addVimToUserPath
goto VIM_DONE
:addVimToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;C:\Program Fiels (x86)\vim\vim74" /f
set PATH=%PATH%;C:\Program Files (x86)\vim\vim74
exit /b
:VIM_DONE

call cinst msysgit
set PATH=%PATH%;C:\Program Files (x86)\Git\cmd

call cinst firefox

set WORKDRIVE=C:

rem Install packer 0.5.1
if not exist %WORKDRIVE%\Packer\cache mkdir %WORKDRIVE%\Packer\cache
setx PACKER_CACHE_DIR %WORKDRIVE%\Packer\cache
set PACKER_CACHE_DIR=%WORKDRIVE%\Packer\cache
if not exist %WORKDRIVE%\Packer\temp mkdir %WORKDRIVE%\Packer\temp
setx PACKER_TEMP_DIR %WORKDRIVE%\Packer\temp
set PACKER_TEMP_DIR=%WORKDRIVE%\Packer\temp

rem call cinst packer
if exist C:\hashicorp\packer\packer.exe goto PACKER_INSTALLED
call wget --no-check-certificate https://dl.bintray.com/mitchellh/packer/0.5.1_windows_amd64.zip -O %TEMP%\0.5.1_windows_amd64.zip
mkdir C:\hashicorp\packer
cd /D C:\hashicorp\packer
7z x %TEMP%\0.5.1_windows_amd64.zip
cd /D %USERPROFILE%
rem :PACKER_INSTALLED
where packer
if ERRORLEVEL 1 call :addPackerToUserPath
goto PACKER_DONE
:addPackerToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;C:\hashicorp\packer" /f
set PATH=%PATH%;C:\hashicorp\packer
exit /b
:PACKER_DONE

rem Install VirtualBox 4.3.6
if not exist "%USERPROFILE%\.VirtualBox\VirtualBox.xml" (
  mkdir "%USERPROFILE%\.VirtualBox"
  call wget --no-check-certificate https://github.com/StefanScherer/basebox-slave/raw/master/VirtualBox.xml -O "%USERPROFILE%\.VirtualBox\VirtualBox.xml"
)
call cinst virtualbox
if not exist %WORKDRIVE%\VirtualBox mkdir %WORKDRIVE%\VirtualBox
rem if exist "C:\program files\oracle\virtualbox\vboxmanage.exe" goto VIRTUALBOX_INSTALLED
rem wget http://download.virtualbox.org/virtualbox/4.3.6/VirtualBox-4.3.6-91406-Win.exe -O %TEMP%\VirtualBox-4.3.6-91406-Win.exe
rem %TEMP%\VirtualBox-4.3.6-91406-Win.exe -s
:VIRTUALBOX_INSTALLED
where vboxmanage
if ERRORLEVEL 1 call :addVirtualBoxToUserPath
goto VIRTUALBOX_DONE
:addVirtualBoxToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;C:\program files\oracle\virtualbox" /f
set PATH=%PATH%;C:\program files\oracle\virtualbox
exit /b
:VIRTUALBOX_DONE

rem Install Jenkins
rem wget http://mirrors.jenkins-ci.org/windows/latest -O %TEMP%\jenkins.zip
rem cd /D %TEMP%
rem unzip jenkins.zip
rem setup.exe -s

if not exist %WORKDRIVE%\GitHub mkdir %WORKDRIVE%\GitHub
cd /D %WORKDRIVE%\GitHub
if not exist basebox-packer (
  git clone https://github.com/StefanScherer/basebox-packer.git
) else (
  cd basebox-packer
  git pull
  cd ..
)

if not exist packer-windows (
  git clone -b san https://github.com/StefanScherer/packer-windows.git
) else (
  cd packer-windows
  git pull
  cd ..
)

if not exist basebox-slave (
  git clone https://github.com/StefanScherer/basebox-slave.git
) else (
  cd basebox-slave
  git pull
  cd ..
)

echo Install VMware PowerCLI...
if not exist "c:\Program Files (x86)\VMware\VMware VIX" (
  if not exist "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe" (
    call wget -O "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe" http://roecloudsrv001/vmware/powercli/VMware-PowerCLI-5.5.0-1295336.exe
  )
  powershell -Command "Import-Module ServerManager; Add-WindowsFeature NET-Framework-Features"
  "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe" /s /v/qn
  del "%TEMP%\VMware-PowerCLI-5.5.0-1295336.exe"
)

echo Install VMware Workstation...
rem Install VMware Workstation
if not exist "c:\Program Files (x86)\VMware\VMware Workstation" (
  if not exist "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" (
    call wget -O "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" http://roecloudsrv001/vmware/workstation10/VMware-workstation-full-10.0.0-1295980.exe
  )
  rem "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" /s /nsr /v EULAS_AGREED=1 SERIALNUMBER="xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
  "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe" /s /nsr /v EULAS_AGREED=1
  del "%TEMP%\VMware-workstation-full-10.0.0-1295980.exe"
)

rem put ovftool into path
where ovftool
if ERRORLEVEL 1 call :addOvftoolToUserPath
goto OVFTOOL_DONE
:addOvftoolToUserPath
for /F "tokens=2* delims= " %%f IN ('reg query "HKCU\Environment" /v Path ^| findstr /i path') do set OLD_USER_PATH=%%g
reg add HKCU\Environment /v Path /d "%OLD_USER_PATH%;c:\Program Files (x86)\VMware\VMware Workstation\ovftool" /f
set PATH=%PATH%;c:\Program Files (x86)\VMware\VMware Workstation\ovftool
exit /b
:OVFTOOL_DONE

call cinst javaruntime
if not exist %WORKDRIVE%\jenkins mkdir %WORKDRIVE%\jenkins
if not exist %WORKDRIVE%\swarmclient mkdir %WORKDRIVE%\swarmclient
cd /D %WORKDRIVE%\swarmclient
call wget -O swarm-client.jar http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/plugins/swarm-client/1.8/swarm-client-1.8-jar-with-dependencies.jar

set jenkinshost=10.115.4.8
net user swarmclient K8934jASD,x9  /ADD
net localgroup Administrators swarmclient /add
rem Due to problems with UDP broadcast, use the -master switch at the moment
rem Schedule start of swarm client at start of the machine (after next reboot)
schtasks /CREATE /SC ONSTART /RU swarmclient /RP K8934jASD,x9 /TN JenkinsSwarmClient /TR "java.exe -jar %WORKDRIVE%\swarmclient\swarm-client.jar -master http://%jenkinshost% -labels packer -fsroot %WORKDRIVE%\jenkins"

use http instead of unc

use http instead of unc


echo OFF
set ENV=prod
if "%1" NEQ "" (
    set ENV=%1
)
php app/console-framework doctrine:schema:create --env %ENV%
php app/console-framework oro:search:create-index --env %ENV%
php app/console-framework doctrine:fixture:load --no-debug --no-interaction --env %ENV%
php app/console-framework oro:acl:load --env %ENV%
php app/console-framework oro:navigation:init --env %ENV%
php app/console-framework oro:entity-config:update --env $ENV
php app/console-framework assets:install web --env %ENV%
php app/console assetic:dump --env %ENV%
php app/console oro:assetic:dump

echo OFF
set ENV=prod
if "%1" NEQ "" (
    set ENV=%1
)
php app/console-framework doctrine:schema:create --env %ENV%
php app/console-framework oro:search:create-index --env %ENV%
php app/console-framework doctrine:fixture:load --no-debug --no-interaction --env %ENV%
php app/console-framework oro:acl:load --env %ENV%
php app/console-framework oro:navigation:init --env %ENV%
php app/console-framework oro:entity-config:update --env %ENV%
php app/console-framework assets:install web --env %ENV%
php app/console assetic:dump --env %ENV%
php app/console oro:assetic:dump

fix install.bat

fix install.bat


@echo off
pushd "%~dp0"
if exist cs (goto okcs) else (echo "No cs folder found." && goto exit)
:okcs
if exist vb (goto okvb) else (echo "No vb folder found." && goto exit)
:okvb

if [%1]==[] (
  echo Please specify Visual Studio version, e.g., 2017
  goto exit
) else (
	echo Using version %1
	set "D=%userprofile%\Documents\Visual Studio %1\Templates\ProjectTemplates"
)

set "F=%TEMP%\Revit2020AddinWizardCs0.zip"
echo Creating C# wizard archive %F%...
cd cs
..\zip\zip.exe -r "%F%" *
cd ..
echo Copying C# wizard archive to %D%\Visual C#...
copy "%F%" "%D%\Visual C#"
set "F=%TEMP%\Revit2020AddinWizardVb0.zip"
echo Creating VB wizard archive %F%...
cd vb
..\zip\zip.exe -r "%F%" *
cd ..
echo Copying VB wizard archive to %D%\Visual Basic...
copy "%F%" "%D%\Visual Basic"
:exit

@echo off
pushd "%~dp0"
if exist cs (goto okcs) else (echo "No cs folder found." && goto exit)
:okcs
if exist vb (goto okvb) else (echo "No vb folder found." && goto exit)
:okvb

if [%1]==[] (
  echo Please specify Visual Studio version, e.g., 2017
  goto exit
) else (
	echo Using version %1
	set "D=%userprofile%\Documents\Visual Studio %1\Templates\ProjectTemplates"
)

set "F=%TEMP%\Revit2020AddinWizardCs0.zip"
echo Creating C# wizard archive %F%...
cd cs
..\zip\zip.exe -r "%F%" *
cd ..
echo Copying C# wizard archive to %D%\Visual C#...
xcopy "%F%" "%D%\Visual C#\"
set "F=%TEMP%\Revit2020AddinWizardVb0.zip"
echo Creating VB wizard archive %F%...
cd vb
..\zip\zip.exe -r "%F%" *
cd ..
echo Copying VB wizard archive to %D%\Visual Basic...
xcopy "%F%" "%D%\Visual Basic\"
:exit

Use xcopy rather than copy

Use xcopy rather than copy

Use xcopy rather than copy because copy creates the directory as a file without an extension rather than a directory.


@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://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

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem  (Modified for the purposes of building Byte Buddy)
@rem
@rem ##########################################################################

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

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

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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="-Xmx64m" "-Xms64m"

@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 execute

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 execute

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

:execute

@rem Use legacy Gradle if Java 6 or 7 is used to build (Byte Buddy edit)
set WRAPPER_LOCATION=wrapper-legacy
for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA_HOME%\bin\java -fullversion 2^>^&1') do set "JAVA_VERSION_STRING=%%j%%k%%l%%m"
IF NOT "%JAVA_VERSION_STRING:~0,3%"=="160" (
  IF NOT "%JAVA_VERSION_STRING:~0,3%"=="170" (
    set WRAPPER_LOCATION=wrapper
  )
)

@rem Extension to allow automatically downloading the Gradle binary from Gradle's repository
@rem This is implemented similarly to the Maven Wrapper's download routine.
SET DISTRIBUTION_LOCATION=""
SET DISTRIBUTION_URL=""
for /f "usebackq tokens=1,2 delims==" %%A in ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\maven-wrapper.properties") do (
    if "%%A"=="distributionRepo" SET DISTRIBUTION_LOCATION=%%B
    if "%%A"=="distributionUrl" SET DISTRIBUTION_URL=%%B
)
if %DISTRIBUTION_LOCATION% (
    SET DISTRIBUTION_SOURCE=%DISTRIBUTION_LOCATION%/%DISTRIBUTION_URL%
    SET DISTRIBUTION_TARGET=%APP_HOME%\gradle\%WRAPPER_LOCATION%\%DISTRIBUTION_URL%
    if exist %DISTRIBUTION_TARGET% (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Found %DISTRIBUTION_TARGET%
        )
    ) else (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Couldn't find %DISTRIBUTION_TARGET%, downloading it ...
            echo Downloading from: %DISTRIBUTION_SOURCE%
        )

        powershell -Command "&{"^
            "$webclient = new-object System.Net.WebClient;"^
            "if (-not ([string]::IsNullOrEmpty('%GRADLEW_USERNAME%') -and [string]::IsNullOrEmpty('%GRADLEW_PASSWORD%'))) {"^
            "$webclient.Credentials = new-object System.Net.NetworkCredential('%GRADLEW_USERNAME%', '%GRADLEW_PASSWORD%');"^
            "}"^
            "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DISTRIBUTION_SOURCE%', '%DISTRIBUTION_TARGET%')"^
            "}"
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Finished downloading %DISTRIBUTION_TARGET%
        )
    )
)
@rem End of extension

@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.jar

@REM Validate the Gradle wrapper's hash (Byte Buddy edit)
SET FILE_HASH=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") DO (
    IF "%%A"=="wrapperHash" SET FILE_HASH=%%B
)
IF NOT %FILE_HASH%=="" (
    FOR /F "usebackq tokens=*" %%A in ('certUtil -hashfile "%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties" SHA256') do (
        echo %%A | findstr /C:"hash" 1>nul || (
            IF NOT %%A==%FILE_HASH% (
                echo Could not validate hash of maven-wrapper.jar
                goto error
            )
        )
    )
)

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

: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

@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem      https://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

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem  Gradle startup script for Windows
@rem  (Modified for the purposes of building Byte Buddy)
@rem
@rem ##########################################################################

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

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

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@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="-Xmx64m" "-Xms64m"

@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 execute

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 execute

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

:execute

@rem Use legacy Gradle if Java 6 or 7 is used to build (Byte Buddy edit)
set WRAPPER_LOCATION=wrapper-legacy
for /f tokens^=2-5^ delims^=.-_^" %%j in ('%JAVA_HOME%\bin\java -fullversion 2^>^&1') do set "JAVA_VERSION_STRING=%%j%%k%%l%%m"
IF NOT "%JAVA_VERSION_STRING:~0,3%"=="160" (
  IF NOT "%JAVA_VERSION_STRING:~0,3%"=="170" (
    set WRAPPER_LOCATION=wrapper
  )
)

@rem Extension to allow automatically downloading the Gradle binary from Gradle's repository
@rem This is implemented similarly to the Maven Wrapper's download routine.
SET DISTRIBUTION_LOCATION=""
SET DISTRIBUTION_URL=""
for /f "usebackq tokens=1,2 delims==" %%A in ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") do (
    if "%%A"=="distributionRepo" SET DISTRIBUTION_LOCATION=%%B
    if "%%A"=="distributionUrl" SET DISTRIBUTION_URL=%%B
)
if not %DISTRIBUTION_LOCATION%="" (
    SET DISTRIBUTION_SOURCE=%DISTRIBUTION_LOCATION%/%DISTRIBUTION_URL%
    SET DISTRIBUTION_TARGET=%APP_HOME%\gradle\%WRAPPER_LOCATION%\%DISTRIBUTION_URL%
    if exist %DISTRIBUTION_TARGET% (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Found %DISTRIBUTION_TARGET%
        )
    ) else (
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Couldn't find %DISTRIBUTION_TARGET%, downloading it ...
            echo Downloading from: %DISTRIBUTION_SOURCE%
        )

        powershell -Command "&{"^
            "$webclient = new-object System.Net.WebClient;"^
            "if (-not ([string]::IsNullOrEmpty('%GRADLEW_USERNAME%') -and [string]::IsNullOrEmpty('%GRADLEW_PASSWORD%'))) {"^
            "$webclient.Credentials = new-object System.Net.NetworkCredential('%GRADLEW_USERNAME%', '%GRADLEW_PASSWORD%');"^
            "}"^
            "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DISTRIBUTION_SOURCE%', '%DISTRIBUTION_TARGET%')"^
            "}"
        if "%GRADLEW_VERBOSE%" == "true" (
            echo Finished downloading %DISTRIBUTION_TARGET%
        )
    )
)
@rem End of extension

@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.jar

@REM Validate the Gradle wrapper's hash (Byte Buddy edit)
SET FILE_HASH=""
FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties") DO (
    IF "%%A"=="wrapperHash" SET FILE_HASH=%%B
)
IF NOT %FILE_HASH%=="" (
    FOR /F "usebackq tokens=*" %%A in ('certUtil -hashfile "%APP_HOME%\gradle\%WRAPPER_LOCATION%\gradle-wrapper.properties" SHA256') do (
        echo %%A | findstr /C:"hash" 1>nul || (
            IF NOT %%A==%FILE_HASH% (
                echo Could not validate hash of maven-wrapper.jar
                goto error
            )
        )
    )
)

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

: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 script.

Fix script.


@TITLE Building Mesa3D
@cd "%~dp0"
@cd ..\..\
@for %%I in ("%cd%") do @set mesa=%%~sI
@set mesa=%mesa%\
@where /q cmake.exe
@IF ERRORLEVEL 1 set PATH=%mesa%cmake\bin\;%PATH%
@set ERRORLEVEL=0
@where /q python.exe
@IF ERRORLEVEL 1 set PATH=%mesa%Python\;%mesa%Python\Scripts\;%PATH%
@set ERRORLEVEL=0
@set pyupd=y
@set pyfrstupd=1
@if EXIST pyupd.ini set /p pyfrstupd=<pyupd.ini
@if %pyfrstupd%==0 set pyupd=n
@if %pyfrstupd%==0 set /p pyupd=Install/update python modules (y/n):
@if "%pyupd%"=="y" (
@python -m pip install -U mako
@python -m pip freeze > requirements.txt
@python -m pip install -r requirements.txt --upgrade
@del requirements.txt
@echo.
@echo 0 > pyupd.ini
)
@set abi=x86
@set /p x64=Do you want to build for x64? (y/n) Otherwise build for x86:
@if /I "%x64%"=="y" set abi=x64
@set longabi=%abi%
@if %abi%==x64 set longabi=x86_64
@set altabi=i686
@if %abi%==x64 set altabi=%longabi%
@set minabi=32
@if %abi%==x64 set minabi=64
@set hostabi=x86
@set vsenv="%ProgramFiles%
@if NOT "%ProgramW6432%"=="" set hostabi=x64
@if NOT "%ProgramW6432%"=="" set vsenv=%vsenv% (x86)
@set vsenv15=%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%minabi%.bat"
@set vsenv14="%VS140COMNTOOLS%..\..\VC\bin\vcvars%minabi%.bat"
@set gcc=%mesa%mingw-w64\%abi%\mingw%minabi%\bin
@set vsenvloaded=0
@set dxtnbuilt=0
@set toolset=14
@if EXIST %vsenv15% set toolset=15
@if EXIST toolset-%abi%.ini set /p toolset=<toolset-%abi%.ini
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@set PATH=%mesa%flexbison\;%PATH%
@TITLE Building Mesa3D %abi%

:build_llvm
@set /p buildllvm=Begin LLVM build. Only needs to run once for each ABI and version. Proceed (y/n):
@if /I NOT "%buildllvm%"=="y" GOTO build_dxtn
@echo.
@cd %mesa%llvm
@if EXIST %abi% RD /S /Q %abi%
@if EXIST cmake-%abi% RD /S /Q cmake-%abi%
@md cmake-%abi%
@cd cmake-%abi%
@set toolchain=Visual Studio 14
@set toolset=14
@if EXIST %vsenv15% set toolchain=Visual Studio 15 2017
@if EXIST %vsenv15% set toolset=15
@set ninja=n
@set oldtoolset=n
@if EXIST %mesa%ninja set ninja=1
@if EXIST %vsenv15% set ninja=%ninja%2
@if %ninja%==12 set /p oldtoolset=Build with MSVC 2015 backward compatibility toolset, alternative solution for LLVM 3.9.1 build with Visual Studio 2017 (y/n):
@if %ninja%==12 echo.
@if /I "%oldtoolset%"=="y" set ninja=y
@if /I "%oldtoolset%"=="y" set toolset=14
@if %ninja%==12 set ninja=2
@if %ninja%==1 set ninja=2
@if %ninja%==2 set /p ninja=Use Ninja build system instead of MsBuild, there is no requirement to do this with the primary toolset though (y/n):
@echo.
@if /I "%ninja%"=="y" set toolchain=Ninja
@if "%toolchain%"=="Ninja" set PATH=%mesa%ninja\;%PATH%
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@set llvmbuildsys=%CD%
@call %vsenv%
@set vsenvloaded=1
@echo.
@set modtoolchainabi=0
@if NOT "%toolchain%"=="Ninja" set modtoolchainabi=1
@if %abi%==x64 set modtoolchainabi=%modtoolchainabi%2
@if %modtoolchainabi%==12 set toolchain=%toolchain% Win64
@cd %llvmbuildsys%
@set cmakecmd=cmake -G "%toolchain%"
@if %hostabi%==x64 set cmakecmd=%cmakecmd% -Thost=x64
@set cmakecmd=%cmakecmd% -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=../%abi% ..
@%cmakecmd%
@echo.
@pause
@echo.
@if NOT "%toolchain%"=="Ninja" cmake --build . --config Release --target install
@if "%toolchain%"=="Ninja" ninja install
@echo.
@echo %toolset% > %mesa%toolset-%abi%.ini

:build_dxtn
@if NOT EXIST %gcc% GOTO build_mesa
@if NOT EXIST %mesa%dxtn GOTO build_mesa
@set /p builddxtn=Do you want to build S3 texture compression library? (y/n):
@if /i NOT "%builddxtn%"=="y" GOTO build_mesa
@set PATH=%gcc%\;%PATH%
@cd %mesa%dxtn
@echo.
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@set dxtn=gcc -shared -m%minabi% -v *.c *.h -I ..\mesa\include -Wl,--dll,--dynamicbase,--enable-auto-image-base,--nxcompat -o %abi%\dxtn.dll
@%dxtn%
@echo.
@set dxtnbuilt=1

:build_mesa
@set /p buildmesa=Begin mesa build. Proceed (y/n):
@if /i NOT "%buildmesa%"=="y" GOTO distcreate
@echo.
@set LLVM=%mesa%llvm\%abi%
@if NOT EXIST %LLVM% (
@echo Could not find LLVM, aborting mesa build.
@echo.
@pause
@GOTO exit
)
@cd %mesa%
@if NOT EXIST mesa echo Mesa3D source code not found. Attempting to download it using git as long as it is in PATH...
@if NOT EXIST mesa set /p branch=Enter Mesa source code branch name - defaults to master:
@if "%branch%"=="" set branch=master
@if NOT EXIST mesa echo.
@if NOT EXIST mesa git clone --depth=1 --branch=%branch% git://anongit.freedesktop.org/mesa/mesa mesa
@cd mesa
git apply ..\mesa-dist-win\patches\scons-llvm5.patch
git apply ..\mesa-dist-win\patches\s3tc.patch
@set openswr=n
@set sconscmd=python %mesa%Python\Scripts\scons.py build=release platform=windows machine=%longabi% libgl-gdi
@set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
@echo.
@if /I "%openswr%"=="y" set sconscmd=%sconscmd% swr=1
@set /p osmesa=Do you want to build off-screen rendering drivers (y/n):
@echo.
@if /I "%osmesa%"=="y" set sconscmd=%sconscmd% osmesa
@set /p graw=Do you want to build graw library (y/n):
@echo.
@if /I "%graw%"=="y" set sconscmd=%sconscmd% graw-gdi
@GOTO build_with_vs

:build_with_mingw
@set mingw=n
@set mingwtest=0
@if EXIST %gcc% set mingwtest=1
@set msys2=%mesa%msys64\msys2_shell.cmd
@if EXIST %msys2% set mingwtest=%mingwtest%2
@if %mingwtest%==12 set /p mingw=Do you want to build with MinGW-W64 instead of Visual Studio (y=yes):
@if %dxtnbuilt%==0 set PATH=%gcc%\;%PATH%
@if /I "%mingw%"=="y" set sconscmd=%sconscmd% toolchain=crossmingw
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ar.exe %gcc%\%altabi%-w64-mingw32-ar.exe
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ranlib.exe %gcc%\%altabi%-w64-mingw32-ranlib.exe
@if /I "%mingw%"=="y" call "%msys2%" -use-full-path
@if /I "%mingw%"=="y" (
pacman -Syu
pacman -S python2
wget https://bootstrap.pypa.io/get-pip.py
python2 get-pip.py
pip install -U mako
pip install -U scons
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
cd $mesa
cd mesa
GOTO build_mesa_exec
)

:build_with_vs
@set cleanbuild=n
@if EXIST build\windows-%longabi% set /p cleanbuild=Do you want to clean build (y/n):
@if EXIST build\windows-%longabi% echo.
@if /I "%cleanbuild%"=="y" RD /S /Q build\windows-%longabi%
@if %vsenvloaded%==0 (
@call %vsenv%
@cd %mesa%mesa
@echo.
)

:build_mesa_exec
@%sconscmd%
@echo.

:distcreate
@set /p dist=Create or update Mesa3D distribution package (y/n):
@echo.
@if /I NOT "%dist%"=="y" GOTO exit
@cd %mesa%
@if NOT EXIST mesa-dist-win MD mesa-dist-win
@cd mesa-dist-win
@if NOT EXIST bin MD bin
@cd bin
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@cd %abi%
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\libgl-gdi\opengl32.dll opengl32.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX.dll swrAVX.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX2.dll swrAVX2.dll
@copy %mesa%mesa\build\windows-%longabi%\mesa\drivers\osmesa\osmesa.dll osmesa-swrast.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\osmesa\osmesa.dll osmesa-gallium.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\graw-gdi\graw.dll graw.dll
@copy %mesa%dxtn\%abi%\dxtn.dll dxtn.dll
@echo.
@pause

:exit
exit

@TITLE Building Mesa3D
@cd "%~dp0"
@cd ..\..\
@for %%I in ("%cd%") do @set mesa=%%~sI
@set mesa=%mesa%\
@where /q cmake.exe
@IF ERRORLEVEL 1 set PATH=%mesa%cmake\bin\;%PATH%
@set ERRORLEVEL=0
@where /q python.exe
@IF ERRORLEVEL 1 set PATH=%mesa%Python\;%mesa%Python\Scripts\;%PATH%
@set ERRORLEVEL=0
@set pyupd=y
@set pyfrstupd=1
@if EXIST pyupd.ini set /p pyfrstupd=<pyupd.ini
@if %pyfrstupd%==0 set pyupd=n
@if %pyfrstupd%==0 set /p pyupd=Install/update python modules (y/n):
@if "%pyupd%"=="y" (
@python -m pip install -U mako
@python -m pip freeze > requirements.txt
@python -m pip install -r requirements.txt --upgrade
@del requirements.txt
@echo.
@echo 0 > pyupd.ini
)
@set abi=x86
@set /p x64=Do you want to build for x64? (y/n) Otherwise build for x86:
@if /I "%x64%"=="y" set abi=x64
@set longabi=%abi%
@if %abi%==x64 set longabi=x86_64
@set altabi=i686
@if %abi%==x64 set altabi=%longabi%
@set minabi=32
@if %abi%==x64 set minabi=64
@set hostabi=x86
@set vsenv="%ProgramFiles%
@if NOT "%ProgramW6432%"=="" set hostabi=x64
@if NOT "%ProgramW6432%"=="" set vsenv=%vsenv% (x86)
@set vsenv15=%vsenv%\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars%minabi%.bat"
@set vsenv14="%VS140COMNTOOLS%..\..\VC\bin\vcvars%minabi%.bat"
@set gcc=%mesa%mingw-w64\%abi%\mingw%minabi%\bin
@set vsenvloaded=0
@set dxtnbuilt=0
@set toolset=14
@if EXIST %vsenv15% set toolset=15
@if EXIST toolset-%abi%.ini set /p toolset=<toolset-%abi%.ini
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@set PATH=%mesa%flexbison\;%PATH%
@TITLE Building Mesa3D %abi%

:build_llvm
@set /p buildllvm=Begin LLVM build. Only needs to run once for each ABI and version. Proceed (y/n):
@if /I NOT "%buildllvm%"=="y" GOTO build_dxtn
@echo.
@cd %mesa%llvm
@if EXIST %abi% RD /S /Q %abi%
@if EXIST cmake-%abi% RD /S /Q cmake-%abi%
@md cmake-%abi%
@cd cmake-%abi%
@set toolchain=Visual Studio 14
@set toolset=14
@if EXIST %vsenv15% set toolchain=Visual Studio 15 2017
@if EXIST %vsenv15% set toolset=15
@set ninja=n
@set oldtoolset=n
@if EXIST %mesa%ninja set ninja=1
@if EXIST %vsenv15% set ninja=%ninja%2
@if %ninja%==12 set /p oldtoolset=Build with MSVC 2015 backward compatibility toolset, alternative solution for LLVM 3.9.1 build with Visual Studio 2017 (y/n):
@if %ninja%==12 echo.
@if /I "%oldtoolset%"=="y" set ninja=y
@if /I "%oldtoolset%"=="y" set toolset=14
@if %ninja%==12 set ninja=2
@if %ninja%==1 set ninja=2
@if %ninja%==2 set /p ninja=Use Ninja build system instead of MsBuild, there is no requirement to do this with the primary toolset though (y/n):
@echo.
@if /I "%ninja%"=="y" set toolchain=Ninja
@if "%toolchain%"=="Ninja" set PATH=%mesa%ninja\;%PATH%
@set vsenv=%vsenv14%
@if %toolset%==15 set vsenv=%vsenv15%
@set llvmbuildsys=%CD%
@call %vsenv%
@set vsenvloaded=1
@echo.
@set modtoolchainabi=0
@if NOT "%toolchain%"=="Ninja" set modtoolchainabi=1
@if %abi%==x64 set modtoolchainabi=%modtoolchainabi%2
@if %modtoolchainabi%==12 set toolchain=%toolchain% Win64
@cd %llvmbuildsys%
@set cmakecmd=cmake -G "%toolchain%"
@if %hostabi%==x64 set cmakecmd=%cmakecmd% -Thost=x64
@set cmakecmd=%cmakecmd% -DLLVM_TARGETS_TO_BUILD=X86 -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_CRT_RELEASE=MT -DLLVM_ENABLE_RTTI=1 -DLLVM_ENABLE_TERMINFO=OFF -DCMAKE_INSTALL_PREFIX=../%abi% ..
@%cmakecmd%
@echo.
@pause
@echo.
@if NOT "%toolchain%"=="Ninja" cmake --build . --config Release --target install
@if "%toolchain%"=="Ninja" ninja install
@echo.
@echo %toolset% > %mesa%toolset-%abi%.ini

:build_dxtn
@if NOT EXIST %gcc% GOTO build_mesa
@if NOT EXIST %mesa%dxtn GOTO build_mesa
@set /p builddxtn=Do you want to build S3 texture compression library? (y/n):
@if /i NOT "%builddxtn%"=="y" GOTO build_mesa
@set PATH=%gcc%\;%PATH%
@cd %mesa%dxtn
@echo.
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@set dxtn=gcc -shared -m%minabi% -v *.c *.h -I ..\mesa\include -Wl,--dll,--dynamicbase,--enable-auto-image-base,--nxcompat -o %abi%\dxtn.dll
@%dxtn%
@echo.
@set dxtnbuilt=1

:build_mesa
@set /p buildmesa=Begin mesa build. Proceed (y/n):
@if /i NOT "%buildmesa%"=="y" GOTO distcreate
@echo.
@set LLVM=%mesa%llvm\%abi%
@if NOT EXIST %LLVM% (
@echo Could not find LLVM, aborting mesa build.
@echo.
@pause
@GOTO exit
)
@cd %mesa%
@if NOT EXIST mesa echo Mesa3D source code not found. Attempting to download it using git as long as it is in PATH...
@if NOT EXIST mesa set /p branch=Enter Mesa source code branch name - defaults to master:
@if "%branch%"=="" set branch=master
@if NOT EXIST mesa echo.
@if NOT EXIST mesa git clone --depth=1 --branch=%branch% git://anongit.freedesktop.org/mesa/mesa mesa
@cd mesa
git apply ..\mesa-dist-win\patches\scons-llvm5.patch
git apply ..\mesa-dist-win\patches\s3tc.patch
@echo.
@set openswr=n
@set sconscmd=python %mesa%Python\Scripts\scons.py build=release platform=windows machine=%longabi% libgl-gdi
@set /p openswr=Do you want to build OpenSWR drivers? (y=yes):
@echo.
@if /I "%openswr%"=="y" set sconscmd=%sconscmd% swr=1
@set /p osmesa=Do you want to build off-screen rendering drivers (y/n):
@echo.
@if /I "%osmesa%"=="y" set sconscmd=%sconscmd% osmesa
@set /p graw=Do you want to build graw library (y/n):
@echo.
@if /I "%graw%"=="y" set sconscmd=%sconscmd% graw-gdi
@GOTO build_with_vs

:build_with_mingw
@set mingw=n
@set mingwtest=0
@if EXIST %gcc% set mingwtest=1
@set msys2=%mesa%msys64\msys2_shell.cmd
@if EXIST %msys2% set mingwtest=%mingwtest%2
@if %mingwtest%==12 set /p mingw=Do you want to build with MinGW-W64 instead of Visual Studio (y=yes):
@if %dxtnbuilt%==0 set PATH=%gcc%\;%PATH%
@if /I "%mingw%"=="y" set sconscmd=%sconscmd% toolchain=crossmingw
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ar.exe %gcc%\%altabi%-w64-mingw32-ar.exe
@if /I "%mingw%"=="y" copy %gcc%\%altabi%-w64-mingw32-gcc-ranlib.exe %gcc%\%altabi%-w64-mingw32-ranlib.exe
@if /I "%mingw%"=="y" call "%msys2%" -use-full-path
@if /I "%mingw%"=="y" (
pacman -Syu
pacman -S python2
wget https://bootstrap.pypa.io/get-pip.py
python2 get-pip.py
pip install -U mako
pip install -U scons
pip freeze > requirements.txt
pip install -r requirements.txt --upgrade
cd $mesa
cd mesa
GOTO build_mesa_exec
)

:build_with_vs
@set cleanbuild=n
@if EXIST build\windows-%longabi% set /p cleanbuild=Do you want to clean build (y/n):
@if EXIST build\windows-%longabi% echo.
@if /I "%cleanbuild%"=="y" RD /S /Q build\windows-%longabi%
@if %vsenvloaded%==0 (
@call %vsenv%
@cd %mesa%mesa
@echo.
)

:build_mesa_exec
@%sconscmd%
@echo.

:distcreate
@set /p dist=Create or update Mesa3D distribution package (y/n):
@echo.
@if /I NOT "%dist%"=="y" GOTO exit
@cd %mesa%
@if NOT EXIST mesa-dist-win MD mesa-dist-win
@cd mesa-dist-win
@if NOT EXIST bin MD bin
@cd bin
@if EXIST %abi% RD /S /Q %abi%
@MD %abi%
@cd %abi%
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\libgl-gdi\opengl32.dll opengl32.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX.dll swrAVX.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\drivers\swr\swrAVX2.dll swrAVX2.dll
@copy %mesa%mesa\build\windows-%longabi%\mesa\drivers\osmesa\osmesa.dll osmesa-swrast.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\osmesa\osmesa.dll osmesa-gallium.dll
@copy %mesa%mesa\build\windows-%longabi%\gallium\targets\graw-gdi\graw.dll graw.dll
@copy %mesa%dxtn\%abi%\dxtn.dll dxtn.dll
@echo.
@pause

:exit
exit

Build script: Minor cosmetic tweak

Build script: Minor cosmetic tweak


@echo off

set elvl=-1

rem ============ for unit test ==================
rem set debug_on=1
rem set isonm=ubuntu14.04.1-preseed.iso
rem set boxnm=UbuntuTest

rem set rtdir=%~dp0
rem set prmf=_set_param.bat

rem call %rtdir%%prmf% -kickrt %rtdir% -iso %isonm% -d %debug_on%
rem call %rtdir%%prmf% -kickrt %rtdir% -iso %isonm% -d %debug_on% -nm %boxnm%
rem ============ for unit test ==================

echo createvm

vboxmanage createvm --name %BOX_NM%

echo registervm

rem mkdir %VBOXRT%%BOX_NM%

vboxmanage registervm %VBOXRT%%BOX_NM%\%BOX_NM%.vbox

echo modifyvm

rem -- bridge --
rem vboxmanage modifyvm %BOX_NM%  --ostype %OSTYPE% --memory %MMRY% --acpi on --ioapic on --cpus %CPUS% --hwvirtex on --nestedpaging on --largepages on --nic1 %NIC% --nictype1 %NICTYPE% --bridgeadapter1 "%BRDG_ADPT%" --cableconnected1 on --clipboard bidirectional --usb off --usbehci off --boot1 none --boot2 disk --boot3 dvd --boot4 net

rem -- nat and hostonly --
vboxmanage modifyvm %BOX_NM%  --ostype %OSTYPE% --memory %MMRY% --acpi on --ioapic on --cpus %CPUS% --hwvirtex on --nestedpaging on --largepages on --nic1 %NIC% --nictype1 %NICTYPE% --nic2 %NIC2% --nictype2 %NICTYPE2%  --hostonlyadapter2 "%HOST_ADPT2%" --cableconnected1 on --clipboard bidirectional --usb off --usbehci off --boot1 dvd --boot2 disk --boot3 net --boot4 none

rem vboxmanage modifyvm %BOX_NM%  --ostype %OSTYPE% --memory %MMRY% --acpi on --ioapic on --cpus %CPUS% --hwvirtex on --nestedpaging on --largepages on --nic1 %NIC% --nictype1 %NICTYPE% --cableconnected1 on --clipboard bidirectional --usb off --usbehci off --boot1 dvd --boot2 disk --boot3 net --boot4 none

echo createhd

vboxmanage createhd --size %STRG_SIZE% --variant Fixed --filename %VBOXRT%%BOX_NM%\%BOX_NM%.vdi

echo storagectl

vboxmanage storagectl %BOX_NM%  --name "%STRG_NM%" --add %STRG_TYPE% --portcount %PORT_CNT% --bootable %BOOT%

echo storageattach port 1

vboxmanage storageattach %BOX_NM%  --storagectl "%STRG_NM%" --port 1 --type hdd --medium %VBOXRT%%BOX_NM%\%BOX_NM%.vdi

echo storageattach port 2

vboxmanage storageattach %BOX_NM%  --storagectl "%STRG_NM%" --port 2 --type dvddrive --medium %ISO_RT%%ISO_NM%

echo end setting not startvm

vboxmanage startvm %BOX_NM%

set elvl=%ERRORLEVEL%

echo virtualbox started - end this script.

exit /b %elvl%

:PARAM-ERR

exit /b %elvl%

Create createbox_nat.bat

Create createbox_nat.bat

for nat+hostonly tiny net.


@echo off
SET scriptdir=%~dp0
powershell -ExecutionPolicy Bypass -NoProfile -File %scriptdir%UnitsNet\Scripts\GenerateUnits.ps1
pause

Remove pause statement

GenerateUnits.bat: Remove pause statement


if "%ARCH%" == "32" (
    powershell -Command "(New-Object Net.WebClient).DownloadFile('https://download.microsoft.com/download/d/d/9/dd9a82d0-52ef-40db-8dab-795376989c03/vcredist_x86.exe', 'vcredist_x86.exe')"
    if errorlevel 1 exit 1
    vcredist_x86.exe /qb!
    if errorlevel 1 exit 1
    set "ARCH_DIR=x86"
)

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

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

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

cd %SRC_DIR%

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

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

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

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

cd %SRC_DIR%

Fix download url

Fix download url


cd github/google-cloud-eclipse

set CLOUDSDK_CORE_DISABLE_USAGE_REPORTING=true
wget https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe
start /WAIT GoogleCloudSDKInstaller.exe /S /noreporting /nostartmenu /nodesktop /logtofile /D=T:\google
call t:\google\google-cloud-sdk\bin\gcloud.cmd components copy-bundled-python>>python_path.txt && SET /p CLOUDSDK_PYTHON=<python_path.txt && DEL python_path.txt
call t:\google\google-cloud-sdk\bin\gcloud.cmd components update --quiet
call t:\google\google-cloud-sdk\bin\gcloud.cmd components install app-engine-java --quiet
set GOOGLE_CLOUD_SDK_HOME=t:\google\google-cloud-sdk

wget http://www-us.apache.org/dist/maven/maven-3/3.5.0/binaries/apache-maven-3.5.0-bin.zip
unzip apache-maven-3.5.0-bin.zip

apache-maven-3.5.0/bin/mvn --fail-at-end -Ptravis -Declipse.target=oxygen verify

exit /b %ERRORLEVEL%

cd github/google-cloud-eclipse

set CLOUDSDK_CORE_DISABLE_USAGE_REPORTING=true
call gcloud.cmd components update --quiet
call gcloud.cmd components install app-engine-java --quiet

mvn -B -N io.takari:maven:wrapper -Dmaven=3.5.0
mvnw.cmd -B --fail-at-end -Ptravis -Declipse.target=oxygen verify

exit /b %ERRORLEVEL%

Use "gcloud" and "mvn" provided in Kokoro Windows env / suppress "mvn" garbage log messages (#1907)

* Suppress garbage log messages
* Use built-in gcloud and mvn
* Set up and use 3.5.0 Maven wrapper


@echo off

setlocal EnableDelayedExpansion

set registryRoot=HKCU\Software\Classes

reg add "%registryRoot%\*\shell\grepWin..." /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\*\shell\grepWin..." /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Directory\background\shell\grepWin..." /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Directory\shell\grepWin..." /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Drive\shell\grepWin..." /v LegacyDisable /t REG_SZ /f
reg add "%registryRoot%\Folder\shell\grepWin..." /v LegacyDisable /t REG_SZ /f

Add script for disabling grepWin context menu


@if "%1" == "" goto error
@if "%2" == "" goto error

@for /f "delims=. tokens=1-3" %%a in ( "%2" ) do (set major=%%a && set minor=%%b && set revision=%%c)

@if not defined revision goto error
@if not defined minor goto error
@if not defined major goto error

git fetch
git tag -a v%2 -m "Telerik AppBuilder %2" remotes/origin/master
git push origin v%2

@goto :EOF

:error
@echo Sample usage: publish appbuilder.tgz 1.2.3
@echo Version string must be in Major.Minor.Revision format

npm publish "%1" --ignore-scripts

Change publish.cmd to also create a github tag


@ECHO OFF
SubWCRev . "src\Version_in.h" "src\Version_rev.h"
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
SubWCRev . "res\Notepad2.exe.manifest.conf" "res\Notepad2.exe.manifest" >NUL
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
SubWCRev . "distrib\res\full\setup.manifest.conf" "distrib\res\full\setup.manifest" >NUL
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
SubWCRev . "distrib\res\lite\setup.manifest.conf" "distrib\res\lite\setup.manifest" >NUL
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
GOTO :EOF

:NoSubWCRev
ECHO:NoSubWCRev, will use VERSION_REV=0
ECHO:#define VERSION_REV 0 >"src\Version_rev.h"
COPY /Y "res\Notepad2.exe.manifest.template" "res\Notepad2.exe.manifest"
COPY /Y "distrib\res\full\setup.manifest.template" "distrib\res\full\setup.manifest"
COPY /Y "distrib\res\lite\setup.manifest.template" "distrib\res\lite\setup.manifest"

@ECHO OFF
SubWCRev . "src\Version_in.h" "src\Version_rev.h" -f
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
SubWCRev . "res\Notepad2.exe.manifest.conf" "res\Notepad2.exe.manifest" -f >NUL
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
SubWCRev . "distrib\res\full\setup.manifest.conf" "distrib\res\full\setup.manifest" -f >NUL
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
SubWCRev . "distrib\res\lite\setup.manifest.conf" "distrib\res\lite\setup.manifest" -f >NUL
IF %ERRORLEVEL% NEQ 0 GOTO :NoSubWCRev
GOTO :EOF

:NoSubWCRev
ECHO:NoSubWCRev, will use VERSION_REV=0
ECHO:#define VERSION_REV 0 >"src\Version_rev.h"
COPY /Y "res\Notepad2.exe.manifest.template" "res\Notepad2.exe.manifest"
COPY /Y "distrib\res\full\setup.manifest.template" "distrib\res\full\setup.manifest"
COPY /Y "distrib\res\lite\setup.manifest.template" "distrib\res\lite\setup.manifest"

update update_version.bat

update update_version.bat

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


cl -EHsc -I../include/gsl -Dgsl_CONFIG_CONTRACT_VIOLATION_THROWS -Dgsl_FEATURE_EXPERIMENTAL_RETURN_GUARD gsl-lite.t.cpp assert.t.cpp at.t.cpp byte.t.cpp issue.t.cpp not_null.t.cpp owner.t.cpp span.t.cpp string_span.t.cpp util.t.cpp && gsl-lite.t.exe --pass

Remove --pass

Remove --pass


@echo off

rem   Licensed to the Apache Software Foundation (ASF) under one or more
rem   contributor license agreements.  See the NOTICE file distributed with
rem   this work for additional information regarding copyright ownership.
rem   The ASF licenses this file to You under the Apache License, Version 2.0
rem   (the "License"); you may not use this file except in compliance with
rem   the License.  You may obtain a copy of the License at
rem
rem       http://www.apache.org/licenses/LICENSE-2.0
rem
rem   Unless required by applicable law or agreed to in writing, 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   ===============================================================
rem   Enviroment variables
rem   SERVER_PORT (optional) - define the rmiregistry and server port
rem
rem   JVM_ARGS - Java flags - these are handled by jmeter.bat
rem
rem   ===============================================================

REM Protect environment against changes
setlocal

if exist jmeter-server.bat goto winNT1
echo Changing to JMeter home directory
cd /D %~dp0
:winNT1

if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Could not find ApacheJmeter_core.jar ...
REM Try to work out JMETER_HOME
echo ... Trying JMETER_HOME=..
set JMETER_HOME=..
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo ... trying JMETER_HOME=.
set JMETER_HOME=.
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Cannot determine JMETER_HOME !
goto exit

:setCP
echo Found ApacheJMeter_core.jar

REM No longer need to create the rmiregistry as it is done by the server
REM set CLASSPATH=%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar;%JMETER_HOME%\lib\logkit-1.2.jar

REM START rmiregistry %SERVER_PORT%
REM

rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*

if not "%SERVER_PORT%" == "" goto port

call jmeter -s -j jmeter-server.log %JMETER_CMD_LINE_ARGS%
goto end

:port
call jmeter -Dserver_port=%SERVER_PORT% -s -j jmeter-server.log %JMETER_CMD_LINE_ARGS%

:end

rem No longer needed, as server is started in-process
rem taskkill /F /IM rmiregistry.exe

:exit

@echo off

rem   Licensed to the Apache Software Foundation (ASF) under one or more
rem   contributor license agreements.  See the NOTICE file distributed with
rem   this work for additional information regarding copyright ownership.
rem   The ASF licenses this file to You under the Apache License, Version 2.0
rem   (the "License"); you may not use this file except in compliance with
rem   the License.  You may obtain a copy of the License at
rem
rem       http://www.apache.org/licenses/LICENSE-2.0
rem
rem   Unless required by applicable law or agreed to in writing, 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   ===============================================================
rem   Enviroment variables
rem   SERVER_PORT (optional) - define the rmiregistry and server port
rem
rem   JVM_ARGS - Java flags - these are handled by jmeter.bat
rem
rem   ===============================================================

REM Protect environment against changes
setlocal

if exist jmeter-server.bat goto winNT1
echo Changing to JMeter home directory
cd /D %~dp0
:winNT1

if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Could not find ApacheJmeter_core.jar ...
REM Try to work out JMETER_HOME
echo ... Trying JMETER_HOME=..
set JMETER_HOME=..
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo ... trying JMETER_HOME=.
set JMETER_HOME=.
if exist %JMETER_HOME%\lib\ext\ApacheJMeter_core.jar goto setCP
echo Cannot determine JMETER_HOME !
goto exit

:setCP
echo Found ApacheJMeter_core.jar

REM No longer need to create the rmiregistry as it is done by the server
REM set CLASSPATH=%JMETER_HOME%\lib\ext\ApacheJMeter_core.jar;%JMETER_HOME%\lib\jorphan.jar

REM START rmiregistry %SERVER_PORT%
REM

rem On NT/2K grab all arguments at once
set JMETER_CMD_LINE_ARGS=%*

if not "%SERVER_PORT%" == "" goto port

call jmeter -s -j jmeter-server.log %JMETER_CMD_LINE_ARGS%
goto end

:port
call jmeter -Dserver_port=%SERVER_PORT% -s -j jmeter-server.log %JMETER_CMD_LINE_ARGS%

:end

rem No longer needed, as server is started in-process
rem taskkill /F /IM rmiregistry.exe

:exit

Remove logkit

Remove logkit

git-svn-id: 5ccfe34f605a6c2f9041ff2965ab60012c62539a@1793272 13f79535-47bb-0310-9956-ffa450edef68


Set SourceFolder=..\Source\
Set BookExt=.md
Set T=w
Set S=w
Set BuildLog=BuildLog.txt
@echo Build begins at: %DATE% %TIME% > %BuildLog%
Set STARTTIME=%TIME%

:: Stop PDF reader
TaskKill /f /im AcroRd32.exe

Call GenerateBook  >> %BuildLog%
Call GenerateBook ӹ >> %BuildLog%

:: Clean up
:: Del *.html
:: Del %SourceFolder%*%S%%BookExt%

::========================= Calculate build time

@echo off
Set ENDTIME=%TIME%
:: Change formatting for the start and end times
for /F "tokens=1-4 delims=:.," %%a in ("%STARTTIME%") do (
   set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)

for /F "tokens=1-4 delims=:.," %%a in ("%ENDTIME%") do (
   set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)

:: Calculate the elapsed time by subtracting values
set /A elapsed=end-start

:: Format the results for output
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%

Set DURATION=%hh%:%mm%:%ss%,%cc%

echo Start    : %STARTTIME%
echo Finish   : %ENDTIME%
echo          ---------------
echo Duration : %DURATION%

@echo Build ends at: %DATE% %TIME% >> %BuildLog%

Set SourceFolder=..\Source\
Set BookExt=.md
Set T=Traditional
Set S=Simplified
Set BuildLog=BuildLog.txt
@echo Build begins at: %DATE% %TIME% > %BuildLog%
Set STARTTIME=%TIME%

:: Stop PDF reader
TaskKill /f /im AcroRd32.exe

Call GenerateBook LunYu >> %BuildLog%
Call GenerateBook MengZi >> %BuildLog%
Call GenerateBook DaXue >> %BuildLog%
Call GenerateBook ZhongYong >> %BuildLog%

:: Clean up
:: Del *.html
:: Del %SourceFolder%*%S%%BookExt%

::========================= Calculate build time

@echo off
Set ENDTIME=%TIME%
:: Change formatting for the start and end times
for /F "tokens=1-4 delims=:.," %%a in ("%STARTTIME%") do (
   set /A "start=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)

for /F "tokens=1-4 delims=:.," %%a in ("%ENDTIME%") do (
   set /A "end=(((%%a*60)+1%%b %% 100)*60+1%%c %% 100)*100+1%%d %% 100"
)

:: Calculate the elapsed time by subtracting values
set /A elapsed=end-start

:: Format the results for output
set /A hh=elapsed/(60*60*100), rest=elapsed%%(60*60*100), mm=rest/(60*100), rest%%=60*100, ss=rest/100, cc=rest%%100
if %hh% lss 10 set hh=0%hh%
if %mm% lss 10 set mm=0%mm%
if %ss% lss 10 set ss=0%ss%
if %cc% lss 10 set cc=0%cc%

Set DURATION=%hh%:%mm%:%ss%,%cc%

echo Start    : %STARTTIME%
echo Finish   : %ENDTIME%
echo          ---------------
echo Duration : %DURATION%

@echo Build ends at: %DATE% %TIME% >> %BuildLog%

Use English name

Use English name


@ECHO OFF

REM create package for Gpufit, assumes everything is compiled

if "%1" == "" (
	echo specify build base path
	goto end
)

if "%2" == "" (
	echo specify version
	goto end
)

if "%3" == "" (
	echo specify source base path
	goto end
)

REM date and time from https://stackoverflow.com/a/30343827/1536976

@SETLOCAL ENABLEDELAYEDEXPANSION

@REM Use WMIC to retrieve date and time
@echo off
FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
    IF NOT "%%~F"=="" (
        SET /A SortDate = 10000 * %%F + 100 * %%D + %%A
        set YEAR=!SortDate:~0,4!
        set MON=!SortDate:~4,2!
        set DAY=!SortDate:~6,2!
        @REM Add 1000000 so as to force a prepended 0 if hours less than 10
        SET /A SortTime = 1000000 + 10000 * %%B + 100 * %%C + %%E
        set HOUR=!SortTime:~1,2!
        set MIN=!SortTime:~3,2!
        set SEC=!SortTime:~5,2!
    )
)

set DATECODE=!YEAR!!MON!!DAY!!HOUR!!MIN!
echo %DATECODE%

REM define paths

set BUILD_BASE=%1
set VERSION=%2
set SOURCE_BASE=%3

set OUTPUT_NAME=Gpufit_%VERSION%_win32_win64_build%DATECODE%
set ROOT_INSTALL=%BUILD_BASE%\%OUTPUT_NAME%
set OUTPUT_ZIP=%BUILD_BASE%\%OUTPUT_NAME%.zip

set PERFORMANCE_TEST_INSTALL=%ROOT_INSTALL%\gpufit_performance_test
set PYTHON_INSTALL=%ROOT_INSTALL%\python
set x32_MATLAB_INSTALL=%ROOT_INSTALL%\matlab32
set x64_MATLAB_INSTALL=%ROOT_INSTALL%\matlab64
set x32_JAVA_INSTALL=%ROOT_INSTALL%\java32
set x64_JAVA_INSTALL=%ROOT_INSTALL%\java64
set SDK_INSTALL_ROOT=%ROOT_INSTALL%\gpufit_sdk

set x64_BUILD=%BUILD_BASE%\VC14x64-8.0\RelWithDebInfo
set x64_BUILD_LIB=%BUILD_BASE%\VC14x64-8.0\Gpufit\RelWithDebInfo
set x32_BUILD=%BUILD_BASE%\VC14x32-8.0\RelWithDebInfo
set x32_BUILD_LIB=%BUILD_BASE%\VC14x32-8.0\Gpufit\RelWithDebInfo

set x64_PYTHON_BUILD=%x64_BUILD%\pyGpufit\dist
set x32_PYTHON_BUILD=%x32_BUILD%\pyGpufit\dist

set x64_MATLAB_BUILD=%x64_BUILD%\matlab
set x32_MATLAB_BUILD=%x32_BUILD%\matlab

set x64_JAVA_BUILD=%x64_BUILD%\java
set x32_JAVA_BUILD=%x32_BUILD%\java

set EXAMPLES_SOURCE=%SOURCE_BASE%\examples
set PYTHON_SOURCE=%SOURCE_BASE%\Gpufit\python
set MATLAB_SOURCE=%SOURCE_BASE%\Gpufit\matlab
set SDK_README_SOURCE=%SOURCE_BASE%\package\sdk_readme.txt

set MANUAL_SOURCE=%SOURCE_BASE%\docs\_build\latex\Gpufit.pdf
set MANUAL_INSTALL=%ROOT_INSTALL%\Gpufit_%VERSION%_Manual.pdf

REM clean up (if necessary)

if exist "%ROOT_INSTALL%" rmdir /s /q "%ROOT_INSTALL%"
if exist "%OUTPUT_ZIP%" del "%OUTPUT_ZIP%"

REM create root folder

echo create root directory
mkdir "%ROOT_INSTALL%"

REM copy main readme (is markdown, written as txt) and license

copy "%SOURCE_BASE%\README.md" "%ROOT_INSTALL%\README.txt"
copy "%SOURCE_BASE%\LICENSE.txt" "%ROOT_INSTALL%"

REM copy manual

if not exist "%MANUAL_SOURCE%" (
	echo file %MANUAL_SOURCE% required, does not exist
	goto end
)
copy "%MANUAL_SOURCE%" "%MANUAL_INSTALL%"

REM copy performance test

echo collect performance test application
mkdir "%PERFORMANCE_TEST_INSTALL%"
copy "%EXAMPLES_SOURCE%\Gpufit_Cpufit_Performance_Comparison_readme.txt" "%PERFORMANCE_TEST_INSTALL%\README.txt"

mkdir "%PERFORMANCE_TEST_INSTALL%\win64"
copy "%x64_BUILD%\Gpufit_Cpufit_Performance_Comparison.exe" "%PERFORMANCE_TEST_INSTALL%\win64"
copy "%x64_BUILD%\Gpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win64"
copy "%x64_BUILD%\Cpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win64"

mkdir "%PERFORMANCE_TEST_INSTALL%\win32"
copy "%x32_BUILD%\Gpufit_Cpufit_Performance_Comparison.exe" "%PERFORMANCE_TEST_INSTALL%\win32"
copy "%x32_BUILD%\Gpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win32"
copy "%x32_BUILD%\Cpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win32"

REM copy Python packages

echo collect python
mkdir "%PYTHON_INSTALL%"
copy "%x64_PYTHON_BUILD%\pyGpufit-%VERSION%-py2.py3-none-any.whl" "%PYTHON_INSTALL%\pyGpufit-%VERSION%-py2.py3-none-win_amd64.whl"
copy "%x32_PYTHON_BUILD%\pyGpufit-%VERSION%-py2.py3-none-any.whl" "%PYTHON_INSTALL%\pyGpufit-%VERSION%-py2.py3-none-win32.whl"
copy "%PYTHON_SOURCE%\README.txt" "%PYTHON_INSTALL%"
xcopy "%PYTHON_SOURCE%\examples" "%PYTHON_INSTALL%\examples" /i /q

REM copy Matlab 32 bit

echo collect matlab32
mkdir "%x32_MATLAB_INSTALL%"
xcopy "%x32_MATLAB_BUILD%" "%x32_MATLAB_INSTALL%" /q
xcopy "%MATLAB_SOURCE%\examples" "%x32_MATLAB_INSTALL%\examples" /i /q

REM copy Matlab 64 bit

echo collect matlab64
mkdir "%x64_MATLAB_INSTALL%"
xcopy "%x64_MATLAB_BUILD%" "%x64_MATLAB_INSTALL%" /q
xcopy "%MATLAB_SOURCE%\examples" "%x64_MATLAB_INSTALL%\examples" /i /q

REM copy Java 32 bit

echo collect java32
mkdir "%x32_JAVA_INSTALL%"
xcopy "%x32_JAVA_BUILD%" "%x32_JAVA_INSTALL%" /q /s

REM copy Java 64 bit

echo collect java64
mkdir "%x64_JAVA_INSTALL%"
xcopy "%x64_JAVA_BUILD%" "%x64_JAVA_INSTALL%" /q /s

REM copy SDK_INSTALL_ROOT

echo collect SDK
mkdir "%SDK_INSTALL_ROOT%"
copy "%SDK_README_SOURCE%" "%SDK_INSTALL_ROOT%\README.txt"

mkdir "%SDK_INSTALL_ROOT%\include"
copy "%SOURCE_BASE%\Gpufit\gpufit.h" "%SDK_INSTALL_ROOT%\include"

mkdir "%SDK_INSTALL_ROOT%\win32"
copy "%x32_BUILD%\Gpufit.dll" "%SDK_INSTALL_ROOT%\win32"
copy "%x32_BUILD_LIB%\Gpufit.lib" "%SDK_INSTALL_ROOT%\win32"

mkdir "%SDK_INSTALL_ROOT%\win64"
copy "%x64_BUILD%\Gpufit.dll" "%SDK_INSTALL_ROOT%\win64"
copy "%x64_BUILD_LIB%\Gpufit.lib" "%SDK_INSTALL_ROOT%\win64"

REM zip content of temp folder with 7-Zip if availabe

set ZIP=C:\Program Files\7-Zip\7z.exe

if not exist "%ZIP%" (
	echo 7-Zip not installed, zip manually
	goto end
) ELSE (
	echo zip result
	"%ZIP%" a -y -r -mem=AES256 "%OUTPUT_ZIP%" "%ROOT_INSTALL%%" > nul
)

:end
PAUSE

@ECHO OFF

REM create package for Gpufit, assumes everything is compiled

if "%1" == "" (
	echo specify build base path
	goto end
)

if "%2" == "" (
	echo specify version
	goto end
)

if "%3" == "" (
	echo specify source base path
	goto end
)

REM date and time from https://stackoverflow.com/a/30343827/1536976

@SETLOCAL ENABLEDELAYEDEXPANSION

@REM Use WMIC to retrieve date and time
@echo off
FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
    IF NOT "%%~F"=="" (
        SET /A SortDate = 10000 * %%F + 100 * %%D + %%A
        set YEAR=!SortDate:~0,4!
        set MON=!SortDate:~4,2!
        set DAY=!SortDate:~6,2!
        @REM Add 1000000 so as to force a prepended 0 if hours less than 10
        SET /A SortTime = 1000000 + 10000 * %%B + 100 * %%C + %%E
        set HOUR=!SortTime:~1,2!
        set MIN=!SortTime:~3,2!
        set SEC=!SortTime:~5,2!
    )
)

set DATECODE=!YEAR!!MON!!DAY!!HOUR!!MIN!
echo %DATECODE%

REM define paths

set BUILD_BASE=%1
set VERSION=%2
set SOURCE_BASE=%3

set OUTPUT_NAME=Gpufit_%VERSION%_win32_win64_build%DATECODE%
set ROOT_INSTALL=%BUILD_BASE%\%OUTPUT_NAME%
set OUTPUT_ZIP=%BUILD_BASE%\%OUTPUT_NAME%.zip

set PERFORMANCE_TEST_INSTALL=%ROOT_INSTALL%\gpufit_performance_test
set PYTHON_INSTALL=%ROOT_INSTALL%\python
set x32_MATLAB_INSTALL=%ROOT_INSTALL%\matlab32
set x64_MATLAB_INSTALL=%ROOT_INSTALL%\matlab64
set x32_JAVA_INSTALL=%ROOT_INSTALL%\java32
set x64_JAVA_INSTALL=%ROOT_INSTALL%\java64
set SDK_INSTALL_ROOT=%ROOT_INSTALL%\gpufit_sdk

set x64_BUILD=%BUILD_BASE%\VC14x64-8.0\RelWithDebInfo
set x64_BUILD_LIB=%BUILD_BASE%\VC14x64-8.0\Gpufit\RelWithDebInfo
set x32_BUILD=%BUILD_BASE%\VC14x32-8.0\RelWithDebInfo
set x32_BUILD_LIB=%BUILD_BASE%\VC14x32-8.0\Gpufit\RelWithDebInfo

set x64_PYTHON_BUILD=%x64_BUILD%\pyGpufit\dist
set x32_PYTHON_BUILD=%x32_BUILD%\pyGpufit\dist

set x64_MATLAB_BUILD=%x64_BUILD%\matlab
set x32_MATLAB_BUILD=%x32_BUILD%\matlab

set x64_JAVA_BUILD=%x64_BUILD%\java
set x32_JAVA_BUILD=%x32_BUILD%\java

set EXAMPLES_SOURCE=%SOURCE_BASE%\examples
set PYTHON_SOURCE=%SOURCE_BASE%\Gpufit\python
set MATLAB_SOURCE=%SOURCE_BASE%\Gpufit\matlab
set SDK_README_SOURCE=%SOURCE_BASE%\package\sdk_readme.txt

set MANUAL_SOURCE=%SOURCE_BASE%\docs\_build\latex\Gpufit.pdf
set MANUAL_INSTALL=%ROOT_INSTALL%\Gpufit_%VERSION%_Manual.pdf

for /r %x64_BUILD% %%a in (*cublas*) do set CUBLAS_DLL=%%~dpnxa
if not defined CUBLAS_DLL (
echo cuBLAS DLL not existent
)

REM clean up (if necessary)

if exist "%ROOT_INSTALL%" rmdir /s /q "%ROOT_INSTALL%"
if exist "%OUTPUT_ZIP%" del "%OUTPUT_ZIP%"

REM create root folder

echo create root directory
mkdir "%ROOT_INSTALL%"

REM copy main readme (is markdown, written as txt) and license

copy "%SOURCE_BASE%\README.md" "%ROOT_INSTALL%\README.txt"
copy "%SOURCE_BASE%\LICENSE.txt" "%ROOT_INSTALL%"

REM copy manual

if not exist "%MANUAL_SOURCE%" (
	echo file %MANUAL_SOURCE% required, does not exist
	goto end
)
copy "%MANUAL_SOURCE%" "%MANUAL_INSTALL%"

REM copy performance test

echo collect performance test application
mkdir "%PERFORMANCE_TEST_INSTALL%"
copy "%EXAMPLES_SOURCE%\Gpufit_Cpufit_Performance_Comparison_readme.txt" "%PERFORMANCE_TEST_INSTALL%\README.txt"

mkdir "%PERFORMANCE_TEST_INSTALL%\win64"
copy "%x64_BUILD%\Gpufit_Cpufit_Performance_Comparison.exe" "%PERFORMANCE_TEST_INSTALL%\win64"
copy "%x64_BUILD%\Gpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win64"
copy "%x64_BUILD%\Cpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win64"
if defined CUBLAS_DLL (
copy "%CUBLAS_DLL%" "%PERFORMANCE_TEST_INSTALL%\win64"
)

mkdir "%PERFORMANCE_TEST_INSTALL%\win32"
copy "%x32_BUILD%\Gpufit_Cpufit_Performance_Comparison.exe" "%PERFORMANCE_TEST_INSTALL%\win32"
copy "%x32_BUILD%\Gpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win32"
copy "%x32_BUILD%\Cpufit.dll" "%PERFORMANCE_TEST_INSTALL%\win32"

REM copy Python packages

echo collect python
mkdir "%PYTHON_INSTALL%"
copy "%x64_PYTHON_BUILD%\pyGpufit-%VERSION%-py2.py3-none-any.whl" "%PYTHON_INSTALL%\pyGpufit-%VERSION%-py2.py3-none-win_amd64.whl"
copy "%x32_PYTHON_BUILD%\pyGpufit-%VERSION%-py2.py3-none-any.whl" "%PYTHON_INSTALL%\pyGpufit-%VERSION%-py2.py3-none-win32.whl"
copy "%PYTHON_SOURCE%\README.txt" "%PYTHON_INSTALL%"
xcopy "%PYTHON_SOURCE%\examples" "%PYTHON_INSTALL%\examples" /i /q

REM copy Matlab 32 bit

echo collect matlab32
mkdir "%x32_MATLAB_INSTALL%"
xcopy "%x32_MATLAB_BUILD%" "%x32_MATLAB_INSTALL%" /q
xcopy "%MATLAB_SOURCE%\examples" "%x32_MATLAB_INSTALL%\examples" /i /q

REM copy Matlab 64 bit

echo collect matlab64
mkdir "%x64_MATLAB_INSTALL%"
xcopy "%x64_MATLAB_BUILD%" "%x64_MATLAB_INSTALL%" /q
xcopy "%MATLAB_SOURCE%\examples" "%x64_MATLAB_INSTALL%\examples" /i /q

REM copy Java 32 bit

echo collect java32
mkdir "%x32_JAVA_INSTALL%"
xcopy "%x32_JAVA_BUILD%" "%x32_JAVA_INSTALL%" /q /s

REM copy Java 64 bit

echo collect java64
mkdir "%x64_JAVA_INSTALL%"
xcopy "%x64_JAVA_BUILD%" "%x64_JAVA_INSTALL%" /q /s

REM copy SDK_INSTALL_ROOT

echo collect SDK
mkdir "%SDK_INSTALL_ROOT%"
copy "%SDK_README_SOURCE%" "%SDK_INSTALL_ROOT%\README.txt"

mkdir "%SDK_INSTALL_ROOT%\include"
copy "%SOURCE_BASE%\Gpufit\gpufit.h" "%SDK_INSTALL_ROOT%\include"

mkdir "%SDK_INSTALL_ROOT%\win32"
copy "%x32_BUILD%\Gpufit.dll" "%SDK_INSTALL_ROOT%\win32"
copy "%x32_BUILD_LIB%\Gpufit.lib" "%SDK_INSTALL_ROOT%\win32"

mkdir "%SDK_INSTALL_ROOT%\win64"
copy "%x64_BUILD%\Gpufit.dll" "%SDK_INSTALL_ROOT%\win64"
copy "%x64_BUILD_LIB%\Gpufit.lib" "%SDK_INSTALL_ROOT%\win64"
if defined CUBLAS_DLL (
copy "%CUBLAS_DLL%" "%SDK_INSTALL_ROOT%\win64"
)

REM zip content of temp folder with 7-Zip if availabe

set ZIP=C:\Program Files\7-Zip\7z.exe

if not exist "%ZIP%" (
	echo 7-Zip not installed, zip manually
	goto end
) ELSE (
	echo zip result
	"%ZIP%" a -y -r -mem=AES256 "%OUTPUT_ZIP%" "%ROOT_INSTALL%%" > nul
)

:end
PAUSE

copy cublas dll to release package

copy cublas dll to release package


@echo off
:: Сдתű
:: Author:Jason.z
:: Mail:ccnuzxg@gmail.com
:: CopyRight:AnAn Studio(http://www.anan-studio.com)
:main
cls
set str=
set /p str=    ַ(˳ֱӰس)
if not defined str exit
cls
echo.
echo            תǰ"%str%"
::for %%i in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do call set str=%%str:%%i=%%i%%
for %%i in (a b c d e f g h i j k l m n o p q r s t u v w x y z) do call set str=%%str:%%i=%%i%%
echo ____________________________________________
echo.
echo            ת"%str%"
echo.
echo                     һʾ...
pause>nul
goto main

add covert.bat

add covert.bat

add covert.bat


@echo off

if not exist tmp mkdir tmp

echo eth0 > tmp/ethernet-device.txt
copy /y nul "tmp/pypirc.txt"

set /p USER_NAME="User name: "
:: TODO: Make files with newlines. This would add a newline.
::echo %USER_NAME% > tmp/user-name.txt
echo|set /p=%USER_NAME% > tmp/user-name.txt

set /p FULL_NAME="Full name: "
echo|set /p=%FULL_NAME% > tmp/full-name.txt

set /p DOMAIN="Domain: "
echo|set /p=%DOMAIN% > tmp/domain.txt

vagrant up
pause

@echo off

if not exist tmp mkdir tmp

echo eth0> tmp/ethernet-device.txt
copy /y nul "tmp/pypirc.txt"

set /p USER_NAME="User name: "
echo %USER_NAME%> tmp/user-name.txt

set /p FULL_NAME="Full name: "
echo %FULL_NAME%> tmp/full-name.txt

set /p DOMAIN="Domain: "
echo %DOMAIN%> tmp/domain.txt

vagrant up
pause

fix spaces being appended after strings in create.bat


REM build-vc-programs.cmd

REM This script does the following:
REM     1) Bootstraps (builds) the VCPKG submodule; VCPKG is used to be the
REM        sample and tools programs that rely on Google Protocol Buffers.
REM     2) builds the Visual C++ samples and tools contained in this repository.
REM
REM PRECONDITIONS
REM -------------
REM     - You have recursively cloned this repo; if not, submodules/vcpkg will be empty.
REM     - You have installed Visual Studio 2017 C++ tools. 2015 may also work.
REM     - PowerShell is available on your computer.
REM     - You must run this script from within a Visual Studio Developer Command prompt.
REM     - You must have internet access.
REM
REM POSTCONDITIONS
REM --------------
REM On successful execution of this script the vcpkg tools will be built and
REM the projects built by this script will have been built successfully.

REM ---------------------------------------------------------------------------
REM Bootstrap and build vcpkg

IF "%VisualStudioVersion%" == "" GOTO VSCmdPrompt

pushd submodules\vcpkg
call .\bootstrap-vcpkg.bat
ECHO vcpkg build completed.

REM per https://github.com/Microsoft/vcpkg/issues/645
if not exist downloads mkdir downloads
echo "." > downloads\AlwaysAllowEverything
dir downloads\Always*

vcpkg install protobuf:x86-windows-static
vcpkg install protobuf:x64-windows-static
ECHO Installs completed.

popd

REM ---------------------------------------------------------------------------
REM Build the programs

REM Per https://github.com/NuGet/Home/issues/7386, /t:restore does not support
REM packages.config, and nuget.exe is therefore necessary. However, nuget 3.5.0,
REM as available in vcpkg\downloads, attempts to use the v14 build tools
REM ("Failed to load msbuild Toolset... Microsoft.Build, Version=14.0.0.0").
REM Don't use the old nuget.

REM SET NUGET_EXE=.\submodules\vcpkg\downloads\tools\nuget-4.6.2-windows\nuget.exe
REM
REM %NUGET_EXE% restore tools\arislog\arislog.sln
REM
REM REM pushd tools\arislog\arislog
REM REM msbuild /t:restore /p:Configuration="Release" /p:Platform="x86"
REM REM msbuild /t:restore /p:Configuration="Release" /p:Platform="x64"
REM REM popd
REM
REM msbuild tools\arislog\arislog.sln /t:Rebuild /p:Configuration="Release" /p:Platform="x86"
REM IF %ERRORLEVEL% NEQ 0 EXIT /B 1
REM
REM msbuild tools\arislog\arislog.sln /t:Rebuild /p:Configuration="Release" /p:Platform="x64"
REM IF %ERRORLEVEL% NEQ 0 EXIT /B 1
REM
REM
REM %NUGET_EXE% restore sample-code\vc-using-framestream\vc-using-framestream.sln
REM REM pushd sample-code\vc-using-framestream
REM REM msbuild /t:restore /p:Configuration="Release" /p:Platform="x86"
REM REM msbuild /t:restore /p:Configuration="Release" /p:Platform="x64"
REM REM popd
REM
REM msbuild sample-code\vc-using-framestream\vc-using-framestream.sln /t:Rebuild /p:Configuration="Release" /p:Platform="x86"
REM IF %ERRORLEVEL% NEQ 0 EXIT /B 1
REM
REM msbuild sample-code\vc-using-framestream\vc-using-framestream.sln /t:Rebuild /p:Configuration="Release" /p:Platform="x64"
REM IF %ERRORLEVEL% NEQ 0 EXIT /B 1

GOTO End

:VSCmdPrompt
ECHO Couldn't find environment variable 'VisualStudioVersion'.
ECHO Are you at a Visual Studio developer command prompt?
EXIT /B 1

:End

REM build-vc-programs.cmd

REM This script does the following:
REM     1) Bootstraps (builds) the VCPKG submodule; VCPKG is used to be the
REM        sample and tools programs that rely on Google Protocol Buffers.
REM     2) builds the Visual C++ samples and tools contained in this repository.
REM
REM PRECONDITIONS
REM -------------
REM     - You have recursively cloned this repo; if not, submodules/vcpkg will be empty.
REM     - You have installed Visual Studio 2017 C++ tools. 2015 may also work.
REM     - PowerShell is available on your computer.
REM     - You must run this script from within a Visual Studio Developer Command prompt.
REM     - You must have internet access.
REM
REM POSTCONDITIONS
REM --------------
REM On successful execution of this script the vcpkg tools will be built and
REM the projects built by this script will have been built successfully.

REM ---------------------------------------------------------------------------
REM Bootstrap and build vcpkg

IF "%VisualStudioVersion%" == "" GOTO VSCmdPrompt

pushd submodules\vcpkg
call .\bootstrap-vcpkg.bat
ECHO vcpkg build completed.

REM per https://github.com/Microsoft/vcpkg/issues/645
if not exist downloads mkdir downloads
echo "." > downloads\AlwaysAllowEverything
dir downloads\Always*

vcpkg install protobuf:x86-windows-static
vcpkg install protobuf:x64-windows-static
ECHO Installs completed.

popd

REM ---------------------------------------------------------------------------
REM Build the programs

REM Per https://github.com/NuGet/Home/issues/7386, /t:restore does not support
REM packages.config, and nuget.exe is therefore necessary. However, nuget 3.5.0,
REM as available in vcpkg\downloads, attempts to use the v14 build tools
REM ("Failed to load msbuild Toolset... Microsoft.Build, Version=14.0.0.0").
REM Don't use the old nuget.

REM NOTE
REM We're not currently building arislog or vc-using-framestream from this script,
REM they're built in separate build steps on the build server.

GOTO End

:VSCmdPrompt
ECHO Couldn't find environment variable 'VisualStudioVersion'.
ECHO Are you at a Visual Studio developer command prompt?
EXIT /B 1

:End

Remove arislog and vc-using-framestream from the build script; they are now built in individual steps on the buil server.