Difference between revisions of "Main Page"

From Oliver's Wiki
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
delimiter $$
 
CREATE EVENT ev_updatekings ON SCHEDULE EVERY 1 HOUR STARTS CURRENT_TIMESTAMP ON COMPLETION PRESERVE ENABLE DO BEGIN Call UpdateKings(); UPDATE characters set title=NULL; UPDATE characters c JOIN kings k ON k.character_id=c.id SET c.title=k.title_male; END $$
 
delimiter ;
 
 
 
UBUNTU 16.04:
 
UBUNTU 16.04:
  
Line 10: Line 6:
  
 
Place libmysqlclient.so.15 into /usr/lib/ as libmysqlclient.so
 
Place libmysqlclient.so.15 into /usr/lib/ as libmysqlclient.so
 +
Place libcurl.so in the same place
 +
 +
gcc -g -m32 -fpic -c g_ai.c g_chase.c g_cmds.c g_combat.c g_func.c g_items.c g_main.c g_misc.c g_monster.c g_phys.c g_save.c g_spawn.c g_svcmds.c g_target.c g_trigger.c g_turret.c g_utils.c g_weapon.c kots_abilities.c kots_admin.c kots_array.c kots_bfg.c kots_character.c kots_commands.c kots_configstrings.c kots_conpersist.c kots_cvars.c kots_dbthread.c kots_hook.c kots_hud.c kots_items.c kots_linkedlist.c kots_logging.c kots_maplist.c kots_menu.c kots_monster.c kots_motd.c kots_mute.c kots_mysql_helper.c kots_pickups.c kots_player.c kots_power.c kots_pweapon.c kots_resist.c kots_runes.c kots_sabre.c kots_server.c kots_svcmds.c kots_tballs.c kots_update.c kots_utils.c kots_weapon.c kots_weapondamage.c m_actor.c m_berserk.c m_boss2.c m_boss3.c m_boss31.c m_boss32.c m_brain.c m_chick.c m_flash.c m_flipper.c m_float.c m_flyer.c m_gladiator.c m_gunner.c m_hover.c m_infantry.c m_insane.c m_medic.c m_move.c m_mutant.c m_parasite.c m_soldier.c m_supertank.c m_tank.c p_client.c p_hud.c p_menu.c p_trail.c p_view.c p_weapon.c q_shared.c -I ../mysql/include
 +
 +
gcc -Wall -m32 -shared -o gamei386.so g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_svcmds.o g_target.o g_trigger.o g_turret.o g_utils.o g_weapon.o kots_abilities.o kots_admin.o kots_array.o kots_bfg.o kots_character.o kots_commands.o kots_configstrings.o kots_conpersist.o kots_cvars.o kots_dbthread.o kots_hook.o kots_hud.o kots_items.o kots_linkedlist.o kots_logging.o kots_maplist.o kots_menu.o kots_monster.o kots_motd.o kots_mute.o kots_mysql_helper.o kots_pickups.o kots_player.o kots_power.o kots_pweapon.o kots_resist.o kots_runes.o kots_sabre.o kots_server.o kots_svcmds.o kots_tballs.o kots_update.o kots_utils.o kots_weapon.o kots_weapondamage.o m_actor.o m_berserk.o m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o m_tank.o p_client.o p_hud.o p_menu.o p_trail.o p_view.o p_weapon.o q_shared.o -L../mysql/lib/opt -L../curl/lib -L../pthreads -lm -lmysqlclient -lcurl
 +
 +
Makefile:
 +
 +
IDIR =../mysql/include
 +
 +
CC=gcc
 +
 +
CFLAGS=-I$(IDIR) -Wall -m32 -shared -g -fpic
 +
 +
 +
ODIR=./
 +
 +
LDIR=-L../mysql/lib/opt -L../curl/lib -L../pthreads
 +
 +
LIBS=-lm -lmysqlclient -lcurl
 +
 +
 +
