I am pretty new to PAR::Packer and I have written a script in Perl.
The problem I am having is when I compile it to .exe and include two files (so it's portable) the EXE file errors out with "cannot open file, no such file or directory"
I can easily make the script into an .exe file and use it as long as the C:\temp
directory is there. But I want it to use the files that were included in the .exe and not the C:\temp
directory.
Here is the part of the script in question:
open($patch1, '<', "C:/temp/patch1.bin") or die "cannot open this file: $!";
binmode($patch1);
open($patch2, '<', "C:/temp/patch2.bin") or die "cannot open this file: $!";
binmode($patch2);
And like I say, all I want it to do is use the files that were included into the .exe and not the files from the C:/temp
directory.
I reckon it could be how I've coded it, but I've tried "./patch1.bin"
instead of "C:/temp/patch1.bin"
How can I fix this problem?