diff netinstall/main.cc @ 657:ce0b3f2eff35

[xemacs-hg @ 2001-09-09 04:37:41 by andyp] DDE, netinstall and cygwin file fixes
author andyp
date Sun, 09 Sep 2001 04:37:48 +0000
parents 3078fd1074e8
children
line wrap: on
line diff
--- a/netinstall/main.cc	Sat Sep 08 09:12:09 2001 +0000
+++ b/netinstall/main.cc	Sun Sep 09 04:37:48 2001 +0000
@@ -51,21 +51,29 @@
 	 int cmd_show)
 {
   hinstance = h;
-
-  next_dialog = IDD_SPLASH;
-
-  log (LOG_TIMESTAMP, "Starting XEmacs install");
+  int pos = -1;
+  if ((pos = strcspn(command_line, "-")) >= 0
+      &&
+      command_line[pos+1] == 'u')
+    {
+      next_dialog = IDD_UNINSTALL;
+      log (LOG_TIMESTAMP, "Starting XEmacs uninstall");
+      uninstall = 1;
+    }
+  else
+    {
+      next_dialog = IDD_SPLASH;
+      log (LOG_TIMESTAMP, "Starting XEmacs install");
+    }
 
-  char cwd[_MAX_PATH];
-  GetCurrentDirectory (sizeof (cwd), cwd);
-  local_dir = strdup (cwd);
-  log (0, "Current Directory: %s", cwd);
+  do_init(h);
 
   while (next_dialog)
     {
       switch (next_dialog)
 	{
 	case IDD_SPLASH:	do_splash (h);	break;
+	case IDD_UNINSTALL:	do_uninstall (h);	break;
 	case IDD_SOURCE:	do_source (h);	break;
 	case IDD_LOCAL_DIR:	do_local_dir (h); break;
 	case IDD_ROOT:		do_root (h);	break;