Changeset 18

Show
Ignore:
Timestamp:
11/06/06 21:26:50 (2 years ago)
Author:
Gregor
Message:

'net install' support

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/dsss.conf

    r17 r18  
     1[*] 
     2buildflags = -g 
     3 
     4[hcf] 
     5 
    16[sss] 
    27# these are not useful in the library 
    38exclude = sss/main.d sss/dsssdll.d sss/stub.d 
     9 
     10# this has bootstrapping issues if included it (depends on Mango) 
     11exclude += sss/net.d 
     12 
    413# proper use of sss requires mango 
    5  
    614# sss depends on dsss_build/util 
    7 buildflags = -Idsss_build 
     15buildflags = -g -Idsss_build 
    816prebuild = cd dsss_build ; $DSSS build ; cd .. ; getmango.d 
    917preclean = cd dsss_build ; $DSSS distclean 
     
    4149 
    4250# postinstall: install dsss_build 
    43 postinstall = install dsss_build/dsss_build$EXE_EXT $BIN_PREFIX
    44 sss/stub.d $INCLUDE_PREFIX/sss 
     51postinstall = install dsss_build/dsss_build$EXE_EXT $BIN_PREFIX ;
     52install sss/stub.d $INCLUDE_PREFIX/sss 
    4553 
    4654target=dsss 
    47 buildflags=-Idsss_build -LIBPATH=dsss_build 
     55buildflags = -g -Idsss_build -LIBPATH=dsss_build 
  • trunk/sss/conf.d

    r17 r18  
    8181char[] manifestPrefix; 
    8282 
     83/** The prefix to which the source list is downloaded */ 
     84char[] srcListPrefix; 
     85 
     86/** The prefix for scratch work */ 
     87char[] scratchPrefix; 
     88 
    8389/** The location of stub.d (used to make stub D libraries) */ 
    8490char[] stubDLoc; 
     
    169175        "dsss" ~ std.path.sep ~ 
    170176        "manifest"; 
    171      
    172     // set some environment variables 
     177    srcListPrefix = forcePrefix ~ std.path.sep ~ 
     178        "share" ~ std.path.sep ~ 
     179        "dsss" ~ std.path.sep ~ 
     180        "sources"; 
     181     
     182    // set the scratch prefix and some some environment variables 
    173183    version (Posix) { 
     184        scratchPrefix = "/tmp"; 
     185         
    174186        setEnvVar("DSSS", installPrefix ~ "/dsss"); 
    175187        setEnvVar("PREFIX", forcePrefix); 
     
    189201        setEnvVar("LD_LIBRARY_PATH", ldlibp); 
    190202    } else version (Windows) { 
     203        scratchPrefix = forcePrefix ~ std.path.sep ~ "tmp"; 
     204         
    191205        setEnvVar("DSSS", installPrefix ~ "/dsss.exe"); 
    192206        setEnvVar("PREFIX", forcePrefix); 
     
    344358    conf.settings[""] = null; 
    345359    conf.settings[""]["name"] = getBaseName(getcwd()); 
    346     conf.settings[""]["version"] = "0.0.0"; 
     360    conf.settings[""]["version"] = "latest"; 
    347361     
    348362    // parse line-by-line 
     
    687701        if (ext == "d") { 
    688702            // if it's a .d file, -exec it 
    689             saySystemDie(dsss_build ~ "-exec " ~ cmd); 
     703            saySystemDie(dsss_build ~ "-clean -exec " ~ cmd); 
    690704        } else if (cmd.length > 8 && 
    691705                   cmd[0..8] == "install ") { 
  • trunk/sss/main.d

    r15 r18  
    3737import sss.genconfig; 
    3838import sss.install; 
     39import sss.net; 
    3940import sss.uninstall; 
    4041 
     
    4849            INSTALL, 
    4950            UNINSTALL, 
     51            NET, 
    5052            GENCONFIG 
    5153    } 
     
    122124                command = cmd_t.UNINSTALL; 
    123125                 
     126            } else if (arg == "net") { 
     127                commandSet = true; 
     128                command = cmd_t.NET; 
     129                 
    124130            } else if (arg == "genconfig") { 
    125131                commandSet = true; 
     
    129135             
    130136        } else if (command == cmd_t.GENCONFIG || 
    131                    command == cmd_t.UNINSTALL) { 
     137                   command == cmd_t.UNINSTALL || 
     138                   command == cmd_t.NET) { 
    132139            /* commands with no special options (put them in their own else-if 
    133140             * if they gain options */ 
     
    225232        case cmd_t.UNINSTALL: 
    226233            return sss.uninstall.uninstall(buildElems); 
     234            break; 
     235             
     236        case cmd_t.NET: 
     237            return sss.net.net(buildElems); 
    227238            break; 
    228239             
     
    248259    install:   install all or some binaries or libraries 
    249260    uninstall: uninstall a specified tool or library 
     261    net:       Internet-based installation and package management 
    250262    genconfig: generate a config file 
    251263  Each command has its own set of options, which are not listed here. To list 
     
    290302            ); 
    291303         
     304    } else if (command == cmd_t.NET) { 
     305        writefln( 
     306`Usage: dsss [dsss options] net <net command> <package name> 
     307  Net Commands: 
     308    install: Install a package via the network source` 
     309            ); 
     310 
     311         
    292312    } else if (command == cmd_t.GENCONFIG) { 
    293313        writefln(