Commit in reactos/subsys/system/setup on MAIN
makefile+2-41.4 -> 1.5
setup.c+7-911.2 -> 1.3
+9-95
2 modified files
Move 'Command Prompt' link creation from setup.exe to syssetup.dll.

reactos/subsys/system/setup
makefile 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- makefile	18 Aug 2004 02:16:00 -0000	1.4
+++ makefile	28 Dec 2004 14:40:33 -0000	1.5
@@ -1,4 +1,4 @@
-# $Id: makefile,v 1.4 2004/08/18 02:16:00 navaraf Exp $
+# $Id: makefile,v 1.5 2004/12/28 14:40:33 ekohl Exp $
 
 PATH_TO_TOP = ../../..
 
@@ -10,9 +10,7 @@
 
 TARGET_INSTALLDIR = system32
 
-TARGET_SDKLIBS = kernel32.a ole32.a shell32.a shlwapi.a
-
-TARGET_GCCLIBS = uuid
+TARGET_SDKLIBS = kernel32.a
 
 TARGET_CFLAGS = -Wall -Werror -D__USE_W32API -D_WIN32_IE=0x0400
 

reactos/subsys/system/setup
setup.c 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- setup.c	14 Jan 2004 23:17:50 -0000	1.2
+++ setup.c	28 Dec 2004 14:40:33 -0000	1.3
@@ -26,27 +26,23 @@
 
 #include <windows.h>
 #include <tchar.h>
-
 #include <syssetup.h>
 
-#include <shlobj.h>
-#include <objidl.h>
-#include <shlwapi.h>
+#define NDEBUG
+#include <debug.h>
 
-#define DEBUG
 
 typedef DWORD STDCALL (*PINSTALL_REACTOS)(HINSTANCE hInstance);
 
 
 /* FUNCTIONS ****************************************************************/
 
-
 LPTSTR lstrchr(LPCTSTR s, TCHAR c)
 {
   while (*s)
     {
       if (*s == c)
-	return (LPTSTR)s;
+        return (LPTSTR)s;
       s++;
     }
 
@@ -57,74 +53,6 @@
 }
 
 
-HRESULT CreateShellLink(LPCSTR linkPath, LPCSTR cmd, LPCSTR arg, LPCSTR dir, LPCSTR iconPath, int icon_nr, LPCSTR comment)
-{
-  IShellLinkA* psl;
-  IPersistFile* ppf;
-  WCHAR buffer[MAX_PATH];
-
-  HRESULT hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, (LPVOID*)&psl);
-
-  if (SUCCEEDED(hr))
-    {
-      hr = psl->lpVtbl->SetPath(psl, cmd);
-
-      if (arg)
-        {
-          hr = psl->lpVtbl->SetArguments(psl, arg);
-        }
-
-      if (dir)
-        {
-          hr = psl->lpVtbl->SetWorkingDirectory(psl, dir);
-        }
-
-      if (iconPath)
-        {
-          hr = psl->lpVtbl->SetIconLocation(psl, iconPath, icon_nr);
-        }
-
-      if (comment)
-        {
-          hr = psl->lpVtbl->SetDescription(psl, comment);
-        }
-
-      hr = psl->lpVtbl->QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf);
-
-      if (SUCCEEDED(hr))
-        {
-          MultiByteToWideChar(CP_ACP, 0, linkPath, -1, buffer, MAX_PATH);
-
-          hr = ppf->lpVtbl->Save(ppf, buffer, TRUE);
-
-          ppf->lpVtbl->Release(ppf);
-        }
-
-      psl->lpVtbl->Release(psl);
-    }
-
-  return hr;
-}
-
-
-static VOID
-CreateCmdLink()
-{
-  char path[MAX_PATH];
-  LPSTR p;
-
-  CoInitialize(NULL);
-
-  SHGetSpecialFolderPathA(0, path, CSIDL_DESKTOP, TRUE);
-  p = PathAddBackslashA(path);
-
-  strcpy(p, "Command Prompt.lnk");
-  CreateShellLink(path, "cmd.exe", "", NULL, NULL, 0, "Open command prompt");
-
-  CoUninitialize();
-}
-
-
 static VOID
 RunNewSetup (HINSTANCE hInstance)
 {
@@ -134,22 +62,16 @@
   hDll = LoadLibrary (TEXT("syssetup"));
   if (hDll == NULL)
     {
-#ifdef DEBUG
-      OutputDebugString (TEXT("Failed to load 'syssetup'!\n"));
-#endif
+      DPRINT("Failed to load 'syssetup'!\n");
       return;
     }
 
-#ifdef DEBUG
-  OutputDebugString (TEXT("Loaded 'syssetup'!\n"));
-#endif
+  DPRINT("Loaded 'syssetup'!\n");
 
   InstallReactOS = (PINSTALL_REACTOS)GetProcAddress (hDll, "InstallReactOS");
   if (InstallReactOS == NULL)
     {
-#ifdef DEBUG
-      OutputDebugString (TEXT("Failed to get address for 'InstallReactOS()'!\n"));
-#endif
+      DPRINT("Failed to get address for 'InstallReactOS()'!\n");
       FreeLibrary (hDll);
       return;
     }
@@ -157,8 +79,6 @@
   InstallReactOS (hInstance);
 
   FreeLibrary (hDll);
-
-  CreateCmdLink();
 }
 
 
@@ -173,11 +93,7 @@
 
   CmdLine = GetCommandLine ();
 
-#ifdef DEBUG
-  OutputDebugString (TEXT("CmdLine: <"));
-  OutputDebugString (CmdLine);
-  OutputDebugString (TEXT(">\n"));
-#endif
+  DPRINT("CmdLine: <%s>\n",CmdLine);
 
   p = lstrchr (CmdLine, TEXT('-'));
   if (p == NULL)
CVSspam 0.2.8