RE: compiled App doesn't work
by Lars Oeschey other posts by this author
Feb 28 2008 6:27AM messages near this date
Re: compiled App doesn't work
|
Incrementing a build number in PerlApp
> Almost like it didn't pick up on the --gui switch. For some reason it
> seems to need something that the console/cmd.exe has in its
> environment
> that isn't in the global environment ??? Try checking global vs shell
> ENV for diffs - you may have to set another global var.
I found something... it has to do with, how paths are read. I use this construction:
my $myname = $0;
$myname =~ s/\.[^.]*$/.ini/;
to read a .ini file that has the same name as the executable. I further use this:
my $logpfad=$cfg-> val("logpfad","logpfad");
my $hostname = (gethostbyname("localhost"))[0];
my $log=$myname;
$log=~ s/\.[^.]*$/_$hostname.log/;
$log="$logpfad" . "\\$log";
my $debug = $cfg-> val("debug","debug");
open (LOG, "> >$log") or do {&myError("kann logfile $log nicht öffnen!");};
to read a UNC path from the .ini for the logfile. And then construct a name for the logfile.
Seeing this, it sounds logically that if I start the .exe from Y:\somepath\myexe.exe I'll g
et
\\uncpath.to.log\mylogfiles\Y:\somepath\myexe_myhostname.log
which obviously can't work. So, I guess what happens is this: When I start the .exe from a D
osBox in said directory Y:\somepath perl sees as current path "." while when I call it from
the explorer it gets "Y:\somepath"
Now I just need to strip any leading path from $0 and it should work...
_______________________________________________
PDK mailing list
PDK@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Lars Oeschey
Jenda Krynicky
Lars Oeschey
Bill Luebkert
Lars Oeschey
|