Jump to content
The Dark Mod Forums

Frost_Salamander

Contributor
  • Posts

    976
  • Joined

  • Days Won

    30

Everything posted by Frost_Salamander

  1. To better illustrate, let's contrast the different ways of doing this: The Old Way 1. Obtain a build machine (PC, VM, or server) 2. Install required OS (Ubuntu, Debian, Windows, Mac, etc) 3. Update OS 4. Download and install required OS dependencies (e.g. apt install mesa-common-dev, scons, subversion, etc). 5. Download and install required project dependencies (e.g. Boost). May require building from source, etc 6. Download project source 7. Run the build script, and hope (or pray) that it 'just works'. Which it won't. 8. Spend the next 3 hours figuring out what's wrong with your setup. 9. finally get it working 10. Update some OS dependency, and find that your project build no longer works. 11. Someone updates the build script or adds a new dependency, and the build no longer works because they haven't updated the Wiki 12. etc, etc Note that instead of step 5. people may opt to include libraries in the source tree. This leads to repository bloat. The New Way (with Docker installed) 1. Download project source 2. Run single docker command. This always works because the 'build image' will have been updated with any required changes as well - if it hadn't the code wouldn't build for the person who made changes to the source code. Note the 'build image' doesn't have to be built by the user - it can be shared via dockerhub and 'pulled' locally. This is done implicitly if it doesn't exist locally when you do a 'docker run'. The user doesn't have to know anything about it at all, in fact.
  2. I'm not suggesting CMake. I'm not suggesting replacing scons. All I'm suggesting is a way to create and use a build environment that is instantly available to everyone and will work every single time. It would be useful for those interested in Linux builds, or those who work on Mac or Linux. You can even run Docker on Windows, and build for Linux from your Windows environment. Or run in it Mac and also build for Linux. That's kind of the point. You can think of Docker has an extremely lightweight Virtual Machine that you can spin up instantly (literally milliseconds) with any OS in order to run a particular task (in this case, to build Darkmod), and then it disappears. The OS (or image) you can build yourself and put anything you want in it (see the Dockerfile in the Github link I provided). Again, this is just one use case for Docker - the others aren't really applicable here. If you don't have any interest or experience with Linux builds, then it won't be of interest - totally understandable. But for someone like me, who wants to build the project in the quickest and easiest way possible, and have it work every single time, it is very useful. Regarding Windows - it's a different story and not really part of this Docker thing. But I was also looking at this whole thing from an automation angle like Tels mentioned in the first post in this thread. This is also doable with VS but like I said it would require a different approach. You would get a better idea of how it's helpful if you worked through the Github example I provided - but if it's not your area of interest then by all means give it a miss. Also - I would be interested in reading whatever article you said ridiculed Docker. The only people that I have heard ridicule Docker are those who have never used it and don't really understand the benefits of it. I've worked in software development for 18 years, and container technology is the single most useful thing to emerge in the mainstream in the past few years (along with cloud computing).
  3. Grayman: believe me I understand where you are coming from.... This wouldn't require replacing scons or MSVS (I'm assuming this means Visual Studio). Rather it still uses them and complements them. Think of it as abstracting the build process up into another layer - one that is far easier to manage (both for newbies and experiences devs), as well as paving the way for other possible improvements like mentioned earlier. Also I'm not interested in suggesting anything goes into SVN - this is just a demonstration on how things can be improved. For those interested, I've put what I have up on Github, with a readme: https://github.com/timwebster9/darkmod-build
  4. OK got it to build in my Docker image (using the linuxBuild.sh script), but might be missing a couple of files...? scons: done building targets. real 3m12.136s user 31m43.112s sys 3m35.660s mv: cannot stat 'gamex86-base.so': No such file or directory cp: cannot stat 'tdm_game02.pk4': No such file or directory EDIT: I also notice there are a lot of binaries included in the source, which helps contribute to the large repository size. This is another area where Docker would help - all this stuff would be in the Docker image instead of the source repository and you would have clear separation of code and dependencies. You could also have a different build image for each target platform (Debian, Ubuntu, MacOS, etc). So what this would provide is: - isolated, immutable build environments for all target platforms - reduce repository size by moving binaries and other dependencies to Docker build images (and possibly pave the way to moving to Github - which may help attract more contributors, and make it easier to use free online services. I'm not sure how many support SVN for example...) - provide an easy way for anyone to build the project without having to worry about missing libraries, dependencies, etc Happy to share what I've got so far, and provide more info for anyone who's interested...
  5. OK. That's the first time I've seen that build command, so either I didn't look hard enough or the docs are out of date. I'll give that a try. For the record, I'm only looking at Linux at the moment as well, as that's where all my experience with this stuff is. But obviously getting something working for Windows as well would be just as valuable. What I was thinking of doing was just creating a Docker image for the build environment, and seeing if we could use it in a free hosted CI service (or one that is free for open-source projects at least). Haven't really looked at any of them yet - just wanted to see if there was interest first. Also for it to be truly useful I would also probably want all the steps involved in packaging it up for distribution as well.
  6. OK thanks for the reply. I have no preferences for the 'build system' (i.e. scons), but looking at the Wiki and the COMPILE.txt file in the source it looks like (and correct me if I'm wrong) a fairly manual build process, involving all the usual headaches regarding OS dependencies, configuration drift, 3rd party libraries that have to be compiled, library paths, etc, etc. What is used for a consistent build environment? How do you know if the build is broken? What if it works on one user's PC and not the others? Would using a free CI service (e.g. Travis or Circle) be desirable? I also think I saw that using Github isn't doable because of the size of the repository. Would splitting up the repo between code and assets help? I'm wary of making suggestions without having the full picture - all I have to go by is the Wiki and the readmes in the source code, but if any of this sounds like it's worth looking into I'd be happy to do it.
  7. Just wondering if this ever went anywhere or could use improvement? I've been wanting to offer to help out with this project for ages, but wasn't sure what I could offer. I have a lot of experience with stuff like Docker and automated build systems which might help here. Is there anything I could look at?
  8. I just finished this and managed to totally miss the somehow. Went back to try and find them and still can't - are they possible to find after you've completed the main objective?
  9. Do you reckon the 4GB is worth the extra ££, or does it make no difference?
  10. Thanks - yeah the card was a budget buy (used). Any suggestions for an Nvidia upgrade? It seems for anything decent these days it's at least £100. FYI In my kids' PCs (Core 2 Duos) I put Nvidia GT 710s and we get a very playable 30-60 FPS on those in TDM (although for my next upgrade I'd be looking for something better)..
  11. - Windows 10 Pro - 2x Xeon E5620 Quad Core @ 2.40 GHz (8 cores total) - 12 GB DDR3 1333 MHz RAM - Sapphire Radeon R7 260X 1 GB - 24" Asus VS248HR 1920x1080, 1ms, 50M:1 - Pretty good performance most of the time, slows down a bit in outdoor areas (the worst is Lords and Legacy: 10-20 FPS outdoors near the castle). - I have Ubuntu on the 2nd hard drive but haven't tried TDM on it yet...
×
×
  • Create New...