View Ticket
Not logged in
Ticket Hash: bbcf24802eac93a0b0cb0e199013f22ebebef6e5
Title: 'package require iwidgets' fails if executable's path contains spaces + FIX
Status: Closed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2019-08-16 05:25:06
Version Found In: vanillawish-e5dc71ed9d
User Comments:
anonymous added on 2019-08-13 09:54:47:
When the vanillawish executable is started from a directory containing spaces, the pkgIndex.tcl of the iwidgets package cannot handle this correctly :-(

A quick check on all other pkgIndex.tcl files seems to indicate, that only this one is affected !!

Replacing it it with the following file fixes this (adapted from Activestate's ..):

--------------------------------------------------------
# Tcl package index file
namespace eval ::iwidgets {
    namespace export *
    variable library [file dirname [info script]]
    variable version 4.1
}
package ifneeded Iwidgets 4.0 {
  package require iwidgets 
  package provide Iwidgets 4.0
}
package ifneeded iwidgets $::iwidgets::version [string map [list @ $dir] {
  package req itk 4
  source [file join {@} colors.itcl]
  source [file join {@} roman.itcl]
  source [file join {@} buttonbox.itk]
  source [file join {@} calendar.itk]
  source [file join {@} canvasprintbox.itk]
  source [file join {@} shell.itk]
  source [file join {@} dialogshell.itk]
  source [file join {@} dialog.itk]
  source [file join {@} canvasprintdialog.itk]
  source [file join {@} labeledframe.itk]
  source [file join {@} checkbox.itk]
  source [file join {@} labeledwidget.itk]
  source [file join {@} entryfield.itk]
  source [file join {@} combobox.itk]
  source [file join {@} datefield.itk]
  source [file join {@} dateentry.itk]
  source [file join {@} disjointlistbox.itk]
  source [file join {@} extbutton.itk]
  source [file join {@} extfileselectionbox.itk]
  source [file join {@} extfileselectiondialog.itk]
  source [file join {@} feedback.itk]
  source [file join {@} fileselectionbox.itk]
  source [file join {@} fileselectiondialog.itk]
  source [file join {@} finddialog.itk]
  source [file join {@} scrolledwidget.itk]
  source [file join {@} hierarchy.itk]
  source [file join {@} hyperhelp.itk]
  source [file join {@} mainwindow.itk]
  source [file join {@} menubar.itk]
  source [file join {@} messagebox.itk]
  source [file join {@} messagedialog.itk]
  source [file join {@} notebook.itk]
  source [file join {@} optionmenu.itk]
  source [file join {@} panedwindow.itk]
  source [file join {@} pane.itk]
  source [file join {@} promptdialog.itk]
  source [file join {@} pushbutton.itk]
  source [file join {@} radiobox.itk]
  source [file join {@} regexpfield.itk]
  source [file join {@} scrolledcanvas.itk]
  source [file join {@} scrolledframe.itk]
  source [file join {@} scrolledtext.itk]
  source [file join {@} scrolledhtml.itk]
  source [file join {@} scrolledlistbox.itk]
  source [file join {@} selectionbox.itk]
  source [file join {@} selectiondialog.itk]
  source [file join {@} spindate.itk]
  source [file join {@} spinner.itk]
  source [file join {@} spinint.itk]
  source [file join {@} spintime.itk]
  source [file join {@} tabnotebook.itk]
  source [file join {@} tabset.itk]
  source [file join {@} timefield.itk]
  source [file join {@} timeentry.itk]
  source [file join {@} toolbar.itk]
  source [file join {@} watch.itk]
  package provide iwidgets $iwidgets::version
}]
--------------------------------------------------------

chw added on 2019-08-16 05:25:06:
Thanks for reporting. Check-in [3eec9d20bd] now has a modified version
of your proposed solution.