By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,903 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,903 IT Pros & Developers. It's quick & easy.

Output to exe directory

aas4mis
P: 97
i'm using cwd() in windows and activestate.. after i compile with perl2exe and drag/drop an item on my exe the output always goes to the root of the c: drive. how can i get it to the directory where my exe resides?
any pointers appreciated.
Oct 21 '08 #1
Share this Question
Share on Google+
2 Replies


numberwhun
Expert Mod 2.5K+
P: 3,503
Have you read the directions for perl2exe? I know that its a binary, but maybe it has a configuration file that it reads to tell it where to put things. If not, you may have to ask on their forums. That, unfortunatley, isn't a Perl issue, but instead a program issue.

Regards,

Jeff
Oct 21 '08 #2

aas4mis
P: 97
Have you read the directions for perl2exe? I know that its a binary, but maybe it has a configuration file that it reads to tell it where to put things. If not, you may have to ask on their forums. That, unfortunatley, isn't a Perl issue, but instead a program issue.

Regards,

Jeff
Thanks, I was on the wrong path thinking it was a perl issue. Just in case anybody else needs it, I found the following on the Perl2Exe homepage:


13. How to find the directory where the your application is located.
# Next line is for Perl2Exe V5.02 and older
$0 = $^X unless ($^X =~ m%(^|[/\\])(perl)|(perl.exe)$%i);
my ($program_dir) = $0 =~ m%^(.*)[/\\]%;
$program_dir ||= ".";
print "program_dir = $program_dir\n";
Oct 21 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.