fix some compile errors with last commit, remove snapshot version info from HUD and add to intro text instead, add tpt.version.snapshot
This commit is contained in:
parent
908f60d47a
commit
cae8c9e095
@ -29,6 +29,9 @@ static const char *introTextData =
|
|||||||
#endif
|
#endif
|
||||||
"\n"
|
"\n"
|
||||||
"\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT_PLATFORM " "
|
"\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT_PLATFORM " "
|
||||||
|
#ifdef SNAPSHOT
|
||||||
|
"SNAPSHOT " MTOS(SNAPSHOT_ID) " "
|
||||||
|
#endif
|
||||||
#ifdef X86
|
#ifdef X86
|
||||||
"X86 "
|
"X86 "
|
||||||
#endif
|
#endif
|
||||||
|
@ -816,11 +816,11 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
|||||||
json::Number stableMinor = stableVersion["Minor"];
|
json::Number stableMinor = stableVersion["Minor"];
|
||||||
json::Number stableBuild = stableVersion["Build"];
|
json::Number stableBuild = stableVersion["Build"];
|
||||||
json::String stableFile = stableVersion["File"];
|
json::String stableFile = stableVersion["File"];
|
||||||
json::String changelog = stableVersion["Changelog"];
|
json::String stableChangelog = stableVersion["Changelog"];
|
||||||
if (stableMajor.Value()>SAVE_VERSION || (stableMinor.Value()>MINOR_VERSION && stableMajor.Value()==SAVE_VERSION) || stableBuild.Value()>BUILD_NUM)
|
if (stableMajor.Value()>SAVE_VERSION || (stableMinor.Value()>MINOR_VERSION && stableMajor.Value()==SAVE_VERSION) || stableBuild.Value()>BUILD_NUM)
|
||||||
{
|
{
|
||||||
updateAvailable = true;
|
updateAvailable = true;
|
||||||
updateInfo = UpdateInfo(stableMajor.Value(), stableMinor.Value(), stableBuild.Value(), stableFile.Value(), changelog.Value(), UpdateInfo::Stable);
|
updateInfo = UpdateInfo(stableMajor.Value(), stableMinor.Value(), stableBuild.Value(), stableFile.Value(), stableChangelog.Value(), UpdateInfo::Stable);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -830,11 +830,11 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
|||||||
json::Number betaMinor = betaVersion["Minor"];
|
json::Number betaMinor = betaVersion["Minor"];
|
||||||
json::Number betaBuild = betaVersion["Build"];
|
json::Number betaBuild = betaVersion["Build"];
|
||||||
json::String betaFile = betaVersion["File"];
|
json::String betaFile = betaVersion["File"];
|
||||||
json::String changelog = stableVersion["Changelog"];
|
json::String betaChangelog = betaVersion["Changelog"];
|
||||||
if (betaMajor.Value()>SAVE_VERSION || (betaMinor.Value()>MINOR_VERSION && betaMajor.Value()==SAVE_VERSION) || betaBuild.Value()>BUILD_NUM)
|
if (betaMajor.Value()>SAVE_VERSION || (betaMinor.Value()>MINOR_VERSION && betaMajor.Value()==SAVE_VERSION) || betaBuild.Value()>BUILD_NUM)
|
||||||
{
|
{
|
||||||
updateAvailable = true;
|
updateAvailable = true;
|
||||||
updateInfo = UpdateInfo(betaMajor.Value(), betaMinor.Value(), betaBuild.Value(), betaFile.Value(), changelog.Value(), UpdateInfo::Beta);
|
updateInfo = UpdateInfo(betaMajor.Value(), betaMinor.Value(), betaBuild.Value(), betaFile.Value(), betaChangelog.Value(), UpdateInfo::Beta);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -842,11 +842,11 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession)
|
|||||||
json::Object snapshotVersion = versions["Snapshot"];
|
json::Object snapshotVersion = versions["Snapshot"];
|
||||||
json::Number snapshotSnapshot = snapshotVersion["Snapshot"];
|
json::Number snapshotSnapshot = snapshotVersion["Snapshot"];
|
||||||
json::String snapshotFile = snapshotVersion["File"];
|
json::String snapshotFile = snapshotVersion["File"];
|
||||||
json::String changelog = stableVersion["Changelog"];
|
json::String snapshotChangelog = snapshotVersion["Changelog"];
|
||||||
if (snapshotSnapshot.Value() > SNAPSHOT_ID)
|
if (snapshotSnapshot.Value() > SNAPSHOT_ID)
|
||||||
{
|
{
|
||||||
updateAvailable = true;
|
updateAvailable = true;
|
||||||
updateInfo = UpdateInfo(snapshotSnapshot.Value(), snapshotFile.Value(), changelog.Value(), UpdateInfo::Snapshot);
|
updateInfo = UpdateInfo(snapshotSnapshot.Value(), snapshotFile.Value(), snapshotChangelog.Value(), UpdateInfo::Snapshot);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1535,10 +1535,10 @@ void GameController::NotifyUpdateAvailable(Client * sender)
|
|||||||
std::stringstream updateMessage;
|
std::stringstream updateMessage;
|
||||||
updateMessage << "Are you sure you want to run the updater? Please save any changes before updating.\n\nCurrent version:\n ";
|
updateMessage << "Are you sure you want to run the updater? Please save any changes before updating.\n\nCurrent version:\n ";
|
||||||
|
|
||||||
#ifdef BETA
|
#ifdef SNAPSHOT
|
||||||
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Beta, Build " << BUILD_NUM;
|
|
||||||
#elif defined(SNAPSHOT)
|
|
||||||
updateMessage << "Snapshot " << SNAPSHOT_ID;
|
updateMessage << "Snapshot " << SNAPSHOT_ID;
|
||||||
|
#elif defined(BETA)
|
||||||
|
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Beta, Build " << BUILD_NUM;
|
||||||
#else
|
#else
|
||||||
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Stable, Build " << BUILD_NUM;
|
updateMessage << SAVE_VERSION << "." << MINOR_VERSION << " Stable, Build " << BUILD_NUM;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2358,11 +2358,6 @@ void GameView::OnDraw()
|
|||||||
//FPS and some version info
|
//FPS and some version info
|
||||||
std::stringstream fpsInfo;
|
std::stringstream fpsInfo;
|
||||||
fpsInfo.precision(2);
|
fpsInfo.precision(2);
|
||||||
#ifdef SNAPSHOT
|
|
||||||
fpsInfo << "Snapshot " << SNAPSHOT_ID << ", ";
|
|
||||||
#elif defined(BETA)
|
|
||||||
fpsInfo << "Beta " << SAVE_VERSION << "." << MINOR_VERSION << "." << BUILD_NUM << ", ";
|
|
||||||
#endif
|
|
||||||
fpsInfo << "FPS: " << std::fixed << ui::Engine::Ref().GetFps();
|
fpsInfo << "FPS: " << std::fixed << ui::Engine::Ref().GetFps();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fpsInfo << " Delta: " << std::fixed << ui::Engine::Ref().GetDelta();
|
fpsInfo << " Delta: " << std::fixed << ui::Engine::Ref().GetDelta();
|
||||||
|
@ -236,6 +236,12 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
|
|||||||
lua_setfield(l, tptPropertiesVersion, "minor");
|
lua_setfield(l, tptPropertiesVersion, "minor");
|
||||||
lua_pushinteger(l, BUILD_NUM);
|
lua_pushinteger(l, BUILD_NUM);
|
||||||
lua_setfield(l, tptPropertiesVersion, "build");
|
lua_setfield(l, tptPropertiesVersion, "build");
|
||||||
|
#ifdef SNAPSHOT
|
||||||
|
lua_pushinteger(l, SNAPSHOT_ID);
|
||||||
|
#else
|
||||||
|
lua_pushinteger(l, 0);
|
||||||
|
#endif
|
||||||
|
lua_setfield(l, tptPropertiesVersion, "snapshot");
|
||||||
lua_setfield(l, tptProperties, "version");
|
lua_setfield(l, tptProperties, "version");
|
||||||
|
|
||||||
lua_sethook(l, &luacon_hook, LUA_MASKCOUNT, 200);
|
lua_sethook(l, &luacon_hook, LUA_MASKCOUNT, 200);
|
||||||
|
Reference in New Issue
Block a user