Author: hpoussin
Date: Tue Oct 2 16:16:45 2007
New Revision: 29352
URL:
http://svn.reactos.org/svn/reactos?rev=29352&view=rev
Log:
Do not hardcode cdrom directory
Modified:
trunk/reactos/base/setup/usetup/drivesup.c
trunk/reactos/base/setup/usetup/drivesup.h
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/usetup.h
Modified: trunk/reactos/base/setup/usetup/drivesup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/drivesup…
==============================================================================
--- trunk/reactos/base/setup/usetup/drivesup.c (original)
+++ trunk/reactos/base/setup/usetup/drivesup.c Tue Oct 2 16:16:45 2007
@@ -35,7 +35,8 @@
NTSTATUS
GetSourcePaths(PUNICODE_STRING SourcePath,
- PUNICODE_STRING SourceRootPath)
+ PUNICODE_STRING SourceRootPath,
+ PUNICODE_STRING SourceRootDir)
{
OBJECT_ATTRIBUTES ObjectAttributes;
UNICODE_STRING LinkName;
@@ -73,17 +74,19 @@
if (NT_SUCCESS(Status))
{
RtlCreateUnicodeString(SourcePath,
- SourceName.Buffer);
+ SourceName.Buffer);
/* strip trailing directory */
Ptr = wcsrchr(SourceName.Buffer, L'\\');
-// if ((Ptr != NULL) &&
-// (wcsicmp(Ptr, L"\\reactos") == 0))
+ if (Ptr)
+ RtlCreateUnicodeString(SourceRootDir, Ptr);
+ else
+ RtlCreateUnicodeString(SourceRootDir, L"");
+
if (Ptr != NULL)
- *Ptr = 0;
-
+ *Ptr = 0;
RtlCreateUnicodeString(SourceRootPath,
- SourceName.Buffer);
+ SourceName.Buffer);
}
NtClose(Handle);
Modified: trunk/reactos/base/setup/usetup/drivesup.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/drivesup…
==============================================================================
--- trunk/reactos/base/setup/usetup/drivesup.h (original)
+++ trunk/reactos/base/setup/usetup/drivesup.h Tue Oct 2 16:16:45 2007
@@ -29,7 +29,8 @@
NTSTATUS
GetSourcePaths(PUNICODE_STRING SourcePath,
- PUNICODE_STRING SourceRootPath);
+ PUNICODE_STRING SourceRootPath,
+ PUNICODE_STRING SourceRootDir);
#endif /* __DRIVESUP_H__ */
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c Tue Oct 2 16:16:45 2007
@@ -74,6 +74,7 @@
HANDLE ProcessHeap;
UNICODE_STRING SourceRootPath;
+UNICODE_STRING SourceRootDir;
UNICODE_STRING SourcePath;
BOOLEAN IsUnattendedSetup = FALSE;
LONG UnattendDestinationDiskNumber;
@@ -635,7 +636,8 @@
/* Get the source path and source root path */
Status = GetSourcePaths(&SourcePath,
- &SourceRootPath);
+ &SourceRootPath,
+ &SourceRootDir);
if (!NT_SUCCESS(Status))
{
CONSOLE_PrintTextXY(6, 15, "GetSourcePaths() failed (Status 0x%08lx)",
Status);
@@ -649,6 +651,7 @@
{
CONSOLE_PrintTextXY(6, 15, "SourcePath: '%wZ'",
&SourcePath);
CONSOLE_PrintTextXY(6, 16, "SourceRootPath: '%wZ'",
&SourceRootPath);
+ CONSOLE_PrintTextXY(6, 17, "SourceRootDir: '%wZ'",
&SourceRootDir);
}
#endif
@@ -2692,7 +2695,7 @@
if (!SetupQueueCopy(SetupFileQueue,
SourceCabinet,
SourceRootPath.Buffer,
- L"\\reactos",
+ SourceRootDir.Buffer,
FileKeyName,
DirKeyValue,
TargetFileName))
@@ -3562,6 +3565,7 @@
/* Initialize global unicode strings */
RtlInitUnicodeString(&SourcePath, NULL);
RtlInitUnicodeString(&SourceRootPath, NULL);
+ RtlInitUnicodeString(&SourceRootDir, NULL);
RtlInitUnicodeString(&InstallPath, NULL);
RtlInitUnicodeString(&DestinationPath, NULL);
RtlInitUnicodeString(&DestinationArcPath, NULL);
Modified: trunk/reactos/base/setup/usetup/usetup.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.h…
==============================================================================
--- trunk/reactos/base/setup/usetup/usetup.h (original)
+++ trunk/reactos/base/setup/usetup/usetup.h Tue Oct 2 16:16:45 2007
@@ -74,6 +74,7 @@
extern HANDLE ProcessHeap;
extern UNICODE_STRING SourceRootPath;
+extern UNICODE_STRING SourceRootDir;
extern UNICODE_STRING SourcePath;
extern BOOLEAN IsUnattendedSetup;