From 501c05623b706010b0fc7f934b0123d082582ee8 Mon Sep 17 00:00:00 2001 From: Karl Chen Date: Tue, 2 Nov 2004 22:33:41 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=4478 --- checkin_notes | 10 ++++++++++ py/Boinc/boinc_path_config.py.in | 1 + tools/upgrade | 11 ++++++++--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/checkin_notes b/checkin_notes index 0fd30c7a10..6565c747bd 100755 --- a/checkin_notes +++ b/checkin_notes @@ -19038,3 +19038,13 @@ David 2 Nov 2004 win_build/ boinc_cli.vcproj boinc_gui.vcproj + +Karl 2004-11-02 + - added environment options INSTALL_DIR and TOP_SOURCE_DIR for upgrade + + tools/ + upgrade + py/Boinc/ + BOINC_path_config.py.in + + diff --git a/py/Boinc/boinc_path_config.py.in b/py/Boinc/boinc_path_config.py.in index ca453ec38f..16b6db1f67 100644 --- a/py/Boinc/boinc_path_config.py.in +++ b/py/Boinc/boinc_path_config.py.in @@ -10,6 +10,7 @@ import sys, os TOP_BUILD_DIR = "@TOP_BUILD_DIR@" TOP_SOURCE_DIR = "@TOP_SOURCE_DIR@" +TOP_SOURCE_DIR = os.environ.get('TOP_SOURCE_DIR') or TOP_SOURCE_DIR sys.path.insert(0, os.path.join(TOP_SOURCE_DIR, 'py')) if TOP_BUILD_DIR != TOP_SOURCE_DIR: diff --git a/tools/upgrade b/tools/upgrade index dad496d18a..84be378275 100755 --- a/tools/upgrade +++ b/tools/upgrade @@ -3,8 +3,10 @@ # $Id$ ''' + This program upgrades the project with current source/build files. Useful if you are a BOINC developer or closely following BOINC development. + ''' import boinc_path_config @@ -15,18 +17,21 @@ import os if not tools.query_noyes("Update project executables and PHP files (overwrite existing files)"): raise SystemExit -if os.system(os.path.join(boinc_project_path.PROGRAM_PARENT_DIR,'bin/stop')): +INSTALL_DIR = os.environ.get('INSTALL_DIR') or \ + boinc_project_path.PROGRAM_PARENT_DIR + +if os.system(os.path.join(INSTALL_DIR,'bin/stop')): raise SystemExit("Couldn't stop BOINC!") print "Upgrading files... " options.install_method = 'copy' init() -install_boinc_files(boinc_project_path.PROGRAM_PARENT_DIR) +install_boinc_files(INSTALL_DIR) print "Upgrading files... done" print # print "Run `start' to resume BOINC." -if os.system(os.path.join(boinc_project_path.PROGRAM_PARENT_DIR,'bin/start')): +if os.system(os.path.join(INSTALL_DIR,'bin/start')): raise SystemExit("Couldn't start BOINC!")