Talk:Source code compiling
Errr...how does one add a wad into the EXE?
-Chisuun.
Uhh...ADDFILE? ~DarkWarrior
D_AddFile(va(pandf,srb2waddir,"name.wad"));
if you meant having the wad as part of the EXE I don't know how to do that. I think I once read Marine's Best Friend had a wad in the EXE. --Turtle Man 06:41, 26 September 2007 (PDT)
Todo: Compiling instructions for Visual C++ Express
We should have compiling instructions for Visual C++ Express. SSNTails actually uses Visual Studio to compile SRB2, and mingw-compiled SRB2 EXEs have consistency errors with Visual Studio-compiled SRB2 EXEs within netgames, if memory serves. Where are the knowledgeable people on this subject? --Digiku talk 15:40, 4 December 2007 (PST)
Also on slightly related note how to compile using VC++ 2005 since it doesn't have some of the libraries that come with VC++ 6. I think the 2005 version doesn't have a ASM complier..or whatever that can't compile one of things needed (I think it was zlib). I don't know if VC++ 2008 fixes this or has other oddities that need to be addressed. -Torgo 17:49, 15 April 2008 (PDT)
On the Visual C++ Express tutorial, it says "open the project file" when it doesn't even say if there is one or, what I am having trouble with, where to find it. If this information could be added for future reference, it would be quite useful. -Pyro The Magma Fox 11:55, 30 August 2012 (GMT)
Code::Blocks instead of Dev C++?
I don't really program that much, but I heard that it is a better IDE then Dev C++ and can import Devpacks. I don't want to put it in there because I have little experience programing. -Torgo 19:04, 28 September 2009 (UTC)
Why import? SRB2 already have a Code::Blocks project file I made, look for SRB2.cbp AlamA 12:02, 29 September 2009 (UTC)
I didn't mean the project file, I meant the devpaks that you need to compile SRB2 (like Directx8.DevPak etc). Torgo 15:28, 4 November 2009 (UTC)
Source Code (itself) article
I was messing with source code. It made me think the wiki should have an article about Source Code itself. Just to clarify:
- Source Code Compiling article: it is this very article. Explains how to compile the source.
- Source Code article: explains what it is, what contains, its architecture, how it is structured, what each file does (e.g. r_sky.c: Sky rendering; s_sound.c: System-independent sound and music routines;...). Maybe it makes more people motivated to mess with the source. --Ezer'Arch|עֶזֶר'AρχTalk 18:23, 29 January 2011 (UTC)
- I agree, and the only reason I haven't already written this myself is that I don't know enough about the source code to write a decent article. ~Katmint Talk • Contribs 18:36, 29 January 2011 (UTC)
- Yeah, what Katmint said pretty much. The source code isn't exactly easy to grasp without spending some time with it. A plan to document the source code here has always been on the back burner, it's just that nobody stepped up to it yet, because it's quite a huge task. --SpiritCrusherTalk • Contribs 19:29, 29 January 2011 (UTC)
- Have a look at this: User:Ezer'Arch/Sandbox#Source Code Index --Ezer'Arch|עֶזֶר'AρχTalk 02:26, 16 February 2011 (UTC)
Split contents into /Makefiles and /CMake subpages
What the title says. Article is way too big as it is right now, among other problems. --Monster Iestyn Talk 13:51, 5 March 2015 (CST)
I agree, it would look much cleaner if the article is split into subpages. --Steel the fox (talk) 17:05, 10 March 2015 (CDT)
Having discussed this article and related on IRC, it's quite clear to me now that everything entailed is inaccurate to some degree... For instance, Visual C++ does not use Makefiles, it uses "projects". So why is it considered part of the "Makefiles" article, and listed as using Makefiles in the "CMake" article? This is just ridiculous.
It's also not entirely clear what everything even IS exactly, there's just so many different kinds of compiling/build software it's brain-destroying! But, from what I can gather, here is how the existing software mentioned in these articles can be divided up (if I'm correct, that is):
- Build script generation tools: These build makefiles and/or projects for whatever you want, and is optional (SRB2 already provides Makefiles and projects for some compilers/IDEs, though some may not work properly)
- CMake - this is the only one supported by SRB2 at least
- IDEs (integrated development environments):
- Visual Studio - comes with Visual C++
- Xcode - for Mac
- Code::Blocks - for Windows, Linux or Mac; supports GCC and Visual C++ compilers
- Compilers
- GCC - standard compiler in Linux and other Unix-like OSes, MinGW includes a port of this for Windows
- Visual C++ (also known as MSVC) - comes with Visual Studio
- Assemblers
- NASM
- Yasm
- Other software
- MinGW - for Windows; basically a collection of software including GCC, GNU make (as mingw32-make), MSYS (a collection of GNU utilities), GDB and others
From the above information, we could then attempt to rewrite the compiling tutorial itself in a sort of manner like this:
- Get appropriate software to compile SRB2 with (MinGW, Visual Studio, Code::Blocks, Xcode, etc), depending on your platform or otherwise
- (Optional) use CMake to generate your makefiles/projects for you; you can skip this step if you wish to use the pre-existing ones available, assuming they work for your chosen software
- Compile!
Of course I'm probably omitting a lot of important details, and the method of compiling obviously differs between softwares, but for now this is a start towards a better, more sensible compiling tutorial I guess?
That said though, my brain hurts trying to understand compiling in general. -- Monster Iestyn Talk 11:29, 24 October 2015 (CDT)
Hold on, let's try again with how the source code compiling tutorial could be organised generally:
- Introduction:
- Lists choice of software one can use to compile with
- Perhaps explains how to extract source code from GitHub/GitLab (see Using GitHub, which probably does this for us?)
- Setup of each software listed
- (Optional) Using CMake to generate makefiles/projects, instead of using pre-made ones
- Compiling instructions - varies depending on software used, or the OS you're using to compile from (Windows, Linux, Mac are the usual ones)
- Post-compiling instructions? (getting file out of /bin and such, though this may be simple enough to be lumped in the previous section)
Alternatively, if it is better to keep all information for each software together in a single place each:
- Introduction:
- Extracting source code stuff, perhaps?
- (Optional) Using CMake to generate makefiles/projects, instead of using pre-made ones
- Setup + compiling instructions (split up for each software)
- MinGW (could still be a subpage, there's a lot of content written up for this already)
- Visual Studio (Visual C++)
- Code::Blocks
- Xcode
- etc etc
Hopefully this should spring up more ideas in the minds of those who can at least do something to help here. =P -- Monster Iestyn Talk 16:52, 28 October 2015 (CDT)