Since you are packaging a large-ish application, it would probably be better to create an installer that makes a self-contained folder tree with your application, Perl and the libraries you depend on.
(Executables created by pp (or perl2exe or similar) have a long startup time because everything bundled in to the exe file has to be extracted to a temporary folder, first. Also, creating an installer will give you more control.)
In the past, I have used the "portable edition" of Strawberry Perl as a base for creating installers for custom Perl installations under Windows. Including your application as part of such a custom Perl installer would not be much more work.
Disclaimer: Last time I did this was well over a year ago, so I've forgotten some details. I found the information I needed by searching the web and reading various scripts in the portable Perl installation.
What I remember about what I did:
- "Installed" the "portable edition" of Strawberry Perl on a Windows PC that had no other Perl installed.
- Launched the .bat file in PESP to start a command console to run Perl commands.
- Used cpan to install needed modules.
- Copied known required DLLs to the bin folder.
- You can copy your Perl programs to the bin folder. Then test that it works. Add any missing DLLs and test again.
- Made a copy of the above mentioned .bat file to SetUp.bat
- Modified this new SetUp.bat to perform needed set up actions, including running a Perl program that adds entries to the Windows registry.
- Created a README.txt file saying to run the SetUp.bat file.
- Created a zip file of the customized Perl installation.
- Copied the zip file to another PC with no Perl, extracted it, ran SetUp.bat and tested several Perl programs to make sure they ran correctly. And test your program. If any DLLs are missing, go back, add them to the bin folder, create a new zip file and test it.
- Distributed the zip file with the instructions to extract to c:\CompanyPerl and read the README.txt file.
If this is too hard for your users, try rewriting SetUp.bat as SetUp.pl, then use pp -a CompanyPerl.zip SetUp.pl to create a SetUp.exe - then test it on another PC
If your users demand a "proper" Windows installer, you can use, for example, 7-zip or NSIS, to create a Windows installer.
Once the initial install is done, more Perl programs can be "installed" by copying them to the bin folder in the custom Perl installation.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|