Freeciv-tao-client
Freeciv-tao-client
I would like to develop Freeciv client based on my own I(interface) library called libgreattao. This library separates business logic and view. Libgreattao can run application in one of three modes - gui, text shell and network. GUI mode supports GTK+, Qt and console (CUI) backend. I think Freeciv-tao-client could replace current web client. To use libgreattao application remotely, you should use tao-network-client, which is libgreattao application(wrapper).
My question is - where should I start?
My question is - where should I start?
Re: Freeciv-tao-client
Here is first patch how qt-client was created:
https://gna.org/patch/?func=detailitem&item_id=2283
Its just copy of gui-stub dir + some build related stuff.
https://gna.org/patch/?func=detailitem&item_id=2283
Its just copy of gui-stub dir + some build related stuff.
Re: Freeciv-tao-client
If your toolkit is compatible with Gtk or Qt in any way, even if it's with one backend only, start from one of these clients. Else, start from the stub code, but keep an eye on the Gtk client -- it's the API reference.
I think the first thing to do is autoconnecting to a server (-a option). /start the game from the server, then implement the canvas and mapview callbacks to be able to render something. Then only handle unit orders, chat, research, cities, … in the order you like.
You might also want to take a look at the early months of the Qt client in svn history. It could give you a clue on what's needed to get a basic client working.
If you need help understanding something specific, I'll happily take a look -- I'm also learning the code.
Louis
I think the first thing to do is autoconnecting to a server (-a option). /start the game from the server, then implement the canvas and mapview callbacks to be able to render something. Then only handle unit orders, chat, research, cities, … in the order you like.
You might also want to take a look at the early months of the Qt client in svn history. It could give you a clue on what's needed to get a basic client working.
If you need help understanding something specific, I'll happily take a look -- I'm also learning the code.
Louis
Re: Freeciv-tao-client
First problem is related to missing Makefile.in file. I checked client/gtk3/Makefile.in file existence. It's missing. So what should I do?
Code: Select all
Index: /home/slawomir/Dokumenty/Projekty/trunk/configure.ac
===================================================================
--- /home/slawomir/Dokumenty/Projekty/trunk/configure.ac (wersja 33744)
+++ /home/slawomir/Dokumenty/Projekty/trunk/configure.ac (kopia robocza)
@@ -1251,6 +1251,9 @@
fi
AM_CONDITIONAL([RULEDIT], [test "x$ruledit" = "xyes"])
+AC_SUBST([gui_tao_cflags])
+AC_SUBST([gui_tao_libs])
+AC_SUBST([gui_tao_ldflags])
AC_SUBST([gui_gtk2_cflags])
AC_SUBST([gui_gtk2_libs])
AC_SUBST([gui_gtk2_ldflags])
@@ -1296,6 +1299,7 @@
AC_SUBST([HOST_PATH_SEPARATOR])
AC_SUBST([HOST_DIR_SEPARATOR])
AC_SUBST([FREECIV_STORAGE_DIR])
+AM_CONDITIONAL(CLIENT_GUI_TAO, test, "x$gui_tao" = "xyes")
AM_CONDITIONAL(AUDIO_SDL, test "x$SDL_mixer" != "xno")
AM_CONDITIONAL(CLIENT_GUI_SDL2, test "x$gui_sdl2" = "xyes")
AM_CONDITIONAL(CLIENT_GUI_GTK_2_0, test "x$gui_gtk2" = "xyes")
@@ -1753,6 +1757,7 @@
client/agents/Makefile
client/include/Makefile
client/gui-sdl2/Makefile
+ client/tao/Makefile
client/gui-gtk-2.0/Makefile
client/gui-gtk-3.0/Makefile
client/gui-gtk-3.x/Makefile
Re: Freeciv-tao-client
Makefile.in is generated from Makefile.am. You should modify client/Makefile.am and client/tao/Makefile.am.Lachu wrote:First problem is related to missing Makefile.in file. I checked client/gtk3/Makefile.in file existence. It's missing. So what should I do?
Re: Freeciv-tao-client
I now get FC_TAO_CLIENT: command not found, but FC_GTK3_CLIENT is nowhere.
Re: Freeciv-tao-client
Ok. I've created tao-client.m4 by copy content of existing file for another client, but probably it's requires to configure pkg-config. Am I correct?
Re: Freeciv-tao-client
I've compiled three bytecode files, but there's link problems. Probably ./configure doesn't add -lgreattao switch to gcc command.
Re: Freeciv-tao-client
In tao-client.m4, make sure you have:Lachu wrote:I've compiled three bytecode files, but there's link problems. Probably ./configure doesn't add -lgreattao switch to gcc command.
Code: Select all
gui_tao_libs="$TAO_LIBS"
In client/Makefile.am, you need:
Code: Select all
freeciv_tao_LDADD = \
# ... a few lines ...
$(gui_tao_libs)
Does this help ?
Louis
Re: Freeciv-tao-client
Mistake was in naming convention. In pc file. I put TAO string instead GREATTAO. New problem is I must compile program in client/gui-tao before invoking make in client, but that's not critical bug.