Skip to content

Commit

Permalink
feat: add installation of game directory and improve DMG packaging fo…
Browse files Browse the repository at this point in the history
…r macOS
  • Loading branch information
MasterLaplace committed Nov 28, 2024
1 parent 98aac25 commit 4fbaf40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ install(FILES ${CMAKE_BINARY_DIR}/config.h DESTINATION include/Flakkari)
install(FILES ${HEADER_LIB_LOGGER} DESTINATION include/Flakkari/Logger)
install(FILES ${HEADER_LIB_NETWORK} DESTINATION include/Flakkari/Network)
install(FILES ${HEADER_LIB_PROTOCOL} DESTINATION include/Flakkari/Protocol)
install(DIRECTORY ${FLAKKARI_GAME_DIR} DESTINATION ${CMAKE_INSTALL_PREFIX})

# Packaging:
set(CPACK_PACKAGE_NAME "flakkari")
Expand Down Expand Up @@ -226,16 +227,11 @@ if (WIN32)
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/docs/Images/icon.ico")
set(CPACK_NSIS_EXECUTABLES_DIRECTORY "bin")
set(CPACK_PACKAGE_FILE_NAME "flakkari-win64")
set(CPACK_NSIS_CREATE_ICONS_EXTRA "CreateShortCut '$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Flakkari.lnk' '$INSTDIR\\\\bin\\\\flakkari.exe'")
elseif (APPLE)
set(CPACK_GENERATOR "DragNDrop")
set(CPACK_DMG_FORMAT "UDBZ")
set(CPACK_DMG_DS_STORE "${CMAKE_SOURCE_DIR}/.DS_Store")
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/background.png")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_SOURCE_DIR}/DS_Store.sh")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_PERMISSIONS "0775")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_EXECUTABLE ON)
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_NAME "DS_Store.sh")
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT_DESTINATION ".background")
set(CPACK_DMG_DS_STORE "")
set(CPACK_PACKAGE_FILE_NAME "flakkari-macos")
else()
set(CPACK_GENERATOR "DEB;RPM")
Expand Down
2 changes: 1 addition & 1 deletion Flakkari/Engine/EntityComponentSystem/Systems/Systems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ bool spawn_enemy(Registry &r, std::string &templateName, Entity &entity)
if (duration.count() <= timer->maxTime * 1000)
return false;

std::cout << "Time since last spawn: " << duration.count() << std::endl;
std::cout << "Time since last spawn: " << duration.count() << " ms" << std::endl;

timer->lastTime = now;
if (count_entities(r, "Enemy") >= 10)
Expand Down
7 changes: 2 additions & 5 deletions Flakkari/Server/Game/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ Game::~Game()

void Game::loadSystems(Engine::ECS::Registry &registry, const std::string &sceneName, const std::string &sysName)
{
if (sysName == "position")
registry.add_system([this](Engine::ECS::Registry &r) { Engine::ECS::Systems::_2D::position(r, _deltaTime); });

else if (sysName == "apply_movable")
if (sysName == "apply_movable")
registry.add_system(
[this](Engine::ECS::Registry &r) { Engine::ECS::Systems::_3D::apply_movable(r, _deltaTime); });

if (sysName == "spawn_enemy")
else if (sysName == "spawn_enemy")
registry.add_system([this, sceneName](Engine::ECS::Registry &r) {
std::string templateName;
Engine::ECS::Entity entity;
Expand Down

0 comments on commit 4fbaf40

Please sign in to comment.