Raised This Month: $51 Target: $400
 12% 

Can someone explain me HOW to COMPILE extension under Windows, please!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-20-2016 , 09:08   Can someone explain me HOW to COMPILE extension under Windows, please!
Reply With Quote #1

Someone to help me with setting my IDE for compiling SM extensions. I use CodeBlocks. What I have done up to now is setting the IDE to use VC2013. What I have to link? Which path I have to set in the IDE. How to use sourcemod and source sdk in the IDE. There isn't information about which path have to be set in the IDE(Maybe because I use CodeBlocks, not Visual Studio). My platform is Windows 8.1!
I used this tutorial, but I can't understand this:
HTML Code:
The sample_ext project assumes that it is located in a subdirectory inside the SourceMod public directory. To change this, modify all references to ..\.. to $(SOURCEMOD15)\public and specify the SOURCEMOD15 variable as mentioned in the Optional Environment variables.
Thanks!

PS: Don't say me to use Visual Studio, this IDE is very big(RAM), proprietary and I don't like it's association with Microsoft, many other reasons

Edit: Why the tutorial says VC2003 and VC2005 instead of VC2013?
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 02-22-2016 at 14:43.
Naydef is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-20-2016 , 10:55   Re: Someone, help me with setting my IDE
Reply With Quote #2

The VS projs/Makefile stuff of the sample extension haven't been maintained in a long time. The 1.8 sample extension folder ships with a sample AMBuild script that is recommended to use.
To compile your project with the AMBuild script, a VS install is required.
WildCard65 is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-20-2016 , 12:17   Re: Someone, help me with setting my IDE
Reply With Quote #3

Ok. How to compile the example project with visual studio? There is a error for missing file sp_vm_types.h. What I am missing?
Please help me, I know that some people on this forum can do magic!
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 02-20-2016 at 12:37.
Naydef is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-21-2016 , 05:38   Re: Someone, help me with setting my IDE
Reply With Quote #4

Help me, please! Where can I find sp_vm_types.h? Is there a way to compile without AMBUILD?
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 02-21-2016 at 05:42.
Naydef is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 02-21-2016 , 08:02   Re: Someone, help me with setting my IDE
Reply With Quote #5

Quote:
Originally Posted by Naydef View Post
Where can I find sp_vm_types.h?
https://github.com/alliedmodders/sou...master/include
Miu is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-21-2016 , 09:51   Re: Someone, help me with setting my IDE
Reply With Quote #6

Ok, how to compile project with AMBuild2(for example the sample plugin)? I have Visual Studio. Is there any command?
I can't find tutorial for compiling extensions. Only for creating extensions
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 02-21-2016 at 10:13.
Naydef is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-22-2016 , 14:44   Re: Can someone explain me HOW to COMPILE extension under Windows, please!
Reply With Quote #7

Please, someone to explain me how to compile extension. I don't know what to do. I read the tutorial for creating extension, but I can't find info for this!

I have this error when I execute "python configure.py":
HTML Code:
C:\libs\sourcemod-master\public\sample_ext>python configure.py
Traceback (most recent call last):
  File "configure.py", line 23, in <module>
    builder.Configure()
  File "C:\Program Files (x86)\Python35-32\lib\site-packages\ambuild2\frontend\v
2_0\prep.py", line 79, in Configure
    if util.IsString(self.default_build_folder):
  File "C:\Program Files (x86)\Python35-32\lib\site-packages\ambuild2\util.py",
line 379, in IsString
    return isinstance(v, basestring)
NameError: name 'basestring' is not defined
__________________
My plugins:
*None for now*


Steam:
naydef

Last edited by Naydef; 02-22-2016 at 15:03.
Naydef is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-22-2016 , 15:09   Re: Can someone explain me HOW to COMPILE extension under Windows, please!
Reply With Quote #8

The current version of AMBuild has issues on Python 3.4 and newer, which is why you're getting the name `basestring` is not defined error.

I was hoping that would be fixed by now... I'd be tempted to submit a pull request, but I know very little Python and would likely screw it up even worse.

Edit: There's already a pull request to fix it.

Edit 2: As for the documentation, I should probably create a wiki page based on the documentation I originally wrote for this before it was merged into SM 1.8's sample_ext.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 02-22-2016 at 15:16.
Powerlord is offline
Naydef
Senior Member
Join Date: Dec 2015
Location: Doom Town, Nevada
Old 02-22-2016 , 15:25   Re: Can someone explain me HOW to COMPILE extension under Windows, please!
Reply With Quote #9

Oh, thank you Powerlord. So, I have to use Python 2.7 for now, until this is fixed? Is there any other procedure for compiling SM extensions?
__________________
My plugins:
*None for now*


Steam:
naydef
Naydef is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 02-22-2016 , 21:42   Re: Can someone explain me HOW to COMPILE extension under Windows, please!
Reply With Quote #10

Quote:
Originally Posted by Naydef View Post
Oh, thank you Powerlord. So, I have to use Python 2.7 for now, until this is fixed? Is there any other procedure for compiling SM extensions?
You can manually patch your AMBuild install before or after you run setup.py.
For before, you can do 1 of 2 ways:

1) Manually write in the changes to the files in PR powerlord linked.
OR
2) Merge in the PR if you cloned AMBuild from github(with the github command).

After you can do option 1 from above.
WildCard65 is offline
Reply



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:05.


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