Compiling 3.1 with visual studio

Discuss the future of Warzone 2100 with us.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Compiling 3.1 with visual studio

Post by Emdek »

vexed, there exists old port using CMake, by SafetyOff, but AFAIK it is missing some "magic" available in current one, but except cross compiling nobody was able to list those features. :-D
I would like to restart that effort for current master branch when I'll have more time (now my main task should be finally finishing my thesis ;-)), I've already got .pro files made by i-NoD and since I found extremely nice QMake to CMake converter (already used to fix CMake support for WMIT) I would start with it's output and then add relevant Find files, later adding those magic things, when they will be finally listed somewhere.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Compiling 3.1 with visual studio

Post by vexed »

Lord Apocalypse wrote:Got it to compile finally but running it gives me a font error...

Code: Select all

error   |12:29:41: [iV_initializeGLC:165] Failed to select font family DejaVu Sans as regular font
error   |12:29:41: [iV_initializeGLC:183] iV_initializeGLC: Failed to select font family DejaVu Sans for the bold font
Any ideas? At least it compiles now though ;)
It can't find the font file.
Where did you put it ?
Where is your font.conf file, and where does that say it wants to look for said font ?

For the STL stuff, see: http://askldjd.wordpress.com/2009/09/13 ... d-stlport/
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

I copied the font folder from my installed copy of 3.1 over to /data in the repo. Working on getting a debug version compiled just adding the qt stuff into my path so I don't have to modify all the projects.. I hate that about VC10.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

Still no luck. So tried release/debug for both master and 3.1 same issue. Game starts to load, goes away for a second then flashes up to load again. Game opens with blank menu screen. Since I know where the quit button should be I can click there to close. If I click something else I get an error box with nothing useful.

The fonts folder is the same one from my beta 10 install. Win7 has both fonts installed, both are in the /fonts folder as is a fonts.conf with no location on where to look.

For whatever reason te fonts folder works under beta 10 but not my compiled version. Will do some more testing tomorrow if I have time.
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

Re: Compiling 3.1 with visual studio

Post by Ezio »

Code: Select all

3>  Generating parser based on grammar...
3>BISONPARSER : debug(LOG_ERROR, "RES file parse error : \n%s at line %d\nText: '%s'\n", msg, res_get_lineno(), res_get_text());
3>C:\Warzone\MainSource\devpkg\FlexBison.targets(136,5): error MSB3721: The command "bison.exe -d -b resource_parser -o resource_parser.cpp -p resource_parser   resource_parser.ypp" exited with code -1.
:hmm:
bison + flex path OK, path OK what else should i check?
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

What OS are you trying to compile on? So in environment variables you have PATH set to include something like C:\GnuWin\bin ?
User avatar
Ezio
Trained
Trained
Posts: 306
Joined: 24 Apr 2010, 16:42

Re: Compiling 3.1 with visual studio

Post by Ezio »

win 7 64, Yes 'C:\Program Files (x86)\GnuWin32\bin;'
i could call bison from cmd and the results are 'need operand please see --help' or something
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

Its possible (though unlikely) that it doesn't like the spaces. I have mine installed in E:\Programming\GnuWin32\bin

Try installing to a folder with no spaces such as the example above and resetting your path to that directory and see if you get the same result. With an exit code of -1 there is usually an error calling the exe in question. Other than that not sure what could be causing VC to barf on bison.
BunkerBlaster
Trained
Trained
Posts: 268
Joined: 21 Feb 2010, 09:56

Re: Compiling 3.1 with visual studio

Post by BunkerBlaster »

Lord Apocalypse wrote:I copied the font folder from my installed copy of 3.1 over to /data in the repo. Working on getting a debug version compiled just adding the qt stuff into my path so I don't have to modify all the projects.. I hate that about VC10.
Try copying the fonts (fonts only, not the config) to the home directory of warzone. Worked for me, I still got the bold error, but at least one font worked. I'm going from memory when I compiled 3.1 with vs8. Had the same errors with 2.3 series.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Compiling 3.1 with visual studio

Post by stiv »

Its possible (though unlikely) that it doesn't like the spaces. I have mine installed in E:\Programming\GnuWin32\bin
Rather likely actually. (IIRC, the issue has come up before) Spaces in filenames are one of the great evils of the previous century and you need to take special care when scripting to deal with them.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

removing the fonts.conf had no affect

Going to work out a new devpkg based off the required libs in the VC10 solution and see whats whats.

Emdek, anyone who compiles on windows.. have any of you got your compiled binary to work? If so can you post your VC10 solution and devpkg please?
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Compiling 3.1 with visual studio

Post by Emdek »

Lord Apocalypse, never tried to compile under Windows which I have only on secondary and even less powerful machine (Turion based laptop)...

Although I'm curious if those QMake files by i-NoD would be able (probably would need some updating) to get it compile using QtCreator.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: Compiling 3.1 with visual studio

Post by vexed »

Lord Apocalypse wrote:removing the fonts.conf had no affect

Going to work out a new devpkg based off the required libs in the VC10 solution and see whats whats.

Emdek, anyone who compiles on windows.. have any of you got your compiled binary to work? If so can you post your VC10 solution and devpkg please?
It is on trac, as I stated before...outdated, but there.

The directory structure for fonts must be correct, you need etc/fonts in the data dir.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

Yeah tried that and that didn't work either, though instead of playing the gui guessing game WZ wouldn't even load to the gui though it would show up in task manager. Still digging into the devpkg from emdek and getting everything to build my own.. Also looking into the make files for a linux compile.. should probably focus on the build setup that you use for the releases though as those work and do not have or seem to require the /etc/fonts folder.

All in all.. a very frustrating and annoying situation. I think rebuilding the outdated Vega Strike solution was easier. So long as the git make file is up to date it shouldn't be too difficult (I hope)
Lord Apocalypse
Regular
Regular
Posts: 678
Joined: 29 Jul 2009, 18:01

Re: Compiling 3.1 with visual studio

Post by Lord Apocalypse »

Ok, got it to run now.. just didn't wait long enough for it to load.. takes far too long though so not sure why that is. Will need to investigate further.
Post Reply