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

Side by Side Diff: tools/utils.py

Issue 47553006: Add windows installer functionallity to editor build script. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import os 9 import os
10 import platform 10 import platform
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 224
225 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): 225 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None):
226 build_root = GetBuildDir(host_os, target_os) 226 build_root = GetBuildDir(host_os, target_os)
227 if mode: 227 if mode:
228 build_root = os.path.join(build_root, GetBuildConf(mode, arch)) 228 build_root = os.path.join(build_root, GetBuildConf(mode, arch))
229 return build_root 229 return build_root
230 230
231 def GetBaseDir(): 231 def GetBaseDir():
232 return BASE_DIR 232 return BASE_DIR
233 233
234 # Return the base part of the version, Major.Minor.Build.Patch,
235 # without the _revision addition
236 def GetShortVersion():
237 (major, minor, build, patch) = ReadVersionFile()
238 return '%s.%s.%s.%s' % (major, minor, build, patch)
239
240
234 def GetVersion(): 241 def GetVersion():
235 version_tuple = ReadVersionFile() 242 version_tuple = ReadVersionFile()
236 if not version_tuple: 243 if not version_tuple:
237 return None 244 return None
238 245
239 (major, minor, build, patch) = version_tuple 246 (major, minor, build, patch) = version_tuple
240 revision = GetSVNRevision() 247 revision = GetSVNRevision()
241 user = GetUserName() 248 user = GetUserName()
242 # We don't add username to release builds (or any builds on the bots) 249 # We don't add username to release builds (or any builds on the bots)
243 if user == 'chrome-bot': 250 if user == 'chrome-bot':
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 os.chdir(self._working_directory) 479 os.chdir(self._working_directory)
473 480
474 def __exit__(self, *_): 481 def __exit__(self, *_):
475 print "Enter directory = ", self._old_cwd 482 print "Enter directory = ", self._old_cwd
476 os.chdir(self._old_cwd) 483 os.chdir(self._old_cwd)
477 484
478 485
479 if __name__ == "__main__": 486 if __name__ == "__main__":
480 import sys 487 import sys
481 Main(sys.argv) 488 Main(sys.argv)
OLDNEW
« tools/create_windows_installer.py ('K') | « tools/create_windows_installer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698