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

Side by Side Diff: visual_studio/NativeClientVSAddIn/create_package.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 """Takes the output of the build step and zips the distributable package.
7
8 This script assumes the build script has been run to compile the add-in.
9 It zips up all files required for the add-in installation and places the
10 result in out/NativeClientVSAddin.zip
11 """
12
13 import glob
binji 2012/07/17 17:38:55 nit: can remove, not used anymore
14 import os
15 import shutil
binji 2012/07/17 17:38:55 same here
16 import zipfile
17
18 # Root output directory
19 BUILD_OUTPUT_DIRECTORY = "../../out/NativeClientVSAddIn/"
20
21 # Directory containing static installer resources
22 RESOURCE_DIRECTORY = "./InstallerResources"
23
24 # Directory that contains the build assemblies
25 ASSEMBLY_DIRECTORY = os.path.join(BUILD_OUTPUT_DIRECTORY, "Debug")
26
27 # Base name of the final zip file
28 OUTPUT_NAME = os.path.join(BUILD_OUTPUT_DIRECTORY, "NativeClientVSAddIn.zip")
29
30 # List of paths to files to include in the zip file
31 FILE_LIST = [
binji 2012/07/17 17:38:55 Nice, a lot easier to read now
32 os.path.join(RESOURCE_DIRECTORY, 'NativeClientVSAddIn.AddIn'),
33 os.path.join(RESOURCE_DIRECTORY, 'install.py'),
34 os.path.join(ASSEMBLY_DIRECTORY, 'NativeClientVSAddIn.dll')]
35
36 def main():
37 # Zip the package
38 out_file = zipfile.ZipFile(OUTPUT_NAME, 'w')
39 for file_path in FILE_LIST:
40 out_file.write(file_path, os.path.basename(file_path), zipfile.ZIP_DEFLATED)
41 out_file.close()
42
43 if __name__ == '__main__':
44 main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698