diff --git a/collects/compiler/doc.txt b/collects/compiler/doc.txt index e0b69bde11..85bdc6fc55 100644 --- a/collects/compiler/doc.txt +++ b/collects/compiler/doc.txt @@ -470,18 +470,23 @@ _embedr-sig.ss_ library provides the signature, _compiler:embed^_. icons in the ".ico" file _'creator_ (Mac OS X) - provides a 4-character string to use as - the application signature. + the application signature _'file-types_ (Mac OS X) - provides a list of association lists, one for each type of file handled by the application; each association is a 2-element list, where the first (key) element is a string recognized by Finder, and the second element is a plist value (see doc.tx in the "xml" collection); - see plt/collects/drscheme/drscheme.filetypes for an example. + see plt/collects/drscheme/drscheme.filetypes for an example -'resource-files_ (Mac OS X) - extra files to copy into the "Resources" directory of the generated executable + _'subsystem_ (Windows) - a symbol, either 'console for a console + application or 'windows for a consoleless application; + the default is 'console for a MzScheme-based application + and 'windows for a MrEd-based application + _'forget-exe?_ (Windows, Mac OS X) - a boolean; #t for a launcher (see `launcher?' below) does not preserve the original executable name for `(find-system-path 'exec-file)'; the diff --git a/collects/compiler/embed-unit.ss b/collects/compiler/embed-unit.ss index e8da04ec55..365c9ba89f 100644 --- a/collects/compiler/embed-unit.ss +++ b/collects/compiler/embed-unit.ss @@ -8,7 +8,8 @@ (lib "moddep.ss" "syntax") (lib "plist.ss" "xml") "embed-sig.ss" - "private/winicon.ss") + "private/winicon.ss" + "private/winsubsys.ss") (provide compiler:embed@) @@ -560,4 +561,8 @@ (let ([m (and (eq? 'windows (system-type)) (assq 'ico aux))]) (when m - (install-icon dest-exe (cdr m)))))))))))))))))) + (install-icon dest-exe (cdr m)))) + (let ([m (and (eq? 'windows (system-type)) + (assq 'subsystem aux))]) + (when m + (set-subsystem dest-exe (cdr m)))))))))))))))))) diff --git a/src/mred/mred.cxx b/src/mred/mred.cxx index d3976368aa..870d6505b9 100644 --- a/src/mred/mred.cxx +++ b/src/mred/mred.cxx @@ -84,7 +84,11 @@ int wx_in_terminal; # define wx_in_terminal 0 # endif #else -#define wx_in_terminal 0 +# ifdef wx_msw +static int wx_in_terminal = 0; +# else +# define wx_in_terminal 0 +# endif #endif #ifdef OS_X @@ -3452,6 +3456,16 @@ void wxCreateApp(void) #ifdef wx_mac wxmac_reg_globs(); #endif +#ifdef wx_msw + { + HANDLE h; + h = GetStdHandle(STD_OUTPUT_HANDLE); + if (h && (h != INVALID_HANDLE_VALUE) + && (GetFileType(h) != FILE_TYPE_UNKNOWN)) { + wx_in_terminal = 1; + } + } +#endif wxREGGLOB(orig_ps_setup); wxREGGLOB(q_callbacks);