Build Improvements (#5033)
Build / Linux (push) Waiting to run
Build / Windows (push) Waiting to run

* Start rewrite, add vcpkg

* Simple vcpkg manifest, will almost certainly need tweaking

* Remove cmake ext we wont be using anymore

* Update vcpkg to no longer be from 2022, update cmake lists (wip)

* Add finds to the toplevel cmakelists

* WIP, luabind and perlbind build.  Common only partially builds.

* Fix common build.

* shared_memory compiles

* client files compile

* Tests and more cmake version updates

* World, had to swap out zlib-ng for now because it wasn't playing nicely along side the zlib install.  May revisit.

* UCS compiles now too!

* queryserv and eqlaunch

* loginserver works

* Zone works but is messy, tomorrow futher cleanup!

* Cleanup main file

* remove old zlibng, remove perlwrap, remove hc

* More cleanup

* vcpkg baseline set for CI

* Remove pkg-config, it's the suggested way to use luajit with vcpkg but it causes issues with CI and might be a pain point for windows users

* Actually add file

* Set perlbind include dir

* Perl link got lost

* PERL_SET_INTERP causes an issue on newer versions of perl on windows because a symbol is not properly exported in their API, change the lines so it's basically what it used to be

* Remove static unix linking, we dont do automated released anymore and this was tightly coupled to that.  Can explore this again if we decide to change that.

* Remove unused submodules, set cmake policy for boost

* Fix some cereal includes

* Improve some boilerplate, I'd still like to do better about getting linker stuff set.

* Going through and cleaning up the build.

* Fix world, separate out data_buckets.

* add fixes for other servers

* fix zone

* Fix client files, loginserver and tests

* Newer versions of libmariadb default to tls forced on, return to the default of not forcing that.
auto_login were breaking on linux builds
loginserver wasn't setting proper openssl compile flag

* Move set out of a giant cpp file include.

* Convert show

* convert find

* Add uuid to unix builds

* Remove some cpp includes.

* Restructure to remove more things.

* change db update manifest to header
change build yml

* Move world CLI include cpps to cmake.

* Move zone cli out of source and into cmake

* Sidecar stuff wont directly include cpp files now too.

* Fix uuid-dev missing on linux runner

* Reorg common cmake file

* Some cleanup

* Fix libsodium support (oops). Fix perl support (more oops)

* Change doc

---------

Co-authored-by: KimLS <KimLS@peqtgc.com>
This commit is contained in:
Alex
2025-12-13 19:56:37 -08:00
committed by GitHub
parent 9b3f9f356d
commit c84df0d5ba
510 changed files with 1505 additions and 47046 deletions
+268 -72
View File
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
cmake_minimum_required(VERSION 3.20)
SET(zone_sources
set(zone_sources
aa.cpp
aa_ability.cpp
aggro.cpp
@@ -11,21 +11,27 @@ SET(zone_sources
beacon.cpp
bonuses.cpp
bot.cpp
bot_raid.cpp
bot_database.cpp
bot_raid.cpp
botspellsai.cpp
cheat_manager.cpp
cli/cli_benchmark_databuckets.cpp
cli/cli_sidecar_serve_http.cpp
cli/tests/cli_databuckets.cpp
cli/tests/cli_npc_handins.cpp
cli/tests/cli_npc_handins_multiquest.cpp
cli/tests/cli_test_util.cpp
cli/tests/cli_zone_state.cpp
client.cpp
client_evolving_items.cpp
client_bot.cpp
client_evolving_items.cpp
client_mods.cpp
client_packet.cpp
client_process.cpp
combat_record.cpp
corpse.cpp
../common/data_bucket.cpp
doors.cpp
dialogue_window.cpp
doors.cpp
dynamic_zone.cpp
effects.cpp
embparser.cpp
@@ -38,24 +44,12 @@ SET(zone_sources
fastmath.cpp
fearpath.cpp
forage.cpp
groups.cpp
guild.cpp
guild_mgr.cpp
hate_list.cpp
heal_rotation.cpp
horse.cpp
inventory.cpp
loot.cpp
embperl.cpp
entity.cpp
exp.cpp
fearpath.cpp
forage.cpp
global_loot_manager.cpp
groups.cpp
guild.cpp
guild_mgr.cpp
hate_list.cpp
heal_rotation.cpp
horse.cpp
inventory.cpp
loot.cpp
@@ -65,8 +59,8 @@ SET(zone_sources
mob.cpp
mob_ai.cpp
mob_appearance.cpp
mob_movement_manager.cpp
mob_info.cpp
mob_movement_manager.cpp
npc.cpp
npc_scale_manager.cpp
object.cpp
@@ -81,16 +75,15 @@ SET(zone_sources
position.cpp
qglobals.cpp
queryserv.cpp
questmgr.cpp
quest_db.cpp
quest_parser_collection.cpp
questmgr.cpp
raids.cpp
raycast_mesh.cpp
sidecar_api/sidecar_api.cpp
sidecar_api/loot_simulator_controller.cpp
shared_task_zone_messaging.cpp
sidecar_api/loot_simulator_controller.cpp
sidecar_api/sidecar_api.cpp
spawn2.cpp
spawn2.h
spawngroup.cpp
special_attacks.cpp
spell_effects.cpp
@@ -111,17 +104,19 @@ SET(zone_sources
worldserver.cpp
xtargetautohaters.cpp
zone.cpp
zone_config.cpp
zonedb.cpp
zone_base_data.cpp
zone_cli.cpp
zone_config.cpp
zone_event_scheduler.cpp
zone_loot.cpp
zone_npc_factions.cpp
zone_reload.cpp
zone_save_state.cpp
zonedb.cpp
zoning.cpp
)
SET(zone_headers
set(zone_headers
aa.h
aa_ability.h
aggromanager.h
@@ -139,9 +134,8 @@ SET(zone_headers
command.h
common.h
corpse.h
../common/data_bucket.h
doors.h
dialogue_window.h
doors.h
dynamic_zone.h
embparser.h
embperl.h
@@ -157,8 +151,8 @@ SET(zone_headers
hate_list.h
heal_rotation.h
horse.h
lua_bot.h
lua_bit.h
lua_bot.h
lua_buff.h
lua_client.h
lua_corpse.h
@@ -206,17 +200,15 @@ SET(zone_headers
pets.h
position.h
qglobals.h
quest_interface.h
queryserv.h
quest_interface.h
questmgr.h
quest_db.h
quest_interface.h
quest_parser_collection.h
questmgr.h
raids.h
raycast_mesh.h
sidecar_api/sidecar_api.h
shared_task_zone_messaging.h
spawn2.cpp
sidecar_api/sidecar_api.h
spawn2.h
spawngroup.h
string_ids.h
@@ -231,22 +223,21 @@ SET(zone_headers
worldserver.h
xtargetautohaters.h
zone.h
zone_event_scheduler.h
zone_config.h
zonedb.h
zonedump.h
zone_cli.h
zone_config.h
zone_event_scheduler.h
zone_reload.h
zone_save_state.h
zone_cli.cpp)
zonedb.h
zonedump.h
)
# lua unity build
set(lua_sources
lua_bot.cpp
lua_bit.cpp
lua_bot.cpp
lua_buff.cpp
lua_corpse.cpp
lua_client.cpp
lua_corpse.cpp
lua_database.cpp
lua_door.cpp
lua_encounter.cpp
@@ -277,7 +268,6 @@ set(lua_sources
add_library(lua_zone STATIC ${lua_sources})
set_target_properties(lua_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
# perl unity build
set(perl_sources
perl_bot.cpp
perl_buff.cpp
@@ -308,10 +298,71 @@ set(perl_sources
add_library(perl_zone STATIC ${perl_sources})
set_target_properties(perl_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
# gm commands
set(gm_command_sources
command.cpp
bot_command.cpp
bot_commands/bot_actionable.cpp
bot_commands/bot_appearance.cpp
bot_commands/bot_apply_poison.cpp
bot_commands/bot_apply_potion.cpp
bot_commands/bot_attack.cpp
bot_commands/bot_behind_mob.cpp
bot_commands/bot_blocked_buffs.cpp
bot_commands/bot_bot.cpp
bot_commands/bot_bot_settings.cpp
bot_commands/bot_cast.cpp
bot_commands/bot_class_race_list.cpp
bot_commands/bot_click_item.cpp
bot_commands/bot_copy_settings.cpp
bot_commands/bot_default_settings.cpp
bot_commands/bot_depart.cpp
bot_commands/bot_discipline.cpp
bot_commands/bot_distance_ranged.cpp
bot_commands/bot_find_aliases.cpp
bot_commands/bot_follow.cpp
bot_commands/bot_guard.cpp
bot_commands/bot_heal_rotation.cpp
bot_commands/bot_help.cpp
bot_commands/bot_hold.cpp
bot_commands/bot_illusion_block.cpp
bot_commands/bot_inventory.cpp
bot_commands/bot_item_use.cpp
bot_commands/bot_max_melee_range.cpp
bot_commands/bot_name.cpp
bot_commands/bot_owner_option.cpp
bot_commands/bot_pet.cpp
bot_commands/bot_pick_lock.cpp
bot_commands/bot_pickpocket.cpp
bot_commands/bot_precombat.cpp
bot_commands/bot_pull.cpp
bot_commands/bot_release.cpp
bot_commands/bot_set_assistee.cpp
bot_commands/bot_sit_hp_percent.cpp
bot_commands/bot_sit_in_combat.cpp
bot_commands/bot_sit_mana_percent.cpp
bot_commands/bot_spell.cpp
bot_commands/bot_spell_aggro_checks.cpp
bot_commands/bot_spell_announce_cast.cpp
bot_commands/bot_spell_delays.cpp
bot_commands/bot_spell_engaged_priority.cpp
bot_commands/bot_spell_holds.cpp
bot_commands/bot_spell_idle_priority.cpp
bot_commands/bot_spell_max_hp_pct.cpp
bot_commands/bot_spell_max_mana_pct.cpp
bot_commands/bot_spell_max_thresholds.cpp
bot_commands/bot_spell_min_hp_pct.cpp
bot_commands/bot_spell_min_mana_pct.cpp
bot_commands/bot_spell_min_thresholds.cpp
bot_commands/bot_spell_pursue_priority.cpp
bot_commands/bot_spell_resist_limits.cpp
bot_commands/bot_spell_target_count.cpp
bot_commands/bot_spelltypes.cpp
bot_commands/bot_summon.cpp
bot_commands/bot_suspend.cpp
bot_commands/bot_taunt.cpp
bot_commands/bot_timer.cpp
bot_commands/bot_track.cpp
bot_commands/bot_view_combos.cpp
command.cpp
gm_commands/acceptrules.cpp
gm_commands/advnpcspawn.cpp
gm_commands/aggrozone.cpp
@@ -351,11 +402,37 @@ set(gm_command_sources
gm_commands/emptyinventory.cpp
gm_commands/enablerecipe.cpp
gm_commands/entityvariable.cpp
gm_commands/evolving_items.cpp
gm_commands/exptoggle.cpp
gm_commands/faction.cpp
gm_commands/evolving_items.cpp
gm_commands/faction_association.cpp
gm_commands/feature.cpp
gm_commands/find.cpp
gm_commands/find/find_aa.cpp
gm_commands/find/find_account.cpp
gm_commands/find/find_body_type.cpp
gm_commands/find/find_bot.cpp
gm_commands/find/find_bug_category.cpp
gm_commands/find/find_character.cpp
gm_commands/find/find_class.cpp
gm_commands/find/find_comparison_type.cpp
gm_commands/find/find_currency.cpp
gm_commands/find/find_deity.cpp
gm_commands/find/find_emote.cpp
gm_commands/find/find_faction.cpp
gm_commands/find/find_item.cpp
gm_commands/find/find_language.cpp
gm_commands/find/find_ldon_theme.cpp
gm_commands/find/find_npctype.cpp
gm_commands/find/find_object_type.cpp
gm_commands/find/find_race.cpp
gm_commands/find/find_recipe.cpp
gm_commands/find/find_skill.cpp
gm_commands/find/find_special_ability.cpp
gm_commands/find/find_spell.cpp
gm_commands/find/find_stance.cpp
gm_commands/find/find_task.cpp
gm_commands/find/find_zone.cpp
gm_commands/fish.cpp
gm_commands/fixmob.cpp
gm_commands/flagedit.cpp
@@ -380,9 +457,9 @@ set(gm_command_sources
gm_commands/kill.cpp
gm_commands/killallnpcs.cpp
gm_commands/list.cpp
gm_commands/lootsim.cpp
gm_commands/loc.cpp
gm_commands/logs.cpp
gm_commands/lootsim.cpp
gm_commands/makepet.cpp
gm_commands/memspell.cpp
gm_commands/merchantshop.cpp
@@ -434,12 +511,119 @@ set(gm_command_sources
gm_commands/sensetrap.cpp
gm_commands/serverrules.cpp
gm_commands/set.cpp
gm_commands/set/set_aa_exp.cpp
gm_commands/set/set_aa_points.cpp
gm_commands/set/set_adventure_points.cpp
gm_commands/set/set_alternate_currency.cpp
gm_commands/set/set_animation.cpp
gm_commands/set/set_anon.cpp
gm_commands/set/set_auto_login.cpp
gm_commands/set/set_bind_point.cpp
gm_commands/set/set_checksum.cpp
gm_commands/set/set_class_permanent.cpp
gm_commands/set/set_crystals.cpp
gm_commands/set/set_date.cpp
gm_commands/set/set_endurance.cpp
gm_commands/set/set_endurance_full.cpp
gm_commands/set/set_exp.cpp
gm_commands/set/set_flymode.cpp
gm_commands/set/set_frozen.cpp
gm_commands/set/set_gender.cpp
gm_commands/set/set_gender_permanent.cpp
gm_commands/set/set_gm.cpp
gm_commands/set/set_gm_speed.cpp
gm_commands/set/set_gm_status.cpp
gm_commands/set/set_god_mode.cpp
gm_commands/set/set_haste.cpp
gm_commands/set/set_hero_model.cpp
gm_commands/set/set_hide_me.cpp
gm_commands/set/set_hp.cpp
gm_commands/set/set_hp_full.cpp
gm_commands/set/set_invulnerable.cpp
gm_commands/set/set_language.cpp
gm_commands/set/set_last_name.cpp
gm_commands/set/set_level.cpp
gm_commands/set/set_loginserver_info.cpp
gm_commands/set/set_mana.cpp
gm_commands/set/set_mana_full.cpp
gm_commands/set/set_motd.cpp
gm_commands/set/set_name.cpp
gm_commands/set/set_ooc_mute.cpp
gm_commands/set/set_password.cpp
gm_commands/set/set_pvp.cpp
gm_commands/set/set_pvp_points.cpp
gm_commands/set/set_race.cpp
gm_commands/set/set_race_permanent.cpp
gm_commands/set/set_server_locked.cpp
gm_commands/set/set_skill.cpp
gm_commands/set/set_skill_all.cpp
gm_commands/set/set_skill_all_max.cpp
gm_commands/set/set_start_zone.cpp
gm_commands/set/set_temporary_name.cpp
gm_commands/set/set_texture.cpp
gm_commands/set/set_time.cpp
gm_commands/set/set_time_zone.cpp
gm_commands/set/set_title.cpp
gm_commands/set/set_title_suffix.cpp
gm_commands/set/set_weather.cpp
gm_commands/set/set_zone.cpp
gm_commands/show.cpp
gm_commands/show/show_aa_points.cpp
gm_commands/show/show_aas.cpp
gm_commands/show/show_aggro.cpp
gm_commands/show/show_auto_login.cpp
gm_commands/show/show_buffs.cpp
gm_commands/show/show_buried_corpse_count.cpp
gm_commands/show/show_client_version_summary.cpp
gm_commands/show/show_content_flags.cpp
gm_commands/show/show_currencies.cpp
gm_commands/show/show_distance.cpp
gm_commands/show/show_emotes.cpp
gm_commands/show/show_field_of_view.cpp
gm_commands/show/show_flags.cpp
gm_commands/show/show_group_info.cpp
gm_commands/show/show_hatelist.cpp
gm_commands/show/show_inventory.cpp
gm_commands/show/show_ip_lookup.cpp
gm_commands/show/show_keyring.cpp
gm_commands/show/show_line_of_sight.cpp
gm_commands/show/show_network.cpp
gm_commands/show/show_network_stats.cpp
gm_commands/show/show_npc_global_loot.cpp
gm_commands/show/show_npc_stats.cpp
gm_commands/show/show_npc_type.cpp
gm_commands/show/show_peqzone_flags.cpp
gm_commands/show/show_petition.cpp
gm_commands/show/show_petition_info.cpp
gm_commands/show/show_proximity.cpp
gm_commands/show/show_quest_errors.cpp
gm_commands/show/show_quest_globals.cpp
gm_commands/show/show_recipe.cpp
gm_commands/show/show_server_info.cpp
gm_commands/show/show_skills.cpp
gm_commands/show/show_spawn_status.cpp
gm_commands/show/show_special_abilities.cpp
gm_commands/show/show_spells.cpp
gm_commands/show/show_spells_list.cpp
gm_commands/show/show_stats.cpp
gm_commands/show/show_timers.cpp
gm_commands/show/show_traps.cpp
gm_commands/show/show_uptime.cpp
gm_commands/show/show_variable.cpp
gm_commands/show/show_version.cpp
gm_commands/show/show_waypoints.cpp
gm_commands/show/show_who.cpp
gm_commands/show/show_xtargets.cpp
gm_commands/show/show_zone_data.cpp
gm_commands/show/show_zone_global_loot.cpp
gm_commands/show/show_zone_loot.cpp
gm_commands/show/show_zone_points.cpp
gm_commands/show/show_zone_status.cpp
gm_commands/show/show_zone_variables.cpp
gm_commands/shutdown.cpp
gm_commands/spawn.cpp
gm_commands/spawneditmass.cpp
gm_commands/spawnfix.cpp
gm_commands/faction_association.cpp
gm_commands/stun.cpp
gm_commands/summon.cpp
gm_commands/summonburiedplayercorpse.cpp
@@ -463,46 +647,58 @@ set(gm_command_sources
gm_commands/wp.cpp
gm_commands/wpadd.cpp
gm_commands/zone.cpp
gm_commands/zone_instance.cpp
gm_commands/zone_shard.cpp
gm_commands/zonebootup.cpp
gm_commands/zoneshutdown.cpp
gm_commands/zonevariable.cpp
gm_commands/zone_instance.cpp
gm_commands/zone_shard.cpp
gm_commands/zsave.cpp
)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${zone_sources})
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${zone_headers})
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${gm_command_sources})
add_library(gm_commands_zone STATIC ${gm_command_sources})
target_link_libraries(gm_commands_zone PRIVATE common)
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
# zone combine sources and headers
ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers})
add_executable(zone ${zone_sources} ${zone_headers})
# binary output directory
INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
install(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
# precompiled headers
IF (EQEMU_BUILD_PCH)
if(EQEMU_BUILD_PCH)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/app-pch.h)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/std-pch.h)
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ./pch/pch.h)
ENDIF()
ADD_DEFINITIONS(-DZONE)
# link lua_zone unity build against luabind
target_link_libraries(lua_zone PRIVATE luabind)
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)
target_link_libraries(zone PRIVATE ${LUA_LIBRARY})
endif()
# perl unity build links against perl_zone
target_link_libraries(perl_zone PRIVATE perlbind)
if (EQEMU_BUILD_STATIC AND PERL_LIBRARY)
target_link_libraries(zone PRIVATE ${PERL_LIBRARY})
add_definitions(-DZONE)
if(EQEMU_BUILD_LUA)
target_compile_definitions(lua_zone PUBLIC LUA_EQEMU)
target_link_libraries(lua_zone PUBLIC luabind Boost::dynamic_bitset Boost::tuple Boost::foreach common)
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)
target_link_libraries(zone PRIVATE ${LUA_LIBRARY})
endif()
endif()
# link zone against common libraries
target_link_libraries(zone PRIVATE lua_zone perl_zone gm_commands_zone ${ZONE_LIBS})
if(EQEMU_BUILD_PERL)
target_compile_definitions(perl_zone PUBLIC EMBPERL EMBPERL_PLUGIN PERLBIND_NO_STRICT_SCALAR_TYPES)
target_link_libraries(perl_zone PUBLIC perlbind common ${PERL_LIBRARY})
if (EQEMU_BUILD_STATIC AND PERL_LIBRARY)
target_link_libraries(zone PRIVATE ${PERL_LIBRARY})
endif()
endif()
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
target_link_libraries(zone PRIVATE gm_commands_zone common RecastNavigation::Detour)
if(EQEMU_BUILD_LUA)
target_link_libraries(zone PRIVATE lua_zone)
endif()
if(EQEMU_BUILD_PERL)
target_link_libraries(zone PRIVATE perl_zone)
endif()
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)