_DEPS = kots_abilities.h kots_admin.h kots_array.h kots_bfg.h kots_character.h kots_commands.h kots_configstrings.h kots_conpersist.h kots_cvars.h kots_dbthread.h kots_hook.h kots_hud.h kots_items.h kots_linkedlist.h kots_logging.h kots_maplist.h kots_menu.h kots_monster.h kots_motd.h kots_mute.h kots_mysql_helper.h kots_pickups.h kots_player.h kots_power.h kots_pweapon.h kots_resist.h kots_runes.h kots_sabre.h kots_server.h kots_svcmds.h kots_tballs.h kots_update.h kots_utils.h kots_weapon.h kots_weapondamage.h m_actor.h m_berserk.h m_boss2.h m_boss3.h m_boss31.h m_boss32.h m_brain.h m_chick.h m_flash.h m_flipper.h m_float.h m_flyer.h m_gladiator.h m_gunner.h m_hover.h m_infantry.h m_insane.h m_medic.h m_move.h m_mutant.h m_parasite.h m_player.h m_rider.h m_soldier.h m_supertank.h m_tank.o q_shared.o
 +
 +
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
 +
 +
 +
_OBJ = g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_svcmds.o g_target.o g_trigger.o g_turret.o g_utils.o g_weapon.o kots_abilities.o kots_admin.o kots_array.o kots_bfg.o kots_character.o kots_commands.o kots_configstrings.o kots_conpersist.o kots_cvars.o kots_dbthread.o kots_hook.o kots_hud.o kots_items.o kots_linkedlist.o kots_logging.o kots_maplist.o kots_menu.o kots_monster.o kots_motd.o kots_mute.o kots_mysql_helper.o kots_pickups.o kots_player.o kots_power.o kots_pweapon.o kots_resist.o kots_runes.o kots_sabre.o kots_server.o kots_svcmds.o kots_tballs.o kots_update.o kots_utils.o kots_weapon.o kots_weapondamage.o m_actor.o m_berserk.o m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o m_tank.o p_client.o p_hud.o p_menu.o p_trail.o p_view.o p_weapon.o q_shared.o
 +
 +
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
 +
 +
 +
$(ODIR)/%.o: %.c $(DEPS)
 +
 +
:$(CC) -c -o $@ $< $(CFLAGS)
 +
 +
gamei386.so: $(OBJ)
 +
 +
:$(CC) -o $@ $^ $(CFLAGS) $(LIBS) $(LDIR)
 +
 +
 +
.PHONY: clean
 +
  
gcc -g -mtune=i386 -fpic -c g_ai.c g_chase.c g_cmds.c g_combat.c g_func.c g_items.c g_main.c g_misc.c g_monster.c g_phys.c g_save.c g_spawn.c g_svcmds.c g_target.c g_trigger.c g_turret.c g_utils.c g_weapon.c kots_abilities.c kots_admin.c kots_array.c kots_bfg.c kots_character.c kots_commands.c kots_configstrings.c kots_conpersist.c kots_cvars.c kots_dbthread.c kots_hook.c kots_hud.c kots_items.c kots_linkedlist.c kots_logging.c kots_maplist.c kots_menu.c kots_monster.c kots_motd.c kots_mute.c kots_mysql_helper.c kots_pickups.c kots_player.c kots_power.c kots_pweapon.c kots_resist.c kots_runes.c kots_sabre.c kots_server.c kots_svcmds.c kots_tballs.c kots_update.c kots_utils.c kots_weapon.c kots_weapondamage.c m_actor.c m_berserk.c m_boss2.c m_boss3.c m_boss31.c m_boss32.c m_brain.c m_chick.c m_flash.c m_flipper.c m_float.c m_flyer.c m_gladiator.c m_gunner.c m_hover.c m_infantry.c m_insane.c m_medic.c m_move.c m_mutant.c m_parasite.c m_soldier.c m_supertank.c m_tank.c p_client.c p_hud.c p_menu.c p_trail.c p_view.c p_weapon.c q_shared.c -I ../mysql/include
+
clean:
  
