added support for scrcpy to linux and mac builds
This commit is contained in:
Binary file not shown.
@@ -300,7 +300,7 @@ export class AppService {
|
||||
return `${packageString} ${nodeString} ${computerString}`;
|
||||
}
|
||||
|
||||
runScrCpy(options: any) {
|
||||
startScrCpy(options: any) {
|
||||
return new Promise((resolve, reject) => {
|
||||
let command =
|
||||
'"' +
|
||||
@@ -329,6 +329,24 @@ export class AppService {
|
||||
});
|
||||
}
|
||||
|
||||
runScrCpy(options: any) {
|
||||
let platform = this.os.platform();
|
||||
if (platform === 'linux' || platform === 'darwin') {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.exec('scrcpy -v', (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
this.startScrCpy(options)
|
||||
.then(resolve)
|
||||
.catch(reject);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
return this.startScrCpy(options);
|
||||
}
|
||||
}
|
||||
|
||||
downloadScrCpyBinary() {
|
||||
if (this.os.platform() === 'win32') {
|
||||
this.spinnerService.showLoader();
|
||||
@@ -364,6 +382,8 @@ export class AppService {
|
||||
this.scrcpyBinaryPath = downloadPath;
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.scrcpyBinaryPath = 'scrcpy';
|
||||
}
|
||||
}
|
||||
deleteFolderRecursive(path) {
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
class="material-icons white-text no-outline" position="bottom" tooltip="Forward">
|
||||
arrow_forward
|
||||
</i>
|
||||
<i mz-tooltip *ngIf="isConnected()&&osPlatform === 'win32'" (click)="scrcpyModal.openModal();"
|
||||
<i mz-tooltip *ngIf="isConnected()" (click)="scrcpyModal.openModal();"
|
||||
class="material-icons white-text no-outline top-menu-bar-icon" position="bottom"
|
||||
tooltip="Stream from your headset to your PC with ScrCpy.">
|
||||
live_tv
|
||||
|
||||
@@ -42,14 +42,9 @@ export class HeaderComponent implements OnInit {
|
||||
safeResolve: any = val => val;
|
||||
folder = FolderType;
|
||||
addrepoUrl: string = '';
|
||||
colorA: string;
|
||||
colorB: string;
|
||||
beatOnLoading: boolean;
|
||||
isAlive: boolean = true;
|
||||
isAliveChecking: boolean = false;
|
||||
replaceText: ReplaceText[] = [];
|
||||
addkey: string;
|
||||
addvalue: string;
|
||||
adbCommandToRun: string;
|
||||
osPlatform: string;
|
||||
favourites: {
|
||||
|
||||
Reference in New Issue
Block a user