[DEV] add date library that will be the only one eleement to rebuild in case of date change (will be rebuild every second , like this we did not have to rebuild all the library that will have the build time
This commit is contained in:
parent
b35988ef89
commit
bcd42f4fc6
2
build
2
build
@ -1 +1 @@
|
|||||||
Subproject commit d6995577112942253beab5e122bb9c9795001c42
|
Subproject commit e1759a133e1a196e2e4f4051f6b8d0d5d84cd672
|
41
external/date/date/date.cpp
vendored
Normal file
41
external/date/date/date.cpp
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
/**
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
*
|
||||||
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* @license BSD v3 (see license file)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <date/date.h>
|
||||||
|
|
||||||
|
int32_t date::GetYear(void)
|
||||||
|
{
|
||||||
|
return BUILD_YEAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t date::GetMonth(void)
|
||||||
|
{
|
||||||
|
return BUILD_MONTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t date::GetDay(void)
|
||||||
|
{
|
||||||
|
return BUILD_DAY;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t date::GetHour(void)
|
||||||
|
{
|
||||||
|
return BUILD_HOUR;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t date::GetMinute(void)
|
||||||
|
{
|
||||||
|
return BUILD_MINUTE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t date::GetSecond(void)
|
||||||
|
{
|
||||||
|
return BUILD_SECOND;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
25
external/date/date/date.h
vendored
Normal file
25
external/date/date/date.h
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/**
|
||||||
|
* @author Edouard DUPIN
|
||||||
|
*
|
||||||
|
* @copyright 2011, Edouard DUPIN, all right reserved
|
||||||
|
*
|
||||||
|
* @license BSD v3 (see license file)
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __DATE_H__
|
||||||
|
#define __DATE_H__
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
namespace date
|
||||||
|
{
|
||||||
|
int32_t GetYear(void);
|
||||||
|
int32_t GetMonth(void);
|
||||||
|
int32_t GetDay(void);
|
||||||
|
int32_t GetHour(void);
|
||||||
|
int32_t GetMinute(void);
|
||||||
|
int32_t GetSecond(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
32
external/date/lutin_date.py
vendored
Normal file
32
external/date/lutin_date.py
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
import lutinModule
|
||||||
|
import lutinTools
|
||||||
|
import datetime
|
||||||
|
|
||||||
|
def Create(target):
|
||||||
|
# module name is 'edn' and type binary.
|
||||||
|
myModule = lutinModule.module(__file__, 'date', 'LIBRARY')
|
||||||
|
# add the file to compile:
|
||||||
|
|
||||||
|
|
||||||
|
myModule.AddSrcFile([
|
||||||
|
'date/date.cpp'])
|
||||||
|
|
||||||
|
now = datetime.datetime.now()
|
||||||
|
|
||||||
|
myModule.CompileFlags_CC([
|
||||||
|
'-Wno-write-strings',
|
||||||
|
'-Wall',
|
||||||
|
"-DBUILD_DAY=\""+str(now.day)+"\"",
|
||||||
|
"-DBUILD_MONTH=\""+str(now.month)+"\"",
|
||||||
|
"-DBUILD_YEAR=\""+str(now.year)+"\"",
|
||||||
|
"-DBUILD_HOUR=\""+str(now.hour)+"\"",
|
||||||
|
"-DBUILD_MINUTE=\""+str(now.minute)+"\"",
|
||||||
|
"-DBUILD_SECOND=\""+str(now.second)+"\""])
|
||||||
|
|
||||||
|
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__))
|
||||||
|
|
||||||
|
# add the currrent module at the
|
||||||
|
return myModule
|
||||||
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
|||||||
#include <ewol/commandLine.h>
|
#include <ewol/commandLine.h>
|
||||||
#include <etk/os/FSNode.h>
|
#include <etk/os/FSNode.h>
|
||||||
#include <ewol/Dimension.h>
|
#include <ewol/Dimension.h>
|
||||||
|
#include <date/date.h>
|
||||||
#undef __class__
|
#undef __class__
|
||||||
#define __class__ "ewol"
|
#define __class__ "ewol"
|
||||||
|
|
||||||
@ -126,7 +127,13 @@ void ewol::SetTitle(etk::UString title)
|
|||||||
|
|
||||||
etk::UString ewol::GetVersion(void)
|
etk::UString ewol::GetVersion(void)
|
||||||
{
|
{
|
||||||
return EWOL_VERSION_TAG_NAME;
|
#define FIRST_YEAR (2011)
|
||||||
|
etk::UString tmpOutput = (date::GetYear()-FIRST_YEAR);
|
||||||
|
tmpOutput += ".";
|
||||||
|
tmpOutput += date::GetMonth();
|
||||||
|
tmpOutput += ".";
|
||||||
|
tmpOutput += date::GetDay();
|
||||||
|
return tmpOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t ewol::GetTime(void)
|
int64_t ewol::GetTime(void)
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include <ewol/widget/WidgetManager.h>
|
#include <ewol/widget/WidgetManager.h>
|
||||||
|
|
||||||
|
#include <date/date.h>
|
||||||
|
|
||||||
static bool requestEndProcessing = false;
|
static bool requestEndProcessing = false;
|
||||||
static bool isGlobalSystemInit = false;
|
static bool isGlobalSystemInit = false;
|
||||||
@ -268,8 +269,9 @@ void eSystem::Init(void)
|
|||||||
if (false == isGlobalSystemInit) {
|
if (false == isGlobalSystemInit) {
|
||||||
l_msgSystem.Clean();
|
l_msgSystem.Clean();
|
||||||
requestEndProcessing = false;
|
requestEndProcessing = false;
|
||||||
EWOL_INFO("v" EWOL_VERSION_TAG_NAME);
|
|
||||||
EWOL_INFO("Build Date: " BUILD_TIME);
|
EWOL_INFO("v:" << ewol::GetVersion());
|
||||||
|
EWOL_INFO("Build Date: " << date::GetYear() << "/" << date::GetMonth() << "/" << date::GetDay() << " " << date::GetHour() << "h" << date::GetMinute());
|
||||||
etk::InitDefaultFolder("ewolApplNoName");
|
etk::InitDefaultFolder("ewolApplNoName");
|
||||||
ewol::openGL::Init();
|
ewol::openGL::Init();
|
||||||
ewol::EObjectManager::Init();
|
ewol::EObjectManager::Init();
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
import lutinModule
|
import lutinModule
|
||||||
import lutinTools
|
import lutinTools
|
||||||
import os
|
import os
|
||||||
import datetime
|
|
||||||
|
|
||||||
def Create(target):
|
def Create(target):
|
||||||
# set the ewol folder for Android basic sources ...
|
# set the ewol folder for Android basic sources ...
|
||||||
@ -138,7 +137,7 @@ def Create(target):
|
|||||||
#myModule.SetConfig(['Config.in','ConfigLinux.in'])
|
#myModule.SetConfig(['Config.in','ConfigLinux.in'])
|
||||||
|
|
||||||
# name of the dependency
|
# name of the dependency
|
||||||
myModule.AddModuleDepend(['etk', 'freetype', 'tinyxml', 'png', 'parsersvg'])
|
myModule.AddModuleDepend(['etk', 'freetype', 'tinyxml', 'png', 'parsersvg', 'date'])
|
||||||
|
|
||||||
#ifeq ("$(CONFIG_BUILD_BULLET)","y")
|
#ifeq ("$(CONFIG_BUILD_BULLET)","y")
|
||||||
#myModule.AddModuleDepend('bullet')
|
#myModule.AddModuleDepend('bullet')
|
||||||
@ -151,11 +150,9 @@ def Create(target):
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__))
|
myModule.AddExportPath(lutinTools.GetCurrentPath(__file__))
|
||||||
now = datetime.datetime.now()
|
|
||||||
myModule.CompileFlags_CC([
|
myModule.CompileFlags_CC([
|
||||||
'-Wno-write-strings',
|
'-Wno-write-strings',
|
||||||
'-DEWOL_VERSION_TAG_NAME="\\"TAG-build\\""',
|
|
||||||
"-DBUILD_TIME=\"\\\""+str(now.day)+"/"+str(now.month)+"/"+str(now.year)+"\\\"\"",
|
|
||||||
'-Wall'])
|
'-Wall'])
|
||||||
|
|
||||||
if target.name=="Linux":
|
if target.name=="Linux":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user