Raised This Month: $248 Target: $400
 62% 

How to set-up build environment on Linux?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
enderandrew
Senior Member
Join Date: Jun 2020
Old 07-26-2020 , 17:18   How to set-up build environment on Linux?
Reply With Quote #1

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
enderandrew is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 07-27-2020 , 16:14   Re: How to set-up build environment on Linux?
Reply With Quote #2

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.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
enderandrew
Senior Member
Join Date: Jun 2020
Old 07-27-2020 , 21:29   Re: How to set-up build environment on Linux?
Reply With Quote #3

Quote:
Originally Posted by nosoop View Post
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.
enderandrew is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 07-27-2020 , 22:20   Re: How to set-up build environment on Linux?
Reply With Quote #4

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 do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
enderandrew
Senior Member
Join Date: Jun 2020
Old 07-28-2020 , 01:44   Re: How to set-up build environment on Linux?
Reply With Quote #5

Quote:
Originally Posted by nosoop View Post
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.
enderandrew is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 07-31-2020 , 18:56   Re: How to set-up build environment on Linux?
Reply With Quote #6

Quote:
Originally Posted by enderandrew View Post
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.
__________________
WildCard65 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:47.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode