diff options
-rw-r--r-- | generic/tkCanvLine.c | 2 | ||||
-rw-r--r-- | generic/tkCanvPoly.c | 2 | ||||
-rw-r--r-- | generic/tkInt.h | 4 | ||||
-rw-r--r-- | generic/tkMain.c | 6 | ||||
-rw-r--r-- | generic/tkWindow.c | 2 | ||||
-rw-r--r-- | library/demos/menu.tcl | 2 | ||||
-rw-r--r-- | macosx/GNUmakefile | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXMenu.c | 2 | ||||
-rw-r--r-- | macosx/tkMacOSXNotify.c | 33 | ||||
-rw-r--r-- | tests/bind.test | 2 | ||||
-rw-r--r-- | tests/canvas.test | 16 | ||||
-rw-r--r-- | unix/Makefile.in | 49 | ||||
-rwxr-xr-x | unix/configure | 314 | ||||
-rw-r--r-- | unix/configure.ac | 90 | ||||
-rw-r--r-- | win/Makefile.in | 68 | ||||
-rw-r--r-- | win/makefile.vc | 19 | ||||
-rw-r--r-- | win/tkWinIco.c | 4 | ||||
-rw-r--r-- | win/tkWinInit.c | 2 |
18 files changed, 394 insertions, 225 deletions
diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index e7e8904..07dbb70 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -1748,7 +1748,7 @@ GetLineIndex( const char *string; (void)canvas; - if (TCL_OK == TkGetIntForIndex(obj, 2*linePtr->numPoints - 1, 0, &idx)) { + if (TCL_OK == TkGetIntForIndex(obj, 2*linePtr->numPoints - 1, 1, &idx)) { if (idx == TCL_INDEX_NONE) { idx = 0; } else if (idx > (2*(TkSizeT)linePtr->numPoints)) { diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index 1620914..90b2896 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -1683,6 +1683,8 @@ GetPolygonIndex( if (TCL_OK == TkGetIntForIndex(obj, (INT_MAX - 1) - ((INT_MAX) % count), 1, &idx)) { if (idx == TCL_INDEX_NONE) { idx = 0; + } else if (idx >= INT_MAX - ((INT_MAX) % count)) { + idx = count; } else { idx = (idx & (TkSizeT)-2) % count; } diff --git a/generic/tkInt.h b/generic/tkInt.h index bfeac41..68838b7 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -1426,6 +1426,10 @@ MODULE_SCOPE void TkUnixSetXftClipRegion(Region clipRegion); MODULE_SCOPE const char *TkUtfPrev(const char *, const char *); #endif +#if defined(_WIN32) && !defined(STATIC_BUILD) && TCL_MAJOR_VERSION < 9 +# define tcl_CreateFileHandler reserved9 +#endif + /* * Unsupported commands. */ diff --git a/generic/tkMain.c b/generic/tkMain.c index 49fa3f6..41afc06 100644 --- a/generic/tkMain.c +++ b/generic/tkMain.c @@ -100,7 +100,7 @@ static int WinIsTty(int fd) { */ #if !defined(STATIC_BUILD) - if (tclStubsPtr->reserved9 && tclIntPlatStubsPtr->tclpIsAtty) { + if (tclStubsPtr->tcl_CreateFileHandler && tclIntPlatStubsPtr->tclpIsAtty) { /* We are running on Cygwin */ return tclIntPlatStubsPtr->tclpIsAtty(fd); } @@ -189,7 +189,7 @@ Tk_MainEx( #if defined(_WIN32) && !defined(UNICODE) && !defined(STATIC_BUILD) - if (tclStubsPtr->reserved9) { + if (tclStubsPtr->tcl_CreateFileHandler) { /* We are running win32 Tk under Cygwin, so let's check * whether the env("DISPLAY") variable or the -display * argument is set. If so, we really want to run the @@ -221,7 +221,7 @@ Tk_MainEx( #if defined(_WIN32) #if !defined(STATIC_BUILD) /* If compiled for Win32 but running on Cygwin, don't use console */ - if (!tclStubsPtr->reserved9) + if (!tclStubsPtr->tcl_CreateFileHandler) #endif Tk_InitConsoleChannels(interp); #endif diff --git a/generic/tkWindow.c b/generic/tkWindow.c index 5d5ea20..1ee86de 100644 --- a/generic/tkWindow.c +++ b/generic/tkWindow.c @@ -920,7 +920,7 @@ TkCreateMainWindow( } #if defined(_WIN32) && !defined(STATIC_BUILD) - if ((cmdPtr->flags & WINMACONLY) && tclStubsPtr->reserved9) { + if ((cmdPtr->flags & WINMACONLY) && tclStubsPtr->tcl_CreateFileHandler) { /* * We are running on Cygwin, so don't use the win32 dialogs. */ diff --git a/library/demos/menu.tcl b/library/demos/menu.tcl index fbb0069..70e8cfd 100644 --- a/library/demos/menu.tcl +++ b/library/demos/menu.tcl @@ -134,6 +134,8 @@ menu $m -tearoff 0 foreach i {{An entry} {Another entry} {Does nothing} {Does almost nothing} {Does almost nothing also} {Make life meaningful}} { $m add command -label $i -command [list puts "You invoked \"$i\""] } +set emojiLabel [encoding convertfrom utf-8 "\xF0\x9F\x98\x8D Make friends"] +$m add command -label $emojiLabel -command [list puts "Menu labels can include non-BMP characters."] $m entryconfigure "Does almost nothing" -bitmap questhead -compound left \ -command [list \ tk_dialog $w.compound {Compound Menu Entry} \ diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile index cf76ac0..2451e5c 100644 --- a/macosx/GNUmakefile +++ b/macosx/GNUmakefile @@ -100,7 +100,7 @@ space := ${empty} ${empty} objdir = $(subst ${space},\ ,${OBJ_DIR}) develop_make_args := BUILD_STYLE=Development CONFIGURE_ARGS=--enable-symbols -deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install +deploy_make_args := BUILD_STYLE=Deployment INSTALL_TARGET=install-strip embedded_make_args := EMBEDDED_BUILD=1 install_make_args := INSTALL_BUILD=1 diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 2a9ca0b..ba314f7 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -804,7 +804,7 @@ TkpConfigureMenuEntry( * have been added by the system. See [7185d26cf4]. */ - for (int i = 0; i < menuRefPtr->menuPtr->numEntries; i++) { + for (TkSizeT i = 0; i < menuRefPtr->menuPtr->numEntries; i++) { TkMenuEntry *submePtr = menuRefPtr->menuPtr->entries[i]; NSMenuItem *item = (NSMenuItem *) submePtr->platformEntryData; [item setEnabled:(submePtr->state != ENTRY_DISABLED)]; diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c index 6a11e13..25dff29 100644 --- a/macosx/tkMacOSXNotify.c +++ b/macosx/tkMacOSXNotify.c @@ -13,10 +13,37 @@ * of this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <tclInt.h> #include "tkMacOSXPrivate.h" #include "tkMacOSXInt.h" #include "tkMacOSXConstants.h" +#if TCL_MAJOR_VERSION < 9 +#undef Tcl_MacOSXNotifierAddRunLoopMode +#ifdef USE_TCL_STUBS +#ifdef __cplusplus +extern "C" { +#endif +/* Little hack to eliminate the need for "tclInt.h" here: + Just copy a small portion of TclIntPlatStubs, just + enough to make it work. See [600b72bfbc] */ +typedef struct TclIntPlatStubs { + int magic; + void *hooks; + void (*dummy[19]) (void); /* dummy entries 0-18, not used */ + void (*tclMacOSXNotifierAddRunLoopMode) (const void *runLoopMode); /* 19 */ +} TclIntPlatStubs; +extern const TclIntPlatStubs *tclIntPlatStubsPtr; +#ifdef __cplusplus +} +#endif +#define Tcl_MacOSXNotifierAddRunLoopMode \ + (tclIntPlatStubsPtr->tclMacOSXNotifierAddRunLoopMode) /* 19 */ +#elif TCL_MINOR_VERSION < 7 + extern void TclMacOSXNotifierAddRunLoopMode(const void *runLoopMode); +# define Tcl_MacOSXNotifierAddRunLoopMode TclMacOSXNotifierAddRunLoopMode +#else + extern void Tcl_MacOSXNotifierAddRunLoopMode(const void *runLoopMode); +#endif +#endif #import <objc/objc-auto.h> /* This is not used for anything at the moment. */ @@ -269,8 +296,8 @@ Tk_MacOSXSetupTkNotifier(void) Tcl_CreateEventSource(TkMacOSXEventsSetupProc, TkMacOSXEventsCheckProc, NULL); TkCreateExitHandler(TkMacOSXNotifyExitHandler, NULL); - TclMacOSXNotifierAddRunLoopMode(NSEventTrackingRunLoopMode); - TclMacOSXNotifierAddRunLoopMode(NSModalPanelRunLoopMode); + Tcl_MacOSXNotifierAddRunLoopMode(NSEventTrackingRunLoopMode); + Tcl_MacOSXNotifierAddRunLoopMode(NSModalPanelRunLoopMode); } } } diff --git a/tests/bind.test b/tests/bind.test index c831d25..594fac8 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -14,7 +14,7 @@ tcltest::loadTestedCommands tk useinputmethods 0 testConstraint nodeprecated [expr {"nodeprecated" ni [tk::pkgconfig list]}] -testConstraint needsTcl87 [package vsatisfies [package provide Tcl] 8.7] +testConstraint needsTcl87 [package vsatisfies [package provide Tcl] 8.7-] testConstraint failsOnWindows [expr {![info exists ::env(CI)] || [tk windowingsystem] ne "win32"}] diff --git a/tests/canvas.test b/tests/canvas.test index 5e4f851..ea71193 100644 --- a/tests/canvas.test +++ b/tests/canvas.test @@ -758,6 +758,22 @@ test canvas-15.19 "basic coords check: centimeters are larger than pixels" -setu set id [.c create rect 0 0 1cm 1cm] expr {[lindex [.c coords $id] 2]>1} } -result 1 +test canvas-15.20 {bug [237971ce]} -setup { + destroy .c + canvas .c +} -body { + set id [.c create line {0 0 50 50 100 50}] + .c insert $id end {200 200} + .c coords $id +} -result {0.0 0.0 50.0 50.0 100.0 50.0 200.0 200.0} +test canvas-15.21 {bug [237971ce]} -setup { + destroy .c + canvas .c +} -body { + set id [.c create poly {0 0 50 50 100 50}] + .c insert $id end {200 200} + .c coords $id +} -result {0.0 0.0 50.0 50.0 100.0 50.0 200.0 200.0} destroy .c test canvas-16.1 {arc coords check} -setup { diff --git a/unix/Makefile.in b/unix/Makefile.in index ae6e05b..71584b5 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -544,6 +544,28 @@ AQUA_SRCS = \ SRCS = $(GENERIC_SRCS) $(@TK_WINDOWINGSYSTEM@_SRCS) @PLAT_SRCS@ +### +# Tip 430 - ZipFS Modifications +### + +TK_ZIP_FILE = @TK_ZIP_FILE@ +TK_VFS_ROOT = libtk.vfs +TK_VFS_PATH = ${TK_VFS_ROOT}/tk_library + +HOST_CC = @CC_FOR_BUILD@ +HOST_EXEEXT = @EXEEXT_FOR_BUILD@ +HOST_OBJEXT = @OBJEXT_FOR_BUILD@ +ZIPFS_BUILD = @ZIPFS_BUILD@ +NATIVE_ZIP = @ZIP_PROG@ +ZIP_PROG_OPTIONS = @ZIP_PROG_OPTIONS@ +ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@ +SHARED_BUILD = @SHARED_BUILD@ +INSTALL_LIBRARIES = @INSTALL_LIBRARIES@ +INSTALL_MSGS = @INSTALL_MSGS@ + +ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@ + + AQUA_RESOURCES = \ $(MAC_OSX_DIR)/tkAboutDlg.r $(MAC_OSX_DIR)/tkMacOSXCursors.r \ $(MAC_OSX_DIR)/tkMacOSXXCursors.r @@ -583,11 +605,35 @@ binaries: ${LIB_FILE} ${WISH_EXE} libraries: +tkzipfile: ${TK_ZIP_FILE} + +${TK_ZIP_FILE}: ${ZIP_INSTALL_OBJS} + @rm -rf ${TK_VFS_ROOT} + @mkdir -p ${TK_VFS_PATH} + @echo "creating ${TK_VFS_PATH} (prepare compression)" + @if \ + ln -s $(TOP_DIR)/library/* ${TK_VFS_PATH}/; \ + then : ; else \ + cp -a $(TOP_DIR)/library/* ${TK_VFS_PATH}; \ + fi + @find ${TK_VFS_ROOT} -type d -empty -delete + @echo "creating ${TK_ZIP_FILE} from ${TK_VFS_PATH}" + @(zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}' || \ + echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?") 2>/dev/null`; \ + echo 'cd ${TK_VFS_ROOT} &&' $$zip '${ZIP_PROG_OPTIONS} ../${TK_ZIP_FILE} ${ZIP_PROG_VFSSEARCH}'; \ + cd ${TK_VFS_ROOT} && \ + $$zip ${ZIP_PROG_OPTIONS} ../${TK_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null) + # The following target is configured by autoconf to generate either # a shared library or non-shared library for Tk. ${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS} rm -f $@ @MAKE_LIB@ + @if test "${ZIPFS_BUILD}" = "1" ; then \ + cat ${TK_ZIP_FILE} >> ${LIB_FILE}; \ + ${NATIVE_ZIP} -A ${LIB_FILE} \ + || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ + fi ${STUB_LIB_FILE}: ${STUB_LIB_OBJS} @if test "x${LIB_FILE}" = "xlibtk${MAJOR_VERSION}.${MINOR_VERSION}.dll"; then \ @@ -904,7 +950,8 @@ Makefile: $(UNIX_DIR)/Makefile.in clean: rm -f *.a *.o libtk* core errs *~ \#* TAGS *.E a.out \ - errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc + errors ${WISH_EXE} $(TKTEST_EXE) lib.exp Tk *.rsrc \ + *.zip *.vfs distclean: clean rm -rf Makefile config.status config.cache config.log tkConfig.sh \ diff --git a/unix/configure b/unix/configure index d5db049..f8c7186 100755 --- a/unix/configure +++ b/unix/configure @@ -817,8 +817,8 @@ enable_aqua with_x enable_xft enable_xss -enable_zipfs enable_framework +enable_zipfs ' ac_precious_vars='build_alias host_alias @@ -1470,9 +1470,9 @@ Optional Features: --enable-aqua=yes|no use Aqua windowingsystem on Mac OS X (default: no) --enable-xft use freetype/fontconfig/xft (default: on) --enable-xss use XScreenSaver for activity timer (default: on) - --enable-zipfs build with Zipfs support (default: on) --enable-framework package shared libraries in MacOSX frameworks (default: off) + --enable-zipfs build with Zipfs support (default: on) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -8519,6 +8519,160 @@ fi #-------------------------------------------------------------------- +# The statements below define a collection of symbols related to +# building libtk as a shared library instead of a static library. +#-------------------------------------------------------------------- + +eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" +eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" +eval "TK_LIB_FILE=libtk${LIB_SUFFIX}" + +# tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed +# since on some platforms TK_LIB_FILE contains shell escapes. + +eval "TK_LIB_FILE=${TK_LIB_FILE}" + +if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != ""; then + SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_STUB_LIB_SPEC}" + TCL_STUB_FLAGS="-DUSE_TCL_STUBS" +fi + +test -z "$TK_LIBRARY" && TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' +PRIVATE_INCLUDE_DIR='$(includedir)' +HTML_DIR='$(DISTDIR)/html' +TK_PKG_DIR='tk$(VERSION)' +TK_RSRC_FILE='tk$(VERSION).rsrc' +WISH_RSRC_FILE='wish$(VERSION).rsrc' + +# Note: in the following variable, it's important to use the absolute +# path name of the Tcl directory rather than "..": this is because +# AIX remembers this path and will attempt to use it at run-time to look +# up the Tcl library. + +if test "`uname -s`" = "Darwin" ; then + + if test "`uname -s`" = "Darwin" ; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to package libraries" >&5 +printf %s "checking how to package libraries... " >&6; } + # Check whether --enable-framework was given. +if test ${enable_framework+y} +then : + enableval=$enable_framework; enable_framework=$enableval +else $as_nop + enable_framework=no +fi + + if test $enable_framework = yes; then + if test $SHARED_BUILD = 0; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 +printf "%s\n" "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;} + enable_framework=no + fi + if test $tcl_corefoundation = no; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be used when CoreFoundation is available" >&5 +printf "%s\n" "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;} + enable_framework=no + fi + fi + if test $enable_framework = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: framework" >&5 +printf "%s\n" "framework" >&6; } + FRAMEWORK_BUILD=1 + else + if test $SHARED_BUILD = 1; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: shared library" >&5 +printf "%s\n" "shared library" >&6; } + else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static library" >&5 +printf "%s\n" "static library" >&6; } + fi + FRAMEWORK_BUILD=0 + fi + fi + + TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}/${TK_LIB_FILE}" -unexported_symbols_list $$(f=$(TK_LIB_FILE).E && nm -gp tkMacOSX*.o 2>/dev/null | awk "/^[0-9a-f]+ . \.objc/ {print \$$3}" > $$f && nm -gjp "$(TCL_BIN_DIR)"/$(TCL_STUB_LIB_FILE) | grep ^_[^_] >> $$f && echo $$f)' + echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' + TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' + EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' + EXTRA_WISH_LIBS=${EXTRA_WISH_LIBS}' -sectcreate __TEXT __credits_html Credits.html' + if test "${SHARED_BUILD}" = "0"; then + EXTRA_WISH_LIBS=${EXTRA_WISH_LIBS}' -ObjC' + fi + EXTRA_APP_CC_SWITCHES="${EXTRA_APP_CC_SWITCHES}"' -mdynamic-no-pic' + ac_config_files="$ac_config_files Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in Credits.html:../macosx/Credits.html.in" + + for l in ${LOCALES}; do CFBUNDLELOCALIZATIONS="${CFBUNDLELOCALIZATIONS}<string>$l</string>"; done + TK_YEAR="`date +%Y`" +fi + +if test "$FRAMEWORK_BUILD" = "1" ; then + +printf "%s\n" "#define TK_FRAMEWORK 1" >>confdefs.h + + # Construct a fake local framework structure to make linking with + # '-framework Tk' and running of tktest work + ac_config_commands="$ac_config_commands Tk.framework" + + LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" + if test "${libdir}" = '${exec_prefix}/lib'; then + # override libdir default + libdir="/Library/Frameworks" + fi + TK_LIB_FILE="Tk" + TK_LIB_FLAG="-framework Tk" + TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk" + TK_LIB_SPEC="-F${libdir} -framework Tk" + libdir="${libdir}/Tk.framework/Versions/\${VERSION}" + TK_LIBRARY="${libdir}/Resources/Scripts" + TK_PKG_DIR="Resources/Scripts" + TK_RSRC_FILE="Tk.rsrc" + WISH_RSRC_FILE="Wish.rsrc" + includedir="${libdir}/Headers" + PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders" + HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk" + EXTRA_INSTALL="install-private-headers html-tk" + EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TkTOC.html' + EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Credits.html to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Credits.html "$(LIB_INSTALL_DIR)/Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' + if test $tk_aqua = yes; then + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Images to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)/Resources"; done' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'/" && $(INSTALL_DATA_DIR) "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"' + bindir="${libdir}/Resources/Wish.app/Contents/MacOS" + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/.." && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA_DIR) "$(BIN_INSTALL_DIR)/../Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Tk.icns" "$(BIN_INSTALL_DIR)/../Resources/Wish.icns"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.sdef to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.sdef" "$(BIN_INSTALL_DIR)/../Resources"' + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Credits.html to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) Credits.html "$(BIN_INSTALL_DIR)/../Resources"' + fi + EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tk.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tkConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' + # Don't use AC_DEFINE for the following as the framework version define + # needs to go into the Makefile even when using autoheader, so that we + # can pick up a potential make override of VERSION. Also, don't put this + # into CFLAGS as it should not go into tkConfig.sh + EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"' +else + if test $tk_aqua = yes; then + EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' + fi + # libdir must be a fully qualified path and not ${exec_prefix}/lib + eval libdir="$libdir" + if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then + TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" + TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" + else + if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then + TK_LIB_FLAG="-ltk${TK_VERSION}" + else + TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" + fi + TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" + fi + TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" +fi + +#-------------------------------------------------------------------- # Zipfs support - Tip 430 #-------------------------------------------------------------------- # Check whether --enable-zipfs was given. @@ -8529,7 +8683,7 @@ else $as_nop tcl_ok=yes fi -if test "$tcl_ok" = "yes" ; then +if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then # # Find a native compiler # @@ -8688,160 +8842,6 @@ fi #-------------------------------------------------------------------- -# The statements below define a collection of symbols related to -# building libtk as a shared library instead of a static library. -#-------------------------------------------------------------------- - -eval eval "TK_UNSHARED_LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}" -eval eval "TK_SHARED_LIB_SUFFIX=${SHARED_LIB_SUFFIX}" -eval "TK_LIB_FILE=libtk${LIB_SUFFIX}" - -# tkConfig.sh needs a version of the _LIB_SUFFIX that has been eval'ed -# since on some platforms TK_LIB_FILE contains shell escapes. - -eval "TK_LIB_FILE=${TK_LIB_FILE}" - -if test "${SHARED_BUILD}" = "1" -a "${SHLIB_SUFFIX}" != ""; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_STUB_LIB_SPEC}" - TCL_STUB_FLAGS="-DUSE_TCL_STUBS" -fi - -test -z "$TK_LIBRARY" && TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' -PRIVATE_INCLUDE_DIR='$(includedir)' -HTML_DIR='$(DISTDIR)/html' -TK_PKG_DIR='tk$(VERSION)' -TK_RSRC_FILE='tk$(VERSION).rsrc' -WISH_RSRC_FILE='wish$(VERSION).rsrc' - -# Note: in the following variable, it's important to use the absolute -# path name of the Tcl directory rather than "..": this is because -# AIX remembers this path and will attempt to use it at run-time to look -# up the Tcl library. - -if test "`uname -s`" = "Darwin" ; then - - if test "`uname -s`" = "Darwin" ; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to package libraries" >&5 -printf %s "checking how to package libraries... " >&6; } - # Check whether --enable-framework was given. -if test ${enable_framework+y} -then : - enableval=$enable_framework; enable_framework=$enableval -else $as_nop - enable_framework=no -fi - - if test $enable_framework = yes; then - if test $SHARED_BUILD = 0; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be built if --enable-shared is yes" >&5 -printf "%s\n" "$as_me: WARNING: Frameworks can only be built if --enable-shared is yes" >&2;} - enable_framework=no - fi - if test $tcl_corefoundation = no; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Frameworks can only be used when CoreFoundation is available" >&5 -printf "%s\n" "$as_me: WARNING: Frameworks can only be used when CoreFoundation is available" >&2;} - enable_framework=no - fi - fi - if test $enable_framework = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: framework" >&5 -printf "%s\n" "framework" >&6; } - FRAMEWORK_BUILD=1 - else - if test $SHARED_BUILD = 1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: shared library" >&5 -printf "%s\n" "shared library" >&6; } - else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: static library" >&5 -printf "%s\n" "static library" >&6; } - fi - FRAMEWORK_BUILD=0 - fi - fi - - TK_SHLIB_LD_EXTRAS="-compatibility_version ${TK_VERSION} -current_version ${TK_VERSION}`echo ${TK_PATCH_LEVEL} | awk '{match($0, "\\\.[0-9]+"); print substr($0,RSTART,RLENGTH)}'`" - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -install_name "${DYLIB_INSTALL_DIR}/${TK_LIB_FILE}" -unexported_symbols_list $$(f=$(TK_LIB_FILE).E && nm -gp tkMacOSX*.o 2>/dev/null | awk "/^[0-9a-f]+ . \.objc/ {print \$$3}" > $$f && nm -gjp "$(TCL_BIN_DIR)"/$(TCL_STUB_LIB_FILE) | grep ^_[^_] >> $$f && echo $$f)' - echo "$LDFLAGS " | grep -q -- '-prebind ' && TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -seg1addr 0xb000000' - TK_SHLIB_LD_EXTRAS="${TK_SHLIB_LD_EXTRAS}"' -sectcreate __TEXT __info_plist Tk-Info.plist' - EXTRA_WISH_LIBS='-sectcreate __TEXT __info_plist Wish-Info.plist' - EXTRA_WISH_LIBS=${EXTRA_WISH_LIBS}' -sectcreate __TEXT __credits_html Credits.html' - if test "${SHARED_BUILD}" = "0"; then - EXTRA_WISH_LIBS=${EXTRA_WISH_LIBS}' -ObjC' - fi - EXTRA_APP_CC_SWITCHES="${EXTRA_APP_CC_SWITCHES}"' -mdynamic-no-pic' - ac_config_files="$ac_config_files Tk-Info.plist:../macosx/Tk-Info.plist.in Wish-Info.plist:../macosx/Wish-Info.plist.in Credits.html:../macosx/Credits.html.in" - - for l in ${LOCALES}; do CFBUNDLELOCALIZATIONS="${CFBUNDLELOCALIZATIONS}<string>$l</string>"; done - TK_YEAR="`date +%Y`" -fi - -if test "$FRAMEWORK_BUILD" = "1" ; then - -printf "%s\n" "#define TK_FRAMEWORK 1" >>confdefs.h - - # Construct a fake local framework structure to make linking with - # '-framework Tk' and running of tktest work - ac_config_commands="$ac_config_commands Tk.framework" - - LD_LIBRARY_PATH_VAR="DYLD_FRAMEWORK_PATH" - if test "${libdir}" = '${exec_prefix}/lib'; then - # override libdir default - libdir="/Library/Frameworks" - fi - TK_LIB_FILE="Tk" - TK_LIB_FLAG="-framework Tk" - TK_BUILD_LIB_SPEC="-F`pwd | sed -e 's/ /\\\\ /g'` -framework Tk" - TK_LIB_SPEC="-F${libdir} -framework Tk" - libdir="${libdir}/Tk.framework/Versions/\${VERSION}" - TK_LIBRARY="${libdir}/Resources/Scripts" - TK_PKG_DIR="Resources/Scripts" - TK_RSRC_FILE="Tk.rsrc" - WISH_RSRC_FILE="Wish.rsrc" - includedir="${libdir}/Headers" - PRIVATE_INCLUDE_DIR="${libdir}/PrivateHeaders" - HTML_DIR="${libdir}/Resources/Documentation/Reference/Tk" - EXTRA_INSTALL="install-private-headers html-tk" - EXTRA_BUILD_HTML='@ln -fs contents.htm "$(HTML_INSTALL_DIR)"/TkTOC.html' - EXTRA_INSTALL_BINARIES='@echo "Installing Info.plist to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Tk-Info.plist "$(LIB_INSTALL_DIR)/Resources/Info.plist"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Credits.html to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && $(INSTALL_DATA) Credits.html "$(LIB_INSTALL_DIR)/Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing license.terms to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA) "$(TOP_DIR)/license.terms" "$(LIB_INSTALL_DIR)/Resources"' - if test $tk_aqua = yes; then - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Images to $(LIB_INSTALL_DIR)/Resources/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/Resources" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)/Resources"; done' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing wish$(VERSION) script to $(INSTALL_ROOT)/'"${bindir}"'/" && $(INSTALL_DATA_DIR) "$(INSTALL_ROOT)/'"${bindir}"'" && printf > "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)" "#!/bin/sh\n\"\$$(dirname \$$0)'"`eval d="${bindir}"; echo "$d" | sed -e 's#/[^/][^/]*#/..#g'`"'$(bindir)/Wish\" \"\$$@\"" && chmod +x "$(INSTALL_ROOT)/'"${bindir}"'/wish$(VERSION)"' - bindir="${libdir}/Resources/Wish.app/Contents/MacOS" - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Info.plist to $(BIN_INSTALL_DIR)/.." && $(INSTALL_DATA) Wish-Info.plist "$(BIN_INSTALL_DIR)/../Info.plist" && mv -f "$(BIN_INSTALL_DIR)/wish$(VERSION)" "$(BIN_INSTALL_DIR)/Wish"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.icns to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA_DIR) "$(BIN_INSTALL_DIR)/../Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Tk.icns" "$(BIN_INSTALL_DIR)/../Resources/Wish.icns"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Wish.sdef to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) "$(MAC_OSX_DIR)/Wish.sdef" "$(BIN_INSTALL_DIR)/../Resources"' - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Installing Credits.html to $(BIN_INSTALL_DIR)/../Resources" && $(INSTALL_DATA) Credits.html "$(BIN_INSTALL_DIR)/../Resources"' - fi - EXTRA_INSTALL_BINARIES="$EXTRA_INSTALL_BINARIES"' && echo "Finalizing Tk.framework" && rm -f "$(LIB_INSTALL_DIR)/../Current" && ln -s "$(VERSION)" "$(LIB_INSTALL_DIR)/../Current" && for f in "$(LIB_FILE)" tkConfig.sh Resources Headers PrivateHeaders; do rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/Current/$$f" "$(LIB_INSTALL_DIR)/../.."; done && f="$(STUB_LIB_FILE)" && rm -f "$(LIB_INSTALL_DIR)/../../$$f" && ln -s "Versions/$(VERSION)/$$f" "$(LIB_INSTALL_DIR)/../.."' - # Don't use AC_DEFINE for the following as the framework version define - # needs to go into the Makefile even when using autoheader, so that we - # can pick up a potential make override of VERSION. Also, don't put this - # into CFLAGS as it should not go into tkConfig.sh - EXTRA_CC_SWITCHES="$EXTRA_CC_SWITCHES"' -DTK_FRAMEWORK_VERSION=\"$(VERSION)\"' -else - if test $tk_aqua = yes; then - EXTRA_INSTALL_BINARIES='@echo "Installing Images to $(LIB_INSTALL_DIR)/" && $(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)" && for i in Tk.tiff Tk.icns; do $(INSTALL_DATA) "$(MAC_OSX_DIR)/$$i" "$(LIB_INSTALL_DIR)"; done' - fi - # libdir must be a fully qualified path and not ${exec_prefix}/lib - eval libdir="$libdir" - if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then - TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" - TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}" - else - if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then - TK_LIB_FLAG="-ltk${TK_VERSION}" - else - TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`" - fi - TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}" - fi - TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}" -fi - -#-------------------------------------------------------------------- # The statements below define various symbols relating to Tk # stub support. #-------------------------------------------------------------------- diff --git a/unix/configure.ac b/unix/configure.ac index 1b1b7b4..5a3b813 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -545,51 +545,6 @@ fi AC_C_CHAR_UNSIGNED #-------------------------------------------------------------------- -# Zipfs support - Tip 430 -#-------------------------------------------------------------------- -AC_ARG_ENABLE(zipfs, - AS_HELP_STRING([--enable-zipfs],[build with Zipfs support (default: on)]), - [tcl_ok=$enableval], [tcl_ok=yes]) -if test "$tcl_ok" = "yes" ; then - # - # Find a native compiler - # - AX_CC_FOR_BUILD - # - # Find a native zip implementation - # - SC_ZIPFS_SUPPORT - ZIPFS_BUILD=1 - TK_ZIP_FILE=libtk_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip -else - ZIPFS_BUILD=0 - TK_ZIP_FILE= -fi -# Do checking message here to not mess up interleaved configure output -AC_MSG_CHECKING([for building with zipfs]) -if test "${ZIPFS_BUILD}" = 1; then - if test "${SHARED_BUILD}" = 0; then - ZIPFS_BUILD=2; - AC_DEFINE(ZIPFS_BUILD, 2, [Are we building with zipfs enabled?]) - INSTALL_LIBRARIES=install-libraries-zipfs-static - AC_MSG_RESULT([yes]) - else - AC_DEFINE(ZIPFS_BUILD, 1, [Are we building with zipfs enabled?])\ - INSTALL_LIBRARIES=install-libraries-zipfs-shared - AC_MSG_RESULT([yes]) - fi -else -AC_MSG_RESULT([no]) -INSTALL_LIBRARIES=install-libraries -INSTALL_MSGS=install-msgs -fi -AC_SUBST(ZIPFS_BUILD) -AC_SUBST(TK_ZIP_FILE) -AC_SUBST(INSTALL_LIBRARIES) -AC_SUBST(INSTALL_MSGS) - - -#-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtk as a shared library instead of a static library. #-------------------------------------------------------------------- @@ -708,6 +663,51 @@ else fi #-------------------------------------------------------------------- +# Zipfs support - Tip 430 +#-------------------------------------------------------------------- +AC_ARG_ENABLE(zipfs, + AS_HELP_STRING([--enable-zipfs],[build with Zipfs support (default: on)]), + [tcl_ok=$enableval], [tcl_ok=yes]) +if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then + # + # Find a native compiler + # + AX_CC_FOR_BUILD + # + # Find a native zip implementation + # + SC_ZIPFS_SUPPORT + ZIPFS_BUILD=1 + TK_ZIP_FILE=libtk_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip +else + ZIPFS_BUILD=0 + TK_ZIP_FILE= +fi +# Do checking message here to not mess up interleaved configure output +AC_MSG_CHECKING([for building with zipfs]) +if test "${ZIPFS_BUILD}" = 1; then + if test "${SHARED_BUILD}" = 0; then + ZIPFS_BUILD=2; + AC_DEFINE(ZIPFS_BUILD, 2, [Are we building with zipfs enabled?]) + INSTALL_LIBRARIES=install-libraries-zipfs-static + AC_MSG_RESULT([yes]) + else + AC_DEFINE(ZIPFS_BUILD, 1, [Are we building with zipfs enabled?])\ + INSTALL_LIBRARIES=install-libraries-zipfs-shared + AC_MSG_RESULT([yes]) + fi +else +AC_MSG_RESULT([no]) +INSTALL_LIBRARIES=install-libraries +INSTALL_MSGS=install-msgs +fi +AC_SUBST(ZIPFS_BUILD) +AC_SUBST(TK_ZIP_FILE) +AC_SUBST(INSTALL_LIBRARIES) +AC_SUBST(INSTALL_MSGS) + + +#-------------------------------------------------------------------- # The statements below define various symbols relating to Tk # stub support. #-------------------------------------------------------------------- diff --git a/win/Makefile.in b/win/Makefile.in index 44d9201..4a1c10f 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -199,6 +199,7 @@ MKDIR = mkdir -p SHELL = @SHELL@ RM = rm -f COPY = cp +LN = ln BUILD_TCLSH = @BUILD_TCLSH@ @@ -216,6 +217,45 @@ NO_DEPRECATED_FLAGS = -DTCL_NO_DEPRECATED TCL_EXE = @TCLSH_PROG@ WINE = @WINE@ +### +# Tip 430 - ZipFS Modifications +### + +TK_ZIP_FILE = @TK_ZIP_FILE@ +TK_VFS_PATH = libtk.vfs/tk_library +TK_VFS_ROOT = libtk.vfs + +HOST_CC = @CC_FOR_BUILD@ +HOST_EXEEXT = @EXEEXT_FOR_BUILD@ +HOST_OBJEXT = @OBJEXT_FOR_BUILD@ +ZIPFS_BUILD = @ZIPFS_BUILD@ +NATIVE_ZIP = @ZIP_PROG@ +ZIP_PROG_OPTIONS = @ZIP_PROG_OPTIONS@ +ZIP_PROG_VFSSEARCH = @ZIP_PROG_VFSSEARCH@ +SHARED_BUILD = @SHARED_BUILD@ +INSTALL_MSGS = @INSTALL_MSGS@ +INSTALL_LIBRARIES = @INSTALL_LIBRARIES@ + +# Minizip +MINIZIP_OBJS = \ + adler32.$(HOST_OBJEXT) \ + compress.$(HOST_OBJEXT) \ + crc32.$(HOST_OBJEXT) \ + deflate.$(HOST_OBJEXT) \ + infback.$(HOST_OBJEXT) \ + inffast.$(HOST_OBJEXT) \ + inflate.$(HOST_OBJEXT) \ + inftrees.$(HOST_OBJEXT) \ + ioapi.$(HOST_OBJEXT) \ + iowin32.$(HOST_OBJEXT) \ + trees.$(HOST_OBJEXT) \ + uncompr.$(HOST_OBJEXT) \ + zip.$(HOST_OBJEXT) \ + zutil.$(HOST_OBJEXT) \ + minizip.$(HOST_OBJEXT) + +ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@ + CC_SWITCHES = ${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} \ -I"${GENERIC_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \ -I"${XLIB_DIR_NATIVE}" -I"${BITMAP_DIR_NATIVE}" \ @@ -642,6 +682,29 @@ cat32.${OBJEXT}: $(TCL_SRC_DIR)/win/cat.c $(CAT32): cat32.${OBJEXT} $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LIBS) $(LDFLAGS_CONSOLE) +tkzipfile: ${TK_ZIP_FILE} + +${TK_ZIP_FILE}: ${ZIP_INSTALL_OBJS} + @rm -rf ${TK_VFS_ROOT} + @mkdir -p ${TK_VFS_PATH} + @echo "creating ${TK_VFS_PATH} (prepare compression)" + @( \ + $(LN) $$(find $(TOP_DIR)/library/* -maxdepth 0 -type f) ${TK_VFS_PATH}/ && \ + (for D in $$(find $(TOP_DIR)/library/* -maxdepth 0 -type d); do \ + mkdir -p "${TK_VFS_PATH}/$$(basename $$D)"; \ + $(LN) -s $$D/* ${TK_VFS_PATH}/$$(basename $$D)/; \ + done) \ + ) || ( \ + $(COPY) -a $(TOP_DIR)/library/* ${TK_VFS_PATH}; \ + ) + (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \ + (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \ + cd ${TK_VFS_ROOT} && \ + $$zip ${ZIP_PROG_OPTIONS} ../${TK_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null && \ + echo "${TK_ZIP_FILE} successful created with $$zip" && \ + cd ..) + + # The following targets are configured by autoconf to generate either # a shared library or static library @@ -654,6 +717,11 @@ ${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES) @$(RM) ${TK_DLL_FILE} @MAKE_DLL@ ${TK_OBJS} $(TK_RES) $(SHLIB_LD_LIBS) @VC_MANIFEST_EMBED_DLL@ + @if test "${ZIPFS_BUILD}" = "1" ; then \ + cat ${TK_ZIP_FILE} >> ${TK_DLL_FILE}; \ + ${NATIVE_ZIP} -A ${TK_DLL_FILE} \ + || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ + fi ${TK_LIB_FILE}: ${TK_OBJS} @$(RM) ${TK_LIB_FILE} diff --git a/win/makefile.vc b/win/makefile.vc index 7b13073..b78964b 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -508,19 +508,21 @@ $(TKSCRIPTZIP): .PHONY @if not exist "$(LIBTKVFS)" $(MKDIR) "$(LIBTKVFS)"
@if exist "$(LIBTKVFS)\$(TKSCRIPTZIPTOP)" $(RMDIR) "$(LIBTKVFS)\$(TKSCRIPTZIPTOP)"
@$(CPYDIR) $(LIBDIR) "$(LIBTKVFS)\$(TKSCRIPTZIPTOP)"
- @echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl"
- @echo zipfs mkzip {$@} {$(LIBTKVFS)} {$(LIBTKVFS)} >> "$(OUT_DIR)\zipper.tcl"
- @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl
+ @cd "$(OUT_DIR)" && $(TCLSH) <<
+file delete -force {$@}
+zipfs mkzip {$@} {$(LIBTKVFS)} {$(LIBTKVFS)}
+<<
!if $(STATIC_BUILD)
$(WISHSCRIPTZIP): $(TKSCRIPTZIP)
@echo Building Wish Tcl+Tk library zip file
@if exist "$(LIBTKVFS)\tcl_library" $(RMDIR) "$(LIBTKVFS)\tcl_library"
- @echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl"
- @echo zipfs mount mnt "$(TCLSCRIPTZIP:\=/)" >> "$(OUT_DIR)\zipper.tcl"
- @echo file copy [file join [zipfs root] mnt tcl_library] "$(LIBTKVFS:\=/)" >> "$(OUT_DIR)\zipper.tcl"
- @echo zipfs mkzip {$@} {$(LIBTKVFS)} {$(LIBTKVFS)} >> "$(OUT_DIR)\zipper.tcl"
- @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl
+ @cd "$(OUT_DIR)" && $(TCLSH) <<
+file delete -force {$@}
+zipfs mount mnt "$(TCLSCRIPTZIP:\=/)"
+file copy [file join [zipfs root] mnt tcl_library] "$(LIBTKVFS:\=/)"
+zipfs mkzip {$@} {$(LIBTKVFS)} {$(LIBTKVFS)}
+<<
!endif
@@ -540,6 +542,7 @@ genstubs: set TCL_LIBRARY=$(TCL_LIBRARY)
$(TCLSH) $(_TCLDIR)\tools\genStubs.tcl $(GENERICDIR) \
$(GENERICDIR)\$(PROJECT).decls $(GENERICDIR)\$(PROJECT)Int.decls
+ $(TCLSH) $(_TCLDIR)\tools\genStubs.tcl $(GENERICDIR)\ttk $(GENERICDIR)\ttk\ttk.decls
!endif
diff --git a/win/tkWinIco.c b/win/tkWinIco.c index d667c23..4485787 100644 --- a/win/tkWinIco.c +++ b/win/tkWinIco.c @@ -1,7 +1,7 @@ /* - * tkWinIco.h -- + * tkWinIco.c -- * - * This file contains declarations for icon-manipulation routines + * This file contains functions for icon-manipulation routines * in Windows. * * Copyright © 1995-1996 Microsoft Corp. diff --git a/win/tkWinInit.c b/win/tkWinInit.c index 28ba81d..1f630e4 100644 --- a/win/tkWinInit.c +++ b/win/tkWinInit.c @@ -126,7 +126,7 @@ TkpDisplayWarning( /* If running on Cygwin and we have a stderr channel, use it. */ #if !defined(STATIC_BUILD) - if (tclStubsPtr->reserved9) { + if (tclStubsPtr->tcl_CreateFileHandler) { Tcl_Channel errChannel = Tcl_GetStdChannel(TCL_STDERR); if (errChannel) { Tcl_WriteChars(errChannel, title, -1); |