0
};
-#define COMMAND9XARGS "/E:4096 /c "
+#define COMMAND9XARGS "/E:4096 /c"
#define COMMAND9XEXE "\\command.com"
static char *batname;
static void
make_link (char *linkpath, char *title, char *target)
{
+ char argbuf[_MAX_PATH];
char *fname = concat (linkpath, "/", title, ".lnk", 0);
if (_access (fname, 0) == 0)
mkdir_p (0, fname);
- char *cmdline, *exepath, *args;
+ char *exepath, *args;
OSVERSIONINFO verinfo;
verinfo.dwOSVersionInfoSize = sizeof (verinfo);
GetVersionEx (&verinfo);
if (verinfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
- cmdline = target;
exepath = target;
args = "";
}
char windir[MAX_PATH];
GetWindowsDirectory (windir, sizeof (windir));
- cmdline = concat (windir, COMMAND9XEXE, " ", COMMAND9XARGS, target, 0);
exepath = concat (windir, COMMAND9XEXE, 0);
- args = concat (COMMAND9XARGS, target, 0);
+ sprintf (argbuf, "%s %s", COMMAND9XARGS, target);
+ args = argbuf;
}
+ msg ("make_link_2 (%s, %s, %s, %s)", exepath, args, iconname, fname);
make_link_2 (exepath, args, iconname, fname);
}
static void
make_cygwin_bat ()
{
- batname = concat (root_dir, "/cygwin.bat", 0);
+ batname = backslash (concat (root_dir, "/cygwin.bat", 0));
/* if the batch file exists, don't overwrite it */
if (_access (batname, 0) == 0)
static void
save_icon ()
{
- iconname = concat (root_dir, "/cygwin.ico", 0);
+ iconname = backslash (concat (root_dir, "/cygwin.ico", 0));
HRSRC rsrc = FindResource (NULL, "CYGWIN.ICON", "FILE");
if (rsrc == NULL)