Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Instruction script commands Installation/Deinstallation

  1. #1
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default Instruction script commands Installation/Deinstallation

    So as said I would need 4 extra fields in the database for future purpose, regarding to installation/deinstallation of maps and mods.

    1. Installation Server side (String field)
    2. Deinstallation Server side (String field)
    3. Installation Client side (String field)
    4. Deinstallation Client side (String field)

    How it works:

    Two ways (example map):

    1) the map is packed in a zip file (along with other stuff needed), together with 4 files containing the instructions commands:
    installation_client.ini
    deinstallation_client.ini
    installation_server.ini
    deinstallation_server.ini

    2) Database field contain the instructions commands separated by ;;

    method 1 can be used for more complex content for example modern warfare map package which contains multiple maps and mods, this method would require repacking.

    method 2 is used for existent content that doesnt require repacking, e.g. a single pk3 map file.

    This can now be used by external tools to install maps/mods (and deinstall them properly). The map is downloaded from the specified link. If an entry exists in the database the instructions there will be followed else it will be searched for the ini files in the zip package.

    Now the instructions itself:

    instructions installation + deinstallation:

    move file: movefile "path\filename" "path\filename"
    copy file: copyfile "path\filename" "path\filename"
    delete file: deletefile "path\filename"
    rename file: renamefile "path\oldfilename" "path\newfilename"
    execute file: executefile "path\filename"
    createfolder: createfolder "path" "foldername"
    delete folder: deletefolder "path" "foldername"
    rename folder: renamefolder "path" "foldername"
    add line to a config file: addline "path\configfile" "line"
    delete line from a config file: deleteline "path\configfile" "line"

    path is relative to the download folder or the root game folder. "path" is either "source" or "destination".
    The keywords "source" or "destination" specify which path the executing tool will take.

    1. Example:
    Adding a map, the map is Rockbound:

    installation instruction is:

    movefile "source\rockbound.pk3" "destination\main\rockbound.pk3"

    deinstallation instruction is:

    deletefile "destination\main\rockbound.pk3"

    The map itself is a single pk3 file. The installation tool will replace "source" and "destination" with the approbiate folders e.g. "c:\download" for the source and "c:\games\mohaa" for the destination

    2. Example:
    Adding a line to a config file, e.g. add "set sv_test 1" to the server.cfg:

    addline "destination\main\server.cfg" "set sv_test 1"

    The installation tool will add the line to the end of the server.cfg file
    Last edited by JoTo; September 14th, 2012 at 09:27 PM. Reason: some changes and additions
    Gamers Network - www.scapp.net

  2. #2
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Very nice idea. I'm for it, but I'd create a WebAPI for accessing this data instead of giving direct access to DB to 3rd party tools. This could also apply for external sites that want to use our database. So it would act a bit like a WebService, returning XML (SOAP maybe?) or JSON.

  3. #3

    Default

    Hi sorry bit behind on posts - So is this to be part of the map database I am working on ? or this is seperate for client ?

  4. #4
    Administrator JoTo's Avatar
    Join Date
    May 2010
    Location
    www.scapp.net
    Posts
    1,953

    Default

    The 4 fields are part of the database.

  5. #5
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    The fields are required in the database so you can store install instructions for every mod, and then software (or even inbuilt reborn client plugin) downloads the mod and installs it by using install instructions from the database

  6. #6

    Default

    Ok thanks no probs

    I will post full access to the database via PM so the following members will need access -:
    Joto
    Razor
    James

    Any others ?

    I will get those fields added now also the ones Own3 mentioned
    Last edited by heatsinkbod; August 31st, 2012 at 10:07 AM.

  7. #7

    Default

    mmm also the map and mod database are setup separate so will be two sets of above for you Joto ok ?

  8. #8

    Default

    1. Installation Server side (String field) = mapiss
    2. Deinstallation Server side (String field) = mapdss
    3. Installation Client side (String field) = mapics
    4. Deinstallation Client side (String field) = mapdcs

    1. Installation Server side (String field) = modiss
    2. Deinstallation Server side (String field) = moddss
    3. Installation Client side (String field) = modics
    4. Deinstallation Client side (String field) = moddcs

    Will post the full map of all the database fields ASAP who has access to the database thread here all ?
    Last edited by heatsinkbod; August 31st, 2012 at 10:16 AM.

  9. #9
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Razor and I both do! If I understand your question correctly. The problem is.. sql stuff scares the hell out of me since these forums are highly dependable on SQL. If anything, I would create a seperate database for stuff so that it doesn't interfere with the forums.

  10. #10

    Default

    Ok Mod database dump just for showing the fields - will give error on empty field -:
    http://www.mega-clan.co.uk/moddatabase1.php

    Code:
    <?PHP
    $user_name = "xxxx";
    $password = "xxxxx";
    $database = "xxxxxxx";
    $server = "xxxxxxxxxx";
    $db_handle = mysql_connect($server, $user_name, $password);
    $db_found = mysql_select_db($database, $db_handle);
    
    if ($db_found) {
    
    $SQL = "SELECT * FROM `content_type_aaaamohaamods";
    $result = mysql_query($SQL);
    
    while ($db_field = mysql_fetch_assoc($result)) {
    print("MOD Name = "); print $db_field['field_modname_value'] . "<BR>";
    print("Type of mod = "); print $db_field['field_typeofmod_value'] . "<BR>";
    print("MOD Version = "); print $db_field['field_modversion_value'] . "<BR>";
    print("MOD Server or Client = "); print $db_field['field_serverclient_value'] . "<BR>";
    print("MOD Status = "); print $db_field['field_modstatus_value'] . "<BR>";
    print("MOD Screen Shot = "); print $db_field['field_modscreen_value'] . "<BR>";
    print("MOD File = "); print $db_field['field_modfile_value'] . "<BR>";
    print("MOD File External LinkName = "); print $db_field['field_modfileext_value'] . "<BR>";
    print("MOD Short Description = "); print $db_field['field_shortdescription_value'] . "<BR>";
    print("MOD Full Description = "); print $db_field['field_moddescription_value'] . "<BR>";
    print("MOD Requires = "); print $db_field['field_modrequires_value'] . "<BR>";
    print("MOD Video External = "); print $db_field['field_modvideolink_value'] . "<BR>";
    print("MOD Video Embed code = "); print $db_field['field_modvideoembed_value'] . "<BR>";
    print("MOD Install = "); print $db_field['field_modinstall_value'] . "<BR>";
    print("MOD Config = "); print $db_field['field_modconfigs_value'] . "<BR>";
    print("MOD Info External = "); print $db_field['field_modextlinks_value'] . "<BR>";
    print("MOD Creator = "); print $db_field['field_modcreator_value'] . "<BR>";
    print("MOD support = "); print $db_field['field_modsupport_value'] . "<BR>";
    print("MOD Submitter Ratting = "); print $db_field['field_modsubratiing_value'] . "<BR>";
    print("MOD Ratting = "); print $db_field['field_modrating_value'] . "<BR>";
    print("MOD Credits = "); print $db_field['field_modcredits_value'] . "<BR>";
    print("MOD Tested  = "); print $db_field['field_modtested_value'] . "<BR>";
    print("MOD Tested By = "); print $db_field['field_modtestedby_value'] . "<BR>";
    print("MOD Reborn Compatable = "); print $db_field['field_modreborncompat_value'] . "<BR>";
    print("MOD  Installation Server side = "); print $db_field['field_modiss_value'] . "<BR>";
    print("MOD Deinstallation Server side = "); print $db_field['field_moddss_value'] . "<BR>";
    print("MOD Installation Client side = "); print $db_field['field_modics_value'] . "<BR>";
    print("MOD Deinstallation Client side = "); print $db_field['field_moddcs_value'] . "<BR>";
    }
    
    mysql_close($db_handle);
    
    }
    else {
    print "Database NOT Found ";
    mysql_close($db_handle);
    }
    
    ?>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •