Windows HOW-TO

Discussions about the internal structures of the game. You can also post here if you'd like to know how things really work (and don't know how to read C code).
Post Reply
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Windows HOW-TO

Post by idcarlos »

Any mini HOW-TO about make a Bygfoot distribution from CVS?

Un saludo
Carlos
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

you mean a windows package from cvs? er... not yet.

as to getting the cvs sources, have a look at the sf.net docs about cvs clients:
http://sourceforge.net/docman/display_d ... group_id=1

as for compiling... let me post the mail simon binns wrote me; with a bit of tweaking it should work for you:
Simon Binns wrote: I'll try give a brief explanation of how I got it going. I used the MinGW tools and the DevCPP IDE to build it, which you can get both together from http://www.bloodshed.net/dev/devcpp.html (get the 4.9.9.2
version). Then you can download development versions of the glib, gtk, pango and atk libraries from ftp://ftp.gtk.org/pub/gtk/v2.6/win32/

Then you need to create a new project in DevCPP and add all the .lib files from those packages to it (in the project options). Also in the project options add all the include directories from those packages to project. Then add all the Bygfoot source and header files.

After that the game should at least compile and link alright.
you also need to copy the dll and arj.exe files from the released package into the directory.

i hope this helps.

if i were you anyway, i wouldn't go for the cvs version yet, because there were hardly any changes in cvs since the release on saturday.

gyözö
Press any key to continue or any other key to quit.
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

I need also cairo-dev and libintl but I can compile it under Windows.

Some Warnings and a lot of errors

Code: Select all

src/game_gui.h:29: warning: `libintl_printf' is an unrecognized format function type
src/game_gui.h:33: warning: `libintl_printf' is an unrecognized format function type
src/game_gui.h:37: warning: `libintl_printf' is an unrecognized format function type

In file included from src/callback_func.c:8:
src/live_game.h:35: error: expected `,' or `...' before "new"

In file included from src/user.h:6,
                 from src/callback_func.c:18:
src/variables.h:14: error: redefinition of `Country country'
src/variables.h:14: error: `Country country' previously declared here
src/variables.h:17: error: redefinition of `GArray*users'
src/variables.h:17: error: `GArray*users' previously declared here
src/variables.h:21: error: redefinition of `gint season'
src/variables.h:21: error: `gint season' previously declared here
src/variables.h:21: error: redefinition of `gint week'
src/variables.h:21: error: `gint week' previously declared here
src/variables.h:21: error: redefinition of `gint week_round'
src/variables.h:21: error: `gint week_round' previously declared here
src/variables.h:25: error: redefinition of `OptionList options'
src/variables.h:25: error: `OptionList options' previously declared here
src/variables.h:28: error: redefinition of `OptionList constants'
src/variables.h:28: error: `OptionList constants' previously declared here
src/variables.h:31: error: redefinition of `OptionList constants_app'
src/variables.h:31: error: `OptionList constants_app' previously declared here
src/variables.h:33: error: redefinition of `OptionList settings'
src/variables.h:33: error: `OptionList settings' previously declared here
src/variables.h:35: error: redefinition of `OptionList lg_tokens'
src/variables.h:35: error: `OptionList lg_tokens' previously declared here

src/variables.h:38: error: redefinition of `GArray*lg_commentary[38]'
src/variables.h:38: error: `GArray*lg_commentary[38]' previously declared here
src/variables.h:42: error: redefinition of `GArray*transfer_list'
src/variables.h:42: error: `GArray*transfer_list' previously declared here
src/variables.h:46: error: redefinition of `GArray*season_stats'
src/variables.h:46: error: `GArray*season_stats' previously declared here
src/variables.h:49: error: redefinition of `gint counters[9]'
src/variables.h:49: error: `gint counters[9]' previously declared here
src/variables.h:52: error: redefinition of `gint status[6]'
src/variables.h:52: error: `gint status[6]' previously declared here
src/variables.h:55: error: redefinition of `void*statp'
src/variables.h:55: error: `void*statp' previously declared here
src/variables.h:58: error: redefinition of `gint selected_row'
src/variables.h:58: error: `gint selected_row' previously declared here
src/variables.h:61: error: redefinition of `GArray*name_lists'
src/variables.h:61: error: `GArray*name_lists' previously declared here
src/variables.h:64: error: redefinition of `Windows window'
src/variables.h:64: error: `Windows window' previously declared here
src/variables.h:69: error: redefinition of `gint popups_active'
src/variables.h:69: error: `gint popups_active' previously declared here
src/variables.h:72: error: redefinition of `LiveGame live_game_temp'
src/variables.h:72: error: `LiveGame live_game_temp' previously declared here
src/variables.h:75: error: redefinition of `gint cur_user'
src/variables.h:75: error: `gint cur_user' previously declared here
src/variables.h:77: error: redefinition of `gint timeout_id'
src/variables.h:77: error: `gint timeout_id' previously declared here
src/variables.h:79: error: redefinition of `GRand*rand_generator'
src/variables.h:79: error: `GRand*rand_generator' previously declared here
src/variables.h:86: error: redefinition of `GList*support_directories'
src/variables.h:86: error: `GList*support_directories' previously declared here
src/variables.h:90: error: redefinition of `GString*save_file'
src/variables.h:90: error: `GString*save_file' previously declared here
src/variables.h:93: error: redefinition of `gboolean os_is_unix'
src/variables.h:93: error: `gboolean os_is_unix' previously declared here

