forked from paolodellepiane/oculus-airlink-enabler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpatch-oculus-client.ps1
37 lines (31 loc) · 993 Bytes
/
patch-oculus-client.ps1
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
#!/usr/bin/powershell -Command
"checking scoop..."
Get-Command scoop
if (!$?) {
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
Invoke-Expression (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', '.\install-scoop.ps1')
& .\install-scoop.ps1
rm install-scoop.ps1
}
"checking node..."
Get-Command node
if (!$?) {
scoop install nodejs
}
"checking asar..."
Get-Command asar
if (!$?) {
npm install --engine-strict asar
}
$ErrorActionPreference= 'SilentlyContinue'
kill -name OculusClient
$ErrorActionPreference= 'Continue'
cd $env:OculusBase\Support\oculus-client\resources
if (-not(Test-Path -Path app.asar.orig)) {
"backing app original app.asar to app.asar.orig"
mv app.asar app.asar.orig
}
cp app.asar.orig app.asar
asar extract .\app.asar app
Add-Content app\output\main.js (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pd29/oculus-airlink-enabler/main/airlink.js')
asar pack .\app\ app.asar