From 3d211440a6e926173e282d05c8e55421e9c40e4a Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 11 Jun 2021 13:37:37 -0700 Subject: [PATCH 1/4] Roll src/packager/tools/gyp/ e7079f0e0..caa60026e (69 commits) https://chromium.googlesource.com/external/gyp/+log/e7079f0e0e14..caa60026e223 In order to use MSVS 2019, gyp must be upgraded. The old version didn't recognize MSVS 2019, but the newer version does. This isn't everything that's needed, but it's a first step. Created with: roll-dep src/packager/tools/gyp Issue #867 (MSVS 2019 support) Issue #336 (progress toward replacing Travis & Appveyor with GitHub Actions, which uses MSVS 2019) b/190743862 (internal; tracking replacement of Travis) Change-Id: I26c433682b1bfd584bf3af0bb4e0bd04646535c1 --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index 507428b799..31e4ec3d9f 100644 --- a/DEPS +++ b/DEPS @@ -74,7 +74,7 @@ deps = { Var("chromium_git") + "/chromium/src/tools/clang@723b25997f0aab45fe1776a0f74a14782e350f8f", #513983 "src/packager/tools/gyp": - Var("chromium_git") + "/external/gyp@e7079f0e0e14108ab0dba58728ff219637458563", + Var("chromium_git") + "/external/gyp@caa60026e223fc501e8b337fd5086ece4028b1c6", "src/packager/tools/valgrind": Var("chromium_git") + "/chromium/deps/valgrind@3a97aa8142b6e63f16789b22daafb42d202f91dc", From ae891450151d9c9a71f484640510737abb23b3b0 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 14 Jun 2021 12:10:20 -0700 Subject: [PATCH 2/4] Fix vector+unique_ptr issues with MSVS 2019 Because a StreamState object contains a unique_ptr, it is not copyable. A vector of StreamStates, therefore, causes a compile error on resize or push_back, both of which invoke the copy constructor. I don't know why MSVS complains, but clang does not. To fix this, I'm changing vector into deque. At this point static_library builds are working in MSVS 2019. shared_library builds are still not working. Issue #867 (MSVS 2019) Issue #336 (progress toward replacing Travis & Appveyor with GitHub Actions, which uses MSVS 2019) b/190743862 (internal; tracking replacement of Travis) Change-Id: Iaa9d5fc357102d15eac96c29ebeee7c7236e976b --- packager/media/chunking/cue_alignment_handler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packager/media/chunking/cue_alignment_handler.h b/packager/media/chunking/cue_alignment_handler.h index 9ae340aff0..78d8db96b4 100644 --- a/packager/media/chunking/cue_alignment_handler.h +++ b/packager/media/chunking/cue_alignment_handler.h @@ -7,6 +7,7 @@ #ifndef PACKAGER_MEDIA_CHUNKING_CUE_ALIGNMENT_HANDLER_ #define PACKAGER_MEDIA_CHUNKING_CUE_ALIGNMENT_HANDLER_ +#include #include #include "packager/media/base/media_handler.h" @@ -73,7 +74,7 @@ class CueAlignmentHandler : public MediaHandler { Status RunThroughSamples(StreamState* stream); SyncPointQueue* const sync_points_ = nullptr; - std::vector stream_states_; + std::deque stream_states_; // A common hint used by all streams. When a new cue is given to all streams, // the hint will be updated. The hint will always be larger than any cue. The From 98782c051ee3bb2f0acb4827cd9edbfcd4f863f4 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 14 Jun 2021 12:14:02 -0700 Subject: [PATCH 3/4] Skip clang updates on Windows We do not use clang to build on Windows, so we should skip trying to update clang. This is critical to MSVS 2019 support, since the older clang tools we depend on do not recognize that newer environment. Since we don't need clang anyway, skipping the update avoids useless errors about finding a matching clang version for the environment. Issue #867 (MSVS 2019) Issue #336 (progress toward replacing Travis & Appveyor with GitHub Actions, which uses MSVS 2019) b/190743862 (internal; tracking replacement of Travis) Change-Id: I5600ed809b11e68444034a06cc891403e6bfb5cc --- DEPS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DEPS b/DEPS index 31e4ec3d9f..27b00e252c 100644 --- a/DEPS +++ b/DEPS @@ -111,6 +111,8 @@ hooks = [ { # Pull clang if needed or requested via GYP_DEFINES (GYP_DEFINES="clang=1"). "name": "clang", + # Skip clang updates on Windows, where we don't use clang. + "condition": "not checkout_win", "pattern": ".", "action": ["python", "src/packager/tools/clang/scripts/update.py", "--if-needed"], }, From 60464334c1da67839468bda7b34bf5704a9c61a8 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 14 Jun 2021 12:09:23 -0700 Subject: [PATCH 4/4] Update build instructions for Windows The build instructions have been updated with necessary environment variables for newer MSVS versions. Issue #867 (MSVS 2019) Issue #336 (progress toward replacing Travis & Appveyor with GitHub Actions, which uses MSVS 2019) b/190743862 (internal; tracking replacement of Travis) Change-Id: Ic80ba22a750946a508803c52af6b7869964d595b --- docs/source/build_instructions.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/source/build_instructions.md b/docs/source/build_instructions.md index 4bd3e2fbc8..92f3a13be8 100644 --- a/docs/source/build_instructions.md +++ b/docs/source/build_instructions.md @@ -33,7 +33,7 @@ Note that `Git` must be v1.7.5 or above. ## Windows system requirements -* Visual Studio 2015 Update 3, see below (no other version is supported). +* Visual Studio 2015 Update 3, 2017, or 2019. (See below.) * Windows 7 or newer. Install Visual Studio 2015 Update 3 or later - Community Edition should work if @@ -43,6 +43,14 @@ its license is appropriate for you. Use the Custom Install option and select: - Universal Windows Apps Development Tools > Tools (1.4.1) and Windows 10 SDK (10.0.14393) +If using VS 2017 or VS 2019, you must set the following environment variables, +with versions and paths adjusted to match your actual system: + +```shell +GYP_MSVS_VERSION="2019" +GYP_MSVS_OVERRIDE_PATH="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community" +``` + ## Install `depot_tools` ### Linux and Mac