[RELEASE] Mini Tool - Server Source Manager

  • I wrote this small tool in python to manage easly the server source in a unique script to run.

    The tool is written in Python 2.7 but it should works fine with next version.


    Basically, the tool can help you to build/touch/strip without navigate in the differents paths.


    The tool can perform:



    -Build:

    build game/db

    build game/db with clean

    build game&db (consecutively)

    build game&db with clean



    -Touch (which dont' create new file when is used with a wrong name):

    perform Touch of one or more files in game/src (by inserting the names separated with a space)

    perform Touch of one or more files in db/src (by inserting the names separated with a space)


    -Strip:

    Strip game (by copying it)

    Strip db (--same)


    Additional features:

    - the tool find if a file is edited $val seconds in the future (eg. if you have set a wrong date in your compiler) and it will touch the file automatically.

    - the tool is written in procedural python (no OOP) so you should read easly it even if you are not an expert with python.

    - You can run more than one commands in sequence by separating them with one of these character : ("&&","&","|"," ",'\t',"-",',') (es. : 1&9 -> build game and strip game)

    - the tool can get command-line arguments to perform what you need (you could take a look under to know the command you can pass)



    to-know:

    - To run a script in python in the compiler you need to have installed Python (i recommend python27 which i can guarantee it will works). If you haven't installed python you can do it by using pkg manager (pkg install pyhon27) or ports (cd /usr/ports/lang/python27 && make config-recursive && make install clean)

    - If you get some problem with the script you can post a comment in this thread to know the solution, anyway it should works perfectly with martysama source (most commonly used).

    - To run the script you should give 7XX octal permission.

    - To run the script you need to go at the same path where is the script and to use "./scriptname.py" to run it.

    - If you are creating the scriptfile using notepad++ (or some external editor) is possible to have a problem about the EOL character (you have to set it on "Unix EOL").

    - You have way to enable/disable the question "exit?" when the build fail


    - To run the script you should put it on "Server" folder, when you can find game, db, common, etc.


    For any kind of problems i recommend you to write a comment in this thread (instead of pm) because another user could get same problem and find here the solution.

    i hope it would be usefull.


    byebye




    COMMANDLINE ARGUMENTS


    SCRIPT

  • Dieses Thema enthält 2 weitere Beiträge, die nur für registrierte Benutzer sichtbar sind, bitte registrieren Sie sich oder melden Sie sich an um diese lesen zu können.