From: Robert Nelson Date: Fri, 6 Oct 2006 18:28:35 +0000 (+0000) Subject: Fix bug # 688. X-Git-Tag: Release-2.0.0~381 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=07caede3098ad9ba6bb1b25fb357ffd91b6c48dc;p=bacula%2Fbacula Fix bug # 688. Port bsmtp to Windows. Add Bacula/bin to directory searched for scripts/programs specified without paths in configuration files. Add bsleep.exe used in scripts to sleep between commands. Fix bugs in mtx-changer.cmd and customize bacula-sd.conf template to be Windows specific. Fix time warp in ChangeLog and technotes. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3536 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/ChangeLog b/bacula/ChangeLog index 7f103956a9..50b688fe10 100644 --- a/bacula/ChangeLog +++ b/bacula/ChangeLog @@ -2,7 +2,7 @@ General: Version 1.39.24 beta released: -02Sep06 +02Oct06 rbn Fix restore problem with c:\ prefix bug #676. rbn Verify that drive letter is valid on restore. rbn Fix re-open() options for tape. @@ -11,7 +11,7 @@ kes Eliminate the dvd specific mount routines using only the dev->mount/unmount. kes Make update_free_space a method of DEVICE and rename update_freespace. -01Sep06 +01Oct06 kes Require a messages command acl to be able to receive messages in a console. kes Add console, system, and scan job types in util.c. diff --git a/bacula/src/lib/bregex.c b/bacula/src/lib/bregex.c index cc98140304..5daefa04f3 100644 --- a/bacula/src/lib/bregex.c +++ b/bacula/src/lib/bregex.c @@ -488,51 +488,51 @@ void re_compile_initialize(void) plain_ops[(int)'\174'] = Ror; } else { quoted_ops[(int)'\174'] = Ror; - plain_ops[(int)'*'] = Rstar; - if (regexp_syntax & RE_BK_PLUS_QM) { - quoted_ops[(int)'+'] = Rplus; - quoted_ops[(int)'?'] = Roptional; - } else { - plain_ops[(int)'+'] = Rplus; - plain_ops[(int)'?'] = Roptional; - } - if (regexp_syntax & RE_NEWLINE_OR) { - plain_ops[(int)'\n'] = Ror; - } - plain_ops[(int)'\133'] = Ropenset; - plain_ops[(int)'\136'] = Rbol; - plain_ops[(int)'$'] = Reol; - plain_ops[(int)'.'] = Ranychar; - if (!(regexp_syntax & RE_NO_GNU_EXTENSIONS)) { - quoted_ops[(int)'w'] = Rwordchar; - quoted_ops[(int)'W'] = Rnotwordchar; - quoted_ops[(int)'<'] = Rwordbeg; - quoted_ops[(int)'>'] = Rwordend; - quoted_ops[(int)'b'] = Rwordbound; - quoted_ops[(int)'B'] = Rnotwordbound; - quoted_ops[(int)'`'] = Rbegbuf; - quoted_ops[(int)'\''] = Rendbuf; - } - if (regexp_syntax & RE_ANSI_HEX) { - quoted_ops[(int)'v'] = Rextended_memory; - } - for (a = 0; a < Rnum_ops; a++) { - precedences[a] = 4; - } - if (regexp_syntax & RE_TIGHT_VBAR) { - precedences[Ror] = 3; - precedences[Rbol] = 2; - precedences[Reol] = 2; - } else { - precedences[Ror] = 2; - precedences[Rbol] = 3; - precedences[Reol] = 3; - } - precedences[Rclosepar] = 1; - precedences[Rend] = 0; - regexp_context_indep_ops = (regexp_syntax & RE_CONTEXT_INDEP_OPS) != 0; - regexp_ansi_sequences = (regexp_syntax & RE_ANSI_HEX) != 0; } + plain_ops[(int)'*'] = Rstar; + if (regexp_syntax & RE_BK_PLUS_QM) { + quoted_ops[(int)'+'] = Rplus; + quoted_ops[(int)'?'] = Roptional; + } else { + plain_ops[(int)'+'] = Rplus; + plain_ops[(int)'?'] = Roptional; + } + if (regexp_syntax & RE_NEWLINE_OR) { + plain_ops[(int)'\n'] = Ror; + } + plain_ops[(int)'\133'] = Ropenset; + plain_ops[(int)'\136'] = Rbol; + plain_ops[(int)'$'] = Reol; + plain_ops[(int)'.'] = Ranychar; + if (!(regexp_syntax & RE_NO_GNU_EXTENSIONS)) { + quoted_ops[(int)'w'] = Rwordchar; + quoted_ops[(int)'W'] = Rnotwordchar; + quoted_ops[(int)'<'] = Rwordbeg; + quoted_ops[(int)'>'] = Rwordend; + quoted_ops[(int)'b'] = Rwordbound; + quoted_ops[(int)'B'] = Rnotwordbound; + quoted_ops[(int)'`'] = Rbegbuf; + quoted_ops[(int)'\''] = Rendbuf; + } + if (regexp_syntax & RE_ANSI_HEX) { + quoted_ops[(int)'v'] = Rextended_memory; + } + for (a = 0; a < Rnum_ops; a++) { + precedences[a] = 4; + } + if (regexp_syntax & RE_TIGHT_VBAR) { + precedences[Ror] = 3; + precedences[Rbol] = 2; + precedences[Reol] = 2; + } else { + precedences[Ror] = 2; + precedences[Rbol] = 3; + precedences[Reol] = 3; + } + precedences[Rclosepar] = 1; + precedences[Rend] = 0; + regexp_context_indep_ops = (regexp_syntax & RE_CONTEXT_INDEP_OPS) != 0; + regexp_ansi_sequences = (regexp_syntax & RE_ANSI_HEX) != 0; } int re_set_syntax(int syntax) { diff --git a/bacula/src/tools/bsmtp.c b/bacula/src/tools/bsmtp.c index 5c22b0c830..75cbdcdbfb 100644 --- a/bacula/src/tools/bsmtp.c +++ b/bacula/src/tools/bsmtp.c @@ -27,22 +27,12 @@ */ -#ifdef APCUPSD - -#include "apc.h" -#undef main -#define my_name_is(x) -#define bstrdup(x) strdup(x) -UPSINFO myUPS; -UPSINFO *core_ups = &myUPS; -#define MY_NAME "smtp" - -#else - #include "bacula.h" #include "jcr.h" #define MY_NAME "bsmtp" +#if defined(HAVE_WIN32) +#include #endif /* Dummy functions */ @@ -80,6 +70,9 @@ static void get_response(void) if (len > 0) { buf[len-1] = 0; } + if (debug_level >= 10) { + fprintf(stderr, "%s <-- %s\n", mailhost, buf); + } Dmsg2(10, "%s --> %s\n", mailhost, buf); if (!isdigit((int)buf[0]) || buf[0] > '3') { Pmsg2(0, _("Fatal malformed reply from %s: %s\n"), mailhost, buf); @@ -89,6 +82,9 @@ static void get_response(void) break; } } + if (ferror(rfp)) { + fprintf(stderr, _("Fatal fgets error: ERR=%s\n"), strerror(errno)); + } return; } @@ -143,9 +139,14 @@ int main (int argc, char *argv[]) char buf[MAXSTRING]; struct sockaddr_in sin; struct hostent *hp; - int s, r, i, ch; + int i, ch; unsigned long maxlines, lines; +#if defined(HAVE_WIN32) + SOCKET s; +#else + int s, r; struct passwd *pwd; +#endif char *cp, *p; time_t now = time(NULL); struct tm tm; @@ -196,9 +197,9 @@ int main (int argc, char *argv[]) break; case 'l': - Dmsg1(20, "maxlines=%s\n", optarg); - maxlines = (unsigned long) atol(optarg); - break; + Dmsg1(20, "maxlines=%s\n", optarg); + maxlines = (unsigned long) atol(optarg); + break; case '?': default: @@ -226,6 +227,12 @@ int main (int argc, char *argv[]) } } +#if defined(HAVE_WIN32) + WSADATA wsaData; + + WSAStartup(MAKEWORD(2,2), &wsaData); +#endif + /* * Find out my own host name for HELO; * if possible, get the fully qualified domain name @@ -246,11 +253,22 @@ int main (int argc, char *argv[]) * Determine from address. */ if (from_addr == NULL) { +#if defined(HAVE_WIN32) + DWORD dwSize = UNLEN + 1; + LPSTR lpszBuffer = (LPSTR)alloca(dwSize); + + if (GetUserName(lpszBuffer, &dwSize)) { + sprintf(buf, "%s@%s", lpszBuffer, my_hostname); + } else { + sprintf(buf, "unknown-user@%s", my_hostname); + } +#else if ((pwd = getpwuid(getuid())) == 0) { sprintf(buf, "userid-%d@%s", (int)getuid(), my_hostname); } else { sprintf(buf, "%s@%s", pwd->pw_name, my_hostname); } +#endif from_addr = bstrdup(buf); } Dmsg1(20, "From addr=%s\n", from_addr); @@ -278,15 +296,41 @@ hp: memcpy((char *)&sin.sin_addr, hp->h_addr, hp->h_length); sin.sin_family = hp->h_addrtype; sin.sin_port = htons(mailport); +#if defined(HAVE_WIN32) + if ((s = WSASocket(AF_INET, SOCK_STREAM, 0, NULL, 0, 0)) < 0) { + Pmsg1(0, _("Fatal socket error: ERR=%s\n"), strerror(errno)); + exit(1); + } +#else if ((s = socket(AF_INET, SOCK_STREAM, 0)) < 0) { Pmsg1(0, _("Fatal socket error: ERR=%s\n"), strerror(errno)); exit(1); } +#endif if (connect(s, (struct sockaddr *)&sin, sizeof(sin)) < 0) { Pmsg2(0, _("Fatal connect error to %s: ERR=%s\n"), mailhost, strerror(errno)); exit(1); } Dmsg0(20, "Connected\n"); + +#if defined(HAVE_WIN32) + int fdSocket = _open_osfhandle(s, _O_RDWR); + if (fdSocket == -1) { + Pmsg1(0, _("Fatal _open_osfhandle error: ERR=%s\n"), strerror(errno)); + exit(1); + } + + int fdSocket2 = dup(fdSocket); + + if ((sfp = fdopen(fdSocket, "wb")) == NULL) { + Pmsg1(0, _("Fatal fdopen error: ERR=%s\n"), strerror(errno)); + exit(1); + } + if ((rfp = fdopen(fdSocket2, "rb")) == NULL) { + Pmsg1(0, _("Fatal fdopen error: ERR=%s\n"), strerror(errno)); + exit(1); + } +#else if ((r = dup(s)) < 0) { Pmsg1(0, _("Fatal dup error: ERR=%s\n"), strerror(errno)); exit(1); @@ -299,6 +343,7 @@ hp: Pmsg1(0, _("Fatal fdopen error: ERR=%s\n"), strerror(errno)); exit(1); } +#endif /* * Send SMTP headers @@ -335,6 +380,19 @@ hp: fprintf(sfp, "Errors-To: %s\r\n", err_addr); Dmsg1(10, "Errors-To: %s\r\n", err_addr); } + +#if defined(HAVE_WIN32) + DWORD dwSize = UNLEN + 1; + LPSTR lpszBuffer = (LPSTR)alloca(dwSize); + + if (GetUserName(lpszBuffer, &dwSize)) { + fprintf(sfp, "Sender: %s@%s\r\n", lpszBuffer, my_hostname); + Dmsg2(10, "Sender: %s@%s\r\n", lpszBuffer, my_hostname); + } else { + fprintf(sfp, "Sender: unknown-user@%s\r\n", my_hostname); + Dmsg1(10, "Sender: unknown-user@%s\r\n", my_hostname); + } +#else if ((pwd = getpwuid(getuid())) == 0) { fprintf(sfp, "Sender: userid-%d@%s\r\n", (int)getuid(), my_hostname); Dmsg2(10, "Sender: userid-%d@%s\r\n", (int)getuid(), my_hostname); @@ -342,6 +400,7 @@ hp: fprintf(sfp, "Sender: %s@%s\r\n", pwd->pw_name, my_hostname); Dmsg2(10, "Sender: %s@%s\r\n", pwd->pw_name, my_hostname); } +#endif fprintf(sfp, "To: %s", argv[0]); Dmsg1(10, "To: %s", argv[0]); @@ -358,8 +417,24 @@ hp: } /* Add RFC822 date */ - localtime_r(&now, &tm); + (void)localtime_r(&now, &tm); +#if defined(HAVE_WIN32) +#if defined(HAVE_MINGW) +__MINGW_IMPORT long _dstbias; +#endif + long tzoffset = 0; + + _tzset(); + + tzoffset = _timezone; + tzoffset += _dstbias; + tzoffset /= 60; + + size_t length = strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", &tm); + sprintf(&buf[length], " %+2.2ld%2.2u", -tzoffset / 60, abs(tzoffset) % 60); +#else strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S %z", &tm); +#endif fprintf(sfp, "Date: %s\r\n", buf); Dmsg1(10, "Date: %s\r\n", buf); @@ -372,7 +447,7 @@ hp: while (fgets(buf, sizeof(buf), stdin)) { if (maxlines > 0 && ++lines > maxlines) { Dmsg1(20, "skip line because of maxlines limit: %lu\n", maxlines); - continue; + break; } buf[strlen(buf)-1] = 0; if (strcmp(buf, ".") == 0) { /* quote lone dots */ diff --git a/bacula/src/win32/Makefile b/bacula/src/win32/Makefile index 03745bcc2b..0eaaaec62c 100644 --- a/bacula/src/win32/Makefile +++ b/bacula/src/win32/Makefile @@ -8,6 +8,7 @@ DIRS= dll \ console \ wx-console \ tools \ + scripts \ installer .PHONY: $(DIRS) clean all diff --git a/bacula/src/win32/bacula.sln b/bacula/src/win32/bacula.sln index a48052fdf7..b8684d9b3c 100644 --- a/bacula/src/win32/bacula.sln +++ b/bacula/src/win32/bacula.sln @@ -117,8 +117,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "postest", "stored\postest\p {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sleep", "scripts\sleep.vcproj", "{0F56AEB0-14DA-4A80-8962-1F85A17339D0}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{0377E151-3352-487B-A5CF-24BCDC9EC43F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test Tools", "Test Tools", "{D6767108-F420-41C0-A834-2E6F487E1AB3}" @@ -162,7 +160,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cats_bdb", "cats\cats_bdb\c EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\installer.vcproj", "{6D1B0964-FB32-4916-A61C-49D7F715EAD8}" ProjectSection(ProjectDependencies) = postProject - {A0F65E06-9F18-40AC-81F6-A080852F1104} = {A0F65E06-9F18-40AC-81F6-A080852F1104} {9BA8E10D-0D82-4B25-8543-DE34641FBC10} = {9BA8E10D-0D82-4B25-8543-DE34641FBC10} {614CE916-0972-4126-9392-CD9FC0ADD7DE} = {614CE916-0972-4126-9392-CD9FC0ADD7DE} {85696E20-777A-41F6-BC00-2E7AB375B171} = {85696E20-777A-41F6-BC00-2E7AB375B171} @@ -186,116 +183,294 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\inst {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA} = {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA} {F5F063F8-11A1-475A-82E2-19759BB40B25} = {F5F063F8-11A1-475A-82E2-19759BB40B25} {558838F9-D792-4F56-AAB2-99C03687C5FF} = {558838F9-D792-4F56-AAB2-99C03687C5FF} + {AB67F297-8491-4515-8E52-BFF5340EC242} = {AB67F297-8491-4515-8E52-BFF5340EC242} + {A0F65E06-9F18-40AC-81F6-A080852F1104} = {A0F65E06-9F18-40AC-81F6-A080852F1104} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bsleep", "scripts\bsleep.vcproj", "{0F56AEB0-14DA-4A80-8962-1F85A17339D0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bsmtp", "tools\bsmtp\bsmtp.vcproj", "{AB67F297-8491-4515-8E52-BFF5340EC242}" + ProjectSection(ProjectDependencies) = postProject + {2D729599-C008-4154-BCCB-53E6A260F220} = {2D729599-C008-4154-BCCB-53E6A260F220} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms Debug|Win32 = Debug|Win32 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Win32.ActiveCfg = Debug|Win32 {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Debug|Win32.Build.0 = Debug|Win32 + {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Any CPU.ActiveCfg = Release|Win32 + {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Mixed Platforms.Build.0 = Debug|Win32 {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Win32.ActiveCfg = Release|Win32 {9BA8E10D-0D82-4B25-8543-DE34641FBC10}.Release|Win32.Build.0 = Release|Win32 + {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Win32.ActiveCfg = Debug|Win32 {A0F65E06-9F18-40AC-81F6-A080852F1104}.Debug|Win32.Build.0 = Debug|Win32 + {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Any CPU.ActiveCfg = Release|Win32 + {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Mixed Platforms.Build.0 = Debug|Win32 {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Win32.ActiveCfg = Release|Win32 {A0F65E06-9F18-40AC-81F6-A080852F1104}.Release|Win32.Build.0 = Release|Win32 + {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Win32.ActiveCfg = Debug|Win32 {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Debug|Win32.Build.0 = Debug|Win32 + {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Any CPU.ActiveCfg = Release|Win32 + {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Mixed Platforms.Build.0 = Debug|Win32 {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Win32.ActiveCfg = Release|Win32 {AAF33ADD-A4F9-4BCA-B7F9-0C35C843CC7E}.Release|Win32.Build.0 = Release|Win32 + {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Win32.ActiveCfg = Debug|Win32 {374BF775-AF68-4A88-814A-48F692DFFE5A}.Debug|Win32.Build.0 = Debug|Win32 + {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Any CPU.ActiveCfg = Release|Win32 + {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Mixed Platforms.Build.0 = Debug|Win32 {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Win32.ActiveCfg = Release|Win32 {374BF775-AF68-4A88-814A-48F692DFFE5A}.Release|Win32.Build.0 = Release|Win32 + {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Win32.ActiveCfg = Debug|Win32 {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Debug|Win32.Build.0 = Debug|Win32 + {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Any CPU.ActiveCfg = Release|Win32 + {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Mixed Platforms.Build.0 = Debug|Win32 {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Win32.ActiveCfg = Release|Win32 {E5BC5B2E-976D-4DED-AA07-5DD52BF2163F}.Release|Win32.Build.0 = Release|Win32 + {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Win32.ActiveCfg = Debug|Win32 {558838F9-D792-4F56-AAB2-99C03687C5FF}.Debug|Win32.Build.0 = Debug|Win32 + {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Any CPU.ActiveCfg = Release|Win32 + {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Mixed Platforms.Build.0 = Debug|Win32 {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Win32.ActiveCfg = Release|Win32 {558838F9-D792-4F56-AAB2-99C03687C5FF}.Release|Win32.Build.0 = Release|Win32 + {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Win32.ActiveCfg = Debug|Win32 {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Debug|Win32.Build.0 = Debug|Win32 + {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Any CPU.ActiveCfg = Release|Win32 + {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Mixed Platforms.Build.0 = Debug|Win32 {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Win32.ActiveCfg = Release|Win32 {28FB58CE-AB8C-4C60-83DA-BC1BFCC59BFF}.Release|Win32.Build.0 = Release|Win32 + {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Win32.ActiveCfg = Debug|Win32 {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Debug|Win32.Build.0 = Debug|Win32 + {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Any CPU.ActiveCfg = Release|Win32 + {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Mixed Platforms.Build.0 = Debug|Win32 {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Win32.ActiveCfg = Release|Win32 {6A435DBB-4D3D-4DAE-8CB3-E0AF169A240B}.Release|Win32.Build.0 = Release|Win32 + {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Win32.ActiveCfg = Debug|Win32 {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Debug|Win32.Build.0 = Debug|Win32 + {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Any CPU.ActiveCfg = Release|Win32 + {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Mixed Platforms.Build.0 = Debug|Win32 {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Win32.ActiveCfg = Release|Win32 {D03415F7-654E-42F4-B0E9-CB8FBE3F22FA}.Release|Win32.Build.0 = Release|Win32 + {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Win32.ActiveCfg = Debug|Win32 {F5F063F8-11A1-475A-82E2-19759BB40B25}.Debug|Win32.Build.0 = Debug|Win32 + {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Any CPU.ActiveCfg = Release|Win32 + {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Mixed Platforms.Build.0 = Debug|Win32 {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Win32.ActiveCfg = Release|Win32 {F5F063F8-11A1-475A-82E2-19759BB40B25}.Release|Win32.Build.0 = Release|Win32 + {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Win32.ActiveCfg = Debug|Win32 {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Debug|Win32.Build.0 = Debug|Win32 + {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Any CPU.ActiveCfg = Release|Win32 + {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Mixed Platforms.Build.0 = Debug|Win32 {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Win32.ActiveCfg = Release|Win32 {614CE916-0972-4126-9392-CD9FC0ADD7DE}.Release|Win32.Build.0 = Release|Win32 + {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Win32.ActiveCfg = Debug|Win32 {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Debug|Win32.Build.0 = Debug|Win32 + {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Any CPU.ActiveCfg = Release|Win32 + {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Mixed Platforms.Build.0 = Debug|Win32 {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Win32.ActiveCfg = Release|Win32 {6A7AA493-E46C-4994-B8D6-AA6C9C19C9BA}.Release|Win32.Build.0 = Release|Win32 + {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Win32.ActiveCfg = Debug|Win32 {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Debug|Win32.Build.0 = Debug|Win32 + {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Any CPU.ActiveCfg = Release|Win32 + {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Mixed Platforms.Build.0 = Debug|Win32 {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Win32.ActiveCfg = Release|Win32 {F8AF7D74-2918-422B-A7B6-4D98566B7160}.Release|Win32.Build.0 = Release|Win32 + {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Win32.ActiveCfg = Debug|Win32 {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Debug|Win32.Build.0 = Debug|Win32 + {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Any CPU.ActiveCfg = Release|Win32 + {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Mixed Platforms.Build.0 = Debug|Win32 {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Win32.ActiveCfg = Release|Win32 {56EADEDB-FBED-4758-8B54-7B0B47ABDABF}.Release|Win32.Build.0 = Release|Win32 + {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Win32.ActiveCfg = Debug|Win32 {496415E0-AF44-4AD8-8C99-91B837DDF469}.Debug|Win32.Build.0 = Debug|Win32 + {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Any CPU.ActiveCfg = Release|Win32 + {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Mixed Platforms.Build.0 = Debug|Win32 {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Win32.ActiveCfg = Release|Win32 {496415E0-AF44-4AD8-8C99-91B837DDF469}.Release|Win32.Build.0 = Release|Win32 + {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Win32.ActiveCfg = Debug|Win32 {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Debug|Win32.Build.0 = Debug|Win32 + {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Any CPU.ActiveCfg = Release|Win32 + {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Mixed Platforms.Build.0 = Debug|Win32 {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Win32.ActiveCfg = Release|Win32 {CAD30B43-D93B-47D5-9161-6A3E9BADCC1D}.Release|Win32.Build.0 = Release|Win32 + {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {208D3989-794B-47A2-9D04-D7AEE1524078}.Debug|Win32.ActiveCfg = Debug|Win32 + {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Any CPU.ActiveCfg = Release|Win32 + {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 {208D3989-794B-47A2-9D04-D7AEE1524078}.Release|Win32.ActiveCfg = Release|Win32 - {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Win32.Build.0 = Debug|Win32 - {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Win32.ActiveCfg = Release|Win32 - {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Win32.Build.0 = Release|Win32 + {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Win32.ActiveCfg = Debug|Win32 {2D729599-C008-4154-BCCB-53E6A260F220}.Debug|Win32.Build.0 = Debug|Win32 + {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Any CPU.ActiveCfg = Release|Win32 + {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Mixed Platforms.Build.0 = Debug|Win32 {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Win32.ActiveCfg = Release|Win32 {2D729599-C008-4154-BCCB-53E6A260F220}.Release|Win32.Build.0 = Release|Win32 + {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Win32.ActiveCfg = Debug|Win32 {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Debug|Win32.Build.0 = Debug|Win32 + {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Any CPU.ActiveCfg = Release|Win32 + {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Mixed Platforms.Build.0 = Debug|Win32 {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Win32.ActiveCfg = Release|Win32 {B52BD53B-0E57-4E9A-A601-8E8171BA1CFC}.Release|Win32.Build.0 = Release|Win32 + {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Win32.ActiveCfg = Debug|Win32 {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Debug|Win32.Build.0 = Debug|Win32 + {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Any CPU.ActiveCfg = Release|Win32 + {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Mixed Platforms.Build.0 = Debug|Win32 {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Win32.ActiveCfg = Release|Win32 {8B79A2B5-8889-43D4-9B92-9AE8A6F00413}.Release|Win32.Build.0 = Release|Win32 + {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Win32.ActiveCfg = Debug|Win32 {85696E20-777A-41F6-BC00-2E7AB375B171}.Debug|Win32.Build.0 = Debug|Win32 + {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Any CPU.ActiveCfg = Release|Win32 + {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Mixed Platforms.Build.0 = Debug|Win32 {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Win32.ActiveCfg = Release|Win32 {85696E20-777A-41F6-BC00-2E7AB375B171}.Release|Win32.Build.0 = Release|Win32 + {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Win32.ActiveCfg = Debug|Win32 {2FB961E5-213C-4475-8CB3-72F904D40752}.Debug|Win32.Build.0 = Debug|Win32 + {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Any CPU.ActiveCfg = Release|Win32 + {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Mixed Platforms.Build.0 = Debug|Win32 {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Win32.ActiveCfg = Release|Win32 {2FB961E5-213C-4475-8CB3-72F904D40752}.Release|Win32.Build.0 = Release|Win32 + {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Win32.ActiveCfg = Debug|Win32 {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Debug|Win32.Build.0 = Debug|Win32 + {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Any CPU.ActiveCfg = Release|Win32 + {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Mixed Platforms.Build.0 = Debug|Win32 {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Win32.ActiveCfg = Release|Win32 {56D8C233-610E-4EE4-A73A-72CEF1C6A33A}.Release|Win32.Build.0 = Release|Win32 + {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Win32.ActiveCfg = Debug|Win32 {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Debug|Win32.Build.0 = Debug|Win32 + {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Any CPU.ActiveCfg = Release|Win32 + {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Mixed Platforms.Build.0 = Debug|Win32 {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Win32.ActiveCfg = Release|Win32 {1E6FC8D7-0A08-461A-B9AB-FD3CC5DC0B9C}.Release|Win32.Build.0 = Release|Win32 + {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Mixed Platforms.Build.0 = Debug|Win32 {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Win32.ActiveCfg = Debug|Win32 {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Debug|Win32.Build.0 = Debug|Win32 + {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Any CPU.ActiveCfg = Release|Win32 + {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Mixed Platforms.Build.0 = Debug|Win32 {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Win32.ActiveCfg = Release|Win32 {6D1B0964-FB32-4916-A61C-49D7F715EAD8}.Release|Win32.Build.0 = Release|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Win32.ActiveCfg = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Debug|Win32.Build.0 = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Any CPU.ActiveCfg = Release|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Mixed Platforms.Build.0 = Debug|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Win32.ActiveCfg = Release|Win32 + {0F56AEB0-14DA-4A80-8962-1F85A17339D0}.Release|Win32.Build.0 = Release|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Any CPU.ActiveCfg = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Mixed Platforms.Build.0 = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Win32.ActiveCfg = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Debug|Win32.Build.0 = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Any CPU.ActiveCfg = Release|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Mixed Platforms.ActiveCfg = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Mixed Platforms.Build.0 = Debug|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Win32.ActiveCfg = Release|Win32 + {AB67F297-8491-4515-8E52-BFF5340EC242}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -323,9 +498,10 @@ Global {F8AF7D74-2918-422B-A7B6-4D98566B7160} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} {56EADEDB-FBED-4758-8B54-7B0B47ABDABF} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} {496415E0-AF44-4AD8-8C99-91B837DDF469} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} - {0F56AEB0-14DA-4A80-8962-1F85A17339D0} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} {614CE916-0972-4126-9392-CD9FC0ADD7DE} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} {85696E20-777A-41F6-BC00-2E7AB375B171} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} {56D8C233-610E-4EE4-A73A-72CEF1C6A33A} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} + {0F56AEB0-14DA-4A80-8962-1F85A17339D0} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} + {AB67F297-8491-4515-8E52-BFF5340EC242} = {37F903FE-3474-4C93-AD5B-987CB6A92E62} EndGlobalSection EndGlobal diff --git a/bacula/src/win32/compat/compat.cpp b/bacula/src/win32/compat/compat.cpp index 0366cfe3ac..4db72e8889 100644 --- a/bacula/src/win32/compat/compat.cpp +++ b/bacula/src/win32/compat/compat.cpp @@ -1558,7 +1558,6 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs) const char *current = cmdline; - bool bHasBlanks = false; bool bQuoted = false; /* Skip initial whitespace */ @@ -1588,9 +1587,7 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs) for ( ; *current != '\0'; current++) { - if (*current == ' ') { - bHasBlanks = true; - } else if (*current == '.') { + if (*current == '.') { pExtension = current; } else if ((*current == '\\' || *current == '/') && current[1] != '\0') { pBasename = ¤t[1]; @@ -1631,68 +1628,62 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs) pExeEnd = current; } - if (!bQuoted) { - bHasBlanks = false; - } - bool bHasPathSeparators = pExeStart != pBasename; - /* We have the pointers to all the useful parts of the name */ + /* We have pointers to all the useful parts of the name */ /* Default extensions in the order cmd.exe uses to search */ static const char ExtensionList[][5] = { ".com", ".exe", ".bat", ".cmd" }; DWORD dwBasePathLength = pExeEnd - pExeStart; - if (bHasBlanks) { - DWORD dwShortNameLength = 0; - char *pPathname = (char *)alloca(MAX_PATHLENGTH + 1); - char *pShortPathname = (char *)alloca(MAX_PATHLENGTH + 1); - - pPathname[MAX_PATHLENGTH] = '\0'; - pShortPathname[MAX_PATHLENGTH] = '\0'; - - memcpy(pPathname, pExeStart, dwBasePathLength); - pPathname[dwBasePathLength] = '\0'; - - if (pExtension == NULL) { - /* Try appending extensions */ - for (int index = 0; index < (int)(sizeof(ExtensionList) / sizeof(ExtensionList[0])); index++) { - - if (!bHasPathSeparators) { - /* There are no path separators, search in the standard locations */ - dwShortNameLength = SearchPath(NULL, pPathname, ExtensionList[index], MAX_PATHLENGTH, pShortPathname, NULL); - if (dwShortNameLength > 0 && dwShortNameLength <= MAX_PATHLENGTH) { - memcpy(pPathname, pShortPathname, dwShortNameLength); - pPathname[dwShortNameLength] = '\0'; - break; - } - } else { - bstrncpy(&pPathname[dwBasePathLength], ExtensionList[index], MAX_PATHLENGTH - dwBasePathLength); - if (GetFileAttributes(pPathname) != INVALID_FILE_ATTRIBUTES) { - break; - } - } - } - } else { + DWORD dwAltNameLength = 0; + char *pPathname = (char *)alloca(MAX_PATHLENGTH + 1); + char *pAltPathname = (char *)alloca(MAX_PATHLENGTH + 1); + + pPathname[MAX_PATHLENGTH] = '\0'; + pAltPathname[MAX_PATHLENGTH] = '\0'; + + memcpy(pPathname, pExeStart, dwBasePathLength); + pPathname[dwBasePathLength] = '\0'; + + if (pExtension == NULL) { + /* Try appending extensions */ + for (int index = 0; index < (int)(sizeof(ExtensionList) / sizeof(ExtensionList[0])); index++) { + if (!bHasPathSeparators) { /* There are no path separators, search in the standard locations */ - dwShortNameLength = SearchPath(NULL, pPathname, NULL, MAX_PATHLENGTH, pShortPathname, NULL); - if (dwShortNameLength == 0 || dwShortNameLength > MAX_PATHLENGTH) { - return false; + dwAltNameLength = SearchPath(NULL, pPathname, ExtensionList[index], MAX_PATHLENGTH, pAltPathname, NULL); + if (dwAltNameLength > 0 && dwAltNameLength <= MAX_PATHLENGTH) { + memcpy(pPathname, pAltPathname, dwAltNameLength); + pPathname[dwAltNameLength] = '\0'; + break; + } + } else { + bstrncpy(&pPathname[dwBasePathLength], ExtensionList[index], MAX_PATHLENGTH - dwBasePathLength); + if (GetFileAttributes(pPathname) != INVALID_FILE_ATTRIBUTES) { + break; } - - memcpy(pPathname, pShortPathname, dwShortNameLength); - pPathname[dwShortNameLength] = '\0'; } } + } else if (!bHasPathSeparators) { + /* There are no path separators, search in the standard locations */ + dwAltNameLength = SearchPath(NULL, pPathname, NULL, MAX_PATHLENGTH, pAltPathname, NULL); + if (dwAltNameLength == 0 || dwAltNameLength > MAX_PATHLENGTH) { + return false; + } + + memcpy(pPathname, pAltPathname, dwAltNameLength); + pPathname[dwAltNameLength] = '\0'; + } - dwShortNameLength = GetShortPathName(pPathname, pShortPathname, MAX_PATHLENGTH); + if (strchr(pPathname, ' ') != NULL) { + dwAltNameLength = GetShortPathName(pPathname, pAltPathname, MAX_PATHLENGTH); - if (dwShortNameLength > 0 && dwShortNameLength <= MAX_PATHLENGTH) { - *pexe = (char *)malloc(dwShortNameLength + 1); + if (dwAltNameLength > 0 && dwAltNameLength <= MAX_PATHLENGTH) { + *pexe = (char *)malloc(dwAltNameLength + 1); if (*pexe != NULL) { - memcpy(*pexe, pShortPathname, dwShortNameLength + 1); + memcpy(*pexe, pAltPathname, dwAltNameLength + 1); } else { return false; } @@ -1700,11 +1691,10 @@ GetApplicationName(const char *cmdline, char **pexe, const char **pargs) return false; } } else { - /* There are no blanks so we don't need to munge the name */ - *pexe = (char *)malloc(dwBasePathLength + 1); + DWORD dwPathnameLength = strlen(pPathname); + *pexe = (char *)malloc(dwPathnameLength + 1); if (*pexe != NULL) { - memcpy(*pexe, pExeStart, dwBasePathLength); - (*pexe)[dwBasePathLength] = '\0'; + memcpy(*pexe, pPathname, dwPathnameLength + 1); } else { return false; } diff --git a/bacula/src/win32/installer/Makefile b/bacula/src/win32/installer/Makefile index 5dc52baf67..61af0e4294 100644 --- a/bacula/src/win32/installer/Makefile +++ b/bacula/src/win32/installer/Makefile @@ -35,6 +35,8 @@ BACULA_BINARIES := \ bextract.exe \ bls.exe \ bscan.exe \ + bsleep.exe \ + bsmtp.exe \ btape.exe \ dbcheck.exe \ scsilist.exe \ diff --git a/bacula/src/win32/installer/bacula-sd.conf.in b/bacula/src/win32/installer/bacula-sd.conf.in index 5aa3753785..d5e7834a1c 100644 --- a/bacula/src/win32/installer/bacula-sd.conf.in +++ b/bacula/src/win32/installer/bacula-sd.conf.in @@ -7,7 +7,7 @@ # on the "Archive Device" directive in the Device # resource. If you change the Name and/or the # "Media Type" in the Device resource, please ensure -# that dird.conf has corresponding changes. +# that bacula-dir.conf has corresponding changes. # Storage { # definition of myself @@ -45,12 +45,12 @@ Director { Device { Name = FileStorage Media Type = File - Archive Device = /tmp - LabelMedia = yes; # lets Bacula label unlabeled media - Random Access = Yes; - AutomaticMount = yes; # when device opened, read it - RemovableMedia = no; - AlwaysOpen = no; + Archive Device = "C:\\Temp" + LabelMedia = yes # lets Bacula label unlabeled media + Random Access = Yes + AutomaticMount = yes # when device opened, read it + RemovableMedia = no + AlwaysOpen = no } # @@ -60,142 +60,49 @@ Device { # Name = Autochanger # Device = Drive-1 # Device = Drive-2 -# Changer Command = "/home/kern/bacula/bin/mtx-changer %c %o %S %a %d" -# Changer Device = /dev/sg0 +# Changer Command = "mtx-changer %c %o %S %a %d" +# Changer Device = Changer0 #} #Device { # Name = Drive-1 # # Drive Index = 0 # Media Type = DLT-8000 -# Archive Device = /dev/nst0 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; +# Device Type = Tape +# Archive Device = Tape0 +# AutomaticMount = yes # when device opened, read it +# AlwaysOpen = yes +# RemovableMedia = yes +# RandomAccess = no # AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# Alert Command = "tapeinfo -f %c | findstr TapeAlert" #} #Device { # Name = Drive-2 # # Drive Index = 1 # Media Type = DLT-8000 -# Archive Device = /dev/nst1 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; +# Device Type = Tape +# Archive Device = Tape1 +# AutomaticMount = yes # when device opened, read it +# AlwaysOpen = yes +# RemovableMedia = yes +# RandomAccess = no # AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -# Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" +# Alert Command = "tapeinfo -f %c | findstr TapeAlert" #} -# -# A Linux or Solaris tape drive # #Device { # Name = DDS-4 # # Media Type = DDS-4 -# Archive Device = @TAPEDRIVE@ -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -## Changer Command = "@bin_dir@\\mtx-changer %c %o %S %a %d" -## Changer Device = /dev/sg0 -## AutoChanger = yes -# # Enable the Alert command only if you have the mtx package loaded -## Alert Command = "sh -c 'tapeinfo -f %c |grep TapeAlert|cat'" -#} - -# -# A FreeBSD tape drive -# -#Device { -# Name = DDS-4 -# Description = "DDS-4 for FreeBSD" -# Media Type = DDS-4 -# Archive Device = /dev/nsa1 -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = yes -# Offline On Unmount = no -# Hardware End of Medium = no -# BSF at EOM = yes -# Backward Space Record = no -# Fast Forward Space File = no -# TWO EOF = yes -#} - -# -# A OnStream tape drive. -# You need the kernel osst driver 0.9.14 or later, and -# do "mt -f /dev/nosst0 defblksize 32768" once as root. -# -#Device { -# Name = OnStream -# Description = "OnStream drive on Linux" -# Media Type = OnStream -# Archive Device = @TAPEDRIVE@ -# AutomaticMount = yes; # when device opened, read it +# Device Type = Tape +# Archive Device = Tape0 +# AutomaticMount = yes # when device opened, read it # AlwaysOpen = yes -# Offline On Unmount = no -## The min/max blocksizes of 32768 are *required* -# Minimum Block Size = 32768 -# Maximum Block Size = 32768 -#} - -# -# A DVD device -# -#Device { -# Name = "DVD-Writer" -# Media Type = DVD -# Archive Device = /dev/hdc -# LabelMedia = yes; # lets Bacula label unlabeled media -# Random Access = Yes; -# AutomaticMount = yes; # when device opened, read it -# RemovableMedia = yes; -# AlwaysOpen = no; -# MaximumPartSize = 800M; -# RequiresMount = yes; -# MountPoint = /mnt/cdrom; -# MountCommand = "/bin/mount -t iso9660 -o ro %a %m"; -# UnmountCommand = "/bin/umount %m"; -# SpoolDirectory = /tmp/backup; -# WritePartCommand = "/etc/bacula/dvd-handler %a write %e %v" -# FreeSpaceCommand = "/etc/bacula/dvd-handler %a free" -#} - -# -# For OpenBSD OS >= 3.6 -# -#Device { -# Name = DDS-3 -# Media Type = DDS-3 -# Archive Device = /dev/nrst0 -# Use MTIOCGET= no -# BSF at EOM = yes -# TWO EOF = no -# AutomaticMount = yes; -# AlwaysOpen = yes; -# RemovableMedia = yes; -# RandomAccess = no; -#} - -# -# A very old Exabyte with no end of media detection -# -#Device { -# Name = "Exabyte 8mm" -# Media Type = "8mm" -# Archive Device = @TAPEDRIVE@ -# Hardware end of medium = No; -# AutomaticMount = yes; # when device opened, read it -# AlwaysOpen = Yes; -# RemovableMedia = yes; -# RandomAccess = no; +# RemovableMedia = yes +# RandomAccess = no +# Alert Command = "tapeinfo -f %c | findstr TapeAlert" #} # diff --git a/bacula/src/win32/installer/winbacula.nsi b/bacula/src/win32/installer/winbacula.nsi index 44f01adce7..c403c810c0 100644 --- a/bacula/src/win32/installer/winbacula.nsi +++ b/bacula/src/win32/installer/winbacula.nsi @@ -365,6 +365,8 @@ Function InstallCommonFiles File "${DEPKGS_BIN}\zlib1.dll.manifest" !endif File "${DEPKGS_BIN}\openssl.exe" + File "${BACULA_BIN}\bsleep.exe" + File "${BACULA_BIN}\bsmtp.exe" File "${BACULA_BIN}\bacula.dll" CreateShortCut "$SMPROGRAMS\Bacula\View Readme.lnk" "write.exe" '"$INSTDIR\Readme.txt"' @@ -441,11 +443,13 @@ Section "-Initialize" ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\\\" FileWrite $R1 's;@working_dir@;$R2;$\r$\n' + ${StrRep} $R2 "$APPDATA\Bacula\Work" "\" "\\" + FileWrite $R1 's;@working_dir_cmd@;$R2;$\r$\n' ${StrRep} $R2 "$INSTDIR\bin" "\" "\\\\" FileWrite $R1 's;@bin_dir@;$R2;$\r$\n' - - FileWrite $R1 's;@TAPEDRIVE@;Tape0;$\r$\n' + ${StrRep} $R2 "$INSTDIR\bin" "\" "\\" + FileWrite $R1 's;@bin_dir_cmd@;$R2;$\r$\n' Call IsDirectorSelected Pop $R2 @@ -602,7 +606,13 @@ Section "Storage Service" SecStorageDaemon File "${BACULA_BIN}\bscan.exe" File "${BACULA_BIN}\btape.exe" File "${BACULA_BIN}\scsilist.exe" - File /oname=mtx-changer.cmd ${SCRIPT_DIR}\mtx-changer.cmd + + ${Unless} ${FileExists} "${BACULA_BIN}\mtx-changer.cmd" + File "/oname=$PLUGINSDIR\mtx-changer.cmd" "${SCRIPT_DIR}\mtx-changer.cmd" + + nsExec::ExecToLog '$PLUGINSDIR\sed.exe -f "$PLUGINSDIR\config.sed" -i.bak "$PLUGINSDIR\mtx-changer.cmd"' + CopyFiles "$PLUGINSDIR\mtx-changer.cmd" "$INSTDIR\bin\mtx-changer.cmd" + ${EndUnless} ${Unless} ${FileExists} "$APPDATA\Bacula\bacula-sd.conf" File "/oname=$PLUGINSDIR\bacula-sd.conf.in" "bacula-sd.conf.in" diff --git a/bacula/src/win32/scripts/Makefile b/bacula/src/win32/scripts/Makefile new file mode 100644 index 0000000000..46935bc24a --- /dev/null +++ b/bacula/src/win32/scripts/Makefile @@ -0,0 +1,38 @@ +# +# Makefile for win32 bacula executables +# Using MinGW cross-compiler on GNU/Linux +# +# Written by Robert Nelson, June 2006 +# + +include ../Makefile.inc + +########################################################################## + +BSLEEP_OBJS = \ + $(OBJDIR)/bsleep.o + +ALL_OBJS = \ + $(BSLEEP_OBJS) + +###################################################################### + +# Targets + +.PHONY: all clean + +all: $(BINDIR)/bsleep.exe + +clean: + @echo "Cleaning `pwd`" + $(call clean_obj,$(ALL_OBJS)) + $(call clean_exe,$(BINDIR)/bsleep.exe) + +# +# Rules +# + +$(BINDIR)/bsleep.exe: $(BSLEEP_OBJS) + $(call link_conapp) + +include ../Makefile.rules diff --git a/bacula/src/win32/scripts/bsleep.c b/bacula/src/win32/scripts/bsleep.c new file mode 100644 index 0000000000..4fd6cd666d --- /dev/null +++ b/bacula/src/win32/scripts/bsleep.c @@ -0,0 +1,23 @@ +#include +#include + +int +main(int argc, const char ** argv) +{ + int nsecs; + + if (argc != 2) + { + fputs("usage: bsleep \n n = number of seconds\n", stderr); + exit(1); + } + + if (sscanf(argv[1], "%d", &nsecs) != 1) + { + fputs("sleep: incorrect argument, must be number of seconds to sleep\n", stderr); + exit(1); + } + + Sleep(nsecs * 1000); + exit(0); +} diff --git a/bacula/src/win32/scripts/bsleep.vcproj b/bacula/src/win32/scripts/bsleep.vcproj new file mode 100644 index 0000000000..52966bccda --- /dev/null +++ b/bacula/src/win32/scripts/bsleep.vcproj @@ -0,0 +1,199 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bacula/src/win32/scripts/mtx-changer.cmd b/bacula/src/win32/scripts/mtx-changer.cmd index 3433e41383..4e26328375 100644 --- a/bacula/src/win32/scripts/mtx-changer.cmd +++ b/bacula/src/win32/scripts/mtx-changer.cmd @@ -7,25 +7,25 @@ REM $Id$ REM REM If you set in your Device resource REM -REM Changer Command = "path-to-this-script/mtx-changer %c %o %S %a %d" +REM Changer Command = "mtx-changer %c %o %S %a %d" REM you will have the following input to this script: REM -REM So Bacula will always call with all the following arguments, even though +REM Bacula will always call with all the following arguments, even though REM in come cases, not all are used. REM REM mtx-changer "changer-device" "command" "slot" "archive-device" "drive-index" -REM $1 $2 $3 $4 $5 +REM %1 %2 %3 %4 %5 REM REM for example: REM -REM mtx-changer /dev/sg0 load 1 /dev/nst0 0 (on a Linux system) +REM mtx-changer Changer0 load 1 Tape0 0 REM REM will request to load the first cartidge into drive 0, where -REM the SCSI control channel is /dev/sg0, and the read/write device -REM is /dev/nst0. +REM the changer device is Changer0, and the read/write device +REM is Tape0. REM -REM If you need to an offline, refer to the drive as $4 -REM e.g. mt -f $4 offline +REM If you need to an offline, refer to the drive as %4 +REM e.g. mt -f %4 offline REM REM Many changers need an offline after the unload. Also many REM changers need a sleep 60 after the mtx load. @@ -35,14 +35,14 @@ REM the mtx exit code or a 0. If the script exits with a non-zero REM exit code, Bacula will assume the request failed. REM -SET MTX=@MTX@ -SET MT=@MT@ -SET working_dir=@working_dir@ +SET MTX="@bin_dir_cmd@\mtx.exe" +SET MT="@bin_dir_cmd@\mt.exe" +SET working_dir=@working_dir_cmd@ -SET dbgfile=%working_dir%\mtx.log +SET dbgfile="%working_dir%\mtx.log" REM to turn on logging, uncomment the following line -REM findstr xxx >%working_dir%\mtx.log +REM findstr xxx >"%working_dir%\mtx.log" REM REM check parameter count on commandline @@ -99,7 +99,8 @@ GOTO :cmdUnknown %MTX% -f %ctl% load %slot% %drive% SET rtn=%ERRORLEVEL% IF ERRORLEVEL 1 GOTO :cmdExit - REM %MT% -f %device% load +REM %MT% -f %device% load +REM bsleep 5 CALL :wait_for_drive %device% GOTO :cmdExit @@ -113,7 +114,7 @@ REM %MTX% -f %ctl% inventory IF ERRORLEVEL 1 GOTO :cmdExit FOR /F "usebackq tokens=3,6 delims==: " %%i in ( `findstr /R /C:" *Storage Element [0-9]*:.*Full" %TMPFILE%` ) do echo %%i:%%j FOR /F "usebackq tokens=7,10" %%i in ( `findstr /R /C:"^Data Transfer Element [0-9]*:Full (Storage Element [0-9]" %TMPFILE%` ) do echo %%i:%%j - DEL /F "%TMPFILE%" >nul 2>&1 + DEL /F %TMPFILE% >nul 2>&1 REM REM If you have a VXA PacketLoader and the above does not work, try REM turning it off and enabling the following line. @@ -129,7 +130,7 @@ REM %MTX% -f %ctl% status | grep " *Storage Element [0-9]*:.*Full" | sed "s/*S IF ERRORLEVEL 1 GOTO :cmdExit FOR /F "usebackq tokens=7" %%i in ( `findstr /R /C:"^Data Transfer Element %drive%:Full" %TMPFILE%` ) do echo %%i findstr /R /C:"^Data Transfer Element %drive%:Empty" %TMPFILE% >nul && echo 0 - DEL /F "%TMPFILE%" >nul 2>&1 + DEL /F %TMPFILE% >nul 2>&1 GOTO :cmdExit :cmdSlots @@ -139,7 +140,7 @@ REM %MTX% -f %ctl% status | grep " *Storage Element [0-9]*:.*Full" | sed "s/*S SET rtn=%ERRORLEVEL% IF ERRORLEVEL 1 GOTO :cmdExit FOR /F "usebackq tokens=5" %%i in ( `findstr /R /C:" *Storage Changer" %TMPFILE%` ) do echo %%i - DEL /F "%TMPFILE%" >nul 2>&1 + DEL /F %TMPFILE% >nul 2>&1 GOTO :cmdExit :cmdExit @@ -153,7 +154,7 @@ REM REM log whats done REM :debug - IF NOT EXIST "%dbgfile%" GOTO :EOF + IF NOT EXIST %dbgfile% GOTO :EOF FOR /F "usebackq tokens=2-4,5-7 delims=/:. " %%i in ( '%DATE% %TIME%' ) do SET TIMESTAMP=%%k%%i%%j-%%l:%%m:%%n ECHO %TIMESTAMP% %*>> %dbgfile% GOTO :EOF @@ -162,9 +163,8 @@ REM REM Create a temporary file REM :make_temp_file - REM SET TMPFILE=%working_dir%\mtx.tmp - SET TMPFILE=c:\bacula.test\working\mtx.tmp - IF EXIST "%TMPFILE%" ( + SET TMPFILE="%working_dir%\mtx.tmp" + IF EXIST %TMPFILE% ( ECHO Temp file security problem on: %TMPFILE% EXIT /B 1 ) @@ -172,33 +172,16 @@ REM REM REM The purpose of this function to wait a maximum -REM time for the drive. It will -REM return as soon as the drive is ready, or after -REM waiting a maximum of 300 seconds. -REM Note, this is very system dependent, so if you are -REM not running on Linux, you will probably need to -REM re-write it, or at least change the grep target. +REM time for the drive. It will return as soon as +REM the drive is ready, or after waiting a maximum +REM of 300 seconds. REM :wait_for_drive FOR /L %%i IN ( 1, 1, 300 ) DO ( %MT% -f %1 status | findstr ONLINE >NUL 2>&1 IF %ERRORLEVEL%==0 GOTO :EOF CALL :debug "Device %1 - not ready, retrying..." - CALL :sleep 1 + bsleep 1 ) CALL :debug "Device %1 - not ready, timed out..." GOTO :EOF - -:sleep - CALL :get_secs - SET start_time=%ERRORLEVEL% - SET /A end_time=100*%1+start_time -:sleep_wait - CALL :get_secs - IF %ERRORLEVEL% LSS %start_time% GOTO :sleep - IF %ERRORLEVEL% LSS %end_time% GOTO :sleep_wait - GOTO :EOF - -:get_secs - FOR /F "tokens=3,4 delims=:. " %%i IN ( "%TIME%" ) do SET /A "secs= ( 1%%i %% 100 ) * 100 + ( 1%%j %% 100 )" - EXIT /B %secs% diff --git a/bacula/src/win32/scripts/sleep.c b/bacula/src/win32/scripts/sleep.c deleted file mode 100644 index 5e72de5544..0000000000 --- a/bacula/src/win32/scripts/sleep.c +++ /dev/null @@ -1,23 +0,0 @@ -#include -#include - -int -main(int argc, const char ** argv) -{ - int nsecs; - - if (argc != 2) - { - fputs("usage: sleep \n n = number of seconds\n", stderr); - exit(1); - } - - if (sscanf(argv[1], "%d", &nsecs) != 1) - { - fputs("sleep: incorrect argument, must be number of seconds to sleep\n", stderr); - exit(1); - } - - Sleep(nsecs * 1000); - exit(0); -} diff --git a/bacula/src/win32/scripts/sleep.vcproj b/bacula/src/win32/scripts/sleep.vcproj deleted file mode 100644 index 5ef0b19a1d..0000000000 --- a/bacula/src/win32/scripts/sleep.vcproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bacula/src/win32/stored/baculasd/winres.rc b/bacula/src/win32/stored/baculasd/winres.rc index 26cb994eae..129fd58709 100644 --- a/bacula/src/win32/stored/baculasd/winres.rc +++ b/bacula/src/win32/stored/baculasd/winres.rc @@ -138,5 +138,5 @@ CAPTION N_("Bacula Status") FONT 8, "Courier New" BEGIN DEFPUSHBUTTON "&OK",IDOK,355,5,51,15 - EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | LBS_NOSEL | LBS_NOINTEGRALHEIGHT + EDITTEXT IDC_TEXTDISPLAY, 2, 2, 350, 240, WS_VSCROLL | WS_HSCROLL | WS_BORDER | ES_READONLY | ES_MULTILINE END diff --git a/bacula/src/win32/tools/Makefile b/bacula/src/win32/tools/Makefile index f27a67ab10..31080f0053 100644 --- a/bacula/src/win32/tools/Makefile +++ b/bacula/src/win32/tools/Makefile @@ -35,6 +35,8 @@ ALL_OBJS = \ $(DIRCONF_OBJS) \ $(OBJDIR)/bsmtp.o \ $(OBJDIR)/dbcheck.o \ + $(OBJDIR)/scsilist.o \ + $(OBJDIR)/ScsiDeviceList.o \ $(OBJDIR)/fstype.o \ $(OBJDIR)/drivetype.o \ $(OBJDIR)/testfind.o \ @@ -49,22 +51,19 @@ ALL_OBJS = \ .PHONY: all clean all: \ - $(BINDIR)/dbcheck.exe $(BINDIR)/fstype.exe $(BINDIR)/drivetype.exe \ - $(BINDIR)/testfind.exe $(BINDIR)/testls.exe $(BINDIR)/bregex.exe \ - $(BINDIR)/bwild.exe $(BINDIR)/scsilist.exe - -# -# bsmtp needs passwd file emulation -# -# $(BINDIR)/bsmtp.exe + $(BINDIR)/bsmtp.exe $(BINDIR)/dbcheck.exe $(BINDIR)/scsilist.exe \ + $(BINDIR)/drivetype.exe $(BINDIR)/fstype.exe \ + $(BINDIR)/testfind.exe $(BINDIR)/testls.exe \ + $(BINDIR)/bregex.exe $(BINDIR)/bwild.exe clean: @echo "Cleaning `pwd`" $(call clean_obj,$(ALL_OBJS)) $(call clean_exe,$(BINDIR)/bsmtp.exe) $(call clean_exe,$(BINDIR)/dbcheck.exe) - $(call clean_exe,$(BINDIR)/fstype.exe) + $(call clean_exe,$(BINDIR)/scsilist.exe) $(call clean_exe,$(BINDIR)/drivetype.exe) + $(call clean_exe,$(BINDIR)/fstype.exe) $(call clean_exe,$(BINDIR)/testfind.exe) $(call clean_exe,$(BINDIR)/testls.exe) $(call clean_exe,$(BINDIR)/bregex.exe) @@ -75,17 +74,20 @@ clean: # $(BINDIR)/bsmtp.exe: $(OBJDIR)/bsmtp.o $(LIBS_BACULA) - $(call link_conapp,) + $(call link_conapp,-lws2_32) $(BINDIR)/dbcheck.exe: $(OBJDIR)/dbcheck.o $(DIRCONF_OBJS) $(LIBS_BACULA) $(LIBS_CATS) $(call link_conapp,) -$(BINDIR)/fstype.exe: $(OBJDIR)/fstype.o $(LIBS_BACULA) +$(BINDIR)/scsilist.exe: $(OBJDIR)/scsilist.o $(OBJDIR)/ScsiDeviceList.o $(LIBS_BACULA) $(call link_conapp,) $(BINDIR)/drivetype.exe: $(OBJDIR)/drivetype.o $(LIBS_BACULA) $(call link_conapp,) +$(BINDIR)/fstype.exe: $(OBJDIR)/fstype.o $(LIBS_BACULA) + $(call link_conapp,) + $(BINDIR)/testfind.exe: $(OBJDIR)/testfind.o $(DIRCONF_OBJS) $(LIBS_BACULA) $(call link_conapp,) @@ -98,7 +100,4 @@ $(BINDIR)/bregex.exe: $(OBJDIR)/bregex.o $(LIBS_BACULA) $(BINDIR)/bwild.exe: $(OBJDIR)/bwild.o $(LIBS_BACULA) $(call link_conapp,) -$(BINDIR)/scsilist.exe: $(OBJDIR)/scsilist.o ScsiDeviceList.o $(LIBS_BACULA) - $(call link_conapp,) - include ../Makefile.rules diff --git a/bacula/src/win32/tools/bsmtp/bsmtp.vcproj b/bacula/src/win32/tools/bsmtp/bsmtp.vcproj new file mode 100644 index 0000000000..5d070ea131 --- /dev/null +++ b/bacula/src/win32/tools/bsmtp/bsmtp.vcproj @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bacula/technotes-1.39 b/bacula/technotes-1.39 index a2d5ff71e2..b95a871daa 100644 --- a/bacula/technotes-1.39 +++ b/bacula/technotes-1.39 @@ -1,7 +1,7 @@ Technical notes on version 1.39 General: -02Sep06 +02Oct06 kes Apply dvd find volume patch from Richard Mortimer. kes Eliminate the dvd specific mount routines using only the dev->mount/unmount.