diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 1ee6e62..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: @@ -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,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: yarn dist 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; }); }); 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); }); 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 }); + } } diff --git a/electron/app.ts b/electron/app.ts index 7256700..a6a76fa 100644 --- a/electron/app.ts +++ b/electron/app.ts @@ -419,8 +419,12 @@ 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); + break; + } } } function addWindowDownloadHandler(window) { @@ -621,7 +625,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(); }); 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",