diff --git a/Makefile b/Makefile
index 06bb9bd..fd39f55 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,11 @@ export F_GRIS=[37m
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
export CADRE_COTERS='
$(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)'
+VERSION_TAG=$(shell git describe --tags)
+#$(info $(VERSION_TAG))
+
+VERSION_BUILD_TIME=$(shell date)
+#$(info $(VERSION_TAG))
###############################################################################
### Compilateur base system ###
@@ -45,10 +50,11 @@ DEBUG:=1
### Compilation Define ###
###############################################################################
ifeq ("$(DEBUG)", "0")
- DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG
+ DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG -DVERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
else
- DEFINE= -DEDN_DEBUG_LEVEL=3
+ DEFINE= -DEDN_DEBUG_LEVEL=3 -DVERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
endif
+DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
GTKFLAGS=
ifeq ($(shell if `pkg-config --exists gtk+-3.0` ; then echo "yes"; else echo "no"; fi), yes)
@@ -203,7 +209,7 @@ all: build
-include $(OBJ:.o=.d)
-build: .encadrer $(OUTPUT_NAME)
+build: .encadrer .versionFile $(OUTPUT_NAME)
.encadrer:
@@ -221,6 +227,11 @@ build: .encadrer $(OUTPUT_NAME)
FILE_IMAGES= data/imagesSources/*.png
+
+.versionFile :
+ @rm $(OBJECT_DIRECTORY)/GuiTools/WindowsManager/WindowsManager.o
+
+
# Tool used to create a binary version of every element png or other needed by the application
pngToCpp: tools/pngToCpp/pngToCpp.c
@echo $(F_ROUGE)"
(bin) $@"$(F_NORMALE)
@@ -230,14 +241,12 @@ pngToCpp: tools/pngToCpp/pngToCpp.c
# Generate basic
$(FILE_DIRECTORY)/GuiTools/myImage.cpp: $(FILE_IMAGES) $(MAKE_DEPENDENCE) pngToCpp
@echo $(F_BLUE)"
(.cpp) *.png ==> $@"$(F_NORMALE)
- @#echo ./pngToCpp $@ $(FILE_IMAGES)
@./pngToCpp $@ $(FILE_IMAGES)
# build C++
$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
@echo $(F_VERT)"
(.o) $<"$(F_NORMALE)
- @#echo $(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
@$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
# build binary Release Mode
@@ -273,7 +282,7 @@ clean:
count:
wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"`
-install: .encadrer $(OUTPUT_NAME_RELEASE)
+install: .encadrer .versionFile $(OUTPUT_NAME_RELEASE)
@echo $(CADRE_HAUT_BAS)
@echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROG_NAME)$(F_NORMALE)'$(CADRE_COTERS)
@echo $(CADRE_HAUT_BAS)
diff --git a/README b/README
index 55b14e2..ae9232c 100644
--- a/README
+++ b/README
@@ -17,6 +17,5 @@ You can NOT:
- Add malware in the Sources.
- Do something bad with the sources.
- Use it to travel in the space with a toaster.
- - Write Java sources code with this software.
I reserve the right to change this licence. If it change the version of the copy you have keep its own license
diff --git a/Sources/CustumWidget/CodeView/CodeView.cpp b/Sources/CustumWidget/CodeView/CodeView.cpp
index 3d699cd..031cfd2 100644
--- a/Sources/CustumWidget/CodeView/CodeView.cpp
+++ b/Sources/CustumWidget/CodeView/CodeView.cpp
@@ -358,7 +358,7 @@ gint CodeView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpo
EDN_INFO("mouse-event BT3 PRESS");
}
} else {
- EDN_INFO("mouse-event BT? PRESS");
+ EDN_INFO("mouse-event BT" << event->type <<" PRESS");
}
return true;
}
diff --git a/Sources/GuiTools/WindowsManager/WindowsManager.cpp b/Sources/GuiTools/WindowsManager/WindowsManager.cpp
index 9e594bc..a5db6fd 100644
--- a/Sources/GuiTools/WindowsManager/WindowsManager.cpp
+++ b/Sources/GuiTools/WindowsManager/WindowsManager.cpp
@@ -162,20 +162,35 @@ void WindowsManager::OnMessage(int32_t id, int32_t dataID)
GTK_STOCK_QUIT, GTK_RESPONSE_NO,
NULL);
GtkWidget *myContentArea = gtk_dialog_get_content_area( GTK_DIALOG(myDialog));
- GtkWidget *myLabel = gtk_label_new(
- "Name : Edn\n\n"
- "Version : v0.1.1\n\n"
- "Description : Editeur De N'ours, l'Editeur Desoxyribo-Nucleique\n"
- " Source Code Editor\n\n"
- "Copyright 2010 Edouard DUPIN, all right reserved\n"
- "This software is distributed in the hope that it will be useful, but WITHOUT\n"
- "ANY WARRANTY\n\n"
- "Licence summary : \n"
- " You can modify and redistribute the sources code and binaries.\n"
- " You can send me the bug-fix\n"
- " You can not earn money with this Software (if the source extract from Edn\n"
- " represent less than 50% of original Sources)\n"
- "Term of the licence in the file licence.txt");
+ GtkWidget *myLabel = gtk_label_new("");
+ gtk_label_set_markup (GTK_LABEL (myLabel),
+ "Name : Edn\n"
+ "Version : " VERSION_TAG_NAME "\n"
+ "Build Time : " VERSION_BUILD_TIME "\n\n"
+ "Description : Editeur De N'ours, l'Editeur Desoxyribo-Nucleique\n"
+ " Source Code Editor\n\n"
+ "Copyright 2010 Edouard DUPIN, all right reserved\n\n"
+ "Terms of license : \n"
+ "This software is distributed in the hope that it will be useful, but \n"
+ "WITHOUT ANY WARRANTY\n"
+ " You can:\n"
+ " * Redistribute the sources code and binaries.\n"
+ " * Modify the Sources code.\n"
+ " * Use a part of the sources (less than 50%) in an other software,\n"
+ " just write somewhere \"Edn is great\" visible by the user (on \n"
+ " your product or on your website with a link to my page).\n"
+ " * Redistribute the modification only if you want.\n"
+ " * Send me the bug-fix (it could be great).\n"
+ " * Pay me a beer or some other things.\n"
+ " Print the source code on WC paper ...\n"
+ " You can NOT:\n"
+ " * Earn money with this Software (But I can).\n"
+ " * Add malware in the Sources.\n"
+ " * Do something bad with the sources.\n"
+ " * Use it to travel in the space with a toaster.\n"
+ "I reserve the right to change this licence. If it change the version of \n"
+ "the copy you have keep its own license.\n\n"
+ "Sources : git://github.com/HeeroYui/edn.git ");
gtk_box_pack_start(GTK_BOX(myContentArea), myLabel, TRUE, TRUE, 0);
gtk_widget_show_all(myContentArea);