Packaging
From FreemedDeveloperWiki, the FreeMED developers' Wiki.
Contents |
Modules Packaging
FreeMED modules are currently stored in the freemed-modules repository of the Subversion repository. The packages for FreeMED are built from these directories using a monolithic configuration file called package.xml. A ChangeLog is also extracted from the Subversion logs.
package.xml Format
<?xml version="1.0">
<freemedpackage>
<information>
<name>Module Name</name>
<author>Hugo Z Hackenbush (author's name)</author>
<version>release version of this module</version>
<description>textual description</description>
</information>
<install>
<directory>
<destination>modules/modulename/</destination>
</directory>
<file>
<source>mymodule.emr.module.php</source>
<destination>modules/modulename/</destination>
</file>
<file>
<source>mymodule.tex</source>
<destination>lib/tex/</destination>
</file>
</install>
</freemedpackage>
Additional "file" and "directory" elements can be defined, depending on the requirements of the module and its dependencies. Please try to keep your modules installing in their own directories, as it makes maintenance much easier.
Perl Packaging
For Perl packaging, we are currently using PAR 0.87. It is the opensource equivalent to the Perl2exe package, and is capable of building binaries on all of the platforms we support.
Building Win32 Packages
To pack 'hello' into a console-less 'out.exe' with icon (Win32 only):
% pp --gui --icon hello.ico -o out.exe hello
Troubleshooting
| "Unable to locate DLL" during execution | Answer on talkaboutprogramming.com
PAR 0.86 has some changes to eliminate redundant unpacking, but that means that any DLL that is loaded indirectly by another DLL, rather than loaded by a Perl module needs to be packed with the -l option so it will be packed in a shared lib directory and unpacked into the temp directory next to the DLL that loads it, where it can be found. pp -l <full_path>/wxmsw252u_adv_vc_custom.dll -o minwx.exe minimal.pl |
| Question 2 ... | Answer ... |