add the project name ane environments directory to installation process

git-svn-id: https://svn.apache.org/repos/asf/bloodhound/trunk@1649767 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/installer/bhsetup/bloodhound_setup.py b/installer/bhsetup/bloodhound_setup.py
index 747ff3a..1083dd6 100644
--- a/installer/bhsetup/bloodhound_setup.py
+++ b/installer/bhsetup/bloodhound_setup.py
@@ -56,6 +56,8 @@
 DEFAULT_DB_USER = 'bloodhound'
 DEFAULT_DB_NAME = 'bloodhound'
 DEFAULT_ADMIN_USER = 'admin'
+DEFAULT_PROJECT = 'main'
+DEFAULT_ENVSDIR = os.path.join('bloodhound', 'environments')
 
 BH_PROJECT_SITE = 'https://issues.apache.org/bloodhound/'
 BASE_CONFIG = {'components': {'bhtheme.*': 'enabled',
@@ -128,10 +130,9 @@
         self.options = options
 
         if 'project' not in options:
-            options['project'] = 'main'
+            options['project'] = DEFAULT_PROJECT
         if 'envsdir' not in options:
-            options['envsdir'] = os.path.join('bloodhound',
-                                              'environments')
+            options['envsdir'] = DEFAULT_ENVSDIR
 
         # Flags used when running the functional test suite
         self.apply_bhwiki_upgrades = True
@@ -350,13 +351,13 @@
 
     # Base Trac Options
     parser.add_option('--project', dest='project',
-                      help='Set the top project name', default='main')
+                      help='Set the top project name', default='')
     parser.add_option('--source_directory', dest='sourcedir',
                       help='Specify root source code directory',
                       default=os.path.normpath(os.path.join(os.getcwd(), '../'))),
     parser.add_option('--environments_directory', dest='envsdir',
                       help='Set the directory to contain environments',
-                      default=os.path.join('bloodhound', 'environments'))
+                      default='')
     parser.add_option('-d', '--database-type', dest='dbtype',
                       help="Specify as either 'sqlite', 'postgres' or 'mysql'",
                       default='')
@@ -466,6 +467,18 @@
     if not options.adminpass:
         options.adminpass = ask_password(options.adminuser)
 
+    if not options.project:
+        options.project = ask_question("""
+For the installation process, you can specify the top project name.
+This installer currently assumes that project name is 'main'.
+Project name [%s]: """, DEFAULT_PROJECT)
+
+    if not options.envsdir:
+        options.envsdir = ask_question("""
+For the installation process, you can specify the directory to contain environments.
+This installer currently assumes that environments directory is './bloodhound/environments'.
+Environments directory [%s]: """, DEFAULT_ENVSDIR)
+
     return options