annotate Applications/Samples/get-requirements-windows.ps1 @ 567:375dc0aeb19b

Merged am-dev into default
author Alain Mazy <am@osimis.io>
date Thu, 18 Apr 2019 09:05:43 +0000
parents ee41b6a017d7
children 4eccf698e52f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
445
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
1
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
2 if ($true) {
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
3
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
4 Write-Error "This script is obsolete. Please work under WSL and run build-wasm.sh"
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
5
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
6 } else {
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
7
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
8 param(
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
9 [IO.DirectoryInfo] $EmsdkRootDir = "C:\Emscripten",
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
10 [bool] $Overwrite = $false
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
11 )
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
12
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
13 if (Test-Path -Path $EmsdkRootDir) {
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
14 if( $Override) {
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
15 Remove-Item -Path $EmsdkRootDir -Force -Recurse
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
16 } else {
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
17 throw "The `"$EmsdkRootDir`" folder may not exist! Use the Overwrite flag to bypass this check."
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
18 }
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
19 }
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
20
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
21 # TODO: detect whether git is installed
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
22 # choco install -y git
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
23
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
24 Write-Host "Will retrieve the Emscripten SDK to the `"$EmsdkRootDir`" folder"
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
25
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
26 $EmsdkParentDir = split-path -Parent $EmsdkRootDir
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
27 $EmsdkRootName = split-path -Leaf $EmsdkRootDir
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
28
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
29 Push-Location $EmsdkParentDir
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
30
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
31 git clone https://github.com/juj/emsdk.git $EmsdkRootName
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
32 cd $EmsdkRootName
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
33
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
34 git pull
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
35
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
36 ./emsdk install latest
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
37
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
38 ./emsdk activate latest
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
39
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
40 echo "INFO: the ~/.emscripten file has been configured for this installation of Emscripten."
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
41
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
42 Write-Host "emsdk is now installed in $EmsdkRootDir"
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
43
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
44 Pop-Location
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
45
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
46 }
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
47
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
48
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
49
ee41b6a017d7 dumb change
bgo-osimis
parents:
diff changeset
50