aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes2000-08-22 21:43:12 +0000
committerAndrew Innes2000-08-22 21:43:12 +0000
commit5205d900d6011278d4dedaee60e155580614b2ed (patch)
tree1c342df8b3adc6fd1bbe14c64da8fe8557d6641c
parentda179dd049809145b746ad00f4e3fc666ab6ba59 (diff)
downloademacs-5205d900d6011278d4dedaee60e155580614b2ed.tar.gz
emacs-5205d900d6011278d4dedaee60e155580614b2ed.zip
(main): Accept /q to mean install based on addpm's
location without asking. Remove reference to emacs.bat which is now obsolete.
-rw-r--r--nt/addpm.c39
1 files changed, 25 insertions, 14 deletions
diff --git a/nt/addpm.c b/nt/addpm.c
index 5a899fd625d..ef375ee1613 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -116,16 +116,24 @@ main (argc, argv)
116 char *prog_name; 116 char *prog_name;
117 char *emacs_path; 117 char *emacs_path;
118 char *p; 118 char *p;
119 int quiet = 0;
119 120
120 /* If no args specified, use our location to set emacs_path. */ 121 /* If no args specified, use our location to set emacs_path. */
121#if 0 122#if 0
122 if (argc < 2 || argc > 3) 123 if (argc < 2 || argc > 3)
123 { 124 {
124 fprintf (stderr, "usage: addpm emacs_path [icon_path]\n"); 125 fprintf (stderr, "usage: addpm [/q] [emacs_path [icon_path]]\n");
125 exit (1); 126 exit (1);
126 } 127 }
127#endif 128#endif
128 129
130 if (argc > 1 && argv[1][0] == '/' && argv[1][1] == 'q')
131 {
132 quiet = 1;
133 --argc;
134 ++argv;
135 }
136
129 if (argc > 1) 137 if (argc > 1)
130 emacs_path = argv[1]; 138 emacs_path = argv[1];
131 else 139 else
@@ -151,21 +159,24 @@ main (argc, argv)
151 } 159 }
152 160
153 /* Tell user what we are going to do. */ 161 /* Tell user what we are going to do. */
154 { 162 if (!quiet)
155 int result; 163 {
156 164 int result;
157 char msg[ MAX_PATH ]; 165
158 sprintf (msg, "Install Emacs at %s?\n", emacs_path); 166 char msg[ MAX_PATH ];
159 result = MessageBox (NULL, msg, "Install Emacs", MB_OKCANCEL | MB_ICONQUESTION); 167 sprintf (msg, "Install Emacs at %s?\n", emacs_path);
160 if (result != IDOK) 168 result = MessageBox (NULL, msg, "Install Emacs",
161 { 169 MB_OKCANCEL | MB_ICONQUESTION);
162 fprintf (stderr, "Install cancelled\n"); 170 if (result != IDOK)
163 exit (1); 171 {
164 } 172 fprintf (stderr, "Install cancelled\n");
165 } 173 exit (1);
174 }
175 }
166 } 176 }
167 177
168 prog_name = add_registry (emacs_path) ? "runemacs.exe" : "emacs.bat"; 178 add_registry (emacs_path);
179 prog_name = "runemacs.exe";
169 180
170 DdeInitialize (&idDde, (PFNCALLBACK)DdeCallback, APPCMD_CLIENTONLY, 0); 181 DdeInitialize (&idDde, (PFNCALLBACK)DdeCallback, APPCMD_CLIENTONLY, 0);
171 182