From e02e1dd873a053c3cd75ad61fcc798be27392557 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Nov 2020 07:51:06 +0000 Subject: Tk 8.5 only builds with Tcl 8.5 or 8.6, not with Tcl 8.7 --- .github/workflows/linux-build.yml | 2 +- .github/workflows/mac-build.yml | 4 ++-- .github/workflows/win-build.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 901105e..5c4722e 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -31,7 +31,7 @@ jobs: uses: actions/checkout@v2 with: repository: tcltk/tcl - ref: core-8-branch + ref: core-8-5-branch path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 2760be9..f115aa3 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v2 with: repository: tcltk/tcl - ref: core-8-branch + ref: core-8-5-branch path: tcl - name: Prepare checked out repositories run: | @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v2 with: repository: tcltk/tcl - ref: core-8-branch + ref: core-8-5-branch path: tcl - name: Prepare checked out repositories run: | diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 6c02a9e..37ad7e1 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v2 with: repository: tcltk/tcl - ref: core-8-branch + ref: core-8-5-branch path: tcl - name: Make Install Location working-directory: . @@ -98,7 +98,7 @@ jobs: uses: actions/checkout@v2 with: repository: tcltk/tcl - ref: core-8-branch + ref: core-8-5-branch path: tcl - name: Install MSYS2, Make run: choco install -y msys2 make -- cgit v0.12 From 3acc3fa16194242d5c2699b32871a3e91c1595be Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Nov 2020 09:42:02 +0000 Subject: Account for test-cases which we already know are failing on Ubuntu --- tests/bitmap.test | 2 +- tests/border.test | 2 +- tests/canvText.test | 2 +- tests/cursor.test | 2 +- tests/focus.test | 2 +- tests/font.test | 2 +- tests/pack.test | 2 +- tests/place.test | 2 +- tests/scrollbar.test | 2 +- tests/send.test | 2 +- tests/textDisp.test | 2 +- tests/textWind.test | 2 +- tests/unixFont.test | 2 +- tests/unixWm.test | 2 +- tests/winfo.test | 2 +- tests/wm.test | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/bitmap.test b/tests/bitmap.test index b0f0503..2b74c13 100644 --- a/tests/bitmap.test +++ b/tests/bitmap.test @@ -10,7 +10,7 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] test bitmap-1.1 {Tk_AllocBitmapFromObj - converting internal reps} testbitmap { set x gray25 diff --git a/tests/border.test b/tests/border.test index 7899cd9..33bdfd0 100644 --- a/tests/border.test +++ b/tests/border.test @@ -14,7 +14,7 @@ if {[testConstraint pseudocolor8]} { wm geom .t +0+0 } -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] test border-1.1 {Tk_AllocBorderFromObj - converting internal reps} testborder { set x orange diff --git a/tests/canvText.test b/tests/canvText.test index 77eb735..f943525 100644 --- a/tests/canvText.test +++ b/tests/canvText.test @@ -21,7 +21,7 @@ set font "-adobe-times-medium-r-normal--*-200-*-*-*-*-*-*" set ay [font metrics $font -linespace] set ax [font measure $font 0] -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] foreach test { {-anchor nw nw xyz {bad anchor position "xyz": must be n, ne, e, se, s, sw, w, nw, or center}} diff --git a/tests/cursor.test b/tests/cursor.test index 2a1d274..90c308e 100644 --- a/tests/cursor.test +++ b/tests/cursor.test @@ -10,7 +10,7 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] test cursor-1.1 {Tk_AllocCursorFromObj - converting internal reps} {testcursor} { set x watch diff --git a/tests/focus.test b/tests/focus.test index 62e00c8..7a35aa4 100644 --- a/tests/focus.test +++ b/tests/focus.test @@ -13,7 +13,7 @@ tcltest::loadTestedCommands button .b -text .b -relief raised -bd 2 pack .b -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] proc focusSetup {} { catch {destroy .t} diff --git a/tests/font.test b/tests/font.test index 37e5739..a35c4db 100644 --- a/tests/font.test +++ b/tests/font.test @@ -17,7 +17,7 @@ update idletasks set defaultfontlist [font names] -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] proc getnondefaultfonts {} { global defaultfontlist diff --git a/tests/pack.test b/tests/pack.test index a71fe7b..b75d5b2 100644 --- a/tests/pack.test +++ b/tests/pack.test @@ -10,7 +10,7 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # Utility procedures: diff --git a/tests/place.test b/tests/place.test index e8419ea..07524fe 100644 --- a/tests/place.test +++ b/tests/place.test @@ -11,7 +11,7 @@ tcltest::loadTestedCommands # Used for constraining memory leak tests testConstraint memory [llength [info commands memory]] -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # XXX - This test file is woefully incomplete. At present, only a # few of the features are tested. diff --git a/tests/scrollbar.test b/tests/scrollbar.test index e69e1d2..5de464d 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -38,7 +38,7 @@ proc getTroughSize {w} { } } -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # XXX Note: this test file is woefully incomplete. Right now there are # only bits and pieces of tests. Please make this file more complete diff --git a/tests/send.test b/tests/send.test index 5bd1ade..fbf1555 100644 --- a/tests/send.test +++ b/tests/send.test @@ -15,7 +15,7 @@ eval tcltest::configure $argv tcltest::loadTestedCommands testConstraint xhost [llength [auto_execok xhost]] -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # Compute a script that will load Tk into a child interpreter. diff --git a/tests/textDisp.test b/tests/textDisp.test index 520b26b..8285fa8 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -79,7 +79,7 @@ wm positionfrom . user wm deiconify . update -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # Some window managers (like olwm under SunOS 4.1.3) misbehave in a way # that tends to march windows off the top and left of the screen. If diff --git a/tests/textWind.test b/tests/textWind.test index 8d81647..344687f 100644 --- a/tests/textWind.test +++ b/tests/textWind.test @@ -45,7 +45,7 @@ wm minsize . 1 1 wm positionfrom . user wm deiconify . -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] test textWind-1.1 {basic tests of options} {fonts} { .t delete 1.0 end diff --git a/tests/unixFont.test b/tests/unixFont.test index f4cc3dd..5c22e3a 100644 --- a/tests/unixFont.test +++ b/tests/unixFont.test @@ -45,7 +45,7 @@ toplevel .b wm geom .b +0+0 update idletasks -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # Font should be fixed width and have chars missing below char 32, so can # test control char expansion and missing character code. diff --git a/tests/unixWm.test b/tests/unixWm.test index cd6394d..48f3e47 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -13,7 +13,7 @@ tcltest::loadTestedCommands namespace import -force ::tk::test:loadTkCommand -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] proc sleep ms { global x diff --git a/tests/winfo.test b/tests/winfo.test index b393b1a..ff7f23d 100644 --- a/tests/winfo.test +++ b/tests/winfo.test @@ -35,7 +35,7 @@ proc eatColors {w {options ""}} { update } -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # XXX - This test file is woefully incomplete. At present, only a # few of the winfo options are tested. diff --git a/tests/wm.test b/tests/wm.test index eeeea8d..ab2a7cc 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -27,7 +27,7 @@ proc stdWindow {} { update } -testConstraint failsOnUbuntu [expr {![info exists ::env(TRAVIS_OS_NAME)] || ![string match linux $::env(TRAVIS_OS_NAME)]}] +testConstraint failsOnUbuntu [expr {![info exists ::env(CI)] || ![string match Linux $::tcl_platform(os)]}] # [raise] and [lower] may return before the window manager has completed the # operation. The raiseDelay procedure idles for a while to give the operation -- cgit v0.12 From a4e015529e6cb91f37bc48b5c80c3b24649186b9 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Nov 2020 11:44:42 +0000 Subject: Add 8.5 build status to README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index cf03af1..a9b50b4 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,10 @@ This is the **Tk 8.5.19** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). +Build Status: 8.5.19 +[![Build and Test Status: Linux 8.5](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=core-8-5-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-5-branch) +[![Build and Test Status: Windows 8.5](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=core-8-5-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-5-branch) +[![Build and Test Status: macOS 8.5](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=core-8-5-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-5-branch) ## 1. Introduction -- cgit v0.12 From abdf41d31c15013b28a2b342c5d4b941882a9c03 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Nov 2020 12:07:14 +0000 Subject: See if we can build 8.5 on older github actions hardware (as Tcl 8.5 is no longer kept up-to-date for newer hardware) --- .github/workflows/linux-build.yml | 12 ++++++------ .github/workflows/mac-build.yml | 4 ++-- .github/workflows/win-build.yml | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 5c4722e..653e46f 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -8,7 +8,7 @@ env: ERROR_ON_FAILURES: 1 jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-18.04 strategy: matrix: compiler: @@ -35,11 +35,11 @@ jobs: path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install tcl8.6-dev libx11-dev libxss-dev + sudo apt-get install tcl8.5-dev libx11-dev libxss-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "TEST_INSTALL_DIR=$HOME/install dir" >> $GITHUB_ENV - echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV + echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.5" >> $GITHUB_ENV echo "CC=$COMPILER" >> $GITHUB_ENV echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV @@ -105,7 +105,7 @@ jobs: name: Tk ${{ env.VERSION }} HTML documentation (unofficial) path: /tmp/dist/tk*/html test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-18.04 strategy: matrix: compiler: @@ -120,11 +120,11 @@ jobs: path: tk - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install tcl8.6-dev libx11-dev libxss-dev xvfb + sudo apt-get install tcl8.5-dev libx11-dev libxss-dev xvfb mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "TEST_INSTALL_DIR=$HOME/install dir" >> $GITHUB_ENV - echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV + echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.5" >> $GITHUB_ENV echo "CC=$COMPILER" >> $GITHUB_ENV working-directory: "." env: diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index f115aa3..bbf7190 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -4,7 +4,7 @@ env: ERROR_ON_FAILURES: 1 jobs: with-Xcode: - runs-on: macos-latest + runs-on: macos-10.15 defaults: run: shell: bash @@ -50,7 +50,7 @@ jobs: env: MAC_CI: 1 Unix-like: - runs-on: macos-latest + runs-on: macos-10.15 strategy: matrix: symbols: diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 37ad7e1..dffbb5a 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -4,7 +4,7 @@ env: ERROR_ON_FAILURES: 1 jobs: MSVC: - runs-on: windows-latest + runs-on: windows-2016 defaults: run: shell: powershell @@ -79,7 +79,7 @@ jobs: throw "nmake exit code: $lastexitcode" } MSYS-gcc: - runs-on: windows-latest + runs-on: windows-2016 defaults: run: shell: bash -- cgit v0.12 From bfda3dc9d27412361fcb6a6377ab7d2ba767a4cd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 23 Nov 2020 14:02:13 +0000 Subject: Fix "make install" on Cygwin. Build github actions on windows-2019/macos-11.0 explicitly. --- .github/workflows/mac-build.yml | 4 ++-- .github/workflows/win-build.yml | 4 ++-- unix/Makefile.in | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 247414a..ebd6342 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -4,7 +4,7 @@ env: ERROR_ON_FAILURES: 1 jobs: with-Xcode: - runs-on: macos-latest + runs-on: macos-11.0 defaults: run: shell: bash @@ -50,7 +50,7 @@ jobs: env: MAC_CI: 1 Unix-like: - runs-on: macos-latest + runs-on: macos-11.0 strategy: matrix: symbols: diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 518ffd5..87f824f 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -4,7 +4,7 @@ env: ERROR_ON_FAILURES: 1 jobs: MSVC: - runs-on: windows-latest + runs-on: windows-2019 defaults: run: shell: powershell @@ -79,7 +79,7 @@ jobs: throw "nmake exit code: $lastexitcode" } MSYS-gcc: - runs-on: windows-latest + runs-on: windows-2019 defaults: run: shell: bash diff --git a/unix/Makefile.in b/unix/Makefile.in index d0804fb..f8c7309 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -750,7 +750,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE} $(INSTALL_LIBRARY) "tk${MAJOR_VERSION}${MINOR_VERSION}.dll" "$(DLL_INSTALL_DIR)";\ chmod 555 "$(DLL_INSTALL_DIR)/tk${MAJOR_VERSION}${MINOR_VERSION}.dll";\ $(INSTALL_LIBRARY) "../win/libtk${MAJOR_VERSION}${MINOR_VERSION}.dll.a" "$(LIB_INSTALL_DIR)";\ - chmod 555 "$(LIB_INSTALL_DIR)/libtk${MAJOR_VERSION}${MINOR_VERSION}.a";\ + chmod 555 "$(LIB_INSTALL_DIR)/libtk${MAJOR_VERSION}${MINOR_VERSION}.dll.a";\ fi @echo "Installing ${WISH_EXE} as $(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}" @$(INSTALL_PROGRAM) ${WISH_EXE} "$(BIN_INSTALL_DIR)/wish$(VERSION)${EXE_SUFFIX}" -- cgit v0.12 From a5aa741c8f9282058212d28850e31a99198da14b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Nov 2020 11:56:23 +0000 Subject: No need to install libx11-dev in github actions: It's already there --- .github/workflows/linux-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 4619f91..adb8d43 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -35,7 +35,7 @@ jobs: path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install tcl8.5-dev libx11-dev libxss-dev + sudo apt-get install tcl8.5-dev libxss-dev mkdir "$HOME/install" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "TEST_INSTALL_DIR=$HOME/install" >> $GITHUB_ENV @@ -120,7 +120,7 @@ jobs: path: tk - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install tcl8.5-dev libx11-dev libxss-dev xvfb + sudo apt-get install tcl8.5-dev libxss-dev xvfb mkdir "$HOME/install" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "TEST_INSTALL_DIR=$HOME/install" >> $GITHUB_ENV -- cgit v0.12 From 6aa906fda2243df845ad149d6af16582f766e2f4 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 24 Nov 2020 12:14:37 +0000 Subject: Environment variable $TEST_INSTALL_DIR doesn't work this way, if it contains a space --- .github/workflows/linux-build.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index e886409..7bbbef9 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -38,7 +38,6 @@ jobs: sudo apt-get install tcl8.6-dev libxss-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "TEST_INSTALL_DIR=$HOME/install dir" >> $GITHUB_ENV echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV echo "CC=$COMPILER" >> $GITHUB_ENV echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV @@ -50,7 +49,7 @@ jobs: OPTS: ${{ matrix.compiler }}-${{ matrix.symbols }}${{ matrix.disables }} - name: Configure (symbols=${{ matrix.symbols }} opts=${{ matrix.disables }}) run: | - ./configure $CFGOPT "--prefix=$TEST_INSTALL_DIR" || { + ./configure $CFGOPT "--prefix=$HOME/install dir" || { cat config.log echo "::error::Failure during Configure" exit 1 @@ -123,7 +122,6 @@ jobs: sudo apt-get install tcl8.6-dev libxss-dev xvfb mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "TEST_INSTALL_DIR=$HOME/install dir" >> $GITHUB_ENV echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" >> $GITHUB_ENV echo "CC=$COMPILER" >> $GITHUB_ENV working-directory: "." @@ -132,7 +130,7 @@ jobs: COMPILER: ${{ matrix.compiler }} - name: Configure (symbols=${{ matrix.symbols }}) run: | - ./configure $CFGOPT "--prefix=$TEST_INSTALL_DIR" || { + ./configure $CFGOPT "--prefix=$HOME/install dir" || { cat config.log echo "::error::Failure during Configure" exit 1 -- cgit v0.12 From bad9520f9929fb5a81be88852fc7f6b171a57bec Mon Sep 17 00:00:00 2001 From: marc_culler Date: Tue, 24 Nov 2020 17:10:20 +0000 Subject: Fix [4a40c6cace]: On Aqua managed widgets are drawn with their former offset. Patch from Christopher Chavez. --- macosx/tkMacOSXWm.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 719f1f6..c100d38 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -2868,9 +2868,9 @@ WmIconwindowCmd( static int WmManageCmd( - TCL_UNUSED(Tk_Window), /* Main window of the application. */ - TkWindow *winPtr, /* Toplevel or Frame to work with */ - Tcl_Interp *interp, /* Current interpreter. */ + TCL_UNUSED(Tk_Window), /* Main window of the application. */ + TkWindow *winPtr, /* Toplevel or Frame to work with */ + Tcl_Interp *interp, /* Current interpreter. */ TCL_UNUSED(int), /* Number of arguments. */ TCL_UNUSED(Tcl_Obj *const *)) /* Argument objects. */ { @@ -2888,6 +2888,16 @@ WmManageCmd( Tcl_SetErrorCode(interp, "TK", "WM", "MANAGE", NULL); return TCL_ERROR; } + + /* + * Draw the managed widget at the top left corner of its toplevel. + * See [4a40c6cace]. + */ + + winPtr->changes.x -= macWin->xOff; + winPtr->changes.y -= macWin->yOff; + XMoveWindow(winPtr->display, winPtr->window, 0, 0); + TkFocusSplit(winPtr); Tk_UnmapWindow(frameWin); if (wmPtr == NULL) { -- cgit v0.12 From 81728deb9467f0558a60e204c44d9bea0c65b184 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 25 Nov 2020 12:06:06 +0000 Subject: Handle (hopefully) failing testcases on github actions for Windows and MacOS --- .github/workflows/mac-build.yml | 6 +++--- .github/workflows/win-build.yml | 8 +++++--- tests/frame.test | 5 ++++- tests/safe.test | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index bbf7190..6921f7a 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -77,7 +77,7 @@ jobs: - name: Prepare checked out repositories run: | touch tkStubInit.c - mkdir "$HOME/install dir" + mkdir "$HOME/install" echo "USE_XVFB=$SET_DISPLAY" >> $GITHUB_ENV working-directory: tk/generic env: @@ -92,7 +92,7 @@ jobs: - name: Build Tcl # Note that macOS is always a 64 bit platform run: | - ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || { + ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install" || { cat config.log echo "::error::Failure during Tcl Configure" exit 1 @@ -111,7 +111,7 @@ jobs: - name: Configure (symbols=${{ matrix.symbols }} ${{matrix.options }}) # Note that macOS is always a 64 bit platform run: | - ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install dir" || { + ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install" || { cat config.log echo "::error::Failure during Configure" exit 1 diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index dffbb5a..77a5e80 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -3,7 +3,7 @@ on: [push] env: ERROR_ON_FAILURES: 1 jobs: - MSVC: + msvc: runs-on: windows-2016 defaults: run: @@ -22,9 +22,11 @@ jobs: ref: core-8-5-branch path: tcl - name: Make Install Location - working-directory: . + working-directory: tcl shell: bash run: | + echo "TCLDIR=`pwd`" >> $GITHUB_ENV + cd .. mkdir install cd install echo "INSTALLDIR=`pwd`" >> $GITHUB_ENV @@ -78,7 +80,7 @@ jobs: if ($lastexitcode -ne 0) { throw "nmake exit code: $lastexitcode" } - MSYS-gcc: + gcc: runs-on: windows-2016 defaults: run: diff --git a/tests/frame.test b/tests/frame.test index 9bb3377..5da29a0 100644 --- a/tests/frame.test +++ b/tests/frame.test @@ -11,6 +11,9 @@ package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands +testConstraint notWinCI [expr { + ($::tcl_platform(platform) ne "windows") || ![info exists ::env(CI)]}] + # eatColors -- # Creates a toplevel window and allocates enough colors in it to # use up all the slots in the colormap. @@ -158,7 +161,7 @@ test frame-2.4 {toplevel configuration options} { } {1 {bad window path name "bogus"}} set default "[winfo visual .] [winfo depth .]" if {$tcl_platform(platform) == "windows"} { -test frame-2.5 {toplevel configuration options} { +test frame-2.5 {toplevel configuration options} notWinCI { catch {destroy .t} toplevel .t -width 200 -height 100 wm geometry .t +0+0 diff --git a/tests/safe.test b/tests/safe.test index 914adaa..b7edb1b 100644 --- a/tests/safe.test +++ b/tests/safe.test @@ -50,7 +50,7 @@ test safe-1.2 {Safe Tk loading into an interpreter} -setup { lsort [interp hidden a] } -cleanup { safe::interpDelete a -} -match glob -result {bell cd clipboard encoding exec exit fconfigure*glob grab load menu open pwd selection send socket source*toplevel unload wm} +} -match glob -result {bell cd clipboard encoding exec exit fconfigure*glob grab load menu open pwd selection*socket source*toplevel unload wm} test safe-1.3 {Safe Tk loading into an interpreter} -setup { catch {safe::interpDelete a} } -body { -- cgit v0.12 From 434b29a6e98f9fe1000d27e554aca83533494b54 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Nov 2020 09:01:06 +0000 Subject: Use powershell to set GITHUB_ENV: Need Windows file path here --- .github/workflows/win-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 77a5e80..504037d 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -23,7 +23,6 @@ jobs: path: tcl - name: Make Install Location working-directory: tcl - shell: bash run: | echo "TCLDIR=`pwd`" >> $GITHUB_ENV cd .. -- cgit v0.12 From 406ecbaca2f8679799702c6e40fadba9d8bfd914 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 26 Nov 2020 09:11:24 +0000 Subject: Don't bother --enable-aqua builds for Tcl 8.5: Not supported any more --- .github/workflows/mac-build.yml | 49 +---------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 6921f7a..fb546a7 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -3,53 +3,7 @@ on: [push] env: ERROR_ON_FAILURES: 1 jobs: - with-Xcode: - runs-on: macos-10.15 - defaults: - run: - shell: bash - working-directory: tk/macosx - steps: - - name: Check out Tk - uses: actions/checkout@v2 - with: - path: tk - - name: Check out Tcl - uses: actions/checkout@v2 - with: - repository: tcltk/tcl - ref: core-8-5-branch - path: tcl - - name: Prepare checked out repositories - run: | - touch tk/generic/tkStubInit.c - mkdir build - echo "BUILD_DIR=`cd build && pwd`" >> $GITHUB_ENV - echo "DESTDIR=`cd build && pwd`" >> $GITHUB_ENV - working-directory: . - - name: Build Tcl - run: | - make all - working-directory: tcl/macosx - - name: Build - run: | - make all install || { - echo "::error::Failure during Build" - exit 1 - } - - name: Run Tests - run: | - make test styles=develop | tee out-tests.txt || { - echo "::error::Failure during Test" - exit 1 - } - cat out-tests.txt | grep -q "Failed[[:space:]][[:space:]]*[1-9]" && { - echo "::error::Failure during Test" - exit 1 - } - env: - MAC_CI: 1 - Unix-like: + clang: runs-on: macos-10.15 strategy: matrix: @@ -57,7 +11,6 @@ jobs: - 'no' - 'mem' options: - - '--enable-aqua' - '--disable-aqua' defaults: run: -- cgit v0.12 From e81d3c31c528aa39ad06d6a4bc00d8cc2dd53a73 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Nov 2020 15:43:39 +0000 Subject: Fix github actions windows build with --enable-sysmbols=mem --- win/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win/Makefile.in b/win/Makefile.in index e2b4dd9..f6b5f14 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -136,7 +136,7 @@ TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@ TK_LIB_FILE = @TK_LIB_FILE@ TK_DLL_FILE = @TK_DLL_FILE@ TEST_DLL_FILE = tktest$(VER)${DLLSUFFIX} -TEST_LIB_FILE = @LIBPREFIX@tktest$(VER)${DLLSUFFIX}${LIBSUFFIX} +TEST_LIB_FILE = @LIBPREFIX@tktest$(VER)${DLLSUFFIX}.a SHARED_LIBRARIES = $(TK_DLL_FILE) $(TK_STUB_LIB_FILE) STATIC_LIBRARIES = $(TK_LIB_FILE) -- cgit v0.12 From 0a285fcaf244a2e4abcfdb7cd9f914923edb0524 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Nov 2020 15:49:14 +0000 Subject: Attempt to fix winDialog-5.12.7 --- .github/workflows/win-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 4784933..5893fb6 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -106,6 +106,7 @@ jobs: - name: Prepare run: | touch tkStubInit.c + touch "${HOME}/forWinDialog-5.12.7" mkdir "${HOME}/install_dir" echo "INSTALL_DIR=${HOME}/install_dir" >> $GITHUB_ENV working-directory: generic -- cgit v0.12 From 0adf148ff42d702fb719fe7616ac837c0fd17b55 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 27 Nov 2020 16:08:44 +0000 Subject: Fix frame-2.8 testcase on mingw --- generic/tkFrame.c | 2 +- win/makefile.vc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/generic/tkFrame.c b/generic/tkFrame.c index 1112f81..54ba8e8 100644 --- a/generic/tkFrame.c +++ b/generic/tkFrame.c @@ -806,7 +806,7 @@ FrameWidgetObjCmd( || ((c == 'v') && (strncmp(arg, "-visual", (unsigned)length) == 0))) { -#ifdef SUPPORT_CONFIG_EMBEDDED +#ifdef _WIN32 if (c == 'u') { const char *string = Tcl_GetString(objv[i+1]); diff --git a/win/makefile.vc b/win/makefile.vc index 84c4e81..b53d2c0 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -307,7 +307,6 @@ PRJ_INCLUDES = -I"$(BITMAPDIR)" -I"$(XLIBDIR)" CONFIG_DEFS =/DSTDC_HEADERS=1 /DHAVE_SYS_TYPES_H=1 /DHAVE_SYS_STAT_H=1 \ /DHAVE_STDLIB_H=1 /DHAVE_STRING_H=1 /DHAVE_MEMORY_H=1 \ /DHAVE_STRINGS_H=1 \ - /DSUPPORT_CONFIG_EMBEDDED \ !if $(HAVE_UXTHEME_H) /DHAVE_UXTHEME_H=1 \ !endif -- cgit v0.12 From 358a59e8d3ad7127315dbc2853dd253532014b47 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 29 Nov 2020 20:36:00 +0000 Subject: Remove duplicate and unused macro. TkGetGeomMaster is TkGetContainer, this was a leftover. --- generic/tkInt.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/generic/tkInt.h b/generic/tkInt.h index 006d999..a98b6d6 100644 --- a/generic/tkInt.h +++ b/generic/tkInt.h @@ -370,8 +370,6 @@ typedef struct TkDisplay { #define TkGetContainer(tkwin) (((TkWindow *)tkwin)->maintainerPtr != NULL ? \ ((TkWindow *)tkwin)->maintainerPtr : ((TkWindow *)tkwin)->parentPtr) -#define TkGetGeomMaster(tkwin) (((TkWindow *)tkwin)->maintainerPtr != NULL ? \ - ((TkWindow *)tkwin)->maintainerPtr : ((TkWindow *)tkwin)->parentPtr) /* * Information used by tkGet.c only: -- cgit v0.12 From 388c648cd73beb602f64b0af4537ca6771224bf7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 30 Nov 2020 17:11:50 +0000 Subject: Sync README.md with Tcl 8.6 --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 35ae215..efa1c31 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,9 @@ This is the **Tk 8.6.10** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). -Build Status: 8.6.10 -[![Build and Test Status: Linux 8.6](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch) -[![Build and Test Status: Windows 8.6](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch) -[![Build and Test Status: macOS 8.6](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch) +[![Build Status](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-6-branch) +[![Build Status](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-6-branch) +[![Build Status](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=core-8-6-branch)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-6-branch) ## 1. Introduction @@ -22,13 +21,13 @@ historical record of all changes to Tk. Tk is maintained, enhanced, and distributed freely by the Tcl community. Source code development and tracking of bug reports and feature requests -takes place at [core.tcl-lang.org](https://core.tcl-lang.org/). +take place at [core.tcl-lang.org](https://core.tcl-lang.org/). Tcl/Tk release and mailing list services are [hosted by SourceForge](https://sourceforge.net/projects/tcl/) with the Tcl Developer Xchange hosted at [www.tcl-lang.org](https://www.tcl-lang.org). -Tk is a freely available open source package. You can do virtually +Tk is a freely available open-source package. You can do virtually anything you like with it, such as modifying it, redistributing it, and selling it either in whole or in part. See the file `license.terms` for complete information. -- cgit v0.12 From ee2b3bf1f8dde21c17795d277a8b708b8a29b8c0 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 1 Dec 2020 08:59:53 +0000 Subject: Sync unix/tcl.m4 with Tcl --- unix/configure | 4 ++-- unix/tcl.m4 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unix/configure b/unix/configure index 4a68870..43e9d1a 100755 --- a/unix/configure +++ b/unix/configure @@ -5146,7 +5146,7 @@ fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*) + CYGWIN_*|MINGW32_*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -7068,7 +7068,7 @@ fi case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32_*) ;; + CYGWIN_*|MINGW32_*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index f4a3b8a..b01901b 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1247,7 +1247,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" ;; - CYGWIN_*|MINGW32*) + CYGWIN_*|MINGW32_*|MSYS_*) SHLIB_CFLAGS="" SHLIB_LD='${CC} -shared' SHLIB_SUFFIX=".dll" @@ -2060,7 +2060,7 @@ dnl # preprocessing tests use only CPPFLAGS. case $system in AIX-*) ;; BSD/OS*) ;; - CYGWIN_*|MINGW32_*) ;; + CYGWIN_*|MINGW32_*|MSYS_*) ;; IRIX*) ;; NetBSD-*|DragonFly-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; -- cgit v0.12 From 07850a4b2aed6dbaa1b3b4764fbddca31e084b93 Mon Sep 17 00:00:00 2001 From: culler Date: Fri, 4 Dec 2020 02:40:32 +0000 Subject: Fix [3ef77f434e]: Combobox focus ring is missing in Dark Mode. --- macosx/ttkMacOSXTheme.c | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/macosx/ttkMacOSXTheme.c b/macosx/ttkMacOSXTheme.c index 1e7797d..b4ba894 100644 --- a/macosx/ttkMacOSXTheme.c +++ b/macosx/ttkMacOSXTheme.c @@ -1872,19 +1872,24 @@ static Ttk_ElementSpec EntryElementSpec = { * 1 pixel to account for the fact that the button is not centered. */ -static Ttk_Padding ComboboxPadding = {4, 2, 20, 2}; +static Ttk_Padding ComboboxPadding = {4, 4, 20, 4}; +static Ttk_Padding DarkComboboxPadding = {6, 6, 22, 6}; static void ComboboxElementSize( TCL_UNUSED(void *), TCL_UNUSED(void *), - TCL_UNUSED(Tk_Window), + Tk_Window tkwin, int *minWidth, int *minHeight, Ttk_Padding *paddingPtr) { *minWidth = 24; *minHeight = 23; - *paddingPtr = ComboboxPadding; + if (TkMacOSXInDarkMode(tkwin)) { + *paddingPtr = DarkComboboxPadding; + } else { + *paddingPtr = ComboboxPadding; + } } static void ComboboxElementDraw( @@ -1905,19 +1910,24 @@ static void ComboboxElementDraw( }; BEGIN_DRAWING(d) - bounds.origin.y += 1; if (TkMacOSXInDarkMode(tkwin)) { - bounds.size.height += 1; + bounds = CGRectInset(bounds, 3, 3); + if (state & TTK_STATE_FOCUS) { + DrawDarkFocusRing(bounds, dc.context); + } DrawDarkButton(bounds, info.kind, state, dc.context); - } else if ([NSApp macOSVersion] > 100800) { - if ((state & TTK_STATE_BACKGROUND) && - !(state & TTK_STATE_DISABLED)) { - NSColor *background = [NSColor textBackgroundColor]; - CGRect innerBounds = CGRectInset(bounds, 1, 2); - SolidFillRoundedRectangle(dc.context, innerBounds, 4, background); + } else { + if ([NSApp macOSVersion] > 100800) { + if ((state & TTK_STATE_BACKGROUND) && + !(state & TTK_STATE_DISABLED)) { + NSColor *background = [NSColor textBackgroundColor]; + CGRect innerBounds = CGRectInset(bounds, 1, 4); + bounds.origin.y += 1; + SolidFillRoundedRectangle(dc.context, innerBounds, 4, background); + } } + ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL); } - ChkErr(HIThemeDrawButton, &bounds, &info, dc.context, HIOrientation, NULL); END_DRAWING } -- cgit v0.12 From f5312f21552eeb863f2d46fec33b0e4d4fc2173d Mon Sep 17 00:00:00 2001 From: culler Date: Fri, 4 Dec 2020 20:20:48 +0000 Subject: Fix segfault introduced by the fix for [4a40c6cace]. --- macosx/tkMacOSXWm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index c100d38..942a6f8 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -2894,9 +2894,11 @@ WmManageCmd( * See [4a40c6cace]. */ - winPtr->changes.x -= macWin->xOff; - winPtr->changes.y -= macWin->yOff; - XMoveWindow(winPtr->display, winPtr->window, 0, 0); + if (macWin) { + winPtr->changes.x -= macWin->xOff; + winPtr->changes.y -= macWin->yOff; + XMoveWindow(winPtr->display, winPtr->window, 0, 0); + } TkFocusSplit(winPtr); Tk_UnmapWindow(frameWin); -- cgit v0.12 From cc51cd8b376484c83fa87e30582d1c53712387d5 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 9 Dec 2020 10:20:03 +0000 Subject: Sync win/rules.vc with Tcl. And the use of TCL_USE_STATIC_PACKAGES as well --- unix/tkAppInit.c | 6 +++++- win/rules.vc | 42 +++++++++++++++++++++++++++++++++++------- win/winMain.c | 24 ++++++++++++++++++------ 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/unix/tkAppInit.c b/unix/tkAppInit.c index 712637b..6cf3d42 100644 --- a/unix/tkAppInit.c +++ b/unix/tkAppInit.c @@ -37,7 +37,11 @@ extern Tcl_PackageInitProc Tktest_Init; #define TK_LOCAL_APPINIT Tcl_AppInit #endif #ifndef MODULE_SCOPE -# define MODULE_SCOPE extern +# ifdef __cplusplus +# define MODULE_SCOPE extern "C" +# else +# define MODULE_SCOPE extern +# endif #endif MODULE_SCOPE int TK_LOCAL_APPINIT(Tcl_Interp *); MODULE_SCOPE int main(int, char **); diff --git a/win/rules.vc b/win/rules.vc index ab43909..76d93cd1 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -6,7 +6,7 @@ # compiler switches, defining common targets and macros. The Tcl makefile # directly includes this. Extensions include it via "rules-ext.vc". # -# See TIP 477 (https://core.tcl-lang.org/tips/doc/trunk/tip/477.md) for +# See TIP 477 (https://core.tcl-lang.org/tips/doc/main/tip/477.md) for # detailed documentation. # # See the file "license.terms" for information on usage and redistribution @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change # the major version. RULES_VERSION_MAJOR = 1 -RULES_VERSION_MINOR = 6 +RULES_VERSION_MINOR = 7 # The PROJECT macro must be defined by parent makefile. !if "$(PROJECT)" == "" @@ -667,9 +667,10 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg # MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build # 0 -> link to static C runtime for static Tcl build. # Does not impact shared Tcl builds (STATIC_BUILD == 0) +# Default: 1 for Tcl 8.7 and up, 0 otherwise. # TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions -# in the Tcl shell. 0 -> keep them as shared libraries -# Does not impact shared Tcl builds. +# in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does +# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7. # USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation. # 0 -> Use the non-thread allocator. # UNCHECKED - 1 -> when doing a debug build with symbols, use the release @@ -724,7 +725,7 @@ MSVCRT = 0 !if [nmakehlp -f $(OPTS) "msvcrt"] !message *** Doing msvcrt !else -!if $(STATIC_BUILD) +!if "$(TCL_MAJOR_VERSION)" == "8" && "$(TCL_MINOR_VERSION)" < "7" && $(STATIC_BUILD) MSVCRT = 0 !endif !endif @@ -907,10 +908,14 @@ WARNINGS = $(WARNINGS) -Wp64 # Sets the following macros: # TCL_MAJOR_VERSION # TCL_MINOR_VERSION +# TCL_RELEASE_SERIAL # TCL_PATCH_LEVEL +# TCL_PATCH_LETTER # TCL_VERSION # TK_MAJOR_VERSION # TK_MINOR_VERSION +# TK_RELEASE_SERIAL +# TK_PATCH_LEVEL # TK_PATCH_LEVEL # TK_VERSION # DOTVERSION - set as (for example) 2.5 @@ -925,6 +930,9 @@ WARNINGS = $(WARNINGS) -Wp64 !if [echo TCL_MINOR_VERSION = \>> versions.vc] \ && [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc] !endif +!if [echo TCL_RELEASE_SERIAL = \>> versions.vc] \ + && [nmakehlp -V "$(_TCL_H)" TCL_RELEASE_SERIAL >> versions.vc] +!endif !if [echo TCL_PATCH_LEVEL = \>> versions.vc] \ && [nmakehlp -V "$(_TCL_H)" TCL_PATCH_LEVEL >> versions.vc] !endif @@ -936,6 +944,9 @@ WARNINGS = $(WARNINGS) -Wp64 !if [echo TK_MINOR_VERSION = \>> versions.vc] \ && [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc] !endif +!if [echo TK_RELEASE_SERIAL = \>> versions.vc] \ + && [nmakehlp -V "$(_TK_H)" TK_RELEASE_SERIAL >> versions.vc] +!endif !if [echo TK_PATCH_LEVEL = \>> versions.vc] \ && [nmakehlp -V $(_TK_H) TK_PATCH_LEVEL >> versions.vc] !endif @@ -945,9 +956,26 @@ WARNINGS = $(WARNINGS) -Wp64 TCL_VERSION = $(TCL_MAJOR_VERSION)$(TCL_MINOR_VERSION) TCL_DOTVERSION = $(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION) +!if [nmakehlp -f $(TCL_PATCH_LEVEL) "a"] +TCL_PATCH_LETTER = a +!elseif [nmakehlp -f $(TCL_PATCH_LEVEL) "b"] +TCL_PATCH_LETTER = b +!else +TCL_PATCH_LETTER = . +!endif + !if defined(_TK_H) + TK_VERSION = $(TK_MAJOR_VERSION)$(TK_MINOR_VERSION) TK_DOTVERSION = $(TK_MAJOR_VERSION).$(TK_MINOR_VERSION) +!if [nmakehlp -f $(TK_PATCH_LEVEL) "a"] +TK_PATCH_LETTER = a +!elseif [nmakehlp -f $(TK_PATCH_LEVEL) "b"] +TK_PATCH_LETTER = b +!else +TK_PATCH_LETTER = . +!endif + !endif # Set DOTVERSION and VERSION @@ -1538,11 +1566,11 @@ default-target: $(DEFAULT_BUILD_TARGET) !if $(MULTIPLATFORM_INSTALL) default-pkgindex: @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \ - [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl + [list load [file join $$dir $(PLATFORM_IDENTIFY) $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl !else default-pkgindex: @echo package ifneeded $(PRJ_PACKAGE_TCLNAME) $(DOTVERSION) \ - [list load [file join $$dir $(PRJLIBNAME)]] > $(OUT_DIR)\pkgIndex.tcl + [list load [file join $$dir $(PRJLIBNAME)] [string totitle $(PRJ_PACKAGE_TCLNAME)]] > $(OUT_DIR)\pkgIndex.tcl !endif default-pkgindex-tea: diff --git a/win/winMain.c b/win/winMain.c index f3dfd12..f072f78 100644 --- a/win/winMain.c +++ b/win/winMain.c @@ -29,17 +29,25 @@ int _CRT_glob = 0; extern "C" { #endif extern Tcl_PackageInitProc Tktest_Init; -#ifdef __cplusplus -} -#endif #endif /* TK_TEST */ -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if !defined(TCL_USE_STATIC_PACKAGES) +# if TCL_MAJOR_VERSION > 8 || TCL_MINOR_VERSION > 6 +# define TCL_USE_STATIC_PACKAGES 1 +# else +# define TCL_USE_STATIC_PACKAGES 0 +# endif +#endif + +#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES extern Tcl_PackageInitProc Registry_Init; extern Tcl_PackageInitProc Dde_Init; extern Tcl_PackageInitProc Dde_SafeInit; #endif +#ifdef __cplusplus +} +#endif #ifdef TCL_BROKEN_MAINARGS static void setargv(int *argcPtr, TCHAR ***argvPtr); #endif @@ -60,7 +68,11 @@ static BOOL consoleRequired = TRUE; #define TK_LOCAL_APPINIT Tcl_AppInit #endif #ifndef MODULE_SCOPE -# define MODULE_SCOPE extern +# ifdef __cplusplus +# define MODULE_SCOPE extern "C" +# else +# define MODULE_SCOPE extern +# endif #endif MODULE_SCOPE int TK_LOCAL_APPINIT(Tcl_Interp *interp); @@ -202,7 +214,7 @@ Tcl_AppInit( return TCL_ERROR; } } -#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES +#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES if (Registry_Init(interp) == TCL_ERROR) { return TCL_ERROR; } -- cgit v0.12