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}`;
|
return `${packageString} ${nodeString} ${computerString}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
runScrCpy(options: any) {
|
startScrCpy(options: any) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let command =
|
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() {
|
downloadScrCpyBinary() {
|
||||||
if (this.os.platform() === 'win32') {
|
if (this.os.platform() === 'win32') {
|
||||||
this.spinnerService.showLoader();
|
this.spinnerService.showLoader();
|
||||||
@@ -364,6 +382,8 @@ export class AppService {
|
|||||||
this.scrcpyBinaryPath = downloadPath;
|
this.scrcpyBinaryPath = downloadPath;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.scrcpyBinaryPath = 'scrcpy';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deleteFolderRecursive(path) {
|
deleteFolderRecursive(path) {
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
class="material-icons white-text no-outline" position="bottom" tooltip="Forward">
|
class="material-icons white-text no-outline" position="bottom" tooltip="Forward">
|
||||||
arrow_forward
|
arrow_forward
|
||||||
</i>
|
</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"
|
class="material-icons white-text no-outline top-menu-bar-icon" position="bottom"
|
||||||
tooltip="Stream from your headset to your PC with ScrCpy.">
|
tooltip="Stream from your headset to your PC with ScrCpy.">
|
||||||
live_tv
|
live_tv
|
||||||
|
|||||||
@@ -42,14 +42,9 @@ export class HeaderComponent implements OnInit {
|
|||||||
safeResolve: any = val => val;
|
safeResolve: any = val => val;
|
||||||
folder = FolderType;
|
folder = FolderType;
|
||||||
addrepoUrl: string = '';
|
addrepoUrl: string = '';
|
||||||
colorA: string;
|
|
||||||
colorB: string;
|
|
||||||
beatOnLoading: boolean;
|
|
||||||
isAlive: boolean = true;
|
isAlive: boolean = true;
|
||||||
isAliveChecking: boolean = false;
|
isAliveChecking: boolean = false;
|
||||||
replaceText: ReplaceText[] = [];
|
replaceText: ReplaceText[] = [];
|
||||||
addkey: string;
|
|
||||||
addvalue: string;
|
|
||||||
adbCommandToRun: string;
|
adbCommandToRun: string;
|
||||||
osPlatform: string;
|
osPlatform: string;
|
||||||
favourites: {
|
favourites: {
|
||||||
|
|||||||
Reference in New Issue
Block a user