Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

PERLAPP - Converting Pl to exe file

by krishnakumar.vengada (Initiate)
on Sep 11, 2013 at 10:23 UTC ( [id://1053450]=perlquestion: print w/replies, xml ) Need Help??

krishnakumar.vengada has asked for the wisdom of the Perl Monks concerning the following question:

I have a small perl snippet which needs to be converted to exe for User compatibility. But the problem is "Perlapp" what i have to convert pl to exe is Trial Version.So the exe what i generated is getting expired after 20 days. Perl2exe and par is not that much effective as im using GUI in my script. So if someone has perlapp can you please build the below code to an executable and give me?

#!/usr/bin/perl #use strict; use Tkx; use Digest::CRC;; use Win32::HideConsole; hide_console; sub trim($); my $mw = Tkx::widget->new('.'); $mw->g_wm_title("CRC32 Calculator"); $mw->g_wm_minsize( 100, 200 ); my $asciicrc,$hexcrc; # Command Buttons my $asciiconversion = $mw->new_ttk__button( -text => "ASCII Conversion +", -width => 20, -command => sub { ascii(); } ); Tkx::grid( $asciiconversion, -row => 1, -columnspan => 1, -padx => 5, +-pady => 5 ); my $hexconversion = $mw->new_ttk__button( -text => "HEX Conversion", - +width => 20, -command => sub { hexa(); } ); Tkx::grid( $hexconversion, -row => 2, -columnspan => 2, -padx => 0, -p +ady => 0 ); # Text Boxes my $text; my $input = $mw->new_tk__text( -width => 40, -height => 5, -state => " +normal", -wrap => "none" ); my $output = $mw->new_tk__text( -width => 40, -height => 5, -state => +"normal", -wrap => "none" ); Tkx::grid( $input, -row => 3, -columnspan => 1, -padx => 10, -pady => +10 ); Tkx::grid( $output, -row => 4, -columnspan => 2, -padx => 10, -pady => + 10 ); Tkx::MainLoop(); sub ascii { my $asciicontent = $input->get("1.0", "end"); my $asciitrim = asciitrimm($asciicontent)."\n"; sub asciitrimm($) { my $asciicontent = shift; $asciicontent =~ s/^\s+//; $asciicontent =~ s/\s+$//; $asciicrc = Digest::CRC->new( type => "crc32" ) ; $asciicrc->add($asciicontent); my $asciiout=$asciicrc->hexdigest(); $output->m_insert('end', "$asciicontent$asciiout\n"); $output->m_yview('end'); } } sub hexa { my $hexcontent = $input->get("1.0", "end"); my $hextrim = hextrimm($hexcontent)."\n"; sub hextrimm($) { my $hexcontent = shift; $hexcontent =~ s/^\s+//; $hexcontent =~ s/\s+$//; $hexcrc = Digest::CRC->new(type=>"crc32");; my $hexout= $hexcrc->add( pack 'H*', $hexcontent)->hexdigest;; $output->m_insert('end', "$hexcontent$hexout\n"); $output->m_yview('end'); } }

PS:- Sorry monks i know that Perlmonks is for clarifying doubts and sharing knowledge but as Perlapp is too much costly im not in a position to afford it. Thanks.

Replies are listed 'Best First'.
Re: PERLAPP - Converting Pl to exe file
by dasgar (Priest) on Sep 11, 2013 at 13:00 UTC

    I would agree with marto that you should be able to use the pp utility from the PAR::Packer module and the fact that your code is creating a GUI should not have any impact on being able to create a .exe file. If you can take the time to learn how to use the pp utility, you'll get the added benefit that marto pointed to: when you need to update/modify the code, you can then easily build the new .exe file yourself.

    Another free alternative would be to try Cava Packager to build your .exe file. I personally have not used this utility, but it looks like it has a GUI interface available.

Re: PERLAPP - Converting Pl to exe file
by marto (Cardinal) on Sep 11, 2013 at 10:32 UTC

    Should you wish to use a commercial product I suggest you buy a copy rather than ask someone else to package your application. I've pachakged tools using a GUI with pp/PAR in the past. Unless you tell anyone what problems you are having it's unlikely that anyone will be able to help. Read and understand How do I post a question effectively?.

    Update: If you don't find a way to package this yourself, will you continue to ask strangers to package code when a change is required?

Re: PERLAPP - Converting Pl to exe file
by ww (Archbishop) on Sep 11, 2013 at 12:05 UTC
    What you're asking is tantamount to piracy, AKA 'theft!'
      I have a commercial Licence. When i convert a script from anyone else to a binary this is not piracy or theft! With this licence i can sell or give this binary as a gift to anyone i want...

        I have no problem with your use of YOUR license, when it's s/w you created and even though I would not follow your example -- making someone else's script into (persistent) binary -- I don't think that's illegal (in most cases depending on the exact content of the trial license, at which point I throw up my hands, saying 'IANAL') but neither does that comport with my notion of ethical conduct. And I don't have a problem recognizing that YMMV on the presence or absence of ethical issues.

        But, I do have a problem with someone (yep, the OP) who appears to be skating around common trial version restrictions and is now asking PM to help him evade payment for a commercial version.

        (Besides, given the categorical denial that your conduct is piracy or theft, I have to wonder if you missed a key modifier: "tantamount to....")

Re: PERLAPP - Converting Pl to exe file
by Jenda (Abbot) on Sep 12, 2013 at 09:47 UTC

    You can create the exe with par and then change it to not use the console with the exetype.bat included in your installation of Perl

    exetype produced.exe windows

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1053450]
Approved by ansh batra
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-19 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found