summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-10 12:56:47 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-02-10 12:56:47 (GMT)
commitc0cb466a863a483140db1ffab76d806c696a4dff (patch)
tree9c39978681530a1166dcad1aab6e6606f6108a54
parentea4e2c54322fdec470e442447b66d815635851da (diff)
downloadtcl-c0cb466a863a483140db1ffab76d806c696a4dff.zip
tcl-c0cb466a863a483140db1ffab76d806c696a4dff.tar.gz
tcl-c0cb466a863a483140db1ffab76d806c696a4dff.tar.bz2
Make TIP #430 work on cygwin. Simplify some makefiles
-rw-r--r--generic/tclZipfs.c31
-rw-r--r--win/Makefile.in4
-rw-r--r--win/makefile.vc11
3 files changed, 11 insertions, 35 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 7ee13a7..ffc382a 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -38,8 +38,6 @@
#include "zutil.h"
#include "crc32.h"
-#ifdef CFG_RUNTIME_DLLFILE
-
/*
** We are compiling as part of the core.
** TIP430 style zipfs prefix
@@ -50,22 +48,6 @@
#define ZIPFS_APP_MOUNT "//zipfs:/app"
#define ZIPFS_ZIP_MOUNT "//zipfs:/lib/tcl"
-#else /* !CFG_RUNTIME_DLLFILE */
-
-/*
-** We are compiling from the /compat folder of tclconfig
-** Pre TIP430 style zipfs prefix
-** //zipfs:/ doesn't work straight out of the box on either windows or Unix
-** without other changes made to tip 430
-*/
-
-#define ZIPFS_VOLUME "zipfs:/"
-#define ZIPFS_VOLUME_LEN 7
-#define ZIPFS_APP_MOUNT "zipfs:/app"
-#define ZIPFS_ZIP_MOUNT "zipfs:/lib/tcl"
-
-#endif /* CFG_RUNTIME_DLLFILE */
-
/*
* Various constants and offsets found in ZIP archive files
*/
@@ -3163,6 +3145,7 @@ TclZipfs_TclLibrary(void)
* that we must mount the zip file and dll before releasing to search.
*/
+#if !defined(STATIC_BUILD)
#if defined(_WIN32)
hModule = TclWinGetTclInstance();
GetModuleFileNameW(hModule, wName, MAX_PATH);
@@ -3171,12 +3154,20 @@ TclZipfs_TclLibrary(void)
if (ZipfsAppHookFindTclInit(dllName) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
-#elif /* !_WIN32 && */ defined(CFG_RUNTIME_DLLFILE)
+#else
+# if defined(CFG_RUNTIME_LIBDIR)
if (ZipfsAppHookFindTclInit(
CFG_RUNTIME_LIBDIR "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
}
-#endif /* _WIN32 || CFG_RUNTIME_DLLFILE */
+# endif
+# if defined(CFG_RUNTIME_BINDIR)
+ if (ZipfsAppHookFindTclInit(
+ CFG_RUNTIME_BINDIR "/" CFG_RUNTIME_DLLFILE) == TCL_OK) {
+ return Tcl_NewStringObj(zipfs_literal_tcl_library, -1);
+ }
+# endif
+#endif /* _WIN32 */
/*
* If anything set the cache (but subsequently failed) go with that
diff --git a/win/Makefile.in b/win/Makefile.in
index b5b4f26..cdaeec4 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -654,10 +654,6 @@ tclMainW.${OBJEXT}: tclMain.c
# TIP #430, ZipFS Support
tclZipfs.${OBJEXT}: $(GENERIC_DIR)/tclZipfs.c
$(CC) -c $(CC_SWITCHES) -DBUILD_tcl \
- -DCFG_RUNTIME_PATH="\"$(bindir_native)\"" \
- -DCFG_RUNTIME_DLLFILE="\"$(TCL_DLL_FILE)\"" \
- -DCFG_RUNTIME_LIBDIR="\"$(bindir_native)\"" \
- -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY_NATIVE)\"" \
$(ZLIB_INCLUDE) -I$(MINIZIP_DIR_NATIVE) @DEPARG@ $(CC_OBJNAME)
diff --git a/win/makefile.vc b/win/makefile.vc
index a124b34..49a82d2 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -807,19 +807,8 @@ $(TMP_DIR)\tclTestObj.obj: $(GENERICDIR)\tclTestObj.c
$(TMP_DIR)\tclWinTest.obj: $(WIN_DIR)\tclWinTest.c
$(CCAPPCMD) $?
-# Following the lead of the autoconf based make, we define the
-# CFG_RUNTIME_DLLFILE flag specifically for tclZipfs and tclPkgConfig
-# and not as part of the global defines. Moreover, for tclZipfs,
-# we define only CFG_RUNTIME_DLLFILE to force use of //zipfs:
-# as the zip fs root. However it is defined as empty. See tclPkgConfig.obj
-# comments as to why.
-# We do not define other CFG_RUNTIME_ZIPFILE at all because
-# that causes the zipfs code to go looking at directories that existed
-# on the *build* system as opposed to the target runtime system. This
-# is the case even if the value is defined as an empty string.
$(TMP_DIR)\tclZipfs.obj: $(GENERICDIR)\tclZipfs.c
$(cc32) $(pkgcflags) \
- -DCFG_RUNTIME_DLLFILE="\"\"" \
-I$(COMPATDIR)\zlib -I$(COMPATDIR)\zlib\contrib\minizip \
-Fo$@ $?