Re: Perl Query - Conversion of EXE file
The input for the EXE has to be taken from the file provided by the user.AndThe EXE shud get invoked by just dragging and dropping the input file on the EXE. Assume, the input file is some text file containing some raw data. How should this be done? You'll get the path to the dropped file in @ARGV. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery Hi, I also wanted to tell the same. For drag and drop, the filename is read from $ARGV[0]. Now, my tool's EXE is working. Thanks a lot for your constant support. Thanks and Regards, Dharshana Dharshana, was wondering if you would be so kind to provide a summary of you problem and solution since its been such a long email thread? Code snippets would be cool too! thank you derek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
On 12/5/06, Jenda Krynicky [EMAIL PROTECTED] wrote: From: kilaru rajeev [EMAIL PROTECTED] Jenda, I got a doubt here. Suppose the file does not contain any thing perl code. If it contains only some data for configuration, is it possible to include by using 'require' ? Rajeev Depends on the format. But if it's not Perl why does it have a .pl extension? And if it's configuration why do you want to pack it into the EXEcutable? Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response Now suppose, a EXE for the Perl Program is created in Windows. The input for the EXE has to be taken from the file provided by the user.AndThe EXE shud get invoked by just dragging and dropping the input file on the EXE. Assume, the input file is some text file containing some raw data. How should this be done? - Dharshana
Re: Perl Query - Conversion of EXE file
From: Dharshana Eswaran [EMAIL PROTECTED] Now suppose, a EXE for the Perl Program is created in Windows. The input for the EXE has to be taken from the file provided by the user.AndThe EXE shud get invoked by just dragging and dropping the input file on the EXE. Assume, the input file is some text file containing some raw data. How should this be done? You'll get the path to the dropped file in @ARGV. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
On 12/7/06, Jenda Krynicky [EMAIL PROTECTED] wrote: From: Dharshana Eswaran [EMAIL PROTECTED] Now suppose, a EXE for the Perl Program is created in Windows. The input for the EXE has to be taken from the file provided by the user.AndThe EXE shud get invoked by just dragging and dropping the input file on the EXE. Assume, the input file is some text file containing some raw data. How should this be done? You'll get the path to the dropped file in @ARGV. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response Hi, I also wanted to tell the same. For drag and drop, the filename is read from $ARGV[0]. Now, my tool's EXE is working. Thanks a lot for your constant support. Thanks and Regards, Dharshana
Re: Perl Query - Conversion of EXE file
From: Dharshana Eswaran [EMAIL PROTECTED] Anyway .. if you run the main.pl it works, right? Yeah, mail.pl works If you run the created EXE in the same folder what does it do? The created EXE in the same folder works If you run it from a different folder? From a different folder it flags a msg Cannot open subroutine.pl which i have written in my main.pl like unless (open(LINE, subroutine.pl)) { die(Cannot open input file subroutine.pl\n); So, the die statement is executed. You said you require() the other files, not that you try to open() them!!! Why do you open() the file??? The require() includes some special magic to find the files packed into the EXE, open() doesn't. open() tries to open a file in the current (or specified) folder, not within the EXE. Are you sure you need to open() the subroutine.pl? Show us a little more of the code! I know PerlApp allows you to include some data files in the generated executables and then extract them somewhere so that you can work with them, but pp doesn't seem to do that. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
Jenda, I got a doubt here. Suppose the file does not contain any thing perl code. If it contains only some data for configuration, is it possible to include by using 'require' ? Rajeev On 12/5/06, Jenda Krynicky [EMAIL PROTECTED] wrote: From: Dharshana Eswaran [EMAIL PROTECTED] Anyway .. if you run the main.pl it works, right? Yeah, mail.pl works If you run the created EXE in the same folder what does it do? The created EXE in the same folder works If you run it from a different folder? From a different folder it flags a msg Cannot open subroutine.pl which i have written in my main.pl like unless (open(LINE, subroutine.pl)) { die(Cannot open input file subroutine.pl\n); So, the die statement is executed. You said you require() the other files, not that you try to open() them!!! Why do you open() the file??? The require() includes some special magic to find the files packed into the EXE, open() doesn't. open() tries to open a file in the current (or specified) folder, not within the EXE. Are you sure you need to open() the subroutine.pl? Show us a little more of the code! I know PerlApp allows you to include some data files in the generated executables and then extract them somewhere so that you can work with them, but pp doesn't seem to do that. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
From: kilaru rajeev [EMAIL PROTECTED] Jenda, I got a doubt here. Suppose the file does not contain any thing perl code. If it contains only some data for configuration, is it possible to include by using 'require' ? Rajeev Depends on the format. But if it's not Perl why does it have a .pl extension? And if it's configuration why do you want to pack it into the EXEcutable? Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
From: Dharshana Eswaran [EMAIL PROTECTED] Hi Randal, I am trying to generate an exe file from few perl programs. I have 4 files which are main.pl, subroutine1.pl, subroutine2.pl and subroutine3.pl. main.pl file is the main program and it depends on the other subroutine files for data. So i tried zipping it using winzip and ran pp -o foldername.exe foldername.zip the exe file gets created as foldername.exe but when i tried runing it , it flags an error saying Usage: D:\Perl\foldername.exe script_file_name. Can i know how to create the EXE file with all the files together? Thanks and Regards, Dharshana You are making it harder for yourself than you have to. Don't ZIP anything ... pp -o main.exe main.pl should be enough. And if the pp doesn't notice your main.pl uses subroutineX.pl then try pp -o main.exe main.pl subroutine*.pl Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
On 12/4/06, Jenda Krynicky [EMAIL PROTECTED] wrote: From: Dharshana Eswaran [EMAIL PROTECTED] Hi Randal, I am trying to generate an exe file from few perl programs. I have 4 files which are main.pl, subroutine1.pl, subroutine2.pl and subroutine3.pl. main.pl file is the main program and it depends on the other subroutine files for data. So i tried zipping it using winzip and ran pp -o foldername.exe foldername.zip the exe file gets created as foldername.exe but when i tried runing it , it flags an error saying Usage: D:\Perl\foldername.exe script_file_name. Can i know how to create the EXE file with all the files together? Thanks and Regards, Dharshana You are making it harder for yourself than you have to. Don't ZIP anything ... pp -o main.exe main.pl should be enough. And if the pp doesn't notice your main.pl uses subroutineX.pl then try pp -o main.exe main.pl subroutine*.pl Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response Hi Jenda, I learnt that zipping wont help me and i tried the way you specified, like: pp -o main.exe main.pl subroutine*.pl But even that did not help me. It creates a EXE file, but when i try using it all alone without the other supported files, it says that can't open subroutine.pl This is the problem i encounter. Thanks and Regards, Dharshana
Re: Perl Query - Conversion of EXE file
You are making it harder for yourself than you have to. Don't ZIP anything ... pp -o main.exe main.pl should be enough. And if the pp doesn't notice your main.pl uses subroutineX.pl then try pp -o main.exe main.pl subroutine*.pl Jenda Hi Jenda, I learnt that zipping wont help me and i tried the way you specified, like: pp -o main.exe main.pl subroutine*.pl But even that did not help me. It creates a EXE file, but when i try using it all alone without the other supported files, it says that can't open subroutine.pl This is the problem i encounter. Thanks and Regards, Dharshana subroutine.pl? Anyway .. if you run the main.pl it works, right? If you run the created EXE in the same folder what does it do? If you run it from a different folder? If you run it on a different machine? What happens if you add BEGIN { print Starting the execution of main.pl\n } on the very top of main.pl? Do you get first this message and then the one about subroutine.pl? And if that subroutine.pl even in the same folder as the main.pl? Maybe you need to give pp the whole path to this subroutine.pl Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
On 12/4/06, Jenda Krynicky [EMAIL PROTECTED] wrote: You are making it harder for yourself than you have to. Don't ZIP anything ... pp -o main.exe main.pl should be enough. And if the pp doesn't notice your main.pl uses subroutineX.pl then try pp -o main.exe main.pl subroutine*.pl Jenda Hi Jenda, I learnt that zipping wont help me and i tried the way you specified, like: pp -o main.exe main.pl subroutine*.pl But even that did not help me. It creates a EXE file, but when i try using it all alone without the other supported files, it says that can't open subroutine.pl This is the problem i encounter. Thanks and Regards, Dharshana subroutine.pl? Anyway .. if you run the main.pl it works, right? Yeah, mail.pl works If you run the created EXE in the same folder what does it do? The created EXE in the same folder works If you run it from a different folder? From a different folder it flags a msg Cannot open subroutine.pl which i have written in my main.pl like unless (open(LINE, subroutine.pl)) { die(Cannot open input file subroutine.pl\n); So, the die statement is executed. If you run it on a different machine? The same action as described above happens when run on a different machine What happens if you add BEGIN { print Starting the execution of main.pl\n } If the above statement is added, it prints the above statement and then prints the message as shown above, like: Starting the execution of main.pl Cannot open input file subroutine.pl on the very top of main.pl? Do you get first this message and then the one about subroutine.pl? And if that subroutine.pl even in the same folder as the main.pl? Maybe you need to give pp the whole path to this subroutine.pl But the requirement is that the resulting EXE should not have any depending files. So keeping subroutine.pl in the same folder does not satisfy the requirement. As, the resulkting file has to be distributed among ppl who does not have any knowledge on Perl. So, they can only run the exe file. And also, i wanted to know, if the EXE can be created in UNIX Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response Please guide me in the same. Thanks and Regards, Dharshana
Re: Perl Query - Conversion of EXE file
Hi Randal, I am trying to generate an exe file from few perl programs. I have 4 files which are main.pl, subroutine1.pl, subroutine2.pl and subroutine3.pl. main.pl file is the main program and it depends on the other subroutine files for data. So i tried zipping it using winzip and ran pp -o foldername.exe foldername.zip the exe file gets created as foldername.exe but when i tried runing it , it flags an error saying Usage: D:\Perl\foldername.exe script_file_name. Can i know how to create the EXE file with all the files together? Thanks and Regards, Dharshana On 28 Nov 2006 16:10:08 -0800, Randal L. Schwartz merlyn@stonehenge.com wrote: Dharshana == Dharshana Eswaran [EMAIL PROTECTED] writes: Dharshana I am in search of a way to convert Perl Program to EXE file. So that it can Dharshana be run anywhere even without installing Perl. See PAR in the CPAN. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
Hi Dharshana, Just Zipping the file will wont work. You have to include them in program with 'use or 'require'. Try to do that. Rajeev On 12/1/06, Dharshana Eswaran [EMAIL PROTECTED] wrote: Hi Randal, I am trying to generate an exe file from few perl programs. I have 4 files which are main.pl, subroutine1.pl, subroutine2.pl and subroutine3.pl. main.pl file is the main program and it depends on the other subroutine files for data. So i tried zipping it using winzip and ran pp -o foldername.exe foldername.zip the exe file gets created as foldername.exe but when i tried runing it , it flags an error saying Usage: D:\Perl\foldername.exe script_file_name. Can i know how to create the EXE file with all the files together? Thanks and Regards, Dharshana On 28 Nov 2006 16:10:08 -0800, Randal L. Schwartz merlyn@stonehenge.com wrote: Dharshana == Dharshana Eswaran [EMAIL PROTECTED] writes: Dharshana I am in search of a way to convert Perl Program to EXE file. So that it can Dharshana be run anywhere even without installing Perl. See PAR in the CPAN. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Perl Query - Conversion of EXE file
Dharshana == Dharshana Eswaran [EMAIL PROTECTED] writes: Dharshana I am in search of a way to convert Perl Program to EXE file. So that it can Dharshana be run anywhere even without installing Perl. See PAR in the CPAN. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 merlyn@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Perl Query - Conversion of EXE file
Hi All, I just have a query in Perl. I am in search of a way to convert Perl Program to EXE file. So that it can be run anywhere even without installing Perl. I searched the net and had mailed the beginners mailing list which suggested me a few tools like Perl2exe or Perl_Dev_Kit to do the same. But i wanted to know if there is any other way to do the same. Can we make this program as a Perl module, use it in a C code and then create the EXE of the C code? Will this work? I am not sure, so thought will ask you for suggestions. Can anyone please guide me in the same? Thanks and Regards, Dharshana I