renamed apps/tests/button, apps/test/button2 & apps/tests/tokentest to be ISO-9660 compatible.

fixed install.bat to reflect those changes, and commented out missing files.
fixed cdmake to abort on non-ISO-9660 names, and removed name mangling.

svn path=/trunk/; revision=5329
This commit is contained in:
Royce Mitchell III 2003-07-30 14:08:16 +00:00
parent 2d1ca36bba
commit d2cd5c9398
7 changed files with 132 additions and 67 deletions

View file

@ -7,11 +7,11 @@ TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = buttontst
TARGET_NAME = btntest
TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_OBJECTS = buttontst.o
include $(PATH_TO_TOP)/rules.mak

View file

@ -7,11 +7,11 @@ TARGET_TYPE = program
TARGET_APPTYPE = windows
TARGET_NAME = buttontst2
TARGET_NAME = btntest2
TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_OBJECTS = buttontst2.o
include $(PATH_TO_TOP)/rules.mak

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.1 2002/06/07 22:57:13 ekohl Exp $
# $Id: makefile,v 1.2 2003/07/30 14:08:16 royce Exp $
PATH_TO_TOP = ../../..
@ -8,11 +8,11 @@ TARGET_TYPE = program
TARGET_APPTYPE = console
TARGET_NAME = tokentest
TARGET_NAME = tokentst
TARGET_SDKLIBS = ntdll.a kernel32.a
TARGET_OBJECTS = $(TARGET_NAME).o
TARGET_OBJECTS = tokentest.o
include $(PATH_TO_TOP)/rules.mak

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.3 2002/06/02 19:25:01 chorns Exp $
# $Id: makefile,v 1.4 2003/07/30 14:08:16 royce Exp $
PATH_TO_TOP = ../../..
@ -10,7 +10,7 @@ TARGET_APPTYPE = windows
TARGET_NAME = winhello
TARGET_SDKLIBS = kernel32.a gdi32.a
TARGET_SDKLIBS = kernel32.a gdi32.a ntdll.a
TARGET_OBJECTS = $(TARGET_NAME).o

View file

@ -1,7 +1,7 @@
#include <windows.h>
#include <stdio.h>
HFONT tf;
//HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI
@ -49,9 +49,9 @@ WinMain(HINSTANCE hInstance,
return(1);
}
tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
//tf = CreateFontA(14, 0, 0, TA_BASELINE, FW_NORMAL, FALSE, FALSE, FALSE,
// ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
// DEFAULT_QUALITY, FIXED_PITCH|FF_DONTCARE, "Timmons");
ShowWindow(hWnd, nCmdShow);
@ -61,7 +61,7 @@ WinMain(HINSTANCE hInstance,
DispatchMessage(&msg);
}
DeleteObject(tf);
//DeleteObject(tf);
return msg.wParam;
}
@ -93,7 +93,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_PAINT:
hDC = BeginPaint(hWnd, &ps);
SelectObject(hDC, tf);
EndPaint(hWnd, &ps);
//SelectObject(hDC, tf);
hDC = GetDC(hWnd);
TextOut(hDC, 10, 10, "Hello World from ReactOS!", strlen("Hello World from ReactOS!"));
GetClientRect(hWnd, &clr);
GetWindowRect(hWnd, &wir);
@ -101,7 +103,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
sprintf(sir, "%d,%d,%d,%d ", wir.left, wir.top, wir.right, wir.bottom);
TextOut(hDC, 10, 30, spr, 20);
TextOut(hDC, 10, 50, sir, 20);
EndPaint(hWnd, &ps);
ReleaseDC ( hWnd, hDC );
break;
case WM_DESTROY:

View file

@ -20,13 +20,22 @@ md %ROS_INSTALL%\system32\drivers
md %ROS_INSTALL%\media
md %ROS_INSTALL%\media\fonts
echo.
echo installing boot files...
copy boot.bat %ROS_INSTALL%
copy bootc.lst %ROS_INSTALL%
copy aboot.bat %ROS_INSTALL%
copy loaders\dos\loadros.com %ROS_INSTALL%
echo.
echo installing ntoskrnl and hal...
copy ntoskrnl\ntoskrnl.exe %ROS_INSTALL%\system32
copy ntoskrnl\ntoskrnl.sym %ROS_INSTALL%\symbols
copy ntoskrnl\ntoskrnl.map %ROS_INSTALL%\symbols
copy hal\halx86\hal.dll %ROS_INSTALL%\system32
echo.
echo installing file system drivers...
copy drivers\fs\vfat\vfatfs.sys %ROS_INSTALL%\system32\drivers
copy drivers\fs\cdfs\cdfs.sys %ROS_INSTALL%\system32\drivers
copy drivers\fs\fs_rec\fs_rec.sys %ROS_INSTALL%\system32\drivers
@ -34,37 +43,57 @@ copy drivers\fs\ms\msfs.sys %ROS_INSTALL%\system32\drivers
copy drivers\fs\np\npfs.sys %ROS_INSTALL%\system32\drivers
copy drivers\fs\ntfs\ntfs.sys %ROS_INSTALL%\system32\drivers
copy drivers\fs\mup\mup.sys %ROS_INSTALL%\system32\drivers
echo.
echo installing bus and misc drivers...
copy drivers\bus\acpi\acpi.sys %ROS_INSTALL%\system32\drivers
copy drivers\bus\isapnp\isapnp.sys %ROS_INSTALL%\system32\drivers
copy drivers\bus\pci\pci.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\floppy\floppy.sys %ROS_INSTALL%\system32\drivers
copy drivers\lib\bzip2\unbzip2.sys %ROS_INSTALL%\system32\drivers
echo.
echo installing input drivers...
copy drivers\input\keyboard\keyboard.sys %ROS_INSTALL%\system32\drivers
copy drivers\input\mouclass\mouclass.sys %ROS_INSTALL%\system32\drivers
copy drivers\input\psaux\psaux.sys %ROS_INSTALL%\system32\drivers
copy drivers\input\sermouse\sermouse.sys %ROS_INSTALL%\system32\drivers
echo.
echo installing dd drivers...
copy drivers\dd\blue\blue.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\beep\beep.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\debugout\debugout.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\null\null.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\serial\serial.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\serenum\serenum.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\vga\miniport\vgamp.sys %ROS_INSTALL%\system32\drivers
copy drivers\dd\vga\display\vgaddi.dll %ROS_INSTALL%\system32
copy drivers\dd\videoprt\videoprt.sys %ROS_INSTALL%\system32\drivers
rem copy drivers\dd\serenum\serenum.sys %ROS_INSTALL%\system32\drivers
echo.
echo installing net drivers...
copy drivers\net\afd\afd.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\dd\ne2000\ne2000.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\dd\miniport\nscirda\nscirda.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\ndis\ndis.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\packet\packet.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\tdi\tdi.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\tcpip\tcpip.sys %ROS_INSTALL%\system32\drivers
copy drivers\net\wshtcpip\wshtcpip.dll %ROS_INSTALL%\system32
rem copy drivers\net\dd\miniport\nscirda\nscirda.sys %ROS_INSTALL%\system32\drivers
rem copy drivers\net\packet\packet.sys %ROS_INSTALL%\system32\drivers
echo.
echo installing storage drivers...
copy drivers\storage\atapi\atapi.sys %ROS_INSTALL%\system32\drivers
copy drivers\storage\scsiport\scsiport.sys %ROS_INSTALL%\system32\drivers
copy drivers\storage\cdrom\cdrom.sys %ROS_INSTALL%\system32\drivers
copy drivers\storage\disk\disk.sys %ROS_INSTALL%\system32\drivers
copy drivers\storage\class2\class2.sys %ROS_INSTALL%\system32\drivers
echo.
echo installing system files and services...
copy subsys\system\autochk\autochk.exe %ROS_INSTALL%\system32
copy subsys\system\cmd\cmd.exe %ROS_INSTALL%\system32
copy subsys\system\services\services.exe %ROS_INSTALL%\system32
@ -72,6 +101,14 @@ copy subsys\system\setup\setup.exe %ROS_INSTALL%\system32
copy subsys\system\winlogon\winlogon.exe %ROS_INSTALL%\system32
copy services\eventlog\eventlog.exe %ROS_INSTALL%\system32
copy services\rpcss\rpcss.exe %ROS_INSTALL%\system32
copy subsys\smss\smss.exe %ROS_INSTALL%\system32
copy subsys\csrss\csrss.exe %ROS_INSTALL%\system32
copy subsys\ntvdm\ntvdm.exe %ROS_INSTALL%\system32
copy subsys\win32k\win32k.sys %ROS_INSTALL%\system32
copy subsys\system\usetup\usetup.exe %ROS_INSTALL%\system32
echo.
echo installing user-mode dlls...
copy lib\advapi32\advapi32.dll %ROS_INSTALL%\system32
copy lib\crtdll\crtdll.dll %ROS_INSTALL%\system32
copy lib\fmifs\fmifs.dll %ROS_INSTALL%\system32
@ -79,38 +116,47 @@ copy lib\freetype\freetype.dll %ROS_INSTALL%\system32
copy lib\gdi32\gdi32.dll %ROS_INSTALL%\system32
copy lib\iphlpapi\iphlpapi.dll %ROS_INSTALL%\system32
copy lib\kernel32\kernel32.dll %ROS_INSTALL%\system32
copy lib\libpcap\libpcap.dll %ROS_INSTALL%\system32
copy lib\lzexpand\lz32.dll %ROS_INSTALL%\system32
copy lib\msafd\msafd.dll %ROS_INSTALL%\system32
copy lib\msvcrt\msvcrt.dll %ROS_INSTALL%\system32
echo.
echo installing user-mode dlls (2)...
copy lib\ntdll\ntdll.dll %ROS_INSTALL%\system32
copy lib\packet\packet.dll %ROS_INSTALL%\system32
copy lib\secur32\secur32.dll %ROS_INSTALL%\system32
copy lib\shell32\roshel32.dll %ROS_INSTALL%\system32
copy lib\snmpapi\snmpapi.dll %ROS_INSTALL%\system32
copy lib\syssetup\syssetup.dll %ROS_INSTALL%\system32
copy lib\twain\twain_32.dll %ROS_INSTALL%\system32
copy lib\user32\user32.dll %ROS_INSTALL%\system32
copy lib\version\version.dll %ROS_INSTALL%\system32
copy lib\winedbgc\winedbgc.dll %ROS_INSTALL%\system32
copy lib\winmm\winmm.dll %ROS_INSTALL%\system32
copy lib\winspool\winspool.drv %ROS_INSTALL%\system32
copy lib\ws2_32\ws2_32.dll %ROS_INSTALL%\system32
echo.
echo installing user-mode dlls (3)...
copy lib\ws2help\ws2help.dll %ROS_INSTALL%\system32
copy lib\wshirda\wshirda.dll %ROS_INSTALL%\system32
copy lib\wsock32\wsock32.dll %ROS_INSTALL%\system32
copy subsys\smss\smss.exe %ROS_INSTALL%\system32
copy subsys\csrss\csrss.exe %ROS_INSTALL%\system32
copy subsys\ntvdm\ntvdm.exe %ROS_INSTALL%\system32
copy subsys\win32k\win32k.sys %ROS_INSTALL%\system32
copy subsys\system\usetup\usetup.exe %ROS_INSTALL%\system32
rem copy lib\winmm\winmm.dll %ROS_INSTALL%\system32
rem copy lib\shell32\roshel32.dll %ROS_INSTALL%\system32
rem copy lib\snmpapi\snmpapi.dll %ROS_INSTALL%\system32
rem copy lib\libpcap\libpcap.dll %ROS_INSTALL%\system32
echo.
echo installing utilities...
copy apps\utils\cat\cat.exe %ROS_INSTALL%\bin
copy apps\utils\partinfo\partinfo.exe %ROS_INSTALL%\bin
copy apps\utils\objdir\objdir.exe %ROS_INSTALL%\bin
copy apps\utils\pice\module\pice.sys %ROS_INSTALL%\system32\drivers
copy apps\utils\pice\module\pice.sym %ROS_INSTALL%\symbols
copy apps\utils\pice\pice.cfg %ROS_INSTALL%\symbols
copy apps\utils\sc\sc.exe %ROS_INSTALL%\bin
rem copy apps\utils\pice\module\pice.sys %ROS_INSTALL%\system32\drivers
rem copy apps\utils\pice\module\pice.sym %ROS_INSTALL%\symbols
echo.
echo installing tests...
copy apps\tests\hello\hello.exe %ROS_INSTALL%\bin
copy apps\tests\args\args.exe %ROS_INSTALL%\bin
copy apps\tests\apc\apc.exe %ROS_INSTALL%\bin
@ -121,16 +167,22 @@ copy apps\tests\lpc\lpcclt.exe %ROS_INSTALL%\bin
copy apps\tests\thread\thread.exe %ROS_INSTALL%\bin
copy apps\tests\enumwnd\enumwnd.exe %ROS_INSTALL%\bin
copy apps\tests\event\event.exe %ROS_INSTALL%\bin
echo.
echo installing tests (2)...
copy apps\tests\file\file.exe %ROS_INSTALL%\bin
copy apps\tests\pteb\pteb.exe %ROS_INSTALL%\bin
copy apps\tests\consume\consume.exe %ROS_INSTALL%\bin
copy apps\tests\button\buttontst.exe %ROS_INSTALL_TESTS%
copy apps\tests\button2\buttontst2.exe %ROS_INSTALL_TESTS%
copy apps\tests\button\btntest.exe %ROS_INSTALL_TESTS%
copy apps\tests\button2\btntest2.exe %ROS_INSTALL_TESTS%
copy apps\tests\combo\combotst.exe %ROS_INSTALL_TESTS%
copy apps\tests\lineclip\lineclip.exe %ROS_INSTALL_TESTS%
copy apps\tests\edit\edittest.exe %ROS_INSTALL_TESTS%
copy apps\tests\vmtest\vmtest.exe %ROS_INSTALL_TESTS%
copy apps\tests\gditest\gditest.exe %ROS_INSTALL_TESTS%
echo.
echo installing tests (3)...
copy apps\tests\shaptest\shaptest.exe %ROS_INSTALL_TESTS%
copy apps\tests\dibtest\dibtest.exe %ROS_INSTALL_TESTS%
copy apps\tests\mstest\msserver.exe %ROS_INSTALL_TESTS%
@ -141,6 +193,9 @@ copy apps\tests\atomtest\atomtest.exe %ROS_INSTALL_TESTS%
copy apps\tests\mutex\mutex.exe %ROS_INSTALL%\bin
copy apps\tests\winhello\winhello.exe %ROS_INSTALL%\bin
copy apps\tests\multiwin\multiwin.exe %ROS_INSTALL%\bin
echo.
echo installing tests (4)...
copy apps\tests\wm_paint\wm_paint.exe %ROS_INSTALL_TESTS%
copy apps\tests\bitblt\lena.bmp %ROS_INSTALL_TESTS%
copy apps\tests\bitblt\bitblt.exe %ROS_INSTALL_TESTS%
@ -148,19 +203,24 @@ copy apps\tests\sectest\sectest.exe %ROS_INSTALL_TESTS%
copy apps\tests\isotest\isotest.exe %ROS_INSTALL_TESTS%
copy apps\tests\regtest\regtest.exe %ROS_INSTALL_TESTS%
copy apps\tests\hivetest\hivetest.exe %ROS_INSTALL_TESTS%
copy apps\tests\restest\restest.exe %ROS_INSTALL_TESTS%
copy apps\tests\tokentest\tokentest.exe %ROS_INSTALL_TESTS%
copy apps\tests\tokentest\tokentst.exe %ROS_INSTALL_TESTS%
copy apps\tests\icontest\icontest.exe %ROS_INSTALL_TESTS%
copy apps\tests\icontest\icon.ico %ROS_INSTALL_TESTS%
copy apps\testsets\msvcrt\fileio\fileio.exe %ROS_INSTALL_TESTS%
copy apps\testsets\msvcrt\mbtowc\mbtowc.exe %ROS_INSTALL_TESTS%
copy apps\testsets\test\test.exe %ROS_INSTALL_TESTS%
copy apps\testsets\testperl\testperl.exe %ROS_INSTALL_TESTS%
rem echo.
rem echo installing tests (5)...
rem copy apps\tests\restest\restest.exe %ROS_INSTALL_TESTS%
rem copy apps\testsets\msvcrt\fileio\fileio.exe %ROS_INSTALL_TESTS%
rem copy apps\testsets\msvcrt\mbtowc\mbtowc.exe %ROS_INSTALL_TESTS%
rem copy apps\testsets\test\test.exe %ROS_INSTALL_TESTS%
rem copy apps\testsets\testperl\testperl.exe %ROS_INSTALL_TESTS%
echo.
echo installing fonts and media...
copy media\fonts\*.ttf %ROS_INSTALL%\media\fonts
copy media\nls\c_1252.nls %ROS_INSTALL%\system32\ansi.nls
copy media\nls\c_437.nls %ROS_INSTALL%\system32\oem.nls
copy media\nls\l_intl.nls %ROS_INSTALL%\system32\casemap.nls
copy ntoskrnl\ntoskrnl.map %ROS_INSTALL%\symbols
tools\mkhive\mkhive bootdata %ROS_INSTALL%\system32\config

View file

@ -1,4 +1,4 @@
/* $Id: cdmake.c,v 1.5 2003/07/29 20:30:11 royce Exp $ */
/* $Id: cdmake.c,v 1.6 2003/07/30 14:08:16 royce Exp $ */
/* CD-ROM Maker
by Philip J. Erdelsky
pje@acm.org
@ -44,7 +44,6 @@
#define DIR_SEPARATOR_STRING "\\"
#endif
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
@ -56,9 +55,9 @@ const BOOL FALSE = 0;
// file system parameters
#define MAX_LEVEL 8
#define MAX_NAME_LENGTH 256
#define MAX_NAME_LENGTH 8
#define MAX_CDNAME_LENGTH 8
#define MAX_EXTENSION_LENGTH 256
#define MAX_EXTENSION_LENGTH 8
#define MAX_CDEXTENSION_LENGTH 3
#define SECTOR_SIZE 2048
#define BUFFER_SIZE (8 * SECTOR_SIZE)
@ -447,16 +446,20 @@ static int check_for_punctuation(int c, const char *name)
#define strcasecmp stricmp
#endif//WIN32
/*-----------------------------------------------------------------------------
This function checks to see if there's a cdname conflict.
-----------------------------------------------------------------------------*/
int cdname_exists ( PDIR_RECORD d )
{
PDIR_RECORD p = &root;
PDIR_RECORD p = d->parent->first_record;
while ( p )
{
if ( p != d
&& !strcasecmp ( p->name_on_cd, d->name_on_cd )
&& !strcasecmp ( p->extension_on_cd, d->extension_on_cd ) )
return 1;
p = p->next_in_memory;
p = p->next_in_path_table;
}
return 0;
}
@ -477,36 +480,30 @@ void parse_filename_into_dirrecord ( const char* filename, PDIR_RECORD d )
if ( (t-d->name_on_cd) < sizeof(d->name_on_cd)-1 )
*t++ = check_for_punctuation(*s, filename);
else
error_exit ( "'%s' is not ISO-9660, aborting...", filename );
if ( (n-d->name) < sizeof(d->name)-1 )
*n++ = *s;
else
error_exit ( "'%s' is not ISO-9660, aborting...", filename );
s++;
}
*t = 0;
strcpy(d->extension, s);
t = d->extension_on_cd;
while ( *s != 0 && (t-d->extension_on_cd) < (sizeof(d->extension_on_cd)-1) )
*t++ = check_for_punctuation(*s++, filename);
while ( *s != 0 )
{
if ( (t-d->extension_on_cd) < (sizeof(d->extension_on_cd)-1) )
*t++ = check_for_punctuation(*s, filename);
else
error_exit ( "'%s' is not ISO-9660, aborting...", filename );
s++;
}
*t = 0;
*n = 0;
/* now see if this cd name already exists...*/
while ( cdname_exists ( d ) )
{
/* hmm... that name already exists, munge our name until we
no longer collide */
char* p = &d->name_on_cd[strlen(d->name_on_cd)-1];
while ( *p == '9' )
{
*p = '0';
if ( --p == d->name_on_cd )
error_exit ( "there's no way this can happen, is there?\n" );
}
if ( isdigit(*p) )
*p++;
else
*p = '0';
printf ( "'%s.%s' name collision, trying '%s.%s'\n", d->name, d->extension, d->name_on_cd, d->extension_on_cd );
}
if ( cdname_exists ( d ) )
error_exit ( "'%s' is a duplicate file name, aborting...", filename );
}
/*-----------------------------------------------------------------------------
@ -527,9 +524,13 @@ new_directory_record (struct _finddata_t *f,
d = malloc(sizeof(DIR_RECORD));
if (d == NULL)
error_exit("Insufficient memory");
memset ( d, 0, sizeof(DIR_RECORD) );
d->next_in_memory = root.next_in_memory;
root.next_in_memory = d;
/* I need the parent set before calling parse_filename_into_dirrecord(),
because that functions checks for duplicate file names*/
d->parent = parent;
parse_filename_into_dirrecord ( f->name, d );
convert_date_and_time(&d->date_and_time, &f->time_create);
@ -544,7 +545,6 @@ new_directory_record (struct _finddata_t *f,
d->size = f->size;
d->next_in_directory = parent->first_record;
parent->first_record = d;
d->parent = parent;
return d;
}
@ -564,9 +564,13 @@ new_directory_record (struct dirent *entry,
d = malloc(sizeof(DIR_RECORD));
if (d == NULL)
error_exit("Insufficient memory");
memset ( d, 0, sizeof(DIR_RECORD) );
d->next_in_memory = root.next_in_memory;
root.next_in_memory = d;
/* I need the parent set before calling parse_filename_into_dirrecord(),
because that functions checks for duplicate file names*/
d->parent = parent;
parse_filename_into_dirrecord ( entry->d_name, d );
convert_date_and_time(&d->date_and_time, &stbuf->st_mtime);
@ -585,7 +589,6 @@ new_directory_record (struct dirent *entry,
d->size = stbuf->st_size;
d->next_in_directory = parent->first_record;
parent->first_record = d;
d->parent = parent;
return d;
}