axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

axmol.cpp: Impriove AX_DLL const char* axmolVersion() for better issue information #1139

Closed aismann closed 1 year ago

aismann commented 1 year ago
AX_DLL const char* axmolVersion()
{
    return "axmol-1.0.0"
}

@halx99 please add a a "hardcoded" PR like this? image

AX_DLL const char* axmolVersion()
{
    return "axmol-1.0.0-<Commit date.time>"
}

example:

image

AX_DLL const char* axmolVersion()
{
    return "axmol-1.0.0-Mar 26, 2023"
}
halx99 commented 1 year ago

Use commit-hash is better

aismann commented 1 year ago

Use commit-hash is better

What aver you mean is better as the current implementation (its not updated)

aismann commented 1 year ago

maybe some of this question can also be get "during runtime"?

- axmol version:
- devices test on:
- developing environments
   - NDK version: r19c
   - Xcode version: 12.4
   - Visual Studio: 
      - VS version: 2019 (16.11), 2022 (17.4)
      - MSVC version: 1929, 1934
      - Windows SDK version: 10.0.22621.0
   - cmake version: 

Steps to Reproduce:

aismann commented 1 year ago

@halx99 its your "cmake" turn?

rh101 commented 1 year ago

@halx99 The changes in https://github.com/axmolengine/axmol/commit/ee2de093a71ead88c2de6f914b4ce517849eb7be are picking up the .git of the game project, and not the .git in the axmol folder. The results in the version.h file contain the git build, branch and commit hashes of the game project.

Is there something I need to set in order to get it working correctly?

Never mind! Found out what was causing the issue. The changes in PR #1149 seem to work.