Now, enough talking about Perl. Let’s see how we justify the post title by creating standerd alone application using form Perl source code.
Before we start I’m assuming you already setup your Perl environment in your box. If not please check this post to how do it.
We can create binary version. Using several different tools. But here I’m going to use only these two tools.
1) PerlApp (http://www.activestate.com/perl-dev-kit)
2) Perl2exe (http://www.indigostar.com/perl2exe.php)
Unfortunately none of above are completely free. PerlApp Comes with 21 days trail period were as perl2exe is kind of free but it will leave a message below in your output binary.
Anyway, I’m going to try with both. Download above two tools and install them. Make sure you set them under your windows environmental PATH Variable.
Now, let’s write some Perl script which we want to convert into a standard alone application.
This code will generate a scaffolding for your html project. I know we have yomon to do it. It’s a mini version of it on Perl. Now to test your code what you can do it just got to your command prompt and type as
Hope you already install active perl and set it up in your PATH.
perl tuhtml init
It will ask some question just answer them to create your project.
Now, The interesting part. Let’s convert our Perl into standerdalone .exe application so we can distribute it without any chance of exploding our source code.
PerlApp, Perl2Exe works exactly the same way. We will try with both of them separately. I hope you installed them and put them under PATH. Open your command prompt and go to location where you wrote your Perl script (Alternatively you can press shift and right click inside the folder where you wrote your Perl script). Run the following command.
You can use any of bove to get your .exe file.