summaryrefslogtreecommitdiff
path: root/scripts/project_init.bat
blob: b2e83207d1d6b495176695cb6dc36c18f88e51f2 (plain)
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
@echo off
echo Initializing demo64k dependencies...

if not exist third_party (
  mkdir third_party
)

if not exist third_party\miniaudio.h (
  echo Fetching miniaudio.h...
  powershell -Command "Invoke-WebRequest https://raw.githubusercontent.com/mackron/miniaudio/master/miniaudio.h -OutFile third_party\miniaudio.h"
) else (
  echo miniaudio.h already present.
)

:: wgpu-native submodule
if not exist third_party\wgpu-native\.git (
  echo Fetching wgpu-native submodule...
  git submodule update --init --recursive
) else (
  echo wgpu-native submodule already present.
)

if not exist third_party\wgpu-native\target\release\wgpu_native.lib (
  echo Building wgpu-native static library...
  pushd third_party\wgpu-native
  cargo build --release :: Requires Rust toolchain and LLVM/Clang to be installed.
  popd
) else (
  echo wgpu-native static library already built.
)

echo Done.