-
Notifications
You must be signed in to change notification settings - Fork 7
/
copy.ps1
30 lines (26 loc) · 889 Bytes
/
copy.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
param (
[Parameter(Mandatory = $false)]
[Switch]$debug_so,
[Parameter(Mandatory = $false)]
[Switch]$log
)
& ./build.ps1
if (-not ($LastExitCode -eq 0)) {
echo "build failed, not copying"
exit
}
if ($debug_so.IsPresent) {
& adb push build/debug/libscoresaber.so /sdcard/Android/data/com.beatgames.beatsaber/files/mods/libscoresaber.so
}
else {
& adb push build/libscoresaber.so /sdcard/Android/data/com.beatgames.beatsaber/files/mods/libscoresaber.so
}
& adb shell am force-stop com.beatgames.beatsaber
& adb shell am start com.beatgames.beatsaber/com.unity3d.player.UnityPlayerActivity
Start-Sleep -Milliseconds 200
& adb shell am start com.beatgames.beatsaber/com.unity3d.player.UnityPlayerActivity
Start-Sleep -Milliseconds 200
& adb shell am start com.beatgames.beatsaber/com.unity3d.player.UnityPlayerActivity
if ($log.IsPresent) {
& ./log.ps1
}