Results 1 to 3 of 3

Thread: How to use libcod with Open Game Panel (OGP)

  1. #1
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts

    How to use libcod with Open Game Panel (OGP)

    Edit: see post#3

    The easiest way to use libcod with OGP is to edit the service agent to set the required exports.

    First we need to disable the auto updater in ogp_agent_run:
    (line 186) 'after run() {' change 'update' to '#update'.

    ogp_agent.pl:
    (line 754) change to:
    PHP Code:
    $command ". preload.sh ; ./$server_exe $startup_cmd"
    (line 758) change to:
    PHP Code:
    $command ". preload.sh ; taskset -c $cpu ./$server_exe $startup_cmd"
    Now create your preload.sh in the game directory with your own libcod export settings:
    PHP Code:
    #!/bin/sh
    export LD_LIBRARY_PATH="/path/to/cod2/libs/:/path/to/cod2/libs/mysql"
    export LD_PRELOAD="/path/to/cod2/libs/libcod2_1_3.so" 
    Last edited by Mitch; 30th January 2015 at 12:57.

  2. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (30th July 2014)

  3. #2
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    Another way might be to replace the original lnxded-binary with a shell script and name the cod2lnxded-bin (just like in CoD4). Then forwarding the arguments to the script to the real lnxded.

    http://stackoverflow.com/questions/4...h-shell-script
    timescale 0.01

  4. The Following User Says Thank You to kung foo man For This Useful Post:

    Mitch (20th March 2016)

  5. #3
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by kung foo man View Post
    Another way might be to replace the original lnxded-binary with a shell script and name the cod2lnxded-bin (just like in CoD4). Then forwarding the arguments to the script to the real lnxded.

    http://stackoverflow.com/questions/4...h-shell-script
    Thanks, this works even better. But you have to make sure that the line endings are unix. Otherwise you will get the 'bad interpreter' error:
    http://stackoverflow.com/questions/2...ad-interpreter

    cod2_lnxded (without extension)
    PHP Code:
    #!/bin/bash
    export LD_LIBRARY_PATH="/path/to/cod2/libs/:/path/to/cod2/libs/mysql"
    export LD_PRELOAD="/path/to/cod2/libs/libcod2_1_3.so"
    ./cod2_lnxded_1_3_nodelay_va_loc $@ 

  6. The Following User Says Thank You to Mitch For This Useful Post:

    kung foo man (20th March 2016)

Posting Permissions

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