Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Build Tutorial: Windows, Visual C++ Express
- - By PeterW [de] Date 2009-09-09 17:34
Didn't want to make that main building thread even longer. I wrote a quick tutorial about how to build OC from source.

It's meant as an entry point for absolute beginners, so it leaves out everything that's not strictly necessary. It uses OpenGL from deps instead of DirectX, for example.

It would be interesting to get some feedback from non-developers about how easy this is to follow.
Parent - - By Ape [fi] Date 2009-09-09 18:43
That just makes me happy. It's nice to see how much easier it is to setup the building environment on my Ubuntu box compared to windows.
Parent - By PeterW [de] Date 2009-09-09 21:04 Edited 2009-09-09 21:26
That's obviously because Günther has optimized everything for Linux usage!11 Seriously, it's not that much easier - you need to install even more stuff and most likely will have to use the command line, which is not something the target audience of this article shouldn't need to understand.

(And yes, I'm fully aware I have opened myself to about a million different flamewars right now.)
Parent - - By Newton [de] Date 2009-09-09 21:18
Care to make a tutorial for ubuntu/debian?
Parent - - By Carli [de] Date 2009-09-10 08:52
there is nothing to care ;)
Parent - - By Newton [de] Date 2009-09-10 10:55
With the dawn of Ubuntu to be a Linux user didn't have to mean that one ever compiled something on his own. A tutorial is always for the clueless.
As for me, I still didn't get TortoiseHG for Nautilus working - might be because the Mercurial version that can be installed via apt-get for Ubuntu is too old. And because I didn't know how to build a newer one from source, I gave up.
Parent - - By Kanibal [de] Date 2009-09-10 11:49
But I don't think, you need TortoiseHG on a linux-system. The console of linux is much better than the one in windows, imho.
Reply
Parent - - By Newton [de] Date 2009-09-10 12:18
Flamewar, GO!
Parent - - By Kanibal [de] Date 2009-09-10 12:55
Nope. Shouldn't be a flamewar, just my opinion.
Reply
Parent - By Caesar [de] Date 2009-09-10 20:17
That's what they always start with.
Parent - By Carli [de] Date 2009-09-10 13:13
right. I only use console and I love it.
Parent - By Isilkor Date 2009-09-10 17:32
I'm using the shell version of hg exclusively. Also, my OS is a Windows. My point being, there's people who like shells, and there's people who are discouraged from doing things when they have to remember some cryptic (or not) CLI commands.
Reply
Parent - By Caesar [de] Date 2009-09-10 20:18 Edited 2009-09-10 20:27
Okay, what kind of weaknesses has cmd.exe, compared to a UNIX shell? Let's see.

