View Full Version : PgcEdit: Compiling bug in Windows
frank
3rd July 2005, 21:53
First, the Binaries from rOlZ are working well.
If you compile the sources in Windows with FreeWrap 5.6.1 and then delete or rename the source directory /tcl/work/PgcEdit then PgcEdit fails with an error: ...winshellext.tcl not found. It took me a lot of time to find the reason: [deleted]
The disk path containing the sources must be equal to the programmed one.
# File PgcEdit.tcl, line 1152
# FreeWrap as wish or Wrapped script
if {$scriptname == ""} {
# Wrapped script
set config(apppath) "/TCL/WORK/PGCEDIT"
} else {
# FreeWrap as wish
set config(apppath) [file dirname $scriptname]
}
if {$::tcl_platform(platform) == "windows"} {
source [file join $config(apppath) "lib/winshellext.tcl"]
Strange!
I can't see a good reason for this problem, and I can't reproduce it.
Maybe it's dangerous to rename the path in upper case, because under Linux and Mac OSX, the file system is case sensitive. Maybe the wrapped executable will not find the wrapped files anymore under these platforms. But the ZIP filesystem may be case unsensitive, regardless of the platform. I will test your change under Linux, and if it works well, I will keep it.
Unfortunately, as I suspected, the wrapped exe doesn't work anymore under Linux if you change the internal path to upper case. So, your modification cannot be done.
But this one should work: # FreeWrap as wish or Wrapped script
if {$scriptname == ""} {
# Wrapped script
if {$::tcl_platform(platform) == "windows"} {
set config(apppath) "/TCL/WORK/PGCEDIT"
} else {
set config(apppath) "/Tcl/work/PGCEDIT"
}
} else {
# FreeWrap as wish
set config(apppath) [file dirname $scriptname]
}
Are you sure that the winshellext.tcl file is correctly wrapped in the exe? (You can verify by opening the exe with WinZip.)
Well, I tried the change above, and renamed my Tcl directory: the problem occured!
So, I guess that your filenames are not exactly the same as on my system. The path to PgcEdit's source files must be exactly "\Tcl\work\PGCEDIT" (case sensitive).
Also, note that when an error occur at startup, before the main PgcEdit window is opened, closing the console is not suficient to quit PgcEdit. You must type 'exit' in the console, or kill the PgcEdit process with the Windows Task Manager.
frank
4th July 2005, 13:25
Which version of wrapper did you use, Linux or Windows?
I use it in Windows XP sp2.
The path settings equal to your settings, but the binaries from Windows worked only independently with upper case string.
I will do another tests.
I use both the Win and Linux versions, to generate the two executables, but I do them both under Win XP SP 2, with freeWrap.exe v5.6.1.
I think the problem mau comes from the path you pass to freeWrap as well. They must be the same as the physical paths on your HDD. Look at wrap.cmd, available in the Source distribution.
frank
4th July 2005, 15:18
Yes, it is!
It worked on my machine with Windows XP prof. in the company, when the path is identically to the hard disk.
I've got the errors at home on XP home version. I will look later.
frank
5th July 2005, 15:41
The disk path containing the sources must be equal to the programmed one.
My fault! There was a typo!
:thanks:
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.