X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=netinstall%2Fmain.cc;fp=netinstall%2Fmain.cc;h=df8a543a88643d8c3e47ff70b3e028ec5933d752;hb=a5812bf2ff9a9cf40f4ff78dcb83f5b4c295bd18;hp=4a93fb297a69e3b7cc4e95741e5c2849e6d65e6b;hpb=ccce6217f84987dff10ed3d2b60b9f0f65d8f25a;p=chise%2Fxemacs-chise.git diff --git a/netinstall/main.cc b/netinstall/main.cc index 4a93fb2..df8a543 100644 --- a/netinstall/main.cc +++ b/netinstall/main.cc @@ -51,21 +51,29 @@ WinMain (HINSTANCE h, int cmd_show) { hinstance = h; + 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"); + } - 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;