From db6c0cf72261ad75d363baade1e4d41fba052c96 Mon Sep 17 00:00:00 2001 From: MikeLing Date: Sun, 17 May 2015 21:54:45 +0800 Subject: [PATCH] add some options for the build.py bundle command --- gui/build.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gui/build.py b/gui/build.py index 5e114980d..6c5485f08 100644 --- a/gui/build.py +++ b/gui/build.py @@ -80,14 +80,8 @@ def do_bundle(options): if os.path.isdir(dirname): shutil.rmtree(dirname) # create a intaller - python_lib_path = os.path.join( - os.getenv('MOZREGUI_PYTHONPATH', "C:\\Python27"), - "Lib" - ) - makensis_path = os.path.join( - os.getenv('MOZREGUI_NSISPATH', "C:\\NSIS"), - "makensis.exe" - ) + python_lib_path = os.path.join(options.python_path, "Lib") + makensis_path = os.path.join(options.nsis_path, "makensis.exe") gui_path = os.path.realpath('.') moz_path = os.path.realpath('..') python_dir = os.path.join( @@ -124,6 +118,14 @@ def parse_args(): bundle = subparsers.add_parser('bundle', help='bundle the application (freeze)') + bundle.add_argument('--python-path', dest='python_path', + default='C:\\Python27', + help='your python path on the' + ' system(default: %(default)r)') + bundle.add_argument('--nsis-path', dest='nsis_path', + default='C:\\NSIS', + help='your NSIS path on the' + ' system(default: %(default)r)') bundle.set_defaults(func=do_bundle) return parser.parse_args()