Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2228)

Unified Diff: remoting/host/linux/linux_me2me_host.py

Issue 1885483003: Copy Linux me2me script to output dir for GN builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify code, and add GYP 'copies' rule Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/host/linux/linux_me2me_host.py
diff --git a/remoting/host/linux/linux_me2me_host.py b/remoting/host/linux/linux_me2me_host.py
index 9c80e789fea03b45f8023609b0e08d11677e9f38..790aa2320dede57ed8e885b3930229cb322d5e7e 100755
--- a/remoting/host/linux/linux_me2me_host.py
+++ b/remoting/host/linux/linux_me2me_host.py
@@ -55,12 +55,12 @@ DEFAULT_SIZE_NO_RANDR = "1600x1200"
SCRIPT_PATH = os.path.abspath(sys.argv[0])
SCRIPT_DIR = os.path.dirname(SCRIPT_PATH)
-IS_INSTALLED = (os.path.basename(sys.argv[0]) != 'linux_me2me_host.py')
-
-if IS_INSTALLED:
- HOST_BINARY_NAME = "chrome-remote-desktop-host"
-else:
+if "me2me_host" in os.path.basename(sys.argv[0]):
+ # Script is being run from a Chromium checkout.
HOST_BINARY_NAME = "remoting_me2me_host"
+else:
+ # Script is installed.
+ HOST_BINARY_NAME = "chrome-remote-desktop-host"
CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop"
@@ -631,22 +631,11 @@ def choose_x_session():
def locate_executable(exe_name):
- if IS_INSTALLED:
- # If the script is running from its installed location, search the host
- # binary only in the same directory.
- paths_to_try = [ SCRIPT_DIR ]
- else:
- paths_to_try = map(lambda p: os.path.join(SCRIPT_DIR, p),
- [".",
- "../../../out/Debug",
- "../../../out/Default",
- "../../../out/Release"])
- for path in paths_to_try:
- exe_path = os.path.join(path, exe_name)
- if os.path.exists(exe_path):
- return exe_path
-
- raise Exception("Could not locate executable '%s'" % exe_name)
+ exe_path = os.path.join(SCRIPT_DIR, exe_name)
+ if os.path.exists(exe_path):
+ return exe_path
+
+ raise Exception("Executable not found at '%s'" % exe_path)
class ParentProcessLogger(object):

Powered by Google App Engine
This is Rietveld 408576698