In file included from src/callback_func.c:18:
src/user.h:49: warning: `libintl_printf' is an unrecognized format function type

In file included from src/callback_func.c:19:
src/window.h:9: error: conflicting declaration 'enum Windows'
src/bygfoot.h:135: error: 'Windows' has a previous declaration as `typedef struct Windows Windows'

src/callback_func.c: In function `void callback_show_team(gint)':
src/callback_func.c:552: error: invalid conversion from `void*' to `const GArray*'
src/callback_func.c:557: error: invalid conversion from `void*' to `const GPtrArray*'

make.exe: *** [src/callback_func.o] Error 1

Ejecución Terminada
I use bygfoot-1.9.1.tar.bz2 as source.

Un saludo
Carlos Garces
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

Maybe this links help to fix my problem.
http://groups.google.com/group/linux.de ... 598364800f
http://freeciv.org/~jdorje/crosscompile ... iling.html

Sorry but its my 1º C++ program, I'm a web developer.

Un saludo
Carlos Garces
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

did you use devc++? did you download the win32 versions of
- atk
- pango
- gtk
- glib

and did you add all the lib and include files from these packages to the project in the devc++ project options?

gyözö
Press any key to continue or any other key to quit.
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

gyboth wrote:did you use devc++? did you download the win32 versions of
- atk
- pango
- gtk
- glib

and did you add all the lib and include files from these packages to the project in the devc++ project options?

gyözö
Yes, an also
-cairo-dev
-libintl

Code: Select all

Compilador: Default compiler
Building Makefile: "D:\Dev-Cpp\bygfoot-1.9.1\Makefile.win"
Ejecutando  make...
make.exe -f "D:\Dev-Cpp\bygfoot-1.9.1\Makefile.win" all
g++.exe -c src/callback_func.c -o src/callback_func.o -I"D:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"D:/Dev-Cpp/include/c++/3.4.2/backward"  -I"D:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"D:/Dev-Cpp/include/c++/3.4.2"  -I"D:/Dev-Cpp/include"  -I"D:/Dev-Cpp/include"  -I"D:/Dev-Cpp/include/glib-2.0"  -I"D:/Dev-Cpp/include/glib-2.0/glib"  -I"D:/Dev-Cpp/include/glib-2.0/gobject"  -I"D:/Dev-Cpp/include/pango"  -I"D:/Dev-Cpp/include/cairo"  -I"D:/Dev-Cpp/include/gtk-2.0/gtk"  -I"D:/Dev-Cpp/include/gtk-2.0/gdk"  -I"D:/Dev-Cpp/include/gtk-2.0/gdk-pixbuf"  -I"D:/Dev-Cpp/lib/gtk-2.0/include"  -I"D:/Dev-Cpp/lib/glib-2.0/include"  -I"D:/Dev-Cpp/include/gtk-2.0"  -I"D:/Dev-Cpp/include/atk-1.0"   

In file included from src/callback_func.c:8:
src/live_game.h:35: error: expected `,' or `...' before "new"

In file included from src/user.h:6,
                 from src/callback_func.c:18:
src/variables.h:14: error: redefinition of `Country country'
src/variables.h:14: error: `Country country' previously declared here
src/variables.h:17: error: redefinition of `GArray*users'
src/variables.h:17: error: `GArray*users' previously declared here
src/variables.h:21: error: redefinition of `gint season'
src/variables.h:21: error: `gint season' previously declared here
src/variables.h:21: error: redefinition of `gint week'
src/variables.h:21: error: `gint week' previously declared here
src/variables.h:21: error: redefinition of `gint week_round'
src/variables.h:21: error: `gint week_round' previously declared here
src/variables.h:25: error: redefinition of `OptionList options'
src/variables.h:25: error: `OptionList options' previously declared here
src/variables.h:28: error: redefinition of `OptionList constants'
src/variables.h:28: error: `OptionList constants' previously declared here
src/variables.h:31: error: redefinition of `OptionList constants_app'
src/variables.h:31: error: `OptionList constants_app' previously declared here
src/variables.h:33: error: redefinition of `OptionList settings'
src/variables.h:33: error: `OptionList settings' previously declared here
src/variables.h:35: error: redefinition of `OptionList lg_tokens'
src/variables.h:35: error: `OptionList lg_tokens' previously declared here

