tl;dr How do I compile a new AI module and staticly or dynamically link it into Freeciv?
Where I live a curfew has been established, I have a lot of time and not much to do.
I have played Freeciv for years and years, (when I have the time to burn:-)
I have always wanted to hack on the AI. Been ruminating, literally, for years on how I might approach it, now is the time.
To that end I have copied ai/stub/ to ai/qzrt/
mv qzrt/stubai.c qzrt/qzrtai.c
In qzrt/qzrtai.c, qzrt/Makefil.am replaced all "stub" with "qzrt"
I have copied scripts/travis-build.sh to worik_build.sh and apart from removing all the travis crud, and making the install directory local I added "qzrt" to the static build. Here is a choice. I could enable static loading (due to README.ai_modules) using --enable-aimodules --enable-shared then make a module in a separate tree, but keeping it simple for now)
--enable-ai-static=classic,qzrt,threaded,tex,stub \
Then I build (running my script).
The make file is created in qzrt:
config.status: creating ai/qzrt/Makefile
is in the output, but make is not run in qzrt
I can cd into build/ai/qzrt and run make and get: libqzrtai.la, qzrtai.lo, and qzrtai.o
So I am getting close....
Building new AI module
Re: Building new AI module
I have succeeded in getting a module compiled to link dynamically.
If any body is interested I can explain....
At some point I will put it on a git hub forlk but that is boring work, and in the absence of anybody else interested I will push on to actually implement something interesting
If I get anywhere at all, and if nobody minds, I will report here.
Happy curfew all....
If any body is interested I can explain....
At some point I will put it on a git hub forlk but that is boring work, and in the absence of anybody else interested I will push on to actually implement something interesting
If I get anywhere at all, and if nobody minds, I will report here.
Happy curfew all....