Quantcast
Channel: ActiveState Community Site - PDK discussion
Viewing all 116 articles
Browse latest View live

How to create a 32-bit windows executable with perlapp command

$
0
0

Hi,

Can somebody help me in creating 32-bit executable in PDK 64-bit and perl 64-bit installed system. I tried with perlapp --target - windows-x86-32 command, and its trying to connect to PPM site, and atlast i am getting error "http://ppm4.activestate.com/ap_index.txt: 500 Can't connect to ppm4.activestate.com:80 (connect: timeout)Can somebody tell me how to create 32-bit executable without involving PPM site".

Is there any way that we can use some local Perl or PPM to create it? or is there anyway to connect to ppm4.activestate.com:80 without error?

Thanks,
Sanjeev Gattu


Create exe from encoded script with option

$
0
0

Hi,

I am trying to make a standalone exe from a perl script, using
ActivePerl 5.8.9 Build 827 and
Perl Dev Kit 9.1.1.

The script uses the name of the input file (file to parse) as an option ("perl script inputfile" in cmd).
However, the created exe does nothing, no output is produced as if no input file is specified.

As I understand, PDK should have no problems with options, running exe from cmd in the form of "exe inputfile" should work.
But I am concerned about the process of creating the exe. The perl script was not created by me, and when I open it in an editor (not hex view!) only numbers and some other characters are visible. So I consider it encoded in some way, although I do not know how. And PDK reports only implicit modules when opening the script, so it seems to me there could be the problem. I manually added Getopt modules, but behaviour is the same, no output.

Could the problem be in missing modules or is it perhaps the encoded script?
When doing "perl script inputfile" in cmd it works fine. Also, if I omit "inputfile" it reports "Nothing to do". When running exe there is no such report.

Thank you very much!

Best regards,
Kristijan

couldn't create exe by $mw->{main}->Photo(-file =>'File-Adobe-In-Design-01-icon.gif'); using PerlApp version 9.1 build 295042

$
0
0

We couldn't create exe using following code
any problem with Photo command, I used use Tk::Photo; in top header also.

my $icon = $mw->{main}->Photo(-file => 'File-Adobe-In-Design-01-icon.gif');
  #      $mw->{main}->iconimage($icon);

How to write Perl program for PerlSvc to create a Windows Service

$
0
0

Is there a document describing the requirements on the Perl program that
will be used as input to the PerlSvc tool?

I have seen the PerlSvc document
http://docs.activestate.com/pdk/9.2/PerlSvc.html
but that is on the PerlSvc tool, not how one should write the program.

I also looked at the demo program PingSvc.pl, which gives me an idea, but I'd prefer more informative documentation.

PDK 9.1.1 perlapp oddities when including module Net::SSH2

$
0
0

Greetings,

Running...
Licensed PerlApp 9.1.1 build 295479
Community ActivePerl 5.14.2 x64
HostOS: osname=MSWin32, osvers=5.2, archname=MSWin32-x64-multi-thread (WIN7 64Bit)

So, I have hunted for a module to put in my app to automate SSH destined for multiple OS targets. My Targets are Win32/64 and linux and the module I chose is Net::SSH2. Sadly, I couldn't find any pre-built Net::SSH2 from the Activestate PPM repository as it reports all attempts to build failed? So I did what "ppm repo suggest" suggested and added another repository :>

I added sisyphusion and Net::SSH2 installed without a hassle using Activestate PPM. I then put together a quick script using the module and then wrapped for my native OS and all is well, the wrapped exe runs as expected.

I then changed my target to windows x86-32...
perlapp --norunlib --target windows-x86-32 --exe bootstrap.exe-windows-x86-32.exe bootstrap.pl

perlapp completes with -0- errors... however the wrapped exe when executed on the same Win7 host fails with the following...

Can't load 'auto/Net/SSH2/SSH2.dll' for module Net::SSH2: load_file:The specified module could not be found at /DynaLoade
r.pm line 221.
at perlapp line 848
BEGIN failed--compilation aborted at bootstrap.pl line 4.

Is this a Net::SSH2 build issue or a perlApp issue?
If Net::SSH2, whats the chances/timeframe of getting a build in Activestate PPM for 5.14?
If there is another feature equal SSH2 module on ActiveState PPM for 5.14 other than Net::SSH2 please point in that direction, I have searched for a clean perl SSH solution until my eyes bleed :)

Thanks.

PerlApp - auto-download dist w/ additional perl module breaking cpan

$
0
0

Hi,

I am using PDK PerlApp 9.2.0 build 296171, perl 5.14.2 (linux-64).

