mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 01:55:25 -04:00
8672f179e9
Gui elements in SceneCanvas are now independant from the zoom factor. Work in progress: NewProjectDialog. git-svn-id: svn://localhost@837 8062f311-0dae-4547-b526-b8ab9ac864a5
100 lines
2.0 KiB
C++
100 lines
2.0 KiB
C++
/**
|
|
* Game Develop
|
|
* Editor
|
|
*
|
|
* Par Florian "4ian" Rival
|
|
*
|
|
*/
|
|
/**
|
|
* Fonction de logging
|
|
*/
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <iostream>
|
|
#include "VersionWrapper.h"
|
|
#include "Log.h"
|
|
|
|
using namespace std;
|
|
|
|
////////////////////////////////////////////////////////////
|
|
/// Initialisation du log
|
|
///
|
|
/// Initialisation du log pour suivre le programme
|
|
////////////////////////////////////////////////////////////
|
|
void InitLog()
|
|
{
|
|
FILE* fichier = NULL;
|
|
|
|
fichier = fopen("log.txt", "w");
|
|
|
|
string nbversion = VersionWrapper::FullString();
|
|
string status = VersionWrapper::Status();
|
|
string version ="Game Develop Editor - "+nbversion+" "+status+"\n";
|
|
|
|
string date = VersionWrapper::Date();
|
|
string month = VersionWrapper::Month();
|
|
string year = VersionWrapper::Year();
|
|
string fulldate = "Version du "+date+"/"+month+"/"+year+"\n";
|
|
|
|
#ifdef LINUX
|
|
string sys = "Systeme cible : Linux\n";
|
|
#endif
|
|
#ifdef WINDOWS
|
|
string sys = "Systeme cible : Windows\n";
|
|
#endif
|
|
|
|
|
|
if (fichier != NULL)
|
|
{
|
|
fputs(version.c_str(), fichier);
|
|
std::string version;
|
|
version = fulldate+"\n-----------------------------------------\n\n\n";
|
|
|
|
fputs(version.c_str(), fichier);
|
|
fputs(sys.c_str(), fichier);
|
|
fclose(fichier);
|
|
}
|
|
|
|
//En plus dans la console
|
|
cout << version << fulldate << sys << endl;
|
|
|
|
return;
|
|
}
|
|
|
|
|
|
////////////////////////////////////////////////////////////
|
|
/// Ecriture
|
|
///
|
|
/// Ecriture dans le log
|
|
////////////////////////////////////////////////////////////
|
|
void EcrireLog(string localisation, string autreinfos)
|
|
{
|
|
FILE* fichier = NULL;
|
|
|
|
fichier = fopen("log.txt", "a");
|
|
|
|
string texte = localisation+" : "+autreinfos+"\n";
|
|
|
|
if (fichier != NULL)
|
|
{
|
|
fputs(texte.c_str(), fichier);
|
|
fclose(fichier);
|
|
}
|
|
|
|
|
|
//En plus dans la console
|
|
cout << texte;
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|