, _nanomsg (true)
, _sizer (new wxBoxSizer(wxVERTICAL))
{
+#if defined(DCPOMATIC_WINDOWS)
+ AllocConsole();
+
+ HANDLE handle_out = GetStdHandle(STD_OUTPUT_HANDLE);
+ int hCrt = _open_osfhandle((intptr_t) handle_out, _O_TEXT);
+ FILE* hf_out = _fdopen(hCrt, "w");
+ setvbuf(hf_out, NULL, _IONBF, 1);
+ *stdout = *hf_out;
+
+ HANDLE handle_in = GetStdHandle(STD_INPUT_HANDLE);
+ hCrt = _open_osfhandle((intptr_t) handle_in, _O_TEXT);
+ FILE* hf_in = _fdopen(hCrt, "r");
+ setvbuf(hf_in, NULL, _IONBF, 128);
+ *stdin = *hf_in;
+
+ cout << "DCP-o-matic is starting." << "\n";
+#endif
/* Use a panel as the only child of the Frame so that we avoid
the dark-grey background on Windows.
*/
if bld.env.TARGET_WINDOWS and t == 'dcpomatic_disk_writer':
obj.source += ' ../../platform/windows/%s.rc' % t
# Prevent a console window opening when we start dcpomatic2_disk_writer
- bld.env.LINKFLAGS.append('-Wl,-subsystem,windows')
+ # bld.env.LINKFLAGS.append('-Wl,-subsystem,windows')
obj.target = t.replace('dcpomatic', 'dcpomatic2').replace('swaroop_', '')
if t == 'server_test':
obj.install_path = None