diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-29 10:54:46 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-29 10:54:46 (GMT) |
commit | 1ee8159bc5bdcbf5785cab15202d946f861a2fd1 (patch) | |
tree | a97ffd53b08443aa17ac6812eb371b19c8075aaf /win | |
parent | a8e2e4df7ffb5875c42ccaaa949f3fb2325a94b8 (diff) | |
parent | b54ff1e8095404452e267a28ca9a5caea01a5153 (diff) | |
download | tk-1ee8159bc5bdcbf5785cab15202d946f861a2fd1.zip tk-1ee8159bc5bdcbf5785cab15202d946f861a2fd1.tar.gz tk-1ee8159bc5bdcbf5785cab15202d946f861a2fd1.tar.bz2 |
Merge trunk. More progress: In shared builds, Tk zip-files are now appended to the Tk shared library
Diffstat (limited to 'win')
-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 |
4 files changed, 82 insertions, 11 deletions
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); |