fteqcc and progs.src conditional compilation
Moderator: InsideQC Admins
4 posts
• Page 1 of 1
fteqcc and progs.src conditional compilation
I want to conditionally compile frikbots into a mod.
How can I effectively deal with progs.src ??
I've read everything here:
http://www.fteqw.com/wiki/index.php?tit ... efinitions
And am not quite sure how to do this.
Here is what I want to do that doesn't work, but anyone can see what I am attempting.
How can I effectively deal with progs.src ??
I've read everything here:
http://www.fteqw.com/wiki/index.php?tit ... efinitions
And am not quite sure how to do this.
Here is what I want to do that doesn't work, but anyone can see what I am attempting.
progs.src
../progs.dat
#define WITH_FRIKBOTS
defs.qc
#ifdef WITH_FRIKBOTS
frikbot/bot.qc
frikbot/bot_way.qc
frikbot/bot_fight.qc
frikbot/bot_ai.qc
frikbot/bot_misc.qc
frikbot/bot_phys.qc
frikbot/bot_move.qc
frikbot/bot_ed.qc
#endif
func.qc
initiate.qc
vote.qc
subs.qc
fight.qc
ai.qc
combat.qc
items.qc
weapons.qc
world.qc
client.qc
utilities.qc
match.qc
player.qc
monsters.qc
doors.qc
buttons.qc
triggers.qc
plats.qc
misc.qc
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
I'd just have progs1.src without the frikbot stuff and progs2.src with them, and copy one to progs.src before compiling.
Otherwise I think you'd need to put the #ifdef and #endif into each frikbot qc file (at the very top and bottom, respectively)
Otherwise I think you'd need to put the #ifdef and #endif into each frikbot qc file (at the very top and bottom, respectively)
- andrewj
- Posts: 133
- Joined: Mon Aug 30, 2010 3:29 pm
- Location: Australia
progs.src is still just a list, sadly.
unless you want to use 'newstyle' progs.src...
#pragma PROGS_DAT "../progs.dat"
#include "foo.qc"
#ifdef MYDEFINE
#include "mycode.qc"
#endif
#include "bar.qc"
compile with 'fteqcc -DMYDEFINE'
this is basically preqcc syntax as found in CuTF mods is supported, and should be sufficient (the PROGS_SRC pragma is bypassed and thus silently ignored).
fteqcc will interpret progs.src as a qc file if and only if the first actual char of the file is a #. An include, a (progs_dat) pragma, a define, any of those of course have a leading # and will work.
there's a #includelist somewhere too, but I don't remember how to end the list...
unless you want to use 'newstyle' progs.src...
#pragma PROGS_DAT "../progs.dat"
#include "foo.qc"
#ifdef MYDEFINE
#include "mycode.qc"
#endif
#include "bar.qc"
compile with 'fteqcc -DMYDEFINE'
this is basically preqcc syntax as found in CuTF mods is supported, and should be sufficient (the PROGS_SRC pragma is bypassed and thus silently ignored).
fteqcc will interpret progs.src as a qc file if and only if the first actual char of the file is a #. An include, a (progs_dat) pragma, a define, any of those of course have a leading # and will work.
there's a #includelist somewhere too, but I don't remember how to end the list...
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Alrighty! I knew FTEQCC had some fancy Kung-Fu but wasn't sure how exactly it worked.
Thanks!
I may just end up kicking it up old school. Haven't decided, but I like conditional builds, obviously.
Thanks!
I may just end up kicking it up old school. Haven't decided, but I like conditional builds, obviously.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
-

Baker - Posts: 3666
- Joined: Tue Mar 14, 2006 5:15 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest