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

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: Remove GYP copies, and copy script and host wrapper to remoting/ build directory 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..238240c800432ff2e6c6f3e43eeee8a65bd16900 100755
--- a/remoting/host/linux/linux_me2me_host.py
+++ b/remoting/host/linux/linux_me2me_host.py
@@ -55,13 +55,7 @@ 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:
- HOST_BINARY_NAME = "remoting_me2me_host"
-
+HOST_BINARY_NAME = "chrome-remote-desktop-host"
CHROME_REMOTING_GROUP_NAME = "chrome-remote-desktop"
HOME_DIR = os.environ["HOME"]
@@ -631,22 +625,11 @@ def choose_x_session():
def locate_executable(exe_name):
Sergey Ulanov 2016/04/18 22:48:01 I don't think we need this function anymore. Parti
Lambros 2016/04/18 23:45:53 Removed. I slightly tweaked the logging in one of
- 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