mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 10:05:37 -04:00
588961da2e
Adapted to changes in GDL. git-svn-id: svn://localhost@711 8062f311-0dae-4547-b526-b8ab9ac864a5
41 lines
1.4 KiB
C++
41 lines
1.4 KiB
C++
#include "CompilationChecker.h"
|
|
#include "GDL/Version.h"
|
|
#include "GDL/VersionWrapper.h"
|
|
#include "GDL/CommonTools.h"
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
bool CompilationChecker::EnsureCorrectGDLVersion()
|
|
{
|
|
std::string versionString = ToString(GDLVersionWrapper::Major()) + ", " + ToString(GDLVersionWrapper::Minor()) + ", " +
|
|
ToString(GDLVersionWrapper::Build()) + ", " + ToString(GDLVersionWrapper::Revision());
|
|
|
|
if (versionString != RC_FILEVERSION_STRING)
|
|
{
|
|
char beep = 7;
|
|
std::cout << std::endl;
|
|
std::cout << "-- WARNING ! --" << beep << std::endl;
|
|
std::cout << "Compiled with a different version of GDL." << std::endl;
|
|
std::cout << "GDL DLL Version :" << versionString << std::endl;
|
|
std::cout << "Compiled with version :" << RC_FILEVERSION_STRING << std::endl;
|
|
std::cout << "---------------" << std::endl;
|
|
|
|
return false;
|
|
}
|
|
|
|
if ( GDLVersionWrapper::CompiledForEdittime() )
|
|
{
|
|
char beep = 7;
|
|
std::cout << std::endl;
|
|
std::cout << "-- ERROR ! --" << beep << std::endl;
|
|
std::cout << "GDL build mismatch:" << std::endl;
|
|
std::cout << "Executable is using an edittime version of GDL!" << std::endl;
|
|
std::cout << "---------------" << std::endl;
|
|
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|