From 5ac79f81b9a5ed621a5276451fa5ea034e0ce801 Mon Sep 17 00:00:00 2001 From: brian91292 <8050523+brian91292@users.noreply.github.com> Date: Tue, 23 May 2023 11:47:48 -0500 Subject: [PATCH 01/14] update scrcpy --- desktop-app/src/app/app.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/desktop-app/src/app/app.service.ts b/desktop-app/src/app/app.service.ts index 870ca36..90ab526 100644 --- a/desktop-app/src/app/app.service.ts +++ b/desktop-app/src/app/app.service.ts @@ -454,8 +454,9 @@ export class AppService { this.spinnerService.showLoader(); let task = { status: 'Downloading/Extracting ScrCpy...' }; this.spinnerService.setMessage('', task); - let url = 'https://github.com/Genymobile/scrcpy/releases/download/v1.11/scrcpy-win64-v1.11.zip'; - let downloadPath = this.path.join(this.appData, 'scrcpy', 'scrcpy.exe'); + let url = 'https://github.com/Genymobile/scrcpy/releases/download/v2.0/scrcpy-win64-v2.0.zip'; + let folderName = 'scrcpy-win64-v2.0'; + let downloadPath = this.path.join(this.appData, folderName, 'scrcpy.exe'); if (this.doesFileExist(downloadPath)) { this.scrcpyBinaryPath = downloadPath; this.spinnerService.hideLoader(); @@ -480,7 +481,7 @@ export class AppService { }); }; - this.extract(path, { dir: this.path.join(this.appData, 'scrcpy') }, callback); + this.extract(path, { dir: this.path.join(this.appData) }, callback); this.scrcpyBinaryPath = downloadPath; }); }); From aa16c290ad91eba635694c6c4415b1f4d294cf77 Mon Sep 17 00:00:00 2001 From: brian91292 <8050523+brian91292@users.noreply.github.com> Date: Tue, 23 May 2023 13:51:32 -0500 Subject: [PATCH 02/14] make custom protocol handler work in dev mode --- electron/app.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/electron/app.ts b/electron/app.ts index 7256700..759d08f 100644 --- a/electron/app.ts +++ b/electron/app.ts @@ -621,7 +621,19 @@ function setupApp() { app.on('activate', function() { if (mainWindow === null) createWindow(); }); - app.setAsDefaultProtocolClient('sidequest'); + // remove so we can register each time as we run the app. + app.removeAsDefaultProtocolClient('sidequest'); + + // If we are running a non-packaged version of the app && on windows + if (process.env.NODE_ENV === 'dev' && process.platform === 'win32') { + console.log('Running in dev mode'); + // Set the path of electron.exe and your app. + // These two additional parameters are only available on windows. + app.setAsDefaultProtocolClient('sidequest', process.execPath, [path.resolve(process.argv[1])]); + } else { + console.log('Running in production'); + app.setAsDefaultProtocolClient('sidequest'); + } app.on('open-url', function(event, url) { event.preventDefault(); }); From 6505202f97b3cc374d6314afdbbce2ed7533df67 Mon Sep 17 00:00:00 2001 From: brian91292 <8050523+brian91292@users.noreply.github.com> Date: Tue, 23 May 2023 14:30:15 -0500 Subject: [PATCH 03/14] fix custom protocol when app is already open --- electron/app.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/electron/app.ts b/electron/app.ts index 759d08f..9e3ecd7 100644 --- a/electron/app.ts +++ b/electron/app.ts @@ -419,8 +419,11 @@ if (app.requestSingleInstanceLock()) { function parseOpenUrl(argv: string[]) { //fs.writeFileSync(path.join(app.getPath('appData'), 'SideQuest', 'test_output_loaded.txt'), JSON.stringify(argv)); - if (argv[1] && argv[1].length && argv[1].substr(0, 12) === 'sidequest://') { - setTimeout(() => mainWindow.webContents.send('open-url', argv[1].toString()), 5000); + for (let arg of argv) { + if (arg && arg.length && arg.substr(0, 12) === 'sidequest://') { + console.log('opening url ' + arg.toString()); + setTimeout(() => mainWindow.webContents.send('open-url', arg.toString()), 5000); + } } } function addWindowDownloadHandler(window) { From 3693a9656593397fc47d0e59d5a8146db2545080 Mon Sep 17 00:00:00 2001 From: brian91292 <8050523+brian91292@users.noreply.github.com> Date: Wed, 24 May 2023 08:08:22 -0500 Subject: [PATCH 04/14] escape url in /w --- desktop-app/src/app/electron.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop-app/src/app/electron.service.ts b/desktop-app/src/app/electron.service.ts index c8447a8..cd44692 100644 --- a/desktop-app/src/app/electron.service.ts +++ b/desktop-app/src/app/electron.service.ts @@ -126,7 +126,10 @@ export class ElectronService { switch (url[0]) { case 'sidequest://w/': this.adbService - .runAdbCommand('adb shell am start -a android.intent.action.VIEW -d ' + url[1], true) + .runAdbCommand( + 'adb shell am start -a android.intent.action.VIEW -d \'"' + new URL(url[1]).toString() + '"\'', + true + ) .then(() => { this.statusService.showStatus('Launching WebXR in browser...', false, true); }); From 684523ad9cf2f43030466b57b38a222c55ec6215 Mon Sep 17 00:00:00 2001 From: brian91292 <8050523+brian91292@users.noreply.github.com> Date: Mon, 29 May 2023 10:55:10 -0500 Subject: [PATCH 05/14] Update app.ts --- electron/app.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/electron/app.ts b/electron/app.ts index 9e3ecd7..a6a76fa 100644 --- a/electron/app.ts +++ b/electron/app.ts @@ -423,6 +423,7 @@ function parseOpenUrl(argv: string[]) { if (arg && arg.length && arg.substr(0, 12) === 'sidequest://') { console.log('opening url ' + arg.toString()); setTimeout(() => mainWindow.webContents.send('open-url', arg.toString()), 5000); + break; } } } From 43680a3ab7c87c45d531642ee7ac9dc2ef4b539c Mon Sep 17 00:00:00 2001 From: brian91292 <8050523+brian91292@users.noreply.github.com> Date: Mon, 29 May 2023 11:56:11 -0500 Subject: [PATCH 06/14] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 628f9c4..3e660c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "SideQuest", "productName": "SideQuest", - "version": "0.10.34", + "version": "0.10.35", "description": "A open app store for mobile android based VR devices such as the Levovo Mirage, Oculus Go, Oculus Quest, Vive Focus.", "repository": "https://github.com/SideQuestVR/SideQuest.git", "license": "UNLICENCED", From aad73410673e003671b0e98805902ade3ef640ae Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 19:35:12 +0200 Subject: [PATCH 07/14] Update package.json updated electron-builder for mac version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e660c0..4ce7904 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "devDependencies": { "@angular/cli": "^8.0.3", "electron": "13.5.1", - "electron-builder": "22.10.5", + "electron-builder": "23.0.2", "electron-notarize": "^0.1.1", "husky": "^2.3.0", "prettier": "1.17.1", From 44f6fd42d6e425013011976cdffb5e2d68d993d2 Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 20:03:01 +0200 Subject: [PATCH 08/14] Update package.json ooops put it back!!! --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4ce7904..3e660c0 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "devDependencies": { "@angular/cli": "^8.0.3", "electron": "13.5.1", - "electron-builder": "23.0.2", + "electron-builder": "22.10.5", "electron-notarize": "^0.1.1", "husky": "^2.3.0", "prettier": "1.17.1", From 6943bb8e15f20baa6ae032cf5085b478a0022bb1 Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 20:29:35 +0200 Subject: [PATCH 09/14] Update master.yml fix mac builds --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 1ee6e62..75d5c07 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -32,4 +32,4 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} - run: yarn dist \ No newline at end of file + run: PYTHON_PATH=$(which python) yarn dist From d4af4ee290ef022a3c4bf67e9b1565bf69c6cb92 Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 20:37:57 +0200 Subject: [PATCH 10/14] Update master.yml maybe fix mac? --- .github/workflows/master.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 75d5c07..f39dd26 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -15,6 +15,7 @@ jobs: node-version: '16.14.2' - name: "Install build deps on linux" run: | + echo $RUNNER_OS; if [ "$RUNNER_OS" == "Linux" ]; then sudo apt-get install libusb-1.0-0-dev sudo apt-get install libudev-dev @@ -32,4 +33,8 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} - run: PYTHON_PATH=$(which python) yarn dist + run: | + if [ "$RUNNER_OS" == "Windows" ]; then + PYTHON_PATH=$(which python) + fi + yarn dist From 2988e9929863907ae5d7393a71b842381449b32b Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 20:44:10 +0200 Subject: [PATCH 11/14] Update master.yml maybe broke everything? --- .github/workflows/master.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f39dd26..1b97f4a 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -34,7 +34,8 @@ jobs: WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} run: | - if [ "$RUNNER_OS" == "Windows" ]; then + if [ "$RUNNER_OS" == "macOS" ]; then PYTHON_PATH=$(which python) fi yarn dist + shell: bash From b0bd8ebd731edec578ae6b79119eea8e0ccd6467 Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 20:58:37 +0200 Subject: [PATCH 12/14] Update master.yml please!! --- .github/workflows/master.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 1b97f4a..14e7a70 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -35,7 +35,7 @@ jobs: WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} run: | if [ "$RUNNER_OS" == "macOS" ]; then - PYTHON_PATH=$(which python) + PYTHON_PATH=$(which python3) fi yarn dist shell: bash From 9b1aa2f0d5a432b950d7db68caa45a7d3c6581fb Mon Sep 17 00:00:00 2001 From: SideQuest Date: Mon, 29 May 2023 21:14:32 +0200 Subject: [PATCH 13/14] Update master.yml dgsghsgsg --- .github/workflows/master.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 14e7a70..fa3321f 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -5,7 +5,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ubuntu-latest, windows-latest, macOS-11] steps: - uses: actions/checkout@v2 with: @@ -33,9 +33,4 @@ jobs: GH_TOKEN: ${{ secrets.GH_TOKEN }} WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }} - run: | - if [ "$RUNNER_OS" == "macOS" ]; then - PYTHON_PATH=$(which python3) - fi - yarn dist - shell: bash + run: yarn dist From 84086a115ad1d0b133e9eefdd5e3be1f2fe54d7f Mon Sep 17 00:00:00 2001 From: metashamone Date: Tue, 30 May 2023 18:57:18 +0200 Subject: [PATCH 14/14] added disable proximity option to the streaming screen, added more copy and set the defaults to Quest 2 --- .../stream-options/stream-options.component.html | 8 ++++++-- .../app/stream-options/stream-options.component.ts | 13 ++++++++++++- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/desktop-app/src/app/stream-options/stream-options.component.html b/desktop-app/src/app/stream-options/stream-options.component.html index a93f382..9bb1211 100644 --- a/desktop-app/src/app/stream-options/stream-options.component.html +++ b/desktop-app/src/app/stream-options/stream-options.component.html @@ -3,6 +3,7 @@
Start Stream
Oculus Casting
+
Disable Proximity Sensor
@@ -37,14 +38,17 @@ Crop
Crop the device screen on the server. The values are expressed in the device natural orientation (typically, - portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size. + portrait for a phone, landscape for a tablet). Any MaxSize value is computed on the cropped size. The format is width:height:left:top.
-
Quest 1 Crop
Quest 2 Crop
+
Quest 1 Crop
+
+ Please note the Quest Pro uses two slightly angled screens and therefore there isn't a crop setting that works out of the box, since the video would need to be corrected after the fact. +
Fullscreen diff --git a/desktop-app/src/app/stream-options/stream-options.component.ts b/desktop-app/src/app/stream-options/stream-options.component.ts index 11fbaad..40b6957 100644 --- a/desktop-app/src/app/stream-options/stream-options.component.ts +++ b/desktop-app/src/app/stream-options/stream-options.component.ts @@ -12,7 +12,7 @@ export class StreamOptionsComponent implements OnInit { scrcpy_options: any = { always_on_top: false, bit_rate: '8000000', - crop: '1280:720:1500:350', + crop: '1600:900:2017:510', no_control: true, fullscreen: false, max_size: '0', @@ -35,4 +35,15 @@ export class StreamOptionsComponent implements OnInit { .then(() => this.statusService.showStatus('Stream closed.')) .catch(e => this.statusService.showStatus('ScrCpy Error: ' + JSON.stringify(e), true)); } + + disableProximity(shouldEnable) { + this.runAdbCommand('am broadcast -a com.oculus.vrpowermanager.' + (shouldEnable ? 'automation_disable' : 'prox_close')) + .then(() => { + this.statusService.showStatus((shouldEnable ? 'Enable' : 'Disable') + ' proximity message sent OK!!'); + }) + .catch(e => this.statusService.showStatus(e, true)); + } + runAdbCommand(command: string) { + return this.adbService.adbCommand('shell', { command, serial: this.adbService.deviceSerial }); + } }