AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Coding MM:S Plugins & SM Extensions (https://forums.alliedmods.net/forumdisplay.php?f=75)
-   -   How to set-up build environment on Linux? (https://forums.alliedmods.net/showthread.php?t=326321)

enderandrew 07-26-2020 18:18

How to set-up build environment on Linux?
 
I spun up a Linux VM for testing.

I installed build-essential.

Now I believe I need my game's SDK, MM source and SM source. But I'm lost trying to figure out how to download the TF2 SDK. Google tells me to grab the Source 2013 SDK, but that doesn't appear to be correct and I'm hearing that each game's SDK was spun off.

There is this Git repository where there is a TF2 tree, but if I clone the repo I get the whole repo and not necessarily the TF2 tree.

https://github.com/alliedmodders/hl2sdk/tree/tf2

nosoop 07-27-2020 17:14

Re: How to set-up build environment on Linux?
 
The checkout-deps script in the SourceMod repo will create a repository mirror and generate the individual SDK directories for you. You can patch up the $sdks variable to only grab the TF2 version; may also want to stub out getmysql() if you don't want to pull that down as well.

enderandrew 07-27-2020 22:29

Re: How to set-up build environment on Linux?
 
Quote:

Originally Posted by nosoop (Post 2711905)
The checkout-deps script in the SourceMod repo will create a repository mirror and generate the individual SDK directories for you. You can patch up the $sdks variable to only grab the TF2 version; may also want to stub out getmysql() if you don't want to pull that down as well.

Thanks! I just found that, and then ran into an issue with it.

I tried running it on a fresh VPS with just build-essentials and such installed on it, and the script fails to complete with python 3. Apparently you need the python 2 version of setuptools to get that script to run correctly.

Now when I get some time I'm going to try and compile some extensions to help prepare to migrate away from running on my desktop to on the Linux VPS.

nosoop 07-27-2020 23:20

Re: How to set-up build environment on Linux?
 
You should be able to manually build / install it; your particular distro may just not have python in its path (which is strange for the script, considering it checks if AMBuild is installed for python3).

enderandrew 07-28-2020 02:44

Re: How to set-up build environment on Linux?
 
Quote:

Originally Posted by nosoop (Post 2711962)
You should be able to manually build / install it; your particular distro may just not have python in its path (which is strange for the script, considering it checks if AMBuild is installed for python3).

I installed the latest Debian testing and it didn't have any python 2 stuff by default even when installing other build packages. Debian is trying to deprecate python 2 and remove it completely.

I opened an issue on GitHub and the SM team is looking into either making it a dependency that gets picked up by the script to make sure you have the python 2 version of setuptools, or altering the script to also work with python 3.

For the moment I've got my environment though I don't have time to mess with it as I'm busy with a work project. But I hope to spend some time with this soon.

WildCard65 07-31-2020 19:56

Re: How to set-up build environment on Linux?
 
Quote:

Originally Posted by enderandrew (Post 2711978)
I opened an issue on GitHub and the SM team is looking into either making it a dependency that gets picked up by the script to make sure you have the python 2 version of setuptools, or altering the script to also work with python 3.

A fix is now merged into the master branch.


All times are GMT -4. The time now is 23:01.

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