summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-10-11 21:50:46 (GMT)
committernijtmans <nijtmans>2010-10-11 21:50:46 (GMT)
commiteac7d6560603161bdf15eff58f8e556341cd9a50 (patch)
tree8444a245a1b8372dd13e16eb7ccc5a955a5ae727 /win
parentaff4deb1051f578be23a9c8449439e912d976c08 (diff)
downloadtk-eac7d6560603161bdf15eff58f8e556341cd9a50.zip
tk-eac7d6560603161bdf15eff58f8e556341cd9a50.tar.gz
tk-eac7d6560603161bdf15eff58f8e556341cd9a50.tar.bz2
[FRQ 491789]: "setargv() doesn't support a unicode
cmdline" implemented for Tk on MSVC++
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in6
-rw-r--r--win/makefile.vc6
-rw-r--r--win/rules.vc6
-rw-r--r--win/winMain.c12
4 files changed, 20 insertions, 10 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index a64c47b..d38bbc5 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -4,7 +4,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.95 2010/10/06 14:34:38 nijtmans Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.96 2010/10/11 21:50:46 nijtmans Exp $
TCLVERSION = @TCL_VERSION@
TCLPATCHL = @TCL_PATCH_LEVEL@
@@ -315,6 +315,7 @@ TK_OBJS = \
tkListbox.$(OBJEXT) \
tkMacWinMenu.$(OBJEXT) \
tkMain.$(OBJEXT) \
+ tkMain2.$(OBJEXT) \
tkMenu.$(OBJEXT) \
tkMenubutton.$(OBJEXT) \
tkMenuDraw.$(OBJEXT) \
@@ -655,6 +656,9 @@ tkWinTest.$(OBJEXT): tkWinTest.c
tkSquare.$(OBJEXT): tkSquare.c
$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
+tkMain2.$(OBJEXT): tkMain.c
+ $(CC) -c $(CC_SWITCHES) -DBUILD_tk -DTK_ASCII_MAIN @DEPARG@ $(CC_OBJNAME)
+
# Extra dependency info
tkConsole.$(OBJEXT): configure Makefile
tkMain.$(OBJEXT): configure Makefile
diff --git a/win/makefile.vc b/win/makefile.vc
index 7cc2423..11ed0f3 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -13,7 +13,7 @@
# Copyright (c) 2003-2008 Pat Thoyts.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: makefile.vc,v 1.132 2010/10/11 12:27:32 nijtmans Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.133 2010/10/11 21:50:46 nijtmans Exp $
#------------------------------------------------------------------------------
# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
@@ -331,6 +331,7 @@ TKOBJS = \
$(TMP_DIR)\tkListbox.obj \
$(TMP_DIR)\tkMacWinMenu.obj \
$(TMP_DIR)\tkMain.obj \
+ $(TMP_DIR)\tkMain2.obj \
$(TMP_DIR)\tkMenu.obj \
$(TMP_DIR)\tkMenubutton.obj \
$(TMP_DIR)\tkMenuDraw.obj \
@@ -798,6 +799,9 @@ $(TMP_DIR)\winMain.obj: $(WINDIR)\winMain.c
-DTCL_USE_STATIC_PACKAGES=$(TCL_USE_STATIC_PACKAGES) \
-Fo$@ $?
+$(TMP_DIR)\tkMain2.obj: $(GENERICDIR)\tkMain.c
+ $(cc32) -DBUILD_tk $(TK_CFLAGS) -DTK_ASCII_MAIN -Fo$@ $?
+
# The following objects are part of the stub library and should not
# be built as DLL objects but none of the symbols should be exported
# and no reference made to a C runtime.
diff --git a/win/rules.vc b/win/rules.vc
index f9aefe9..5e781ee 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -11,7 +11,7 @@
# Copyright (c) 2003-2007 Patrick Thoyts
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: rules.vc,v 1.28 2010/09/14 08:50:20 nijtmans Exp $
+# RCS: @(#) $Id: rules.vc,v 1.29 2010/10/11 21:50:46 nijtmans Exp $
#------------------------------------------------------------------------------
!ifndef _RULES_VC
@@ -189,7 +189,9 @@ VCVER=0
!if ![echo VCVERSION=_MSC_VER > vercl.x] \
&& ![cl -nologo -TC -P vercl.x $(ERRNULL)]
!include vercl.i
-!if $(VCVERSION) >= 1500
+!if $(VCVERSION) >= 1600
+VCVER=10
+!elseif $(VCVERSION) >= 1500
VCVER=9
!elseif $(VCVERSION) >= 1400
VCVER=8
diff --git a/win/winMain.c b/win/winMain.c
index 5abaeb3..8e98168 100644
--- a/win/winMain.c
+++ b/win/winMain.c
@@ -11,14 +11,14 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: winMain.c,v 1.33 2010/09/23 21:45:14 nijtmans Exp $
+ * RCS: @(#) $Id: winMain.c,v 1.34 2010/10/11 21:50:46 nijtmans Exp $
*/
-/* TODO: This file does not compile in UNICODE mode.
- * See [Freq 2965056]: Windows build with -DUNICODE
- */
-#undef UNICODE
-#undef _UNICODE
+#ifndef _MSC_VER
+/* On mingw and cygwin this doesn't work yet */
+# undef UNICODE
+# undef _UNICODE
+#endif
#include "tk.h"
#define WIN32_LEAN_AND_MEAN