diff options
Diffstat (limited to 'win/makefile.vc')
-rw-r--r-- | win/makefile.vc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index e752169..b8d3c11 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -179,6 +179,9 @@ VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) !include versions.vc
+# Single file Tclsh
+TCLSFE = $(OUT_DIR)\$(PROJECT)sfe$(VERSION).exe
+
DDEDOTVERSION = 1.4
DDEVERSION = $(DDEDOTVERSION:.=)
@@ -458,6 +461,13 @@ core: setup $(TCLLIB) $(TCLSTUBLIB) shell: setup $(TCLSH)
dlls: setup $(TCLREGLIB) $(TCLDDELIB) $(OUT_DIR)\zlib1.dll $(OUT_DIR)\libtommath.dll
all: setup $(TCLSH) $(TCLSTUBLIB) dlls pkgs
+!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES)
+sfe: setup $(TCLSH) $(TCLSTUBLIB) $(TCLSFE)
+!else
+sfe:
+ @echo Single file executables need static build of Tcl. Specify "static" and "staticpkg" in OPTS.
+!endif
+
tcltest: setup $(TCLTEST) dlls
install: install-binaries install-libraries install-docs install-pkgs
!if $(SYMBOLS)
@@ -597,6 +607,24 @@ genstubs: $(GENERICDIR:\=/)/tclOO.decls
!endif
+#---------------------------------------------------------------------
+# Build a single file executable version of Tcl
+#---------------------------------------------------------------------
+!if $(STATIC_BUILD) && $(TCL_USE_STATIC_PACKAGES)
+$(OUT_DIR)\tcl_library.zip:
+ @echo Building Tcl library zip file
+ @echo file delete -force tcl_library > "$(OUT_DIR)\zipper.tcl"
+ @echo file delete -force tcl_library.zip >> "$(OUT_DIR)\zipper.tcl"
+ @echo file copy ../../library tcl_library >> "$(OUT_DIR)\zipper.tcl"
+ @echo file rename tcl_library/manifest.txt tcl_library/pkgIndex.tcl >> "$(OUT_DIR)\zipper.tcl"
+ @echo zipfs mkzip {$@} tcl_library tcl_library >> "$(OUT_DIR)\zipper.tcl"
+ @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl
+
+$(TCLSFE): $(OUT_DIR)\tcl_library.zip
+ @echo Building single-file exe from $(TCLSH) and $(OUT_DIR)\tcl_library.zip
+ @copy /y /b "$(TCLSH)"+"$(OUT_DIR)\tcl_library.zip" "$@"
+!endif
+
#---------------------------------------------------------------------
# Build the Windows HTML help file.
|