Add the version name and compilation date in the About dialog

This commit is contained in:
Edouard Dupin 2011-07-22 10:50:47 +02:00
parent b3d776b723
commit 5ff5525c6b
4 changed files with 45 additions and 22 deletions

View File

@ -31,6 +31,11 @@ export F_GRIS=
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)' export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
export CADRE_COTERS=' $(F_INVERSER) $(F_NORMALE) $(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 ### ### Compilateur base system ###
@ -45,10 +50,11 @@ DEBUG:=1
### Compilation Define ### ### Compilation Define ###
############################################################################### ###############################################################################
ifeq ("$(DEBUG)", "0") ifeq ("$(DEBUG)", "0")
DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG -DVERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
else else
DEFINE= -DEDN_DEBUG_LEVEL=3 DEFINE= -DEDN_DEBUG_LEVEL=3 -DVERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
endif endif
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
GTKFLAGS= GTKFLAGS=
ifeq ($(shell if `pkg-config --exists gtk+-3.0` ; then echo "yes"; else echo "no"; fi), yes) 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) -include $(OBJ:.o=.d)
build: .encadrer $(OUTPUT_NAME) build: .encadrer .versionFile $(OUTPUT_NAME)
.encadrer: .encadrer:
@ -221,6 +227,11 @@ build: .encadrer $(OUTPUT_NAME)
FILE_IMAGES= data/imagesSources/*.png 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 # Tool used to create a binary version of every element png or other needed by the application
pngToCpp: tools/pngToCpp/pngToCpp.c pngToCpp: tools/pngToCpp/pngToCpp.c
@echo $(F_ROUGE)" (bin) $@"$(F_NORMALE) @echo $(F_ROUGE)" (bin) $@"$(F_NORMALE)
@ -230,14 +241,12 @@ pngToCpp: tools/pngToCpp/pngToCpp.c
# Generate basic # Generate basic
$(FILE_DIRECTORY)/GuiTools/myImage.cpp: $(FILE_IMAGES) $(MAKE_DEPENDENCE) pngToCpp $(FILE_DIRECTORY)/GuiTools/myImage.cpp: $(FILE_IMAGES) $(MAKE_DEPENDENCE) pngToCpp
@echo $(F_BLUE)" (.cpp) *.png ==> $@"$(F_NORMALE) @echo $(F_BLUE)" (.cpp) *.png ==> $@"$(F_NORMALE)
@#echo ./pngToCpp $@ $(FILE_IMAGES)
@./pngToCpp $@ $(FILE_IMAGES) @./pngToCpp $@ $(FILE_IMAGES)
# build C++ # build C++
$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE) $(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
@echo $(F_VERT)" (.o) $<"$(F_NORMALE) @echo $(F_VERT)" (.o) $<"$(F_NORMALE)
@#echo $(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
@$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD @$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
# build binary Release Mode # build binary Release Mode
@ -273,7 +282,7 @@ clean:
count: count:
wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"` 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 $(CADRE_HAUT_BAS)
@echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROG_NAME)$(F_NORMALE)'$(CADRE_COTERS) @echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROG_NAME)$(F_NORMALE)'$(CADRE_COTERS)
@echo $(CADRE_HAUT_BAS) @echo $(CADRE_HAUT_BAS)

1
README
View File

@ -17,6 +17,5 @@ You can NOT:
- Add malware in the Sources. - Add malware in the Sources.
- Do something bad with the sources. - Do something bad with the sources.
- Use it to travel in the space with a toaster. - 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 I reserve the right to change this licence. If it change the version of the copy you have keep its own license

View File

@ -358,7 +358,7 @@ gint CodeView::CB_mouseButtonEvent(GtkWidget *widget, GdkEventButton *event, gpo
EDN_INFO("mouse-event BT3 PRESS"); EDN_INFO("mouse-event BT3 PRESS");
} }
} else { } else {
EDN_INFO("mouse-event BT? PRESS"); EDN_INFO("mouse-event BT" << event->type <<" PRESS");
} }
return true; return true;
} }

View File

@ -162,20 +162,35 @@ void WindowsManager::OnMessage(int32_t id, int32_t dataID)
GTK_STOCK_QUIT, GTK_RESPONSE_NO, GTK_STOCK_QUIT, GTK_RESPONSE_NO,
NULL); NULL);
GtkWidget *myContentArea = gtk_dialog_get_content_area( GTK_DIALOG(myDialog)); GtkWidget *myContentArea = gtk_dialog_get_content_area( GTK_DIALOG(myDialog));
GtkWidget *myLabel = gtk_label_new( GtkWidget *myLabel = gtk_label_new("");
"Name : Edn\n\n" gtk_label_set_markup (GTK_LABEL (myLabel),
"Version : v0.1.1\n\n" "<b>Name :</b> Edn\n"
"Description : Editeur De N'ours, l'Editeur Desoxyribo-Nucleique\n" "<b>Version :</b> " VERSION_TAG_NAME "\n"
" Source Code Editor\n\n" "<b>Build Time :</b> " VERSION_BUILD_TIME "\n\n"
"Copyright 2010 Edouard DUPIN, all right reserved\n" "<b>Description :</b> Editeur De N'ours, l'Editeur Desoxyribo-Nucleique\n"
"This software is distributed in the hope that it will be useful, but WITHOUT\n" " Source Code Editor\n\n"
"ANY WARRANTY\n\n" "<b>Copyright 2010 Edouard DUPIN, all right reserved</b>\n\n"
"Licence summary : \n" "<b>Terms of license : </b>\n"
" You can modify and redistribute the sources code and binaries.\n" "This software is distributed in the hope that it will be useful, but \n"
" You can send me the bug-fix\n" "WITHOUT ANY WARRANTY\n"
" You can not earn money with this Software (if the source extract from Edn\n" " <b>You can:</b>\n"
" represent less than 50% of original Sources)\n" " * Redistribute the sources code and binaries.\n"
"Term of the licence in the file licence.txt"); " * 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"
" <b>You can NOT:</b>\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"
"<b>Sources : </b> git://github.com/HeeroYui/edn.git ");
gtk_box_pack_start(GTK_BOX(myContentArea), myLabel, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(myContentArea), myLabel, TRUE, TRUE, 0);
gtk_widget_show_all(myContentArea); gtk_widget_show_all(myContentArea);