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

Side by Side Diff: visual_studio/NativeClientVSAddIn/InstallerResources/create_ppapi_platform.py

Issue 19990004: [VS Addin] Don't fail installation if win32 platform is missing. (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | visual_studio/NativeClientVSAddIn/InstallerResources/install.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ This script creates the PPAPI project settings template. 6 """ This script creates the PPAPI project settings template.
7 7
8 For copyright reasons, we should not directly distribute the PPAPI template 8 For copyright reasons, we should not directly distribute the PPAPI template
9 because it is nearly a clone of the Win32 template which is Copyrighted. 9 because it is nearly a clone of the Win32 template which is Copyrighted.
10 Instead, this script copies the existing Win32 template from the user's system 10 Instead, this script copies the existing Win32 template from the user's system
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 172
173 # Note 1033 is code for the english language. 173 # Note 1033 is code for the english language.
174 ui_xml_dir = os.path.join(os.path.dirname(install_dir), '1033') 174 ui_xml_dir = os.path.join(os.path.dirname(install_dir), '1033')
175 175
176 win32_dir = os.path.join(install_dir, 'Win32') 176 win32_dir = os.path.join(install_dir, 'Win32')
177 ppapi_dir = os.path.join(install_dir, PEPPER_PLATFORM_NAME) 177 ppapi_dir = os.path.join(install_dir, PEPPER_PLATFORM_NAME)
178 patch_dir = os.path.join(SCRIPT_DIR, 'PPAPI_Patch') 178 patch_dir = os.path.join(SCRIPT_DIR, 'PPAPI_Patch')
179 179
180 if not os.path.exists(win32_dir): 180 if not os.path.exists(win32_dir):
181 raise Error('Win32 MSBuild directory not found: %s' % win32_dir) 181 print 'Win32 MSBuild directory not found: %s' % win32_dir
182 print 'Skipping PPAPI platform install.'
183 return
182 184
183 print "Cloning Win32 platform from: %s" % win32_dir 185 print "Cloning Win32 platform from: %s" % win32_dir
184 186
185 for root, dirs, files in os.walk(win32_dir): 187 for root, dirs, files in os.walk(win32_dir):
186 root = root.replace(win32_dir, '')[1:] 188 root = root.replace(win32_dir, '')[1:]
187 189
188 if not os.path.exists(os.path.join(ppapi_dir, root)): 190 if not os.path.exists(os.path.join(ppapi_dir, root)):
189 os.makedirs(os.path.join(ppapi_dir, root)) 191 os.makedirs(os.path.join(ppapi_dir, root))
190 192
191 for filename in files: 193 for filename in files:
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 CreatePPAPI(options.msbuild_path) 256 CreatePPAPI(options.msbuild_path)
255 257
256 except Error as e: 258 except Error as e:
257 sys.stderr.write("error: %s\n" % e) 259 sys.stderr.write("error: %s\n" % e)
258 return 1 260 return 1
259 261
260 return 0 262 return 0
261 263
262 if __name__ == '__main__': 264 if __name__ == '__main__':
263 sys.exit(main(sys.argv[1:])) 265 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | visual_studio/NativeClientVSAddIn/InstallerResources/install.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698