milsko/tools
Nishi ca9a24a2b0
Some checks are pending
pyrite-dev/milsko/pipeline/head Build started...
watcom opengl fix
2026-08-10 04:32:44 +09:00
..
.gitignore added wip fuzzer, fixed alot of memory leaks with wayland 2026-04-16 18:36:42 -07:00
archive.sh remove svn keywords 2025-12-05 07:43:04 +09:00
color.pl fix perl files 2026-07-20 06:21:25 +09:00
cursor.pl remove svn keywords 2025-12-05 07:43:04 +09:00
doxygen.sh remove svn keywords 2025-12-05 07:43:04 +09:00
font.c remove svn keywords 2025-12-05 07:43:04 +09:00
fuzzer.c add iteration option to fuzzer 2026-04-27 12:45:48 +09:00
gendcl.pl text shadow 2025-12-21 23:02:02 +09:00
genmk.pl watcom opengl fix 2026-08-10 04:32:44 +09:00
harvard.pl remove svn keywords 2025-12-05 07:43:04 +09:00
icon-converter.c add MwTreeViewGetOpened 2026-05-12 09:49:06 +09:00
icon.sh oops 2025-12-05 07:45:43 +09:00
logo.sh logo for nodejs binding 2026-04-19 06:17:23 +09:00
Makefile rewrite in c 2026-05-10 06:25:27 +09:00
prepare-gump.sh remove svn keywords 2025-12-05 07:43:04 +09:00
readme.pl perltidy 2026-04-28 15:08:00 +09:00
ttf.sh oops 2025-12-05 07:45:43 +09:00
update.sh remove svn keywords 2025-12-05 07:43:04 +09:00
watcom-pack.sh gldemos too 2026-05-06 04:27:55 +09:00

#!/usr/bin/env perl
our $WIDTH = 80;

sub l {
    my $len  = 0;
    my $last = 0;
    my @msg  = split(/ /, $_[0]);
    foreach my $m (@msg) {
        $len += 1 + length($m);
        $last = 0;
        if ($len > $WIDTH) {
            print(OUT "\n");
            $len  = 0;
            $last = 1;
        }
        print(OUT "$m ");
    }
    if (!$last) {
        print(OUT "\n");
    }
}

sub c {
    my ($msg) = @_;
    my $len = length($msg);
    if ($_[1]) {
        $len = $_[1];
    }
    print(OUT (" " x (($WIDTH - $len) / 2)) . "$msg\n");
}

sub h {
    my ($msg) = @_;
    print(OUT "\n");
    print(OUT "$msg\n");
    print(OUT ("-" x length($msg)) . "\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");

l("");
l("Greetings - Welcome to the Milsko GUI Toolkit (Version " . $ver . ")");
l("");
l(
"  This document contains a brief summary of the contents of this source distributions and building instructions for Milsko GUI Toolkit."
);

l("");
c("Requirements");
l("");
l("  Milsko requires either");
l("  * A Windows environment with GDI (so anything NT or 9x)");

#l("  * A MacOS environment with Cocoa (10.4 or above supported)");
l("  * A Unix-like environment with Wayland and/or X11 for runtime.");
l("");
l("  To build Milsko for Windows, you must have one of following compilers:");
l("  * Visual C++ 6.0 or newer");
l("  * Borland C++ 5.5 or newer");
l("  * Open Watcom 2.0 or newer");
l("  * MinGW-w64");
l("");
l("  and for Unix-like and MacOS:");
l("  * GNU C Compiler");
l("  * Clang");
l("");

l("");
c("Contents");
l("");
c("  At the top level of this hierarchy there are seven directories:", 60);
l("");
c("  src -      Contains the source for Milsko library", 60);
l("");
c("  include -  Contains the headers for Milsko", 60);
l("");
c("  doc -      Contains the documentation for Milsko", 60);
l("");
c("  external - Contains the external dependency that Milsko uses", 60);
l("");
c("  resource - Contains the resources used by maintainers", 60);
l("");
c("  tools -    Contains the tools used by maintainers", 60);
l("");

l("");
c("Building Milsko");
l("");
l("  Building Milsko depends on the platform you use, and the compiler you use."
);
h("A. Visual C++");
l("1) Run `nmake -f NTMakefile'.");
h("B. Borland C++");
l("1) Run `make -f BorMakefile'.");
h("C. Open Watcom");
l("1) Run `wmake -f WatMakefile'.");
h("D. MinGW-w64/GCC/Clang");
l("1) Determine if you need Vulkan and/or OpenGL.");
l("");
l("2) Either:");
l("   a.) Run `./configure'. For help, run `./configure --help'.");
l(
"   b.) Use CMake; i.e. `cmake -B build`. (if contributing, name the build folder build as that's what's included in the .gitignore)"
);
l("");
l("3) Run `make'.");
l("");

l(" -- Nishi  (nishi\@nishi.boats)");

close(OUT);