From c388cc5ebe3987f4e29adef02ecff8608dda94d8 Mon Sep 17 00:00:00 2001
From: Kenny <27463495+Frontesque@users.noreply.github.com>
Date: Sun, 3 Jul 2022 02:11:49 -0400
Subject: [PATCH] feat: :bookmark: Version 1.3.2
performance stuff (mostly)
---
.vscode/settings.json | 6 ++++++
BUILDING.md | 28 ++++++++++++++++++++++++++++
src/renderer/components/device.vue | 8 ++------
src/renderer/components/scrcpy.vue | 16 ++++++++++++++--
src/renderer/nuxt.config.js | 4 ++--
src/renderer/pages/changelog.vue | 6 +++++-
6 files changed, 57 insertions(+), 11 deletions(-)
create mode 100644 .vscode/settings.json
create mode 100644 BUILDING.md
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..3553118
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,6 @@
+{
+ "cSpell.words": [
+ "getprop",
+ "SCRCPY"
+ ]
+}
\ No newline at end of file
diff --git a/BUILDING.md b/BUILDING.md
new file mode 100644
index 0000000..1403a63
--- /dev/null
+++ b/BUILDING.md
@@ -0,0 +1,28 @@
+# Building
+## Intro
+This is the guide to building the latest version of SCRCPY+ for all operating systems. Note: ***PREREQUISITES FOR RUNNING SCRCPY+ ARE DIFFERENT THAN BUILDING***
+
+## Prerequisites
+- Windows
+ - [Node v16](https://nodejs.org/en/)
+ - NPM (Comes with Node)
+ - Yarn for Node // run `npm i -g yarn`
+- Linux / Mac
+ - [Node v16](https://nodejs.org/en/)
+ - NPM (Comes with Node)
+ - Yarn Package Manager // [Download](https://yarnpkg.com/) OR RUN `sudo npm i -g yarn`
+
+## Build
+- Windows
+ - Edit `src/renderer/nuxt.config.js` & comment the line that says `//Development` by adding 2 slashes `//` in front of the line. Uncomment the line that says `//Production` by removing the 2 slashes at the start of the line.
+ - run `yarn install`
+ - run `yarn install`
+ - run `yarn build`
+ - the output files should be in the `build` folder
+- Linux / Mac
+ - Edit `src/renderer/nuxt.config.js` & comment the line that says `//Development` by adding 2 slashes `//` in front of the line. Uncomment the line that says `//Production` by removing the 2 slashes at the start of the line.
+ - Edit `src/renderer/nuxt.config.js` & change the line that says `os: "windows",` to say `os: "linux",`
+ ***NOTE: IF YOU ARE ON MACOS, IT SHOULD STILL SAY LINUX, NOT MACOS***
+ - run `yarn install`
+ - run `yarn build`
+ - the output files should be in the `build` folder
diff --git a/src/renderer/components/device.vue b/src/renderer/components/device.vue
index e8435c4..4e2003c 100644
--- a/src/renderer/components/device.vue
+++ b/src/renderer/components/device.vue
@@ -74,6 +74,7 @@
},
checkDevice() {
+ console.log(this.$router)
this.$scrcpy.execute("adb devices -l")
.then((data) => {
if (data.includes("device product:")) { // Device Detected
@@ -92,12 +93,7 @@
},
mounted() {
-
- setInterval(() => {
- this.checkDevice()
- }, process.env.devicePollRate);
- this.checkDevice()
-
+ setInterval(this.checkDevice(), process.env.devicePollRate);
}
}
diff --git a/src/renderer/components/scrcpy.vue b/src/renderer/components/scrcpy.vue
index 37b42d8..2d19cc2 100644
--- a/src/renderer/components/scrcpy.vue
+++ b/src/renderer/components/scrcpy.vue
@@ -24,6 +24,16 @@
Advanced
+
+
+
+ Bitrate {{ bitrate }}M
+
+
+
+
+
+
@@ -53,7 +63,7 @@
- An error has occured
+ An error has occurred
@@ -83,7 +93,7 @@ export default {
}
//console.log("scrcpy"+flags);
- this.$scrcpy.execute("scrcpy"+flags)
+ this.$scrcpy.execute(`scrcpy --bit-rate ${this.bitrate}M`+flags)
.catch((err) => {
if (err.startsWith("INFO:")) return; // Catch information outputs
this.dialog = true;
@@ -105,6 +115,8 @@ export default {
selectedArgs: [],
+ bitrate: 8,
+
args: [
{
arg: "--turn-screen-off",
diff --git a/src/renderer/nuxt.config.js b/src/renderer/nuxt.config.js
index 5980bd2..9b1b110 100644
--- a/src/renderer/nuxt.config.js
+++ b/src/renderer/nuxt.config.js
@@ -8,8 +8,8 @@
module.exports = {
env: {
version: "1.3.2",
- scrcpyPath: "src/extraResources/scrcpy/", //Development
- //scrcpyPath: "resources/scrcpy/", //Production
+ //scrcpyPath: "src/extraResources/scrcpy/", //Development
+ scrcpyPath: "resources/scrcpy/", //Production
os: "windows",
releasesUrl: "https://api.github.com/repos/Frontesque/scrcpy-plus/releases",
diff --git a/src/renderer/pages/changelog.vue b/src/renderer/pages/changelog.vue
index 77d5835..8d75218 100644
--- a/src/renderer/pages/changelog.vue
+++ b/src/renderer/pages/changelog.vue
@@ -13,6 +13,10 @@
- Make the back button more uniform throughout the app
- Add new "Coming Soon" tool "Resource Monitor"
+ - Add building guide to the github (BUILDING.md)
+ - Major device polling improvements
+ - Fix spelling error (im human too)
+ - Finally add a bitrate slider after MANY requests
@@ -58,7 +62,7 @@
Dynamically get the installed version of SCRCPY
Dynamically get the installed version of ADB
Minor UI Tweaks
- Multiplatform / Linux Support
+ Multi-platform / Linux Support
Some Bug Fixes
Take 'Wireless Connection' Development Warning Away