Skip to content

gh-150836: Build Tcl/Tk with noembed on Windows#150888

Open
jjhelmus wants to merge 3 commits into
python:mainfrom
jjhelmus:windows_noembed_tcltk
Open

gh-150836: Build Tcl/Tk with noembed on Windows#150888
jjhelmus wants to merge 3 commits into
python:mainfrom
jjhelmus:windows_noembed_tcltk

Conversation

@jjhelmus
Copy link
Copy Markdown

@jjhelmus jjhelmus commented Jun 3, 2026

Build Tcl/Tk with the noembed option on Windows. With this option the Tcl and Tk script libraries are not embedded in the DLLs but rather copied into directories in the install prefix.

jjhelmus added 2 commits June 3, 2026 14:53
The zip file with the Tcl scripts need to be built even if it is not
embedded. This file is copied into the install directory by the
install-libraries target
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented Jun 3, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

Comment thread PCbuild/tcl.vcxproj
set VCINSTALLDIR=$(VCInstallDir)
cd /D "$(tclDir)win"
nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) $(WarningsFlags) $(TclshNativeFlag) core shell dlls
nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) $(WarningsFlags) $(TclshNativeFlag) core shell dlls libtclzip
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the extra target create any more DLLs that we need to include in the distribution?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new target does not require any new DLLs.

This just explicitly requests for libtcl9.0.3.zip to be created. It is needed in the install step as the file is copied into the lib directory regardless of the embed/noembed option. When using the default embed option this file is created automatically and then embedded at the end of the DLL.

It seem odd that this file is included in the install-libraries target as it is not required at runtime from what I can tell. It is either embedded in the DLL (embed) or included unpacked (noembed). I'm going to check with upstream for a answer.

@jjhelmus
Copy link
Copy Markdown
Author

jjhelmus commented Jun 4, 2026

I checked this locally and found that this does output a complete tcl9.0/tk9.0 directory in the /lib/ directory as is done in Tcl/Tk 8.6.

There is a question of the version numbers that should be used for these. The tcltk version could be bumped to 9.0.3.1 which will then match the version of the tk source (9.0.3.1) but not the tcl source (9.0.3.0). Adding a tcl-9.0.3.1 tag to the existing tcl-9.0.3.0 commit would align these versions which seems reasonable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants