Commit a122499a authored by Ferenc Wagner's avatar Ferenc Wagner Committed by Alexandre Julliard

- Extract revision info from CVS/Entries.

- #include "winetest.rc" into gui.rc. MinGW can't link in more than one resource files. - Enlarge chunk size of network transfer.
parent 77c9dd86
......@@ -13,8 +13,7 @@ C_SRCS = \
util.c
RC_SRCS = \
gui.rc \
winetest.rc
gui.rc
RC_BINSRC = gui.rc
RC_BINARIES = wine.ico
......@@ -45,12 +44,9 @@ TESTS = \
TESTBINS = $(TESTS:%=%_test.exe$(DLLEXT))
winetest.rc: maketest Makefile.in
$(SRCDIR)/maketest $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )
$(SRCDIR)/maketest $(TOPSRCDIR) $(TESTBINS) > $@ || ( $(RM) $@ && exit 1 )
revision.info:
(cd $(TOPSRCDIR); for file in dlls/*/tests/*.c; do rev=`cvs stat "$$file" | grep "Working" | awk '{print $$3}'`; echo "$$file:$$rev"; done) > $@ || ( $(RM) $@ && exit 1 )
winetest.res: $(TESTBINS)
gui.res: winetest.rc $(TESTBINS)
clean::
$(RM) winetest.rc $(TESTBINS)
......
......@@ -21,6 +21,7 @@
#include <windows.h>
#include <winres.h>
#include "guires.h"
#include "winetest.rc" /* for the MinGW cross-compiler */
IDD_STATUS DIALOG 0, 0, 160, 140
STYLE WS_OVERLAPPEDWINDOW
......
......@@ -140,7 +140,6 @@ const char* get_test_source_file(const char* test, const char* subtest)
}
snprintf(buffer, sizeof(buffer), "dlls/%s/tests/%s.c", test, subtest);
fprintf(stderr, "file=%s\n", buffer);
return buffer;
}
......@@ -149,36 +148,35 @@ const char* get_file_rev(const char* file)
const struct rev_info* rev;
for(rev = rev_infos; rev->file; rev++) {
fprintf(stderr, " ?{%s:%s)\n", rev->file, rev->rev);
if (strcmp(rev->file, file) == 0) return rev->rev;
}
return "";
return "-";
}
void extract_rev_infos ()
{
char revinfo[256], *p;
int size = 0, i = 0, len;
int size = 0, i, len;
HMODULE module = GetModuleHandle (NULL);
for (i = 0; TRUE; i++) {
if (i >= size) {
size += 100;
rev_infos = xrealloc(rev_infos, size);
rev_infos = xrealloc (rev_infos, size * sizeof (*rev_infos));
}
memset(rev_infos + i, 0, sizeof(rev_infos[i]));
len = LoadStringA (module, i + 30000, revinfo, sizeof(revinfo));
if (len == 0) break; /* end of revision info */
if (len >= sizeof(revinfo))
if (len >= sizeof(revinfo) - 1)
report (R_FATAL, "Revision info too long.");
if(!(p = strrchr(revinfo, ':')))
report (R_FATAL, "Revision info malformed (i=%d)", i);
*p = 0;
rev_infos[i].file = strdup(revinfo);
rev_infos[i].rev = strdup(p + 1);
} while(1);
}
}
void* extract_rcdata (int id, DWORD* size)
......@@ -196,7 +194,7 @@ void* extract_rcdata (int id, DWORD* size)
return addr;
}
/* Fills out the name, is_elf and exename fields */
/* Fills in the name, is_elf and exename fields */
void
extract_test (struct wine_test *test, const char *dir, int id)
{
......@@ -459,48 +457,45 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
cmdLine = mystrtok (cmdLine);
while (cmdLine) {
if (*cmdLine == '-')
if (cmdLine[2]) {
report (R_ERROR, "Not a single letter option: %s",
cmdLine);
usage ();
exit (2);
}
cmdLine++;
switch (*cmdLine) {
case 'c':
report (R_TEXTMODE);
break;
case 'h':
usage ();
exit (0);
case 'q':
report (R_QUIET);
break;
case 's':
submit = mystrtok (NULL);
if (tag)
report (R_WARNING, "ignoring tag for submit");
send_file (submit);
break;
case 'o':
logname = mystrtok (NULL);
run_tests (logname, tag);
break;
case 't':
tag = mystrtok (NULL);
cp = badtagchar (tag);
if (cp) {
report (R_ERROR, "invalid char in tag: %c", *cp);
usage ();
exit (2);
}
break;
default:
report (R_ERROR, "invalid option: -%c", *cmdLine);
if (cmdLine[0] != '-' || cmdLine[2]) {
report (R_ERROR, "Not a single letter option: %s", cmdLine);
usage ();
exit (2);
}
switch (cmdLine[1]) {
case 'c':
report (R_TEXTMODE);
break;
case 'h':
usage ();
exit (0);
case 'q':
report (R_QUIET);
break;
case 's':
submit = mystrtok (NULL);
if (tag)
report (R_WARNING, "ignoring tag for submit");
send_file (submit);
break;
case 'o':
logname = mystrtok (NULL);
run_tests (logname, tag);
break;
case 't':
tag = mystrtok (NULL);
cp = badtagchar (tag);
if (cp) {
report (R_ERROR, "invalid char in tag: %c", *cp);
usage ();
exit (2);
}
break;
default:
report (R_ERROR, "invalid option: -%c", cmdLine[1]);
usage ();
exit (2);
}
cmdLine = mystrtok (NULL);
}
if (!logname && !submit) {
......
......@@ -5,6 +5,9 @@ if [ -z "$WINE_BUILD" ]; then
echo "warning: using automatically generated BUILD tag: $WINE_BUILD" 1>&2
fi
TOPSRCDIR="$1"
shift
echo "/* Automatically generated -- do not edit! */"
echo "STRINGTABLE {"
echo "0 \"$WINE_BUILD\""
......@@ -16,13 +19,15 @@ do
echo "$i \"$test\""
done
if [ -f revision.info ]; then
i=0
for line in `cat revision.info`; do
i=`expr $i + 1`
echo "$i+30000 \"$line\""
done
fi
i=30000
cd $TOPSRCDIR
for dir in dlls/*/tests; do
sed -ne "s|^/\([^.]*.c\)/\([^/]*\).*|$dir/\1:\2|p" $dir/CVS/Entries 2>/dev/null
done |\
while read; do
echo "$i \"$REPLY\""
i=`expr $i + 1`
done
echo "}"
......
......@@ -158,7 +158,7 @@ send_file (const char *name)
report (R_STATUS, "Sending %u bytes of data", filesize);
report (R_PROGRESS, 2, filesize);
while ((bytes_read = fread (buffer, 1, BUFLEN / 8, f))) {
while ((bytes_read = fread (buffer, 1, BUFLEN / 2, f))) {
if (send_buf (s, buffer, bytes_read)) {
report (R_WARNING, "Error sending body: %d, %d",
errno, WSAGetLastError ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment