#include <windows.h>
#include <stdio.h>
-HFONT tf;
+//HFONT tf;
LRESULT WINAPI MainWndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI
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);
DispatchMessage(&msg);
}
- DeleteObject(tf);
+ //DeleteObject(tf);
return msg.wParam;
}
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);
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:
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
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
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
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
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%
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%
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
-/* $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
#define DIR_SEPARATOR_STRING "\\"
#endif
-
typedef unsigned char BYTE;
typedef unsigned short WORD;
typedef unsigned long DWORD;
// 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)
#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;
}
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);
- *t = 0;
- *n = 0;
-
- /* now see if this cd name already exists...*/
- while ( cdname_exists ( d ) )
+ while ( *s != 0 )
{
- /* 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++;
+ if ( (t-d->extension_on_cd) < (sizeof(d->extension_on_cd)-1) )
+ *t++ = check_for_punctuation(*s, filename);
else
- *p = '0';
- printf ( "'%s.%s' name collision, trying '%s.%s'\n", d->name, d->extension, d->name_on_cd, d->extension_on_cd );
+ error_exit ( "'%s' is not ISO-9660, aborting...", filename );
+ s++;
}
+ *t = 0;
+ *n = 0;
+
+ if ( cdname_exists ( d ) )
+ error_exit ( "'%s' is a duplicate file name, aborting...", filename );
}
/*-----------------------------------------------------------------------------
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);
d->size = f->size;
d->next_in_directory = parent->first_record;
parent->first_record = d;
- d->parent = parent;
return d;
}
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);
d->size = stbuf->st_size;
d->next_in_directory = parent->first_record;
parent->first_record = d;
- d->parent = parent;
return d;
}