add version header

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@428 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-20 08:33:21 +00:00
parent f1d7fe87bb
commit 768bb7327b
6 changed files with 48 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
Greetings - Welcome to the Milsko GUI Toolkit (Version 1.0) Greetings - Welcome to the Milsko GUI Toolkit (Version pre-1.0)
This document contains a brief summary of the contents of this source This document contains a brief summary of the contents of this source
distributions and building instructions for Milsko GUI Toolkit. distributions and building instructions for Milsko GUI Toolkit.

View File

@@ -23,6 +23,7 @@
#include <Mw/Directory.h> #include <Mw/Directory.h>
#include <Mw/String.h> #include <Mw/String.h>
#include <Mw/FileChooser.h> #include <Mw/FileChooser.h>
#include <Mw/Version.h>
#include <Mw/Widget/Window.h> #include <Mw/Widget/Window.h>
#include <Mw/Widget/Menu.h> #include <Mw/Widget/Menu.h>

24
include/Mw/Version.h Normal file
View File

@@ -0,0 +1,24 @@
/* $Id$ */
/*!
* %file Mw/Version.h
* %brief Version informations
*/
#ifndef __MW_VERSION_H__
#define __MW_VERSION_H__
/*!
* %brief Major version
*/
#define MwMAJOR 0
/*!
* %brief Minor version
*/
#define MwMINOR 0
/*!
* %brief Version in string
*/
#define MwVERSION "pre-1.0"
#endif

View File

@@ -40,19 +40,19 @@ static void destroy_pixmap(MwLL handle) {
XFreePixmap(handle->display, handle->pixmap); XFreePixmap(handle->display, handle->pixmap);
} }
static void wait_map(MwLL handle){ static void wait_map(MwLL handle) {
XEvent* queue = NULL; XEvent* queue = NULL;
XEvent ev; XEvent ev;
while(1){ while(1) {
XNextEvent(handle->display, &ev); XNextEvent(handle->display, &ev);
if(ev.type == MapNotify && ev.xmap.window == handle->window){ if(ev.type == MapNotify && ev.xmap.window == handle->window) {
break; break;
}else{ } else {
arrput(queue, ev); arrput(queue, ev);
} }
} }
while(arrlen(queue) > 0){ while(arrlen(queue) > 0) {
XPutBackEvent(handle->display, &queue[0]); XPutBackEvent(handle->display, &queue[0]);
arrdel(queue, 0); arrdel(queue, 0);
} }

View File

@@ -2,11 +2,11 @@
# $Id$ # $Id$
open(IN, "<", $ARGV[0]); open(IN, "<", $ARGV[0]);
while(my $l = <IN>){ while (my $l = <IN>) {
$l =~ s/\r?\n$//g; $l =~ s/\r?\n$//g;
$l =~ s/%([^ ]+)/@\1/g; $l =~ s/%([^ ]+)/@\1/g;
if(!($l =~ /\@prop /)){ if (!($l =~ /\@prop /)) {
print("$l\n"); print("$l\n");
} }
} }
close(IN); close(IN);

View File

@@ -39,10 +39,19 @@ sub h {
print(OUT "\n"); print(OUT "\n");
} }
open(IN, "<", "include/Mw/Version.h");
my @lines = <IN>;
close(IN);
my @match = grep(/MwVERSION/, @lines);
my $ver = $match[0];
$ver =~ /\"([^"]+)\"/;
$ver = $1;
open(OUT, ">", "README.txt"); open(OUT, ">", "README.txt");
l(""); l("");
l("Greetings - Welcome to the Milsko GUI Toolkit (Version 1.0)"); l("Greetings - Welcome to the Milsko GUI Toolkit (Version " . $ver . ")");
l(""); l("");
l( l(
" This document contains a brief summary of the contents of this source distributions and building instructions for Milsko GUI Toolkit." " This document contains a brief summary of the contents of this source distributions and building instructions for Milsko GUI Toolkit."