AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   Set path in ambuild. (https://forums.alliedmods.net/showthread.php?t=282987)

Spirit_12 05-22-2016 04:51

Set path in ambuild.
 
I'm totally clueless to the ambuild method. Can anyone explain how to set the folder path in the AMBuildScript? Right now I keep getting this exception.

Code:

Exception: Unable to find path for SOURCEMOD15
This is where the exception is coming from.

PHP Code:

        envvars = {
        
"MMSOURCE19":  "mmsource-1.10",
        
"SOURCEMOD15""sourcemod",
        
"HL2SDKL4D2":  "hl2sdk-l4d2"
    
}
    
    for 
name in envvars:
        if 
name in os.environ:
            
envvars[name] = os.environ[name]
        if 
not os.path.isdir(envvars[name]):
            
raise Exception("Unable to find path for {0}".format(name)) 


psychonic 05-22-2016 08:08

Re: Set path in ambuild.
 
It's looking at envrionment variables.

Spirit_12 05-22-2016 14:38

Re: Set path in ambuild.
 
In that regard, how would I set the path to this location?

Code:

/home/abc/project/sourcemod
/home/abc/project/mmsource-1.10
/home/abc/project/hlsdk-l4d2


Powerlord 05-22-2016 16:38

Re: Set path in ambuild.
 
Doesn't the AMBuild also have an argument you can pass to configure.py to set the SourceMod path, or is that only available in the sample extension stuff?

Spirit_12 05-22-2016 18:13

Re: Set path in ambuild.
 
I'm not sure. I read the configure.py file, and it does not contain any arguments.

Powerlord 05-23-2016 16:48

Re: Set path in ambuild.
 
What are you compiling?

configure.py and AMBuildScript are specific to a project.

Edit: Actually, this is a moot point, like psychonic said, SOURCEMOD15 is an environment variable.

Spirit_12 05-23-2016 18:27

Re: Set path in ambuild.
 
I'm trying to compile the Downtown extension. The latest one used in Equilibrium configs.

I get that AMBuildScript and configure.py are project specific, but that's not what I'm asking for. The project is looking for needed files from sourcemod, metamod, and l4d2 sdk. All I'm asking is how to point it to those folders.

Miu 05-23-2016 18:40

Re: Set path in ambuild.
 
set the env variables

or just change the dict literal i guess, i.e.

PHP Code:

    envvars = {
    
"MMSOURCE19":  "/home/abc/project/mmsource-1.10",
    
"SOURCEMOD15""/home/abc/project/sourcemod",
    
"HL2SDKL4D2":  "/home/abc/project/hlsdk-l4d2"
    



Potato Uno 05-23-2016 21:14

Re: Set path in ambuild.
 
PHP Code:

python configure.py --hl2sdk-root="{}" --sm-path="{}" --mms-path="{}" 

Replace the {} with the FULL paths to those folders.

xXDeathreusXx 07-03-2016 19:55

Re: Set path in ambuild.
 
Quote:

Originally Posted by Potato Uno (Post 2421574)
PHP Code:

python configure.py --hl2sdk-root="{}" --sm-path="{}" --mms-path="{}" 

Replace the {} with the FULL paths to those folders.

To add onto that, "root" points to the folder containing all the SDK's to read from


All times are GMT -4. The time now is 06:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.