~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: dcoles
  • Date: 2008-02-29 02:11:58 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:624
forum: Removed the subsilver2 style and phpBB installer
Modified prosilver theme to be more IVLE integrated
Added db dumps for setup

setup.py: Added config.php generator code

doc/setup/install_proc.txt: New setup/install details

Show diffs side-by-side

added added

removed removed

Lines of Context:
272
272
    """Database name:""",
273
273
    """
274
274
# Database name"""))
 
275
config_options.append(ConfigOption("db_forumdbname", "ivle_forum",
 
276
    """Forum Database name:""",
 
277
    """
 
278
# Forum Database name"""))
275
279
config_options.append(ConfigOption("db_user", "postgres",
276
280
    """Username for DB server login:""",
277
281
    """
620
624
    conffile = os.path.join(cwd, "lib/conf/conf.py")
621
625
    jailconffile = os.path.join(cwd, "lib/conf/jailconf.py")
622
626
    conf_hfile = os.path.join(cwd, "trampoline/conf.h")
 
627
    phpBBconffile = os.path.join(cwd, "www/php/phpBB3/config.php")
623
628
 
624
629
    # Get command-line arguments to avoid asking questions.
625
630
 
777
782
 
778
783
    print "Successfully wrote trampoline/conf.h"
779
784
 
 
785
    # Write www/php/phpBB3/config.php
 
786
 
 
787
    try:
 
788
        conf = open(phpBBconffile, "w")
 
789
        
 
790
        # php-pg work around
 
791
        if db_host == 'localhost':
 
792
            forumdb_host = '127.0.0.1'
 
793
        else:
 
794
            forumdb_host = db_host
 
795
 
 
796
        conf.write( """<?php
 
797
// phpBB 3.0.x auto-generated configuration file
 
798
// Do not change anything in this file!
 
799
$dbms = 'postgres';
 
800
$dbhost = '""" + forumdb_host + """';
 
801
$dbport = '""" + str(db_port) + """';
 
802
$dbname = '""" + db_forumdbname + """';
 
803
$dbuser = '""" + db_user + """';
 
804
$dbpasswd = '""" + db_password + """';
 
805
 
 
806
$table_prefix = 'phpbb_';
 
807
$acm_type = 'file';
 
808
$load_extensions = '';
 
809
@define('PHPBB_INSTALLED', true);
 
810
// @define('DEBUG', true);
 
811
//@define('DEBUG_EXTRA', true);
 
812
?>"""   )
 
813
    
 
814
        conf.close()
 
815
    except IOError, (errno, strerror):
 
816
        print "IO error(%s): %s" % (errno, strerror)
 
817
        sys.exit(1)
 
818
 
 
819
    print "Successfully wrote www/php/phpBB3/config.php"
 
820
 
780
821
    print
781
822
    print "You may modify the configuration at any time by editing"
782
823
    print conffile
783
824
    print jailconffile
784
825
    print conf_hfile
 
826
    print phpBBconffile
785
827
    print
786
828
    return 0
787
829