diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/makefile.vc | 115 | ||||
-rw-r--r-- | win/rules.vc | 14 |
2 files changed, 116 insertions, 13 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index f99ee9c..46f0fd6 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -12,7 +12,7 @@ # Copyright (c) 2001-2004 David Gravereaux. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.95 2006/10/19 00:48:25 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.96 2006/10/31 14:45:04 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -96,6 +96,8 @@ the build instructions. # unchecked = Allows a symbols build to not use the debug # enabled runtime (msvcrt.dll not msvcrtd.dll # or libcmt.lib not libcmtd.lib). +# noxp = If you do not have the uxtheme.h header then you cannot +# include support for XP themeing. # # STATS=memdbg,compdbg,none # Sets optional memory and bytecode compiler debugging code added @@ -228,9 +230,9 @@ WISHOBJS = \ $(TMP_DIR)\wish.res TKTESTOBJS = \ - $(TMP_DIR)\tkTest.obj \ - $(TMP_DIR)\tkSquare.obj \ $(TMP_DIR)\testMain.obj \ + $(TMP_DIR)\tkSquare.obj \ + $(TMP_DIR)\tkTest.obj \ $(TMP_DIR)\tkWinTest.obj XLIBOBJS = \ @@ -343,10 +345,47 @@ TKOBJS = \ $(TMP_DIR)\tkStubInit.obj \ $(TMP_DIR)\tkStubLib.obj \ $(TMP_DIR)\tkWindow.obj \ + $(TTK_OBJS) \ !if !$(STATIC_BUILD) $(TMP_DIR)\tk.res !endif +TTK_OBJS = \ + $(TMP_DIR)\ttkWinMonitor.obj \ + $(TMP_DIR)\ttkWinTheme.obj \ + $(TMP_DIR)\ttkWinXPTheme.obj \ + $(TMP_DIR)\ttkBlink.obj \ + $(TMP_DIR)\ttkButton.obj \ + $(TMP_DIR)\ttkCache.obj \ + $(TMP_DIR)\ttkClamTheme.obj \ + $(TMP_DIR)\ttkClassicTheme.obj \ + $(TMP_DIR)\ttkDefaultTheme.obj \ + $(TMP_DIR)\ttkElements.obj \ + $(TMP_DIR)\ttkEntry.obj \ + $(TMP_DIR)\ttkFrame.obj \ + $(TMP_DIR)\ttkImage.obj \ + $(TMP_DIR)\ttkInit.obj \ + $(TMP_DIR)\ttkLabel.obj \ + $(TMP_DIR)\ttkLayout.obj \ + $(TMP_DIR)\ttkManager.obj \ + $(TMP_DIR)\ttkNotebook.obj \ + $(TMP_DIR)\ttkPanedwindow.obj \ + $(TMP_DIR)\ttkProgress.obj \ + $(TMP_DIR)\ttkScale.obj \ + $(TMP_DIR)\ttkScrollbar.obj \ + $(TMP_DIR)\ttkScroll.obj \ + $(TMP_DIR)\ttkSeparator.obj \ + $(TMP_DIR)\ttkSquare.obj \ + $(TMP_DIR)\ttkState.obj \ + $(TMP_DIR)\ttkTagSet.obj \ + $(TMP_DIR)\ttkTheme.obj \ + $(TMP_DIR)\ttkTrace.obj \ + $(TMP_DIR)\ttkTrack.obj \ + $(TMP_DIR)\ttkTreeview.obj \ + $(TMP_DIR)\ttkWidget.obj \ + $(TMP_DIR)\ttkStubInit.obj \ + $(TMP_DIR)\ttkStubLib.obj + TKSTUBOBJS = \ $(TMP_DIR)\tkStubLib.obj \ $(TMP_DIR)\tkStubImg.obj @@ -355,6 +394,7 @@ TKSTUBOBJS = \ WINDIR = $(ROOT)\win GENERICDIR = $(ROOT)\generic XLIBDIR = $(ROOT)\xlib +TTKDIR = $(ROOT)\generic\ttk BITMAPDIR = $(ROOT)\bitmaps DOCDIR = $(ROOT)\doc RCDIR = $(WINDIR)\rc @@ -367,7 +407,14 @@ TCL_INCLUDES = -I "$(_TCLDIR)\win" -I "$(_TCLDIR)\generic" TK_INCLUDES = -I"$(WINDIR)" -I"$(GENERICDIR)" -I"$(BITMAPDIR)" -I"$(XLIBDIR)" \ $(TCL_INCLUDES) -TK_DEFINES = $(OPTDEFINES) +CONFIG_DEFS =-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 \ + -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 \ + -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 \ +!if $(HAVE_UXTHEME_H) + -DHAVE_UXTHEME_H=1 +!endif + +TK_DEFINES =-DBUILD_ttk $(OPTDEFINES) $(CONFIG_DEFS) #--------------------------------------------------------------------- @@ -780,6 +827,36 @@ $(GENERICDIR)/tkMenu.c: $(GENERICDIR)/tkMenu.h $(GENERICDIR)/tkMenuDraw.c: $(GENERICDIR)/tkMenu.h $(WINDIR)/tkWinMenu.c: $(GENERICDIR)/tkMenu.h +$(TTKDIR)/ttkBlink.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkButton.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkCache.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkClamTheme.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkClassicTheme.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkDefaultTheme.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkElements.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkEntry.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkFrame.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkImage.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkInit.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkLabel.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkLayout.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkManager.c: $(TTKDIR)/ttkTheme.h $(TTKDIR)/ttkManager.h +$(TTKDIR)/ttkNotebook.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkPanedwindow.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkProgress.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkScroll.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkScrollbar.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkSeparator.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkSquare.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkState.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkTagSet.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkTheme.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkTrace.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkTrack.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkTreeview.c: $(TTKDIR)/ttkTheme.h +$(TTKDIR)/ttkWidget.c: $(TTKDIR)/ttkTheme.h $(TTKDIR)/ttkWidget.h + + !if exist("$(OUT_DIR)\depend.mk") !include "$(OUT_DIR)\depend.mk" !message *** Dependency rules in effect. @@ -804,6 +881,11 @@ $< $< << +{$(TTKDIR)}.c{$(TMP_DIR)}.obj:: + $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<< +$< +<< + {$(WINDIR)}.c{$(TMP_DIR)}.obj:: $(cc32) -DBUILD_tk $(TK_CFLAGS) -Fo$(TMP_DIR)\ @<< $< @@ -833,6 +915,7 @@ $(TMP_DIR)\wish.res: $(TMP_DIR)\wish.exe.manifest #--------------------------------------------------------------------- install-binaries: + @echo installing binaries @$(CPY) "$(WISH)" "$(BIN_INSTALL_DIR)\" !if $(TKLIB) != $(TKIMPLIB) @$(CPY) "$(TKLIB)" "$(BIN_INSTALL_DIR)\" @@ -840,27 +923,37 @@ install-binaries: @$(CPY) "$(TKIMPLIB)" "$(LIB_INSTALL_DIR)\" @$(CPY) "$(TKSTUBLIB)" "$(LIB_INSTALL_DIR)\" !if !$(STATIC_BUILD) - @echo Creating package index "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" - -del "$(SCRIPT_INSTALL_DIR)\pkgIndex.tcl" - echo if {![package vsatisfies [package provide Tcl] $(TCL_DOTVERSION)]} { return } > "$(OUT_DIR)\pkgIndex.tcl" - echo if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)$(TCL_PATCHLEVEL)] != 0} { return } >>"$(OUT_DIR)\pkgIndex.tcl" - echo package ifneeded Tk $(DOTVERSION)$(TCL_PATCHLEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk] >>"$(OUT_DIR)\pkgIndex.tcl" - $(CPY) "$(OUT_DIR)\pkgIndex.tcl" "$(SCRIPT_INSTALL_DIR)\" + @echo creating package index + @type << > $(OUT_DIR)\pkgIndex.tcl +if {![package vsatisfies [package provide Tcl] $(TCL_DOTVERSION)]} { return } +if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)$(TCL_PATCHLEVEL)] != 0} { return } +package ifneeded Tk $(DOTVERSION)$(TCL_PATCHLEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk] +<< + @$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)\" !endif +#" + install-libraries: + @echo installing Tk headers @$(CPY) "$(GENERICDIR)\tk.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tkDecls.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tkPlatDecls.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(GENERICDIR)\tkIntXlibDecls.h" "$(INCLUDE_INSTALL_DIR)\" @$(CPY) "$(XLIBDIR)\X11\*.h" "$(INCLUDE_INSTALL_DIR)\X11\" + @echo installing script library @$(CPY) "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\" - @$(CPY) "$(ROOT)\library\*" "$(SCRIPT_INSTALL_DIR)\" + @echo installing theme library + @$(CPY) "$(ROOT)\library\ttk\*" "$(SCRIPT_INSTALL_DIR)\ttk\" + @echo installing demos @$(CPY) "$(ROOT)\library\demos\*" "$(SCRIPT_INSTALL_DIR)\demos\" @$(CPY) "$(ROOT)\library\demos\images\*" "$(SCRIPT_INSTALL_DIR)\demos\images\" + @echo installing images @$(CPY) "$(ROOT)\library\images\*" "$(SCRIPT_INSTALL_DIR)\images\" + @echo installing language files @$(CPY) "$(ROOT)\library\msgs\*" "$(SCRIPT_INSTALL_DIR)\msgs\" +#" #--------------------------------------------------------------------- # Clean up diff --git a/win/rules.vc b/win/rules.vc index 4217753..e5f59a1 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2006 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.13 2006/10/19 00:48:26 patthoyts Exp $ +# RCS: @(#) $Id: rules.vc,v 1.14 2006/10/31 14:45:04 patthoyts Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -31,7 +31,7 @@ _INSTALLDIR = $(INSTALLDIR:/=\) !endif !ifndef MACHINE -!if "$(CPU)" == "" +!if "$(CPU)" == "" || "$(CPU)" == "i386" MACHINE = IX86 !else MACHINE = $(CPU) @@ -131,9 +131,12 @@ DEBUGFLAGS = $(DEBUGFLAGS) -GZ COMPILERFLAGS =-W3 +# In v13 -GL and -YX are incompatible. !if [nmakehlp -c -YX] +!if ![nmakehlp -c -GL] OPTIMIZATIONS = $(OPTIMIZATIONS) -YX !endif +!endif !if "$(MACHINE)" == "IX86" ### test for pentium errata @@ -207,6 +210,7 @@ LOIMPACT = 0 TCL_USE_STATIC_PACKAGES = 0 USE_THREAD_ALLOC = 0 UNCHECKED = 0 +HAVE_UXTHEME_H = 1 !else !if [nmakehlp -f $(OPTS) "static"] !message *** Doing static @@ -262,6 +266,12 @@ UNCHECKED = 1 !else UNCHECKED = 0 !endif +!if [nmakehlp -f $(OPTS) "noxp"] +!message *** Exclude support for XP theme +HAVE_UXTHEME_H = 0 +!else +HAVE_UXTHEME_H = 1 +!endif !endif |