src/variables.h:38: error: redefinition of `GArray*lg_commentary[38]'
src/variables.h:38: error: `GArray*lg_commentary[38]' previously declared here
src/variables.h:42: error: redefinition of `GArray*transfer_list'
src/variables.h:42: error: `GArray*transfer_list' previously declared here
src/variables.h:46: error: redefinition of `GArray*season_stats'
src/variables.h:46: error: `GArray*season_stats' previously declared here
src/variables.h:49: error: redefinition of `gint counters[9]'
src/variables.h:49: error: `gint counters[9]' previously declared here
src/variables.h:52: error: redefinition of `gint status[6]'
src/variables.h:52: error: `gint status[6]' previously declared here
src/variables.h:55: error: redefinition of `void*statp'
src/variables.h:55: error: `void*statp' previously declared here
src/variables.h:58: error: redefinition of `gint selected_row'
src/variables.h:58: error: `gint selected_row' previously declared here
src/variables.h:61: error: redefinition of `GArray*name_lists'
src/variables.h:61: error: `GArray*name_lists' previously declared here
src/variables.h:64: error: redefinition of `Windows window'
src/variables.h:64: error: `Windows window' previously declared here
src/variables.h:69: error: redefinition of `gint popups_active'
src/variables.h:69: error: `gint popups_active' previously declared here
src/variables.h:72: error: redefinition of `LiveGame live_game_temp'
src/variables.h:72: error: `LiveGame live_game_temp' previously declared here
src/variables.h:75: error: redefinition of `gint cur_user'
src/variables.h:75: error: `gint cur_user' previously declared here
src/variables.h:77: error: redefinition of `gint timeout_id'
src/variables.h:77: error: `gint timeout_id' previously declared here
src/variables.h:79: error: redefinition of `GRand*rand_generator'
src/variables.h:79: error: `GRand*rand_generator' previously declared here
src/variables.h:86: error: redefinition of `GList*support_directories'
src/variables.h:86: error: `GList*support_directories' previously declared here
src/variables.h:90: error: redefinition of `GString*save_file'
src/variables.h:90: error: `GString*save_file' previously declared here
src/variables.h:93: error: redefinition of `gboolean os_is_unix'
src/variables.h:93: error: `gboolean os_is_unix' previously declared here

In file included from src/callback_func.c:19:
src/window.h:9: error: conflicting declaration 'enum Windows'
src/bygfoot.h:135: error: 'Windows' has a previous declaration as `typedef struct Windows Windows'

src/callback_func.c: In function `void callback_show_team(gint)':
src/callback_func.c:552: error: invalid conversion from `void*' to `const GArray*'
src/callback_func.c:557: error: invalid conversion from `void*' to `const GPtrArray*'

make.exe: *** [src/callback_func.o] Error 1

Ejecución Terminada
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

i'm pretty sure cairo isn't needed because cairo is only relevant for gtk+ 2.8.x and bygfoot uses 2.4 or 2.6 at the highest.

let's go through the devcpp project options.

so, press Alt-P to open the project options window. here's what i see in my options (listed by tab):
  • general: project type is win gui. this could also be console, it doesn't make a difference, i think.
  • files: all *c and *h files of the source code.
  • compiler: default compiler; all settings are on 'NO' except for optimization.
  • parameters: Compiler: -mms-bitfields (this might be missing in your project?)
    linker: all *.lib and *.a files contained in the development packages, for instance glib-2.0.lib, atk-1.0.lib etc., or libgtk-win32-2.0.dll.a, libintl.a.
  • directories:
    library: the directories with the *.lib and *.a files;
    include directory: the directories with all the *.h files from the development packages;
  • build options: override output filename checked, output file bygfoot.exe
  • makefile: no custom makefile, everything default.
  • version info: all default
i hope this helps ;-)

gyözö
Press any key to continue or any other key to quit.
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

Pease, send me your .DEV file. I can't see the error
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

ok, i tried it out. i followed the exact instructions from my last post with the 1.9.1 sources.

compilation was successful. starting the program didn't work, it complained about a missing libintl.dll (which is included in the 1.9.1 win package). after copying the dll into the project dir containing the executable, everything went fine and i could start the game.

gyözö
Press any key to continue or any other key to quit.
idcarlos
Posts: 63
Joined: Mon Sep 12, 2005 2:30 pm

Post by idcarlos »

The problem are one incorrect version of libintl*.* files
I have unistaled intl and gettext pakages and re-instaled gettext-0.14.4-lib.zip from http://gnuwin32.sourceforge.net/

Works ok :oops:

And now... I want to test with the CVS code... 8)
gyboth
Site Admin
Posts: 1421
Joined: Sat Dec 18, 2004 8:42 am
Location: Passau, Germany
Contact:

Post by gyboth »

idcarlos wrote:Works ok :oops:
good to hear.. finally! :-D
And now... I want to test with the CVS code... 8)
even better! test the WC 2006, in particular.

gyözö
Press any key to continue or any other key to quit.
Post Reply