Creating a PerlApp wrapper with --target automatically downloads the perl distribution. I am getting the following (doesn't matter target platform). There is a lot of voodoo here and the documentation doesn't explain the required permissions (if any) in the PDK directory ... which is owned by root... so that may be the problem? Also there is no documentation for the caching itself, where the downloaded perl distributions get stored, etc... would be nice to know.

...snip unpackings...
Unpacking YAML-Syck-1.22...done
Updating files in target-site area...DBD::SQLite::db do failed: column path is not unique at /ActivePerl/PPM/InstallArea.pm line 562.
<3> Rollback File conflict for '/home/rich/.pdk/PerlApp/target-perl/1402/windows-x86-64/site/lib/App/Cpan.pm'.
The package App-Cpan has already installed a file that package CPAN
wants to install. at /ActivePerl/PPM/InstallArea.pm line 573.
failed
File conflict for '/home/rich/.pdk/PerlApp/target-perl/1402/windows-x86-64/site/lib/App/Cpan.pm'.
The package App-Cpan has already installed a file that package CPAN
wants to install. at /ActivePerl/PPM/InstallArea.pm line 573.

Perlapp - solaris-sparc-64 Business Edition wrap

$
0
0

Doing a perlapp wrap for solaris-sparc-64.

Downloading of solaris-sparc-64 distribution breaks (maybe) halfway through.

ownloading IO-HTML-0.04....done
Downloading IO-Socket-INET6-2.69...done

Downloading IO-Socket-SSL-1.81...done
Downloading IO-Tee-0.64....done
Downloading IPC-Cmd-0.78...not found
404 Not Found at /ActivePerl/PPM/Client.pm line 1166.

perlapp info:

PerlApp 9.2.0 build 296171 (perl 5.10.0)
Copyright (C) 1998-2012 ActiveState Software Inc. All rights reserved.
Commercial license XXXXXXXXXX for XXXXXXXXXX

EXE: /opt/activestate/pdk/bin/perlapp
PERL: /opt/ActivePerl-5.14_64/bin/perl-static
INC: /opt/ActivePerl-5.14_64/site/lib
INC: /opt/ActivePerl-5.14_64/lib
INC: .
CONFIG: BUILDNUMBER='1402'
CONFIG: VERSION='5.014002'
CONFIG: archlib='/opt/ActivePerl-5.14_64/lib'
CONFIG: archlibexp='/opt/ActivePerl-5.14_64/lib'
CONFIG: archname='x86_64-linux-thread-multi'
CONFIG: binexp='/opt/ActivePerl-5.14_64/bin'
CONFIG: inc_version_list=''
CONFIG: perlpath='/opt/ActivePerl-5.14_64/bin/perl'
CONFIG: prefix='/opt/ActivePerl-5.14_64'
CONFIG: privlib='/opt/ActivePerl-5.14_64/lib'
CONFIG: sitearch='/opt/ActivePerl-5.14_64/site/lib'
CONFIG: sitelib='/opt/ActivePerl-5.14_64/site/lib'
CONFIG: siteprefix='/opt/ActivePerl-5.14_64/site'
CONFIG: so='so'
CONFIG: version='5.14.2'

warning while building perl application : warn: Can't locate VMS\Feature.pm

$
0
0

Hi,

I am getting a warning message ( warn: Can't locate VMS\Feature.pm ) while building our application with PDK 9.2.1 BUILD 29643.It's just a warning and allowing applications to be created. I just wanted to know whether this will impact our executables in any way, so that we can decide whether to give it to our customers or not.

I would also appreciate if i know the reason or any step to fix this warning.
Quick reply is appreciated.

thanks,
Sanjeev Gattu


PerlTray with Windows UAC issue

$
0
0

Hi, I have written a small program using perltray on Windows 7. Basically, this program ping several hosts display the response time on popupMenu. This works fine on my PC. But when I copy the program to another windows 7 machine, it does not work. I need to enable "run as administrator". With that checked, I get another issue when I run the program on other machine, it keep saying:

Do you want to allow the following program from an unknown publisher to make changes to this computer?
Program name: myperltray.exe
Publisher: Unknown

I did a couple of google search and it is something to do with Windows UAC. Is there a way to solve this (the unknown publisher issue) without disabling Windows UAC (User Account Control) ?

--target windows-x86-32 unable to locate Log::Dispatch::Win32EventLog

$
0
0

When using PerlApp 9.2.1 & Perl 5.16.1 for 64-bit, I am creating an executable targeted at 32-bit machines: PerlApp seems to be able to collect most of the 32-bit pieces it needs into it's cache with the exception of Log::Dispatch::Win32EventLog.

Command:
perlapp --trim Win32::EventLog::Message;Log::Log4perl::Config::LDAPConfigurator;Net::LDAP;XML::DOM --add YAML::Loader;YAML::Dumper;Params::Validate::XS;Params::Validate::PP;Date::Manip::DM6;Date::Manip::;Log::Dispatch::Win32EventLog --norunlib --target windows-x86-32 --exe \\oobi\Apps\STI\WinCati\SONAGT\bridge.test.exe --perl C:\Perl64\bin\perl.exe bridge.pl

Output:
Downloading Devel-NYTProf-4.11...done
Downloading HTTP-Tiny-0.025...done
Unpacking Devel-NYTProf-4.11...done
Unpacking HTTP-Tiny-0.025...done
Updating files in target-site area...done
PerlApp 9.2.1 build 296433
Copyright (C) 1998-2012 ActiveState Software Inc. All rights reserved.
Commercial license for Thomas Dillman

Log\Dispatch\Win32EventLog.pm:
error: Can't locate Log\Dispatch\Win32EventLog.pm
refby: perlapp --add

Created '\\oobi\Apps\STI\WinCati\SONAGT\bridge.test.exe'
Executable size: 7.61 MB

[DONE]

I was going to attach the associated .perlapp file but that's apparently forbidden.

PerlNET class constructor(?) equivalent syntax question

$
0
0

Greetings,

After a long period of resistance I find myself having to follow a vendor's app into the world of .net. Perl has been so good to me for years now, in parsing and manipulating complex CAD data and I have a lot of code I would much prefer to re-use and not re-write in c# :-\

The problem I have is in figuring the constructor/initializer start block required by the application. Sorry if my terminology is off on what this block is called.

The template code provided is this:

namespace ScriptSession
{
   
    publicclass Script
    {
        /*
           Notes:
           (*) Put the library name as a first parameter of InitLibrary attribute
           (*) Put the library description as a second parameter of InitLibrary attribute
        */

       
        [InitLibrary("ScriptSession Example", "ScriptSession Desc")]
        publicstaticvoid InitLibrary()
        {

        }
...

 

The key element here is the InitLibrary declaration/constructor/whatever. If is omitted then the app complains it is missing initializer. The function itself is always empty.

As far as I got that seems roughly equivalent in perlNET is this:

use namespace ...
...

=for interface

        [interface: pure]
       [InitLibrary("ScriptSession Example", "ScriptSession Desc")]
        public static void InitLibrary();
       
       
=cut

sub InitLibrary {}
       
...

This builds with plc but the app now complains that 'the initializer threw an exception'.

I have no clue what is the effect of [interface: pure] but it's presence seems to make no difference so far.

I'll appreciate any and all ideas as to what my misunderstanding might be and what I could try next! Also what is the square bracket syntax meaning/purpose in the line [InitLibrary...]

TIA!

Pack Win64 PerlSvc using Win64 lib break

$
0
0

Using a Win32 perl distribution:
- pack library with Win64 perl
- pack PerlSvc with Win64 perl, --use on pack library

The library pack runs OK.
I receive the following error on the PerlSvc pack:

PerlSvc 9.1.1 build 295479
Copyright (C) 1998-2011 ActiveState Software Inc. All rights reserved.
Commercial license for XXXXXXXXXXXXXXXXXXXXXXXXXX

Invalid type 'Q' in pack at /Config_heavy.pl line 1233.
BEGIN failed--compilation aborted at IO/Handle.pm line 266.

- pack library with Win32 perl
- pack PerlSvc with Win32 perl, --use on pack library

Works fine.

How to decomplie the souce code from *.exe which compiled with perlapp?

$
0
0

I'm a poor guy that lost the harddisk with the latest source for two extremly important scripts and only got the exe files left.
Is it possible decomplie exe file to source code?

Hope get your help.

Thanks very much.

Frank.

SplashScreen Feature Request

$
0
0

I have two large projects with many bound files. Because this the executables need up to 8 seconds from clicking till the gui is shown.
Is there a chance that AS include a spashscreen feature so that we can set a bitmap that is shown while perlapp extract the interpreter and the bounded files?

PerlApp - Getting a backtrace from a coredump

$
0
0

Hello All!

How can I get a backtrace of segfault application packed with perlapp?
My application sometimes dies with core file. How can I analysis it?

[root@ndRR3 cknm36]# gdb -c core.25625 /usr/local/bin/myapp
GNU gdb Fedora (6.8-27.el5)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
"/usr/local/bin/myapp": not in executable format: File format not recognized
(no debugging symbols found)
Core was generated by `./myapp reg_ptxas_A_B_new.xml'.
Program terminated with signal 11, Segmentation fault.
[New process 25651]
#0 0x002f10c1 in ?? ()
(gdb)
(gdb) bt
#0 0x002f10c1 in ?? ()
#1 0x00000001 in ?? ()
#2 0x00000000 in ?? ()
(gdb)

[root@ndRR3 cknm36]# file /usr/local/bin/myapp
/usr/local/bin/myapp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped

?

Thanks, Yury.


PerlApp does not find Tk module - Perl 5.14.2 and Trial PDK

$
0
0

Hello,

I’m using a trial version of PDK and ActiveState’s community version of Perl 5.14.2 (which I understood is still being supported by the community). My code includes Tk module (version 804.030) from CPAN that I installed with PPM. I was able to create an executable that runs on my native Windows 7, 64-bit system using the PerlApp GUI.

However, when I try to create an executable for 32-bit Windows systems I get error messages for each of the “use Tk;” and “use Tk::Adjuster;” statements in my code saying that PerlApp is not able to find the modules using the current search paths. I need these modules, so trimming them is not an option.

When I first tried to create the 32-bit version of the executable, a message was displayed saying that PerlApp didnt have a cached copy of ActivPerl for Windows x86-32 and that it would be downloaded and installed from ActiveState in the target cache. This part seems to have gone fine.

To resolve the problem with PerlApp not finding the Tk modules I’ve tried copying the cpan directory from my Perl64 directory to the directory for ActiveState Perl Dev Kit 9.2.1 and adjusting the module search path to included the ActiveState directory. I tried adding it once as “Directory” and later as “Blib directory”, but this didn’t resolve the issue.

Thank you very much. I really appreciate any help.

Can't find perl516.dll....

$
0
0

I just purchased the DevKit (9.21) and tried a very simple test. I am running perlapp on a 64Bit Ubuntu machine but compiling for Windows 32Bit OS. On first run the app goes and downloads the required Windows cache and then creates the executeable without error. However, when I try and run this on a Windows machine (I have tried many) I get this error:

Error: Can't find perl516.dll. Make sure the ActivePerl bin directory is in you PATH.

I configured the app to be an independent executable so I assumed it would wrap the required dll's into the exe.

Has anyone come across this before?

EDIT: To say I am an idiot is an understatement - turns out the actual working on the checkbox is "Make dependent" not "independent". So, leaving it unticked did what I needed.

VBS script converter

$
0
0

I would like to convert the code Sub Macro1 (seen below) to perl, but the converter is giving me the following error:

Errors in input.
Syntax error at or near line 11, column 27:
Selection.InsertBreak Type:=wdPageBreak

The code was generated by a macro I recorded thru Word 2010.

Sub Macro1()
'
' Macro1 Macro
'
'
ChangeFileOpenDirectory "C:\KenGraves\Project2\Input\"
Documents.Open FileName:="wps001.doc", ConfirmConversions:=False, ReadOnly _
:=False, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate _
:="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="" _
, Format:=wdOpenFormatAuto, XMLTransform:=""
Selection.InsertBreak Type:=wdPageBreak
ActiveWindow.ActivePane.VerticalPercentScrolled = 0
ActiveWindow.ActivePane.LargeScroll Down:=4
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
Selection.InsertFile FileName:="wps002.doc", Range:="", ConfirmConversions _
:=False, Link:=False, Attachment:=False
ChangeFileOpenDirectory "C:\KenGraves\Project2\Output\"
ActiveDocument.SaveAs2 FileName:="master.doc", FileFormat:= _
wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _
True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= _
False, SaveNativePictureFormat:=False, SaveFormsData:=False, _
SaveAsAOCELetter:=False, CompatibilityMode:=0
End Sub

Binary no longer works

$
0
0

Have a development CentOS box that I've created a binary to run on another Linux box that did not have perl. All worked well up until recently. The runtime box was recently updated. It now has Perl 5.8.8 (non-activestae build) and some other pkg updates... but it is still basically the same OS (32bit CentOS 2.6.18).

Now when the binary is executed it reports libperl.so found at /usr/lib/perl5/... not an ActiveState binary.

the /tmp gets the pdk-xxxx/ dir with the libperl.so from the binary but never seems to be referenced.

What simple thing am I missing? My binary must have contained everything it needed since it worked last week before the runtime box was updated. Is there something special I need to start doing that I've been overlooking?

perlapp dropping privs

$
0
0

Is this supported?

file gets executed as root, app drops privileges to normal user, perlapp can no longer write to pdk-root directory. Can this be changed? is there an environment variable to set?

Viewing all 116 articles
Browse latest View live