[Edit Isilkor: Nipping this in the bud. Don't encourage flame wars.]
Parent - - By Günther [de] Date 2009-09-10 08:52
There's this: http://hg.openclonk.org/file/8fdb075c128b/README.linux.txt

Of course, it assumes you know how to operate a shell. One could make a tutorial which pastes those commands into a shell script and shows how to execute that by marking it as executable with a file manager, but...
Reply
Parent - Date 2009-09-10 12:49
Parent - - By MrBeast [de] Date 2009-09-11 15:07 Edited 2009-09-12 00:01
Install the devel-versions of the libraries,cmake,make and gcc, run a console, type "cd Your/Clonk/Folder" then "cmake ." and "make". Then make an symbolic link or an copy of clonk into the planet folder and run it. Thats all.
Reply
Parent - By Günther [de] Date 2009-09-11 23:49
Don't forget the compiler, cmake, make, etc. Except for cmake, autoconf and automake, the list in the README.linux.txt is still accurate.
Reply
Parent - By Caesar [de] Date 2009-09-12 12:53
I lack some libraries I had not installed for that. But it's relatively easy to find their names.
Parent - - By Luchs [de] Date 2009-09-09 20:39
Worked here and was easy to follow.
The resulting build however has some problems: it doesn't start in fullscreen, and when I tried to exit the scenario, it crashed.
Parent - By Isilkor Date 2009-09-09 20:44

> The resulting build however has some problems: it doesn't start in fullscreen,


That's working as intended, if you've built in debug configuration.

> and when I tried to exit the scenario, it crashed.


Known bug, but we're not quite sure yet what's caused that.
Reply
Parent - By PeterW [de] Date 2009-09-09 21:25

> It doesn't start in fullscreen


Good find, this is the kind of thing you get so used to as a developer that you don't even notice it... ;)

Hm, the question is, of course, whether we want newbies to build a release build. When I find the time I would like to give some additional hints about how to explore the engine, and this is obviously easier if the audience already had a debug build ready.
Parent - By Newton [de] Date 2009-09-09 20:43
Great!!
Parent - - By Ringwaul [ca] Date 2009-09-18 23:25
Could you possibly have a section for compilers other than MSVC? Whenever I try to install MSVC (after downloading) it takes an infinite amount of time to install. I honestly left it for over 5 hours installing and it was only on the second installation step.

So yeah, if you could have a tutorial for compiling with MinGW or somesuch that would be great.
Reply
Parent - By Caesar [de] Date 2009-09-19 09:13
You could try the offline install...  Could help. Though a MinGW tuto would be good.
Parent - - By Günther [de] Date 2009-09-19 12:16
The method described in http://wiki.openclonk.org/w/DevelopersGuide and http://hg.openclonk.org/file/de779f98beae/README.windows.txt should still work. If something is unclear, ask and I'll try to improve the text.
Reply
Parent - - By Ringwaul [ca] Date 2009-09-19 23:06
Most of the links are broken in the windows readme. :(

Apparently all I need now is 'aclocal' 'autoheader' 'autoconf' and 'automake'. At least those were the missing commands MSYS said it couldn't get.
Reply
Parent - By Günther [de] Date 2009-09-20 16:36
Wtf. I thought sourceforge was better than that. Or maybe it's the persons responsible for mingw that are to blame? Unfortunately, selecting the right packages is not exactly trivial. We should probably look into mirroring the necessary packages, or maybe do something like the msysgit guys, who have a git repository with their mingw/msys installation. Or, alternatively, give up on msys and use cmake and the native port of GNU make, which I think can be installed with the tdm-mingw installer. (Why that installer is not used for the original mingw project is a mystery...)
Reply
Parent - - By PeterW [de] Date 2009-09-21 13:11
Hu? Good old Microsoft is always good for surprises. What is this "second" installation step? If it's downloading the actual packages, then you must have managed to somehow block the installer from the Internet (proxy?). See Cäsar, use the offline installer then.
Parent - - By Ringwaul [ca] Date 2009-09-21 16:13
Well, when it is installing MSVC it says there are a bunch of different sections it installs. They're all done one after the other (assuming they're ever done at all).

This is what I'm referring to:
Reply
Parent - - By PeterW [de] Date 2009-09-21 18:27
Well, that's not very specific as the installer is downloading and installing a lot of stuff in that step. Doesn't the installer give any indication what it's doing at the point?
Parent - - By Ringwaul [ca] Date 2009-09-21 19:09
Ironically, the photo I link from the tutorial is exactly where I get stuck (Microsoft Visual C++ Express Edition with SP1). Also, I tried the offline ISO install, but apparently even though I fully uninstalled whatever was left of the online install, the computer still thinks MSVC is installed and is stopping me from installing from the iso. :(
Reply
Parent - By PeterW [de] Date 2009-09-21 21:16 Edited 2009-09-21 22:12
I'd be interesting to know whether it stopped when downloading the package... or while installing it. Maybe you had some application running in the background that blocked it?

Either way it seems most likely that your system setup is somehow at fault. If you want to find out why the installer fails, I'd suggest you try monitoring it with the Process Monitor.
Parent - - By Maddin Date 2010-02-03 13:53
I tried to build a version but Cmake says that I don't have Visual Studio 9 2008 installed.

CMake Error: CMake was unable to find a build program corresponding to "Visual Studio 9 2008".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: Could not find cmake module file:C:/Program Files (x86)/OpenClonk/planet/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: Could not find cmake module file:C:/Program Files (x86)/OpenClonk/planet/CMakeFiles/CMakeCCompiler.cmake
Parent - - By AlteredARMOR [ua] Date 2010-02-03 14:13
You can tell cmake to use whatever C compiler you have installed
Reply
Parent - By Maddin Date 2010-02-03 14:42
I only have VS 9 2008 installed. o.O
Parent - - By Isilkor Date 2010-02-03 15:01
Try running cmake from a VS 2008 Command Prompt.
Reply
Parent - - By Maddin Date 2010-02-03 15:55
How to do?
Parent - - By AlteredARMOR [ua] Date 2010-02-03 16:07 Edited 2010-02-03 16:09
It is View -> Other Windows -> Command Window or just press Ctrl+Alt+A
EDIT: Though you will probably not have cmake command available there...
Reply
Parent - By Caesar [de] Date 2010-02-03 17:49

>Though you will probably not have cmake command available there...


Not by name, but by path (so "C:\Program Files (x86)\CMake\bin\cmake.exe")
Parent - - By PeterW [gb] Date 2015-10-04 20:08
Updated for Windows 10 and MSVC 2015. Because we really shouldn't have a build guide that just doesn't work.

... yes, that's a good reason to reply to a 2216 days old thread.
Parent - By Zapper [de] Date 2015-10-04 22:40
cool, thanks!
Up Topic Development / Developer's Corner / Build Tutorial: Windows, Visual C++ Express

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill