cloudtrends / chromiumembedded

Automatically exported from code.google.com/p/chromiumembedded
1 stars 1 forks source link

DEPS gclient hook is Windows specific (fix attached) #174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Checkout the cef code on a Mac

What is the expected output? What do you see instead?
No errors and project files generated.

On Mac, we see:
________ running 'cd src\cef & call cef_create_projects.bat & cd ..\..' in 
'_some_path_'
/usr/bin/cd: line 4: cd: src\cef: No such file or directory
Error: cd src\cef & call cef_create_projects.bat & cd ..\.. in _some_path_ 
returned 1

Attached is a proposed patch that uses a Python script to work around the 
platform differences.

Thanks,

Gus

Original issue reported on code.google.com by gusver...@gmail.com on 25 Jan 2011 at 10:40

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I wonder if the DEPS file supports conditionals. If so, we could check the 
operating system version and then call cef_create_projects.bat on Windows and 
cef_create_projects.sh on Mac/Linux.

Original comment by magreenb...@gmail.com on 26 Jan 2011 at 3:19

GoogleCodeExporter commented 9 years ago
I looked in gclient.py and could not find any evidence of allowing a hooks 
configuration in the os_deps section.

One nice advantage of this Python approach is that you can use it to replace 
the cef_create_projects.bat and cef_create_projects.sh since it now works on 
any platform.

Original comment by gusver...@gmail.com on 26 Jan 2011 at 7:37

GoogleCodeExporter commented 9 years ago
OK, you convinced me :-). I changed the cef_create_projects scripts to call the 
new python script. I also changed the python script from your original 
implementation.

- Move the script to the /tools directory.
- Remove the Windows-specific parts (among other things, it's probably not safe 
to make assumptions about the python.exe location).
- Start by assuming that gclient_tools is already in the import path then fall 
back to searching for the depot_tools directory.
- Various style-related changes.

Committed as revision 171.

Original comment by magreenb...@gmail.com on 27 Jan 2011 at 2:39