From 6b4bbb1fb33393ea985c89ef4ebceea8fc791cbc Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Sun, 27 May 2018 21:53:13 +0200 Subject: [PATCH] Update README and FAQ for the new Windows releases Document how to generate a Windows release from Linux. It solves the "no output" issue on Windows, so update the FAQ. --- FAQ.md | 23 +---------------------- README.md | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/FAQ.md b/FAQ.md index 09279a6c..064b3346 100644 --- a/FAQ.md +++ b/FAQ.md @@ -7,29 +7,8 @@ with it. Here are the common reported problems and their status. -### On Windows, I have no output in the console -When run in `cmd.exe`, the application does not print anything. Even `scrcpy ---help` have no output. We don't know why yet. - -However, if you run the very same `scrcpy.exe` from -[MSYS2](https://www.msys2.org/) (`mingw64`), then it correctly prints output. - -As a workaround, redirect outputs to files, so that you can read the files -afterwards: - -```bash -scrcpy >stdout 2>stderr -type stdout -type stderr -``` - -_Note that all SDL logs are printed to stderr._ - - -### On Windows, when I start the application, nothing happens - -The previous problem does not help to get a clue about the cause. +### On Windows, my device is not detected The most common is your device not being detected by `adb`, or is unauthorized. Check everything is ok by calling: diff --git a/README.md b/README.md index 5f0c688e..905b5e49 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,37 @@ For Windows, for simplicity, a prebuilt archive with all the dependencies _(It's just a portable version including _dll_ copied from MSYS2.)_ -Instead, you may want to build it manually. You need [MSYS2] to build the -project. From an MSYS2 terminal, install the required packages: +Instead, you may want to build it manually. + +##### Cross-compile from Linux + +This is the preferred method (and the way the release is built). + +From _Debian_, install _mingw_: + +```bash +sudo apt install mingw-w64 mingw-w64-tools +``` + +You also need the JDK to build the server: + +```bash +sudo apt install openjdk-8-jdk +``` + +Then generate the releases: + +```bash +make -f Makefile.CrossWindows +``` + +It will generate win32 and win64 releases into `dist/`. + + +##### In MSYS2 + +From Windows, you need [MSYS2] to build the project. From an MSYS2 terminal, +install the required packages: [MSYS2]: http://www.msys2.org/