Skip to content

Conversation

@chuengjoanna
Copy link

@chuengjoanna chuengjoanna commented Aug 30, 2025

Description

This PR adds comprehensive macOS compatibility fixes and improves the installation process for EVEmu Crucible server. It addresses compilation issues, enhances code quality, and provides better documentation for macOS environments.

Changes

  • Added macOS-specific compatibility for mathematical functions using __APPLE__ macro
  • Fixed variadic function safety issues with proper std::string handling
  • Resolved compilation warnings and errors across multiple files
  • Enhanced CMake configuration with macOS-specific package paths
  • Added comprehensive troubleshooting guide for database setup

Problems Solved

  • Fixed compilation errors on macOS platforms
  • Resolved variadic function safety issues with std::string parameters
  • Addressed integer type conversion warnings
  • Eliminated XML parser warnings for unknown elements
  • Improved cross-platform compatibility

Test Details

Successfully tested on macOS Sonoma. The database migration completed successfully and all tables were created correctly. The server builds and runs without errors using the provided CMake configuration.

Code Implementation Template

Variables:

  • mType: Enumeration representing the number type (evil_number_nan, evil_number_int, etc.)
  • fVal: Floating-point value to check for infinity

Method Body:

bool EvilNumber::isInf()
{
    if (mType == evil_number_nan)
        return true;
    if (mType == evil_number_int)
        return false;
#ifdef __APPLE__
    return isinf(fVal);
#else
    return std::isinf(fVal);
#endif
}

## Successful build commands on macOS Sonoma
cmake .. -DAUTO_DOWNLOAD_DEPENDENCIES=OFF \
         -DBOOST_ROOT=/usr/local/opt/boost \
         -DBOOST_INCLUDEDIR=/usr/local/opt/boost/include \
         -DBOOST_LIBRARYDIR=/usr/local/opt/boost/lib \
         -DUTF8CPP_INCLUDE_DIRS=/usr/local/opt/utfcpp/include \
         -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON \
         -DCMAKE_CXX_FLAGS="-Wno-deprecated-builtins -Wno-extra-qualification -Wno-defaulted-function-deleted -Wno-tautological-undefined-compare -Wno-macro-redefined"
make

## Successful server startup
cp ./src/eve-server/eve-server ../evemud/
cd evemu_Crucible-master/evemud
cp ../build/dist/etc/eve-server.xml .
cp ../build/dist/etc/log.ini .
eve-server -c ../etc/eve-server.xml --log-level=debug
Verification: The server builds successfully and starts without errors on macOS Sonoma. Database migration completes successfully with all tables created correctly.

## Related Issues
None - These are proactive improvements and fixes for macOS compatibility.

!important! This PR ensures EVEmu Crucible can be built and run seamlessly on macOS systems while maintaining compatibility with other platforms.

@sourcery-ai
Copy link

sourcery-ai bot commented Aug 30, 2025

🧙 Sourcery is reviewing your pull request!


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chuengjoanna
Copy link
Author

This solution has been thoroughly tested on macOS Sonoma. The database migration process completed without errors, and all required database tables were created successfully.

@chuengjoanna chuengjoanna changed the title macos sonoma宏定义兼容,修复数据库迁移问题和添加配置指南 EVEmu Crucible macOS Compatibility and Code Fixes rev0.1 Aug 30, 2025
@Almamu Almamu self-requested a review October 29, 2025 22:32
@Almamu Almamu self-assigned this Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants