Mercurial > hg > orthanc-stone
comparison Applications/Samples/get-requirements-windows.ps1 @ 445:ee41b6a017d7 bgo-commands-codegen
dumb change
author | bgo-osimis |
---|---|
date | Wed, 16 Jan 2019 16:24:45 +0100 |
parents | |
children | 4eccf698e52f |
comparison
equal
deleted
inserted
replaced
440:a750f11892ec | 445:ee41b6a017d7 |
---|---|
1 | |
2 if ($true) { | |
3 | |
4 Write-Error "This script is obsolete. Please work under WSL and run build-wasm.sh" | |
5 | |
6 } else { | |
7 | |
8 param( | |
9 [IO.DirectoryInfo] $EmsdkRootDir = "C:\Emscripten", | |
10 [bool] $Overwrite = $false | |
11 ) | |
12 | |
13 if (Test-Path -Path $EmsdkRootDir) { | |
14 if( $Override) { | |
15 Remove-Item -Path $EmsdkRootDir -Force -Recurse | |
16 } else { | |
17 throw "The `"$EmsdkRootDir`" folder may not exist! Use the Overwrite flag to bypass this check." | |
18 } | |
19 } | |
20 | |
21 # TODO: detect whether git is installed | |
22 # choco install -y git | |
23 | |
24 Write-Host "Will retrieve the Emscripten SDK to the `"$EmsdkRootDir`" folder" | |
25 | |
26 $EmsdkParentDir = split-path -Parent $EmsdkRootDir | |
27 $EmsdkRootName = split-path -Leaf $EmsdkRootDir | |
28 | |
29 Push-Location $EmsdkParentDir | |
30 | |
31 git clone https://github.com/juj/emsdk.git $EmsdkRootName | |
32 cd $EmsdkRootName | |
33 | |
34 git pull | |
35 | |
36 ./emsdk install latest | |
37 | |
38 ./emsdk activate latest | |
39 | |
40 echo "INFO: the ~/.emscripten file has been configured for this installation of Emscripten." | |
41 | |
42 Write-Host "emsdk is now installed in $EmsdkRootDir" | |
43 | |
44 Pop-Location | |
45 | |
46 } | |
47 | |
48 | |
49 | |
50 |