gcc -Wall -mtune=i386 -shared -o gamei386.so g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_svcmds.o g_target.o g_trigger.o g_turret.o g_utils.o g_weapon.o kots_abilities.o kots_admin.o kots_array.o kots_bfg.o kots_character.o kots_commands.o kots_configstrings.o kots_conpersist.o kots_cvars.o kots_dbthread.o kots_hook.o kots_hud.o kots_items.o kots_linkedlist.o kots_logging.o kots_maplist.o kots_menu.o kots_monster.o kots_motd.o kots_mute.o kots_mysql_helper.o kots_pickups.o kots_player.o kots_power.o kots_pweapon.o kots_resist.o kots_runes.o kots_sabre.o kots_server.o kots_svcmds.o kots_tballs.o kots_update.o kots_utils.o kots_weapon.o kots_weapondamage.o m_actor.o m_berserk.o m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o m_tank.o p_client.o p_hud.o p_menu.o p_trail.o p_view.o p_weapon.o q_shared.o -L../mysql/lib/opt -L../curl/lib -L../pthreads -lm -lmysqlclient -lcurl
+
:rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~
 +
 
 +
 
 +
 
 +
 
 +
Set up MYSQL database:
 +
 
 +
delimiter $$
 +
CREATE EVENT ev_updatekings ON SCHEDULE EVERY 1 HOUR STARTS CURRENT_TIMESTAMP ON COMPLETION PRESERVE ENABLE DO BEGIN Call UpdateKings(); UPDATE characters set title=NULL; UPDATE characters c JOIN kings k ON k.character_id=c.id SET c.title=k.title_male; END $$
 +
delimiter ;

Latest revision as of 12:54, 26 May 2021

UBUNTU 16.04:

sudo apt-get install libc6-dev-i386

Compile the curl directory (configure, make, make install)

Place libmysqlclient.so.15 into /usr/lib/ as libmysqlclient.so Place libcurl.so in the same place

gcc -g -m32 -fpic -c g_ai.c g_chase.c g_cmds.c g_combat.c g_func.c g_items.c g_main.c g_misc.c g_monster.c g_phys.c g_save.c g_spawn.c g_svcmds.c g_target.c g_trigger.c g_turret.c g_utils.c g_weapon.c kots_abilities.c kots_admin.c kots_array.c kots_bfg.c kots_character.c kots_commands.c kots_configstrings.c kots_conpersist.c kots_cvars.c kots_dbthread.c kots_hook.c kots_hud.c kots_items.c kots_linkedlist.c kots_logging.c kots_maplist.c kots_menu.c kots_monster.c kots_motd.c kots_mute.c kots_mysql_helper.c kots_pickups.c kots_player.c kots_power.c kots_pweapon.c kots_resist.c kots_runes.c kots_sabre.c kots_server.c kots_svcmds.c kots_tballs.c kots_update.c kots_utils.c kots_weapon.c kots_weapondamage.c m_actor.c m_berserk.c m_boss2.c m_boss3.c m_boss31.c m_boss32.c m_brain.c m_chick.c m_flash.c m_flipper.c m_float.c m_flyer.c m_gladiator.c m_gunner.c m_hover.c m_infantry.c m_insane.c m_medic.c m_move.c m_mutant.c m_parasite.c m_soldier.c m_supertank.c m_tank.c p_client.c p_hud.c p_menu.c p_trail.c p_view.c p_weapon.c q_shared.c -I ../mysql/include

gcc -Wall -m32 -shared -o gamei386.so g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_svcmds.o g_target.o g_trigger.o g_turret.o g_utils.o g_weapon.o kots_abilities.o kots_admin.o kots_array.o kots_bfg.o kots_character.o kots_commands.o kots_configstrings.o kots_conpersist.o kots_cvars.o kots_dbthread.o kots_hook.o kots_hud.o kots_items.o kots_linkedlist.o kots_logging.o kots_maplist.o kots_menu.o kots_monster.o kots_motd.o kots_mute.o kots_mysql_helper.o kots_pickups.o kots_player.o kots_power.o kots_pweapon.o kots_resist.o kots_runes.o kots_sabre.o kots_server.o kots_svcmds.o kots_tballs.o kots_update.o kots_utils.o kots_weapon.o kots_weapondamage.o m_actor.o m_berserk.o m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o m_tank.o p_client.o p_hud.o p_menu.o p_trail.o p_view.o p_weapon.o q_shared.o -L../mysql/lib/opt -L../curl/lib -L../pthreads -lm -lmysqlclient -lcurl

