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

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

Issue 10790023: VS-Addin Build/Test/Install scripts (Closed) Base URL: https://nativeclient-sdk.googlecode.com/svn/trunk/src
Patch Set: Created 8 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
OLDNEW
(Empty)
1 #!/usr/bin/env python
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
4 # found in the LICENSE file.
5
6 """Copies necessary add-in files into place to install the add-in.
7
8 This script will copy the necessary files for the Visual Studio add-in
9 to where Visual Studio can find them. It assumes the current directory
10 contains the necessary files to copy.
11 """
12
13 import os
14 import platform
15 import shutil
16
17 def main():
18 if platform.system() != 'Windows':
19 raise Exception('Must install to Windows system')
20
21 # Ensure environment variables are set
22 nacl_sdk_root = os.path.expandvars('%NACL_SDK_ROOT%', None)
binji 2012/07/17 17:38:55 I still like os.getenv better here (it doesn't req
23 chrome_path = os.path.expandvars('%CHROME_PATH%', None)
24 if nacl_sdk_root == None:
binji 2012/07/17 17:38:55 Tests against None are usually written if nacl_sd
25 raise Exception('Environment Variable NACL_SDK_ROOT is not set')
26 if chrome_path == None:
27 raise Exception('Environment Variable CHROME_PATH is not set')
28
29 # Copy the necessary files into place
30 addInDir = os.path.expandvars(
binji 2012/07/17 17:38:55 nit: should be add_in_dir
31 '%USERPROFILE%\My Documents\Visual Studio 2010\Addins')
32 shutil.copy('./NativeClientVSAddIn.AddIn', addInDir)
33 shutil.copy('./NativeClientVSAddIn.dll', addInDir)
34
35 if __name__ == '__main__':
36 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698