From 50f4f1639c552f2195f1b99f67aeac884c0337a5 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Wed, 26 Jan 2022 09:57:24 +0100 Subject: [PATCH] Add a shorcut "open a terminal here" on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On Windows, the file explorer does not provide any "open a terminal here" shortcut. Add a bat file which just runs `cmd` to easily open a terminal directly in the scrcpy directory (so there is no need to `cd C:\path\…`). PR #2970 --- FAQ.md | 11 +++++++++-- data/open_a_terminal_here.bat | 1 + release.mk | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 data/open_a_terminal_here.bat diff --git a/FAQ.md b/FAQ.md index 43ba39af..6468b32a 100644 --- a/FAQ.md +++ b/FAQ.md @@ -248,8 +248,15 @@ Caused by: java.lang.IllegalArgumentException: displayToken must not be null ## Command line on Windows -Some Windows users are not familiar with the command line. Here is how to open a -terminal and run `scrcpy` with arguments: +Since v1.22, a "shortcut" has been added to directly open a terminal in the +scrcpy directory. Double-click on `open_a_terminal_here.bat`, then type your +command. For example: + +``` +scrcpy --record file.mkv +``` + +You could also open a terminal and go to the scrcpy folder manually: 1. Press Windows+r, this opens a dialog box. 2. Type `cmd` and press Enter, this opens a terminal. diff --git a/data/open_a_terminal_here.bat b/data/open_a_terminal_here.bat new file mode 100644 index 00000000..24d557f3 --- /dev/null +++ b/data/open_a_terminal_here.bat @@ -0,0 +1 @@ +@cmd diff --git a/release.mk b/release.mk index aa26f02d..6b361e5b 100644 --- a/release.mk +++ b/release.mk @@ -93,6 +93,7 @@ dist-win32: build-server build-win32 cp data/scrcpy-console.bat "$(DIST)/$(WIN32_TARGET_DIR)" cp data/scrcpy-noconsole.vbs "$(DIST)/$(WIN32_TARGET_DIR)" cp data/icon.png "$(DIST)/$(WIN32_TARGET_DIR)" + cp data/open_a_terminal_here.bat "$(DIST)/$(WIN32_TARGET_DIR)" cp prebuilt-deps/ffmpeg-4.3.1-win32-shared/bin/avutil-56.dll "$(DIST)/$(WIN32_TARGET_DIR)/" cp prebuilt-deps/ffmpeg-4.3.1-win32-shared/bin/avcodec-58.dll "$(DIST)/$(WIN32_TARGET_DIR)/" cp prebuilt-deps/ffmpeg-4.3.1-win32-shared/bin/avformat-58.dll "$(DIST)/$(WIN32_TARGET_DIR)/" @@ -110,6 +111,7 @@ dist-win64: build-server build-win64 cp data/scrcpy-console.bat "$(DIST)/$(WIN64_TARGET_DIR)" cp data/scrcpy-noconsole.vbs "$(DIST)/$(WIN64_TARGET_DIR)" cp data/icon.png "$(DIST)/$(WIN64_TARGET_DIR)" + cp data/open_a_terminal_here.bat "$(DIST)/$(WIN64_TARGET_DIR)" cp prebuilt-deps/ffmpeg-5.0-full_build-shared/bin/avutil-57.dll "$(DIST)/$(WIN64_TARGET_DIR)/" cp prebuilt-deps/ffmpeg-5.0-full_build-shared/bin/avcodec-59.dll "$(DIST)/$(WIN64_TARGET_DIR)/" cp prebuilt-deps/ffmpeg-5.0-full_build-shared/bin/avformat-59.dll "$(DIST)/$(WIN64_TARGET_DIR)/"