Makefile:

IDIR =../mysql/include

CC=gcc

CFLAGS=-I$(IDIR) -Wall -m32 -shared -g -fpic


ODIR=./

LDIR=-L../mysql/lib/opt -L../curl/lib -L../pthreads

LIBS=-lm -lmysqlclient -lcurl


_DEPS = kots_abilities.h kots_admin.h kots_array.h kots_bfg.h kots_character.h kots_commands.h kots_configstrings.h kots_conpersist.h kots_cvars.h kots_dbthread.h kots_hook.h kots_hud.h kots_items.h kots_linkedlist.h kots_logging.h kots_maplist.h kots_menu.h kots_monster.h kots_motd.h kots_mute.h kots_mysql_helper.h kots_pickups.h kots_player.h kots_power.h kots_pweapon.h kots_resist.h kots_runes.h kots_sabre.h kots_server.h kots_svcmds.h kots_tballs.h kots_update.h kots_utils.h kots_weapon.h kots_weapondamage.h m_actor.h m_berserk.h m_boss2.h m_boss3.h m_boss31.h m_boss32.h m_brain.h m_chick.h m_flash.h m_flipper.h m_float.h m_flyer.h m_gladiator.h m_gunner.h m_hover.h m_infantry.h m_insane.h m_medic.h m_move.h m_mutant.h m_parasite.h m_player.h m_rider.h m_soldier.h m_supertank.h m_tank.o q_shared.o

DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))


_OBJ = g_ai.o g_chase.o g_cmds.o g_combat.o g_func.o g_items.o g_main.o g_misc.o g_monster.o g_phys.o g_save.o g_spawn.o g_svcmds.o g_target.o g_trigger.o g_turret.o g_utils.o g_weapon.o kots_abilities.o kots_admin.o kots_array.o kots_bfg.o kots_character.o kots_commands.o kots_configstrings.o kots_conpersist.o kots_cvars.o kots_dbthread.o kots_hook.o kots_hud.o kots_items.o kots_linkedlist.o kots_logging.o kots_maplist.o kots_menu.o kots_monster.o kots_motd.o kots_mute.o kots_mysql_helper.o kots_pickups.o kots_player.o kots_power.o kots_pweapon.o kots_resist.o kots_runes.o kots_sabre.o kots_server.o kots_svcmds.o kots_tballs.o kots_update.o kots_utils.o kots_weapon.o kots_weapondamage.o m_actor.o m_berserk.o m_boss2.o m_boss3.o m_boss31.o m_boss32.o m_brain.o m_chick.o m_flash.o m_flipper.o m_float.o m_flyer.o m_gladiator.o m_gunner.o m_hover.o m_infantry.o m_insane.o m_medic.o m_move.o m_mutant.o m_parasite.o m_soldier.o m_supertank.o m_tank.o p_client.o p_hud.o p_menu.o p_trail.o p_view.o p_weapon.o q_shared.o

OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))


$(ODIR)/%.o: %.c $(DEPS)

$(CC) -c -o $@ $< $(CFLAGS)

gamei386.so: $(OBJ)

$(CC) -o $@ $^ $(CFLAGS) $(LIBS) $(LDIR)


.PHONY: clean


clean:

rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~



Set up MYSQL database:

delimiter $$ CREATE EVENT ev_updatekings ON SCHEDULE EVERY 1 HOUR STARTS CURRENT_TIMESTAMP ON COMPLETION PRESERVE ENABLE DO BEGIN Call UpdateKings(); UPDATE characters set title=NULL; UPDATE characters c JOIN kings k ON k.character_id=c.id SET c.title=k.title_male; END $$ delimiter ;