-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpulldawn.cmd
More file actions
68 lines (52 loc) · 2.42 KB
/
pulldawn.cmd
File metadata and controls
68 lines (52 loc) · 2.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
REM @echo off
set /p DAWNCOMMIT=<dawn.commit
pushd src\WebGPUNative
rd /s /q tmp
mkdir tmp
pushd tmp
mkdir dawn
REM git clone https://github.com/google/dawn.git
pushd dawn
git init
git remote add origin https://github.com/google/dawn.git
git fetch --depth 1 origin %DAWNCOMMIT%
git reset --hard FETCH_HEAD
REM git checkout %DAWNCOMMIT%
python tools\fetch_dawn_dependencies.py --use-test-deps
mkdir out
pushd out
mkdir Release
pushd Release
cmake ..\.. -G "Visual Studio 17 2022" -A x64 -DCMAKE_CXX_STANDARD=17 -DDAWN_BUILD_TESTS=OFF -DTINT_BUILD_TESTS=OFF -DTINT_BUILD_CMD_TOOLS=OFF -DCMAKE_BUILD_TYPE=Release -DTINT_BUILD_SPV_READER=1 -DTINT_BUILD_WGSL_WRITER=1
cmake --build . --config Release --target ALL_BUILD -- /m
REM Copy dawn.json
xcopy /Y ..\..\src\dawn\dawn.json ..\..\..\..\..\..\
REM Copy Libs
xcopy /Y .\Release\webgpu_dawn.dll ..\..\..\..\..\..\libs\Native\WebGPU\windows\AMD64\
xcopy /Y .\src\dawn\native\Release\webgpu_dawn.lib ..\..\..\..\..\..\libs\Native\WebGPU\windows\AMD64\
xcopy /Y .\third_party\spirv-tools\source\Release\SPIRV-Tools.lib ..\..\..\..\..\..\libs\windows\AMD64\
xcopy /Y .\third_party\spirv-tools\source\opt\Release\SPIRV-Tools-opt.lib ..\..\..\..\..\..\libs\windows\AMD64\
xcopy .\src\tint\Release\*.lib ..\..\..\..\..\..\libs\windows\AMD64 /Y
echo %DAWNCOMMIT% > ..\..\..\..\..\..\libs\Native\WebGPU\windows\AMD64\dawn.commit
powershell -command "Compress-Archive -Force ../../../../../../libs/windows/AMD64/*.lib ../../../../../../libs/windows/AMD64/libs.zip"
REM Copy Includes
xcopy /I /s /Y .\gen\include\dawn\*.h ..\..\..\..\..\..\include\dawn
xcopy /s /I /Y ..\..\include\ ..\..\..\..\..\..\include\
xcopy /s /I /Y ..\..\src\tint\*.h ..\..\..\..\..\..\include\src\tint\
xcopy /s /I /Y ..\..\src\utils\*.h ..\..\..\..\..\..\include\src\utils\
xcopy /Y .\gen\include\dawn\webgpu.h ..\..\..\..\..\..\include\dawn\webgpu\webgpu.h
xcopy /Y .\gen\include\dawn\webgpu_cpp.h ..\..\..\..\..\..\include\dawn\webgpu_cpp.h
xcopy /Y .\gen\src\emdawnwebgpu\include\webgpu\webgpu_cpp_chained_struct.h ..\..\..\..\..\..\include\dawn\webgpu\webgpu_cpp_chained_struct.h
xcopy /Y ..\..\include\webgpu\webgpu_enum_class_bitmasks.h ..\..\..\..\..\..\include\dawn\webgpu\webgpu_enum_class_bitmasks.h
xcopy /Y .\gen\webgpu-headers\webgpu.h ..\..\..\..\..\..\include\dawn\webgpu.h
popd
popd
popd
popd
popd
dotnet fsi Generator.fsx
CALL buildnative.cmd
goto :EOF
:error
echo Failed with error #%errorlevel%.
exit /b %errorlevel%