summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/onefiledist.yml5
-rw-r--r--.github/workflows/win-build.yml7
-rw-r--r--macosx/GNUmakefile2
-rw-r--r--unix/Makefile.in51
-rwxr-xr-xunix/configure181
-rw-r--r--unix/configure.ac45
-rw-r--r--unix/tkConfig.h.in3
-rw-r--r--win/Makefile.in74
-rwxr-xr-xwin/configure181
-rw-r--r--win/configure.ac46
10 files changed, 585 insertions, 10 deletions
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
index c0a221e..a7ee59b 100644
--- a/.github/workflows/onefiledist.yml
+++ b/.github/workflows/onefiledist.yml
@@ -180,6 +180,8 @@ jobs:
repository: tcltk/tcl
ref: core-8-branch
path: tcl
+ - name: Install MSYS2, Make, Zip
+ run: choco install -y msys2 make zip
- name: Setup Environment
run: |
mkdir -p install/1dist
@@ -196,7 +198,6 @@ jobs:
- name: Build & Install Tcl
run: |
make binaries libraries tclzipfile install
- echo "ZIP_BIN=`pwd`/minizip.exe" >> $GITHUB_ENV
echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV
$INST_DIR/bin/tclsh* $VER_PATH $GITHUB_ENV
working-directory: tcl/win
@@ -214,7 +215,7 @@ jobs:
run: |
unzip $TCL_ZIP
cp -R ../lib/tk[0-9]* .
- $ZIP_BIN -o -r ../1dist.zip *
+ zip -o -r ../1dist.zip *
working-directory: install/1dist
- name: Package
run: |
diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml
index fa956c6..8c388ec 100644
--- a/.github/workflows/win-build.yml
+++ b/.github/workflows/win-build.yml
@@ -95,7 +95,6 @@ jobs:
- "no"
- "mem"
- "all"
- # Using powershell means we need to explicitly stop on failure
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -103,10 +102,10 @@ jobs:
uses: actions/checkout@v2
with:
repository: tcltk/tcl
- ref: core-8-6-branch
+ ref: core-8-branch
path: tcl
- - name: Install MSYS2, Make
- run: choco install -y msys2 make
+ - name: Install MSYS2, Make, Zip
+ run: choco install -y msys2 make zip
- name: Prepare
run: |
touch tkStubInit.c
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/unix/Makefile.in b/unix/Makefile.in
index ae6e05b..8a11b53 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}
+${LIB_FILE}: ${STUB_LIB_FILE} @LIB_RSRC_FILE@ ${OBJS} ${TK_ZIP_FILE}
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 e560f49..f8c7186 100755
--- a/unix/configure
+++ b/unix/configure
@@ -689,6 +689,16 @@ TK_MAJOR_VERSION
TK_VERSION
TK_DEMO_DIR
DEMO_DIR
+INSTALL_MSGS
+INSTALL_LIBRARIES
+TK_ZIP_FILE
+ZIPFS_BUILD
+ZIP_INSTALL_OBJS
+ZIP_PROG_VFSSEARCH
+ZIP_PROG_OPTIONS
+ZIP_PROG
+EXEEXT_FOR_BUILD
+CC_FOR_BUILD
UNIX_FONT_OBJS
XFT_LIBS
XFT_CFLAGS
@@ -808,6 +818,7 @@ with_x
enable_xft
enable_xss
enable_framework
+enable_zipfs
'
ac_precious_vars='build_alias
host_alias
@@ -1461,6 +1472,7 @@ Optional Features:
--enable-xss use XScreenSaver for activity timer (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]
@@ -8661,6 +8673,175 @@ else
fi
#--------------------------------------------------------------------
+# Zipfs support - Tip 430
+#--------------------------------------------------------------------
+# Check whether --enable-zipfs was given.
+if test ${enable_zipfs+y}
+then :
+ enableval=$enable_zipfs; tcl_ok=$enableval
+else $as_nop
+ tcl_ok=yes
+fi
+
+if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then
+ #
+ # Find a native compiler
+ #
+ # Put a plausible default for CC_FOR_BUILD in Makefile.
+ if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
+printf %s "checking for gcc... " >&6; }
+ if test ${ac_cv_path_cc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ fi
+ fi
+
+ # Also set EXEEXT_FOR_BUILD.
+ if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+ else
+ OBJEXT_FOR_BUILD='.no'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
+printf %s "checking for build system executable suffix... " >&6; }
+if test ${bfd_cv_build_exeext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5
+printf "%s\n" "$bfd_cv_build_exeext" >&6; }
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+ fi
+
+ #
+ # Find a native zip implementation
+ #
+
+ ZIP_PROG=""
+ ZIP_PROG_OPTIONS=""
+ ZIP_PROG_VFSSEARCH=""
+ ZIP_INSTALL_OBJS=""
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
+printf %s "checking for zip... " >&6; }
+ if test ${ac_cv_path_zip+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/zip 2> /dev/null` \
+ `ls -r $dir/zip 2> /dev/null` ; do
+ if test x"$ac_cv_path_zip" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_zip=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ if test -f "$ac_cv_path_zip" ; then
+ ZIP_PROG="$ac_cv_path_zip"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5
+printf "%s\n" "$ZIP_PROG" >&6; }
+ ZIP_PROG_OPTIONS="-rq"
+ ZIP_PROG_VFSSEARCH="*"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5
+printf "%s\n" "Found INFO Zip in environment" >&6; }
+ # Use standard arguments for zip
+ else
+ # It is not an error if an installed version of Zip can't be located.
+ # We can use the locally distributed minizip instead
+ ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
+ ZIP_PROG_OPTIONS="-o -r"
+ ZIP_PROG_VFSSEARCH="*"
+ ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH. Building minizip" >&5
+printf "%s\n" "No zip found on PATH. Building minizip" >&6; }
+ fi
+
+
+
+
+
+ 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
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
+printf %s "checking for building with zipfs... " >&6; }
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
+
+printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h
+
+ INSTALL_LIBRARIES=install-libraries-zipfs-static
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+
+printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h
+\
+ INSTALL_LIBRARIES=install-libraries-zipfs-shared
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+
+
+
+
+
+
+#--------------------------------------------------------------------
# The statements below define various symbols relating to Tk
# stub support.
#--------------------------------------------------------------------
diff --git a/unix/configure.ac b/unix/configure.ac
index b5f840a..5a3b813 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -663,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/unix/tkConfig.h.in b/unix/tkConfig.h.in
index 5d7a512..c0db42c 100644
--- a/unix/tkConfig.h.in
+++ b/unix/tkConfig.h.in
@@ -180,6 +180,9 @@
# endif
#endif
+/* Are we building with zipfs enabled? */
+#undef ZIPFS_BUILD
+
/* Are Darwin SUSv3 extensions available? */
#undef _DARWIN_C_SOURCE
diff --git a/win/Makefile.in b/win/Makefile.in
index 07c2bea..a02dbc2 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -129,6 +129,10 @@ EXESUFFIX = @EXESUFFIX@
VER = @TK_MAJOR_VERSION@@TK_MINOR_VERSION@
DOTVER = @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@
+TK_ZIP_FILE = @TK_ZIP_FILE@
+TK_VFS_PATH = libtk.vfs/tk_library
+TK_VFS_ROOT = libtk.vfs
+
TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
TK_LIB_FILE = @TK_LIB_FILE@
TK_DLL_FILE = @TK_DLL_FILE@
@@ -195,6 +199,7 @@ MKDIR = mkdir -p
SHELL = @SHELL@
RM = rm -f
COPY = cp
+LN = ln
BUILD_TCLSH = @BUILD_TCLSH@
@@ -212,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}" \
@@ -638,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
@@ -646,10 +713,15 @@ ${TK_STUB_LIB_FILE}: ${STUB_OBJS}
@MAKE_STUB_LIB@ ${STUB_OBJS}
@POST_MAKE_LIB@
-${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES)
+${TK_DLL_FILE}: ${TK_OBJS} $(TK_RES) ${TK_ZIP_FILE}
@$(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/configure b/win/configure
index 8eac969..dcbfede 100755
--- a/win/configure
+++ b/win/configure
@@ -706,6 +706,16 @@ TK_MAJOR_VERSION
TK_VERSION
MACHINE
TK_WIN_VERSION
+INSTALL_MSGS
+INSTALL_LIBRARIES
+TK_ZIP_FILE
+ZIPFS_BUILD
+ZIP_INSTALL_OBJS
+ZIP_PROG_VFSSEARCH
+ZIP_PROG_OPTIONS
+ZIP_PROG
+EXEEXT_FOR_BUILD
+CC_FOR_BUILD
TCLSH_PROG
BUILD_TCLSH
VC_MANIFEST_EMBED_EXE
@@ -794,6 +804,7 @@ with_tcl
enable_64bit
enable_symbols
enable_embedded_manifest
+enable_zipfs
'
ac_precious_vars='build_alias
host_alias
@@ -1427,6 +1438,7 @@ Optional Features:
--enable-symbols build with debugging symbols (default: off)
--enable-embedded-manifest
embed manifest if possible (default: yes)
+ --enable-zipfs build with Zipfs support (default: on)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -5577,6 +5589,175 @@ printf "%s\n" "No tclsh found on PATH" >&6; }
+#--------------------------------------------------------------------
+# Zipfs support - Tip 430
+#--------------------------------------------------------------------
+# Check whether --enable-zipfs was given.
+if test ${enable_zipfs+y}
+then :
+ enableval=$enable_zipfs; tcl_ok=$enableval
+else $as_nop
+ tcl_ok=yes
+fi
+
+if test "$tcl_ok" = "yes" ; then
+ #
+ # Find a native compiler
+ #
+ # Put a plausible default for CC_FOR_BUILD in Makefile.
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc" >&5
+printf %s "checking for gcc... " >&6; }
+ if test ${ac_cv_path_cc+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/gcc 2> /dev/null` \
+ `ls -r $dir/gcc 2> /dev/null` ; do
+ if test x"$ac_cv_path_cc" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_cc=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ fi
+fi
+
+# Also set EXEEXT_FOR_BUILD.
+if test "x$cross_compiling" = "xno"; then
+ EXEEXT_FOR_BUILD='$(EXEEXT)'
+ OBJEXT_FOR_BUILD='$(OBJEXT)'
+else
+ OBJEXT_FOR_BUILD='.no'
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for build system executable suffix" >&5
+printf %s "checking for build system executable suffix... " >&6; }
+if test ${bfd_cv_build_exeext+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ rm -f conftest*
+ echo 'int main () { return 0; }' > conftest.c
+ bfd_cv_build_exeext=
+ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
+ for file in conftest.*; do
+ case $file in
+ *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
+ esac
+ done
+ rm -f conftest*
+ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_build_exeext" >&5
+printf "%s\n" "$bfd_cv_build_exeext" >&6; }
+ EXEEXT_FOR_BUILD=""
+ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
+fi
+
+ #
+ # Find a native zip implementation
+ #
+
+ ZIP_PROG=""
+ ZIP_PROG_OPTIONS=""
+ ZIP_PROG_VFSSEARCH=""
+ ZIP_INSTALL_OBJS=""
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zip" >&5
+printf %s "checking for zip... " >&6; }
+ if test ${ac_cv_path_zip+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ search_path=`echo ${PATH} | sed -e 's/:/ /g'`
+ for dir in $search_path ; do
+ for j in `ls -r $dir/zip 2> /dev/null` \
+ `ls -r $dir/zip 2> /dev/null` ; do
+ if test x"$ac_cv_path_zip" = x ; then
+ if test -f "$j" ; then
+ ac_cv_path_zip=$j
+ break
+ fi
+ fi
+ done
+ done
+
+fi
+
+ if test -f "$ac_cv_path_zip" ; then
+ ZIP_PROG="$ac_cv_path_zip"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ZIP_PROG" >&5
+printf "%s\n" "$ZIP_PROG" >&6; }
+ ZIP_PROG_OPTIONS="-rq"
+ ZIP_PROG_VFSSEARCH="*"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Found INFO Zip in environment" >&5
+printf "%s\n" "Found INFO Zip in environment" >&6; }
+ # Use standard arguments for zip
+ else
+ # It is not an error if an installed version of Zip can't be located.
+ # We can use the locally distributed minizip instead
+ ZIP_PROG="./minizip${EXEEXT_FOR_BUILD}"
+ ZIP_PROG_OPTIONS="-o -r"
+ ZIP_PROG_VFSSEARCH="*"
+ ZIP_INSTALL_OBJS="minizip${EXEEXT_FOR_BUILD}"
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: No zip found on PATH building minizip" >&5
+printf "%s\n" "No zip found on PATH building minizip" >&6; }
+ fi
+
+
+
+
+
+ ZIPFS_BUILD=1
+ TK_ZIP_FILE=libtcl_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip
+else
+ ZIPFS_BUILD=0
+ TCL_ZIP_FILE=
+fi
+# Do checking message here to not mess up interleaved configure output
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for building with zipfs" >&5
+printf %s "checking for building with zipfs... " >&6; }
+if test "${ZIPFS_BUILD}" = 1; then
+ if test "${SHARED_BUILD}" = 0; then
+ ZIPFS_BUILD=2;
+
+printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h
+
+ INSTALL_LIBRARIES=install-libraries-zipfs-static
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+
+printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h
+\
+ INSTALL_LIBRARIES=install-libraries-zipfs-shared
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ fi
+else
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+INSTALL_LIBRARIES=install-libraries
+INSTALL_MSGS=install-msgs
+fi
+
+
+
+
+
+
#------------------------------------------------------------------------
# tkConfig.sh refers to this by a different name
#------------------------------------------------------------------------
diff --git a/win/configure.ac b/win/configure.ac
index a71858e..2180b55 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -178,6 +178,52 @@ SC_EMBED_MANIFEST(wish.exe.manifest)
SC_BUILD_TCLSH
SC_PROG_TCLSH
+#--------------------------------------------------------------------
+# 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=libtcl_${TK_MAJOR_VERSION}_${TK_MINOR_VERSION}_${TK_PATCH_LEVEL}.zip
+else
+ ZIPFS_BUILD=0
+ TCL_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)
+
+
#------------------------------------------------------------------------
# tkConfig.sh refers to this by a different name
#------------------------------------------------------------------------