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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mattgiuca
  • Date: 2008-03-05 05:55:24 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:651
util.js: Added write_cookie and read_cookie functions for JavaScript,
    allowing you to effectively treat the cookie as a dictionary
    rather than a big string.

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
    """
377
381
# as necessary, and include it in the distribution.
378
382
listmake_mimetypes = ['text/x-python', 'text/html',
379
383
    'application/x-javascript', 'application/javascript',
380
 
    'text/css', 'image/png', 'application/xml']
 
384
    'text/css', 'image/png', 'image/gif', 'application/xml']
381
385
 
382
386
# Main function skeleton from Guido van Rossum
383
387
# http://www.artima.com/weblogs/viewpost.jsp?thread=4829
525
529
        "scripts/python-console",
526
530
        "scripts/fileservice",
527
531
        "scripts/usrmgt-server",
 
532
        "scripts/diffservice",
528
533
    ]
529
534
    # Make sure that the files generated by conf are in the list
530
535
    # (since listmake is typically run before conf)
619
624
    conffile = os.path.join(cwd, "lib/conf/conf.py")
620
625
    jailconffile = os.path.join(cwd, "lib/conf/jailconf.py")
621
626
    conf_hfile = os.path.join(cwd, "trampoline/conf.h")
 
627
    phpBBconffile = os.path.join(cwd, "www/php/phpBB3/config.php")
622
628
 
623
629
    # Get command-line arguments to avoid asking questions.
624
630
 
776
782
 
777
783
    print "Successfully wrote trampoline/conf.h"
778
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
 
779
821
    print
780
822
    print "You may modify the configuration at any time by editing"
781
823
    print conffile
782
824
    print jailconffile
783
825
    print conf_hfile
 
826
    print phpBBconffile
784
827
    print
785
828
    return 0
786
829